Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Save locations with whitespace in their name aren't handled correctly #10

Open
Feltzer opened this issue Feb 15, 2014 · 0 comments
Open

Comments

@Feltzer
Copy link

Feltzer commented Feb 15, 2014

First of all let me thank you for creating Holo Backup. It's great to see a backup solution that's both open-source and doesn't require root to work.

Here's a bug I recently found when trying to backup my device:

If you choose a folder with whitespace in it's name as your backup destination it will be passed to adb without quotes.

E.g.: For the save location /home/user/android backups the command being passed on to adb will be adb backup [..] -f /home/user/android backups. This will result in the backup being written to /home/user/android instead of /home/user/android backups.

A simple solution for this would be to always pass the target location on with double-quotes. So in the example above it would have to be: adb backup [..] -f "/home/user/android backups".

Edit: I don't know a single thing about python but now that I've looked through the code I see that the commands are already quoted. E.g. for the complete backup option:

    def backup_all_with_system(self, event):
        self.password_popup()
        self.progress_popup()

        if self.useSystemAdbBinary == False:
            os.system("gksudo \"./adb backup -apk -shared -all -system -f \"" + Path + "\"\"")
        else:
            os.system("adb backup -apk -shared -all -system -f \"" + Path + "\"")

I am not quite sure why they wouldn't work. Maybe it has to do with how gksudo handles quotation marks?

In any case, here's some more information about my system and the conditions under which I observed this bug:

  • Ubuntu 12.04
  • latest version of SimpleADBBackup as of 2014/02/15 (master branch)
  • backup performed using the packaged version of adb
  • specific backup type: "all without system apps"

Thanks for reading this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant