2
adb shell input text 'Hindustan%sTrading%sCompany'

Gives Company in Gboard

adb shell input text 'Hindustan%s'

Just gives a space

adb shell input text '%sHindustan' is working fine.

so word before %s is missing

Android Debug Bridge version 1.0.40
Version 28.0.2-5303910
7
  • Try using double quotes ("...") and putting real space instead of %s in the input. – Puspam Jul 17 '19 at 12:06
  • Same on double quote. Real space never worked – Smart Manoj Jul 17 '19 at 12:09
  • It works for me. Which version of Android are you using? – Puspam Jul 17 '19 at 12:11
  • Which one ? Lollipop , which keyboard u using – Smart Manoj Jul 17 '19 at 12:14
  • I am using the hard keyboard of my PC. – Puspam Jul 17 '19 at 12:16
1

Try separating the input lines like this:

adb shell input text 'Hindustan'
adb shell input text '%s'
adb shell input text 'Trading'
adb shell input text '%s'
adb shell input text 'Company'
3
  • Only Hindustan. Did you get the correct one? – Smart Manoj Jul 17 '19 at 11:13
  • is this the correct way? with many adb shell input text lines? – user12158726 Dec 18 '20 at 10:00
  • did you get the correct output? Just a workaround – Smart Manoj Dec 18 '20 at 10:04
1

Seems fixed

λ adb --version
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687

The following works as expected

adb shell input text 'Hindustan%sTrading%sCompany'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.