[APP][5.0+][ROOT] Toggle Network Type 5.0 (2G, 3G, LTE) (xda-exclusive free vers...
source link: https://forum.xda-developers.com/t/app-5-0-root-toggle-network-type-5-0-2g-3g-lte-xda-exclusive-free-version.2945406/page-61#post-88280283
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
[APP][5.0+][ROOT] Toggle Network Type 5.0 (2G, 3G, LTE) (xda-exclusive free version)
Thread starter
Start date
How do you use Toggle Network Type 5.0? (Multiple answers possible)
-
Widget
Votes: 232 48.1% -
Shortcut
Votes: 72 14.9% -
Locale/Tasker plugin
Votes: 250 51.9%
- Total voters
You create a shortcut widget to manually toggle different networks.Hi, I still don't understand this app much. O installed it and added the toggle. I have to toggle manually each time? Or it should auto adjust
Devon Grace
Member
Thank you. I don't think my carrier supports 2g anyway cause Everytime I switch to it, I lose connection with my carrierYou create a shortcut widget to manually toggle different networks.
Nafiganado
Senior Member
Doesn't work. Had to uninstall...
Great tool!Hi,
...
Question, I recently upgraded to a 5G phone (Galaxy Note 10+ 5G, N976B)... for what I could check, there's no support for 5G on your app, right?
Is it possible to add it? Can I help you with that?
Thanks!
layman22
Senior Member
Logcat: https://hastebin.com/orisulavis.sql
Frost Storm
Member
Used it for years now.
Now i switched to a pixel 5 and 5g.
Obvious question:
Is there a way to toggle 5g as well?
Do you plan an update?
Many thanks
---------- Post added at 11:49 AM ---------- Previous post was at 11:48 AM ----------
Really like tool to save some battery.
Used it for years now.
Now i switched to a pixel 5 and 5g.
Obvious question:
Is there a way to toggle 5g as well?
Do you plan an update?
Many thanks
waseemakhtar
Senior Member
Many thanks.
SuperNova92
Member
1jkan
Senior Member
Reactions: theoneofgod
1jkan
Senior Member
Reactions: theoneofgod
jorgeepelos
Senior Member
Reactions: theoneofgod
Egillissen
Member
Egillissen
Member
Cant make it works on android 12. On android 11 worked perfect
Well I'll be damned, I found the solution and have to share! Create a Bixby routine triggered by a notification and then have tasker create and immidiately after cancel the notification. Bixby routines picks it up (while you don't even see it) and has the permissions to change network type
arpruss
Senior Member
For instance:
<TaskerData sr="" dvi="1" tv="6.0.10">
<Task sr="task16">
<cdate>1676133749678</cdate>
<edate>1676134005975</edate>
<id>16</id>
<nme>5g</nme>
<Action sr="act0" ve="7">
<code>1181538121</code>
<Bundle sr="arg0">
<Vals sr="val">
<action>action_name_set</action>
<action-type>java.lang.String</action-type>
<com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE>32</com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE>
<com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE-type>java.lang.Integer</com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE-type>
<com.twofortyfouram.locale.intent.extra.BLURB>5G auto</com.twofortyfouram.locale.intent.extra.BLURB>
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
<sub_id>2</sub_id>
<sub_id-type>java.lang.Integer</sub_id-type>
</Vals>
</Bundle>
<Str sr="arg1" ve="3">com.cygery.togglenetworktype.xda</Str>
<Str sr="arg2" ve="3">com.cygery.togglenetworktype.EditSettingActivity</Str>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="1"/>
</Action>
</Task>
</TaskerData>
nickelnine
Senior Member
You can use this to set 5G or any other modes with Tasker. Make a Tasker task to set to 2G using the Toggle Network Type plugin. Export the task to storage. Copy it to a PC. Change "EXTRA_NETWORK_TYPE" from 1 to 32 (or whatever mode you want; you can check the mode numbers by setting them manually in the Settings app, and then looking at your global preferred_network_modeXX settings). Change the BLURB to something like "5G auto". Copy the task back to Tasker storage. Import it.
For instance:Code:<TaskerData sr="" dvi="1" tv="6.0.10"> <Task sr="task16"> <cdate>1676133749678</cdate> <edate>1676134005975</edate> <id>16</id> <nme>5g</nme> <Action sr="act0" ve="7"> <code>1181538121</code> <Bundle sr="arg0"> <Vals sr="val"> <action>action_name_set</action> <action-type>java.lang.String</action-type> <com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE>32</com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE> <com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE-type>java.lang.Integer</com.cygery.togglenetworktype.EXTRA_NETWORK_TYPE-type> <com.twofortyfouram.locale.intent.extra.BLURB>5G auto</com.twofortyfouram.locale.intent.extra.BLURB> <com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type> <net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled> <net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type> <sub_id>2</sub_id> <sub_id-type>java.lang.Integer</sub_id-type> </Vals> </Bundle> <Str sr="arg1" ve="3">com.cygery.togglenetworktype.xda</Str> <Str sr="arg2" ve="3">com.cygery.togglenetworktype.EditSettingActivity</Str> <Int sr="arg3" val="0"/> <Int sr="arg4" val="1"/> </Action> </Task> </TaskerData>
Thanks for this. What Settings app are you referring to for the mode numbers?
Top Liked Posts
-
Hi,
I've developed a widget to toggle (preferred) network types, e.g., 2G, 3G, 2G/3G, LTE, on Android 5.0/5.1 (Lollipop), Android 6.0 (Marshmallow), and Android 7.0/7.1 (Nougat). It requires root.
This is an xda-exclusive free version! If you want to support me, please consider getting the paid version on Google Play or check out my other apps.
Please note: Redistribution of this app is not allowed!
New: Support for dual SIM/multi SIM devices on Android 6.0 and later.
Paid version on Google Play (same functionality): https://play.google.com/store/apps/details?id=com.cygery.togglenetworktype
Device compatibility: second post
Features:- Widget (cycle through configurable list of network types)
- Locale/Tasker plugin (set specific network type or toggle to next)
- Shortcut (set specific network type or toggle to next)
- Custom names for network types (text shown on the widget)
- Custom background image or color
- Configure text size and color
- Dual SIM/multi SIM support on Android 6.0 and later
Device support depends on a variety of factors, including your specific device model, Android version, installed (custom) ROM, used root provider (su binary), and SELinux configuration. This app includes options to deal with different configurations of some of those factors. Please let me know if this app does not work on your device.
Notes
The widget is passive. Thus, it has to request root every time it is refreshed. Although the battery impact is negligible, this usually results in frequent (Toast) messages indicating that the app was granted root rights. Please refer to your superuser management app if you'd like to disable those messages specifically for this app.
This app includes a (static) shortcut and a (dynamic) widget. Usually, both shortcut and widget are shown in the same list which is used to add them to your homescreen although this list is commonly just labeled "Widgets". For reference, the screenshots in this post show the widget. The shortcut looks like the app icon and has rounded corners. Please note: sometimes the widget is not shown immediately after installing this app. This is likely a bug in the launcher/homescreen app. Please reboot your device in that case.
Known issues:
Android 6/7: When the network type is changed via this app and then the cell radio system settings are opened, the network type is reset to the one set there. Similarly, the previous issue might happen after a reboot or when airplane mode is toggled on and off.
Android 6/7: Some devices/(beta) ROMs don't work with this app (currently). Please search the thread for more details/user reports.
Network type specific: Depending on your device and carrier when using certain modes, e.g., LTE only, you might be unable to send or receive calls, SMS, etc. This is a technical limitation and has nothing to do with this app. Please keep this limitation in mind in case you are not sure whether you are affected by it or not.
Network type specific: Depending on your device/Android version/(custom) ROM/etc. some network types might be unavailable, don't work, or, when trying to select them, result in a different one being activated instead. Please search the thread for more details/user reports. This is outside of this app's control.
Custom ROMs: On some custom ROMs, the default toggle mechanism does not work. There exists a "custom ROM mode" which uses a different method that works on (most) CyanogenMod ROMs and other custom ROMs based on it. However, some network types are not supported by the custom ROM mode. When trying to set them, e.g., the app freezes. Please disable any such unsupported types via the app settings. Additionally, depending on the device/ROM, setting the preferred network type might work, e.g., via the Locale/Tasker plugin or shortcut, but this app might be unable to retrieve the currently set preferred network type. In such cases, toggling to the "next" preferred network type doesn't work since this app doesn't know the current preferred network type.
Other issues: When reporting any issues please include the following info in your post: Device, ROM and ROM version, exact version number of this app you use (don't just write "latest"), superuser management app (e.g., SuperSU) and version, content of any shown error messages. Describe in detail what you tried to do, what you expected to happen, and what happened instead. Include screenshots/screencasts where possible and useful to show the issue.
Cheers,
cygery
Screenshots:ChangelogDevice compatibility:
Please note: This is not an exhaustive list and only mirrors my current state of knowledge. If your device is neither listed in the "compatible" or "incompatible" list its compatibility isn't known yet. If you test it please report and I'll update the lists.
Compatible:- Nexus 5
- Nexus 6
- Nexus 6P
- Nexus 4
- Samsung Galaxy S2
- Samsung Galaxy S3
- Samsung Galaxy S4
- Samsung Galaxy S4 LTE GT-I9505
- Samsung Galaxy S4 Mini
- Samsung Galaxy S5 900F
- Samsung Galaxy S6
- Samsung Galaxy Note 3 N900
- Samsung Galaxy Note 3 N9005
- SM-N9008V (Resurrection Remix 5.6.0)
- HTC M8 GPE
- HTC One S
- LG G2 D802
- LG G3 F400
- LG Leon H340n / MS345
- LG Optimus 4X HD (p880)
- Motorola Moto X 2014 (XT1097)
- Motorola Moto X 2014 Pure Edition (XT1095)
- OnePlus One (Bacon)
- Oneplus X (Oxygen OS 2.13-X)
- OnePlus 3 (7.0 Oxygen OS)
- Shield LTE
- Sony Xperia L
- Sony Xperia S
- Sony Xperia Z1
- Xiaomi Mi2
- HTC One (different models affected, reason unknown, might be ROM-related)
- Moto X X1092 (with Android 6.0)
- 2015 Moto X Pure Edition [XT1575] (with Android 6.0)
- Oxygen OS (some devices/versions affected)
- old/unfinished CM12.1-based ROMs show a "-3" error when trying to toggle (this is a bug in the ROM which in some cases is fixed in more recent releases) workaround added in version 1.1.5.1 ( "custom ROM mode" )
I'll probably have an Android 7 device for testing in about 1-2 weeks and will look into supporting Android 7 then.Here's a first implementation attempt of the new approach to toggle on CM (see attachment). Big thanks to @baudbox for posting the relevant command!
There's a new option ("Custom ROM Mode") for the alternative mode. Please note that it only supports some network types.
I've currently no device for testing so if you test it please report your results. There might be some issues, especially with updating the widget after toggling although I did my best to avoid them.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK