AOSP partially build and test on emulator
-
After build AOSP, start emulator with command
emulator -writable-system
-
Run
adb remount
every time after emulator restart. -
Now you can use
mm
command to partially build modules of AOSP and useadb push
to replace jars or apps of framework. -
You should always use
mm
to compile
For example, if you modified /frameworks/base/core/res/res/values/dimens.xml, then you can find its nearest make file Android.bp under /frameworks/base/core/res/, then mm
here.
After build, you’ll see [100% 8/8] Install: out/target/product/generic_x86/system/framework/framework-res.apk
, then push framework-res.apk to emulator path /system/framework/. Restart emulator.
You can do this simply by adb sync
. Put the following code into a shell script adbsync. Just run it after mm
. Emulator will sync the build outputs and restart.
References
How to mount /system rewritable or read-only? (RW/RO)