Disable vibrate on tap on Moto Z Play

Post your questions and help other users.

Moderator: Martin

Post Reply
vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Disable vibrate on tap on Moto Z Play

Post by vertigo » 29 Aug 2019 16:05

I'm trying to automate vibration on tap / touch to be disabled when I launch an app, and reenabled when it's closed. Does anyone know what the system setting name and parameters would be for this?

As an aside, I tried searching the forums for this, but I'm not sure I did it right. It just says to put OR words in "brackets" separated by | but doesn't specify the type of brackets (I assumed square, i.e. []) or if there should be a space between the words and the pipes. Whatever I tried, it kept showing that it was searching for ALL the words with a + next to them, so e.g. I'd do [vibrate|vibration] and it showed it searched for +vibrate +vibration, so I don't know if I wasn't getting hits because it was looking for both instead of either.

keywords: Motorola settings

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Disable vibrate on tap on Moto Z Play

Post by Desmanto » 29 Aug 2019 19:40

You can use my secure setting logger flow to check it : viewtopic.php?f=3&t=7931
It usually stored at [System] haptic_feedback_enabled : 0

If you want to search for only one of the result, it seems you have to use advanced search, choose : Search for any terms. Then vibrate|vibration should find only one of them.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Disable vibrate on tap on Moto Z Play

Post by vertigo » 30 Aug 2019 01:26

Thanks. I've taken an initial look at it and will have to spend some time doing a thorough read-through. Do you have any idea how high the risk would be for what I'm trying to do? That is, is it really low-risk since I'm just messing with haptic vibration vs something like GPS or radio, or does any attempt to modify the settings file carry the same risk, regardless of what specific setting is being manipulated? I want to do this, and I realize there's a risk, but I'd like to know if it's a very small risk, like with rooting, or if there's a fairly good chance something could go wrong.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Disable vibrate on tap on Moto Z Play

Post by Desmanto » 30 Aug 2019 17:58

Using set system setting, the highest risk, of course bricking your phone. Since playing with secure setting is generally dangerous if you don't know what you are going to change. If you only change the value from 0 to 1 or 1 to 0 for only that key value (touch vibration), then your risk is usually on limited to that setting only. Example if playing with flashlight, toggling it on and off, sometimes get it stuck. Since it is only that value, usually a restart will fix it already, the flashlight will be normal back.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Disable vibrate on tap on Moto Z Play

Post by vertigo » 03 May 2020 04:54

I finally got up the nerve to try this and it worked without issue. Unfortunately, while I now have it disable/enable system vibration on tap as necessary, the keyboard vibration is a different matter, and since its vibration is controlled via the keyboard app's settings and not system settings, there's no way to change it automatically, except through control UI, which I'm trying to avoid. So it seems the best option at this point is to switch keyboards as well, to temporarily use a different one that's set to not vibrate when I want vibration disabled, and I was thinking I could do so with the system settings as well. The problem is, switching does multiple things, and I'm not sure if they're all needed or what the risk is. Here's the results from switching from one keyboard to another and back:

Code: Select all

[Secure] selected_input_method_subtype : -1 >>> 1891618174

[Secure] input_methods_subtype_history : com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME;1891618174:org.pocketworkstation.pckeyboard/.LatinIME;-1:ch.gridvision.ppam.androidautomagic/.keyboard.AutotypeInputMethodService;-1:de.humbergsoftware.keyboarddesigner/.EditorConnector;1802354156:com.menny.android.anysoftkeyboard/.SoftKeyboard;390463609:com.syntellia.fleksy.keyboard/.Fleksy;1963081527:keepass2android.keepass2android/keepass2android.softkeyboard.KP2AKeyboard;312418808:com.gamelounge.chroomakeyboard/org.smc.inputmethod.indic.LatinIME;753601878:com.grammarly.android.keyboard/.LatinIME;1549857731:com.aitype.android/com.android.inputmethod.latin.LatinIME;1802354156:com.jbak2.JbakKeyboard/.ServiceJbKbd;-1:com.touchtype.swiftkey/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.nn/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.beta/com.touchtype.KeyboardService;2131165481 >>> org.pocketworkstation.pckeyboard/.LatinIME;-1:com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME;1891618174:ch.gridvision.ppam.androidautomagic/.keyboard.AutotypeInputMethodService;-1:de.humbergsoftware.keyboarddesigner/.EditorConnector;1802354156:com.menny.android.anysoftkeyboard/.SoftKeyboard;390463609:com.syntellia.fleksy.keyboard/.Fleksy;1963081527:keepass2android.keepass2android/keepass2android.softkeyboard.KP2AKeyboard;312418808:com.gamelounge.chroomakeyboard/org.smc.inputmethod.indic.LatinIME;753601878:com.grammarly.android.keyboard/.LatinIME;1549857731:com.aitype.android/com.android.inputmethod.latin.LatinIME;1802354156:com.jbak2.JbakKeyboard/.ServiceJbKbd;-1:com.touchtype.swiftkey/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.nn/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.beta/com.touchtype.KeyboardService;2131165481

[Secure] default_input_method : org.pocketworkstation.pckeyboard/.LatinIME >>> com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME

----------------------------------------------------------------------------------------------------

[Secure] selected_input_method_subtype : 1891618174 >>> -1

