Hey ladies and gents. I would like to aid anyone who is developing a custom Android operating system, but are encountering connectivity issues with the bluetooth and WiFi peripherals. I have flashed custom ROMs ( from Android 4.0 – 4.4) plenty of times, but 4.2 has been a hard-ass. The Nexus 4 drivers that you are supposed compile into an OTA package are not correctly functioning my with my custom OS (Identidroid). The peripherals never turn on. I figured out a hack for temporary purposes, and I would like to share it with anyone who may need it. Just another day in the life of me :).
Context
Device: Nexus 4
API: 4.2.2
Build: android-4.2.2_r1.2
Environment: Ubuntu 12.04
Recovery image: ClockworkMod
Flashing
The flashing step is pretty much straightforward. I am assuming you are familiar with the context information above. If not, SOL.
- Download the stock factory images from Android 4.2.2, and flash the stock rom using the downloaded instructions. The stock rom may overwrite ClockworkMod. If that happens, you simply need to re-flash the recovery image.
- Enter the command (in fastboot mode):
fastboot flash system [path/to/custom/rom/]system.img
- In ClockworkMod, wipe:
- the user data,
- cache
- Dalvik Cache
- Reboot and PROFIT!!!
To summarize what is happening, I am basically using the stock OS images, but replacing the system.img file. It’s a simple hack, until I figure out why it seems as if my custom OS is incompatible with the Nexus 4 drivers for 4.2.2. This was a quick post, so if there are any questions or if there is something I missed, just shoot me a comment.