[Q][AnyKernel] E:Error in /sdcard/anykernel.zip (Status 0) - Acer Iconia A500

Hi all,
since I did not get any replies to my thread about compiling modules for the kernel (see http://forum.xda-developers.com/showthread.php?t=1295925), I decided to try and compile the whole kernel instead.
I run the tablet with 3.2 with root and ClockworkMod Recovery 1.3.4. I downloaded the kernel source from Acer's website, pulled the config from device, enabled the functionality I wanted and compiled the kernel into the zImage.
Then, I took Anykernel for eMMc devices from here: http://forum.xda-developers.com/showthread.php?t=847265
Next, I placed my zImage in the anykernel zip, changed the boot mount point from
/dev/block/mmcblk0p22 to /dev/block/mmcblk0p2 and removed the references to the system folder. Finally, my updater script looks like this:
Code:
ui_print(" ");
ui_print("AnyKernel Updater by Koush");
ui_print("Fixed For eMMC By Bumble-Bee");
ui_print(" ");
ui_print("Extracting System Files...");
set_progress(1.000000);
ui_print("Extracting Kernel files...");
package_extract_dir("kernel", "/tmp");
ui_print("Installing kernel...");
set_perm(0, 0, 0777, "/tmp/dd");
set_perm(0, 0, 0777, "/tmp/mkbootimg.sh");
set_perm(0, 0, 0777, "/tmp/mkbootimg");
set_perm(0, 0, 0777, "/tmp/unpackbootimg");
ui_print("Repack Kernel Files...");
run_program(/tmp/dd", "if=/dev/block/mmcblk0p2", "of=/tmp/boot.img");;
run_program("/tmp/unpackbootimg", "/tmp/boot.img", "/tmp/");
run_program("/tmp/mkbootimg.sh");
ui_print("Flashing boot.img ...");
assert(write_raw_image("/tmp/newboot.img", "boot"),
delete("/tmp/boot.img"));
ui_print(" ");
ui_print("Done! :D");
However, when I try to apply the update in ClockworkMod I get the following error:
Code:
Finding update package...
Opening update package...
Installing update...
E:Error in /sdcard/anykernel.zip
(Status 0)
Installation aborted.
I tried changing /tmp to /sdcard/temporary but it did not help.
I assume many of you played with the Anykernel package. What do I do wrong, what should I fix? I have been struggling with this for a long time, any help will be highly appreciated.

I thought that maybe the update-binary should be different for Honeycomb so I replaced the one from AnyKernel with the one taken from here:
http://forum.xda-developers.com/showthread.php?t=1138051
Now I don't get the error, but it still says installation aborted. Any ideas?

Related

[TUTORIAL] How to create an CWM installable .zip (Mod)

Hey guys, made an tutorial on how to make an CWM installable .zip
Requirements
Notepad++
An CWM/Feamod installable .zip for your device
Instructions:
1. Get yourself an CWM installable .zip for your device.
2. Extract the .zip
3. Go into the META-INF folder, delete CERT.RSA, CERT.SF and MANIFEST.MF.
4. go to META-INF/com/google/android
5. Right-Click on updater-script and select Notepad++
6. You see an script. Edit it. If you want to extract the folder (zip)/system/media/audio/ui use this script:
Code:
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
ui_print("text"); means the text shown when you install the .zip in CWM.
run_program("text"); means that CWM runs a program
delete("/system"); means that you delete /system
package_extract_dir("framework", "/system/etc"); means that the files in /system/framework are extracted in /system/etc (on the device)
Make the script. My script for my iPhone Sounds is
ui_print("iPhone-Sounds by FlorisNL");
Code:
show_progress(1.000000, 0);
mount("ext4", "/dev/block/mmcblk0p15", "/system");
set_progress(0.400000);
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
When your done, create an .zip with 7z. and test it. If you still got problems, feel free to post it in this topic.
(Sorry for my poor english sometimes ;p)
Floris
No need to make CWM flashable mod for audio files.
Put ogg/m4a/mp3 files in
sdcard/Alarms
sdcard/Notifications
sdcard/Ringtones
Reboot and media scanner will make them available in Settings > Sounds.
sdcard/Ringtones/.nomedia <- (0 size file)
Reboot and media scanner skip the folder sdcard/Ringtones
But I want to know. And im not porting ringtones only but also lock sounds, camera shutter sound, etc.
Sent from my GT-I9001 using xda premium
Then you must promise not to include aiPhaun sounds... :*
I don't want to be held responsible for distributing that to Android platform :\
O-T said:
Then you must promise not to include aiPhaun sounds... :*
I don't want to be held responsible for distributing that to Android platform :\
Click to expand...
Click to collapse
Lol ok, it was just an idea. I just like the shutter sound and the lock sounds of the iphone but I prefer Android.
Just take a normal zip for your device, extract it, look at the file in META-INF\com\google\android --> updater-script (edit only with notepad++ under windows os, otherwise with normal notepad or other software the line endings might get converted from UNIX style to windows style which will not work!)
Files to be copied will most likely be in a folder structure like \system\YourFile.
Be sure to remove in \META-INF files CERT.RSA, CERT.SF and MANIFEST.MF.
Those are the files that gurantee the file is correct and integer ("signed zip") will become invalid after repacking.
Then pack everything with 7zip (with format .zip and lightest compression) and make sure that when you open up your zip META-INF is in the zip root.
More information on updater-scripts can be found on XDA or google with search for edify script.
What do you exactly mean with a zip for your device? Another mod?
Sent from my GT-I9001 using xda premium
Yes. For example, this is the start of crybert's AIO package script for 9001.
Code:
ui_print(" AIO - Package v1 by crybert ");
ui_print("**********************************");
ui_print(" root ");
ui_print(" busybox ");
ui_print(" init.d ");
ui_print(" custom bootanimation ");
ui_print(" FeaModRecovery 1.4 ");
ui_print("**********************************");
ui_print(" Credits: ");
ui_print(" manveru0 - FeaModRecovery ");
ui_print(" KeksKlip - Root ");
ui_print(" ");
ui_print("**********************************");
show_progress(1.000000, 0);
ui_print("Preparing device");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
set_progress(0.200000);
ui_print("Activating SuperUser");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.400000);
wintel_mac said:
Yes. For example, this is the start of crybert's AIO package script for 9001.
Code:
ui_print(" AIO - Package v1 by crybert ");
ui_print("**********************************");
ui_print(" root ");
ui_print(" busybox ");
ui_print(" init.d ");
ui_print(" custom bootanimation ");
ui_print(" FeaModRecovery 1.4 ");
ui_print("**********************************");
ui_print(" Credits: ");
ui_print(" manveru0 - FeaModRecovery ");
ui_print(" KeksKlip - Root ");
ui_print(" ");
ui_print("**********************************");
show_progress(1.000000, 0);
ui_print("Preparing device");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
set_progress(0.200000);
ui_print("Activating SuperUser");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.400000);
Click to expand...
Click to collapse
This is my script how it's now. It is installing but its not replacing the Lock.ogg - Unlock.ogg - TW_Unlock.ogg files... Can you help me?
Code:
ui_print("iPhone-Sounds by FlorisNL");
show_progress(1.000000, 0);
mount("MTD", "/system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.400000);
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system/media/audio/ui");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
My Folder:
Code:
system/media/audio/ui/Lock.ogg TW_Unlock.ogg Unlock.ogg
Code:
META-INF/com/google/android/updater-binary and updater-script
Mount command seems wrong.
Sent from my GT-I9001 using XDA App
FlorisNL said:
This is my script how it's now. It is installing but its not replacing the Lock.ogg - Unlock.ogg - TW_Unlock.ogg files... Can you help me?
Code:
ui_print("iPhone-Sounds by FlorisNL");
show_progress(1.000000, 0);
mount("MTD", "/system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.400000);
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);
unmount("/system/media/audio/ui");
set_progress(0.900000);
ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
My Folder:
Code:
system/media/audio/ui/Lock.ogg TW_Unlock.ogg Unlock.ogg
Code:
META-INF/com/google/android/updater-binary and updater-script
Click to expand...
Click to collapse
Folders are ok.
script:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
All the rest is unneeded ui stuff. Nice to look at, not necessary...
Thank you so much! I did it http://forum.xda-developers.com/showthread.php?t=1502660 here is the result so far
Sent from my GT-I9001
Hi Floris,
Thanks for changing this into a tut, good job!
Regards,
Nika.
And be sure if you extracted the zip to a directory, when you zip back, zip what's INSIDE the folder and not the folder... yeah, I did that...
The updater-script must also be in UNIX format (definitely, but that mistake I didn't make... )
With CWM 6.0.4.4 you can zip with the "Ultra" compression in 7-zip and CWM will manage to open it.
Hi, can anyone help me with this
trying to create own package which CWM still fails to install
gives error E: failed to open update.zip (bad)
Aborted
Q1: Am I require to use 7zip and lightest compression?
Q2: what actually does the mount("ext4", "...) command do and is it required to use?
Q3: if I want to put custom apk file into /system/app/ and set rw-r-r permissions for it, which command do I use?
bflmpsvz said:
Hi, can anyone help me with this
trying to create own package which CWM still fails to install
gives error E: failed to open update.zip (bad)
Aborted
Q1: Am I require to use 7zip and lightest compression?
Q2: what actually does the mount("ext4", "...) command do and is it required to use?
Q3: if I want to put custom apk file into /system/app/ and set rw-r-r permissions for it, which command do I use?
Click to expand...
Click to collapse
A1: I always just zipped it, never looked at the compression quality. Just make sure to make a ZIP and not RAR or 7Z
A2: It mounts your system so you can write to it. Make sure to use an example mount command from a working ZIP of someone else for your specific device. The mount command is different in every device. On some recoveries with rooted ROMs you can use:
Code:
run_program("/sbin/busybox", "mount", "/system");
A3: For instance something like this:
Code:
show_progress(1.000000, 0);
ui_print(" Mounting SYSTEM...");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.100000);
ui_print(" Extracting files to SYSTEM...");
package_extract_dir("system", "/system");
set_progress(0.400000);
ui_print(" Setting /system/app/NAME.apk permission to 644...");
set_perm(0, 0, 644, "/system/app/NAME.apk");
set_progress(0.600000);
ui_print(" Unmounting SYSTEM...");
unmount("/system");
set_progress(0.900000);
ui_print("Install complete...");
set_progress(1.000000);
Why not use ADB for something like this (from your PC)?
Code:
adb remount
adb push NAME.apk_here /system/app/
adb shell chmod 644 /system/app/NAME.apk
adb reboot
Regards,
Nika.
Nice. I've found the error source - some files names had international accents. Now install passes to the end.
But another problem I have is that my files aren't mirrored into system.
Is package_extract_dir("system", "/system") recursive or do I have process every nested folder in it for extraction?
system\fonts
system\media\audio\alarms
system\media\audio\notifications
system\media\audio\ringtones
system\etc
system\bin
system\app
My script
Code:
ui_print("Integrating own fonts, sounds and customizations into system");
show_progress(1.000000, 0);
set_progress(0.000000);
package_extract_dir("system", "/system");
set_progress(1.000000);
ui_print("Installed custom files. Enjoy.");
Finishes successfully but when I boot into OS, the files aren't in place, and I install this zip as last package.
Looks to me like you're not mounting system. It therefore cannot add the files. Yes, with package_extract_dir it recursively extracts all files...
Verstuurd vanaf mijn E380 met Tapatalk
---------- Post added at 07:56 PM ---------- Previous post was at 07:52 PM ----------
BTW, in most cwm you can also mount system from the menu. Try that first and then run your script. Again, mounting system is required when you want to copy file to it. Figure out what command to use for your specific rom... Possibly also checkout how they do it for gapps and other generic installable zips...
Verstuurd vanaf mijn E380 met Tapatalk

[Q]Modding the SU Binary Flashable for CM7

Hi Guys, for starters I have a CM7 Mirage-kang Build for NC, now been having some issues with Superuser lately and found out that it has problems with the SU Binary, so I went to their website and downloaded the SU Binary Flashables from 3.0.3.2 to the latest 3.1.1 and went ahead and checked the zips before flashing.
While checking the updater script of SU Binary I found out that it puts the SU Binary into "/system/bin" rather that "/system/xbin". So went ahead and edited the Flashable in order for the SU Binary to be put into "/system/xbin".
Now question is do I still need to do a symlink from "/system/xbin" to "/system/bin" for CM7? Because I'm not sure how CM handles App request for the Su Binary.
Posted here is the original and my edited updater script of Su Binary 3.0.3.2.
Original Code:
Code:
ui_print("***********************************************");
ui_print(" su binary 3.0.3.2 for Android 2.0-3.2");
ui_print("***********************************************");
show_progress(1.000000, 0);
ui_print(" Mounting SYSTEM...");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.100000);
ui_print(" Deleting SYSTEM:bin/su...");
delete("/system/bin/su");
set_progress(0.200000);
ui_print(" Deleting SYSTEM:xbin/su...");
delete("/system/xbin/su");
set_progress(0.300000);
ui_print(" Extracting files to SYSTEM...");
package_extract_dir("system", "/system");
set_progress(0.400000);
ui_print(" Setting SYSTEM:bin/su permissions to 06755...");
set_perm(0, 0, 06755, "/system/bin/su");
set_progress(0.500000);
ui_print(" Creating SYSTEM:xbin/su symbolic link...");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.600000);
ui_print(" Unmounting SYSTEM...");
unmount("/system");
set_progress(0.900000);
ui_print("Install complete. Enjoy!");
set_progress(1.000000);
Edited Code:
Code:
ui_print("***********************************************");
ui_print(" su binary 3.0.3.2 for Android 2.0-3.2");
ui_print("***********************************************");
show_progress(1.000000, 0);
ui_print(" Mounting SYSTEM...");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.100000);
ui_print(" Deleting SYSTEM:bin/su...");
delete("/system/bin/su");
set_progress(0.200000);
ui_print(" Deleting SYSTEM:xbin/su...");
delete("/system/xbin/su");
set_progress(0.300000);
ui_print(" Extracting files to SYSTEM...");
package_extract_dir("system", "/system");
set_progress(0.400000);
ui_print(" Setting SYSTEM:xbin/su permissions to 06755...");
set_perm(0, 0, 06755, "/system/xbin/su");
set_progress(0.500000);
ui_print(" Creating SYSTEM:bin/su symbolic link...");
symlink("/system/xbin/su", "/system/bin/su");
set_progress(0.600000);
ui_print(" Unmounting SYSTEM...");
unmount("/system");
set_progress(0.900000);
ui_print("Install complete. Enjoy!");
set_progress(1.000000);
Credit:
Thanks to ChainsDD for providg FAQs and Flashable Zips for SU Binaries.
UPDATE
Turns out CM7 doesn't have symlinks for SU Binary in "/system/bin/" so don't need one.

