IceBreak Do you have any experience to build Android System (AOSP)? Building custom Android image as work or private! I know AOSP but no experience to build I heard first time about AOSP
IceBreak Do you have any experience to build Android System (AOSP)? Building custom Android image as work or private! I know AOSP but no experience to build I heard first time about AOSP
IceBreak Do you have any experience to build Android System (AOSP)? Building custom Android image as work or private! I know AOSP but no experience to build I heard first time about AOSP
IceBreak Do you have any experience to build Android System (AOSP)? Building custom Android image as work or private! I know AOSP but no experience to build I heard first time about AOSP
Why will I talk about this topic (background) In the basic Android app development, often approach as below (in my case) Search in the IDE for suspicious areas. Put a bite on it Modify the code slightly to check the actual behavior Learn the detail implementation background and context…
Why will I talk about this topic (background) In the basic Android app development, often approach as below (in my case) Search in the IDE for suspicious areas. Put a bite on it Modify the code slightly to check the actual behavior Learn the detail implementation background and context…
Why will I talk about this topic (background) In the basic Android app development, often approach as below (in my case) Search in the IDE for suspicious areas. Put a bite on it Modify the code slightly to check the actual behavior Learn the detail implementation background and context…
Why will I talk about this topic (background) In the basic Android app development, often approach as below (in my case) Search in the IDE for suspicious areas. Put a bite on it Modify the code slightly to check the actual behavior Learn the detail implementation background and context… We can approach Android inside system too
More detail… You can get suitable and practical information on these sessions. My Experience creating wearable IoT devices with Android AOSP 16:50-17:15 Online 15:40-16:05 Online Yoshinori Mukai Akira Kimura Day1 Day2 Extreme modification of the Android Framework to enable beamforming using 5-channel microphones
1. Prepare build environments https://source.android.com/docs/setup/start/requirements As of June 2021, Google is using 72-core machines with 64 GB of RAM internally, which take about 40 minutes for a full build (and just a few minutes for incremental builds, depending on exactly which files were modified). By contrast, a 6-core machine with a similar amount of RAM takes 3 hours. Minimum requirements OS: ubuntu LTS ver / 64bit Storage: 250GiB RAM: 16GiB
1. Prepare build environments We cannot build with macOS / windows. Should we buy new high spec ubuntu machines? https://source.android.com/docs/setup/start/requirements OS: ubuntu 20.04 (64bit) Storage: 250GiB CPU: intel 32-core RAM: 128GiB Compose spot VM with this spec on GCP My recommendation
1. Prepare build environments We cannot build with macOS / windows. Should we buy new high spec ubuntu machines? https://source.android.com/docs/setup/start/requirements OS: ubuntu 20.04 (64bit) Storage: 250GiB CPU: intel 32-core RAM: 128GiB Compose spot VM with this spec on GCP My recommendation We can build on AWS too but there are some problem on emulation
1. Prepare build environments Step1. Prepare VM instance on GCP https://source.android.com/docs/devices/automotive/start/avd/cloud_emulator Nested Visualization allowed disk Spot Instance Needs for AVD working
1. Prepare build environments Step1. Prepare VM instance on GCP https://source.android.com/docs/devices/automotive/start/avd/cloud_emulator Nested Visualization allowed disk Spot Instance Needs for AVD working
1. Prepare build environments Step1. Prepare VM instance on GCP https://source.android.com/docs/devices/automotive/start/avd/cloud_emulator Nested Visualization allowed disk Spot Instance Needs for AVD working Needs for AVD working We can finish build around 1.5 hour with this pec
Spot Instance 1. Prepare build environments Step1. Prepare VM instance on GCP https://source.android.com/docs/devices/automotive/start/avd/cloud_emulator Nested Visualization allowed disk ← Needs for AVD working We can save cost 50-70%
1. Prepare build environments Step2. Access via XRDP We can access to instance via GUI with bit setting I recommend to XRDP tunnel through ssh since security reason
2. Build Step2. lunch aosp_cf_x86_64_phone-userdebug Step3. m Step1. source build/envsetup.sh https://android.googlesource.com/platform/build/+/refs/heads/master/envsetup.sh Set up your environment for building Android devices by running the command
$ lunch You're building on Linux Lunch menu .. Here are the common combinations: 1. aosp_arm-eng ... 9. aosp_car_x86-userdebug ... 15. aosp_cf_x86_64_phone-userdebug ... 70. yukawa_sei510-userdebug Which would you like? [aosp_arm-eng] Pick from common choices above (e.g. 13) or specify your own (e.g. aosp_barbet-eng):
$ lunch You're building on Linux Lunch menu .. Here are the common combinations: 1. aosp_arm-eng ... 9. aosp_car_x86-userdebug ... 15. aosp_cf_x86_64_phone-userdebug ... 70. yukawa_sei510-userdebug Which would you like? [aosp_arm-eng] Pick from common choices above (e.g. 13) or specify your own (e.g. aosp_barbet-eng): We can select Android Auto build image too
$ lunch aosp_cf_x86_64_phone-userdebug ============================================ PLATFORM_VERSION_CODENAME=UpsideDownCake PLATFORM_VERSION=UpsideDownCake TARGET_PRODUCT=aosp_cf_x86_64_phone TARGET_BUILD_VARIANT=userdebug TARGET_ARCH=x86_64 TARGET_ARCH_VARIANT=silvermont TARGET_2ND_ARCH=x86 TARGET_2ND_ARCH_VARIANT=silvermont HOST_OS=linux HOST_OS_EXTRA=Linux-5.15.0-1017-gcp-x86_64-Ubuntu-20.04.5-LTS HOST_CROSS_OS=windows BUILD_ID=AOSP.MASTER The platform of current master branch is set as Android 14(U)
3. Check behavior on emulator Cuttlefish https://source.android.com/docs/setup/create/cuttlefish Replicate the framework-based behavior of a real device with a focus on high fidelity by maintaining close alignment with the core framework. We can use acloud command support.
3. Check behavior on emulator Cuttlefish https://source.android.com/docs/setup/create/cuttlefish Replicate the framework-based behavior of a real device with a focus on high fidelity by maintaining close alignment with the core framework. We can use acloud command support. Almost same with physical device behavior except hardware-specific implementation
3. Check behavior on emulator CVD related commands acloud https://android.googlesource.com/platform/tools/acloud/+/refs/heads/master/README.md acloud Simple wrapper command for cvd launch Need to install chrome for launch emulator (It cannot launch with Firefox)
Conclusion Building AOSP makes us more deeply understanding for the Android System. In the appendix section, I added how resolved pitfall / error. Please refer when you build the AOSP.
@Licensing The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. Twemoji. Copyright 2020 Twitter, Inc and other contributors Graphics licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/
Appendix Q. Can we build on AWS instance? A. Yes but not recommended. We need to find machine spec that kvm(kernel- based virtual machine) works. It seems only bare metal instance.
Appendix Q. Can we build on lower version ubuntu? A. Yes but not recommended. It works fine that only focusing on build. But acloud / Cuttlefish is not work fine on ubuntu 18.04 below(in my case)
Appendix Q. repo sync is not finish A. Sometimes, it stops 99% by network error. please try below command sysctl -w net.ipv4.tcp_window_scaling=0 https://source.android.com/docs/setup/build/known-issues
Appendix Q. Build is not finish successfully(2) A. Did you finish the pre-install step? We need to some libs for build. If the error message includes about yacc, the install is not finished yet. https://source.android.com/docs/setup/start/initializing