Enable custom keyboard

Enable custom keyboard

Hi,

I'm using Android Enterprise enrollment (cloud server version 14.4.9) with Samsung devices (agent 14.1.7.1117), and I need to enable & set by default our own keyboard.

Could someone send me the script to enable this keyboard (com.ier.keyboard)?

I tried the script below but it's not enabling the our keyboard:

 

writesecuresetting -sec enabled_input_methods com.ier.keyboard

 

Many thanks for your support.

 

Farid

4 Answers

Order By:   Standard | Newest | Votes
Rafael | posted this 03 November 2020

writesecuresetting -sec enabled_input_methods com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:

com.symbol.mxmf.csp.enterprisekeyboard/com.android.inputmethod.latin.LatinIME

Replace that in bold (script is one line!) and this should do what you want. We use this on our Zebra TC51 to set the enterprise keyboard from zebra as the default one.

  • 0
  • 0
Farid.S | posted this 03 November 2020

Hi Rafael,

Thanks for your reply.

Here is the result:

Script was sent to device (writesecuresetting -sec enabled_input_methods com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME: com.ier.keyboard/com.android.inputmethod.latin.LatinIME)

Script command is not supported by device (com.ier.keyboard/com.android.inputmethod.latin.latinime)

 

  • 0
  • 0
Rafael | posted this 03 November 2020

Did you wrote it in one single line?

There's no new line or space between ...LatinIME: and com.ier.keyboard...

  • 0
  • 0
Farid.S | posted this 03 November 2020

I removed the space, copy/paste in one line the script but nothing happend, my keyboard is still "disabled".

The script is correctly sent but nothing happend.

In attachment is the script pasted on my script windowScript window

 

I add the log that I found on my tst device regarding this script:

 

2020-11-03 17:28:11.634|script-executor|E|DO|[LegacyScriptExecutor][executeScriptCommand] Failed to exec script command: writesecuresetting [-sec, enabled_input_methods, com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:com.ier.keyboard/com.android.inputmethod.latin.LatinIME]|java.lang.SecurityException: Permission denial: Device owners cannot update enabled_input_methods
at android.os.Parcel.createException(Parcel.java:1966)
at android.os.Parcel.readException(Parcel.java:1934)
at android.os.Parcel.readException(Parcel.java:1884)
at android.app.admin.IDevicePolicyManager$Stub$Proxy.setSecureSetting(IDevicePolicyManager.java:9195)
at android.app.admin.DevicePolicyManager.setSecureSetting(DevicePolicyManager.java:8713)
at net.soti.mobicontrol.settingscontrol.AfwSecureSettingsManager.writeSecureSetting(SourceFile:45)
at net.soti.mobicontrol.script.a.br$a$1.execute(SourceFile:55)
at net.soti.mobicontrol.script.a.br.execute(SourceFile:47)
at net.soti.mobicontrol.script.ag.a(SourceFile:163)
at net.soti.mobicontrol.script.ag.a(SourceFile:116)
at net.soti.mobicontrol.script.ag.a(SourceFile:61)
at net.soti.mobicontrol.script.ag.lambda$PCJGF1vp51J8I86h84Cqq1He7lU(Unknown Source:0)
at net.soti.mobicontrol.script.-$$Lambda$ag$PCJGF1vp51J8I86h84Cqq1He7lU.run(Unknown Source:8)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.devicepolicy.DevicePolicyManagerService.setSecureSetting(DevicePolicyManagerService.java:11181)
at android.app.admin.IDevicePolicyManager$Stub.onTransact$setSecureSetting$(IDevicePolicyManager.java:13401)
at android.app.admin.IDevicePolicyManager$Stub.onTransact(IDevicePolicyManager.java:2832)
at android.os.Binder.execTransact(Binder.java:739)

|
2020-11-03 17:28:11.634|script-executor|D|DO|[LegacyScriptExecutor][execute]script command: writesecuresetting [-sec, enabled_input_methods, com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME:com.ier.keyboard/com.android.inputmethod.latin.LatinIME], result: ScriptResult{description='FAILED', resultType=FAILED}|

 

Hi,

 

I enabled the watchsettings on on my device and enabled manually the keyboard, below is the activity:

 

Custom log (URI:content://settings/secure SETTING:enabled_input_methods VALUE:com.sec.android.inputmethod/.AuxiliaryEmotionKeypad:com.ier.keyboard/.IerKeyboard:com.sec.android.inputmethod/.SamsungKeypad;1718765138)

 

I tested a lot scripts like writesecuresetting -sec enabled_input_methods VALUE:com.ier.keyboard/.IerKeyboard but without success.

I discovered that when I enabled it manually I have two prompts which need confirmation of end user.

 

Is it because of that?

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback