Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
So here it goes:
Mobile data toggle
Type - > RUN SHELL (use root)
Command:
Code:
setenforce permissive;
svc data enable; (or disable for off)
setenforce enforcing;
GPS location provider toggle
Type - > RUN SHELL (use root)
Command:
(for high accuracy)
Code:
settings put secure location_providers_allowed +gps;
settings put secure location_providers_allowed +network;
(for batery saving from high accuracy)
Code:
settings put secure location_providers_allowed -gps;
(for completly off from high accuracy)
Code:
settings put secure location_providers_allowed -gps;
settings put secure location_providers_allowed -network;
the toggle of mobile data will probably work with other solution for 2g toggle posted around here.
Solution tested on HTC10 with Nougat 7.0.
Hope it helps.
Plomiwn said:
Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
<text removed from quote>
Click to expand...
Click to collapse
You tested this in Android 7.0,in 2017. I can confirm this still works in 9.0, on my OP6 running OOS :good:
Nothing beats shell commands - so damn effective, love them :highfive:
Kind Regards
TwinAdk
Here is the XML file for toggling GPS :highfive:
Run the task when needed, it take the current GPS status into consideration. The XML should be imported into Tasker.
Errors are logged to the clipboard (respecting existing content), and a flashing message will provide you with the result of the shell commands.
Full location is enabled (triangulation via GPS, wifi networks and cell towers).
This draws the most power but gives you the best location fix.
The Autolocation app is recommended for GPS tricks, and Autolocation for location-aware tasker tricks. None of these two apps can flip the GPS switch though... Previously I used the Secure settings app (AWESOME app) - but sadly it crashes constantly on later android versions (8 and 9 in my experience) - and all alternatives costs money.
Now we can flip that GPS switch ourselves. Why didn't I look into this earlier :silly:
God I love Android! :victory:
Kind Regards
TwinAdk
This is awesome.
I've been searching for a solution for Android Pie and this works perfect for me.
Plomiwn said:
Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
So here it goes:
Mobile data toggle
Type - > RUN SHELL (use root)
Command:
Code:
setenforce permissive;
svc data enable; (or disable for off)
setenforce enforcing;
When I made a task in Tasker with this code when task is run my phone are restart and the task is disappear. It is normal?
Click to expand...
Click to collapse
gonzolex said:
Plomiwn said:
Hey there,
so after recent problems with toggle data plugin/magisk for switching mobile data i decided to get toggles for mobile data and gps without other tools than tasker.
After some readings here and on stackoverflow i managed to get solutions for both without 3rd party apps.
So here it goes:
Mobile data toggle
Type - > RUN SHELL (use root)
Command:
Code:
setenforce permissive;
svc data enable; (or disable for off)
setenforce enforcing;
When I made a task in Tasker with this code when task is run my phone are restart and the task is disappear. It is normal?
Click to expand...
Click to collapse
You don't need root to do that.
Just give permission to task via adb:
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
and you can active/deactivate secure settings by native action of tasker.
Click to expand...
Click to collapse
Guys anyway to switch between location modes in Tasker.
I'm rooted and GPS on/off doesn't seem to work.
That would be because gps on/off no longer exists. You need to switch locating mode to high accuracy or device only from battery saving.
IMHO, it's easiest to do this using AutoTools' secure setting. This task on the AutoTools forum would get you started.
It can also be done by modifying the secure setting entry using a tasker shell command such as:
This command disables:
settings put secure location_providers_allowed ' '
This command enables:
settings put secure location_providers_allowed gps,wifi,network
You should read through Not Enough Tech's shell commands post to get an idea what's happening with this type of command.
I was looking for a way to auto hide the navbar without rooting the phone and I found this app:
https://play.google.com/store/apps/details?id=in.tsdo.elw
If you grant the app permission with adb shell, it can hide the navbar in the apps you choose.
Maybe this is useful for some.
Emui already has a hide feature built into it. I use this everyday.??
No nav bar
Without using 3rd party app you can do this directly from EMUI settings:
Settings > Smart assistance > System navigation > Navigation bar > Switch on Navigation bar.
mhamdto said:
Without using 3rd party app you can do this directly from EMUI settings:
Settings > Smart assistance > System navigation > Navigation bar > Switch on Navigation bar.
Click to expand...
Click to collapse
The app that I linked auto-hides the navbar.
Is your advise doing the same?
tr1cky1 said:
The app that I linked auto-hides the navbar.
Is your advise doing the same?
Click to expand...
Click to collapse
I'm afraid that it doesn't auto hides it and you still have to click on the small arrow to hide it manually.
mhamdto said:
I'm afraid that it doesn't auto hides it and you still have to click on the small arrow to hide it manually.
Click to expand...
Click to collapse
At least with the app that I linked, it auto hides the nav bar and that is what I wanted because I didn't want to always press a button to hide the navbar.
You got that right :good:
I wish they would add this feature to the status bar.
Connorsdad said:
I wish they would add this feature to the status bar.
Click to expand...
Click to collapse
If you mean the notification bar...then use Nova Prime and you can hide it and swipe down to show it. :victory:
I like the stock launcher
Is there any way to have expanded desktop (hiding the notification bar) without changing launcher?
jaseman said:
If you mean the notification bar...then use Nova Prime and you can hide it and swipe down to show it. :victory:
Click to expand...
Click to collapse
wisemanwizz said:
Is there any way to have expanded desktop (hiding the notification bar) without changing launcher?
Click to expand...
Click to collapse
In my case, mate 10 normal, I use the FPS as navigation (home, back, recent) so I hide nav buttons and notification bar in all apps except home (where I can see notifications, battery and time) using this adb shell command (root is not necessary):
Hide navigation/notification bar on all apps but home launcher
settings put global policy_control immersive.full=apps,-com.huawei.android.launcher
Return to default behavior:
settings put global policy_control null*
Sorry for being such a newb but how do I run that command?
I downloaded an app from the play store and executed it the way I thought would work but nothing happened.
Connorsdad said:
Sorry for being such a newb but how do I run that command?
I downloaded an app from the play store and executed it the way I thought would work but nothing happened.
Click to expand...
Click to collapse
Probably you downloaded and used terminal emulator.
These commands doesn't work on terminal unless you are root.
So, to use adb shell command you need:
Download and install Minimal ADB and Fastboot - https://forum.xda-developers.com/showthread.php?t=2317790
Enable developer options on your mate 10 (go to "Settings > System > About phone" and touch a few times over "Build Number").
Under the now visible developer options (go to "Settings > System > Developer options") you should enable USB debugging.
Open a windows command prompt and navigate to the directory where you have installed Minimal ADB and Fastboot, you should see adb.exe within this directory.
If so, type "adb devices" on your windows command prompt and hit enter.
It'll start adb daemon and no devices will be listed under "List of devices attached".
Now connect your USB cable to PC and to your Mate 10 (it is recommend to have Huawei hisuite installed to have the proper drivers).
If your pc identified your device correctly, a prompt will appear on your mate 10 asking you to allow the USB debugging connection. Hit Allow.
Now, type again "adb devices" on your windows command prompt and hit enter.
An ID should appear under "List of devices attached". If not, you should double check driver and confirm that "USB debugging" is ON in Developer options and reconnect USB cable on Mate 10.
If you see the ID, now type "adb shell" on prompt and hit Enter. You should see a prompt with a $ sign on your windows command prompt.
There you can type the commands from previous post.
superandroid2011 said:
Probably you downloaded and used terminal emulator.
These commands doesn't work on terminal unless you are root.
So, to use adb shell command you need:
Download and install Minimal ADB and Fastboot - https://forum.xda-developers.com/showthread.php?t=2317790
Enable developer options on your mate 10 (go to "Settings > System > About phone" and touch a few times over "Build Number").
Under the now visible developer options (go to "Settings > System > Developer options") you should enable USB debugging.
Open a windows command prompt and navigate to the directory where you have installed Minimal ADB and Fastboot, you should see adb.exe within this directory.
If so, type "adb devices" on your windows command prompt and hit enter.
It'll start adb daemon and no devices will be listed under "List of devices attached".
Now connect your USB cable to PC and to your Mate 10 (it is recommend to have Huawei hisuite installed to have the proper drivers).
If your pc identified your device correctly, a prompt will appear on your mate 10 asking you to allow the USB debugging connection. Hit Allow.
Now, type again "adb devices" on your windows command prompt and hit enter.
An ID should appear under "List of devices attached". If not, you should double check driver and confirm that "USB debugging" is ON in Developer options and reconnect USB cable on Mate 10.
If you see the ID, now type "adb shell" on prompt and hit Enter. You should see a prompt with a $ sign on your windows command prompt.
There you can type the commands from previous post.
Click to expand...
Click to collapse
Thanks for your help
I use the dot for navigation, is it possible to keep this ?
If not what is FPS ?
Connorsdad said:
Thanks for your help
I use the dot for navigation, is it possible to keep this ?
If not what is FPS ?
Click to expand...
Click to collapse
Yes, "DOT" works normal.
FPS = FingerPrint Scanner, in case of mate 10 normal, I use the front FPS the same way as the "DOT".
superandroid2011 said:
Yes, "DOT" works normal.
FPS = FingerPrint Scanner, in case of mate 10 normal, I use the front FPS the same way as the "DOT".
Click to expand...
Click to collapse
Sorry, I mean can I have the DOT on the screen all the time (Stock behaviour) instead of having to swipe down from the top ?
I want to disable the nav and status bar due to screen burn on every device I've ever owned.
Connorsdad said:
Sorry, I mean can I have the DOT on the screen all the time (Stock behaviour) instead of having to swipe down from the top ?
I want to disable the nav and status bar due to screen burn on every device I've ever owned.
Click to expand...
Click to collapse
I test here and DOT stays fixed even with hidden nav and status bar.
Screen burn? Do you have the Normal or the Pro version?
Mate 10 Pro is OLED and can suffer from screen burn.
Mate 10 non PRO is LCD and is safe from screen burn.
superandroid2011 said:
I test here and DOT stays fixed even with hidden nav and status bar.
Screen burn? Do you have the Normal or the Pro version?
Mate 10 Pro is OLED and can suffer from screen burn.
Mate 10 non PRO is LCD and is safe from screen burn.
Click to expand...
Click to collapse
Ah, DOT dissapears for me unless I pull down the status bar :/
I have the PRO.
Still, better than it was before, thanks a lot for helping
Hello everyone,
Can someone with a pixel 4 xl please run these two commands using adb (their computer) and report the output? I changed the values and can't figure out the default values. I appreciate your help!
Code:
adb shell settings get secure sysui_rounded_size
adb shell settings get secure sysui_rounded_content_padding
madmack said:
Hello everyone,
Can someone with a pixel 4 xl please run these two commands using adb (their computer) and report the output? I changed the values and can't figure out the default values. I appreciate your help!
Code:
adb shell settings get secure sysui_rounded_size
adb shell settings get secure sysui_rounded_content_padding
Click to expand...
Click to collapse
Ran it, got "null" for both.
Same here.
The phone doesn't actually "round" the corners, the screen is just literally cut off at the corners. This becomes more obvious when you take a screenshot
Leave the value blank or at 0. Whichever makes the most sense in the context of that file.
Sent from my Pixel 4 XL using Tapatalk
thanks guys for your replies. Setting the padding value to 5 actually changed the behavior of the status bar icons and where they are in my phone and I was wondering how to revert it back to what it was.
Maybe I should just unset or set them to null.
For those who have installed LineageOS on T5, you know that there is a bug with a text which is bit blurry. There is a fix for this, you go to Developper Option and disable HW overlays. But the small problem is that it doesn't stay after reboot, and each time you need to disable it again. I found in some old forums how this can be permanently fixed using Tasker. I tried, it works, and I want to share with you. You need to be rooted for that to work.
In Tasker, create new profile: Event -> System -Device Boot
Task : Script - Run shell
Shell command : service call SurfaceFlinger 1008 i32 1
Thick "Use Root" box
That's it, the HW overlays is now permanently disabled.
you made my whole month my dude