Question [SOLVED ]Not able to disable global Heads up Notifications via adb. - Realme GT Master Edition

Enabled Disable permissions monitoring setting in developer options. Problem was solved.
Ok I am connected with adb and trying to disable global heads up notifications. but I am getting following error.
Code:
C:\Users\Admin>adb shell settings put global heads_up_notifications_enabled 0
Exception occurred while executing 'put':
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2392)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1427)
at com.android.providers.settings.SettingsProvider.insertGlobalSetting(SettingsProvider.java:1381)
at com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:515)
at android.content.ContentProvider.call(ContentProvider.java:2448)
at android.content.ContentProvider$Transport.call(ContentProvider.java:517)
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.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:936)
at android.os.Binder.onTransact(Binder.java:820)
at android.os.Binder.execTransactInternal(Binder.java:1166)
at android.os.Binder.execTransact(Binder.java:1130)
any solutions?

Related

[ROOT] Disable charging LED

If anyone wants to disable charging LED, here's an easy way via Tasker.
Note: notifications will not cause LED to blink while charging
State, power, power any
Enter task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
3. run shell as root, "chmod 444 /sys/class/leds/red/brightness"
Exit task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
Hi! Thanks for sharing. I am getting the following error:
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/Shell runBackground "chmod 644 /sys/class/leds/red/brigthness" root: true timeout: -1
23.21.58/Shell start process-thread ID 725
23.21.58/E add wait type Shell1 time 2147483647
23.21.58/E add wait type Shell1 done
23.21.58/E add wait task
23.21.58/E Error: 127
Am I doing something wrong?
Thanks!
Dj Telo said:
Hi! Thanks for sharing. I am getting the following error:
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/Shell runBackground "chmod 644 /sys/class/leds/red/brigthness" root: true timeout: -1
23.21.58/Shell start process-thread ID 725
23.21.58/E add wait type Shell1 time 2147483647
23.21.58/E add wait type Shell1 done
23.21.58/E add wait task
23.21.58/E Error: 127
Am I doing something wrong?
Thanks!
Click to expand...
Click to collapse
Does Tasker have root access? Check it in Magisk/superuser section.
_mysiak_ said:
Does Tasker have root access? Check it in Magisk/superuser section.
Click to expand...
Click to collapse
Yes it does. I can even execute other shell commands with root without problem. Is the command you are giving maybe only valid with Nougat and not Oreo?
Thanks!
Dj Telo said:
Yes it does. I can even execute other shell commands with root without problem. Is the command you are giving maybe only valid with Nougat and not Oreo?
Thanks!
Click to expand...
Click to collapse
Oups, my bad, sorry for the typo in the instructions. It has to be brigHTness, not brigTHness.
Will this work on the Mi A3 too?
And will the notification led still blink when not charging the phone?
Thank you
DBuffon said:
Will this work on the Mi A3 too?
And will the notification led still blink when not charging the phone?
Thank you
Click to expand...
Click to collapse
I don't have rooted A3 at hand, so can't try it. It might work, there is no harm in sending those commands over adb shell as root user. You will see the result immediately.
Sent from my Mi A1 using Tapatalk
_mysiak_ said:
I don't have rooted A3 at hand, so can't try it. It might work, there is no harm in sending those commands over adb shell as root user. You will see the result immediately.
Click to expand...
Click to collapse
Ok, I'll try but I don't understand the following:
_mysiak_ said:
State, power, power any
Enter task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
3. run shell as root, "chmod 444 /sys/class/leds/red/brightness"
Exit task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
Click to expand...
Click to collapse
Are the "Enter task" the code that should be run when the charging cable connects to the phone and the "Exit task" the one that runs when unplugging the cable?
I don't understand what this code does, and I don't want to mess up the led (that is: before I proceed, I want to know how to revert if things don't go as they should). Thank you.
DBuffon said:
Ok, I'll try but I don't understand the following:
Are the "Enter task" the code that should be run when the charging cable connects to the phone and the "Exit task" the one that runs when unplugging the cable?
I don't understand what this code does, and I don't want to mess up the led (that is: before I proceed, I want to know how to revert if things don't go as they should). Thank you.
Click to expand...
Click to collapse
Enter and exit tasks are for Tasker. If you want to try the commands from adb shell, enter those mentioned in "entry task" first and check if LED stopped glowing. To restore the original state enter commands from "exit task" (or just reboot the phone). Changes are not permanent.
Commands do the following - enable RW access to LED control, set intensity to 0%, disable RW access.
_mysiak_ said:
Enter and exit tasks are for Tasker. If you want to try the commands from adb shell, enter those mentioned in "entry task" first and check if LED stopped glowing. To restore the original state enter commands from "exit task" (or just reboot the phone). Changes are not permanent.
Commands do the following - enable RW access to LED control, set intensity to 0%, disable RW access.
Click to expand...
Click to collapse
Great, thanks for the information.
Unfortunately I can't issue the commands (sorry, I'm new to the adb shell):
Code:
[email protected]:~$ adb shell chmod 644 /sys/class/leds/red/brightness
chmod: /sys/class/leds/red/brightness: Permission denied
[email protected]:~$ adb root
adbd cannot run as root in production builds
DBuffon said:
Great, thanks for the information.
Unfortunately I can't issue the commands (sorry, I'm new to the adb shell):
Code:
[email protected]:~$ adb shell chmod 644 /sys/class/leds/red/brightness
chmod: /sys/class/leds/red/brightness: Permission denied
[email protected]:~$ adb root
adbd cannot run as root in production builds
Click to expand...
Click to collapse
adb shell
su
chmod ....
It works on the A3 too. Thanks!
In my mi A1, revengeos android 9, in enter task, 2th step go in error
d_borghi said:
In my mi A1, revengeos android 9, in enter task, 2th step go in error
Click to expand...
Click to collapse
What kind of error..?
_mysiak_ said:
What kind of error..?
Click to expand...
Click to collapse
Allego
d_borghi said:
Allego
Click to expand...
Click to collapse
Try to run that command from terminal on the phone (or via ADB) as root. Alternatively, store the error message in some variable in Tasker and display it, so we know why exactly does it fail. On my phone it still works fine (Mi A3 now).
how can i try by an emulator terminal app in my phone directly?
d_borghi said:
how can i try by an emulator terminal app in my phone directly?
Click to expand...
Click to collapse
Install and run for example this app https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en
_mysiak_ said:
Install and run for example this app https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en
Click to expand...
Click to collapse
Finally, I try the app.
By this terminal I receive no error, look at the screenshot.
Why tasker goes in error?
d_borghi said:
Finally, I try the app.
By this terminal I receive no error, look at the screenshot.
Why tasker goes in error?
Click to expand...
Click to collapse
Could you take a screenshot of the details in Tasker for that one task which gives you an error? Maybe you have a typo there.

Battery saving mode: how to keep work vibration and double tap to awake?

I explore the possibilities of working in power saving mode (battery saver mode) on Android 9 (Google Pixel 2XL) with vibration and double tap to awake ON.
Through ADB I managed to enable both of these options for this mode with the command:
Code:
adb shell settings put global battery_saver_constants "vibration_disabled=false, aod_disabled"
Everything worked as I needed, however, after some time (maybe half a day to go, maybe 5 minutes), the battery_saver_constants value returns to the default (empty). I look at its value using the
Code:
adb shell settings list global
Previously, I changed the location of the buttons using the command
Code:
adb shell settings put secure sysui_nav_bar "space,recent;home;back,space"
and it still works correctly.
Anyone can tell what exactly is responsible for resetting global constants battery_saver_constants? And is it possible to disable the constant reset of these constants through some ADB settings without root?
For the root there is the following method:
Code:
pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
but without root this command returns error:
Code:
Security exception: Shell cannot change component state for com.google.android.gms/com.google.android.gms.phenotype.service.sync.PhenotypeConfigurator to 2
So, question is still same: how do it without root?
Did you find any solution for this without root? I am having the same problem on OnePlus 7 Android 9. I want to enable the vibrations and disable screen dimming.
Dude, I spent hours trying to do this until I found ur post, I really appreciated u for posting this.
It worked on my pixel 3 with last update "Android 9 July"
This is what I did:
1- Root first
2- Using a terminal app typed the following commands:
3-
PHP:
pm disable --user 0 com.google.android.gms/.phenotype.service.sync.PhenotypeConfigurator
4-
PHP:
settings put global battery_saver_constants "vibration_disabled=false, aod_disabled=false"
3-reboot
Enjoy!!
Double tap to wake will works only after rebooting

Guide - How to add applications into the "Battery - Restricted apps" list.

Hi all,
I have been using Samsung for many years and I used to do things right in the setting menu.
But with Sony XZ1c are thinghs slightly complicated. Like setting applications to "Restricted apps" in battery menu.
When you wan to add app as restricted you have to go to Settings>Apps>See all apps>{chose the app}>Advanced>Battery>Background restriction>Restrict.
It is really crazy for me so I prepare easy way how to do it in bulk by ADB:
Requirements:
ADB installed on your PC.
Enabled: Developer options>USB debugging
Shell started on your PC, for example cmd in Windows, bash or another in Linux
Tested on:
47.2.A.10.80 but it should work on all versions.
How to:
First of all you have to get list of your applications in your phone:
Code:
adb shell pm list packages
package:com.amazon.mShop.android.shopping
package:com.sonymobile.whitebalance
.
.
.
package:com.android.cts.priv.ctsshim
package:com.qualcomm.qti.qms.service.telemetry
If you want (it is not necessarily) use these switches to filter list or show more information:
Code:
pm list packages [-f] [-d] [-e] [-s] [-3] [-i] [-l] [-u] [-U]
[--uid UID] [--user USER_ID] [FILTER]
Prints all packages; optionally only those whose name contains
the text in FILTER. Options are:
-f: see their associated file
-d: filter to only show disabled packages
-e: filter to only show enabled packages
-s: filter to only show system packages
-3: filter to only show third party packages
-i: see the installer for the packages
-l: ignored (used for compatibility with older releases)
-U: also show the package UID
-u: also include uninstalled packages
--uid UID: filter to only show packages with the given UID
--user USER_ID: only list packages belonging to the given user
Chose which application you want to restrinct and type:
Code:
adb shell appops set <PACKAGE> RUN_ANY_IN_BACKGROUND ignore
like:
adb shell appops set com.amazon.mShop.android.shopping RUN_ANY_IN_BACKGROUND ignore
To check status of the app:
Code:
adb shell appops <PACKAGE> RUN_ANY_IN_BACKGROUND
like:
adb shell appops com.amazon.mShop.android.shopping RUN_ANY_IN_BACKGROUND
To restrict more than one application:
Code:
adb shell
appops set com.amazon.mShop.android.shopping RUN_ANY_IN_BACKGROUND ignore
appops set com.sonymobile.scan3d RUN_ANY_IN_BACKGROUND ignore
appops set com.google.android.youtube RUN_ANY_IN_BACKGROUND ignore
appops set net.languagecourse.vt.de RUN_ANY_IN_BACKGROUND ignore
.
.
.
.
appops set com.touchtype.swiftkey RUN_ANY_IN_BACKGROUND ignore
appops set com.FireproofStudios.TheRoom2 RUN_ANY_IN_BACKGROUND ignore
appops set com.FireproofStudios.TheRoom3 RUN_ANY_IN_BACKGROUND ignore
appops set com.FireproofStudios.TheRoom RUN_ANY_IN_BACKGROUND ignore
exit
How to revert your changes:
Code:
appops set <PACKAGE> RUN_ANY_IN_BACKGROUND allow
Like:
appops set com.FireproofStudios.TheRoom RUN_ANY_IN_BACKGROUND allow
Disclaimer:
I'm not responsible when you brick or damage your phone. Please chose <PACKAGE> carefully. Also do not restrict all packages!

Disable system update?

