• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Backing-up without rooting.

danmdan

Newbie
Has anyone successfully done the above using the method in issue 17 of Android Magazine (UK bought), page 56. If so could they help me to get it to work.

I've downloaded the SDK Mac-OS version, and "platform-tools" seems to be installed, and "adb" is present - but nothing I try will make the Magazine's method work.
 
Most of the people who could help won't have a copy of this magazine. It's probably best if you tell us what exactly you have tried (even exactly what you typed). Also what response you get when you try things - that can help diagnose problems.
 
Well I think the method involves running a script, after installing some of the SDK -- here is the first section.


#!/bin/bash
# =========================================================================
# Configuration
# =========================================================================
# 1. Configure where your ADB binary is installed
export AdbCmd="<Path_to_ADB_Binary>"
if [ ! -f ${AdbCmd} ]; then
"Exiting now: Could not find adb command"
exit 100
fi

# 2. Configure your backup file
export BackupDir="<Path_to_your_Backup>"
if [ ! -d ${BackupDir} ]; then
mkdir -p $BackupDir
fi

# 3. Configure your backup file name (e.g: backup_20120828.ab)
# e.g: export BackupFileName="backup_$(date +%F).ab"
export BackupFileName="backup_$(date +"%Y-%m-%d_%H-%M").ab"

# 4. Make sure this script is executable
# chmod u+x backup_android_to_mac.sh


I'm having trouble with items 1, and 4 -

Re: item 1 - I can't seem to get the exact path/syntax to adb right, as it is never found - but I'm sure it is present in a folder on my desktop.

Re: item 4 - just don't understand this.

Re: Java - as far as I know it is part of my Mac OS 10.8.2
 
What version of Android are you running? This is basically a script that uses an adb command that's been added for ICS/JB, so I expect it won't work on earlier versions.

As for those problems:

1) where is your adb binary? It will just want the full path to that file, so e.g. if you put the sdk in a SDK directory inside your home directory it might be something like "/Users/myname/SDK/android-sdk-mac_x86/tools/adb" (a variant on where it is on my mac). Remember that a / at the start matters and that this is case sensitive.

4) It means type that command at the terminal command prompt. chmod changes file permissions, u+x means "grant execute permission to user (file owner)", and the last argument is the name of the script. In short the command means "make this script executable by me".

Hope that helps.
 
The adb binary, and indeed the android-sdk-macosx is in a folder on my desktop, so I assumed the path for the script was --

/Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb

-- and do I need the enclosing " " and the <> or just what is above ?
I tried the above and still get -- "Exiting now: Could not find adb command"

It was so easy with my iPhone - I'm just trying to do Android backups as easily, but Android does not seem to have backing-up designed into it.
 
The quotes are optional - works for me either way. You don't need the < > - that's just a common convention (amongst unix/linux types) for "replace this bit".

To test you have that path right, open a terminal and type

ls /Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb

If it just writes "adb" then you're fine. If it complains that there's no such file or directory then the path is wrong. Then use the finder or the ls command itself to find where the adb binary actually is.

iPhone is designed to be managed from iTunes, including backups. Android doesn't have an equivalent - Google had in mind cloud sync rather than "siloing" with a particular computer. This adb backup is a recent addition (and not exactly advertised to the general user, though it does look useful). You can do this without the script if you prefer, just using adb itself, but I guess that if the script works that might be simpler. As my phone is running 2.3 I can't properly test this myself. :(
 
This is the "ls" result ---

Mac-mini:~ danmdan$ 10 22:49:30 on ttys000
Mac-mini:~ danmdan$
Mac-mini:~ danmdan$ ls /Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb
/Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb
Mac-mini:~ danmdan$


So neither "adb" or "no such file or directory message" !
 
And if I just "ls adb" I get ---

Last login: Wed Oct 10 22:49:54 on ttys000
Mac-mini:~ danmdan$ ls adb
ls: adb: No such file or directory
Mac-mini:~ danmdan$
 
But if I --

Last login: Wed Oct 10 23:09:39 on ttys000
Mac-mini:~ danmdan$ ls Desktop/android-sdk-macosx/platform-tools
NOTICE.txt api lib
aapt dexdump llvm-rs-cc
adb dx renderscript
aidl fastboot source.properties
Mac-mini:~ danmdan$

-- there "adb" is exactly where it should be !
 
This is the "ls" result ---

Mac-mini:~ danmdan$ 10 22:49:30 on ttys000
Mac-mini:~ danmdan$
Mac-mini:~ danmdan$ ls /Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb
/Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb
Mac-mini:~ danmdan$


So neither "adb" or "no such file or directory message" !
But there is " /Users/danmdan/Desktop/android-sdk-macosx/platform-tools/adb". That's it, it's there. It's just returned the whole path rather than just the filename.
 
Excellent - I'm very rusty re. Unix/Linux - having only a few months of trying to use it some years back - so unaware of the syntax. Hopefully I can proceed from there.

However if anyone can propose a simpler method of doing S2 or S3 complete backups, please do let me and members have your recommendations.
 
Back
Top Bottom