title: Virtualize Android on arm64 with qemu
body: <p>I'm new to the forum and am currently working on virtualizing Android on a Raspi4.</p>
  <p>The crux of the matter is that the Raspi has an ARM processor and therefore seems well suited for Android.</p>
  <p>Now I have compiled Lineage according to the instructions for arm <a href="https://wiki.lineageos.org/emulator" rel="nofollow noreferrer">https://wiki.lineageos.org/emulator</a>
  I used a Linux computer with AMD for this.</p>
  <p>I just want to start it directly with qemu in order to be able to control how many instances of it are running. With the emulator command I don't get any further either, since the 200GB of repo and all of the other data are not on the Raspi.</p>
  <p>I've pulled the kernel 5.4 and the system.img over, which is in / home / android / lineage / out / target / product / generic_arm64 and am now trying to get it to work somehow. Unfortunately I get the message from qemu-system-aarch64 that the root file system cannot be mounted with the current command:</p>
  <pre><code>qemu-system-aarch64 -M virt,accel=kvm -cpu host -no-reboot -serial stdio -append &quot;root=/dev/ panic=1 rootfstype=ext4 loglevel=8 rw&quot; -drive &quot;file=system.img,index=0,media=disk,format=raw&quot; -kernel kernel-5.4 
  </code></pre>
  <p>I tried many paths like root=/dev/sda0 sda1 vda...</p>
  <pre><code>[    0.651008] Please append a correct &quot;root=&quot; boot option; here are the available partitions:
  [    0.651754] 0100            8192 ram0
  [    0.651755]  (driver?)
  [    0.652319] 0101            8192 ram1
  [    0.652319]  (driver?)
  [    0.652891] 0102            8192 ram2
  [    0.652891]  (driver?)
  [    0.653511] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
  [    0.654294] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
  [    0.655023] 0103            8192 ram3
  [    0.655024]  (driver?)
  [    0.655587] 0104            8192 ram4
  [    0.655587]  (driver?)
  [    0.656154] 0105            8192 ram5
  [    0.656155]  (driver?)
  [    0.656716] 0106            8192 ram6
  [    0.656717]  (driver?)
  [    0.657310] 0107            8192 ram7
  [    0.657311]  (driver?)
  [    0.657885] 0108            8192 ram8
  [    0.657885]  (driver?)
  [    0.658446] 0109            8192 ram9
  [    0.658446]  (driver?)
  [    0.659010] 010a            8192 ram10
  [    0.659010]  (driver?)
  [    0.659578] 010b            8192 ram11
  [    0.659579]  (driver?)
  [    0.660154] 010c            8192 ram12
  [    0.660154]  (driver?)
  [    0.660732] 010d            8192 ram13
  [    0.660733]  (driver?)
  [    0.661102] kworker/u2:0 (102): highest shadow stack usage: 144 bytes
  [    0.661917] cryptomgr_probe (104): highest shadow stack usage: 168 bytes
  [    0.662536] 010e            8192 ram14
  [    0.662536]  (driver?)
  [    0.663116] 010f            8192 ram15
  [    0.663117]  (driver?)
  [    0.663689] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) 
  </code></pre>
  <p>Do any of you have an idea or approach how to get all of this working?</p>
  <p>Thanks and regards,</p>
  <p>Hal</p>