title: Mount qcow2 image created by Android emulator
body: <p>I'm trying to mount the userdata-qemu.img.qcow2 file created by the Android emulator. The following procedure does not work:</p>
  
  <pre><code>sudo qemu-nbd -c /dev/nbd0 ~/.android/avd/Pixel_C_API_27.avd/userdata-qemu.img.qcow2
  </code></pre>
  
  <p>First command runs well, but running</p>
  
  <pre><code>sudo qemu-nbd -c /dev/nbd0 ~/.android/avd/Pixel_C_API_27.avd/userdata-qemu.img.qcow2
  </code></pre>
  
  <p>results in this output:</p>
  
  <pre><code>Fehler: /dev/nbd0: unbekannte Partitionstabelle
  Modell: Unbekannt (unknown)                                               
  Festplatte  /dev/nbd0:  3146MB
  Sektorgröße (logisch/physisch): 512B/512B
  Partitionstabelle: unknown
  Disk-Flags: 
  </code></pre>
  
  <p>Basically it cannot recognize a partition table in the image file. You may wonder what's the output of</p>
  
  <pre><code>fdisk /dev/nbd0 -l
  </code></pre>
  
  <p>so here it is:</p>
  
  <pre><code>Medium /dev/nbd0: 3 GiB, 3145728000 Bytes, 6144000 Sektoren
  Einheiten: sectors von 1 * 512 = 512 Bytes
  Sektorengröße (logisch/physisch): 512 Bytes / 512 Bytes
  I/O Größe (minimal/optimal): 512 Bytes / 512 Bytes
  </code></pre>
  
  <p>As you could expect already, mounting fails of course, since no partitions can be recognized if the partition table itself cannot be recognized either. Thanks for any help!</p>
  
  <p>Edit: I've just found out that the problem must have to do with Android's userdata encryption. As I've never changed any password the encryption password of the emulator's userdata partition would have to be the default one "default_password". How can I decrypt the image to be able to mount it?</p>