Effective development for modifying AOSP framework.jar

I would like to know if I need to rebuild and relocate the entire AOSP tree after making changes to the Java source files in framework.jar.

I have buildable ICS and JellyBean os trees and I can successfully install them on my virtual machine.

I know about CCACHE to speed up the build, and I assume that if I change the C / C ++ code, then restoring and reinstalling the whole tree is my only option.

However, for small changes, such as one of the files with a view or activity file, is there a faster method? Recovery and reinstallation each time makes the development process slow and painful. I am sure that suppliers and that do not have faster methods at their disposal.

I had no luck with this method:

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

  • Reboot - but then the system hangs in front of the boot screen.

  • I tested my code by restoring the whole image and reinstalling it, and this image loaded fine.

+6
source share
1 answer

For me, I opened the next path. However, I am developing for a real device, so maybe my approach is not applicable for your case.

  • How you do it, mmm frameworks/base -jN (if you want to add changes also for the image and create the image you can add snod , but this will slow down the build process)
  • Run adb remount (to access the system image) - you only need to do this once after you flip the entire device.
  • Run adb sync system
+8
source

Source: https://habr.com/ru/post/947915/


All Articles