Hi everyone
How does everyone do dev work for the u8800?
I previously made a custom rom for the u8150 with a custom kernel but I used the kitchen by dsixda. Is the kitchen usable for the 8800 or does everyone use scripts to customise it and old fashioned hacking?
http://forum.xda-developers.com/showthread.php?t=633246
Thanks
Paul
PaulMilbank said:
Hi everyone
How does everyone do dev work for the u8800?
I previously made a custom rom for the u8150 with a custom kernel but I used the kitchen by dsixda. Is the kitchen usable for the 8800 or does everyone use scripts to customise it and old fashioned hacking?
http://forum.xda-developers.com/showthread.php?t=633246
Thanks
Paul
Click to expand...
Click to collapse
I haven't tried much. I had some hard times modifying updater.scriot, because it didn't have all required options. I think people here use scripts.
i have used it to make a custom rom for my u8800pro.
actually i have many many problems with the updater.script....so i can't install my rom.
Yeah, I guess it takes a lot of work for the updater script to get files and locations right.
Going to start playing and see what things look like.
PaulMilbank said:
Yeah, I guess it takes a lot of work for the updater script to get files and locations right.
Going to start playing and see what things look like.
Click to expand...
Click to collapse
i have changed many lines in the original updater.script made by dsixda kitchen (except symlinks) but it doesn't work.
this is my modded updater.script for u8800pro:
Code:
format("ext3", "EMMC", "/dev/block/mmcblk0p12");
mount("ext3", "EMMC", "/dev/block/mmcblk0p12", "/system");
package_extract_dir("system", "/system");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/getprop");
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, 04755, "/system/bin/bash");
symlink("/system/bin/bash", "/system/bin/sh");
set_perm(0, 0, 04755, "/system/xbin/nano");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
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");
unmount("/system");
mount("vfat", "EMMC", "/dev/block/mmcblk0p1", "/cust");
package_extract_file("boot.img","/cust/image/boot.img");
unmount("/cust");
ok, actually this is the problem with the updater.script:
CWM error message: format() expects 2args, got 3
i understand the reason of this error but another updater.script (for example genokolar's cm7 updater.script) has the same lines and it works.
matteof93 said:
ok, actually this is the problem with the updater.script:
CWM error message: format() expects 2args, got 3
i understand the reason of this error but another updater.script (for example genokolar's cm7 updater.script) has the same lines and it works.
Click to expand...
Click to collapse
I believe genokolar has also got a different updater-binary or whatever it is called. When building CM9, it builds something like that for me.
First, check bootable/recovery/updater/install.c, it might have definitions for the updater-script. On CM9, it gives format(fs_type, partition_type, location, fs_size), 4 parameters. Check what's said in yours.
Blefish said:
I believe genokolar has also got a different updater-binary or whatever it is called. When building CM9, it builds something like that for me.
First, check bootable/recovery/updater/install.c, it might have definitions for the updater-script. On CM9, it gives format(fs_type, partition_type, location, fs_size), 4 parameters. Check what's said in yours.
Click to expand...
Click to collapse
i have used geno's update.binary and i got the same error.
this is my new updater.script
Code:
show_progress(0.2, 0);
ui_print("Formatting /system");
format("ext3", "EMMC", "/dev/block/mmcblk0p12");
mount("ext3", "EMMC", "/dev/block/mmcblk0p12", "/system");
mount("vfat", "EMMC", "/dev/block/mmcblk0p1", "/cust");
show_progress(0.5, 0);
ui_print("Extracting files to /system");
package_extract_dir("system", "/system");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/getprop");
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, 04755, "/system/bin/bash");
symlink("/system/bin/bash", "/system/bin/sh");
set_perm(0, 0, 04755, "/system/xbin/nano");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
show_progress(0.1, 10);
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");
show_progress(0.2, 0);
ui_print("Updating boot image");
package_extract_dir("cust", "/cust");
show_progress(0.1, 0);
unmount("/system");
unmount("/cust");
ui_print("Installation Finished");
matteof93 said:
i have used geno's update.binary and i got the same error.
Click to expand...
Click to collapse
Check this post. I think the recovery is messing up because AOSP has a different recovery.
Try this for example:
format("EMMC", "/dev/block/mmcblk0p12");
format("ext4", "/dev/block/mmcblk0p12");
Blefish said:
Check this post. I think the recovery is messing up because AOSP has a different recovery.
Try this for example:
format("EMMC", "/dev/block/mmcblk0p12");
format("ext4", "/dev/block/mmcblk0p12");
Click to expand...
Click to collapse
same problem
Have you managed to get it working? i'd love to try to cook a rom with it.
julle131 said:
Have you managed to get it working? i'd love to try to cook a rom with it.
Click to expand...
Click to collapse
the kitchen works, i have also found a script that allow us to obtain the system.img (as boot.img i have used the one placed in my image folder) but the problem is the updater.script
S
matteof93 said:
the kitchen works, i have also found a script that allow us to obtain the system.img (as boot.img i have used the one placed in my image folder) but the problem is the updater.script
Click to expand...
Click to collapse
If the rom is for personal use, is it possible to copy script and binary from other roms?
Sent from my Desire HD using XDA App
julle131 said:
S
If the rom is for personal use, is it possible to copy script and binary from other roms?
Sent from my Desire HD using XDA App
Click to expand...
Click to collapse
it is not possible because in the updater.script of a rom there are some commands (like "symlink") that are made only for that rom.
matteof93 said:
the kitchen works, i have also found a script that allow us to obtain the system.img (as boot.img i have used the one placed in my image folder) but the problem is the updater.script
Click to expand...
Click to collapse
What was the script?
PaulMilbank said:
What was the script?
Click to expand...
Click to collapse
this is my updater.script
Code:
show_progress(0.2, 0);
ui_print("Formatting /system");
format("ext3", "EMMC", "/dev/block/mmcblk0p12");
mount("ext3", "EMMC", "/dev/block/mmcblk0p12", "/system");
mount("vfat", "EMMC", "/dev/block/mmcblk0p1", "/cust");
show_progress(0.5, 0);
ui_print("Extracting files to /system");
package_extract_dir("system", "/system");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/getprop");
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, 04755, "/system/bin/bash");
symlink("/system/bin/bash", "/system/bin/sh");
set_perm(0, 0, 04755, "/system/xbin/nano");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
show_progress(0.1, 10);
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");
show_progress(0.2, 0);
ui_print("Updating boot image");
package_extract_dir("cust", "/cust");
show_progress(0.1, 0);
unmount("/system");
unmount("/cust");
ui_print("Installation Finished");
Cheers. Where did you find the unpack script that worked?
PaulMilbank said:
Cheers. Where did you find the unpack script that worked?
Click to expand...
Click to collapse
probably on modaco....
you need to use this perl script http://www.zebadger.com/android/scripts/split_updata.txt with this crc in the same directory http://www.zebadger.com/android/binary/crc
this is the original thread: http://android.modaco.com/topic/311344-repacking-updataapp-was-new-version-of-split-updatapl/
BTW, the problem is the updater.script
How to Write an Updater-Script with Edify Code
________________________________________
First and foremost I take no credit for the majority of this thread. I am merely posting this here as a reference for you all. I had to dig around a lot for this information and piece it together from several different threads as well as pull examples from updater-scripts in several different roms/theme/etc. Everyone else put in the work, I am just trying to make it easier for the rest of us .
After looking through several threads I have found multiple ways of doing the same thing. I will be posting everything here and then update as we go in regard to what works, what doesn't work, and what works best.
There is a basic structure for nearly all update/theme/rom/etc zip files. The one thing you need for all of them is a META-INF folder. This is the folder that holds all of the generic files/folders and your scripts. The META-INF folder contains a folder labeled "com" and three other files labeled CERT.RSA, CERT.SF, and MANIFEST.MF.
The updater-script and update-binary are kind of burried in the META-INF folder. They are located:
YourZipFile\META-INF\com\google\android\HERE
The updater-script is built using the code below. The update-binary is universal and does not need to be changed.
When working with partitions in edify, you must mount them before you do anything. So if you want to copy, delete, or modify a partition you have to first mount it.
Generic:
Code:
mount("kind", "what", "path");
Kind: Type of partition. In our case it is MTD.
What: Sort of like a description. Notice the examples below.
Path: Somewhat self explanatory.
Code:
mount("MTD", "system", "/system");
mount("MTD", "userdata", "/data");
mount("MTD", "cache", "/cache");
mount("MTD", "sdcard", "/sdcard");
I also noticed this:
Code:
mount("yaffs2", "MTD", "system", "/system");
In an updater-script from a CM7 nightly. I have been able to mount and modify system without using the "yaffs2" portion, but maybe they know something I don't.
Once you are done with you modifications/changes/etc, unmount the partition.
Code:
unmount("/system");
unmount("/data"); OR unmount("/userdata");
unmount("/cache");
unmount("/sdcard");
Format and entire partition and start with a clean slate.
Generic:
Code:
format("MTD", "partition");
MTD: Stays the same regardless.
Partition: Obviously the partition we want to format.
Code:
format("MTD", "system");
format("MTD", "cache");
format("MTD", "data");
format("MTD", "boot");
Again, a reference to "yaffs2" from CM7.
Code:
format("yaffs2", "MTD", "system");
Copy files from you .zip to phone partitions or sdcard.
Generic:
Code:
package_extract_dir("Source", "Destination");
Source: Where the file/folder is located in your .zip
Destination: Where you want to copy said file/folder to.
In your .zip, you would have a folder(s) labeled system, data, or sdcard. (I can't think of any reasons you would copy anything to your cache partition and when dealing with /boot you would write to it and not copy which we will cover later on.)
Code:
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_dir("sdcard", "/sdcard");
Write a file to a given partition. This is what I referenced in the directions directly above these. In this case, you would have the .img file in the same directory as your system, data, and sdcard folders. The same directory as the META-INF folder.
Generic:
Code:
assert(package_extract_file("partition.img", "/tmp/partition.img"),
write_raw_image("/tmp/partition.img", "partition"),
delete("/tmp/partition.img"));
Partition.img: The .img you want to write (usually boot.img)
Partition: The partition you want to write to.
Code:
package_extract_file("boot.img", "/tmp/boot.img");
write_raw_image("/tmp/boot.img", "boot");
delete("/tmp/boot.img");
Output a line of text.
Generic:
Code:
ui_print("Text Here");
Won't go into to much depth here. Just replace "text here" with whatever you want your message to be. Will have to do some testing with this. I believe using certain punctuation, such as a single period, at the end of your message my muck things up. We will see though
Delete a file. There are two different delete commands. I will see if I can give a decent definition for each.
Generic:
Code:
delete("file/path");
delete_recursive("file/path");
Code:
delete("/system/app/Email.apk");
delete_recursive("/data/dalvik-cache");
The first command will delete and continue to delete if the previous delete failed. The second command (recursive) will stop if it fails to delete. This is one of those things where I am relying on you for help. In my script is use "delete" for a single file and "recursive" for a directory. Not sure if this is correct but will update as necessary.
This is just a start for now. I have a lot more to add to this. Will update later with more code/descriptions/examples. Will also be adding links to other threads/users where credit is due. Do not think that I am trying to claim ownership of these directions. I am merely lazy and want to post this for now and will come back and edit with the appropriate information.
[TUT]Edify Installation Script Syntax's
________________________________________
Hi,
I'm making this thread for guiding some ppl to learn Edify Installation Script Syntax's
I promise u will find everything about Edify updater-Script here...
DO NOT USE NOTEPAD OR SOMETHING LIKE THAT SOFTWARE FOR MAKING UPDATER-SCRIPT, THEREFOR ERROR 6
RECOMMEND SOFTWARE FOR EDITING UPDATER-SCRIPT.
NOTEPAD++
@all plz helping me here...
If u have any prob... post ur Amend update-script here will convert it to Edify updater-script...
Code:
Amend Script Syntax----------Edify Script Syntax
Info Print:-
Don't Know...----------ui_print("Ur Message Here...");
Code:
Formating:-
format SYSTEM:--------------------------format("MTD", "system");
format DATA:----------------------------format("MTD", "userdata");
format CACHE:---------------------------format("MTD", "cache");
format SDEXT:---------------------------Don't Know...
Code:
Clean Up
format("yaffs2", "MTD", "system");
format("yaffs2", "MTD", "userdata");
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
run_program("/sbin/busybox", "rm", "-rf", "/sd-ext/*");
run_program("/sbin/busybox", "rm", "-rf", "/sdcard/.android_secure/*");
run_program("/sbin/busybox", "umount", "/sd-ext");
run_program("/sbin/e2fsck", "-pv", "/dev/block/mmcblk0p2");
Code:
Copy To System & Data:-
copy_dir PACKAGE:system SYSTEM:---------mount("MTD", "system", "/system");
........................................package_extract_dir("system", "/system");
copy_dir PACKAGE:data DATA:-------------mount("MTD", "userdata", "/data");
........................................package_extract_dir("data", "/data");
Copy To SDCard:-
copy_dir PACKAGE:sdcard SDCARD:---------mount("vfat","/dev/block/mmcblk0p1","/sdcard");
........................................package_extract_dir("sdcard", "/sdcard");
Code:
Copy To SD-EXT Works With EXT 2/3/4, btrfs, Reiserfs, jfs:-
copy_dir PACKAGE:SDEXT SDEXT:-----------run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
........................................package_extract_dir("sdext", "/sd-ext");
Copy To SD-EXT Externel Syntax:-
copy_dir PACKAGE:SDEXT SDEXT:-----------mount("ext4","/dev/block/mmcblk0p2","/sd-ext");
........................................package_extract_dir("sdext", "/sd-ext");
copy_dir PACKAGE:SDEXT SDEXT:-----------mount("ext3","/dev/block/mmcblk0p2","/sd-ext");
........................................package_extract_dir("sdext", "/sd-ext");
copy_dir PACKAGE:SDEXT SDEXT:-----------mount("ext2","/dev/block/mmcblk0p2","/sd-ext");
........................................package_extract_dir("sdext", "/sd-ext");
Code:
Deleting Folder:-
delete_recursive DATA:app----------delete_recursive("/data/app");
Deleting Files:-
delete DATA:etc/hosts--------------delete("/data/etc/hosts");
Folder Permission:-
set_perm_recursive 1000 1000 0771 0644 DATA:app---------set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
File Permission:-
set_perm 2000 2000 0771 DATA:etc------------------------set_perm(2000, 2000, 0771, "/data/etc");
Symlink Setup:-
symlink /data/app/apps.apk SYSTEM:app/apps.apk----------symlink("/data/app/apps.apk", "/system/app/apps.apk");
symlink /data/etc/hosts SYSTEM:etc/hosts----------------symlink("/data/etc/hosts", "/system/etc/hosts");
ToolBox Setup:-
symlink toolbox SYSTEM:bin/date-------------------------symlink("toolbox", "/system/bin/date");
Busybox Setup:-
run_program PACKAGE:installbusybox----------------------run_program("installbusybox");
........................................................set_perm(0, 1000, 0755, "/system/xbin/busybox");
Writing Boot:-
format BOOT:-------------------------------------------package_extract_file("boot.img","/tmp/boot.img");
write_raw_image PACKAGE:boot.img BOOT:..................write_raw_image("/tmp/boot.img", "boot");
........................................................delete("/tmp/boot.img");
Writing Boot:-
format BOOT:-------------------------------------------assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image PACKAGE:boot.img BOOT:..................write_raw_image("/tmp/boot.img", "boot"),
........................................................delete("/tmp/boot.img"));
Code:
Toolbox Setup Into Updater-Script:-
symlink("toolbox", "/system/bin/cat","/system/bin/chmod",
"/system/bin/chown","/system/bin/chownto",
"/system/bin/cmp","/system/bin/date",
"/system/bin/dd","/system/bin/df",
"/system/bin/dmesg","/system/bin/getevent",
"/system/bin/getprop","/system/bin/hd",
"/system/bin/id","/system/bin/ifconfig",
"/system/bin/iftop","/system/bin/insmod",
"/system/bin/ioctl","/system/bin/ionice",
"/system/bin/kill","/system/bin/ln",
"/system/bin/log","/system/bin/ls",
"/system/bin/lsmod","/system/bin/mkdir",
"/system/bin/mount","/system/bin/mv",
"/system/bin/nandread","/system/bin/netstat",
"/system/bin/newfs_msdos","/system/bin/notify",
"/system/bin/printenv","/system/bin/ps",
"/system/bin/renice","/system/bin/rm",
"/system/bin/rmdir","/system/bin/rmmod",
"/system/bin/route","/system/bin/schedtop",
"/system/bin/sendevent","/system/bin/setconsole",
"/system/bin/setprop","/system/bin/sleep",
"/system/bin/smd","/system/bin/start",
"/system/bin/stop","/system/bin/sync",
"/system/bin/top","/system/bin/umount",
"/system/bin/vmstat","/system/bin/watchprops",
"/system/bin/wipe");
set_perm(0, 0, 04755, "/system/bin/toolbox");
Code:
Busybox Setup Into Updater-Script:-
symlink("busybox", "/system/xbin/[","/system/xbin/[[","/system/xbin/addgroup",
"/system/xbin/adduser","/system/xbin/adjtimex","/system/xbin/ar",
"/system/xbin/arp","/system/xbin/arping","/system/xbin/ash",
"/system/xbin/awk","/system/xbin/basename","/system/xbin/bbconfig",
"/system/xbin/beep","/system/xbin/blkid","/system/xbin/brctl",
"/system/xbin/bunzip2","/system/xbin/bzcat","/system/xbin/bzip2",
"/system/xbin/cal","/system/xbin/cat","/system/xbin/catv",
"/system/xbin/chat","/system/xbin/chattr","/system/xbin/chgrp",
"/system/xbin/chmod","/system/xbin/chown","/system/xbin/chpasswd",
"/system/xbin/chpst","/system/xbin/chroot","/system/xbin/chrt",
"/system/xbin/chvt","/system/xbin/cksum","/system/xbin/clear",
"/system/xbin/cmp","/system/xbin/comm","/system/xbin/cp",
"/system/xbin/cpio","/system/xbin/crond","/system/xbin/crontab",
"/system/xbin/cryptpw","/system/xbin/cttyhack","/system/xbin/cut",
"/system/xbin/date","/system/xbin/dc","/system/xbin/dd",
"/system/xbin/deallocvt","/system/xbin/delgroup","/system/xbin/deluser",
"/system/xbin/depmod","/system/xbin/devmem","/system/xbin/df",
"/system/xbin/diff","/system/xbin/dirname","/system/xbin/dmesg",
"/system/xbin/dnsd","/system/xbin/dnsdomainname","/system/xbin/dos2unix",
"/system/xbin/du","/system/xbin/dumpkmap","/system/xbin/echo",
"/system/xbin/ed","/system/xbin/egrep","/system/xbin/eject",
"/system/xbin/env","/system/xbin/envdir","/system/xbin/envuidgid",
"/system/xbin/ether-wake","/system/xbin/expand","/system/xbin/expr",
"/system/xbin/fakeidentd","/system/xbin/false","/system/xbin/fbset",
"/system/xbin/fbsplash","/system/xbin/fdflush","/system/xbin/fdformat",
"/system/xbin/fdisk","/system/xbin/fgrep","/system/xbin/find",
"/system/xbin/findfs","/system/xbin/fold","/system/xbin/free",
"/system/xbin/fsck","/system/xbin/fsck.minix","/system/xbin/fsync",
"/system/xbin/ftpd","/system/xbin/ftpget","/system/xbin/ftpput",
"/system/xbin/fuser","/system/xbin/getopt","/system/xbin/getty",
"/system/xbin/grep","/system/xbin/gunzip","/system/xbin/gzip",
"/system/xbin/halt","/system/xbin/hd","/system/xbin/hdparm",
"/system/xbin/head","/system/xbin/hexdump","/system/xbin/hostid",
"/system/xbin/hostname","/system/xbin/httpd","/system/xbin/hush",
"/system/xbin/hwclock","/system/xbin/id","/system/xbin/ifconfig",
"/system/xbin/ifdown","/system/xbin/ifenslave","/system/xbin/ifplugd",
"/system/xbin/ifup","/system/xbin/inetd","/system/xbin/init",
"/system/xbin/insmod","/system/xbin/install","/system/xbin/ionice",
"/system/xbin/ip","/system/xbin/ipaddr","/system/xbin/ipcalc",
"/system/xbin/ipcrm","/system/xbin/ipcs","/system/xbin/iplink",
"/system/xbin/iproute","/system/xbin/iprule","/system/xbin/iptunnel",
"/system/xbin/kbd_mode","/system/xbin/kill","/system/xbin/killall",
"/system/xbin/killall5","/system/xbin/klogd","/system/xbin/last",
"/system/xbin/length","/system/xbin/less","/system/xbin/linux32",
"/system/xbin/linux64","/system/xbin/linuxrc","/system/xbin/ln",
"/system/xbin/loadfont","/system/xbin/loadkmap","/system/xbin/logger",
"/system/xbin/login","/system/xbin/logname","/system/xbin/logread",
"/system/xbin/losetup","/system/xbin/lpd","/system/xbin/lpq",
"/system/xbin/lpr","/system/xbin/ls","/system/xbin/lsattr",
"/system/xbin/lsmod","/system/xbin/lzmacat","/system/xbin/lzop",
"/system/xbin/lzopcat","/system/xbin/makedevs","/system/xbin/makemime",
"/system/xbin/man","/system/xbin/md5sum","/system/xbin/mdev",
"/system/xbin/mesg","/system/xbin/microcom","/system/xbin/mkdir",
"/system/xbin/mkdosfs","/system/xbin/mkfifo","/system/xbin/mkfs.minix",
"/system/xbin/mkfs.vfat","/system/xbin/mknod","/system/xbin/mkpasswd",
"/system/xbin/mkswap","/system/xbin/mktemp","/system/xbin/modprobe",
"/system/xbin/more","/system/xbin/mount","/system/xbin/mountpoint",
"/system/xbin/msh","/system/xbin/mt","/system/xbin/mv","/system/xbin/nameif",
"/system/xbin/nc","/system/xbin/netstat","/system/xbin/nice",
"/system/xbin/nmeter","/system/xbin/nohup","/system/xbin/nslookup",
"/system/xbin/od","/system/xbin/openvt","/system/xbin/passwd",
"/system/xbin/patch","/system/xbin/pgrep","/system/xbin/pidof",
"/system/xbin/ping","/system/xbin/ping6","/system/xbin/pipe_progress",
"/system/xbin/pivot_root","/system/xbin/pkill","/system/xbin/popmaildir",
"/system/xbin/poweroff","/system/xbin/printenv","/system/xbin/printf",
"/system/xbin/ps","/system/xbin/pscan","/system/xbin/pwd","/system/xbin/raidautorun",
"/system/xbin/rdate","/system/xbin/rdev","/system/xbin/readahead",
"/system/xbin/readlink","/system/xbin/readprofile","/system/xbin/realpath",
"/system/xbin/reformime","/system/xbin/renice","/system/xbin/reset",
"/system/xbin/resize","/system/xbin/rm","/system/xbin/rmdir",
"/system/xbin/rmmod","/system/xbin/route","/system/xbin/rtcwake",
"/system/xbin/run-parts","/system/xbin/runlevel","/system/xbin/runsv",
"/system/xbin/runsvdir","/system/xbin/rx","/system/xbin/script",
"/system/xbin/scriptreplay","/system/xbin/sed","/system/xbin/sendmail",
"/system/xbin/seq","/system/xbin/setarch","/system/xbin/setconsole",
"/system/xbin/setfont","/system/xbin/setkeycodes","/system/xbin/setlogcons",
"/system/xbin/setsid","/system/xbin/setuidgid","/system/xbin/sh",
"/system/xbin/sha1sum","/system/xbin/sha256sum","/system/xbin/sha512sum",
"/system/xbin/showkey","/system/xbin/slattach","/system/xbin/sleep",
"/system/xbin/softlimit","/system/xbin/sort","/system/xbin/split",
"/system/xbin/start-stop-daemon","/system/xbin/stat","/system/xbin/strings",
"/system/xbin/stty","/system/xbin/sulogin","/system/xbin/sum",
"/system/xbin/sv","/system/xbin/svlogd","/system/xbin/swapoff",
"/system/xbin/swapon","/system/xbin/switch_root","/system/xbin/sync",
"/system/xbin/sysctl","/system/xbin/syslogd","/system/xbin/tac",
"/system/xbin/tail","/system/xbin/tar","/system/xbin/tcpsvd",
"/system/xbin/tee","/system/xbin/telnet","/system/xbin/telnetd",
"/system/xbin/test","/system/xbin/tftp","/system/xbin/tftpd",
"/system/xbin/time","/system/xbin/timeout","/system/xbin/top",
"/system/xbin/touch","/system/xbin/tr","/system/xbin/traceroute",
"/system/xbin/true","/system/xbin/tty","/system/xbin/ttysize",
"/system/xbin/tunctl","/system/xbin/udpsvd","/system/xbin/umount",
"/system/xbin/uname","/system/xbin/uncompress","/system/xbin/unexpand",
"/system/xbin/uniq","/system/xbin/unix2dos","/system/xbin/unlzma",
"/system/xbin/unlzop","/system/xbin/unzip","/system/xbin/uptime",
"/system/xbin/usleep","/system/xbin/uudecode","/system/xbin/uuencode",
"/system/xbin/vconfig","/system/xbin/vi","/system/xbin/vlock",
"/system/xbin/volname","/system/xbin/watch","/system/xbin/watchdog",
"/system/xbin/wc","/system/xbin/wget","/system/xbin/which",
"/system/xbin/who","/system/xbin/whoami","/system/xbin/xargs",
"/system/xbin/yes","/system/xbin/zcat","/system/xbin/zcip");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
Code:
copy_dir PACKAGE:SDEXT SDEXT:----------mount("ext4","/dev/block/mmcblk0p2","/sd-ext");
.......................................package_extract_dir("sdext", "/sd-ext");
this code only works on ext3 or ext4 i think the chef who is creating an updater-script should specify this. for ext2 you need to mount it as ext2, you can also try "auto" but might encounter issues with the recovery running kernel, and other stuff
only ext3 can be mounted as ext4 and vice-versa
also for ease of use I will provide the symlinking from my updater-script for toolbox and busybox since is pretty unhandy to write them - should apply to any toolbox and busybox version
Code:
ui_print("-Creating toolbox symlinks");
symlink("toolbox", "/system/bin/chownto", "/system/bin/getevent", "/system/bin/getprop", "/system/bin/ifconfig", "/system/bin/iftop", "/system/bin/ioctl", "/system/bin/log", "/system/bin/nandread", "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/schedtop", "/system/bin/sendevent", "/system/bin/setprop", "/system/bin/smd", "/system/bin/start", "/system/bin/stop", "/system/bin/vmstat", "/system/bin/watchprops", "/system/bin/wipe", "/system/bin/top");
ui_print("-Creating busybox symlinks");
symlink("/system/xbin/busybox", "/system/xbin/[", "/system/xbin/[[", "/system/xbin/addgroup", "/system/xbin/adduser", "/system/xbin/adjtimex", "/system/xbin/ar", "/system/xbin/arp", "/system/xbin/arping", "/system/xbin/ash", "/system/xbin/awk", "/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/beep", "/system/xbin/blkid", "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv", "/system/xbin/chat", "/system/xbin/chattr", "/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chpasswd", "/system/xbin/chpst", "/system/xbin/chroot", "/system/xbin/chrt", "/system/xbin/chvt", "/system/xbin/cksum", "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm", "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond", "/system/xbin/crontab", "/system/xbin/cryptpw", "/system/xbin/cttyhack", "/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/deallocvt", "/system/xbin/delgroup", "/system/xbin/deluser", "/system/xbin/depmod", "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff", "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd", "/system/xbin/dnsdomainname", "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/dumpkmap", "/system/xbin/echo", "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/eject", "/system/xbin/env", "/system/xbin/envdir", "/system/xbin/envuidgid", "/system/xbin/ether-wake", "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/fakeidentd", "/system/xbin/false", "/system/xbin/fbset", "/system/xbin/fbsplash", "/system/xbin/fdflush", "/system/xbin/fdformat", "/system/xbin/fdisk", "/system/xbin/fgrep", "/system/xbin/find", "/system/xbin/findfs", "/system/xbin/fold", "/system/xbin/free", "/system/xbin/freeramdisk", "/system/xbin/fsck", "/system/xbin/fsck.minix", "/system/xbin/fsync", "/system/xbin/ftpd", "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser", "/system/xbin/getopt", "/system/xbin/getty", "/system/xbin/grep", "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt", "/system/xbin/hd", "/system/xbin/hdparm", "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/hostid", "/system/xbin/hostname", "/system/xbin/httpd", "/system/xbin/hush", "/system/xbin/hwclock", "/system/xbin/id", "/system/xbin/ifdown", "/system/xbin/ifenslave", "/system/xbin/ifplugd", "/system/xbin/ifup", "/system/xbin/inetd", "/system/xbin/init", "/system/xbin/insmod", "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/ip", "/system/xbin/ipaddr", "/system/xbin/ipcalc", "/system/xbin/ipcrm", "/system/xbin/ipcs", "/system/xbin/iplink", "/system/xbin/iproute", "/system/xbin/iprule", "/system/xbin/iptunnel", "/system/xbin/kbd_mode", "/system/xbin/kill", "/system/xbin/killall", "/system/xbin/killall5", "/system/xbin/klogd", "/system/xbin/last", "/system/xbin/length", "/system/xbin/less", "/system/xbin/linux32", "/system/xbin/linux64", "/system/xbin/linuxrc", "/system/xbin/ln", "/system/xbin/loadfont", "/system/xbin/loadkmap", "/system/xbin/logger", "/system/xbin/login", "/system/xbin/logname", "/system/xbin/logread", "/system/xbin/losetup", "/system/xbin/lpd", "/system/xbin/lpq", "/system/xbin/lpr", "/system/xbin/ls", "/system/xbin/lsattr", "/system/xbin/lsmod", "/system/xbin/lzmacat", "/system/xbin/lzop", "/system/xbin/lzopcat", "/system/xbin/makedevs", "/system/xbin/makemime", "/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mdev", "/system/xbin/mesg", "/system/xbin/microcom", "/system/xbin/mkdir", "/system/xbin/mkdosfs", "/system/xbin/mkfifo", "/system/xbin/mkfs.minix", "/system/xbin/mkfs.vfat", "/system/xbin/mknod", "/system/xbin/mkpasswd", "/system/xbin/mkswap", "/system/xbin/mktemp", "/system/xbin/modprobe", "/system/xbin/more", "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/msh", "/system/xbin/mt", "/system/xbin/mv", "/system/xbin/nameif", "/system/xbin/nc", "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nmeter", "/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/od", "/system/xbin/openvt", "/system/xbin/passwd", "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/ping6", "/system/xbin/pipe_progress", "/system/xbin/pivot_root", "/system/xbin/pkill", "/system/xbin/popmaildir", "/system/xbin/poweroff", "/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pscan", "/system/xbin/pwd", "/system/xbin/raidautorun", "/system/xbin/rdate", "/system/xbin/rdev", "/system/xbin/readahead", "/system/xbin/readlink", "/system/xbin/readprofile", "/system/xbin/realpath", "/system/xbin/reformime", "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize", "/system/xbin/rm", "/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/rtcwake", "/system/xbin/run-parts", "/system/xbin/runlevel", "/system/xbin/runsv", "/system/xbin/runsvdir", "/system/xbin/rx", "/system/xbin/script", "/system/xbin/scriptreplay", "/system/xbin/sed", "/system/xbin/sendmail", "/system/xbin/seq", "/system/xbin/setarch", "/system/xbin/setconsole", "/system/xbin/setfont", "/system/xbin/setkeycodes", "/system/xbin/setlogcons", "/system/xbin/setsid", "/system/xbin/setuidgid", "/system/xbin/sha1sum", "/system/xbin/sha256sum", "/system/xbin/sha512sum", "/system/xbin/showkey", "/system/xbin/slattach", "/system/xbin/sleep", "/system/xbin/softlimit", "/system/xbin/sort", "/system/xbin/split", "/system/xbin/start-stop-daemon", "/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty", "/system/xbin/sulogin", "/system/xbin/sum", "/system/xbin/sv", "/system/xbin/svlogd", "/system/xbin/swapoff", "/system/xbin/swapon", "/system/xbin/switch_root", "/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/syslogd", "/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar", "/system/xbin/tcpsvd", "/system/xbin/tee", "/system/xbin/telnet", "/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp", "/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout", "/system/xbin/touch", "/system/xbin/tr", "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/tty", "/system/xbin/ttysize", "/system/xbin/tunctl", "/system/xbin/udpsvd", "/system/xbin/umount", "/system/xbin/uname", "/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq", "/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vconfig", "/system/xbin/vi", "/system/xbin/vlock", "/system/xbin/volname", "/system/xbin/watch", "/system/xbin/watchdog", "/system/xbin/wc", "/system/xbin/wget", "/system/xbin/which", "/system/xbin/who", "/system/xbin/whoami", "/system/xbin/xargs", "/system/xbin/yes", "/system/xbin/zcat", "/system/xbin/zcip");
also
Code:
ui_print("-Creating busybox symlinks");
is pretty self explanatory what is does, prints the text between "" on screen
and as a bonus and ease of use (for my experience show and tell is the best method) this is my updater-script used in the last version of my rom, to see a start to end working updater-script (edify)
Code:
#
# Generated by dsixda's HTC Android Kitchen
# xda-developers.com
#
show_progress(0.500000, 0);
ui_print("-Checking Model ID");
assert(getprop("ro.product.device") == "bravo" || getprop("ro.build.product") == "bravo" || getprop("ro.product.board") == "bravo");
ui_print("-Success!");
ui_print("-Model ID - HTC Bravo");
ui_print("-Ok to proceed");
ui_print("Now flashing InsertCoin HD Port 1.8f");
ui_print("Please be patient");
ui_print("1st boot may take a few minutes");
show_progress(0.500000, 40);
ui_print("-Wiping system and cache.");
format("MTD", "cache");
format("MTD", "system");
delete("/data/local");
delete("/data/app");
delete_recursive("/data/data/com.android.vending/cache");
ui_print("-Writing SDEXT");
mount("ext4","/dev/block/mmcblk0p2","/sd-ext");
package_extract_dir("sd-ext", "/sd-ext");
ui_print("-Writing SYSTEM");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
show_progress(0.400000, 0);
ui_print("-Creating toolbox symlinks");
symlink("toolbox", "/system/bin/chownto", "/system/bin/getevent", "/system/bin/getprop", "/system/bin/ifconfig", "/system/bin/iftop", "/system/bin/ioctl", "/system/bin/log", "/system/bin/nandread", "/system/bin/newfs_msdos", "/system/bin/notify", "/system/bin/schedtop", "/system/bin/sendevent", "/system/bin/setprop", "/system/bin/smd", "/system/bin/start", "/system/bin/stop", "/system/bin/vmstat", "/system/bin/watchprops", "/system/bin/wipe", "/system/bin/top");
ui_print("-Creating busybox symlinks");
symlink("/system/xbin/busybox", "/system/xbin/[", "/system/xbin/[[", "/system/xbin/addgroup", "/system/xbin/adduser", "/system/xbin/adjtimex", "/system/xbin/ar", "/system/xbin/arp", "/system/xbin/arping", "/system/xbin/ash", "/system/xbin/awk", "/system/xbin/basename", "/system/xbin/bbconfig", "/system/xbin/beep", "/system/xbin/blkid", "/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat", "/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat", "/system/xbin/catv", "/system/xbin/chat", "/system/xbin/chattr", "/system/xbin/chgrp", "/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chpasswd", "/system/xbin/chpst", "/system/xbin/chroot", "/system/xbin/chrt", "/system/xbin/chvt", "/system/xbin/cksum", "/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm", "/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond", "/system/xbin/crontab", "/system/xbin/cryptpw", "/system/xbin/cttyhack", "/system/xbin/cut", "/system/xbin/date", "/system/xbin/dc", "/system/xbin/dd", "/system/xbin/deallocvt", "/system/xbin/delgroup", "/system/xbin/deluser", "/system/xbin/depmod", "/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff", "/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd", "/system/xbin/dnsdomainname", "/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/dumpkmap", "/system/xbin/echo", "/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/eject", "/system/xbin/env", "/system/xbin/envdir", "/system/xbin/envuidgid", "/system/xbin/ether-wake", "/system/xbin/expand", "/system/xbin/expr", "/system/xbin/fakeidentd", "/system/xbin/false", "/system/xbin/fbset", "/system/xbin/fbsplash", "/system/xbin/fdflush", "/system/xbin/fdformat", "/system/xbin/fdisk", "/system/xbin/fgrep", "/system/xbin/find", "/system/xbin/findfs", "/system/xbin/fold", "/system/xbin/free", "/system/xbin/freeramdisk", "/system/xbin/fsck", "/system/xbin/fsck.minix", "/system/xbin/fsync", "/system/xbin/ftpd", "/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser", "/system/xbin/getopt", "/system/xbin/getty", "/system/xbin/grep", "/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt", "/system/xbin/hd", "/system/xbin/hdparm", "/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/hostid", "/system/xbin/hostname", "/system/xbin/httpd", "/system/xbin/hush", "/system/xbin/hwclock", "/system/xbin/id", "/system/xbin/ifdown", "/system/xbin/ifenslave", "/system/xbin/ifplugd", "/system/xbin/ifup", "/system/xbin/inetd", "/system/xbin/init", "/system/xbin/insmod", "/system/xbin/install", "/system/xbin/ionice", "/system/xbin/ip", "/system/xbin/ipaddr", "/system/xbin/ipcalc", "/system/xbin/ipcrm", "/system/xbin/ipcs", "/system/xbin/iplink", "/system/xbin/iproute", "/system/xbin/iprule", "/system/xbin/iptunnel", "/system/xbin/kbd_mode", "/system/xbin/kill", "/system/xbin/killall", "/system/xbin/killall5", "/system/xbin/klogd", "/system/xbin/last", "/system/xbin/length", "/system/xbin/less", "/system/xbin/linux32", "/system/xbin/linux64", "/system/xbin/linuxrc", "/system/xbin/ln", "/system/xbin/loadfont", "/system/xbin/loadkmap", "/system/xbin/logger", "/system/xbin/login", "/system/xbin/logname", "/system/xbin/logread", "/system/xbin/losetup", "/system/xbin/lpd", "/system/xbin/lpq", "/system/xbin/lpr", "/system/xbin/ls", "/system/xbin/lsattr", "/system/xbin/lsmod", "/system/xbin/lzmacat", "/system/xbin/lzop", "/system/xbin/lzopcat", "/system/xbin/makedevs", "/system/xbin/makemime", "/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mdev", "/system/xbin/mesg", "/system/xbin/microcom", "/system/xbin/mkdir", "/system/xbin/mkdosfs", "/system/xbin/mkfifo", "/system/xbin/mkfs.minix", "/system/xbin/mkfs.vfat", "/system/xbin/mknod", "/system/xbin/mkpasswd", "/system/xbin/mkswap", "/system/xbin/mktemp", "/system/xbin/modprobe", "/system/xbin/more", "/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/msh", "/system/xbin/mt", "/system/xbin/mv", "/system/xbin/nameif", "/system/xbin/nc", "/system/xbin/netstat", "/system/xbin/nice", "/system/xbin/nmeter", "/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/od", "/system/xbin/openvt", "/system/xbin/passwd", "/system/xbin/patch", "/system/xbin/pgrep", "/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/ping6", "/system/xbin/pipe_progress", "/system/xbin/pivot_root", "/system/xbin/pkill", "/system/xbin/popmaildir", "/system/xbin/poweroff", "/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps", "/system/xbin/pscan", "/system/xbin/pwd", "/system/xbin/raidautorun", "/system/xbin/rdate", "/system/xbin/rdev", "/system/xbin/readahead", "/system/xbin/readlink", "/system/xbin/readprofile", "/system/xbin/realpath", "/system/xbin/reformime", "/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize", "/system/xbin/rm", "/system/xbin/rmdir", "/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/rtcwake", "/system/xbin/run-parts", "/system/xbin/runlevel", "/system/xbin/runsv", "/system/xbin/runsvdir", "/system/xbin/rx", "/system/xbin/script", "/system/xbin/scriptreplay", "/system/xbin/sed", "/system/xbin/sendmail", "/system/xbin/seq", "/system/xbin/setarch", "/system/xbin/setconsole", "/system/xbin/setfont", "/system/xbin/setkeycodes", "/system/xbin/setlogcons", "/system/xbin/setsid", "/system/xbin/setuidgid", "/system/xbin/sha1sum", "/system/xbin/sha256sum", "/system/xbin/sha512sum", "/system/xbin/showkey", "/system/xbin/slattach", "/system/xbin/sleep", "/system/xbin/softlimit", "/system/xbin/sort", "/system/xbin/split", "/system/xbin/start-stop-daemon", "/system/xbin/stat", "/system/xbin/strings", "/system/xbin/stty", "/system/xbin/sulogin", "/system/xbin/sum", "/system/xbin/sv", "/system/xbin/svlogd", "/system/xbin/swapoff", "/system/xbin/swapon", "/system/xbin/switch_root", "/system/xbin/sync", "/system/xbin/sysctl", "/system/xbin/syslogd", "/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar", "/system/xbin/tcpsvd", "/system/xbin/tee", "/system/xbin/telnet", "/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp", "/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout", "/system/xbin/touch", "/system/xbin/tr", "/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/tty", "/system/xbin/ttysize", "/system/xbin/tunctl", "/system/xbin/udpsvd", "/system/xbin/umount", "/system/xbin/uname", "/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq", "/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop", "/system/xbin/unzip", "/system/xbin/uptime", "/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode", "/system/xbin/vconfig", "/system/xbin/vi", "/system/xbin/vlock", "/system/xbin/volname", "/system/xbin/watch", "/system/xbin/watchdog", "/system/xbin/wc", "/system/xbin/wget", "/system/xbin/which", "/system/xbin/who", "/system/xbin/whoami", "/system/xbin/xargs", "/system/xbin/yes", "/system/xbin/zcat", "/system/xbin/zcip");
ui_print("-Creating addtional symlinks");
symlink("/system/sd/.customize","/system/customize");
symlink("/system/sd/.etc/slideshow","/system/etc/slideshow");
symlink("/system/sd/.etc/hosts","/system/etc/hosts");
symlink("/system/sd/.lib/VR","/system/lib/VR");
symlink("/system/sd/.lib/libLaputaEngine.so","/system/lib/libLaputaEngine.so");
symlink("/system/sd/.lib/libLaputaLbJni.so","/system/lib/libLaputaLbJni.so");
symlink("/system/sd/.lib/libLaputaLbProviderJni.so","/system/lib/libLaputaLbProviderJni.so");
symlink("/system/sd/.lib/libLaputaLogJni.so","/system/lib/libLaputaLogJni.so");
symlink("/system/sd/.lib/libAdobeReader.so","/system/lib/libAdobeReader.so");
symlink("/system/sd/.lib/libflashplayer.so","/system/lib/libflashplayer.so");
symlink("/system/sd/.lib/libvoicesearch.so","/system/lib/libvoicesearch.so");
symlink("/system/sd/.systemapp/HtcLaputa.apk","/system/app/HtcLaputa.apk");
symlink("/system/sd/.systemapp/HtcLaputaInstaller.apk","/system/app/HtcLaputaInstaller.apk");
symlink("/system/sd/.systemapp/HtcLaputaWidget.apk","/system/app/HtcLaputaWidget.apk");
symlink("/system/sd/.systemapp/LocationPickerLaputa.apk","/system/app/LocationPickerLaputa.apk");
symlink("/system/sd/.systemapp/install_flash_player.apk","/system/app/install_flash_player.apk");
symlink("/system/sd/.systemapp/AdobeReader.apk","/system/app/AdobeReader.apk");
symlink("/system/sd/.systemapp/VoiceSearch.apk","/system/app/VoiceSearch.apk");
symlink("/system/sd/.systemapp/teeter.apk","/system/app/teeter.apk");
symlink("/system/sd/.systemapp/TransferData.apk","/system/app/TransferData.apk");
symlink("/system/sd/.systemapp/BlackBoard.apk","/system/app/BlackBoard.apk");
symlink("/system/sd/.systemapp/Metal.apk","/system/app/Metal.apk");
symlink("/system/sd/.systemapp/Quickoffice.apk","/system/app/Quickoffice.apk");
symlink("/system/sd/.systemapp/Wood.apk","/system/app/Wood.apk");
symlink("/system/sd/.systemapp/Translator.apk","/system/app/Translator.apk");
symlink("dumpstate","/system/bin/bugreport");
symlink("dumpstate","/system/bin/dumpcrash");
symlink("/system/bin/su", "/system/xbin/su");
ui_print("-Setting Permissions");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/local");
set_perm_recursive(1000, 1000, 0771, 0644, "/sd-ext/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/sd-ext/.systemapp");
set_perm_recursive(1000, 1000, 0771, 0644, "/sd-ext/.etc/slideshow");
set_perm_recursive(1000, 1000, 0771, 0644, "/sd-ext/.customize");
set_perm_recursive(0, 0, 0755, 0644, "/system/");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 3003, 02755, "/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, 04755, "/system/bin/sysrw");
set_perm(0, 0, 04755, "/system/bin/sysro");
set_perm(0, 0, 06755, "/system/bin/su");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 06755, "/system/xbin");
set_perm(0, 0, 04755, "/system/etc/ppp/ip-up-vpn");
set_perm(0, 0, 04755, "/system/xbin/busybox");
set_perm(0, 0, 04755, "/system/bin/toolbox");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib/modules, ");
set_perm(0, 2000, 0755, "/system/xbin, ");
set_perm(0, 0, 04777, "/system/bin/e2fsck");
set_perm(0, 0, 04777, "/system/bin/tune2fs");
set_perm_recursive(0, 2000, 0755, 0755, "/system/etc/init.d");
set_perm(0, 2000, 0755, "/system/etc/init.d/40a2sd");
set_perm(0, 2000, 0755, "/system/bin/e2fsck");
set_perm(0, 2000, 0755, "/system/bin/tune2fs");
ui_print("-Running aditional scripts");
run_program("installbusybox");
run_program("move_cache_sd");
show_progress(0.200000, 10);
ui_print("-Writing boot.img");
package_extract_file("boot.img","/tmp/boot.img");
write_raw_image("/tmp/boot.img", "boot");
delete("/tmp/boot.img");
show_progress(0.100000, 0);
ui_print("-Flashing Complete");
ui_print("Welcome to");
ui_print("InsertCoin HD Port 1.8f");
ui_print("Remember that 1st boot will take a while");
ui_print("Do not panic, just wait");
ui_print("If you are getting bootloop");
ui_print("Wipe all then reflash");
unmount("/system");
unmount("/sd-ext");
some are rom specific but take them as examples
Also be very carefully what binary you use since there are some version floating around, and with the update-binary comes the syntax.
For example:
with some versions of binary the mount command
Code:
mount("ext4","/dev/block/mmcblk0p2","/sd-ext");
requires 3 parameters
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p26", "/data");
requires 4 if you use only 3 you'll get some error
This happened to me 2 times already
Maybe other commands have changed syntax with other binaries, this is the only one I have encounter.
Hope all the info helps, I'm pretty unskilled on Edify syntax myself, I think I've spent 1 week to convert from update to updater an create a working script
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
this works on any type of ext
delete("/data/local");
delete("/data/app");
delete_recursive("/data/data/com.android.vending/cache");
bro. plz mount ur data partition b4 editing/deleting anything on DATA partition...
run_program("installbusybox");
its not necessary bcoz u already symlink ur busybox in updater-script with this permission.
Code:
set_perm(0, 0, 04755, "/system/xbin/busybox");
Code:
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
package_extract_dir("sdext", "/sd-ext");
mount/format/copy sdext is not a good idea, because the Recovery is not under control of ROM zipfile. ROM can not assume that kernel of recovery support required FS format.
So the best way is mount /sdcard(fat32), copy sd-ext file to /sdcard/, then unzip/copy files at first boot time.
Code:
mount("vfat","/dev/block/mmcblk0p1","/sdcard");
ui_print("Unpacking SDCARD files...");
package_extract_dir("sd-ext", "/sdcard");
ok just flash this file...n check ur sd-ext
ext2.txt
ext3.txt
ext4.txt
ext4_Busybox.txt
if all files r present in sd-ext then ur recovery kernel support ext 2/3/4 file system...
just testing with other file system...
Code:
# Script Version: 1.0
ui_print(" ");
ui_print("-Testing EXT 4 File System With Busybox");
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
package_extract_dir("ext4_Busybox", "/sd-ext");
unmount("/sd-ext");
ui_print(" ");
ui_print("-Testing EXT 4 File System");
mount("ext4","/dev/block/mmcblk0p2","/sd-ext");
package_extract_dir("ext4", "/sd-ext");
unmount("/sd-ext");
ui_print(" ");
ui_print("-Testing EXT 3 File System");
mount("ext3","/dev/block/mmcblk0p2","/sd-ext");
package_extract_dir("ext3", "/sd-ext");
unmount("/sd-ext");
ui_print(" ");
ui_print("-Testing EXT 2 File System");
mount("ext2","/dev/block/mmcblk0p2","/sd-ext");
package_extract_dir("ext2", "/sd-ext");
unmount("/sd-ext");
ui_print(" ");
ui_print("-Testing Completed");
Hi,
ReiserFS file system works with this syntax's
Code:
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
package_extract_dir("ReiserFS", "/sd-ext");
unmount("/sd-ext");
plz give me an btrfs supported kernel...will test it too...
also i know how to patch a recovery with favorite kernel...
this mounts ur ext as ext2 no matter what ext you have or recovery
Code:
~ # busybox mount -t auto /dev/block/mmcblk0p2 /sd-ext
busybox mount -t auto /dev/block/mmcblk0p2 /sd-ext
~ # mount | grep sd-ext
mount | grep sd-ext
/dev/block/mmcblk0p2 on /sd-ext type ext2 (rw,relatime,barrier=1,data=ordered)
~ #
Hi,
after learning more about Edify Syntax...found some useful info...
here is two method for writing boot.img
Code:
package_extract_file("boot.img","/tmp/boot.img");
write_raw_image("/tmp/boot.img", "boot");
delete("/tmp/boot.img");
or
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
#Clean up
format("yaffs2", "MTD", "system");
format("yaffs2", "MTD", "userdata");
run_program("/sbin/busybox", "mount", "-t", "auto", "/dev/block/mmcblk0p2", "/sd-ext");
run_program("/sbin/busybox", "rm", "-rf", "/sd-ext/*");
run_program("/sbin/busybox", "rm", "-rf", "/sdcard/.android_secure/*");
run_program("/sbin/busybox", "umount", "/sd-ext");
run_program("/sbin/e2fsck", "-pv", "/dev/block/mmcblk0p2");
Great TUT!!!!
Could someone give an explanation of how the "show_progess" works?
Thanks
You may have figured this out already but here it is anyway:
The left number is the % complete in the form of 0.9 for 90%, 1.0 for 100% etc. Seems to likes just whole number like 0.9 But 0.95 does not seem to work right. And it does not update until after the prior task ends
The right digit is how long it takes to paint the progress bar for the new % complete. I found that 1 is the best value for all but the last progress. Then for the last jumping from say 30 percent to 90 percent the best number is 4 or else it never display
100% is not worthwhile using since it never gets to display if all tasks are done. Just let it display Update Done on it's own.
I am trying to learn how to create the edify scripts. I have several ring tones and live wall papers that I like to install and want to just flash them instead of using the adb. I have two folders in the root of the zip file the META-INF and system. Under the system folder I have an app folder, with apk's, and a lib folder for their libraries. These were created on Wnidows 7 64bit using Notepad++. One of the best test editors for Windows I may say, been using it for years. There is an extra blank line at the end, just does not show in the code blocks. I am testing this on my Evo 4g running CM7 nightly 91.
Here was my amend script that worked
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
set_perm_recursive 0 0 0755 0644 SYSTEM:lib
show_progress 0.1 10
This is my first edify script that does not work (Status 6)
Code:
show_progress(0.1, 0);
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib");
unmount("/system");
show_progress(0.1, 10);
Then my latest edify script that runs but does not install the files
Code:
ui_print("Installing Live Wall Paper...");
ui_print("Mounting mount points...");
show_progress(0.1, 0);
run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");
package_extract_dir("system", "/system");
show_progress(0.1, 10);
ui_print("Setting Permissions...");
show_progress(0.2, 0);
set_perm_recursive(0, 0, 0755, 0644, "system/app");
set_perm_recursive(0, 0, 0755, 0644, "system/lib");
show_progress(0.2, 10);
ui_print("Unmounting mount points...");
run_program("/sbin/umount", "/system");
ui_print("Update Complete.");
This code works Finally!
Code:
ui_print("Installing Live Wall Paper...");
ui_print("Mounting mount points...");
show_progress(0.1, 0);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
show_progress(0.1, 10);
ui_print("Setting Permissions...");
show_progress(0.2, 0);
set_perm_recursive(0, 0, 0755, 0644, "system/app");
set_perm_recursive(0, 0, 0755, 0644, "system/lib");
show_progress(0.2, 10);
ui_print("Unmounting mount points...");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Update Complete.");
I want to learn this but I'm just going in circles now.
1. Why would my first edify script not run and gave me a "Status 6".
2. Why does run_program("/sbin/busybox", "mount", "/system"); work but not mount("MTD", "system", "/system"); for me.
Any help would be really really helpful. Thanks in advance.
i know many use the dsixda kitchen so here's another way on installing busybox:
set_perm(0, 1000, 0755, "/system/xbin/busybox");
run_program("/sbin/sh","-c",
concat("( cd /system/xbin ; ",
" ./busybox --install -s /system/xbin )"));
Also useful as a temple for executing more then one operation
Below is a list of functions that can be used in Edify scripts and explanations about them.
This info was compiled from here.
Credit: http://www.netmite.com/android/mydro.../releasetools/
As you can see this is from "www.netmite.com/android/mydroid/2.0/build/tools/releasetools/" so it may be outdated.
NOTE: I also compared this info with the leaked DK28 FROYO updater-script, it seems that for the samsung phones BML is used in place of MTD.
If someone can confirm this I will edit the values below.
Note: The double quotes are shown where they are required.
If someone has a better resource for this stuff, please share it!
I hope someone finds this useful.
==================================================
Assert that the current system build fingerprint is one of the given strings.
Code:
assert(file_getprop("/system/build.prop", "ro.build.fingerprint") == "string" ||
file_getprop("/system/build.prop", "ro.build.fingerprint") == "string");
Assert that the build on the device is older (or the same as) the given timestamp.
Code:
assert(!less_than_int(timestamp, getprop("ro.build.date.utc")));
Assert that the device identifier is the given string.
Code:
assert(getprop("ro.product.device") == "string1" ||
getprop("ro.build.product") == "string2");
Asert that the bootloader version is one of the given strings.
Code:
assert(getprop("ro.bootloader") == "string1" ||
getprop("ro.bootloader") == "string2");
Update the progress bar, advancing it over 'frac' over the next 'dur' seconds. 'dur' may be zero to advance it via SetProgress commands instead of by time.
Code:
show_progress(frac, dur);
Set the position of the progress bar within the chunk defined by the most recent ShowProgress call. 'frac' should be in [0,1] format.
Code:
set_progress(frac);
Check that the given file (or MTD reference) has one of the given sha1 hashes. See notes above about MTD!
Code:
assert(apply_patch_check("filepath", "sha1Hash", "sha1Hash"));
Check that there's at least 'amount' space that can be made available on /cache.
Code:
assert(apply_patch_space(amount));
Mount the given 'what' at the given path. 'what' should be a partition name if kind is "MTD", or a block device if kind is "vfat". No other values of 'kind' are supported. See notes above about MTD!
Code:
mount("kind", "what", "path");
Unpack a given directory from the OTA package into the given destination directory.
Code:
package_extract_dir("src", "dst");
Log a message to the screen (if the logs are visible).
Code:
ui_print("message");
Format the given MTD partition. See notes above about MTD!
Code:
format("MTD", "partition");
Delete files
Code:
delete("pathToFile1", "pathToFile2", "pathToFile3");
Apply binary patches to the given srcfile to produce tgtfile (which may be "-" to indicate overwriting the source file.
Code:
apply_patch("sourceFile", "targetFile", targetSHA1, targetSize, "patchSHA1atchFile");
Arrange to update the given firmware image.
Code:
assert(package_extract_file("firmware.bin", "/tmp/firmware.bin"),
write_firmware_image("/tmp/firmware.bin", "firmware.bin"),
delete("/tmp/firmware.bin"));
Write the given package file into the given MTD partition. See notes above about MTD!
Code:
assert(package_extract_file("partition.img", "/tmp/partition.img"),
write_raw_image("/tmp/partition.img", "partition"),
delete("/tmp/partition.img"));
Set file ownership and permissions.
Code:
set_perm(uid, gid, mode, "pathtofile");
Recursively set path ownership and permissions.
Code:
set_perm_recursive(uid, gid, dmode, fmode, "path");
Create symlinks.
Code:
symlink("dest", "pathToLink1", "pathToLink2", "pathToLink3");
RESERVED for updater-script examples.
Syntax:
Code:
Amend Code
Edify Code
Copying a directory from the update package to the phone:
Code:
Amend: copy_dir PACKAGE:system SYSTEM:
Edify: package_extract_dir("system", "/system");
The first parameter is the direct location inside of the package.
The second location is the destination on the phone.
Mounting /data /system and /cache in Edify
Code:
run_program("/sbin/mount", "/dev/block/stl9", "/system");
run_program("/sbin/mount", "/dev/block/stl10", "/data");
run_program("/sbin/mount", "/dev/block/stl11", "/cache");
Printing a UI Message in Edify
Code:
ui_print("Some text here");
Create a symlink in Edify:
Code:
symlink("from","to");
Setting permissions in Edify:
Code:
Single file: set_perm(0, 0, 06755, "/system/xbin/su");
Recursive: set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
Run a program in Edify:
Code:
run_program("filetorun", "option1", "option 2", "option 3");
Delete a location recursively (like Amend's format):
Code:
delete_recursive("/path/to/delete");
Remember that script functions that take options (For example, run_program) must have each item that would require a space between it to be surrounded in double quotes, and followed by a comma. The last parameter must not have a comma afterwards.
Remember that ALL edify commands must end with a semi-colon.
SOURCE
#INTERNET
#XDA
#LITTLE bit MINE
Thank you!
Sent from my HTC One X
hello sir
u have been helping me a lot
i am uploading my update script from my working folder
please tell me if there are any errors as well as will this work while flasing from cwm recovery
First of all,Change the thread title all of us are here to help you
And second,specify what help you want from him,without telling us what help you need he can't help you...
Take this as a suggestion
-Regards
you wont know till you flash it - what works on one device might not work on another even if symantically correct
best thing to do is do what I do - test your own work
marcussmith2626 said:
you wont know till you flash it - what works on one device might not work on another even if symantically correct
best thing to do is do what I do - test your own work
Click to expand...
Click to collapse
hello
ok i changed the mount points but still got status 0 error
here is the coding of updater script
Code:
show_progress(0.1, 0);
ui_print("WELCOME");
ui_print("PANDORA ROM");
mount("rfs", "EMMC", "/dev/block/stl19", "/system");
mount("rfs", "rfs16", "/dev/block/stl11", "/data");
package_extract_file("check_data_app", "/tmp/check_data_app");
set_perm(0, 0, 0777, "/tmp/check_data_app");
run_program("/tmp/check_data_app");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("system", "/system");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/reboot");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
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, 0777, "/system/bin/a2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/00banner");
set_perm(0, 0, 0777, "/system/etc/init.d/01sysctl");
set_perm(0, 0, 0777, "/system/etc/init.d/02firstboot");
set_perm(0, 0, 0777, "/system/etc/init.d/04apps2sd");
set_perm(0, 0, 0777, "/system/etc/init.d/99complete");
set_perm(0, 0, 0777, "/system/bin/launcha2sd");
set_perm(0, 0, 0777, "/system/bin/starta2sd");
set_perm(0, 0, 0777, "/system/bin/jita2sd");
set_perm(0, 0, 0777, "/system/bin/chka2sd");
set_perm(0, 0, 0777, "/system/bin/zipalign");
set_perm(0, 0, 0777, "/system/bin/sysinit");
set_perm(0, 0, 0777, "/system/bin/busybox.a2sd");
set_perm(0, 0, 0644, "/system/bin/apps2sd.hlp");
set_perm(0, 0, 0777, "/system/xbin/a2sd");
set_perm(0, 0, 0777, "/system/bin/dtinstall");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 0, 04755, "/system/xbin/bash");
symlink("/system/xbin/bash", "/system/bin/sh");
set_perm(0, 0, 04755, "/system/xbin/nano");
set_perm(0, 0, 04755, "/system/xbin/sysrw");
set_perm(0, 0, 04755, "/system/xbin/sysro");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/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);
run_program("/data/dtinstall.launch");
delete("/system/bin/dtinstall");
delete("/data/dtinstall.launch");
show_progress(0.2, 10);
unmount("/system");
unmount("/data");
please help
abhishekr700 said:
hello
ok i changed the mount points but still got status 0 error
here is the coding of updater script
please help
Click to expand...
Click to collapse
script looks fine - you probably havent changed the update binary to the one I gave you earlier
here it is again in attachment - unzip and replace the one in your rom zip with it
dont put it in the kitchen working folder - build the rom and then use winrar to open the zip and delete the scripts and then drag the new scripts into the zip folder
marcussmith2626 said:
script looks fine - you probably havent changed the update binary to the one I gave you earlier
here it is again in attachment - unzip and replace the one in your rom zip with it
dont put it in the kitchen working folder - build the rom and then use winrar to open the zip and delete the scripts and then drag the new scripts into the zip folder
Click to expand...
Click to collapse
hurray i replaced the update binary and now i successfully flashed my rom
but my phone got into a bootloop
why??
abhishekr700 said:
hurray i replaced the update binary and now i successfully flashed my rom
but my phone got into a bootloop
why??
Click to expand...
Click to collapse
how long is a bit of string?
logcat it with adb - some file you modded is wrong - probably a jar file but who knows - could be anything
marcussmith2626 said:
how long is a bit of string?
logcat it with adb - some file you modded is wrong - probably a jar file but who knows - could be anything
Click to expand...
Click to collapse
hey logcat gave me this
- exec '/system/bin/sh' failed: No such file or directory (2) -
Click to expand...
Click to collapse
abhishekr700 said:
hey logcat gave me this
Click to expand...
Click to collapse
sounds like you didnt wipe system data and cache and mount system data and cache before you flashed the zip
edit sorry - I assmue that error was on the adb command and not in the logcat it produced as previously thought
thats because you havent installed adb drivers and your phone is not set to usb debugging mode - you will have to add it to the build prop I think - there is a guide somewhere for using adb on a device which cant boot and doesnt have usb debugging turned on
you can always flash stock rom then turn on usb debugging then flash your rom and then take a logcat
marcussmith2626 said:
sounds like you didnt wipe system data and cache and mount system data and cache before you flashed the zip
edit sorry - I assmue that error was on the adb command and not in the logcat it produced as previously thought
thats because you havent installed adb drivers and your phone is not set to usb debugging mode - you will have to add it to the build prop I think - there is a guide somewhere for using adb on a device which cant boot and doesnt have usb debugging turned on
you can always flash stock rom then turn on usb debugging then flash your rom and then take a logcat
Click to expand...
Click to collapse
i wiped
system
cache
dalvik cache
using cmw
i used this command for logcat
adb logcat -v long > logcat.txt
i tested rhis command firsy on my present rom
i had installed my phone drivers earlier
but i dont know how to enable usb debugging on my newly built custom rom
can u detail me abut that build.prop u r talking about
abhishekr700 said:
i wiped
system
cache
dalvik cache
using cmw
i used this command for logcat
adb logcat -v long > logcat.txt
i tested rhis command firsy on my present rom
i had installed my phone drivers earlier
but i dont know how to enable usb debugging on my newly built custom rom
can u detail me abut that build.prop u r talking about
Click to expand...
Click to collapse
add this to the build.prop and default.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
or from adb console you can type (with phone in recovery mode)
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
restart phone and adb should work
its also a good idea when you are building a rom to mod one file at a time and then flash it - otherwise its like trying to find a needle in a haystack if you have no idea which file has the error
marcussmith2626 said:
add this to the build.prop and default.prop
Code:
persist.service.adb.enable=1
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb
its also a good idea when you are building a rom to mod one file at a time and then flash it - otherwise its like trying to find a needle in a haystack if you have no idea which file has the error
Click to expand...
Click to collapse
one thing i noticed after the logcat response that
in/system/bin/ there is a file sh0 and not sh
why is it and do i need to rename it to sh to work
because logcat said that it couldnt fild such file
can that be a erroe and renaming the file fix it
abhishekr700 said:
one thing i noticed after the logcat response that
in/system/bin/ there is a file sh0 and not sh
why is it and do i need to rename it to sh to work
because logcat said that it couldnt fild such file
can that be a erroe and renaming the file fix it
Click to expand...
Click to collapse
here is that file if you need it (unzip the file in attachement and place in system/bin)
I have no sh0 in my folder so im guessing its an incorrectly named file
marcussmith2626 said:
here is that file if you need it (unzip the file in attachement and place in system/bin)
I have no sh0 in my folder so im guessing its an incorrectly named file
Click to expand...
Click to collapse
is sh0 in place of sh can produce error
abhishekr700 said:
is sh0 in place of sh can produce error
Click to expand...
Click to collapse
well if its looking for a filename it cant find thats going to cause an error
unzip the file I gave in my last post and put in bin folder and reflash the rom and see if it boots or you can use adb commands (if usb debugging is enabled)
marcussmith2626 said:
well if its looking for a filename it cant find thats going to cause an error
unzip the file I gave in my last post and put in bin folder and reflash the rom and see if it boots or you can use adb commands (if usb debugging is enabled)
Click to expand...
Click to collapse
can this also cause bootloop
abhishekr700 said:
can this also cause bootloop
Click to expand...
Click to collapse
If a file is missing then yes
why dont you just try it?
abhishekr700 said:
i wiped
system
cache
dalvik cache
using cmw
i used this command for logcat
adb logcat -v long > logcat.txt
i tested rhis command firsy on my present rom
i had installed my phone drivers earlier
but i dont know how to enable usb debugging on my newly built custom rom
can u detail me abut that build.prop u r talking about
Click to expand...
Click to collapse
Never wipe dalvik cache while installing ROM. Only wipe data, cache. Don't wipe Dalvik Cache. Whenever I wipe dalvik cache while installing any STOCK based ROM, I get a bootloop and stuck at Samsung Galaxy y screen.
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands
marcussmith2626 said:
If a file is missing then yes
why dont you just try it?
Click to expand...
Click to collapse
ok placed sh file in system bin
still bootloop
in updater script found this
set_perm(0, 0, 04755, "/system/xbin/bash");
symlink("/system/xbin/bash", "/system/bin/sh");
Click to expand...
Click to collapse
abhishekr700 said:
ok placed sh file in system bin
still bootloop
in updater script found this
Click to expand...
Click to collapse
as long as kitchen created your update script and all you did was edit the top part above the sym links to set the correct mount points it should all work fine
like I said if you are getting bootloops logcat it - its impossible for me to say why it doing it really - could be anything - any little change you have done which is why I said when build building a rom make one change at a time and test