Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying BOOTCLASSPATH in Android Building

This question is related to this other one. I have recompiled Android framework and generated a new image. I need to add some classes to the original framework and did it by adding new jars that go into /system/framework. I modified BOOTCLASSPATH to take into account these new jars.

Building the image and flashing to the device does not work. Some optimizations must be run prior to that, but I do not know how that process is.

What building steps should I execute before generating the image or what other alternatives do I have so the extended framework classes are accesible from applications?

like image 607
Fernando Miguélez Avatar asked Nov 14 '22 20:11

Fernando Miguélez


1 Answers

I also changed the bootclasspath by changing one of the .mk files, adding my jar to a line that looks like this: PRODUCT_BOOT_JARS += myjar

Then you just have to make the build and flash to the device just like what you said. Sometimes it might not be enough and you'd have to erase this file: ./obj/ETC/init.environ.rc_intermediates/init.environ.rc

and then make again.

Hope that helps.

like image 82
Ravit D Avatar answered Dec 15 '22 02:12

Ravit D