Saturday, November 9, 2013

Potential fix for 3G data and Nexus 5

UPDATE:Nope, doesn't work: "The patch only makes the phone think it's registered so it doesn't really have any effect on the network level. One thing I noticed is that it tries to register with MNC=215, not idea where that comes from..."


Over on oov's blog, he has a post on the Nexus 5 and Android 4.4 (kit kat) data-only SIM cell standby [J]. He has found another bug in Android 4.4 that is related to (apparently) incorrect mobile signal reporting. With an LTE data-only (not a data+voice) SIM, the signal bars are properly displayed in the notification bar, but cell standby shows a relatively high percentage of total battery consumption and the phone reports the time without a signal as 100%.

However, this just appears to be an issue with display only, because the phone does have a signal, it doesn't get hot, and the battery drain is not unexpectedly high.

He's created a patch for it and is looking for someone with a 3G SIM or 3G-only mobile contract to test to see if the patch also fixes the problem with 3G networks (bug here). This is all manually done right now because there is no Xposed installer for Android 4.4.

THIS IS NOT FOR BEGINNERS AND WILL VOID YOUR WARRANTY!

You will to have adb and fastboot setup on a computer and you will need to unlock the Nexus 5's bootloader, and flash a custom recovery, and then decompile and recompile jar classes.
  1. Boot in to fastboot by holding volume down and the power button, connect to your PC with USB, type:
    fastboot oem unlock
    then confirm on the phone. This will do factory reset on your phone, wiping everything. Google for "adb backup" if you want to backup some of your stuff (assuming it works on the N5).
  2. Reboot the phone, then disable MTP and enable USB debugging.
  3. Reboot in fastboot and flash the teamwin recovery with:
    fastboot flash recovery openrecovery-twrp-n.n.n.n-hammerhead.img
  4. Boot into recovery and mount the system partition.
  5. Pull a the following files to your pc to create a backup:
    adb pull /system/framework/telephony-common.jar
    adb pull /system/framework/telephony-common.odex

    then delete the odexed file
    adb shell rm /system/framework/telephony-common.odex
  6. Download and start up Baksmali / Smali Manager.
  7. Enter 0 -> f -> telephony-common.jar (which pulls this file from the phone).
  8. Enter 5 -> 1 to set the current project file to telephony-common.jar.
  9. Enter 1 -> x -> Y
  10. Open com/android/internal/telephony/ServiceStateTracker.smali in a text editor and search for:
    useDataRegStateForDataOnlyDevices()
    and on the following line change:
    if-nez to if-eqz
    then save and close the file
  11. Return to Baksmali / Smali Manager and enter 2 -> N to recompile the jar classes with the patched file
  12. Finish with 3 -> Y -> f -> R and the phone will reboot.
This should fix the display issue, but what happens with a 3G contract?

No comments:

Post a Comment