Skip to content

Instantly share code, notes, and snippets.

@DanEdens
Last active December 11, 2020 15:27
Show Gist options
  • Save DanEdens/13abe1866bca2a4c6b66bbca0f7a19d4 to your computer and use it in GitHub Desktop.
Save DanEdens/13abe1866bca2a4c6b66bbca0f7a19d4 to your computer and use it in GitHub Desktop.
List of permission grants for tasker after reboot
echo=off
if [ "$1" = "--s8" ]; then
mosquitto_pub -h $awsip -p $awsport -t vars/S8_boot_patch -r -m 1
device=9888d9303354564442
else
mosquitto_pub -h $awsip -p $awsport -t vars/S10_boot_patch -r -m 1
device=RF8N82MR1VA
fi
echo Overriding security protocols for $device
# wait for the device to connect and settle
adb -s $device wait-for-device
# enable ssh
adb -s $device forward tcp:8022 tcp:8022
# Join Premissions
adb -s $device shell pm grant com.joaomgcd.autotools android.permission.READ_LOGS
adb -s $device shell pm grant com.joaomgcd.autotools android.permission.WRITE_SECURE_SETTINGS
adb -s $device shell pm grant com.joaomgcd.autoinput android.permission.WRITE_SECURE_SETTINGS
adb -s $device shell appops set com.joaomgcd.join SYSTEM_ALERT_WINDOW allow
adb -s $device shell pm grant com.joaomgcd.join android.permission.WRITE_SECURE_SETTINGS
adb -s $device shell pm grant com.joaomgcd.join android.permission.READ_LOGS
# Restart Join
adb -s $device shell am force-stop com.joaomgcd.join
# Tasker Premissions
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.CHANGE_CONFIGURATION
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.SYSTEM_ALERT_WINDOW
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.PACKAGE_USAGE_STATS
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.ANSWER_PHONE_CALLS
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.CALL_PHONE
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.DUMP
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.SET_MEDIA_KEY_LISTENER
adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.READ_LOGS
# Restart tasker
adb -s $device shell am force-stop net.dinglisch.android.taskerm
# Extra options
# adb -s $device shell pm grant com.joaomgcd.autowear android.permission.WRITE_SECURE_SETTINGS
# adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.BIND_ACCESSIBILITY_SERVICE
# adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.BIND_DEVICE_ADMIN
# adb -s $device shell pm grant net.dinglisch.android.taskerm android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
echo Override successful
echo Dumping files..
rsync -avuP --ignore-existing -e 'ssh -p 8022 -i /home/dan/.ssh/id_rsa' u0_a326@$s10ip:/sdcard/dcim/ /media/dan/Storage/ && echo Files transfered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment