Compare commits

..

4 Commits

4 changed files with 28 additions and 17 deletions

View File

@ -54,7 +54,7 @@ repos:
# https://github.com/Mikaela/gist/blob/master/doctoc.txt
args: [--update-only]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.7.0"
rev: "v1.7.1"
hooks:
- id: mypy
- repo: https://github.com/asottile/pyupgrade
@ -72,7 +72,7 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
rev: "v4.0.0-alpha.3"
hooks:
- id: prettier
exclude_types: [python, pyi, jupyter]
@ -80,7 +80,7 @@ repos:
# https://www.npmjs.com/package/prettier
"prettier@3.1.0",
# https://www.npmjs.com/package/@prettier/plugin-ruby
"@prettier/plugin-ruby@4.0.2",
"@prettier/plugin-ruby@4.0.3",
]
- repo: https://github.com/psf/black
rev: 23.11.0
@ -90,7 +90,7 @@ repos:
#args: ["--line-length", "79", "--target-version", "py310"]
#- id: black-jupyter
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-3
rev: v3.7.0-4
hooks:
- id: shfmt
#- id: shfmt-docker

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."
# DetoxDroid, https://github.com/flxapps/DetoxDroid/wiki/Manual-Installation
adb -d shell pm grant com.flx_apps.digitaldetox android.permission.WRITE_SECURE_SETTINGS
adb -d shell dpm set-device-owner com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver
echo "Remember to force-stop & restart DetoxDroid!"
adb "$@" shell pm grant com.flx_apps.digitaldetox android.permission.WRITE_SECURE_SETTINGS
adb "$@" shell dpm set-device-owner com.flx_apps.digitaldetox/.DetoxDroidDeviceAdminReceiver
#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
# TODO: Alive source
adb -d shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.DUMP
adb -d shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS
echo "Remember to force-stop & restart Greenify!"
adb "$@" shell pm grant com.oasisfeng.greenify android.permission.WRITE_SECURE_SETTINGS
adb "$@" shell pm grant com.oasisfeng.greenify android.permission.DUMP
adb "$@" shell pm grant com.oasisfeng.greenify android.permission.READ_LOGS
adb "$@" shell pm grant com.oasisfeng.greenify android.permission.GET_APP_OPS_STATS
#echo "Remember to force-stop & restart Greenify!"
# Nevolution, https://nevo.app/setup.html
adb -d shell setprop persist.log.tag.NotificationService DEBUG
adb -d shell pm grant com.oasisfeng.nevo android.permission.READ_LOGS
adb -d shell pm grant com.oasisfeng.nevo android.permission.INTERACT_ACROSS_USERS
echo "Remember to force-stop & restart Nevolution!"
adb "$@" shell setprop persist.log.tag.NotificationService DEBUG
adb "$@" shell pm grant com.oasisfeng.nevo android.permission.READ_LOGS
adb "$@" shell pm grant com.oasisfeng.nevo android.permission.INTERACT_ACROSS_USERS
#echo "Remember to force-stop & restart Nevolution!"
# Wait a bit and then reboot the device
sleep 5
adb "$@" reboot
set +x

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -x
# As the GUI method did nothing for me, this will hopefully reset all
# permissions of apps on an Android device.
adb "$@" shell pm reset-permissions
adb "$@" reboot
set +x

@ -1 +1 @@
Subproject commit ae4f1a9241708ee3903af4130e88f8cfb1874434
Subproject commit c30e5e7c5b18c2a8b8bab56e99567670b4159c62