honeynet / droidbot

A lightweight test input generator for Android. Similar to Monkey, but with more intelligence and cool features!
MIT License
791 stars 230 forks source link

droidbot_ime is failing to write text which contains space #143

Open dridiha opened 2 years ago

dridiha commented 2 years ago

Hello,

I want to report an issue within droidbot, exactlyin droidbot_ime, It appears to be unable to write a text that contains a space character. I hope you look into this issue.

Thanks

dridiha commented 2 years ago

Hi, To correct this, you have just to change the line L89 with: input_cmd = ["am", "broadcast", "-a", "DROIDBOT_INPUT_TEXT", "--es", "text", text, "--ei", "mode", str(mode)]

freddiewanah commented 1 year ago

Hi, I think the problem has appeared again.

When I tried to run the command say: adb shell am broadcast -a DROIDBOT_INPUT_TEXT --es text 'football club' --ei mode 0

It responds the following: Broadcasting: Intent { act=DROIDBOT_INPUT_TEXT flg=0x400000 pkg=club (has extras) } Broadcast completed: result=0

yuanchun-li commented 1 year ago

Yeah. I also noticed this issue. Unfortunately I don't have a solution yet. A dirty workaround is to avoid using spaces in the input text. For example, use "football-club" instead of "football club". It could be fixed by adding some logic to replace "-" with spaces in DroidBotIME. I will do it when I have time.

yuanchun-li commented 1 year ago

It should be fixed in the latest commit c958a0b