Streamline /data for System app symlinks - EVO 4G General

I just wanted to point something out now that there are quite a few different roms using larger then normal system partitions and offloading that data onto the data partition with symlinks. Here is only three examples:
Kingdom Rewind:
Code:
ui_print("Writing System...");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("/data/Rewind-System/system.app", "/system/app");
Kinged Kingdom and HateSLINGER:
Code:
ui_print("Writing System...");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("/data/King-System/system.app", "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/data/King-System/system.app");
Synergy Nightly:
Code:
ui_print("Writing System...");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("/data/Synergy-System/system.app", "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/data/Synergy-System/system.app");
Doing this is only making it more difficult for mods/themes/kernels. How about doing something more productive?
Code:
symlink("/data/Data-System/system.app", "/system/app");
If every Rom mod used a more universal system this would make it easier for updates/themes/mods/kernels to be used on these new and larger rom. Making less work and creating more productivity when working on things.
I get that its your rom, but does everyones symlinks need to be different? Now, since I started working on a kernel, I have to create an update.zip for each specific rom. Let's work together as a community and streamline this.

Amen, it would be nice. Not that I'm a dev or anything but what makes one devs life easier would obviously make others as well....

Related

Any tool or program to check the syntex of an update-script?

The title says it all. Im just wondering if theres a program or plugin or anything to let me check the update script without the hassle of putting it on the phone and trying to install it.
Thanks in advance
EDIT for MOAR info.
I just make simple boot animations. I pulled this script from a theme install, and it worked fine.
ui_print("YOU ARE INSTALLING A BIGDX SERENITY THEME");
mount("MTD", "system", "/system");
show_progress(0.500000, 40);
package_extract_dir("system", "/system");
show_progress(0.100000, 10);
mount("MTD", "sdcard", "/sdcard");
package_extract_dir("sdcard", "/sdcard");
unmount("/sdcard");
unmount("/system");
ui_print("INSTALL OF BIGDX THEME COMPLETE!");
I tried to change it to this
ui_print("YOU ARE INSTALLING A BOOT ANIMATION");
mount("MTD", "system", "/system");
show_progress(0.500000, 40);
package_extract_dir("system", "/system");
show_progress(0.100000, 10);
unmount("/system");
ui_print("INSTALL OF BOOT ANIMATION COMPLETE!")
And im not sure why but its giving me hell, and I just want a way to trial/error without having to zip it all back up and install it.
Also, do I have to include the updater-binary? Thaat came in the original theme install