[Q] whats wrong whit this updater-script ??!!

mmm helllo all , i make cwm flashable for SGY , instaling is succsess , but some app not add on the system
this script-updater on META-INF
ui_print("Instaling Now");
ui_print(" ");
ui_print("Installing Amarullz Modification And zRAM");
ui_print(" ");
ui_print("-----Denny-----");
ui_print(" ");
show_progress(0.100000, 0);
package_extract_dir("system", "/system");
set_perm(0, 0, 0777, "/system/etc/init.d/40ad2sdx");
set_perm(0, 0, 0777, "/system/etc/init.d/90zram");
show_progress(0.1, 10);
ui_print("Installing BusyBox");
show_progress(0.2, 0);
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");
ui_print("Installing Root Explorer");
ui_print("Mount System");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.200000);
ui_print("Installing Now");
package_extract_dir("system", "/system");
set_progress(0.500000);
ui_print("Cleaning Up After Patching");
unmount("/system");
set_progress(0.800000);
ui_print("Finish Installing Root Explorer");
set_progress(1.000000);
ui_print("Installing White XP-Kernel");
show_progress(0.1, 10);
show_progress(0.2, 0);
set_progress(1.000000);
# copying files in ramdisk
package_extract_file("bmlunlock", "bmlunlock");
package_extract_file("boot.img", "boot.img");
set_perm(0, 0, 0755, "bmlunlock");
# mounting the sdcard
mount("vfat", "/dev/block/mmcblk0p1", "/sdcard", "rw");
ui_print("Flashing Boot.img");
# flashing
run_program("bmlunlock");
run_program("/system/bin/dd", "if=boot.img", "of=/dev/block/bml7");
show_progress(0.2, 10);
show_progress(0.100000, 0);
ui_print(" ");
ui_print("Create By Denny On (Temporary) Official Galaxy Young");
ui_print(" ");
ui_print("Installation Completed!!!!");
installation is complete , but when i go to menu there no root explorer , i include root explorer in my cwm flashable , the customrom i use is hyperion 7x , so what the problem in my cwm flashbale ??!!
and yes i am using notepad++
OK , i ask only 1 now
WHO ?? said:
mmm helllo all , i make cwm flashable for SGY , instaling is succsess , but some app not add on the system
this script-updater on META-INF
ui_print("Instaling Now");
ui_print(" ");
ui_print("Installing Amarullz Modification And zRAM");
ui_print(" ");
ui_print("-----Denny-----");
ui_print(" ");
show_progress(0.100000, 0);
package_extract_dir("system", "/system");
set_perm(0, 0, 0777, "/system/etc/init.d/40ad2sdx");
set_perm(0, 0, 0777, "/system/etc/init.d/90zram");
show_progress(0.1, 10);
ui_print("Installing BusyBox");
show_progress(0.2, 0);
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
package_extract_file("installbusybox", "/tmp/installbusybox");
set_perm(0, 0, 0777, "/tmp/installbusybox");
run_program("/tmp/installbusybox");
ui_print("Installing Root Explorer");
ui_print("Mount System");
run_program("/sbin/busybox", "mount", "/system");
set_progress(0.200000);
ui_print("Installing Now");
package_extract_dir("system", "/system");
set_progress(0.500000);
ui_print("Cleaning Up After Patching");
unmount("/system");
set_progress(0.800000);
ui_print("Finish Installing Root Explorer");
set_progress(1.000000);
ui_print("Installing White XP-Kernel");
show_progress(0.1, 10);
show_progress(0.2, 0);
set_progress(1.000000);
# copying files in ramdisk
package_extract_file("bmlunlock", "bmlunlock");
package_extract_file("boot.img", "boot.img");
set_perm(0, 0, 0755, "bmlunlock");
# mounting the sdcard
mount("vfat", "/dev/block/mmcblk0p1", "/sdcard", "rw");
ui_print("Flashing Boot.img");
# flashing
run_program("bmlunlock");
run_program("/system/bin/dd", "if=boot.img", "of=/dev/block/bml7");
show_progress(0.2, 10);
show_progress(0.100000, 0);
ui_print(" ");
ui_print("Create By Denny On (Temporary) Official Galaxy Young");
ui_print(" ");
ui_print("Installation Completed!!!!");
installation is complete , but when i go to menu there no root explorer , i include root explorer in my cwm flashable , the customrom i use is hyperion 7x , so what the problem in my cwm flashbale ??!!
and yes i am using notepad++
OK , i ask only 1 now
Click to expand...
Click to collapse
aww man , some user cant answer this question ??
Mount system
sent from the best fastest smoothest rom for sgy
---------- Post added at 06:40 PM ---------- Previous post was at 06:37 PM ----------
Btw wrong section i think
sent from the best fastest smoothest rom for sgy
Mount system at firsy
Sent from my cm_totoro using xda-premium
rmp07 said:
Mount system
sent from the best fastest smoothest rom for sgy
---------- Post added at 06:40 PM ---------- Previous post was at 06:37 PM ----------
Btw wrong section i think
sent from the best fastest smoothest rom for sgy
Click to expand...
Click to collapse
where wrong section ??
WHO ?? said:
aww man , some user cant answer this question ??
Click to expand...
Click to collapse
3 things...
1st.. root explorer is a wares if it is included in zip...
Seems you are adding your own.. so I wont talk about it..
2nd.. you have to mount system partition before flashing this zip file.. as you don't have mount command in script..
3rd.. are you sure you have Rex.apk file inside system folder in zip file? If not it won't work..
Also you need to use set permission command to set 644 on app...
____________________________________________
ಇದು ನನ್ನ ಆಪ್ ಸಿಗ್ನೇಚರ್
ΧΔΑ Fraternity: TOT Time! & IRC Info
Judge a man by his questions rather than his answers.
Deadly. said:
3 things...
1st.. root explorer is a wares if it is included in zip...
Seems you are adding your own.. so I wont talk about it..
2nd.. you have to mount system partition before flashing this zip file.. as you don't have mount command in script..
3rd.. are you sure you have Rex.apk file inside system folder in zip file? If not it won't work..
Also you need to use set permission command to set 644 on app...
____________________________________________
ಇದು ನನ್ನ ಆಪ್ ಸಿಗ್ನೇಚರ್
ΧΔΑ Fraternity: TOT Time! & IRC Info
Judge a man by his questions rather than his answers.
Click to expand...
Click to collapse
ok man , i will try now

