Pixplicity / humpty-dumpty-android

Simple file dump utility for Android
Apache License 2.0
105 stars 16 forks source link

Script does not fail gracefully when multiple devices are connected #2

Closed thevoiceless closed 9 years ago

thevoiceless commented 9 years ago

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
pflammertsma commented 9 years ago

Possibly resolved with 0d3f155953bf667d1cee374fb1d5e559de3d410a and 87650397aa9281ce249f17c355753b27d37ffa3d, 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.

thevoiceless commented 9 years ago

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

pflammertsma commented 9 years ago

Thanks for testing!