HELP!!! How to fix "Can’t load Android System your data may be corrupt" error without losing your data ? - General Questions and Answers

Kindly find the updated post here
Hello guys,I was uninstalling some apps and accidently Asus launcher,Google Play and Play services etc got selected as well.While apps were getting uninstalled and downgraded,phone restarted somehow and everything is screwed up now.I am stuck on a screen telling “Can’t load Android System.Your data may be corrupt.If you continue to get this message, you may need to perform a factory data reset and erase all user data stored on this device” with 2 options underneath, 1.Try again and 2.Factory data reset
When I select “Try again” it shows “ Dead android robot on his back and red triangle” for a split second and then goes to Asus logo screen for 5 seconds and then ask for encryption key, when I enter the key it goes to ASUS logo screen again for 30-40 seconds and again back to Error screen.
Asus ZenFone 3 ZE552KL
ROM : Stock Oreo Version WW-15.0410.1807.75
Bootloader is Locked
Recovery : Stock Recovery
USB debugging : Disabled
Android device encryption is ON
I don’t wanna to lose my data coz there are some very important documents,projects reports, pictures and backups in it.
Device is booting in Fastboot Mode and Recovery Mode.
It even boots to the Sideload Mode via recovery and running "adb devices" command shows it attached with it's serial number and sideload but other commands don't work ( probably coz USB debugging is disabled ? )
Device is being shown /listed in Fastboot Mode.
I am unable to use adb as USB debugging is disabled.Running "adb devices " command shows device’s serial number and "recovery" written next to it ,in the command prompt.
Will flashing Version WW-15.0410.1807.75 again do the job without wiping user data ? Just like “userdata” partition is not normally touched by the OTA update process ?
How about flashing only boot.img / system.img ?Can we resolve the issue by just flashing just system.img or boot.img instead of flashing complete stock ROM ?
I don't care about performance of the system or unpredicted issues later on,my entire focus is on preserving my data.
Any help would be greatly appreciated!
I extracted the Stock ROM zip and found it's updater script in "META-INF/com/google/android"
JavaScript:
ifelse( getprop("ro.build.id") == "OPR1.170623.026", ui_print("Android O device"), (
(greater_than_int(getprop("ro.build.date.utc"), 1514390400)) || abort("Can't install this package on device version less than 14.2020.1712.85 device build time (" + getprop("ro.build.date") + ").");
) );
ifelse( getprop("ro.product.name") == "OPEN_Phone", ui_print("OPEN SKU device"), (
getprop("ro.product.name") == "WW_Phone" || abort("This package is for \"WW_Phone\" devices; this is a \"" + getprop("ro.product.name") + "\".");
) );
ui_print("Target: asus/WW_Phone/ASUS_Z012D:8.0.0/OPR1.170623.026/15.0410.1807.75-0:user/release-keys");
show_progress(0.750000, 540);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
ui_print("Verifying the updated system image...");
if range_sha1("/dev/block/bootdevice/by-name/system", "136,0,32767,32768,32770,33009,33011,33516,65535,65536,65538,66043,98303,98304,98306,98545,98547,99052,131071,131072,131074,131579,163839,163840,163842,164081,164083,164588,196607,196608,196610,197115,229375,229376,229378,229617,229619,230124,262143,262144,262146,262651,294910,294912,294914,295153,295155,295660,327679,327680,327682,328187,335068,360448,360450,360955,393214,393216,393218,393723,393724,393725,425982,425984,425986,426491,458751,458752,458754,459259,491519,491520,491522,492027,524287,524288,524290,524795,557055,557056,557058,557563,589823,589824,589826,590331,622591,622592,622594,623099,655358,655360,655362,655867,688126,688128,688130,688635,720894,720896,720898,721403,753662,753664,753666,754171,786430,786432,786434,786939,819198,819200,819202,819441,819443,819948,851966,851968,851970,852475,884734,884736,884738,884977,884979,885484,917502,917504,917506,918011,950270,950272,950274,950779,967696,967697,983040") == "9a4740126249131da4ccd7e39fcf8d7302a3f818" then
if range_sha1("/dev/block/bootdevice/by-name/system", "136,32767,32768,32770,33009,33011,33516,65535,65536,65538,66043,98303,98304,98306,98545,98547,99052,131071,131072,131074,131579,163839,163840,163842,164081,164083,164588,196607,196608,196610,197115,229375,229376,229378,229617,229619,230124,262143,262144,262146,262651,294910,294912,294914,295153,295155,295660,327679,327680,327682,328187,335068,335580,359936,360448,360450,360955,393214,393216,393218,393723,393724,393725,425982,425984,425986,426491,458751,458752,458754,459259,491519,491520,491522,492027,524287,524288,524290,524795,557055,557056,557058,557563,589823,589824,589826,590331,622591,622592,622594,623099,655358,655360,655362,655867,688126,688128,688130,688635,720894,720896,720898,721403,753662,753664,753666,754171,786430,786432,786434,786939,819198,819200,819202,819441,819443,819948,851966,851968,851970,852475,884734,884736,884738,884977,884979,885484,917502,917504,917506,918011,950270,950272,950274,950779,967696,967697") == "6d1cea242bbacf2ea86f62fa6c06b6bde31ec430" then
ui_print("Verified the updated system image.");
else
abort("E1003: system partition has unexpected non-zero contents after OTA update");
endif;
else
abort("E1002: system partition has unexpected contents after OTA update");
endif;
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
# ---- radio update tasks ----
ui_print("Patching firmware images...");
ifelse(msm.boot_update("main"), (
ui_print("installing cmnlib64");
package_extract_s_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
ui_print("installing sbl1");
package_extract_s_file("firmware-update/sbl1.mbn", "/dev/block/bootdevice/by-name/sbl1");
ui_print("installing cmnlib");
package_extract_s_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
ui_print("installing rpm");
package_extract_s_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
ui_print("installing tz");
package_extract_s_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
ui_print("installing devcfg");
package_extract_s_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
ui_print("installing aboot");
package_extract_s_file("firmware-update/emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/aboot");
ui_print("installing lksecapp");
package_extract_s_file("firmware-update/lksecapp.mbn", "/dev/block/bootdevice/by-name/lksecapp");
ui_print("installing keymaster");
package_extract_s_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
), "");
ifelse(msm.boot_update("backup"), (
ui_print("installing cmnlib64bak");
package_extract_s_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64bak");
ui_print("installing sbl1bak");
package_extract_s_file("firmware-update/sbl1.mbn", "/dev/block/bootdevice/by-name/sbl1bak");
ui_print("installing cmnlibbak");
package_extract_s_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlibbak");
ui_print("installing rpmbak");
package_extract_s_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
ui_print("installing tzbak");
package_extract_s_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
ui_print("installing devcfgbak");
package_extract_s_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfgbak");
ui_print("installing abootbak");
package_extract_s_file("firmware-update/emmc_appsboot.mbn", "/dev/block/bootdevice/by-name/abootbak");
ui_print("installing lksecappbak");
package_extract_s_file("firmware-update/lksecapp.mbn", "/dev/block/bootdevice/by-name/lksecappbak");
ui_print("installing keymasterbak");
package_extract_s_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymasterbak");
),"no backup partition");
msm.boot_update("finalize");
ui_print("installing modem");
package_extract_s_file("firmware-update/NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
ui_print("installing dsp");
package_extract_s_file("firmware-update/adspso.bin", "/dev/block/bootdevice/by-name/dsp");
ui_print("installing asusfw");
package_extract_file("firmware-update/asusfw.img", "/dev/block/bootdevice/by-name/asusfw");
set_progress(1.000000);

Related

Creation flashable zip sys-part CM10

Hi the crazy flash,
I open this topic for help creating a fix
CM10 ROM is Divided into 2 parts and some of the applications are installed on the / data partition due to Lack of space for full Jellybean installation.
Hence you will Have to reflash the rom you factory reset or Effective wipe / data partition.
Click to expand...
Click to collapse
After a restart install CM10 patch to system/app did not effect ?§!
Here is the solution I use busybox to inject App
I take this opportunity to fix some permission
If you have time of need flashable zip of this topic and for you!
Kernel or gapps or questions to ask permission
FixSysPartCM10
Code:
assert(getprop("ro.product.device") == "galaxysl" || getprop("ro.build.product") == "galaxysl" ||
getprop("ro.product.device") == "GT-I9003" || getprop("ro.build.product") == "GT-I9003");
ui_print(" ");
ui_print(" ********************************************** ");
ui_print(" * Fix reboot sys-parts/app by LoLaTiOn * ");
ui_print(" ********************************************** ");
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/stl9", "/system");
run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p3", "/data");
package_extract_dir("data", "/data");
symlink("/data/sys-parts/app","/system/app");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/data/app");
unmount("system");
run_program("/sbin/reboot");
instruction
Open zip with winrar
Add your app in \data\sys-parts\app
Create other folder in the system if time of need
Made you happy to share your patch and help the community
Enjoy...
my rom do not need this fix
Worked perfectly for me! Thanks
This is needed because CM10 with gapps does not fit our NAND aka ROM size.
Hence, the system apps are pushed into /data/sys-apps so that the entire ROM can work properly.. else full /system of jellybean does not fit on our small partition.

Unroot my phone in recovery mode

I've just updated a firmware from archos website (OTA972121_8916_V007049.zip)
for the archos 40 titanium.
I reboot in recovery mode, and after plugin the USB, I selected update from ADB. SO I ran
Code:
adb sideload OTA972121_8916_V007049.zip
in cmd, everything seemed to work.
I reboot and now my cell phone doesn't work anymore: i got a bootloop .
I must precise that I performed full adb backups just before. I tried to reset cache and data, didn't worked. My cellphone is already rooted.
I contacted Archos they asked me to return them the phone. Since I rooted the guarantee isn't available anymore, unless I "unroot" it. How to do it?
After searching a while I know there is a way but only for I9001. After extracting it I could open update-script and see pastebin.com/LqyqwwKq, so I edited it to make it work for my phone (the partition name I got it in the official archos firmware update)
Code:
ui_print("***********************************************");
show_progress(1.000000, 0);
ui_print(" Mounting SYSTEM...");
mount("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
set_progress(0.100000);
ui_print(" Deleting SYSTEM:xbin/su...");
delete("/system/xbin/su");
set_progress(0.200000);
ui_print(" Deleting SYSTEM:app/Superuser.apk...");
delete("/system/app/Superuser.apk");
set_progress(0.300000);
ui_print(" Deleting SYSTEM:app/XPosedInstaller.apk...");
delete("/system/app/XPosedInstaller.apk");
set_progress(0.400000);
ui_print(" Deleting SYSTEM:app/XPrivacy.apk...");
delete("/system/app/XPrivacy.apk");
set_progress(0.500000);
ui_print(" Deleting SYSTEM:app/GravityBox.apk...");
delete("/system/app/GravityBox.apk");
set_progress(0.600000);
ui_print(" Deleting SYSTEM:app/Busybox.apk...");
delete("/system/app/Busybox.apk");
set_progress(0.700000);
ui_print(" Unmounting SYSTEM...");
unmount("/system");
set_progress(0.900000);
ui_print("Install complete. Bye Bye!");
set_progress(1.000000);
But is this script correct? Particulary, I'm not sure for GravityBox, XposedInstaller, XPrivacy, Busybox and SU (since when I root it it was w/ Boromir from Framaroot).

[PROBLEM] Unable to flash self-made zip file

Device details:
YU Yuphoria YU5010
Software: CyanogenMod 12.1 (Nightly)
Root Access: Yes (By Default)
Bootloader: Unlocked
Recovery: TWRP v2.8.7.0
I made a simple flashable zip which I want to use for installing a different camera app in my device's /system partition. The app works. I've tried it by installing it the traditional way (apk). However I'm not able to flash the zip file. Whenever I try to flash it I get an error
Code:
E:Error executing updater binary in zip '/sdcard/cam.zip'
I researched on Google for that error and found many solutions from people facing the same problem. However all those solutions were only for this issue when faced while flashing a new custom ROM, not any other zip. So they were futile for me. Obviously I haven't been wiping anything before flashing my zip file.
My updater-script code:
Code:
ui_print("*********************************");
ui_print(" ");
ui_print("********** MIUI Camera **********");
ui_print("*** By Tanmay Vij ***";
ui_print("**********************************");
ui_print("Mounting System...");
run_program(
"/sbin/busybox",
"mount",
"/system"
);
ui_print("Installing Camera...");
package_extract_dir(
"system",
"/system"
);
ui_print("Fixing Permissions...");
set_perm(0, 0, 0644, "/system/app/Redmi1s_MIUICamera.apk");
ui_print("Unmounting System...");
run_program(
"/sbin/busybox",
"umount",
"/system"
);
ui_print("MIUI Camera successfully installed!");
I wonder whether this is gonna happen with me only in TWRP or in other recoveries as well (can't test in CWM as it is not supported for my device). Please correct if any errors in the script..
P.S. I took the update-binary from some random flashable zip as I've heard that it's the same for any zip file..

[ROM] Unoffical CM12.1 for Huawei Y6 - DISCONTINUED

Code:
/*
* Your warranty is now void.
*
* We're not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Devices Confirmed working.
SCL-L01
SCL-L02
SCL-L03
Features
Based on CyanogenMod 12.1 - Android 5.1.1 Lollipop
First? custom ROM developed for Qualcomm Snapdragon 210 (msm8909) processor.
First Android Lollipop ROM released for Huawei Y6.
Rom Download: CM12.1 for Huawei Y6
Stock Kernel and Modules to fix can't connect to camera issue: Camera Fix
Installation:
Ensure you have unlocked bootloader (there are many guides on how to check this) if you need a code go here, Emui Download Page click unlock bootloader and login with either facebook or phone account to obtain your code.
Install working TWRP recovery from: unofficial TWRP for Huawei Y6
Download ROM from above link,
Download Open Gapps from http://opengapps.org/, select arm, 5.1 and then your preferred package (I use the aroma installer because it includes needed webview, see issues)
Boot into TWRP, perform backup (always backup!!!), wipe data/factory reset, flash ROM zip and reboot.
First boot may take quite a while.
If you want camera to work download and flash the camera fix zip then reboot.
Known issues
Device-related issues:
Double tap to wake does not work.
ROM included webview does not work, install GAPPS webview to fix.
No camera on built kernel (see links for kernel swap fix).
Reported mobile data disconnection from time to time (possibly local to Romania).
Sources available on GitHub:
Device Files
Kernel
Wifi Driver
Credits to Cyanogenmod for making this possible.
XDA:DevDB Information
Cyanogenmod 12.1 for Huawei Y6, ROM for the Android General
Contributors
DestructoSphere, Runner85sx
ROM OS Version: 5.1.x Lollipop
ROM Kernel: Linux 3.10.x
Based On: Cyanogenmod
Version Information
Status: Stable
Current Stable Version: Initial 2016514
Stable Release Date: 2016-05-14
Created 2016-06-24
Last Updated 2017-09-26
Device tree supported devices are as follows. If your device is not on the list you can request for me to see if I can build support for it. When reporting errors or problems please include your exact model.
huawei_scl_al
huawei_scl_al00
huawei_scl_cl
huawei_scl_l01
huawei_scl_l02
huawei_scl_l03
huawei_scl_l21
huawei_scl_tl
huawei_scl_tl00h
huawei_scl_u03
huawei_scl_u21
huawei_scl_u23
huawei_y538_a1
Edit: the new dtb should also now support
huawei_scl_u31
Reserved
Download lasted update from here:
http://forum.xda-developers.com/devdb/project/?id=15925#downloads
I have this error with flash
Checking for md5 file
Skipping md5 check : no md5 file found
This package for device y6 ;this device is .
Process end with error: 7
Error installing zip file..............
My device is y6scl-u31 and installed twrp 3.0.2-0.IMG recovery with unlocked bootloader
According to the kernel device tree these are all theoretically supported.
huawei_scl_al
huawei_scl_al00
huawei_scl_cl
huawei_scl_l01
huawei_scl_l02
huawei_scl_l03
huawei_scl_l21
huawei_scl_tl
huawei_scl_tl00h
huawei_scl_u03
huawei_scl_u21
huawei_scl_u23
huawei_y538_a1
Saber5311 said:
I have this error with flash
Checking for md5 file
Skipping md5 check : no md5 file found
This package for device y6 ;this device is .
Process end with error: 7
Error installing zip file..............
My device is y6scl-u31 and installed twrp 3.0.2-0.IMG recovery with unlocked bootloader
Click to expand...
Click to collapse
That is due to the assert in the updater script.
As your twrp does not set the ro.product.device you can get around it by tapping advanced then terminal command then select any location and type setprop ro.product.device y6 then try flashing it.
Set the property as soon as you boot into twrp before you try to flash or it won't work.
DestructoSphere said:
That is due to the assert in the updater script.
As your twrp does not set the ro.product.device you can get around it by tapping advanced then terminal command then select any location and type setprop ro.product.device y6 then try flashing it.
Set the property as soon as you boot into twrp before you try to flash or it won't work.
Click to expand...
Click to collapse
Please type anything
that I should type on terminal Emulator
Saber5311 said:
Please type anything
that I should type on terminal Emulator
Click to expand...
Click to collapse
You need to type setprop ro.product.device y6 either in twrp terminal or via adb shell.
I can't do it. Do you have another way ?
I type that
And show it : could not set property
Thanks.
It is working like a charm.
You made my day!
DestructoSphere said:
You need to type setprop ro.product.device y6 either in twrp terminal or via adb shell.
Click to expand...
Click to collapse
i do it and flash the rom but when i reboot system gonig to fastboot
please help
Saber5311 said:
i do it and flash the rom but when i reboot system gonig to fastboot
please help
Click to expand...
Click to collapse
What exactly is your devices?
Instalation Failed
i tried to install but when flash the zip, its say this package is for device: y6; this device is Honor4a
"E:Error executing updater binary in zip ' /sdcard/cm-12.1-2016514-UNOFFICIAL-Y6.ZIP' Error flashingzip'
how can i do to install?
j3cnfa said:
i tried to install but when flash the zip, its say this package is for device: y6; this device is Honor4a
"E:Error executing updater binary in zip ' /sdcard/cm-12.1-2016514-UNOFFICIAL-Y6.ZIP' Error flashingzip'
how can i do to install?
Click to expand...
Click to collapse
There is a lazy hack to disable the devicescheck.
I recoment to NOT do this. So do it on your own risk!
Open the Zip with Winrar and navigate to: "cm-12.1-20160514-UNOFFICIAL-y6.zip\META-INF\com\google\android "
change updater-script to:
"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);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/userdata", "/data", "");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
"
Save the file and dragn/drop it back to:
cm-12.1-20160514-UNOFFICIAL-y6.zip\META-INF\com\google\android/updater-script
BACKUP your device before you do this!
NOTICE: flash the stock boot.img and Gapps to get this rom fully working.
You may find the needed files in post 1.
Runner85sx said:
There is a lazy hack to disable the devicescheck.
I recoment to NOT do this. So do it on your own risk!
Open the Zip with Winrar and navigate to: "cm-12.1-20160514-UNOFFICIAL-y6.zip\META-INF\com\google\android "
change updater-script to:
"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);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "backup");
unmount("/system");
if is_mounted("/data") then
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/userdata", "/data", "");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
endif;
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system", "");
run_program("/tmp/install/bin/backuptool.sh", "restore");
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);
"
Save the file and dragn/drop it back to:
cm-12.1-20160514-UNOFFICIAL-y6.zip\META-INF\com\google\android/updater-script
BACKUP your device before you do this!
NOTICE: flash the stock boot.img and Gapps to get this rom fully working.
You may find the needed files in post 1.
Click to expand...
Click to collapse
i really do, copy and paste the text of the script on the file in the .zip file but when flash its show the same erro my device is a L-03
j3cnfa said:
what happen if somethig go wrong?
Click to expand...
Click to collapse
Your device won't boot anymore. You can restore your device while holding vol+ and vol- while do fastboot boot recovery-stock.img
You need to have dload/UPDATE.APP on your sdcard. This is a stock firmware package. You should have it ready for your device. Important. You need to have extracted your Stock recovery from UPDATE.APP.
So your device will switch to completely stock. But the Bootloader will be remains unlocked.
Runner85sx said:
What exactly is your devices?
Click to expand...
Click to collapse
Huawei y6
Scl-u31
The log is:
Installing zip file/external SD/cm.12
Checking for md5
Skipping md5
Detected filesystem ext4 for /dev/block/bootdevice/by-name/system
Patching system image unconditionally....
Detected filesystem ext4 for /dev/block/bootdevice/by-name/system
Script succeeded result was [0.200000 ]
Updating partition details...
Done....
Saber5311 said:
i do it and flash the rom but when i reboot system gonig to fastboot
please help
Click to expand...
Click to collapse
I think this is because your model is not referenced in the device tree blobs.
Can you upload your stock recovery or boot image so I can have a look?
As a possible temporary fix I can repack the boot image with your stock kernel and DT blobs however there is no guarantee this will work.
DestructoSphere said:
I think this is because your model is not referenced in the device tree blobs.
Can you upload your stock recovery or boot image so I can have a look?
As a possible temporary fix I can repack the boot image with your stock kernel and DT blobs however there is no guarantee this will work.
Click to expand...
Click to collapse
I use TWRP 3.0.2-0.img recovery
---------- Post added at 08:10 PM ---------- Previous post was at 08:06 PM ----------
DestructoSphere said:
I think this is because your model is not referenced in the device tree blobs.
Can you upload your stock recovery or boot image so I can have a look?
As a possible temporary fix I can repack the boot image with your stock kernel and DT blobs however there is no guarantee this will work.
Click to expand...
Click to collapse
I tired I think not working for me

Need Help for OTA update after Root on Ulefone with Mediatek device

I have an Ulefone Armor 11 5G that I rooted with magisk and modded vb-meta. The telphone works fine, a couple of days ago I receive the info of an OTA update that will update my phone to the version available on the site, but even if I flash back again the original vbmeta and boot partition, it says that maps block doesn't match.
I read that updating the whole ROM using Mediatek software and scatter file will do a factory reset of my phone, is it true?
Is it possible to find what this OTA will change and only modifies this partition/files?
TIA
I was able to download the OTA package and I think the problem is that it want to patch the boot.img.
Can somebody help me to mod the update-binary script so that instead of patching boot.img it can install direct a magisk patched image?
Here is the script:
getprop("ro.product.device") == "Armor_11_5G" || abort("E3004: This package is for \"Armor_11_5G\" devices; this is a \"" + getprop("ro.product.device") + "\".");
ui_print("Source: Ulefone/Armor_11_5G_EEA/Armor_11_5G:10/QP1A.190711.020/1608088743:user/release-keys");
ui_print("Target: Ulefone/Armor_11_5G_EEA/Armor_11_5G:10/QP1A.190711.020/1608088743:user/release-keys");
ui_print("Verifying current system...");
getprop("ro.build.fingerprint") == "Ulefone/Armor_11_5G_EEA/Armor_11_5G:10/QP1A.190711.020/1608088743:user/release-keys" ||
getprop("ro.build.fingerprint") == "Ulefone/Armor_11_5G_EEA/Armor_11_5G:10/QP1A.190711.020/1608088743:user/release-keys" ||
abort("E3001: Package expects build fingerprint of Ulefone/Armor_11_5G_EEA/Armor_11_5G:10/QP1A.190711.020/1608088743:user/release-keys or Ulefone/Armor_11_5G_EEA/Armor_11_5G:10/QP1A.190711.020/1608088743:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
patch_partition_check("EMMC:/dev/block/by-name/boot:33554432:223ec34e2968174b6d3da29dac6f8a0bfcca5d0a",
"EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a") ||
abort("E3005: \"EMMC:/dev/block/by-name/boot:33554432:223ec34e2968174b6d3da29dac6f8a0bfcca5d0a\" or \"EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a\" has unexpected contents.");
apply_patch_space(56631296) || abort("E3006: Not enough free space on /cache to apply patches.");
patch_partition_check("EMMC:/dev/block/by-name/md1img:66856432:5521bd20270f93c39a09be3cbd530b9297c959b7",
"EMMC:/dev/block/by-name/md1img:66794448:86f1fe5a143a19caf7339b05bf06f139021a4bfe") ||
abort("E3005: \"EMMC:/dev/block/by-name/md1img:66856432:5521bd20270f93c39a09be3cbd530b9297c959b7\" or \"EMMC:/dev/block/by-name/md1img:66794448:86f1fe5a143a19caf7339b05bf06f139021a4bfe\" has unexpected contents.");
apply_patch_space(66856432) || abort("E3006: Not enough free space on /cache to apply patches.");
if (range_sha1(map_partition("system"), "24,1,153,169,180,196,197,208,32770,32865,98306,98401,163842,163937,229378,229473,294914,295009,360480,360491,389561,390752,396945,397037,397038") == "656b63aa2bc44a7f7d7bf43bf9543f2efa3b3786" || block_image_verify(map_partition("system"), package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat")) then
ui_print("Verified system image...");
else
check_first_block(map_partition("system"));
ifelse (block_image_recover(map_partition("system"), "24,1,153,169,180,196,197,208,32770,32865,98306,98401,163842,163937,229378,229473,294914,295009,360480,360491,389561,390752,396945,397037,397038") && block_image_verify(map_partition("system"), package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat"), ui_print("system recovered successfully."), abort("E1004: system partition fails to recover"));
endif;
if (range_sha1(map_partition("vendor"), "62,1,75,612,618,635,636,657,900,1003,1005,1027,1028,3054,3055,14771,15407,16890,16902,16903,16905,16939,16990,17071,17072,17464,17465,17676,17677,17767,17914,27263,27769,27963,27964,28426,28427,29633,29647,29993,29994,30275,30939,31133,31134,32768,32770,32804,32844,49027,49109,51061,51062,53969,98306,98340,131101,131103,139062,139494,141707,141751,141752") == "34846d8a2c7977538dadd1efb5d91f9966e9063e" || block_image_verify(map_partition("vendor"), package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat")) then
ui_print("Verified vendor image...");
else
check_first_block(map_partition("vendor"));
ifelse (block_image_recover(map_partition("vendor"), "62,1,75,612,618,635,636,657,900,1003,1005,1027,1028,3054,3055,14771,15407,16890,16902,16903,16905,16939,16990,17071,17072,17464,17465,17676,17677,17767,17914,27263,27769,27963,27964,28426,28427,29633,29647,29993,29994,30275,30939,31133,31134,32768,32770,32804,32844,49027,49109,51061,51062,53969,98306,98340,131101,131103,139062,139494,141707,141751,141752") && block_image_verify(map_partition("vendor"), package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat"), ui_print("vendor recovered successfully."), abort("E2004: vendor partition fails to recover"));
endif;
if (range_sha1(map_partition("product"), "352,1,110,5400,5404,8920,8921,13665,13669,16029,16032,18403,18404,25978,25979,27629,27633,31435,31436,32768,32770,32864,32870,38451,38452,39987,39991,42358,42798,42806,42807,48833,48837,53149,53150,53167,53171,53175,53176,53540,53544,54051,54052,54064,54068,54072,54073,60966,60967,61368,61372,62361,62362,62386,62390,62394,62395,62825,62829,62840,62841,64225,64229,64238,64239,65536,65542,67890,67891,68448,68450,69131,69132,69139,69143,71742,71743,78908,78909,86959,86963,89303,89304,98304,98306,98400,98406,100737,100738,101368,101372,111609,111610,111616,111617,119066,119067,125174,125178,130798,130799,130805,130808,130835,130839,130843,130844,130896,130900,130905,130906,130948,130952,130956,130957,131035,131039,131045,131046,131050,131054,131058,131059,131072,131078,140822,140826,140832,140833,152040,152041,159105,159109,163840,163842,163936,163942,164963,164964,165345,165349,165359,165360,180526,180530,180534,180537,180541,180542,185942,185946,190096,190097,196608,196614,206493,206494,208761,208765,209526,209529,210295,210296,215527,215528,216770,216774,220759,220760,227143,227144,229376,229378,229472,229478,234350,234354,240108,240111,245871,245876,250032,250034,250042,250043,250044,250045,250063,250064,250065,250066,250072,250073,250111,250115,250120,250123,250128,250129,250340,250341,250433,250436,250536,250538,250541,250542,250545,250546,250549,250550,250553,250554,250557,250558,250561,250562,250565,250566,250571,250572,250577,250578,250583,250584,250607,250608,250628,250629,250635,250636,250656,250657,250673,250674,250680,250681,250698,250699,250705,250706,250725,250726,250741,250742,250747,250748,250766,250767,250773,250774,250794,250795,250811,250812,250815,250816,250819,250820,250823,250824,250827,250828,250831,250832,250835,250836,250840,250841,250845,250846,250850,250851,250858,251115,251410,251414,251424,251425,251805,251809,251819,251820,255667,255668,255986,255990,256071,256072,257390,257394,257431,257432,257456,257460,257464,257465,258997,259003,259032,259033,262144,262150,263001,263005,263089,263090,279472,279473,285921,285923,288682,288686,288732,288736,289137,289140,289545,289546,289717,289721,289728,289729,289769,289773,289778,289779,289915,289919,289927,289928,291176,291180,291209,291210,292259,292263,292272,292273,292337,292341,292345,294914,295008,327681,327686,360449,360454,386405,387571,393713,393805,393806") == "52984c63abc36a83819c139fa911df1f51ce3922" || block_image_verify(map_partition("product"), package_extract_file("product.transfer.list"), "product.new.dat", "product.patch.dat")) then
ui_print("Verified product image...");
else
ifelse (block_image_recover(map_partition("product"), "352,1,110,5400,5404,8920,8921,13665,13669,16029,16032,18403,18404,25978,25979,27629,27633,31435,31436,32768,32770,32864,32870,38451,38452,39987,39991,42358,42798,42806,42807,48833,48837,53149,53150,53167,53171,53175,53176,53540,53544,54051,54052,54064,54068,54072,54073,60966,60967,61368,61372,62361,62362,62386,62390,62394,62395,62825,62829,62840,62841,64225,64229,64238,64239,65536,65542,67890,67891,68448,68450,69131,69132,69139,69143,71742,71743,78908,78909,86959,86963,89303,89304,98304,98306,98400,98406,100737,100738,101368,101372,111609,111610,111616,111617,119066,119067,125174,125178,130798,130799,130805,130808,130835,130839,130843,130844,130896,130900,130905,130906,130948,130952,130956,130957,131035,131039,131045,131046,131050,131054,131058,131059,131072,131078,140822,140826,140832,140833,152040,152041,159105,159109,163840,163842,163936,163942,164963,164964,165345,165349,165359,165360,180526,180530,180534,180537,180541,180542,185942,185946,190096,190097,196608,196614,206493,206494,208761,208765,209526,209529,210295,210296,215527,215528,216770,216774,220759,220760,227143,227144,229376,229378,229472,229478,234350,234354,240108,240111,245871,245876,250032,250034,250042,250043,250044,250045,250063,250064,250065,250066,250072,250073,250111,250115,250120,250123,250128,250129,250340,250341,250433,250436,250536,250538,250541,250542,250545,250546,250549,250550,250553,250554,250557,250558,250561,250562,250565,250566,250571,250572,250577,250578,250583,250584,250607,250608,250628,250629,250635,250636,250656,250657,250673,250674,250680,250681,250698,250699,250705,250706,250725,250726,250741,250742,250747,250748,250766,250767,250773,250774,250794,250795,250811,250812,250815,250816,250819,250820,250823,250824,250827,250828,250831,250832,250835,250836,250840,250841,250845,250846,250850,250851,250858,251115,251410,251414,251424,251425,251805,251809,251819,251820,255667,255668,255986,255990,256071,256072,257390,257394,257431,257432,257456,257460,257464,257465,258997,259003,259032,259033,262144,262150,263001,263005,263089,263090,279472,279473,285921,285923,288682,288686,288732,288736,289137,289140,289545,289546,289717,289721,289728,289729,289769,289773,289778,289779,289915,289919,289927,289928,291176,291180,291209,291210,292259,292263,292272,292273,292337,292341,292345,294914,295008,327681,327686,360449,360454,386405,387571,393713,393805,393806") && block_image_verify(map_partition("product"), package_extract_file("product.transfer.list"), "product.new.dat", "product.patch.dat"), ui_print("product recovered successfully."), abort("E2004: product partition fails to recover"));
endif;
# ---- start making changes here ----
# --- Start patching dynamic partitions ---
# Update dynamic partition metadata
assert(update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list")));
# Patch partition product
ui_print("Patching product image after verification.");
block_image_update(map_partition("product"), package_extract_file("product.transfer.list"), "product.new.dat", "product.patch.dat") ||
abort("E2001: Failed to update product image.");
# Patch partition vendor
ui_print("Patching vendor image after verification.");
show_progress(0.100000, 0);
block_image_update(map_partition("vendor"), package_extract_file("vendor.transfer.list"), "vendor.new.dat", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
# Patch partition system
ui_print("Patching system image after verification.");
show_progress(0.800000, 0);
block_image_update(map_partition("system"), package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
# --- End patching dynamic partitions ---
ui_print("Patching boot image...");
show_progress(0.100000, 10);
patch_partition("EMMC:/dev/block/by-name/boot:33554432:223ec34e2968174b6d3da29dac6f8a0bfcca5d0a",
"EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a",
package_extract_file("boot.img.p")) ||
abort("E3008: Failed to apply patch to EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a");
show_mtupdate_stage("/cache/recovery/last_mtupdate_stage");
ifelse (
less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "1") ,
(
ui_print("start to update general image");
package_extract_file("pi_img.img", "/dev/block/by-name/pi_img");
package_extract_file("cam_vpu3.img", "/dev/block/by-name/cam_vpu3");
package_extract_file("dtbo.img", "/dev/block/by-name/dtbo");
package_extract_file("vbmeta_system.img", "/dev/block/by-name/vbmeta_system");
package_extract_file("vbmeta_vendor.img", "/dev/block/by-name/vbmeta_vendor");
package_extract_file("cam_vpu2.img", "/dev/block/by-name/cam_vpu2");
package_extract_file("cam_vpu1.img", "/dev/block/by-name/cam_vpu1");
ui_print("Patching md1img image...");
show_progress(0.100000, 10);
patch_partition("EMMC:/dev/block/by-name/md1img:66856432:5521bd20270f93c39a09be3cbd530b9297c959b7",
"EMMC:/dev/block/by-name/md1img:66794448:86f1fe5a143a19caf7339b05bf06f139021a4bfe",
package_extract_file("patch/md1img.img.p")) ||
abort("E3008: Failed to apply patch to EMMC:/dev/block/by-name/md1img:66794448:86f1fe5a143a19caf7339b05bf06f139021a4bfe");
package_extract_file("spmfw.img", "/dev/block/by-name/spmfw");
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "1");
),
ui_print("general images are already updated");
);
ifelse (
less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "3") ,
(
if less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "2") then
ui_print("start to update alt loader image");
package_extract_file("sspm.img", "/dev/block/by-name/sspm_2");
package_extract_file("tee.img", "/dev/block/by-name/tee2");
package_extract_file("scp.img", "/dev/block/by-name/scp2");
package_extract_file("mcupm.img", "/dev/block/by-name/mcupm_2");
package_extract_file("lk.img", "/dev/block/by-name/lk2");
package_extract_file("dpm.img", "/dev/block/by-name/dpm_2");
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "2");
endif;
switch_active("sspm_1", "sspm_2");
switch_active("tee1", "tee2");
switch_active("scp1", "scp2");
switch_active("mcupm_1", "mcupm_2");
switch_active("lk", "lk2");
switch_active("dpm_1", "dpm_2");
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "3");
),
ui_print("alt loder images are already updated");
);
ifelse (
less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "5") ,
(
if less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "4") then
ui_print("start to update main loader image");
package_extract_file("sspm.img", "/dev/block/by-name/sspm_1");
package_extract_file("tee.img", "/dev/block/by-name/tee1");
package_extract_file("scp.img", "/dev/block/by-name/scp1");
package_extract_file("mcupm.img", "/dev/block/by-name/mcupm_1");
package_extract_file("lk.img", "/dev/block/by-name/lk");
package_extract_file("dpm.img", "/dev/block/by-name/dpm_1");
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "4");
endif;
switch_active("sspm_2", "sspm_1");
switch_active("tee2", "tee1");
switch_active("scp2", "scp1");
switch_active("mcupm_2", "mcupm_1");
switch_active("lk2", "lk");
switch_active("dpm_2", "dpm_1");
),
ui_print("main loader images are already updated");
);
delete("/cache/recovery/last_mtupdate_stage");
package_extract_file("vbmeta.img", "/dev/block/by-name/vbmeta");
post_ota_action();
set_progress(1.000000);
Click to expand...
Click to collapse
In bold Are the parts that I think should be modded.
Thanks
P.S.
If I remove:
patch_partition_check("EMMC:/dev/block/by-name/boot:33554432:223ec34e2968174b6d3da29dac6f8a0bfcca5d0a",
"EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a") ||
abort("E3005: \"EMMC:/dev/block/by-name/boot:33554432:223ec34e2968174b6d3da29dac6f8a0bfcca5d0a\" or \"EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a\" has unexpected contents.");
apply_patch_space(56631296) || abort("E3006: Not enough free space on /cache to apply patches.");
Click to expand...
Click to collapse
and I change
ui_print("Patching boot image...");
show_progress(0.100000, 10);
patch_partition("EMMC:/dev/block/by-name/boot:33554432:223ec34e2968174b6d3da29dac6f8a0bfcca5d0a",
"EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a",
package_extract_file("boot.img.p")) ||
abort("E3008: Failed to apply patch to EMMC:/dev/block/by-name/boot:33554432:4cecdfac1f170168f75e6d211bf6183bccc2c87a");
show_mtupdate_stage("/cache/recovery/last_mtupdate_stage");
ifelse (
less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "1") ,
(
Click to expand...
Click to collapse
with
ui_print("start to update boot image");
package_extract_file("boot.img", "/dev/block/by-name/boot");
Click to expand...
Click to collapse
updating the right file in update.zip package it should work, am I wrong?
If I repack teh official recovery of the Ulefone without otacerts.zip would it me allow to sideload the update even if is not signed?
A big ;art of me wishes that I could just understand what you are saying and help you with the code changes that you have listed above. I don't have a clue if you have made the correct alterations and I won't even start to pretend I am proficient with rooting. This will be my 6th root and very much my most successful and the smoothest of all. When the OTA update came along I spent a whole night, right from sundown to sunup, looking for the answer that most made sense to me and/or didn't leave me having to download my backup again. After painful amounts of wasted time I took a chance and will say I have successfully updated and have root and nothing else on my phone was altered. I'm not used to being the person who is responsible for posting a-guide-to-what-they-did but I am thrilled to help right now and maybe this will see the eyes of a rare Ulefone Armor 11 5G owner:
- I made sure my phone was backed-up
- Also made sure I had lots of charge (over %50 will suffice)
- (optional and unnecessary) I downloaded the update but didn't allow it to install so I could find the files as I thought I would need to get a boot.img and alter it with Magisk but that was not correct. If you want to find those files I'd have to look again, feel free to ask me for that
- Downloaded the latest official ROM from the Ulefone website (which at the time didn't match the newest OTA update)
- Modified boot.img in magisk
- Moved that file to my laptop
- Removed Magisk
- Flashed the system files from the Official ROM with fastboot
- (if you have the update files) Flash them in fastboot
- If you want to save time just forget that last one and just boot into your phone and update as normal
- When the update is complete made sure to let the OS boot up
- Flashed that file from the other post (I'll find the name)
- Flashed the modified Magisk
- That was it, it worked!
Hope that helps you or someone else
So a small update.
Repacking the recovery without otacert doesn't work, becuase while sideloading it was looking for otacert.
I repack again the official recovery using Carliv image Kitchen for Android and changed the releasekey with the test key that I found in sign-em-anywhere 3.0. Once I did it I flashed the new recovery in my phone.
After that I signed my modded update.zip with MinSignApk.
Now when I launch from recovery adb sideload the process start without showing problem about the signature, but it still stops with an error
Target: Ulefone/Armor_11_5G_EEA/Armor_11_5G: 10/QP1A.190711.020/1608088743:user/release-keys
Verifying current system...
Device was remounted R/W 8 times Last remount happened on Wed Jun 2 11:01:04 2021
unable to use metadata to crrect errors
E1004: system partition fails to recover
E:Error in /sideload/package.zip (status 7)
Install from ADB completed with status 1.
Installation aborted.
E: Fota installation aborted.
E: No such file or directory
E: Fota installation aborted.
E:: Bad file descriptor
Click to expand...
Click to collapse
Can somebody understand where is the problem?
TIA

Categories

Resources