Post Reply

[5.0.2][01/07][v2.11] Nexus 4 LTE Enabler

OP ramjet73

23rd August 2013, 07:04 AM   |  #1  
ramjet73's Avatar
OP Recognized Contributor
Flag Honolulu, Hawaii
Thanks Meter: 9,655
 
9,059 posts
Join Date:Joined: Jan 2006
More
This will permanently enable LTE on the Nexus 4 running any Android 5.0 ROM. As long the hybrid radio is present, and a factory reset is not performed, LTE should remain enabled after reboots and ROM flashes.

Note: This mod also used to modify iptables to allow tethering over LTE on Canadian carriers, Bell, Rogers and Telus; however, these modifications are no longer necessary on Android 5.0. Nevertheless, please post if you have any problems tethering over LTE.


What it does
  • Flashes .33/1.04 hybrid radio
  • Modifies settings.db to permanently enable LTE


Requirements
  • Custom recovery (permanent or temporary)
  • Any Android 5.0+ ROM
  • LTE Band 4 (1700 MHz) AWS-enabled SIM and service provider


Installation
  1. Download the installation ZIP found below to your device, flash from recovery, and reboot.
  2. After flashing, enable your correct LTE APN.


Uninstallation

To help with restoring your device back to stock for OTAs, I have created an uninstaller. To uninstall, download the uninstaller ZIP below to your device, flash from recovery, and reboot.


FAQ

Will this work in my country, region, or territory, provider, etc?
The Nexus 4 is only compatible with LTE Band 4 1700 MHz. Please see the List of LTE networks to see if your provider operates LTE on Band 4 1700 MHz. If your provider does not operate LTE on Band 4 1700 MHz, this fix will not work for you.

How do I install this on my Nexus 4 running stock Android 5.0+?
Detailed instructions on on how to flash this on stock Nexus 4 running Android 5.0 can be found here.

I am running CM12 or CM12-based ROM; how do I get LTE to persist following reboots?
Currently, this fix does not allow LTE to persist on CM12 or CM12-based ROMs because, we speculate, how the ROMs are compiled and this is overriding the values in settings.db. After rebooting, enable LTE by dialing *#*#INFO#*#*, select Phone information, scroll down and select LTE/GSM/CDMA auto (PRL) from the drop-down.




Download & changelog

Before flashing, please remember to make a Nandroid backup. Also, please double check the MD5 hash of the ZIP. Additionally, you can download the .md5 file and have TWRP check it for you.

INSTALLER 2014/01/07 v2.11 - Download
  • Update updater-script to accept 5.0.1 and 5.0.2 ROMs
UNINSTALLER 2014/01/07 v2.11u - Download
  • Update updater-script to accept 5.0.1 and 5.0.2 ROMs
All versions are also available on GitHub.



Special thanks

XanSama
#netfilter guys at freenode
morrislee
cg87
partylikeaninjastar
beerbaronstatic
ramjet73
Joshua Mr PC Repair
Last edited by *child; 7th January 2015 at 11:10 PM.
The Following 87 Users Say Thank You to ramjet73 For This Useful Post: [ View ]
23rd August 2013, 07:05 AM   |  #2  
ramjet73's Avatar
OP Recognized Contributor
Flag Honolulu, Hawaii
Thanks Meter: 9,655
 
9,059 posts
Join Date:Joined: Jan 2006
More
More about the enabling LTE via settings.db

As I alluded to back in July, the build.prop edits were never required to enabled LTE.

Code:
ro.telephony.default_network=9
ro.ril.def.preferred.network=9
These lines tell the phone which network mode to try after a factory reset. This is why some LTE-enabling methods asked you to factory reset to enabled LTE but who wants to factory reset just to enabled LTE. So if you're not resetting, these lines have no effect.

Code:
telephony.lteOnGsmDevice=1
This line was to allow the selection of LTE under Network Mode, but this menu is no longer available >4.3, so this line has no effect. It was only indirectly required because that selection menu allowed you to change the preferred_network_mode value in settings.db, and this is what enables LTE and allows it to stay enabled permanently following a reboot.

So if you can change the preferred_network_mode value directly, you do not need any build.prop edits, nor do you need the Network Mode selection menu. All you need is preferred_network_mode=9 and an LTE-enabled modem/radio. This is what my LTE-enabler accomplishes.

As for the discussion about LTE sticking after ROM flashes, settings.db is located on the data partition. ROM flashable zips rarely touch the data partition, and they also rarely flash a new modem, so as long as these two remain, and you have not wiped (because wiping clears the data partition, which in turn will clear the preferred_network_mode value), LTE will stick after a ROM flash. So basically, you only need to flash my LTE-enabler after wiping.



This mod also used to modify iptables to allow tethering over LTE on Canadian carriers, Bell, Rogers and Telus; however, these modifications are no longer necessary on Android 5.0. I will leave information on those modifications here:
More about the LTE tethering fix

