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, 2019 at 12:06
  • Same on double quote. Real space never worked Jul 17, 2019 at 12:09
  • It works for me. Which version of Android are you using?
    – Puspam
    Jul 17, 2019 at 12:11
  • Which one ? Lollipop , which keyboard u using Jul 17, 2019 at 12:14
  • I am using the hard keyboard of my PC.
    – Puspam
    Jul 17, 2019 at 12:16

2 Answers 2

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? Jul 17, 2019 at 11:13
  • is this the correct way? with many adb shell input text lines? Dec 18, 2020 at 10:00
  • did you get the correct output? Just a workaround Dec 18, 2020 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'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .