In January of this year, Tasker made an important announcement that will allow users to run basic system tasks on Android without root privileges. It sounds like a fascinating idea, and to be honest, the new changes have made things a lot easier for users who are still on the fence against rooting their device. In this article, I take a comprehensive look at how Tasker is able to accomplish system-level tasks without root privilege. And to illustrate this, I will show you how with Tasker you can change the preferred network type without root permission. Having said all that, let’s go through the article now and learn the steps in detail.
Change Preferred Network Type with Tasker
Here, we have listed all the sections so that you can quickly jump to the relevant section. First, we explained the new permissions and then we went to the steps. Even if you are new to Android automation, you can follow this guide and learn how to use Tasker more efficiently.
- ADB Permissions Explained
- Granting ADB Permissions (One Time Action)
- Change Preferred Network Type with Tasker
Automate Network Change on Android
ADB Permissions Explained
Before I move on to the steps, I would like to discuss the new ADB permissions you will grant in this tutorial. first one WRITE_SECURE_SETTINGS
which app allows read or write secure system settings. This permission is not available for third-party apps, so you need ADB to manually allow Tasker to interact with system settings.
Next is the ADB WiFi permission. This is a kind of sensitive permission and it is generally not recommended for users to grant this permission. What this permission does is permanently open a port on your Android device that can be accessed by any other app installed on your smartphone. However, you will always get a security prompt before an app can access this port. well if you get a USB Debugging prompt out of the blue – DO NOT start it manually – then cancel instantly. Malicious apps can use this port to control your device if allowed.
Now we come to what this permission does. Well, as I said above, the command keeps the port actively open on your device and Tasker uses ADB shell commands to force inside the device itself. The wireless ADB feature is designed for wireless PC-to-smartphone connectivity, but here Tasker uses it internally (via open port) to send ADB commands without requiring a PC. And that’s why you can perform tasks in Tasker that previously required root permission.
To summarize, DO NOT approve the debug permission if a prompt pops up all of a sudden. Just if you ran the command manually, just give permission. If you want to remove all ADB authorizations, you can do so in Settings -> About Phone -> Developer Options -> Revoke USB Debugging Authorization. You can also disable “Wireless ADB Debugging” to permanently disable the port.
Granting ADB Permissions (One Time Action)
1. First of all, Install the Tasker app ($3.49) on your Android device. It’s a paid app, but worth the price.
2. Next, install ADB on your computer and connect your Android device to the computer. To verify the connection, run: adb devices
In the Terminal/CMD window and press enter. if one returns serial number Then it’s good to go.
3. Now you need to run the below command to give Tasker Write Safe Settings permission. IT does not return any outputbut changes will be made.
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
4. Next, you need to grant ADB WiFi Permission. Run the command below and press enter. A prompt will appear on your Android device. Make sure you have the ” option enabled.Always allow from this computerTap on ” and then on “Allow”.
adb tcpip 5555
5. After doing this, disconnect your device from the computer. You have given all the necessary permissions and now everything can be done on the Android device.
Change Preferred Network Type with Tasker
Now that you’ve learned and granted all the necessary permissions, here’s a simple example: Change the preferred network type on Android devices with Tasker. Joyful can also do other things like turn mobile data on/off, Airplane mode, WiFi and much more. However, we will stick to this simple guide for this article.
1. Open Tasker and give the app initial permissions. From now on, “Tasks” section and tap the “+” button. Here select a name, for example I set “4G” and then tap “Done”.
2. Next, tap the “+” button and search for “network”. open here”Mobile Network Type“.
3. Next, open the drop-down menu and Choose “4G” or whatever your network type preference. Now go back and you have successfully created a task. You can add more actions under a single task if you wish. For example, when I turn on 4G I also disable WiFi.
4. I just do it to complete the tutorial Another task called “2G/3G” so I can easily switch between network types. Follow the same steps as above: tap the “+” button and create a task. Then search for the network and then select “2G and 3G” from the drop-down menu.
5. You’re almost done. You can test the tasks by tapping on “.Play button in the lower left corner. If the network changes by configuration, you are good to go.
6. You can also create a profile and automate the task based on time, home WiFi connection and other conditions. But I am not automating the task here, I am creating a toggle under the Quick Settings menu. Open “Task Attendant” and click “preferences“. Here, switch to the “Action” tab.
7. Now, under Quick Settings Tasks, tap the “search” button and select the task. Do the same for another task.
8. Finally, pull down the Quick Settings panel and tap on the edit button. Search for Tasker transitions here and move them to the Quick Settings menu. Here he is. Just tap the on/off button to activate the task and instantly change the network type. Note that due to some bug, both buttons always appear to be active, but that’s not the case. You need to tap on it to activate the task.
Learn New ADB Permissions and Change Preferred Network Type with Tasker on Android
So that’s all. You just need to enable two ADB permissions and you will be able to perform many operations that previously required root with Tasker. All you have to do is: don’t allow debugging to random prompts. Other than that, you can switch system settings, control overlays, manage permissions directly from Tasker without rooting. Anyway, that’s it for us. If you run into any problems, comment below and let us know. We will definitely try to help you.