📜 ⬆️ ⬇️

Switch between EDGE / 3G / LTE in iPhone 5S / 5C (jailbreak)

Finally it happened, Apple included the ability to use LTE for all Russian subscribers of Megafon, MTS, Beeline on iPhone 5S / 5C ( http://www.iphones.ru/iNotes/346250 ). Previously, only Beeline subscribers could officially use LTE on the iPhone ( http://www.iphones.ru/iNotes/336762 ).

New technologies - this, of course, is good, but there is a nuance. As you know, Russian realities are such that 3G and LTE coverage want the best and many (like me) are more important than the iPhone’s duration and network stability than LTE speeds, which may sometime be in the future, and in some places LTE is in the nearest Perspective does not even smell.

Image #2084919, 262 KB
')
The caveat is that when updating the settings of the operator, it becomes impossible to disable 3G. Even turning off the data transfer completely, the phone still jumps between 2G and 3G with the new settings. At my place, for example, 3G is very poorly caught and constantly jumps between 3G and EDGE. If 3G is turned on, problems with voice calls begin, people stop calling me the first time and so on. It also has a strong effect on the battery, as it constantly switches between 2G / 3G. I think many people understand what I'm talking about.

I personally solved this problem for myself and want to share the solution with everyone.

I bought my iPhone 5S model A1530 in order to use LTE from MTS, but I didn’t suspect that it was impossible to turn off 3G. With the release of Jailbreak for iOS 7, I began to explore the possibilities of first turning on LTE, without waiting for the official announcement, and second of the possibility of switching between 2G / 3G / LTE. Unfortunately, as shown by Google, there is currently no stable tweak that would allow you to quickly and easily switch between 2G / 3G / LTE. I began to invent my own way.

So, my way of switching is quite brutal and requires some minimal knowledge and skills related to the jailbreak.
The way is that I created a script that switches the Carrier Bundle (roughly speaking the settings of operators) from the old version, which includes only 3G to new and back.

Just want to say that the method was tested on the iPhone 5S A1530 on the MTS operator. I do not know how this will work on 5C and on other operators, but I tried to make the most secure and stable universal script

For the implementation will need:
  1. Jailbreak iPhone 5S / 5C
  2. Means to interact with the console (optional)
    • MobileTerminal from Sidium. Of the benefits - the easiest way to put and use. But from the minuses - you will need to enter the command manually each time.
    • OpenSSH + SSH client that can save settings and immediately launch the command when connecting (I chose and bought iSSH, since it is ideal enough for working with the console and has the necessary functions)

  3. Bash and dirname, echo, cat, grep, killall, cp, rm commands - in theory, they should be set automatically when installing Cydia, but I'm not sure
  4. The afc2add package from Cydia to access the full iOS file system (to work on the idea is not needed, but at the time of installation you may need at least for backup)
  5. iFunBox or something similar for access to iOS FS for manual installation of the script


After the implementation of points 1 and 4, be sure to backup the operator’s settings with the tool from item 5 or using your own folder method (depending on your operator):
/ System / Library / Carrier Bundles / iPhone / MTS_en.bundle
/ System / Library / Carrier Bundles / iPhone / MegaFon_en.bundle
/ System / Library / Carrier Bundles / iPhone / VimpelCom_en.bundle
and
/ private / var / mobile / Library / Carrier Bundles / iPhone / MTS_en.bundle
/ private / var / mobile / Library / Carrier Bundles / iPhone / MegaFon_ru.bundle
/ private / var / mobile / Library / Carrier Bundles / iPhone / VimpelCom_ru.bundle
There may be no recent folders or they may appear after updating the operator settings.
If something goes wrong, you will need to return the contents of these folders back.

Further files for implementation:
  1. www.mafet.ru/lte/lteswitch.zip
    This archive contains a script with autodetection of the current operator, as well as a set of Carrier Bundle for three operators for 2G / 3G only mode and for LTE
  2. www.mafet.ru/lte/services
    After clicking on the link, you just need to save this file to disk without any changes. This will be necessary for the new SSH instance (details below)
  3. www.mafet.ru/lte/com.openssh.sshd2.plist
    This is the file for launching the second instance of SSH (more later).
  4. www.mafet.ru/lte/lteswitch_all.zip
    All files in one archive


My method suggests relatively convenient control over the iOS interface by switching functions, so I personally use iSSH for the switch. My switch interface looks like this:
Image #2084891, 65.4 KB

Let's start installing the script.


That's basically all you need to switch between profiles.
I will duplicate questions that someone may answer (if there is no profile on Habré, write mafet@mafet.ru ):
  1. How to create icons on SpringBoard on iOS7 to run scripts? Maybe there is some kind of generator?
  2. How to disable connection restriction to ports <1024 on iOS7?
  3. Is there a more light way to re-initialize the Carrier Bundle, except for killall CommCenter ?

ps 0 Oddly enough, SSH does not eat a battery in any way, since the daemon itself is essentially not running. Listens to the analog port inetd. Sshd itself starts only when a connection is established from the client.
ps 1 After installing OpenSSH, be sure to change the password from the standard alpine to your own using the command in the console: passwd <new password> .
Ps 2 If you need to cut LTE for operators of other countries or other operators of Russia, then the technique is the same, but you need to find the settings of the operator without LTE functions and replace the current ones. Although logically, in order to cut LTE for an arbitrary operator, it is enough to execute the command rm / private / var / mobile / Library / Carrier \ Bundle.bundle / overrides_ * and restart the phone, but this is at your own risk and it is advisable to save the contents before / private / var / mobile / Library / Carrier Bundle.bundle .
ps 3 If you need to turn off 3G and LTE and there is no jailbreak, you can use the iRoseTool utility.

Source: https://habr.com/ru/post/210314/


All Articles