Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another version of linux backup #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wingedfox
Copy link

Android scripting made a bit cleaner, implemented backup part

@tomchiverton
Copy link

Nice tidy up, but I'm interested in where the master script does
+for i in scripts/*.sh ; do

  • if [ -r "$i" ]; then

There's a chance scripts could be run in different orders, isn't there, so if there are now or in future dependencies they may go wrong ?

@wingedfox
Copy link
Author

There's no problem with that, all included scripts contains the functions which are executed in the correct order.

@petslane
Copy link

petslane commented Feb 1, 2015

Tested on linux with Sony Z3 compact.
First run failed with error message "dd: can't open '/storage/sdcard1/backupTA.img': Read-only file system" http://pastebin.com/WvScxXZq

Checked scripts/backup.bat file and looks like windows version stores this file in /sdcard/, so changed target folder to /sdcard. Also, looks like linux version expects backup file to be in /sdcard folder when cleaning up.
Current scripts/backup.sh:

$ grep -r /sdcard *.sh
backup.sh:  realSdCard=$($ADB shell su -c "$BB readlink -n /sdcard1")
backup.sh:  $ADB shell rm /sdcard/backupTA.img > /dev/null 2>&1

Changed to:
scripts/backup.sh: realSdCard=$($ADB shell su -c "$BB readlink -n /sdcard")

After changing target path, second run was successful. http://pastebin.com/NQbCawe6
Except for there errors:

scripts/init.sh: line 41: restore_dispose: command not found
scripts/init.sh: line 42: convert_dispose: command not found

Result of second run:

$ ls -lh backup/
total 324K
-rw-r--r-- 1 petslane petslane 321K veebr  1 14:23 TA-backup-20150201.122506?.zip

In CLI backuped filename contains "?" symbol. But Caja file manager shows that it's actually \0000.
filename

@tomchiverton
Copy link

Restore support isn't written yet as far as I know, hence those warnings.

@wingedfox
Copy link
Author

@petslane, thanks for your reply.
First of all, I've found an issue on all my sony devices that I can't pull image from sdcard (aka internal storage), adb pull simply works with a different file system, then it seen from within the device.
Probably it is anissue of Ubuntu 14.04 with the used adb, but can't tell that for sure.
I'll try to fix sdcard/sdcard1 issue when find some time for that.

All other features are not implemented yet, have to find some free time for that first =)

@tomchiverton
Copy link

@wingedfox all my testing was done on Ubuntu 14.04 LTS, against a Z1 compact, where it worked fine. Exactly what is going wrong ?

@wingedfox
Copy link
Author

@tomchiverton, 'Cannot find TA.img' while using adb pull from sdcard
Do you use x64 Ubuntu?

@tomchiverton
Copy link

No, 32bit. I'm using the 'android-tools-adb' package.

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

Successfully merging this pull request may close these issues.

3 participants