Updater-script problems

hello all ive been working on my rom but i cant get it working in recovery it says the binary couldnt be read correctly, attached is my working folder zip from kitchen please help look into it i cant figure it out
Rename update-binary.orig to update-binary. That might be the issue mate!
Could you help me to check this problem? Thank you very much!
http://forum.xda-developers.com/showthread.php?t=2390510
Rahulrulez said:
Rename update-binary.orig to update-binary. That might be the issue mate!
Click to expand...
Click to collapse
Hi, I know this has nothing to do with what the OP asked on the thread, but it's related to Updater-Script so here goes:
I've notice a lot of people have been using delete_recursive instead of format command to wipe system.
Why is that? Is it safer to use delete_recursive? Because I'm using Android Kitchen and it creates an Updater-Script with format command.
It's the first time I'm using Android Kitchen though so I'm afraid of testing the zip I made before I'm sure it's safe to use format. Can somebody help me?
PS.: I didn't want to create another thread to ask this so I apologize in advance.
MaKTaiL said:
Hi, I know this has nothing to do with what the OP asked on the thread, but it's related to Updater-Script so here goes:
I've notice a lot of people have been using delete_recursive instead of format command to wipe system.
Why is that? Is it safer to use delete_recursive? Because I'm using Android Kitchen and it creates an Updater-Script with format command.
It's the first time I'm using Android Kitchen though so I'm afraid of testing the zip I made before I'm sure it's safe to use format. Can somebody help me?
PS.: I didn't want to create another thread to ask this so I apologize in advance.
Click to expand...
Click to collapse
It all started with mmc bug that has been presented by ICS source for GS2.
format() command was triggering hard brick.
You can find very good and full explanation of the bug in GS2 section of the forum but here is very short and simple explanation of the bug.
The MMC_CAP_ERASE command (part of format) was writing bunch of zeros in MMC killing the phone.
After kernel source was released we were able to disable that command and it became safer but some devs still use delete_recursive instead of format.
Both command do same and have pretty much same affect but delete_recursive might be few milliseconds slower than format()
Format command is formatting the partition where delete_recursive is deleting everything from partition (folders, subfolders, files etc) and then goes over the partition again to make sure nothing left behind (thus "recursive").
For new install format() command is cleaner, I think.
But if dev has modified his script at some point it will just keep using it till new modification is required. So there may be no need for delete_recursive any more but since it's in script and script is working no one is really looking into it.
Hope this make sense.
agat63 said:
It all started with mmc bug that has been presented by ICS source for GS2.
format() command was triggering hard brick.
You can find very good and full explanation of the bug in GS2 section of the forum but here is very short and simple explanation of the bug.
The MMC_CAP_ERASE command (part of format) was writing bunch of zeros in MMC killing the phone.
After kernel source was released we were able to disable that command and it became safer but some devs still use delete_recursive instead of format.
Both command do same and have pretty much same affect but delete_recursive might be few milliseconds slower than format()
Format command is formatting the partition where delete_recursive is deleting everything from partition (folders, subfolders, files etc) and then goes over the partition again to make sure nothing left behind (thus "recursive").
For new install format() command is cleaner, I think.
But if dev has modified his script at some point it will just keep using it till new modification is required. So there may be no need for delete_recursive any more but since it's in script and script is working no one is really looking into it.
Hope this make sense.
Click to expand...
Click to collapse
Thanks for reserving your time to answer me. Really appreciate it.
I came from a Galaxy S2 before the S4 and I'm aware of the MMC_CAP_ERASE problems.
I just didn't know it was caused by the format command. Thanks for explaining it to me.
I'll keep using delete_recursive from now on.
Here's my log...
Installing '/sdcard/GEM4.3_By:Joeyxc.zip'...
Checking for MD5 file...
I:Cannot find file /sdcard/GEM4.3_By:Joeyxc.zip.md5
Skipping MD5 check: no MD5 file found.
line 4 col 17: syntax error, unexpected STRING, expecting $end
line 5 col 19: syntax error, unexpected STRING, expecting ',' or ')'
2 parse errors
E:Error executing updater binary in zip '/sdcard/GEM4.3_By:Joeyxc.zip'
Error flashing zip '/sdcard/GEM4.3_By:Joeyxc.zip'
Updating partition details...
Please help
Sent from my SGH-I337 using Tapatalk 2
Joeyxc said:
hello all ive been working on my rom but i cant get it working in recovery it says the binary couldnt be read correctly, attached is my working folder zip from kitchen please help look into it i cant figure it out
Click to expand...
Click to collapse
The issue is the format the text is in. Also in addition to renaming update-binary.orig to update-binary, rename update-script to updater-script. Open the updater-script.orig with a text editor and look at the format and compare it to the text you have in 'update-script'. Change the format of the text in 'update-script' to match the format of 'updater-script.orig'. You should be able to notice right away that you will need to add parenthesis', semi-colons, and apostrophes as you are missing all of them. If you need more help let me know, I can look over/help you edit it.
Edit: Come to think about it, you just needed to convert update script to updater-script using kitchen.
Can I ask an updater-script related problem here please.
I write a few CWM utils (see my thread)
Some of these scripts perform a factory reset (wipe /data essentially)
On the GS2, this used to work great, but on the GS4, doing this also wipes the entire internal SD card!
I think this happening because there is a link to sd card in /data/media/0 perhaps.
My question is, how can I perform such a wipe of /data in the updater-script and keep internal SD Card in tact?
I've tried delete_recursive and format
But always, the script ends up wiping the entire SD card along with /data
example of commands I've been using in the updater-script are:
format("ext4", "EMMC", "/dev/block/mmcblk0p29", "0");
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/data");
delete_recursive("/data");
I've also tried unmounting /sdcard before attempting one of the above commands:
unmount("/sdcard");
run_program("/sbin/umount", "/sdcard");
(also tried both of these with /data/media/0)
both actually unmounted /sdcard (as I could no longer access it in recovery) but both the format and the delete_recursive command still managed to wipe the entire internal SD card.
If unmounted, I am then unable to get recovery to see the sdcard until the device is rebooted.
I've tried to remount the sdcard to get it back online for the current recovery session in the updater-script using:
mount("vfat", "EMMC", "/dev/block/mmcblk0p1", "/sdcard");
but this doesn't seem to work.
Any pointers or advice would be greatly appreciated as this has been driving me nuts! :silly:
:good:
FWIW, I had issues with data too, I was unable to restore shealth2 since it is preinstalled in /data/app and I would soft-brick everytime I tried flashing it until I finally used the script below with success.
unmount("/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p16", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
run_program("adb", "install", "-r", "added_files/system/app/HealthContentProvider.apk");
run_program("adb", "install", "-r", "added_files/system/app/SensorService.apk");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
run_program("adb", "install", "-r", "added_files/data/app/SHealth2.apk");
unmount("/system");
unmount("/data");
Sent from my TouchPad using xda app-developers app
Data wiping on S4:
Recent CWM versions have seemed to handle this without issue.
I'm still using my alpha CWM and it handles this case without a problem.
Are you using current recovery repos from CM as well as device repos?
Removed 3 posts as they are not development related.
Please - If you're just downloading/flashing a ROM, not developing or creating it - try that ROM's specific thread.
If one isn't there consider asking in the Q&A for that specific device.
hey guys i know it's been some time no one has replied to this thread, i hope someone can help though... Here is my issue, i am building my own rom from stock SGH-M919V (Galaxy S4..carrier Video Tron) rom using latest android kitchen, i have removed lots of bloatware, removed knox, deodexed the apps..etc.etc. I am ready to build the rom so i do that, then comes the time to flash the new rom created by android-kitchen i am using Philz Touch recovery latest, this is the error i get in recovery:
Code:
Installing update...
format() expects 5 args, got 4
E:Error in /storage/sdcard1/stock.zip
(Status 7)
Installation aborted.
some times i get...format() expects 3 args, got 4...if i try a different setting in recovery.
I know a lot of ppl had this issue before, i just cant find the solution for my phone, model, rom specifically.
Android Kitchen says it needs to convert the update-script to updater-script...so i do what it suggest...ive learn this was the issue i am having...can someone point to the right direction to fix this and to successfully flash my rom?
BTW this is the very first rom i try to bake so i am farely new to this. I would also like to remove the format() command and use delete_recursive() ..how do i implement it ? do i just rename the command ?.
THANKS ! :fingers-crossed:
I am making a rom in cwm but I always get the error status of 0 , help me fill in the updater script correctly?
This is the updater script made from cygwin:
Code:
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
format("MTD", "userdata");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/playback");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor/etc");
set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/firmware");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
show_progress(0.1, 10);
show_progress(0.2, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
show_progress(0.2, 10);
unmount("/system");
The rom is for s3 mini

Delete

Delete
remove these mate
http://prntscr.com/ghikhf
every permissions line, you have an extra " right before the first 0
they should look like:
Code:
set_perm(0, 0, 0777, "/system.su.d/50V4a");
You have:
Code:
set_perm("0, 0, 0777, "/system.su.d/50V4a");
kevp75 said:
remove these mate
http://prntscr.com/ghikhf
every permissions line, you have an extra " right before the first 0
they should look like:
You have:
Click to expand...
Click to collapse
Ah, thanks a ton man
Craz Basics said:
Ah, thanks a ton man
Click to expand...
Click to collapse
No prob mate.
LOL I went back to stock a couple weeks ago, and still have not rooted again... if that tells ya how busy I've been lately
kevp75 said:
No prob mate.
LOL I went back to stock a couple weeks ago, and still have not rooted again... if that tells ya how busy I've been lately
Click to expand...
Click to collapse
It does haha. I've been thinking about flashing stock lately but V4A and Xposed are too important
Edit: Didn't work removing those quotations :/
Craz Basics said:
It does haha. I've been thinking about flashing stock lately but V4A and Xposed are too important
Edit: Didn't work removing those quotations :/
Click to expand...
Click to collapse
hmm. ..
same errors?
ill take another peek tomorrow
kevp75 said:
hmm. ..
same errors?
ill take another peek tomorrow
Click to expand...
Click to collapse
Cool, thanks man. When I press the flash button at the end of the installer, it doesn't show anything in the box, but says successfull and askes if I wanna reboot... I tore apart your installer btw.
Try this mate:
Code:
ui_print(" ");
ui_print(" ---------------------------------------");
ui_print(" ---------------------------------------");
ui_print(" Flashing Viper4Android");
ui_print(" by Craz Basics");
ui_print(" ---------------------------------------");
ui_print(" ---------------------------------------");
sleep(1);
ui_print("@ Mounting Partitions ...");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/userdata", "/data");
sleep(1);
# VIPER
if
file_getprop("/tmp/aroma/dha.prop","selected.1") == "1"
then
ui_print("- Flashing V4A 2.3.4.0 ...");
package_extract_dir("2.3.4.0", "/system/priv-app");
set_perm(0, 0, 0777, "/system/priv-app/com.vipercn.viper4android_v2_fx-1/base.apk");
set_perm(0, 0, 0644, "/system/priv-app/com.vipercn.viper4android_v2_fx-1");
endif;
# VIPER1
if
file_getprop("/tmp/aroma/dha.prop","selected.1") == "2"
then
ui_print("- Flashing V4A 2.5.0.5 ...");
package_extract_dir("2.5.0.5", "/system/priv-app");
set_perm(0, 0, 0777, "/system/priv-app/com.vipercn.viper4android_v2_fx-1/base.apk");
set_perm(0, 0, 0644, "/system/priv-app/com.vipercn.viper4android_v2_fx-1");
endif;
# SELinux
if
file_getprop("/tmp/aroma/dvm.prop","selected.1") == "1"
then
ui_print("- Flashing TheSELinuxToggler ...");
package_extract_dir("data", "/data");
set_perm(0, 0, 0777, "/data/app/com.mrbimc.selinux-1/base.apk");
set_perm(0, 0, 0644, "/data/app/com.mrbimc.selinux-1");
endif;
# SELinux1
if
file_getprop("/tmp/aroma/dvm.prop","selected.1") == "2"
then
ui_print("- Permissive on boot via su.d ...");
package_extract_dir("system/su.d", "/system");
set_perm(0, 0, 0777, "/system/su.d");
set_perm(0, 0, 0777, "/system.su.d/50V4a");
endif;
# All set
run_program("/sbin/sync");
delete_recursive("/tmp");
unmount("/system");
unmount("/data");
ui_print(" ");
ui_print(" ---------------------------------------");
ui_print(" ---------------------------------------");
ui_print(" Installed!");
ui_print(" Reboot and Enjoy");
ui_print(" ---------------------------------------");
ui_print(" ---------------------------------------");
sleep(1);
Make sure that "data", "2.3.4.0", "2.5.0.5", and "system" directories are right in the root of your zip.
kevp75 said:
Try this mate:
Make sure that "data", "2.3.4.0", "2.5.0.5", and "system" directories are right in the root of your zip.
Click to expand...
Click to collapse
Will do, at soccer rn tho
i just noticed i got the permissions swapped.
should 0755 for the folder and 0644 for the .apk
kevp75 said:
i just noticed i got the permissions swapped.
should 0755 for the folder and 0644 for the .apk
Click to expand...
Click to collapse
It worked man, thanks a ton. Gonna finish editing it a bit and upload
How do I change the splash image? I've tried twice, I keep the same name as yours. I thought it was the file type so I made sure to use PNG and still just a black screen.

Categories

Resources