Saturday, December 10, 2016

security - Disable toast when screen is pinned in Android



When passing my phone to someone, I pin the screen for safety reasons. Is there a way to disable those ugly toasts which keep popping up and giving them a gist of what's happening?



Answer



You'll need root access, a compatible Xposed framework1 installed and EnhancedToast (an Xposed module) installed and activated in Xposed Installer app.


Once the Xposed module is activated and device rebooted, launch EnhancedToast → Android System (package name: android) → select the toasts that you want not to show up. Selection of any entry would cause its background to turn red. I sometimes need to reboot, but often, the changes take place immediately.


(Click an image to enlarge it)


IMG: IMG:




The command-line as well as take it or leave it approach is to do:


(Requires setup in PC; root access not required; works only in Android 5.1.x and above)


adb shell appops set android TOAST_WINDOW deny   # this would deny all toasts from Android System


Using a terminal emulator app but with root access, do:


su
appops set android TOAST_WINDOW deny

To allow the toasts again, replace deny with allow in the said commands, as appropriate.




1 Xposed Framework: Android 5.x and 6.x


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...