IzzySoft / Adebar

Android DEvice Backup And Report, using Bash and ADB. Moved to https://codeberg.org/izzy/Adebar -- this is only a mirror now.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backupscript does not sleep long enough for autoconfirm

chaotix- opened this issue · comments

I backed up a friends slightly older phone (Nexus 4) and ran into trouble. Starting the backup script messed up. It started random apps or went into the launcher settings etc.

It turns out that the phone was too slow to start the backup within one second. So the confirmation dialog for "adb backup -f ...ab -apk ..." was not showing yet when the script started sending the keycodes to confirm the backup which then of course did something completely different.

Unfortunately I did not have enough time for tests and just substituted "sleep 1" with "sleep 5". I would guess "sleep 3" would work as well for slower phones, but I haven't tested it. But "sleep 1" was definitely too fast and I guess other slightly slower phones will also have problems with this.

commented

That should do it: Now the interval between sending the backup command and initiating auto-confirm is configurable. Please test if you have a chance; feel free to re-open the issue if it doesn't solve it. And thanks for reporting!