[HOW-TO] Reset and restore quick setting to default - Galaxy Note 4 General

This is damn useful after doing dirty rom flashes.
I mean normally after you flash a rom without doing wipe, you might miss out new quick setting(wifi, bluetooth, data toggles on swiping down top screen to see notification)
adb shell settings put secure sysui_qs_tiles default
originally found here https://plus.google.com/+KieronQuinn/posts/3ZUzZhGa83s

can confirm this still works on 2020! i'm using miui on redmi note 8 and have no "edit" quick tiles, using this command i can bring back those missing quick tiles. thanks!

Yes thanks this worked for me in 2020 for Xiaomi Mi 10 Pro that was missing the quick setting toggle choices/second page and the edit toggles facility.
ninekaw9 said:
This is damn useful after doing dirty rom flashes.
I mean normally after you flash a rom without doing wipe, you might miss out new quick setting(wifi, bluetooth, data toggles on swiping down top screen to see notification)
adb shell settings put secure sysui_qs_tiles default
originally found here https://plus.google.com/+KieronQuinn/posts/3ZUzZhGa83s
Click to expand...
Click to collapse

I have the same problem: no second page, no edit button for quick toggles.
Unfortunately, the suggested solution with the adb command does not work for me because of some security issu:
Code:
adb shell settings put secure sysui_qs_tiles default
Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2050)
at com.android.providers.settings.SettingsProvider.mutateSecureSetting(SettingsProvider.java:1570)
at com.android.providers.settings.SettingsProvider.insertSecureSetting(SettingsProvider.java:1530)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:437)
at android.content.ContentProvider.call(ContentProvider.java:2161)
at android.content.ContentProvider$Transport.call(ContentProvider.java:477)
at com.android.providers.settings.SettingsService$MyShellCommand.putForUser(SettingsService.java:375)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:277)
at android.os.ShellCommand.exec(ShellCommand.java:104)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)
Any suggestions on how I can make that work?
Edit: My phone is Xiaomi Mi 9T with global ROM, all updates installed.

Solution: "USB debugging (Security settings)" must also be activated. This requires a Mi-Account for the Xiaomi cloud the be entered in the phone settings.
After that, the adb command has worked and has solved the problem:
Code:
adb shell settings put secure sysui_qs_tiles default
Now I have a second page in the quick toggles and I can edit them. (I did not need to reboot the phone.)

Related

[Question] Can I invert ambient display with Tasker?

Hi, all. I have my phone set up using Substratum to switch to a dark theme at night. My ROM has the option to invert the color of notifications on the lock screen for dark/light themes. I'm guessing it's possible to do this with a shell command since it is a setting that can be toggled in my rom's UI. Does anyone know how I can automate this process with Tasker?
There is a command: settings
There are 3 types of settings: system, secure, global
To find the setting you are looking for, in a rooted terminal use: settings list <type>
To change it, in a rooted terminal or Run Shell action in Tasker (with use root checked), use: settings put <type> <setting> <value>
Only 'system' settings can be changed without root, and that requires a special procedure. I can tell you how, if you don't have root.
Vagelis1608 said:
There is a command: settings
There are 3 types of settings: system, secure, global
To find the setting you are looking for, in a rooted terminal use: settings list <type>
To change it, in a rooted terminal or Run Shell action in Tasker (with use root checked), use: settings put <type> <setting> <value>
Only 'system' settings can be changed without root, and that requires a special procedure. I can tell you how, if you don't have root.
Click to expand...
Click to collapse
I am rooted, thanks. I'll try this out later and let you know. Thank you so much!
Vagelis1608 said:
There is a command: settings
There are 3 types of settings: system, secure, global
To find the setting you are looking for, in a rooted terminal use: settings list <type>
To change it, in a rooted terminal or Run Shell action in Tasker (with use root checked), use: settings put <type> <setting> <value>
Only 'system' settings can be changed without root, and that requires a special procedure. I can tell you how, if you don't have root.
Click to expand...
Click to collapse
I just want to say thank you so much! You opened up a whole new world for me as far as Tasker goes!

Trying to use Tasker Secure Settings to disable volume warning on Samsung S5.

Trying to use Secure Tools to disable volume warning Samsung S5 running Marshmallow. I installed everything and ran adb command. No error, but when I search for Secure Tools it says Not Installed. Then I read this doesn't work on Marshmallow?
My phone is NOT rooted. Any help would be much appreciated.
Thanks - Frankie
Frankie-o said:
Trying to use Secure Tools to disable volume warning Samsung S5 running Marshmallow. I installed everything and ran adb command. No error, but when I search for Secure Tools it says Not Installed. Then I read this doesn't work on Marshmallow?
My phone is NOT rooted. Any help would be much appreciated.
Thanks - Frankie
Click to expand...
Click to collapse
I'm confused. What app are you referring to? "AutoTool's secure settings" or the app "Secure settings" or something else that I'm missing?
TASKER and AUTO TOOLS
I guess I forgot to mention that I'm user Tasker to do this... Thank you.
Be very specific what you are using and what you are trying.
Trying to disable high volume warning on Samsung S5
Using Tasker Auto Tools to run a command on my phone that will allow me to override the Volume High Warning on the Samsung S5 phone. It's supposed to enable WRITE SECURE SETTINGS with this command - and the command runs fine but it's not working for me. But when I go back to the app and look for Secure Settings, it's not there.
adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
Auto tools is a plugin to tasker.
The "adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS" is one of two steps required to give the type of system level OS access this tool needs. The first thing that should be done is to enable "allow modify system settings" for AutoTools.
From the AutoTools Secure Settings page:
To use this, AutoTools needs to be granted permission to change secure settings on your device
If you're on Android 6 or above click here to grant AutoTools the first Settings permission
Then follow these steps to grant AutoTools the Secure Settings permission:
Enable Developer Mode: Go to Android Settings -> About Phone and look for the Build Number option. Touch it multiple times until developer mode is enabled.
Enable USB Debugging: Go to Android Settings -> and look for the Developer Options option. In there, enable the USB debugging option.
Install ADB on your PC: Check here for a quick way to do it.
Connect device to PC: Connect your device to a PC and look on your phone. A prompt should show up asking you to allow your phone to be debugged by your PC. Accept this.
Grant permission: Open a command line on your PC and write
adb shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
Congratulations, AutoTools should now be able to use the "Secure Settings" action!
Click to expand...
Click to collapse
Once those things are done ( I typically reboot for no good reason ☺ ), then go to tasker, add an action in a task, then: plugin -> Auto tools -> secure settings (scroll down the list) you'll end up in a screen where you can configure the AutoTools secure settings action.
WOW! I think I did it.. I just hope I can do it again - this was my "test" phone. I think I was messed up by doing the "search" for secure settings because it said it wasn't installed.. Yet I had looked for the secure settings option and didn't find before - although I had already done all the steps. Somehow I got on to a screen that said the app (I forget the exact words) didn't have permission to change the settings, and to press NO if I wanted to allow the permissions - and I pressed no! I had already created the task to disable the warning - but it's been so long, I'm not sure how I did that - but the bottom line is I think it's working.. I had found several sites that said this wouldn't work with Marshmallow unless the phone was rooted, and my phones are not rooted.. so that makes me skeptical, but I did a reboot, and the warning didn't come back. Thanks a ton for your help.. Let's hope I can re-create on the phone that really needs it.
In case this is found by someone else, many of those "how to use secure settings" posts from lollipop and marshmallow predate the (awareness of the) approach used by AutoTools. People spent a lot of effort trying to force an unsupported, outdated app (the original secure settings) to work in a systemless root environment.
I'm sad to say this did NOT work on my test phone.. It looked like it did, but it didn't.

System UI Tuner