[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

[GUIDE] Fix status 6 while flashing ROMs

I assume at least half of Android users get Error status 6 while flashing ROMs. This can be explained in 2 reasons.
Number 1:The developer of the ROM was too stupid to fix this mistake
Click to expand...
Click to collapse
or
Number 2: You are tying to port a ROM and those errors come to you
Click to expand...
Click to collapse
So lets start fixing.
Extract the ROM. Open META-INF com google android and open with Notepad++ updater-scipt.
Find the line called mount("ext4", "EMMC", "/dev/block/some kind of Letters and Numbers ", "/system");
This command is telling the device to mount the system from a path. Each device has a different path.
The path is those some kind of letters and numbers up bellow.
Those numbers and letters are different for every device.
So maybe the letters are not correct and it can't find the path to mount the data.
What we need to do is change the path. For the path that is for your device.
Easiest way to do this is to find a ROM meant and tested for your device, open updater-script, got to the same line and replace the path.
Example change mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system"); to mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
Click to expand...
Click to collapse
You may also find these two lines
format("ext4", "EMMC", "/dev/block/some kind of letters and numbers", "0", "/system");
mount("ext4", "EMMC", "/dev/block/some kind of letters and numbers", "/system");
The first line is telling the device to format the data.
The second line is telling the device to mount the data
The error is similar to the error up.
You need to change the path for the data
But the path for the data is different for the path for the system
So go to the same path on the ROM for your device and change the code
But remember the codes for the data and for the system are not the same.
Example Change format("ext4", "EMMC", "/dev/block/mmcblk0p29", "0", "/system"); and
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/system"); to format("ext4", "EMMC", "/dev/block/mmcblk0p20", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p20", "/system");
Click to expand...
Click to collapse
And the errors should be fixed.
Post a reply there is still an error.
Leave a tnx or donate if I helped.
i've tried your solution for the cm7.2 rc3 aa-oc-firekernel rom for Galaxy Ace.
After having a status 7 error i removed the lines containing assert... etc.
now I'm gettin the status 6 error and i've modified the format and mount lines.
I've looked in 2 similar roms which can be flashed (one of 'm is my current rom).
the other one is the rom i've used before, so both work.
these roms start as follows:
Code:
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
the update-script from the rom I'd like to flash starts like this:
Code:
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
a bit different but the format and mount lines are indentical.
I can't figure out why I'm keep getting this status 6 error.
can you help me with it?
DutchArjo said:
i've tried your solution for the cm7.2 rc3 aa-oc-firekernel rom for Galaxy Ace.
After having a status 7 error i removed the lines containing assert... etc.
now I'm gettin the status 6 error and i've modified the format and mount lines.
I've looked in 2 similar roms which can be flashed (one of 'm is my current rom).
the other one is the rom i've used before, so both work.
these roms start as follows:
Code:
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("system", "/system");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
the update-script from the rom I'd like to flash starts like this:
Code:
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
run_program("/tmp/backuptool.sh", "backup");
show_progress(0.500000, 0);
format("ext4", "EMMC", "/dev/block/stl12", "0");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
package_extract_dir("recovery", "/system");
package_extract_dir("system", "/system");
symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
a bit different but the format and mount lines are indentical.
I can't figure out why I'm keep getting this status 6 error.
can you help me with it?
Click to expand...
Click to collapse
if you get a Status 7 error then you have to flash the rom using different recovery.
hope I helped, if yes then plz hit the thx button.:good:
i'm getting Status 6 error with this
Code:
assert(getprop("ro.product.device") == "mako" || getprop("ro.build.product") == "mako" || abort("E3004: This package is for device: mako; this device is " + getprop("ro.product.device") + "."););
ui_print("Target: google/occam/mako:7.1/NDE63X/2167285:user/release-keys");
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/platform/msm_sdcc.1/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/platform/msm_sdcc.1/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/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/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/platform/msm_sdcc.1/by-name/boot");
show_progress(0.200000, 10);
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
ui_print("flashing substratum");
package_extract_file("Substratum.apk", "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/build.prop");
unmount("/system");
set_progress(1.000000);
i just added extra flashing process..
placed files in zip but getting error
i added extra lines from here
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");
ui_print("flashing substratum");
package_extract_file("Substratum.apk", "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/app/Substratum/Substratum.apk");
set_perm_recursive(0, 0, 0644, "/system/build.prop");
unmount("/system");
set_progress(1.000000);
please reply asap..

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

updater-script help

So i pulled this script from a debloater zip.
the only command im looking to do is: rm /data/system/locksettings.db
Im a little confused because i dont want the zip to be recurring which it is currently set up like that.
what do i need to change?
EDIT: I think i removed the recursive entry correctly.
Can someone look over this and see if it looks ok?
thanks in advance.
here is the script:
ui_print("******************************************");
ui_print("Pin Fix Script");
ui_print("");
ui_print("******************************************");
show_progress(1, 15);
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print("->");
ui_print("Mounting system");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("Initializing...");
ui_print("Fixing PIN now");
delete(
"/data/system/locksettings.db",
);
show_progress(1, 15);
ui_print("--");
ui_print("Copying files");
package_extract_dir("system", "/system");
show_progress(1, 15);
ui_print("Cleaning up and setting metadata");
set_metadata("/system/addon.d", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
set_metadata("/system/app", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "ubject_r:system_file:s0");
ui_print("Unmounting system");
show_progress(1, 15);
ui_print("- - - - - - - - - - - - - - - - - - - - - - - - - -");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Removal complete!");
ui_print(" ");
ui_print(" ");
show_progress(1, 15);
ui_print(" ");
show_progress(1, 15);
ui_print("-made by dtr145r - credit to Gawd");
ui_print(" ");
show_progress(1, 15);
ui_print(" ");
ui_print("Your PIN Code should now work");
ui_print(" ");
ui_print(" Enjoy! ");
Lots of unnecessary code there, plus huge blunders because you're supposed to mount /data, not /system
Removed loads of bloat. Feel free to edit the credits, I just made one that works
Gawd said:
Lots of unnecessary code there, plus huge blunders because you're supposed to mount /data, not /system
Removed loads of bloat. Feel free to edit the credits, I just made one that works
Click to expand...
Click to collapse
Awesome thanks!
I figured there were a lot of mistakes, Its been about 3 years since i tried to mess with scripts. I forgot quite a bit.
I just got the Nexus 6p, I'm still trying to learn the ins and outs of it. Ive had Samsung phones for the past 6 years.
When ever I do a factory reset on the Nexus I have to run '' "/data/system/locksettings.db"'' in adb because the lockscreen pin code changes and locks me out of the phone... Is that common?
Thats why I wanted to create a zip file to do it for me..

Categories

Resources