MOD Please Delete - Android Software/Hacking General [Developers Only]

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.
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.");
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 my latest edify script run but does nothing.
Any help would be really really helpful. Thanks in advance.

Related

[Q]My first updater-scipt can't copy file. Can you help me :(

My first updater-scipt can't copy file. Can you help me
i running this script on CWM5
This is my file --> http://www.mediafire.com/?n3pit1jilrrw4w1
This is my updater-script code :
Code:
ui_print("Adobe flash player - CWM");
ui_print("***Installing Files");
run_program("/sbin/mount", "/data");
package_extract_dir("data", "/data");
ui_print("***Setting Permissions");
set_perm (0, 0, 0644, "/data/app/com.adobe.flashplayer_111102059_11.1.102.59.apk");
set_perm (0, 0, 0644, "/data/data/com.adobe.flashplayer/lib/libflashplayer.so");
set_perm (0, 0, 0644, "/data/data/com.adobe.flashplayer/lib/libstagefright_froyo.so");
set_perm (0, 0, 0644, "/data/data/com.adobe.flashplayer/lib/libstagefright_honeycomb.so");
set_perm (0, 0, 0644, "/data/data/com.adobe.flashplayer/lib/libysshared.so");
unmount("/data");
ui_print("***Completed Reboot your phone***");
(i'm noob eng)

[Q] custom ROM won't boot

I have an Ainol Novo 7 Basic.
I want to start cooking and this seems like a nice cheap device to start with!
I have made an update.zip using the system folder from the original ics 4.0.3 update.
The updater-script flashes fine in the modded CWM 5.0.5.
After reboot, the device wont boot to android. Just returns to CWM,
Not sure what the problem could be?
Any advice is appreciated.
I am new here and have only been on android just under a year.
I believe it may be a permissions error on my part.
But, I havn't been able to find any clear info on what permissions are needed. Just looked at a couple of other ROM zips updater-scripts for guidance...
Or, maybe there is importance in the order of the commands in updater-script?
here is the updater-script:
Code:
ui_print("<***************-------------------****************>");
ui_print(" Ainol Novo 7 Basic MasterROM 1.0");
ui_print("<***************-------------------****************>");
show_progress(1.000000, 0);
ui_print(" Clearing System...");
format("ext4", "system", "/dev/block/mmcblk0p1", "/system");
ui_print(" Mounting SYSTEM...");
mount("ext4", "system", "/dev/block/mmcblk0p1", "/system");
set_progress(0.140000);
ui_print(" Extracting files to SYSTEM...");
package_extract_dir("system", "/system");
set_progress(0.210000);
ui_print(" Clearing Data...");
format("ext4", "data", "/dev/block/mmcblk0p2", "/data");
ui_print(" Mounting DATA...");
mount("ext4", "data", "/dev/block/mmcblk0p2", "/data");
set_progress(0.280000);
ui_print(" Extracting files to DATA...");
package_extract_dir("data", "/data");
set_progress(0.350000);
ui_print(" Setting Permissions...");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 2000, 0755, 0644, "/system/etc");
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(1000, 1003, 02755, "/system/bin/screenshot");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm_recursive(0, 2000, 0755, 0777, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/init.d");
set_perm(0, 0, 0755, "/system/etc/wifi/wpa_supplicant.conf");
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, 0755, "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/hcitool");
set_perm(0, 0, 06755, "/system/xbin/librank");
set_perm(0, 0, 06755, "/system/xbin/procmem");
set_perm(0, 0, 06755, "/system/xbin/procrank");
set_perm(0, 0, 06755, "/system/xbin/tcpdump");
set_progress(0.490000);
ui_print(" Unmounting DATA...");
unmount("/data");
set_progress(0.770000);
ui_print(" Unmounting SYSTEM...");
unmount("/system");
set_progress(0.840000);
ui_print(" Clearing Cache...");
format("ext4", "cache", "/dev/block/mmcblk0p3", "/cache");
ui_print("****************************************************");
ui_print(" Install complete. Enjoy!");
ui_print("****************************************************");
set_progress(1.000000);
masterjakeway said:
The updater-script flashes fine in the modded CWM 5.0.5.
After reboot, the device wont boot to android. Just returns to CWM,
Not sure what the problem could be?
Click to expand...
Click to collapse
The Novo7 version of CWM is very buggy, it's going to mess up your device. Please, don't use it. Try to reflash the last working version of firmware. You may need to do this twice, first to get native recovery image, then once again to get everything flashed properly with the native recovery.
ps. Friends don't let friends to use CWM on Novo7 Basic/Paladin =)

[Q] updater-script

