How to reset Google Keyboard language using ADB? So I have to add an automation step wherein the keyboard language needs to be reset in case someone changes it.

I have used adb for this and it works well on Samsung phones, but it doesn't work on Moto X and Nexus phones.

This is the adb command I use for Moto X and Nexus phones, but this doesn't have the desired effect.

adb shell pm clear com.google.android.inputmethod.latin 


For Samsung phones, which is working, the command is

adb shell pm clear com.sec.android.inputmethod


Anyone can help? The only constraint is that I cannot root my phone.
Just found out that the command won't work for Google Keyboard because the selected languages are saved in the key ENABLED_INPUT_METHODS of the Settings.Secure table.

You can reset the selected languages of Google Keyboard with this command:

adb shell settings put secure enabled_input_methods com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME