Online advertisements continue finding new ways to annoy the crap out of you. For the past few years, one particular form of online advertisements have plagued mobile devices: the vibrating ad. Using the Vibration API, advertisements have been vibrating your phone to annoyingly grab your attention. This issue has been known for years, but Google was very slow to resolve the issue. Only with Chrome version 60 are vibrating advertisements done away with, but as of now version 60 is only available in the Beta, Dev, and Canary channels of Chrome. However, there’s actually a way to manually stop vibrations from any Android app on your phone – without completely putting your phone into silent mode. That means you won’t have to wait for application developers to update their apps so they can’t vibrate your phone.
The method we are doing is quite simple. All we will be doing is restricting the permission that allows an app to use the device’s vibration motor by sending an ADB command. In doing so, the app can’t vibrate your phone. Before we begin, we need to install an application so we can figure out what the name of the package is for the app we want to stop vibrations on our phone. Don’t worry, it’s a totally free (and small) app.Download QR-CodeApp Inspector Developer:UBQSoft Price:Free
cmd appops setVIBRATE ignore
So what we are doing here is restricting the permission
android.permission.VIBRATE from an application of our choosing. This permission is defined by applications in their
AndroidManifest.xml file and upon installation the application is automatically granted. Although you can restrict some permissions from applications using the built-in permission manager, the VIBRATE permission is not one of them.
Instead, we restrict this permission by using the
cmd appops command. This is a command line interface to “appops” – Android’s user-facing permission management system. By accessing this system through an ADB shell, we have access to restricting many more permissions than we normally would be able to. One of those permissions we can revoke is the VIBRATE permission. And by doing so, we stop vibrations as the application can no longer use your phone’s vibration motor without the required permission.
Google doesn’t want you to be able to restrict this permission normally, so they hid it from the Settings. This is because many app’s rely on vibrating your phone for legitimate reasons, such as haptic feedback for certain actions or by notifying you of something. Google left in the command-line ability to prevent an app from vibrating your phone so developers could test how their app would work if the phone doesn’t have a vibration motor. However, devices without vibrations motors is such a rare occurrence that this command mostly goes unused.
Still, just because this hidden command is unused by developers doesn’t mean we can’t put it to good use. Indeed, thanks to this command we can stop vibrations from any Android app ever again! No need to wait on Google to update the Chrome Stable version or for Opera to update Opera Mini, you can stop vibrating ads yourself right now! Furthermore, if you know of any app that gives you headaches by vibrating your phone too much (and they don’t allow you to turn that off), now you can stop that from happening too. Next up, we hope Google Chrome’s ad blocker kills these kinds of advertisements, though we’ve only had a few days to test that new feature.