-
Notifications
You must be signed in to change notification settings - Fork 1
/
updater-script
79 lines (73 loc) · 3.1 KB
/
updater-script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print(" =]=]=]");
ui_print(" =]=]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]=]=]=]=]=] =]=]");
ui_print(" =]=]=]=]=]=]=] =]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]=]=]=]=]=] =]=]");
ui_print(" =]=]=]=]=]=]=] =]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]");
ui_print(" =]=]=]");
ui_print(" =]=]=]");
ui_print("");ui_print("");ui_print("");
ui_print("=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]");
ui_print("=] Originally for the BonsaiRom =]");
ui_print("=] Rewritten by nubecoder =]");
ui_print("=] www.nubecoder.com =]");
ui_print("=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]");
ui_print("");ui_print("");ui_print("");sleep(4);
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print("");ui_print("");ui_print("");ui_print("");ui_print("");
ui_print("");ui_print("");sleep(1);
ui_print("=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]");
ui_print("=] Android Backup =]");
ui_print("=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]");
ui_print("");sleep(2);
show_progress(0.2, 0);
ui_print("Mounting partitions...");
assert(
run_program("/sbin/busybox", "mount", "/system"),
run_program("/sbin/busybox", "mount", "/data"),
run_program("/sbin/busybox", "mount", "/sdcard")
);
set_progress(0.5);
ui_print("Copying needed files...");
assert(
run_program("/sbin/busybox", "mkdir", "-p", "/data/local/tmp"),
package_extract_file("tools/busybox", "/data/local/tmp/busybox"),
package_extract_file("tools/doBackup", "/data/local/tmp/doBackup")
);
set_perm(0, 0, 0755, "/data/local/tmp/busybox");
set_perm(0, 0, 0755, "/data/local/tmp/doBackup");
set_progress(0.5);
show_progress(1.0, 120);
ui_print("Android backup begin:");
ui_print("");
assert(
run_program("/data/local/tmp/busybox", "sh", "/data/local/tmp/doBackup")
);
assert(
delete_recursive("/data/local/tmp")
);
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "umount", "/sdcard");
show_progress(0.13, 0);
ui_print("");
ui_print("Android backup complete.");
ui_print("");
ui_print("=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]=]");
set_progress(1.0);
sleep(2);