0

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?

GPS
  • 1,322
  • 1
  • 18
  • 40

1 Answers1

0

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.

GPS
  • 1,322
  • 1
  • 18
  • 40
  • This results in a side-effect that replaced file was saved with `u:object_r:media_rw_data_file:s0` so `setenforce 0` is required before bluetooth will load this library. – GPS May 26 '16 at 13:41
  • this side-effect is mitigated if I `copy` instead of `move` – GPS Oct 14 '16 at 06:07
  • Also works: `adb remount`, followed by `adb push` to final location. – GPS Jan 29 '18 at 05:58