|
|
### Update Functions:
|
|
|
* Update Check URL: https://raw.github.com/ameer1234567890/OnlineNandroid/master/version
|
|
|
* Download URL: https://raw.github.com/ameer1234567890/OnlineNandroid/master/onandroid
|
|
|
* Changelog URL: https://raw.github.com/ameer1234567890/OnlineNandroid/master/changelog
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Command Line Flags (for v6 and above):
|
|
|
* v6 introduces a new command line flag mechanism with totally revamped code. Each command line flag also has a long version which is more descriptive and preferred by some.
|
|
|
```none
|
|
|
-h, --help display this help message and exit
|
|
|
-ah, --advanced-help display help for advanced backup mode
|
|
|
-v, --version display version number and exit
|
|
|
-p, --phone generate backup name with phone timezone
|
|
|
-u, --utc generate backup name with UTC time (default)
|
|
|
-i, --incremental CWM6 style incremental backup mode
|
|
|
-a, --advanced PARTITIONS advanced / selective backup mode
|
|
|
-l, --split split backup mode (CWM 6+ only)
|
|
|
-o, --old good old backup mode (default)
|
|
|
-gc, --garbage-collect run garbage collect mode
|
|
|
-c, --custom NAME specify a custom backup name
|
|
|
-s, --storage MEDIA specify an alternate storage media to backup
|
|
|
-e, --sd-ext-path PATH specify path to sd-ext partition
|
|
|
-r, --replace replace backup with same name
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Specifying Custom Backup Name:
|
|
|
* While specifying custom backup names, characters not allowed in folder/directory names should not be used. The script does not do any filtering for such characters and thus any error spitted would be from the shell itself. If you are developing an android app or any other GUI for the script, you can optionally include filtering for disallowed characters.
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Specifying Alternate Backup Media (for v6 and above):
|
|
|
* Since some people are having issues where the script detects internal sd card for backing up, but people want the external sd card to be selected (there is instances of vice versa too), there is a command line flag to set the sdcard / base folder. You could also use this for cryptonite volumes or any other folders for that matter. Here is an example:
|
|
|
|
|
|
* For sd card selection: (This would force Online Nandroid to backup to /sdcard/external_sd/clockworkmod/backup/...)
|
|
|
```shell
|
|
|
onandroid -s /sdcard/external_sd
|
|
|
OR
|
|
|
onandroid --storage /sdcard/external_sd
|
|
|
```
|
|
|
|
|
|
* For your cryptonite volume: (This would force Online Nandroid to backup to /sdcard/mnt/cryptonite/clockworkmod/backup/...)
|
|
|
```shell
|
|
|
onandroid -s /sdcard/mnt/cryptonite
|
|
|
OR
|
|
|
onandroid --storage /sdcard/mnt/cryptonite
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Specifying sd-ext Path / Mountpoint (for v6 and above):
|
|
|
* Since it is almost impossible for the script to detect all the various flavors of sd-ext usages (such as app2sd, link2sd, data2sd, etc...), I have added a command line flag to manually specify sd-ext path / mountpoint. Here is an example:
|
|
|
```shell
|
|
|
onandroid -e /data/sdext2
|
|
|
OR
|
|
|
onandroid --sd-ext-path /data/sdext2
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Advanced / Selective Backup Mode (for v6 and above):
|
|
|
* Using this backup mode you can backup only specific partitions.
|
|
|
```shell
|
|
|
Usage: onandroid -a <partitions>
|
|
|
|
|
|
<partitions>
|
|
|
m: mmcblk0_start (for Acer devices)
|
|
|
b: boot
|
|
|
r: recovery
|
|
|
w: wimax (for Samsung devices)
|
|
|
l: appslog (for HTC and Sony (Ericsson) devices)
|
|
|
s: system
|
|
|
d: data
|
|
|
c: cache
|
|
|
t: datadata (for some Samsung devices)
|
|
|
e: efs (for Samsung devices)
|
|
|
u: .cust_backup (for Huawei devices)
|
|
|
f: flexrom (for Acer devices)
|
|
|
p: boot (for HP Touchpad)
|
|
|
i: (cp)uid (for Acer devices)
|
|
|
a: android_secure
|
|
|
x: sd-ext
|
|
|
```
|
|
|
* Note: This help screen can be accessed by entering:
|
|
|
```shell
|
|
|
onandroid -ah
|
|
|
OR
|
|
|
onandroid --advanced-help
|
|
|
```
|
|
|
* Example (backup boot, system and data partitions only):
|
|
|
```shell
|
|
|
onandroid -a bsd
|
|
|
OR
|
|
|
onandroid --advanced bsd
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Specifying Progress Indicator Type (for v6 and above):
|
|
|
* There are two progress indicator types available. Using dots (as in versions prior to v6), and using percentages. By default, the second indicator type is used. If, for some reason (for instance some apps may not be able to properly display the percentage progress indicator), you want to choose a specific indicator type, it can be set via the below flags.
|
|
|
* Setting dot indicator:
|
|
|
```shell
|
|
|
onandroid -pd
|
|
|
OR
|
|
|
onandroid --progress-dot
|
|
|
```
|
|
|
|
|
|
* Setting percentage indicator:
|
|
|
```shell
|
|
|
onandroid -pp
|
|
|
OR
|
|
|
onandroid --progress-percent
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Disabling Notifications (for v6 and above):
|
|
|
* If the app / tool you are developing has a method of notifying the user when backup is done, and / or if you do not require the notifications done by Online Nandroid script itself (currently led and vibrate notifications), you can disable notifications. Here is an example:
|
|
|
```shell
|
|
|
onandroid -nd
|
|
|
OR
|
|
|
onandroid --notification-disable
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Backup Format Indicators (for v6 and above):
|
|
|
* Online Nandroid adheres to backup format indicator set in **.default_backup_format** file, by ClockWorkMod (CWM) recovery. This file could have 2 different strings, **dup** or **tar**, where **dup** means incremental backup mode and **tar** means split backup mode. The file is normally in the below location, as set by CWM. The sd card mount point may vary.
|
|
|
```shell
|
|
|
/mnt/sdcard/clockworkmod/.default_backup_format
|
|
|
```
|
|
|
|
|
|
* In addition, Online Nandroid introduces its own file (**.advanced_backup_partitions**) for specifying backup partitions for advanced / selective backup. This file should be populated with the partition letters in the same way as doing an advanced / selective backup. The file should be in the below location. The sd card mount point may vary.
|
|
|
```shell
|
|
|
/mnt/sdcard/clockworkmod/.advanced_backup_partitions
|
|
|
```
|
|
|
|
|
|
<br />
|
|
|
<br />
|
|
|
|
|
|
### Exit Codes (for v7 and above):
|
|
|
* Online Nandroid returns specific exit codes based on the status of the script run. Below is the list of error codes and their respective descriptions.
|
|
|
```shell
|
|
|
0 : Success
|
|
|
65 : Could not acquire root permissions
|
|
|
66 : Sufficient battery not available
|
|
|
67 : Error: BusyBox version less than 1.20 found
|
|
|
68 : SD card not found
|
|
|
69 : Killed by exit/kill signal
|
|
|
70 : mkyaffs2image not found in path
|
|
|
71 : dedupe not found in path
|
|
|
72 : md5sum not found in path
|
|
|
73 : tar not found in path
|
|
|
74 : dd not found in path
|
|
|
75 : Could not change to backup path
|
|
|
76 : Cannot create backup directory
|
|
|
77 : Cannot delete backup directory
|
|
|
78 : Backup name already exists
|
|
|
79 : Cannot write to backup directory
|
|
|
80 : Cannot write to blobs directory
|
|
|
81 : Not enough disk space
|
|
|
82 : Could not change to backup directory
|
|
|
``` |
|
|
\ No newline at end of file |