adb-permissions.bash: allow changing adb parameters, sleep a bit and reboot

This commit is contained in:
Aminda Suomalainen 2023-12-03 11:23:47 +02:00
parent 1070d2bbf4
commit 619afbd92a
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 16 additions and 12 deletions

View File

@ -14,22 +14,26 @@ set -x
echo "In case of trouble check Android System Settings, Connected devices, USB mode. It should be data transfer for adb USB debugging to take effect." echo "In case of trouble check Android System Settings, Connected devices, USB mode. It should be data transfer for adb USB debugging to take effect."
# DetoxDroid, https://github.com/flxapps/DetoxDroid/wiki/Manual-Installation # DetoxDroid, https://github.com/flxapps/DetoxDroid/wiki/Manual-Installation
adb -d shell pm grant com.flx_apps.digitaldetox android.permission.WRITE_SECURE_SETTINGS adb "$@" shell pm grant com.flx_apps.digitaldetox android.permission.WRITE_SECURE_SETTINGS
adb -d shell dpm set-device-owner com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver adb "$@" shell dpm set-device-owner com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver
echo "Remember to force-stop & restart DetoxDroid!" #echo "Remember to force-stop & restart DetoxDroid!"
# Greenify, https://web.archive.org/web/20190209023358/https://greenify.uservoice.com/knowledgebase/articles/749142-how-to-grant-permissions-required-by-some-features # Greenify, https://web.archive.org/web/20190209023358/https://greenify.uservoice.com/knowledgebase/articles/749142-how-to-grant-permissions-required-by-some-features
# TODO: Alive source # TODO: Alive source
adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS adb "$@" shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.DUMP adb "$@" shell pm grant com.oasisfeng.greenify android.permission.DUMP
adb -d shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS adb "$@" shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS adb "$@" shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS
echo "Remember to force-stop & restart Greenify!" #echo "Remember to force-stop & restart Greenify!"
# Nevolution, https://nevo.app/setup.html # Nevolution, https://nevo.app/setup.html
adb -d shell setprop persist.log.tag.NotificationService DEBUG adb "$@" shell setprop persist.log.tag.NotificationService DEBUG
adb -d shell pm grant com.oasisfeng.nevo android.permission.READ_LOGS adb "$@" shell pm grant com.oasisfeng.nevo android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.nevo android.permission.INTERACT_ACROSS_USERS adb "$@" shell pm grant com.oasisfeng.nevo android.permission.INTERACT_ACROSS_USERS
echo "Remember to force-stop & restart Nevolution!" #echo "Remember to force-stop & restart Nevolution!"
# Wait a bit and then reboot the device
sleep 5
adb "$@" reboot
set +x set +x