cleaning cache with updater-script - General Questions and Answers

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

Related

[Q] ??? How to flash rom with data folder to /data

Hi guys,
i was wondering how to edit the updater-script and put some apps in a data/app folder ready to flash....
I thought something like this:
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
run_program("/sbin/busybox", "chmod", "0771", "/data/data");
run_program("/sbin/busybox", "chmod", "0771", "/data/app");
unmount("/data");
Well after flashing this i got a bootloop.
Any suggestions ?
This one can be closed.
No one is interested in this i think
I wondering about how to do that as well.. if someone knows it would be great!

help with edify scripting

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");

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..

Stuck at Sony bootloop after *.zip

Hey,
today I got my Z5 and tried to make myself a Deodexed rom. but somehow after I flash it my phone stucks at the Sony logo for a few seconds and then reboots.
I extracted the /system from the ext4 file, deodexed priv-app, app, framework, and put them into a .zip as well as the updater-script file. It seems to be installed properly, just yea, it boot loops.
Thats my "update-script"-File
show_progress(0.2, 1);
run_program("/sbin/busybox", "mount", "/");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" Extracting files... ");
ui_print(" ");
package_extract_dir("system", "/system");
ui_print(" Setting Permissions... ");
set_perm_recursive(0, 0, 0755, 0644, "/system");
ui_print(" Done... ");
run_program("/sbin/busybox", "umount", "/system");
show_progress(1, 1);
ui_print(" Please Reboot! ");
Click to expand...
Click to collapse

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