javaandroidandroid-sourceandroid-framework

How to create framework.odex in android


I'm trying to make changes in Android OS so I downloaded AOSP, make some changes and build it.

Now I want to replace framework.jar and framework2.jar on my device (Nexus 5, 4.4.4) but I see that this is an "odex" device - Which means - I have also framework.odex and frameork2.odex.

Can someone help me and explain me how to create those 2 files? I Google it but found only how to odex apk and not framework.

Thank you guys!


Solution

  • Why don't you try to flash images to device ? You need to build complete AOSP source code and flash device with below commands :

    adb reboot bootloader
    
    IMG_PATH="./out/target/product/grouper";
    
    # Erase userdata
    fastboot -w
    
    echo Flashing System .. 
    fastboot flash system $IMG_PATH/system.img
    echo Flashig Boot ... 
    fastboot flash boot $IMG_PATH/boot.img
    echo Flashin Recovery .. 
    fastboot flash recovery $IMG_PATH/recovery.img
    echo now rebooting device ...
    fastboot reboot
    

    The way you are trying, framework.jar might be having different signature than system signature.