iBeacon on Nexus 10 with Android 4.4

Android has added support for Bluetooth Low Energy (aka Bluetooth Smart) and thus iBeacon (a profile of BLE) in version 4.3. However, on my Google Nexus 10 (2012 edition, now running Android 4.4 aka KitKat), support is disabled in the official version provided by Google, even though the hardware supports it. Since I want to try out (and maybe develop) apps that use iBeacons, that makes me a very sad panda… Thankfully, there is a way to enable it, by replacing the original Bluetooth-related libraries on the device with patched libraries that add support for Bluetooth Low Energy.

I have created an update ZIP file for the Nexus 10 (aka Manta) and Android 4.4 build KRT16S: The file can be downloaded from here. It was generated by getting the source of Android (branch android-4.4_r1.2), applying this patch by Manuel Naranjo to reenable Bluetooth Low Energy, recompiling (with target aosp_manta-eng), replacing the content of the update ZIP created by XDA Developers user Keine with the newly compiled libraries and, finally, signing the new ZIP.

!!! Although this seems to work fine for me, I am very new to this so use the ZIP and the instructions below at your own risk !!!

To install (I assume the Nexus 10 has never been rooted or unlocked, which was the case for me):

  • Obtain the Android SDK (for the fastboot and adb tools)
  • Boot to fastboot mode (pressing the Power-Volume Up-Volume Down buttons for some time) and OEM-unlock your device (using “fastboot oem unlock”)
  • Boot to the factory recovery mode (pressing the Power-Volume Up buttons to get past the red triangle) and wipe the user data
  • Boot to Android and reenable USB debugging
  • Boot to fastboot mode and flash a custom recovery image like ClockworkMod (using “fastboot flash recovery recovery-clockwork-6.0.4.3-manta.img “)
  • Boot to the custom recovery mode and apply the update ZIP (by choosing the file from /sdcard; the file can be copied to the Nexus 10 using “adb push …”)
  • Boot to Android (no need to apply the custom recovery image permanently or root the device)

The patch can be tested with an Android app like iBeacon Locate (by the makers of this opensource iBeacon library for Android). I also needed an iBeacon transmitter: I used this opensource Mac OS X application that can run on my Macbook Air running Mavericks (but an iPhone or dedicated hardware could work too).

Here is the Mac OS X application broadcasting the iBeacon advertisement:

Screen Shot 2013-12-11 at 01.00.25

And here is what I get on the Nexus 10:

Screenshot_2013-12-11-00-59-22

Yeaaaah!!!

I was surprised to learn that the Nexus 10 cannot be updated in the usual way (OTA) after this kind of operation. It is possible to rollback to the original libraries of build KRT16S using this  ZIP (the files were obtained through “adb pull /system/lib ~/backup” before applying the BLE update ZIP). Then the new Android build can be installed (for example using sideloading) and the BLE update ZIP reapplied on top (I have tested this with 4.4.2 aka build KOT49H). After an OTA update and before applying the update ZIP, the libraries will have to be backed up to create a new rollback ZIP for that version. Or maybe more simply, the device can be reset to its factory version.

Advertisements

4 thoughts on “iBeacon on Nexus 10 with Android 4.4

  1. Hi,

    I had my hopes that google would support bluetooth le on the nexus 10 running android l. However still under the latest android release there is no bluetooth le support.

    Is this also fixable with a custom patch?

    Thanks,
    Gino

    1. Hello Gino, I haven’t tested but it is worth a try (create a backup of the libs first!). If it doesn’t work, the full code of Android 5.0 for the Nexus 10 (aka Manta) should be in the Android repository and could be compiled with the patch applied, using the instructions in the post. Again, I haven’t tested, but if you do, an update on the result would be much appreciated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s