Hi Dan, Thanks for the reply. I got another related issue and hope that you can solve it as well. If I tried to build from x86-64 machine for arm target, the output folder does not have qemu files that the emulator needs such as ramdisk-qemu.img.
*Download and build code* repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r35 repo sync -c -j4 source build/envsetup.sh lunch *aosp_arm-eng* m -j4 After build success, in the out/target/product/generic_arm64 directory, it does not have ramdisk-qemu.img. When I build for x86-64 target such as aosp_x86_64-eng, the output directory will have the required qemu image for me to run the emulator. *Command to run the x86-64 emulator without running envsetup.sh* export ANDROID_BUILD_TOP=/home/user/android export ANDROID_PRODUCT_OUT=/home/user/android/out/target/product/generic_x86_64 cd /home/user/android/out/target/product/generic_x86_64 /home/user/android/prebuilts/android-emulator/linux-x86_64/emulator -verbose -show-kernel -sysdir system/ -datadir data/ -kernel kernel-ranchu -ramdisk ramdisk-qemu.img -system system.img -initdata userdata.img -cache cache.img -vendor vendor.img Am I missing something when building the arm target on x86-64 machine? I think that it should be possible to run the arm64 aosp android using the arm64 emulator on an arm64 host if I have the right files generated during Android building process. *Emulator for ARM64 hosts (I followed the instruction here to build the emulator for arm64 host, since the prebuilt android emulator only support x86-64 host)* https://developer.android.com/studio/releases/emulator#emulator_for_arm64_hosts Thanks kkh On Wednesday, 9 June 2021 at 11:08:39 UTC+8 Dan Willemsen wrote: > Building Android requires a x86-64 machine, it is not supported on arm. As > you've found, all of our prebuilt tools are x86-64, and I suspect there are > further issues even if you manage to replace them with arm equivalents, as > that hasn't been tested. There's limited support in Soong for Linux/arm64, > but that's for cross-compiling binaries for that configuration on an x86-64 > system. > > - Dan > > On Tue, Jun 8, 2021 at 7:27 PM kkh <[email protected]> wrote: > >> Hi, >> >> Anyone manage to build AOSP on arm host? After repo sync on >> android-11.0.0_r35, did the source envsetup.sh and lunch command, but it >> seem that the build tools is in x86. >> >> Error encountered >> */home/ubuntu/android/build/blueprint/microfactory/microfactory.bash: >> line 62: /home/ubuntu/android/prebuilts/go/linux-x86//bin/go: cannot >> execute binary file: Exec format error* >> >> *You're building on Linux* >> >> *Lunch menu... pick a combo:* >> >> *Which would you like? [aosp_arm-eng] * >> */home/ubuntu/android/build/blueprint/microfactory/microfactory.bash: >> line 62: /home/ubuntu/android/prebuilts/go/linux-x86//bin/go: cannot >> execute binary file: Exec format error* >> >> -- >> -- >> You received this message because you are subscribed to the "Android >> Building" mailing list. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-building?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Android Building" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/android-building/19e0f12e-d416-4ac5-83ec-0a89afae7fb6n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/android-building/19e0f12e-d416-4ac5-83ec-0a89afae7fb6n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/c51755e1-a017-4a2f-b107-232574ff3821n%40googlegroups.com.
