I am trying to build a framework.jar from android-x86 aosp but 'mm' in /frameworks/base return "No such file or directory". And also I tried "make framework" but after that framework.jar size in out 300 bytes. I tried "make modules" to get framework module name but list so long. May be somebody know what module name for build complete framework.jar ?
Update: I don't know why mm and mmm don't work for me, but I understand thats "make framework" work correctly, after android 5.0 java classes compiling in ART .oat and .odex files. But I try to reverse emulator framework.jar that have framework.jar fro dalvik with .dex files inside. And it confused me when I compared the builded and emulator file.
Firstly, you should have these in your ~/.bashrc when, and do a full build/flash. Otherwise making and building just parts of framework will cause the device to not boot. These will cause the first boot to be a tad slower since the pre-optimizations are not done at build time.
export WITH_DEXPREOPT=false
export DISABLE_DEXPREOPT=true
export DEX_PREOPT_DEFAULT=nostripping
Next build, you can run just
source build/setupenv.sh
lunch XXXXX-userdebug
make framework
And to update on device
adb root
adb remount
adb sync
adb reboot
For anyone looking at this in 2023 for Android 13 (API 33), to build framework.jar, follow this instead:
make framework-minus-apex
Ref: frameworks/base/Android.bp
Secondly, IMHO, to access any custom APIs in application side, the best way is to create a JAR from the required Manager classes and import in Android Studio as a dependency instead of adding a bulky framework.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With