can someone smarter than me help me or point me in the right direction to convert my updater-scripts to edify. i think im sort of getting it but i want to make sure because i'm not a programmer. for instance, is the update-binary file required or just updater-script? also, the code posted below, it what i've come up with for flashing my themes, is it correct? and will it work with the new recoveries?
Code:
ui_print("Preparing system for istallation...");
ui_print("Wiping Cache / Dalvik...");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
ui_print("Installing Project_Bliss HD...");
show_progress(0.100000, 60);
package_extract_dir("system", "/system");
show_progress(1.000000, 0);
i am unsure whether or not i will have to mount the specific partitions for data and cache for this to work. i can always leave that part out but the less the person flashing needs to do the better. if i do have to mount in the script will the code below work for just a simple theme flash.
Code:
ui_print("Preparing system for installation...");
run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");
ui_print("Installing Project_Bliss HD...");
show_progress(0.100000, 60);
package_extract_dir("system", "/system");
show_progress(1.000000, 0);
Anyone?
10 char
No one? Hmmmm?
I'm also interested in the same topic..
trying to build rom with dsixida kitchen and converting it from update to updater scripts remove all ui_print functions...
If I add them manually then clockwork refuses to boot that image...
Ditto... same issue about the ui_print... don't get it, because after the update-script gets created to the updater-script/update-binary cant be changed.
try this
show_progress(0.500000, 20);
run_program("/sbin/mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(0.500000, 30);
ui_print("All done!");
It appears that the Shields "system" partition is located at the block device "mmcblk0p4" and is a EXT4 Filesystem. Knowing what very little I do know about the updater-script shell script that runs when flashing a ROM in CWM, I am under the impression that I could mount the "system" partition as follows:
format("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
and mount it with the following:
mount("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
Is that correct? Also, agrabren's Tweaker ROM updater-script was designed for system images, but even so, it seemed to follow a different syntax, as in:
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
if my code above was to be applied to the way he extracted the images to the corresponding block device.
Anyways, please if anybody knows, please tell me if any of those are correct, and if so, which one. I intend to make a CWM flashable ZIP of a 4.3 equivalent of my minisculeShield Nandroid backup, but need to figure this out before the ZIP will even work. Thanks
The only mount syntax that I found working on a Shield Tablet is ::
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
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