Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Efficient development for modifying AOSP framework.jar

I'd like to know if it's necessary to rebuild and redeploy my whole AOSP tree after I make modifications to Java source files in framework.jar.

I have working (buildable) trees os ICS and JellyBean and can successfully install them onto my virtual machine.

I'm aware about CCACHE to help speed up builds, and I imagine if I'm modifying C/C++ code then a rebuild and reinstall of the whole tree is my only option.

However, for small changes, such as one of the view or activity source files, is there a quicker method available? A rebuild and reinstall each time makes development a slow and painful process. I'm sure vendors and what not have faster methods at their disposal.

I had no luck with this method:

  1. Running mm in frameworks/base (compiled successfully) and replacing the framework.jar/framework.odex files on the running system.

  2. Rebooted - but then the system hung before the boot screen.

  3. I tested my code by rebuilding the whole image and reinstalling and that image booted okay.

like image 624
pilcrowpipe Avatar asked Jun 23 '13 01:06

pilcrowpipe


1 Answers

For me I discovered the following way. However, I develop for a real device, thus, maybe my approach is not applicable for your case.

  1. As you do, mmm frameworks/base -jN (if you want to add changes also to image and build image you can add snod but this will slow down the build process)
  2. Run adb remount (to make system image writable) - you need to do this only once after you reflash all the device.
  3. Run adb sync system
like image 88
Yury Avatar answered Oct 27 '22 07:10

Yury