google / android-emulator-m1-preview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARM-based system image for Android automotive?

Alvtag opened this issue · comments

Hi all, I'm looking for an Android Automotive system image that works with M1/ Apple Silicon. Does such a thing exist?

These are for x86, I can't run them on the M1.
https://developer.polestar.com/sdk/polestar2-sys-img.xml https://developer.volvocars.com/sdk/volvo-sys-img.xml

Apologies in advance if there's a better place I should have asked this question :)

To show, that you are not the only one, I show my strong interest too

commented

Here for the same reason

commented

Interested

I tried it by my own, maybe someone knows an answer https://stackoverflow.com/q/70982896/1079990

During start I see

The root cause

VERBOSE | Could not find SDK version in build.prop, default is: 10000
VERBOSE | autoconfig: -skin HVGA
VERBOSE | autoconfig: -skindir (null)
ERROR   | bad workspace: cannot find prebuilt ranchu kernel in: /Users/hannes/Library/Android/sdk/prebuilts/qemu-kernel/arm/ranchu/kernel-qemu
ERROR   | This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
ERROR   | ANDROID_SDK_ROOT is defined (/Users/hannes/Library/Android/sdk) but cannot find kernel file in /Users/hannes/Library/Android/sdk/system-images/ sub directories

My current unsuccessful solution for first error

after

cp ~/Library/Android/sdk/system-images/android-30/google_apis/arm64-v8a/kernel-ranchu ~/MY/my_car_emu_arm64

Now I see

[    0.184786] uart-pl011 9000000.pl011: no DMA platform data
[    0.185313] Freeing unused kernel memory: 1216K
[    0.207918] cryptomgr_probe (109): highest shadow stack usage: 168 bytes
[    0.215882] Run /init as init process
[    0.216987] init: init first stage started!
[    0.217330] init: Unable to open /lib/modules, skipping module loading.
[    0.217984] init: Using Android DT directory /proc/device-tree/firmware/android/
[    0.218675] init: [libfs_mgr]ReadDefaultFstab(): failed to find device default fstab
[    0.222438] init: bool android::init::BlockDevInitializer::InitDevices(std::set<std::string>): partition(s) not found in /sys, waiting for their uevent(s): system, vendor
[   10.236993] init: Wait for partitions returned after 10013ms
[   10.239044] init: bool android::init::BlockDevInitializer::InitDevices(std::set<std::string>): partition(s) not found after polling timeout: system, vendor
[   10.242109] init: Failed to mount required partitions early ...
[   10.243405] init: InitFatalReboot: signal 6
[   10.253935] init: #00 pc 0000000000302920  /init (UnwindStackCurrent::UnwindFromContext(unsigned long, void*)+96)
[   10.255564] init: #01 pc 0000000000274e88  /init (android::init::InitFatalReboot(int)+208)
[   10.256827] init: #02 pc 0000000000275268  /init (android::init::InstallRebootSignalHandlers()::$_22::__invoke(int)+32)
[   10.258463] init: #03 pc 00000000000005c0  [vdso:0000007f811f1000] (__kernel_rt_sigreturn)
[   10.259719] init: #04 pc 0000000000376884  /init (abort+160)
[   10.260565] init: #05 pc 0000000000277b74  /init (android::init::InitAborter(char const*)+44)
[   10.261705] init: #06 pc 00000000002c4f28  /init (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76)
[   10.263498] init: #07 pc 00000000002c4748  /init (android::base::LogMessage::~LogMessage()+320)
[   10.264660] init: #08 pc 000000000026ca38  /init (android::init::FirstStageMain(int, char**)+5796)
[   10.265849] init: #09 pc 000000000037571c  /init (__real_libc_init(void*, void (*)(), int (*)(int, char**, char**), structors_array_t const*, bionic_tcb*)+576)
[   10.267716] init: Reboot ending, jumping to kernel
[   10.268635] cfg80211: failed to load regulatory.db
[   10.269356] reboot: Restarting system with command 'bootloader'
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x00000000]
[    0.000000] Linux version 5.4.86-android11-2-00040-g29b2beadc627-ab7157994 (build-user@build-host) (Android (6443078 based on r383902) clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project b397f81060ce6d701042b782172ed13bee898b79), LLD 11.0.1 (/buildbot/tmp/tmp6_m7QH b397f81060ce6d701042b782172ed13bee898b79)) #1 SMP PREEMPT Fri Feb 19 11:59:46 UTC 2021
[    0.000000] Machine model: linux,ranchu

Maybe someone is interested and maybe Google can help https://issuetracker.google.com/issues/219764014

Me plus whole team of developers have this issue, very interested in resolution

4 months, and a whole project, later - I haven't seen any updates on an ARM image. We dug up our older 2017 intel macbooks for my dev team to use, lol.

+1 to this, my co-worker had to dig up an old laptop to do his work.

https://issuetracker.google.com/issues/219764014

hannesa2: did you successfully build an Android Automotive image for emulator that runs on M1? If so, could you please share it?

Please help us to create an emulator for ARM-based M1, since we can't find any workaround for the latest Apple Macbooks.

I would be also interested whether Google will provide officially an ARM Android Automotive image...

I also need an automotive ARM for mac m1

Canary Android Studio has an arm64-v8a image, Android API 32 (Automotive with Play Store). It works on the M1 Pro chip!

@rostyslavfilipchuk Great, it comes with Android Studio Dolphin | 2021.3.1 RC 1

image

@hannesa2 Hi!
how did get it to the list. even after update, i'm not getting it:
image

Do i need to get any specific SDK? it seems i tried all of them to no avail.
image

Maybe I additional installed Android Studio Electric Eel parallel as well ?

image
image
ignore polestar (if you have one) - it will not work. Select Automotive default profile
image
Maybe, I don't remember, you will need to select it from Other Images for the first time
image
image
after, the created emulator will be visible in a stable Android studio (If you selected the same folders for SDK and etc during launching a Preview version) Also, ARM image will be available too.

Thank you so much @hannesa2 and @rostyslavfilipchuk. Both of you answers helped, indeed it has to be Canary version of Android Studio. After seeing you responses and that noticing both of you are on Canaryi tried to download canary version and Automotive SDK showed up:
image

and it work perfectly fine!

Thank you again!

commented

I followed the steps above (install Canary, download Sv2 files etc) I'm getting "The skin directory does not point to a valid skin." Does anyone know how to solve this?

image

I followed the steps above (install Canary, download Sv2 files etc) I'm getting "The skin directory does not point to a valid skin." Does anyone know how to solve this?

This is how it looks like on my side.
image
I guess you should remove this Polestar complete from your installation