Pixplicity / humpty-dumpty-android

Simple file dump utility for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script does not fail gracefully when multiple devices are connected

thevoiceless opened this issue · comments

On commit 2549b3e:

$ ./humpty.sh -d com.my.package databases/mydatabase.db
humpty.sh v1.2.0

Dumping com.my.package/databases/mydatabase.db to dumps/com.my.package/databases/mydatabase.db...
error: more than one device and emulator
error: more than one device and emulator
error: more than one device and emulator
error: more than one device and emulator
Success!
error: more than one device and emulator
Could not restore file mode  on /data/data/com.my.package/databases/mydatabase.db

Possibly resolved with 0d3f155 and 8765039, but haven't tested it. adb appears to give return code 255 if no devices are found; I'm hoping for a similar error code if multiple are found.

The script really needs to support passing -s <specific device> to allow providing a serial number or qualifier into adb commands.

The output when multiple devices are attached is the same as when no devices are attached, so I would consider this fixed :)

Thanks for testing!