Can anyone give a syntx error in my updater-script
Trying to flash using stock reocvery in my i9100g and give "status (6)" error
ui_print("SuperSU and Busybox Installer for GT-I9100G");
ui_print("3lo0sh @ XDA 2014");
ui_print("Mounting system...");
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/system /system");
run_program("/sbin/mount", "/");
run_program("/sbin/mount", "/ /");
ui_print("Removing old files")
delete("/system/bin/su");
delete("/system/xbin/su");
delete("/system/bin/daemonsu");
delete("/system/bin/.ext/.su");
delete("/system/etc/install-recovery.sh");
delete("/system/etc/init.d/99SuperSUDaemon");
delete("/system/etc/.installed_su_daemon");
delete("/system/app/Superuser.apk");
delete("/system/app/Superuser.odex");
delete("/system/app/SuperUser.apk");
delete("/system/app/SuperUser.odex");
delete("/system/app/superuser.apk");
delete("/system/app/superuser.odex");
delete("/system/app/Supersu.apk");
delete("/system/app/Supersu.odex");
delete("/system/app/SuperSU.apk");
delete("/system/app/SuperSU.odex");
delete("/system/app/supersu.apk");
delete("/system/app/supersu.odex");
delete("/data/dalvik-cache/*com.noshufou.android.su*");
delete("/data/dalvik-cache/*com.koushikdutta.superuser*");
delete("/data/dalvik-cache/*com.mgyun.shua.su*");
delete("/data/dalvik-cache/*Superuser.apk*");
delete("/data/dalvik-cache/*SuperUser.apk*");
delete("/data/dalvik-cache/*superuser.apk*");
delete("/data/dalvik-cache/*eu.chainfire.supersu*");
delete("/data/dalvik-cache/*Supersu.apk*");
delete("/data/dalvik-cache/*SuperSU.apk*");
delete("/data/dalvik-cache/*supersu.apk*");
delete("/data/dalvik-cache/*.oat");
delete("/data/app/com.noshufou.android.su-*");
delete("/data/app/com.koushikdutta.superuser-*");
delete("/data/app/com.mgyun.shua.su-*");
delete("/data/app/eu.chainfire.supersu-*");
delete_recursive("/system/bin/.ext");
ui_print("Installing SuperSU...");
package_extract_dir("system", "/system");
ui_print("Disabling OTA survival...");
set_perm(0, 0, 0755, "/system/xbin/chattr");
run_program("/system/xbin/chattr", "-i", "/system/xbin/su");
run_program("/system/xbin/chattr", "-i", "/system/bin/.ext/.su");
run_program("/system/xbin/chattr", "-i", "/system/xbin/daemonsu");
run_program("/system/xbin/chattr", "-i", "/system/etc/install-recovery.sh");
delete("/system/xbin/chattr");
ui_print("Setting permissions...");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 0644, "/system/app/Superuser.apk");
set_perm(0, 0, 0644, "/system/app/Superuserpro.apk");
set_perm(0, 0, 04755, "/system/xbin/busybox");
set_perm(0, 0, 0777, "/system/bin/.ext");
set_perm(0, 0, 06755, "/system/bin/.ext/.su");
set_perm(0, 0, 0755, "/system/xbin/daemonsu");
set_perm(0, 0, 0755, "/system/etc/init.d/99SuperSUDaemon");
set_perm(0, 0, 0755, "/system/etc/install-recovery.sh");
set_perm(0, 0, 0644, "/system/etc/.installed_su_daemon");
ui_print("Installing Busybox...");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
ui_print("Post-installation script...")
run_program("/system/xbin/su", "--install")
ui_print("Unmounting system...");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/");
ui_print("Installation complete!");
ui_print("Reboot now!");
Click to expand...
Click to collapse
plz hep me

install app in data/app with updater script

Hi,
i can not install some apps in to data/app folder with updater-script.
What i tryed :
(app in data/app installation zip):
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
run_program("adb", "install", "-r", "added_files/data/app/com.lge.fmradio-1.apk");
run_program("/sbin/busybox", "umount", "/data");
(app in data/app installation zip):
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
unmount("/data");
both scripts run without error and app in data/app folder but it's not installed.
When i install as normal app it's working. Also when install via cmd adb install -r com.lge.fmradio-1.apk it's also installins succesfully.
How to install with updater-script?

Error 6 when flashing custom Rom

Hi!
I have a problem when trying to flash a custom rom made by me in Twrp, Error 6 shows up.
This is the updater-script:
Code:
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);
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
show_progress(0.020000, 10);
mount("ext4", "EMMC", "/dev/block/platform/soc.0/7824900.sdhci/by-name/system", "/system", "");
package_extract_dir("system", "/system")
unmount("/system");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/soc.0/7824900.sdhci/by-name/boot");
show_progress(0.200000, 10);
This is what shows up on recovery.log
Code:
Verifying package compatibility...
Package doesn't contain compatibility.zip entry
I:Zip does not contain SELinux file_contexts file in its root.
I:has_legacy_properties: Found legacy property match!
I:Legacy property environment initialized.
line 10 col 8: syntax error, unexpected STRING, expecting $end
1 parse errors
Updater process ended with ERROR: 6
I:Legacy property environment disabled.
I:Install took 2 second(s).
Thanks

Categories

Resources