Since the Nexus 4 LTE hack was discovered, people on networks other then T-Mobile have been struggling to enable tethering over LTE. Pre-4.3, the solution was an iptables script to allow LTE tethering through the firewall. This solution no longer works for 4.3+. I have updated the script to allow LTE tethering through the firewall in 4.3+. My LTE fix applies the following changes:
Code:
iptables -D natctrl_FORWARD -j DROP
iptables -t nat -A natctrl_nat_POSTROUTING -o rmnet_usb0 -j MASQUERADE
The other issue is that this script had to be run each and every boot. Placing the commands within an init.d script does not work because at the time init.d scripts are run in the boot, the natctrl_nat_POSTROUTING rule does not exist, so you cannot append to it. Even if you do create the rule and append to it, the changes will be overwritten when the rules are set later in the boot. The solution is to run the commands within a delayed subshell that alters the firewall after the rules are set. This is what my LTE fix does:
Code:
(
sleep 15
iptables -D natctrl_FORWARD -j DROP
iptables -t nat -A natctrl_nat_POSTROUTING -o rmnet_usb0 -j MASQUERADE
)




More information on GitHub.
Last edited by *child; 23rd November 2014 at 01:29 AM.
The Following 12 Users Say Thank You to ramjet73 For This Useful Post: [ View ]
23rd August 2013, 08:45 AM   |  #3  
Senior Member
Thanks Meter: 66
 
196 posts
Join Date:Joined: Mar 2011
Donate to Me
More
It's weird. I have 4g lte after flashing this over Paranoid android latest rom. I changed APN to fast.t-mobile.com. But:
1. My speedtest.net app only shows server 50km and further away. Not location Bay Area where I live.
2. There is no option to change Network mode.
23rd August 2013, 10:46 AM   |  #4  
*child's Avatar
Senior Member
Thanks Meter: 309
 
549 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by sieudaochich

It's weird. I have 4g lte after flashing this over Paranoid android latest rom. I changed APN to fast.t-mobile.com. But:
1. My speedtest.net app only shows server 50km and further away. Not location Bay Area where I live.
2. There is no option to change Network mode.

Interesting.
1. I have no issues with GPS. Is GPS working in other apps?
2. Can you post your build.prop? Apparently Network mode is missing from the latest PA. To get around this, dial *#*#INFO#*#*, select Phone information, scroll down and select LTE/GSM/CDMA auto (PRL) from the drop-down.

I hope this helps.
Last edited by *child; 23rd August 2013 at 11:09 AM.
The Following User Says Thank You to *child For This Useful Post: [ View ]
23rd August 2013, 12:59 PM   |  #5  
hp420's Avatar
Senior Member
Flag NY
Thanks Meter: 895
 
1,811 posts
Join Date:Joined: Jul 2011
More
LTE tethering has always worked for me on tmobile, no matter what app I use....not sure why this would be needed?
23rd August 2013, 06:11 PM   |  #6  
*child's Avatar
Senior Member
Thanks Meter: 309
 
549 posts
Join Date:Joined: Jul 2009
More
Quote:
Originally Posted by hp420

LTE tethering has always worked for me on tmobile, no matter what app I use....not sure why this would be needed?

Not everyone is on T-Mobile, and the fact is that people have been struggling with tethering over LTE with the Nexus 4 long before T-Mobile even had their LTE network.
The Following User Says Thank You to *child For This Useful Post: [ View ]
23rd August 2013, 07:17 PM   |  #7  
WK446's Avatar
Junior Member
Flag Vancouver
Thanks Meter: 0
 
3 posts
Join Date:Joined: Apr 2013
More
Thanks for your work *child. I'm on Rogers and tethering over LTE does not work for me using the 33_84hybridLTE_enablerV2.zip file. I'll let you know how I fare....


Update: Your tethering fix does appear to work. Thanks! All settings are retained after reboot and power down scenarios. Wi-Fi and BT tethering both work, but the BT tethering is extremely slow. I'm not sure why this is but it works. Regardless, your fix was definitely the ticket!


I am running a N4 with CM 10.2 August 21st nightly and Franco 176 JSS kernel. I am on Rogers LTE in Canada.

Tethering tested on N7 32GB v1 running stock JB 4.3
Last edited by WK446; 23rd August 2013 at 07:50 PM.
23rd August 2013, 08:08 PM   |  #8  
*child's Avatar
Senior Member
Thanks Meter: 309
 
549 posts
Join Date:Joined: Jul 2009
More
Glad it worked out for you!
25th August 2013, 06:07 AM   |  #9  
Senior Member
Flag vancouver
Thanks Meter: 10
 
100 posts
Join Date:Joined: Jan 2010
More
Perfect!
This finally fixed all my tehtering problems on rogers. Thanks a lot!!
25th August 2013, 06:26 PM   |  #10  
*child's Avatar
Senior Member
Thanks Meter: 309
 
549 posts
Join Date:Joined: Jul 2009
More
I'm working on an update. Just waiting for the next CM Nightly to test, and then I'll upload it.

Post Reply Subscribe to Thread

Tags
5.0, hotspot, lte, tethering
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes