Search code examples
androidandroid-sourceandroid-firmware

How to replace android library binary


I need to replace a shared obj /system/lib/hw/bluetooth.default.so on my Nexus 5X, by a different one that I built from AOSP source.

Nexus 5X runs MTC19T factory image and is rooted.

How can this be done?


Solution

  • Figured it out myself.

    Couple of methods would be to unpack+repack img files, or to create update.zip which I couldn't find guidance for.

    Simplest way is to use TWRP recovery. It can modify system partition directly. So I copied file to /sdcard, then in TWRP, I moved it to correct location.