Hi
Can anyone help - I want to access the System UI tuner on P20 pro, to remove icons like Bluetooth and NFC from the status bar.
I found a tutorial (link below) which gives me access to the System UI menu - however the options don't seem to have any effect and there is no option to turn off the NFC icon - can anyone help?
https://www.youtube.com/watch?v=gm8PEYKrjrw
This was so easy on my Oneplus.....not sure why Huawei make it so difficult!
Thanks
Don't bother with the tuner. Simply use adb:
adb shell settings put secure icon_blacklist nfc,bluetooth ... then reboot.
Or if you're rooted, just... settings put secure icon_blacklist nfc,bluetooth in a terminal emulator on the phone, then reboot
Full guide here... https://forum.xda-developers.com/htc-10/how-to/remove-nfc-icon-root-adb-t3507739 It's for the HTC10, but works for the P20 Pro
Thanks however I don't have access to a desktop. Only my phone or an iPad
colthekid said:
Don't bother with the tuner. Simply use adb:
adb shell settings put secure icon_blacklist nfc,bluetooth ... then reboot.
Or if you're rooted, just... settings put secure icon_blacklist nfc,bluetooth in a terminal emulator on the phone, then reboot
Full guide here... https://forum.xda-developers.com/htc-10/how-to/remove-nfc-icon-root-adb-t3507739 It's for the HTC10, but works for the P20 Pro
Click to expand...
Click to collapse
rob2005 said:
Thanks however I don't have access to a desktop. Only my phone or an iPad
Click to expand...
Click to collapse
Not possible without either root or adb AFAIK.
The inbuilt System UI Tuner (Demo Mode) doesn't work properly for me either and, as you said, doesn't have NFC as an option anyway.

Question Settings in Developer Options

Is it possible to enable Install via USB and USB debugging (Security settings) without having a Mi account on the device? And what does MIUI optimisation options do?
Yes. MIUI optimizations heavily restrict background apps which lead to battery savings among other things.
Yes for the first question? Then how?
miravision said:
Yes. MIUI optimizations heavily restrict background apps which lead to battery savings among other things.
Click to expand...
Click to collapse
You need to root your phone. Here is a termux script that will achieve what you want without Mi account.
Code:
su
setprop persist.security.adbinstall 1
Edit file /data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml
and change value to true if it's set to false or add line before the closing </map> tag. Reboot
Code:
<boolean name="security_adb_install_enable" value="true" />
Code:
reboot
I guess rooting will have to wait... can''t void warranty in a new phone before I have had a chance to test it fully. But, thank you. I will save the above.
I'm trying to disable automatic updates , i disabled them everywhere i could , including developer options but when i enable wifi , the updater app notifies me that i have a new update. Indeed, it won't update without my confirmation but i want to get rid of notifications completely . The notifications for this updater system app can not be turned off . Any workaround for this ?
miravision said:
You need to root your phone. Here is a termux script that will achieve what you want without Mi account.
Code:
su
setprop persist.security.adbinstall 1
Edit file /data/data/com.miui.securitycenter/shared_prefs/remote_provider_preferences.xml
and change value to true if it's set to false or add line before the closing </map> tag. Reboot
Code:
<boolean name="security_adb_install_enable" value="true" />
Code:
reboot
Click to expand...
Click to collapse
should this be valid in MIUI 13?
I did save the xml file twice, but after reboot the line for "install enable" was gone.
Any further ideas to mod this - without logging in to Mi Account?
Thaks
linolino
oops EDIT: I did an reboot via button instead of entering "reboot" in adb/termux - so I can confirm the toggel button is still on after command "reboot" in case of pressing button for reboot it was reverted ;-)
@miravision
is there another line for MIUI.
"Install via USB" worked to be turned on.
But still "USB debugging (Security settings)" can't be turned on in developer options.
This would be the toggle from this repeating screen shot: https://github.com/Genymobile/scrcpy/issues/70
Thanks
linolino
miravision said:
You need to root your phone.
Click to expand...
Click to collapse
this is a chicken egg problem:
in turn, root requires unlocking the bootloader (which requires logging in with a mi account over a cellular data sim, it doesn't allow this over wifi)

How To Guide How to enable FULL developer mode (security+install) without SIM and wifi.

Many people asked how to do this withoput needing an internet connection, a xiaomi account and the simcard inside the phone.
I am glad to tell you I found a simple way.
In MIUI 13:
Go in developer mode and enable USB debugging (the normal one).
Then go to Privacy Protection >> Special permissions
From this menu select first Modify System Settings then the small more button at the bottom of the page and tap Show System
Scroll down to Shell, tap on it and enable it.
Now go back to Privacy Protection >> Special permissions and
select Install unknown apps >> More >> Show System
Scroll all the way down to Shell andenable Allow from this source

Categories

Resources