Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

Commit 32aafa8

Browse files
committed
Adding some basic documentation
1 parent 05039c9 commit 32aafa8

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed

doc/hints.md

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Miscellaneous hints for Adebar usage
2+
3+
## General
4+
*Adebar* only creates the scripts, it doesn't backup stuff itself. There are two
5+
exceptions to this rule currently:
6+
7+
* it pulls the `packages.xml` (as it requires this to obtain additional details)
8+
* it pulls the `wpa_supplicant.conf` directly.
9+
10+
Both actions are relative fast. But once you run the scripts to create the real
11+
backups, things are different: especially pulling the "Shared Storage" (see
12+
below) might take quite a while, as your SD cards might hold gigabytes of data.
13+
At the same time, it puts quite a strain on your battery, as it needs to transfer
14+
all those data. So make sure to have a power source connected to your device
15+
during the backup process (you probably will have that, as ADB is mostly used
16+
via USB – but you could also use "ADB wireless", and the *TiBu* stuff is using
17+
WiFi as well – so I'd thought to better point this out).
18+
19+
### When running the real backup
20+
* as pointed out above: have a power source connected
21+
* with the "ADB Backups": always wait for the "complete" toast before confirming
22+
the next backup (or ADB might choke, backup won't continue)
23+
* if ADB "chokes" (and the backup stalls): Check your backup directory for how
24+
far the process already went, adjust the script accordingly to start there,
25+
disconnect and reconnect your device, and re-start the modified script.
26+
27+
28+
## Installation
29+
Simply unpack into an empty directory, and run the script from there. No special
30+
installation-steps required.
31+
32+
33+
## Configuration
34+
When running, *Adebar* checks for a file called `config` in the directory where
35+
it resides itself. A sample configuration file is included as `config.sample`,
36+
which you simply can copy and adjust. Your `config` file has only to contain the
37+
settings you wish to change; this will usually be the DEVICE_IP (which is not
38+
set by default).
39+
40+
What the settings are standing for is:
41+
42+
* `USERDIR="userApps"`: sub-directory where the backup scripts will place the
43+
ADB backups of your user-apps into
44+
* `SYSDIR="sysApps"`: Similar, for the data backups of your system apps
45+
* `DEVICE_IP="192.168.101.111"`: IP address of your device (for *TiBu*)
46+
* `TIBU_PORT="8080"`: port the *TiBu* web server listens on
47+
* `TIBU_SDINT="/storage/INTERNAL/Storage-ALL.zip"`: URL path of the internal SD
48+
* `TIBU_SDEXT="/storage/SAMSUNG_EXT_SD_CARD/Storage-ALL.zip":` URL path of the external SD
49+
* `TIBU_BACKUPS="/TitaniumBackup-ALL.zip"`: URL path to the *TiBu* backups
50+
51+
52+
## Shared Storage
53+
This term refers to your SD card(s). *Adebar* offers two ways to retrieve data
54+
from those:
55+
56+
* `com.android.sharedstoragebackup.ab` (for abbreviation issues, I'll refer to
57+
this as *SSB* from now on)
58+
* [Titanium Backup](http://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup)
59+
(abbreviated as *TiBu* here)
60+
61+
Scripts generated by *Adebar* cover both, so it's up to you which to use.
62+
63+
### SSB
64+
As you might have already guessed from the above, *SSB* is offered via ADB
65+
without the need of additional apps. It is simply triggered when backing up
66+
data from its package. These data include everything from your device's
67+
SD cards – both internal (`/0`) and external (`/1`). Timestamps of files
68+
and directories are kept, but most files seem to come as "0775" (i.e. the
69+
execute flag is set for user and group) – a condition you might have seen
70+
when accessing FAT formatted drives in general.
71+
72+
While I'd prefer this backup to the one *TiBu* creates, specifically for
73+
the timestamps, on some devices it has a little draw-back: My *LG Optimus 4X HD*
74+
e.g. mounts the external SD card *inside* the internal one (`/sdcard/external_sd`),
75+
which results in its contents backed up twice: once as part of the internal SD
76+
(in the `/0` subdirectory), and another time as external SD in the `/1`
77+
subdirectory. This not only makes the resulting backup file unnecessary huge,
78+
but also takes much longer to backup.
79+
80+
### TiBu
81+
*TiBu* offers an internal web server, which you can start manually via its options
82+
menu. If running, you can pull 3 kinds of backups via HTTP:
83+
84+
* contents of the internal SD card (http://<DEVICE_IP>:8080/storage/INTERNAL/Storage-ALL.zip)
85+
* contents of the external SD card (http://<DEVICE_IP>:8080/storage/SAMSUNG_EXT_SD_CARD/Storage-ALL.zip)
86+
* all your *TiBu* created backups (http://<DEVICE_IP>:8080/TitaniumBackup-ALL.zip).
87+
88+
In case of my above mentioned *LG Optimus 4X HD* I just had to pull the contents
89+
of the internal card, and had them all: As noted, the external card is mounted
90+
inside – and of course the backups reside on one of the two.
91+
92+
Disadvantage here is that *TiBu* touches the timestamps of all files, so the
93+
original timestamps are lost: All files appear as if they would have been created
94+
at the time the backup was made.

doc/known_issues.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Known Issues
2+
3+
## Some apps simply don't want to be backed up via ADB
4+
At least on my P880 I've encountered several apps which seem to simply refuse
5+
being backed up via ADB. In those cases, backups result in a 41 byte file (which
6+
is just the backup file header). So watch out for those, and see to have them
7+
backed up by other means; as *Adebar* here is no more than a "front-end" to the
8+
`adb backup` command, I don't see what it could fix here.
9+
10+
Apps which I found having this issue include the following:
11+
12+
* installed as system apps:
13+
- GMail
14+
- SuperSU
15+
* installed as user apps:
16+
- AppMonster Pro
17+
- DavDroid
18+
- JuiceSSH
19+
- MobilityMap
20+
- WakeLockDetector
21+
22+
23+
## Backup of each app has to be confirmed separately
24+
Yes. That's a security measure so no stranger could simply connect an USB cable
25+
to your device and steal your data. I didn't yet check whether it's possible to
26+
at least temporarily disable that. If I do and find a way, you will find it with
27+
the other hints :)

0 commit comments

Comments
 (0)