[Secure] input_methods_subtype_history : org.pocketworkstation.pckeyboard/.LatinIME;-1:com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME;1891618174:ch.gridvision.ppam.androidautomagic/.keyboard.AutotypeInputMethodService;-1:de.humbergsoftware.keyboarddesigner/.EditorConnector;1802354156:com.menny.android.anysoftkeyboard/.SoftKeyboard;390463609:com.syntellia.fleksy.keyboard/.Fleksy;1963081527:keepass2android.keepass2android/keepass2android.softkeyboard.KP2AKeyboard;312418808:com.gamelounge.chroomakeyboard/org.smc.inputmethod.indic.LatinIME;753601878:com.grammarly.android.keyboard/.LatinIME;1549857731:com.aitype.android/com.android.inputmethod.latin.LatinIME;1802354156:com.jbak2.JbakKeyboard/.ServiceJbKbd;-1:com.touchtype.swiftkey/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.nn/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.beta/com.touchtype.KeyboardService;2131165481 >>> com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME;1891618174:org.pocketworkstation.pckeyboard/.LatinIME;-1:ch.gridvision.ppam.androidautomagic/.keyboard.AutotypeInputMethodService;-1:de.humbergsoftware.keyboarddesigner/.EditorConnector;1802354156:com.menny.android.anysoftkeyboard/.SoftKeyboard;390463609:com.syntellia.fleksy.keyboard/.Fleksy;1963081527:keepass2android.keepass2android/keepass2android.softkeyboard.KP2AKeyboard;312418808:com.gamelounge.chroomakeyboard/org.smc.inputmethod.indic.LatinIME;753601878:com.grammarly.android.keyboard/.LatinIME;1549857731:com.aitype.android/com.android.inputmethod.latin.LatinIME;1802354156:com.jbak2.JbakKeyboard/.ServiceJbKbd;-1:com.touchtype.swiftkey/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.nn/com.touchtype.KeyboardService;2131165481:com.touchtype.swiftkey.beta/com.touchtype.KeyboardService;2131165481

[Secure] default_input_method : com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME >>> org.pocketworkstation.pckeyboard/.LatinIME
The large/second output is the same in each, so I assume it can be safely ignored. I also find this one interesting in that it shows Android apparently, for some reason, retains memory of every keyboard ever installed. I could change the other two (default_input_method and selected_input_method_subtype), though I wonder if changing the first would trigger the other two, and so it would perhaps be better to only do that one. I could test that, but then there's concern that, if the others aren't triggered to change, it could cause a mismatch that could create problems. And I'm especially concerned because these are secure settings, vs vibration which was a plain system setting, so I wasn't as worried about messing with it. What do you think? In your opinion, should I change just the first, the first and the third, all three, or is there an altogether different option for doing this?

By the way, great job with the settings logger, definitely very helpful. I did make one small change by adding a /n add the end of the addElement line in order to put a space between each line when viewing the log, which makes it much more readable. I may also add an option to clear the log (or to start logging with a fresh log), so it's easier to see what's new from the last run.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Disable vibrate on tap on Moto Z Play

Post by Desmanto » 03 May 2020 12:33

While usually I would recommend to stick to whatever you found using the secure logger; for this keyboard menu, AFAIR only the [Secure] default_input_method, is the most important one. I also change only that value, leave the others intact. Never realize (until now) that the other values also change. But the behaviour can be different in different device/ROM, so need to be tested first. If no problem at all, then you can use it from now on.

Glad you found my secure logger useful. I plan to update it if we can have feature to init all system setting value at once (without root). But so far, I just leave it functional.


For keyboard vibration, there is a way you can supress the vibrate feature all the time. Using Execute root command

Code: Select all

appops set org.pocketworkstation.pckeyboard VIBRATE ignore
This of course require root. It will deny the vibrate permission, hence can't the app can't vibrate anymore regardless of the internal setting of the app. To enable it back, simply change to allow

Code: Select all

appops set org.pocketworkstation.pckeyboard VIBRATE allow
Last edited by Desmanto on 05 May 2020 12:15, edited 1 time in total.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

vertigo
Posts: 147
Joined: 28 Oct 2018 00:28

Re: Disable vibrate on tap on Moto Z Play

Post by vertigo » 04 May 2020 22:46

Yeah, I wish I'd rooted this phone, but I don't like doing it for a while in case there's a warranty issue and then, by the time I feel comfortable doing it, it's too much hassle since everything's all set up. I think I'm going to just do it straight away on my next phone, though, and I'll have to use the method you mentioned then. For now, though, I modified the first setting for changing the keyboard, and it works great. So thanks again for all the help. :)

Edit: by the way, you have a typo in your second root command: alllow should be allow. Figured you might want to change it just in case someone comes across it and tries to use it

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Disable vibrate on tap on Moto Z Play

Post by Desmanto » 05 May 2020 12:20

Thanks for the correction, I have fixed it.

I root my current phone the day after I get it :LOL If I don't root it, I can't move all my data safely, so no other way. Xiaomi still honor the warranty even after UBL. So in case something happen, and I need RMA, I can flash stock ROM and RMA it (or better lock it again first). Now it has been almost 2 years, and nothing happened (that require RMA). I accept the risk and it not for everyone. That's why I prefer to share flow only those can be used without root.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply