-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdater-script
More file actions
42 lines (42 loc) · 2.57 KB
/
updater-script
File metadata and controls
42 lines (42 loc) · 2.57 KB
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
assert(getprop("ro.product.device") == "ginkgo" || getprop("ro.build.product") == "ginkgo" ||
getprop("ro.product.device") == "willow" || getprop("ro.build.product") == "willow" || abort("E3004: This package is for device: ginkgo,willow; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: Xiaomi/corvus_ginkgo/ginkgo:11/RQ3A.210705.001/0b619fc427:user/release-keys");
ui_print("----------------------------------------------");
ui_print(" _____ ____ _______ ___ _ _____ ");
ui_print(" / ____/ __ \| __ \ \ / / | | |/ ____| ");
ui_print(" | | | | | | |__) \ \ / /| | | | (___ ");
ui_print(" | | | | | | _ / \ \/ / | | | |\___ \ ");
ui_print(" | |___| |__| | | \ \ \ / | |__| |____) | ");
ui_print(" \_____\____/|_| \_\ \/ \____/|_____/ ");
ui_print(" ");
ui_print(" by Corvus Team ");
ui_print("----------------------------------------------");
ui_print(" Device: ginkgo");
ui_print(" Android version: 11");
ui_print(" Corvus version: 16.7");
ui_print(" Build id: RQ3A.210705.001");
ui_print(" Build date: 29072021");
ui_print(" Build type: Official");
ui_print(" Security Patch: 2021-07-05");
ui_print("----------------------------------------------");
ifelse(is_mounted("/system"), unmount("/system"));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
ui_print("Patching system image unconditionally...");
show_progress(0.800000, 0);
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
delete_recursive("/data/system/package_cache");
ui_print("Patching vendor image unconditionally...");
show_progress(0.100000, 0);
block_image_update("/dev/block/bootdevice/by-name/vendor", package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
delete_recursive("/data/system/package_cache");
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.100000, 10);
ui_print("Patching vbmeta image unconditionally...");
package_extract_file("vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta");
ui_print("Patching dtbo image unconditionally...");
package_extract_file("dtbo.img", "/dev/block/bootdevice/by-name/dtbo");
set_progress(1.000000);