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

Shell-escape arguments passed to adb shell #120

Closed ilian closed 3 years ago

ilian commented 3 years ago

Activity names containing the $ character are not escaped, causing the shell to evaluate some parts of the argument string. When providing an APK file with main activity such as com.discord.app.AppActivity$Main, an incorrect start intent for activity com.discord.app.AppActivity is made.

This change escapes arguments passed to device.adb.shell() and is compatible with Python 2 and Python 3.

yuanchun-li commented 3 years ago

This is an important fix. Thanks a lot!