Hi,
I was wondering how I can stop my phone from updating to one UI 3.0? I forgot to disable automatic updates and so it downloaded the update and is saying I will be forced to install in 3 hours...are there certain services in adb I can disable? I tried wiping the cache partition thinking the update might be there, but when I rebooted the message was still there. Please help if you can, thank you.
If it's a carrier phone using a package blocker or ADB to disable the update apk -might- get it.
It's a good question.
I'm curious to see what others with more knowledge about this have to say.
On my AT&T 10+ it only updates on wifi unless you are near... an update tower, if so then bam!
It's important to keep the carrier's autoupdate apk disabled at all times. The carrier can also disable it on their end if you bug them enough.
The phone is unlocked(xac).
I tried installed adb but it didn't work(installed the sdk) but for some reason the platform tools folder would not show up. Going to factory reset and try disabling auto update from the start.
I succesfully disabled software updates using ADB. This is the full recipe I used:
- Conected phone via USB to PC (Windows 7 64 bits). Waited a while for drivers to install.
- Installed "minimal_adb_fastboot_v1.4.3_setup.exe" (from XDA-Developers).
- Enabled USB DEBUG under "Config / Developer Options" on phone.
- Connected phone to PC via USB.
- Opened a Command Prompt under the folder "C:\Program Files (x86)\Minimal ADB and Fastboot"
- Typed ADB SHELL, and the phone´s shell opened.
- Then I used the following commands:
to find packages:
pm list packages | grep soagent
pm list packages | grep wssyncmldm
to disable packages (USE THESE):
pm disable-user --user 0 com.sec.android.soagent
pm disable-user --user 0 com.wssyncmldm
to reenable later (IF YOU CHANGE YOUR MIND):
pm enable --user 0 com.sec.android.soagent
pm enable --user 0 com.wssyncmldm
By the way: after freezing update to Android 11 UI 3.0 for a week, I changed my mind and enabled it. Immediately downloaded the upgrade to 11 and installed. So far so good: not a single issue. I was worried for the "scoped storage" introduced by Android 11, but it was not a problem. I was able to read and write my SD Card as usual, use my "ES File Explorer" as usual, etc, etc. And I can also confirm that battery autonomy is at least the same as with Android 10.
Regards,
Pablo.
paggps said:
I succesfully disabled software updates using ADB. This is the full recipe I used:
- Conected phone via USB to PC (Windows 7 64 bits). Waited a while for drivers to install.
- Installed "minimal_adb_fastboot_v1.4.3_setup.exe" (from XDA-Developers).
- Enabled USB DEBUG under "Config / Developer Options" on phone.
- Connected phone to PC via USB.
- Opened a Command Prompt under the folder "C:\Program Files (x86)\Minimal ADB and Fastboot"
- Typed ADB SHELL, and the phone´s shell opened.
- Then I used the following commands:
to find packages:
pm list packages | grep soagent
pm list packages | grep wssyncmldm
to disable packages (USE THESE):
pm disable-user --user 0 com.sec.android.soagent
pm disable-user --user 0 com.wssyncmldm
to reenable later (IF YOU CHANGE YOUR MIND):
pm enable --user 0 com.sec.android.soagent
pm enable --user 0 com.wssyncmldm
By the way: after freezing update to Android 11 UI 3.0 for a week, I changed my mind and enabled it. Immediately downloaded the upgrade to 11 and installed. So far so good: not a single issue. I was worried for the "scoped storage" introduced by Android 11, but it was not a problem. I was able to read and write my SD Card as usual, use my "ES File Explorer" as usual, etc, etc. And I can also confirm that battery autonomy is at least the same as with Android 10.
Regards,
Pablo.
Click to expand...
Click to collapse
Hello. Thanks for the help. Does the phone have to be in a certain mode in order to use these commands? Like download mode or something? Because I installed adb fastboot and the terminal window came up just as you described. But when I try typing in "ADB SHELL", I get ":adb :shell unknown command SHELL" What am I doing wrong?
Edit: nevermind I figured it out. For anyone else struggling with getting adb to run, I had to run "adb devices" first and then it said "daemon not running" before starting the service and then I saw my phones serial number pop up. After that I was able to run the "adb shell" command and the prompt changed to "d2q: /$" there I put in the services listed by paggps and the auto update service was disabled instantly and the annoying update notification was gone!
Thanks you very much paggps! Maybe Android 11 is good, but I really like having system access to my android folder and some of the other changes just aren't to my taste. I'll probably update in time though once it's more stable. Thanks again! Have a great day!
It appears that there is no ‘wssyncmldm’ package on my Samsung A50 (Model: SM-A505U). Does anyone no of any equivalent commands to those shown above in post #5 by user ‘paggps’ that might disable the system updates on my device? I’m trying to stop the system updates because the system/security updates also update the boot loader version and I’d like to try and root this device some day.
a50:/ $ pm list packages | grep soagent
package:com.sec.android.soagent
a50:/ $ pm list packages | grep wssyncmldm
a50:/ $ *** So it appears that there is no 'wssyncmldm' package ***
a50:/ $ pm disable-user --user 0 com.sec.android.soagent
Package com.sec.android.soagent new state: disabled-user
a50:/ $ pm disable-user --user 0 com.wssyncmldm
Exception occurred while executing 'disable-user':
java.lang.IllegalArgumentException: Unknown package: com.wssyncmldm
at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:25552)
...
...
a50:/ $
Also here’s what I’ve already tried so far on my Samsung A50 (Model: SM-A505U) device using the User Interface Settings options that I thought might help some users on certain devices with certain system software versions to try and disable the system software updates:
To Enable the Developer Options:
Settings
About Phone
Software Information
Tap on 'Build number' quickly 7 times to Enable 'Developer Options' section of Settings
Enter your screen lock pattern or password
To Enable 'USB debugging' option which will allow ADB to connect to the device:
Settings
Developer Options
Debugging Section
USB debugging ENABLE
And to attempt to disable System Software updates via the User Interface (UI):
Settings
Developer Options
Auto update system DISABLE
Settings
Biometrics and Security
Scroll all the way to the bottom and Select ‘Other security settings’
Security policy updates DISABLE
Thanks for any help or suggestions.
tech_dude said:
It appears that there is no ‘wssyncmldm’ package on my Samsung A50 (Model: SM-A505U). Does anyone no of any equivalent commands to those shown above in post #5 by user ‘paggps’ that might disable the system updates on my device? I’m trying to stop the system updates because the system/security updates also update the boot loader version and I’d like to try and root this device some day.
a50:/ $ pm list packages | grep soagent
package:com.sec.android.soagent
a50:/ $ pm list packages | grep wssyncmldm
a50:/ $ *** So it appears that there is no 'wssyncmldm' package ***
a50:/ $ pm disable-user --user 0 com.sec.android.soagent
Package com.sec.android.soagent new state: disabled-user
a50:/ $ pm disable-user --user 0 com.wssyncmldm
Exception occurred while executing 'disable-user':
java.lang.IllegalArgumentException: Unknown package: com.wssyncmldm
at com.android.server.pm.PackageManagerService.setEnabledSetting(PackageManagerService.java:25552)
...
...
a50:/ $
Also here’s what I’ve already tried so far on my Samsung A50 (Model: SM-A505U) device using the User Interface Settings options that I thought might help some users on certain devices with certain system software versions to try and disable the system software updates:
To Enable the Developer Options:
Settings
About Phone
Software Information
Tap on Build number quickly 7 times
Enter your screen lock pattern or password
And to attempt to disable System Software updates:
Settings
Developer Options
Auto update system DISABLE
Settings
Biometrics and Security
Scroll all the way to the bottom and Select ‘Other security settings’
Security policy updates DISABLE
Thanks for any help or suggestions.
Click to expand...
Click to collapse
Try a search of the apps, "update".
It can have other names.
Or load Package Disabler as it will show there.
These are all the ones on my N10+/Android 10:
com.wssyncmldm
com.sec.android.systemupdate
com.sec.android.soagent
handled it thanks to these commands for my Samsung Galaxy S10E:
pm enable --user 0 com.sec.android.soagent
pm enable --user 0 com.wssyncmldm
thanks!
paggps said:
to find packages:
pm list packages | grep soagent
pm list packages | grep wssyncmldm
to disable packages (USE THESE):
pm disable-user --user 0 com.sec.android.soagent
pm disable-user --user 0 com.wssyncmldm
Click to expand...
Click to collapse
I just performed these steps on my and my-wife's S10+ phones (currently A11 January update). The second step caused the update in the notification bar to disappear. I only just did it, so maybe we'll get an update in the next few days, but it looks like this worked for me, thanks!
schwinn8 said:
I just performed these steps on my and my-wife's S10+ phones (currently A11 January update). The second step caused the update in the notification bar to disappear. I only just did it, so maybe we'll get an update in the next few days, but it looks like this worked for me, thanks!
Click to expand...
Click to collapse
It's DOA
Yay, a nasty app.

OnePlus Nord | N10 | N100 [TMO/MPCS] Network Unlock & Enable OEM Unlocking (April 19th, 2021)

1.) ADB access must be enabled
-Tap build number 7 times until Developer Options are enabled
2.) Enable USB Debugging
-For PC-less enable Wireless Debugging
Optional if PC-less
3.) Go to Play Store or F-Droid and download Shizuku
4.) Tap Shizuku in Terminal Apps and configure the shizuku file reflect the terminal package is "com.termux" and Start Shizuku
5.) Navigate to where the shizuku and shizuku.dex files are andn enter
cat shizuku > $PREFIX/bin/shizuku && chmod 755 $PREFIX/bin/shizuku
cat shizuku.dex > $PREFIX/bin/shizuku.dex && chmod 755 $PREFIX/bin/shizuku.dex && shizuku sh
TADA Now you have an ADB Shell locally on your OnePlus. One last command to enter.
settings put secure device_provisioned 0
Either nothing is returned or one word 'Success'is the only way to confirm the command was executed properly.
If with computer :
adb shell settings put secure device_provisioned 0
Congratulations your phone is now Network Unlocked. But wait, there's more to this groundbreaking method.
To enable OEM Unlocking in the Developers Menu this is where things get chipote-cray
In your terminal (termux, bash) enter this command
MOD EDIT: Link removed
Enter accordingly to onscreen prompts and then exit the script.
For finalization of effects Enter
adb reboot-bootloader
Toggle for the Start option.
Go to Network and Sim and there is confirmation that the Network Unlock is persistent. Go to Developer Options and viola, the Enable OEM Unlock button is enabled again. This is also persistent. Make sure to leave enabled in case of accidental/intentional factory reset. Good job everyone.
To get unlock code for the OnePlus.com/unlock_token form Enter
adb reboot-bootloader && fastboot oem get_unlock_code
0day from Jay . This isn't cosmetic, this directly impact's the kernel and is thus persistent.
Support for this is located
MOD EDIT: Link removed

Categories

Resources