A way to programmatically disable the "Find my device" in gapps from being a device administrator
The trick is to disable gms - which clears device admin status, and then enable it again:
Best is, to run the script at boot, with a delay - in order to kick in only after "Find my device" was reactivated and kill it for good.
Best way would be, to put it in your
Source, last (unvoted!) comment here:
https://stackoverflow.com/questions/13911444/disable-deviceadmin-from-shell
π‘ @NoGoolag
#find #findmydevice #disable #device #administrator #google #gms #script #shell #gapps
The trick is to disable gms - which clears device admin status, and then enable it again:
pm disable-user com.google.android.gms
pm enable com.google.android.gms
I know most of you don't have GApps at all on board, but still it might be useful to know.Best is, to run the script at boot, with a delay - in order to kick in only after "Find my device" was reactivated and kill it for good.
#!/system/bin/sh
(
sleep 60
pm disable-user com.google.android.gms
pm enable com.google.android.gms
) &
Commands are in a backgrounded subshell in order not to delay boot.Best way would be, to put it in your
init.d
, or execute it from Kernel Adiutor, or with Magisk boot hooks and put it in /data/adb/post-fs-data.d/
.Source, last (unvoted!) comment here:
https://stackoverflow.com/questions/13911444/disable-deviceadmin-from-shell
π‘ @NoGoolag
#find #findmydevice #disable #device #administrator #google #gms #script #shell #gapps