help with edify scripting - Android Software/Hacking General [Developers Only]

I'm working on creating a script that allows me to clean up my system when I do ROM updates (like removing unnecessary system files).
I've got it working almost completely, but I'm having trouble figuring out how to mount the data partition so I can remove some apks from there.
Code:
mount("MTD", "data", "/data");
ui_print("Removing Data Apps");
delete("/data/app/com.estrongs.android.pop-1.apk", "/data/app/com.mx.browser-1.apk", "/data/app/com.twitter.android-1.apk");
umount("/data");
This is what I have so far...and I've attached the file that currently works.

For mounting data partition you can use busybox too and for deleting apks you can use delete_recursive parameter
Burned from my laser torch using pencil cells

Mount partitions:
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
Unmount partitions:
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
Delete files:
delete("/system/app/app_name.apk");
Delete dir:
delete_recursive("/path/path");
I hope that helps
Edit, you also might wanna get a log from the recovery session.
run_program("/sbin/busybox", "cp", "/tmp/recovery.log", "/sdcard");
Sent from my HTC One X

jdcnosse said:
I'm working on creating a script that allows me to clean up my system when I do ROM updates (like removing unnecessary system files).
I've got it working almost completely, but I'm having trouble figuring out how to mount the data partition so I can remove some apks from there.
Code:
mount("MTD", "data", "/data");
ui_print("Removing Data Apps");
delete("/data/app/com.estrongs.android.pop-1.apk", "/data/app/com.mx.browser-1.apk", "/data/app/com.twitter.android-1.apk");
umount("/data");
This is what I have so far...and I've attached the file that currently works.
Click to expand...
Click to collapse
Code:
ui_print("------------------"); ui_print("Revolution Cleaner"); ui_print("------------------");
show_progress(0.100000, 0);
run_program("/sbin/busybox", "mount", "data");
run_program("/sbin/busybox", "mount", "/system"); show_progress(0.300000, 0);
ui_print("Removing Modules...");
delete_recursive("/system/lib/modules");
ui_print("Removing System Apps"); delete("/system/app/AppLocker.apk",
"/system/app/AsusReader.apk",
"/system/app/DownloadProviderUi.apk",
"/system/app/GenieWidget.apk",
"/system/app/MEar.apk",
"/system/app/MyCloud.apk",
"/system/app/MyNet.apk",
"/system/app/MyZine.apk",
"/system/app/PixWe.apk",
"/system/app/SoundRecorder.apk",
"/system/app/Vibe2.apk");
ui_print("Adding system customizations"); package_extract_dir("system", "/system"); show_progress(0.200000, 10); show_progress(0.100000, 0); unmount("/system");
ui_print("Adding Kernel..."); package_extract_file("kern.blob", "/tmp/kern.blob"); run_program("/sbin/busybox", "dd", "if=/tmp/kern.blob", "of=/dev/block/mmcblk0p4"); delete("/tmp/kern.blob"); ui_print("Done!");
But I do not see why
Code:
mount("MTD", "data", "/data");
will not work.
Unless it is supposed to be
Code:
mount("MTD", "userdata", "/data");
Code:
mount("MTD", "userdata", "/data"); ui_print("Removing Data Apps"); delete("/data/app/com.estrongs.android.pop-1.apk",
"/data/app/com.mx.browser-1.apk",
"/data/app/com.twitter.android-1.apk"); umount("/data");

Related

[DEV Q] updater-script and edify

can someone smarter than me help me or point me in the right direction to convert my updater-scripts to edify. i think im sort of getting it but i want to make sure because i'm not a programmer. for instance, is the update-binary file required or just updater-script? also, the code posted below, it what i've come up with for flashing my themes, is it correct? and will it work with the new recoveries?
Code:
ui_print("Preparing system for istallation...");
ui_print("Wiping Cache / Dalvik...");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
ui_print("Installing Project_Bliss HD...");
show_progress(0.100000, 60);
package_extract_dir("system", "/system");
show_progress(1.000000, 0);
i am unsure whether or not i will have to mount the specific partitions for data and cache for this to work. i can always leave that part out but the less the person flashing needs to do the better. if i do have to mount in the script will the code below work for just a simple theme flash.
Code:
ui_print("Preparing system for installation...");
run_program("/sbin/mount", "/dev/block/mtdblock4", "/system");
ui_print("Installing Project_Bliss HD...");
show_progress(0.100000, 60);
package_extract_dir("system", "/system");
show_progress(1.000000, 0);
Anyone?
10 char
No one? Hmmmm?
I'm also interested in the same topic..
trying to build rom with dsixida kitchen and converting it from update to updater scripts remove all ui_print functions...
If I add them manually then clockwork refuses to boot that image...
Ditto... same issue about the ui_print... don't get it, because after the update-script gets created to the updater-script/update-binary cant be changed.
try this
show_progress(0.500000, 20);
run_program("/sbin/mount", "/system");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(0.500000, 30);
ui_print("All done!");

[Q] DPI??

So i have my dpi set manually to 440 in build.prop. Is there a way to retain my dpi settings after flashing nightly. I know it's possible with a script but can't find any for nexus 5. Maybe someone here knows how and can kindly guide me. I don't want to use an app. I am running cyanogenmod.
Yeah easy.
Create a flashable zip and in the system folder create a text file called "build_prop.sh"
The contents of which being
Code:
#!/sbin/sh
sed -i 's/density=480/density=440/g' /system/build.prop;
Then in your updater-script, do this
Code:
show_progress(0.500000, 0);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0777, "/system/build_prop.sh");
run_program("sbin/sh", "/system/build_prop.sh");
delete("/system/build_prop.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/sdcard");
ui_print("");
ui_print("...and we're done!");
Sent from my Nexus 5 using Tapatalk

Recovery Flashable ZIP Error

Hi All,
I am trying to create a flash-able zip to remove some apps and I am getting this error
E: error executing updater binary in zip
Now here comes me question: is there a universal update-binary that I can use with CM11 / CM12 and is there a sample how to use it.
This is the updater-script I have written so far
Code:
ui_print("");
ui_print("Moutings Partitions");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" ");
ui_print("Cleaning System Apps");
delete("/system/app/BasicDreams/");
ui_print("Adding Codename Lungo Sounds & Apex Launcher")
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system");
ui_print(" ");
ui_print("Unmounting partitions");
ui_print(" ");
ui_print("Finish");
I am using a Mac if that makes a difference..

cleaning cache with updater-script

what is the proper way to clean cache and dalvik/ART cache with updater-script? I have used this code but it's not doing it properly.
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/cache");
...
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
...
run_program("/sbin/busybox", "unmount", "/data");
run_program("/sbin/busybox", "unmount", "/cache");
What I am doing wrong here? Please help

updater-script and data ?

Hi,
which command to put in updater-script? for the data to install, the standard command does not install them.
******
ui_print("@-> Extraction Data");
run_program("/sbin/mount", "-t", "ext4", "/dev/block/bootdevice/by-name/userdata", "/data");
package_extract_dir("data", "/data");
*****
This command does not work with OREO!
An idea ?

Categories

Resources