Building AOSP, linux kernel and run emulator (x86_64)
0
votes
0
answers
217
views
I want to build AOSP from source, build Linux kernel from sources and run all of this in android emulator. Later I need to make some experiments, for which I need to modify sources, so this is why i need to build all the code from sources.
I am doing repo init --partial-clone -b main -u https://android.googlesource.com/platform/manifest (I have tried main branch and android 14 branch...), then repo sync, lunch some target (I have tried miscellaneous ones) then "m", then trying to run emulator. And at this moment I have a problem: the emulator cannot start. Basically, there are two reasons for that:
* Kernel is unable to decompress LZ4-compressed image (I unpack the image by hands, but this not helps, see next issue);
* Kernel is unable to mount file systems. This may happen because kernel doesn't have DTB (which dtb on x86_64???) Also, I found, that by default emulator uses not a kernel from "out" directory, but some other. I specify in command line (via -kernel option) the kernel found in "out" directory, but this not helps.
* for -eng builds, emulator complains on absence of user-data.img file;
* for userdebug builds, emulator is unable to mount root or some other partitions (linux kernel starts, but init process aborts with error message).
I'm looking for instruction how can I make x86_64 build which will run in the emulator. Maybe I need some particular target or some particular branch?
Asked by Kirill Frolov
(101 rep)
Aug 5, 2024, 11:35 AM