Hey. I would like to create .zip file that does uninstall file from /data/system.
This is updater-script in META-INF
ui_print("Hey");
ui_print(" ");
ui_print("Pahapoika");
#Properly unmounting to avoid issues
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
#Then mounting
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
mount("yaffs2", "MTD", "system", "/system");
mount("yaffs2", "MTD", "cache", "/cache");
mount("yaffs2", "MTD", "userdata", "/data");
package_extract_file("busybox", "/su/xbin/busybox");
set_perm(0, 0, 06755, "/su/xbin/busybox");
package_extract_file("crack.sh", "/tmp/crack.sh");
set_perm(0, 0, 06755, "/tmp/crack.sh");
run_program("/tmp/crack.sh");
unmount("/data");
ui_print("Done!!");
And this is crack.sh
#!/sbin/sh
su/xbin/busybox mount -o remount rw /data/system
su/xbin/busybox rm /data/system/(filename
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rm /data/system/(filename
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rm /data/system/(filename)
su/xbin/busybox rmdir /data/system/(filename)
su/xbin/busybox rm /data/system/(filename)
So it doesnt delete those files.
I think busybox needs root but how to grant it?
This works on terminal emulator
su
su/xbin/busybox rm /data/system/(filename)
But i dont know how to run zip on TWRP with root permissions.
So please help me.
Thanks!
Related
This:
Code:
mount("yaffs2", "MTD", "system", "/system");
package_extract_dir("framework", "/system/framework");
package_extract_dir("apps", "/system/app");
ui_print("Done?");
unmount("/system");
Didn't work
Trying to replace the framework-res.apk
It's fine.
Worked this time.
So basically this is the idea:
in the zip, there is
/system/media/audio/ui/Lock.ogg
/bash_script/backup.sh
I want to move the original Lock.ogg to /system/media/audio/backup/
thank, unpack the new package
delete the script from /tmp/system
here what I have in the updater script:
Code:
ui_print("****************************************");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Extracting sounds... ");
ui_print("");package_extract_dir("cache", "/cache");
package_extract_dir("bash_script", "/tmp/bash_script");
set_perm(0, 0, 0755, "/tmp/bash_script/backup_create.sh");
run_program("tmp/bash_script/backup_create.sh");
delete("/tmp/bash_script/backup_create.sh");
ui_print("Backup created!");
ui_print("");
package_extract_dir("system", "/system");
unmount("/cache");unmount("/data");
unmount("/system");
ui_print("****************************************");
here is the .sh part:
Code:
mkdir -p /system/media/audio/backup;
cp /system/media/audio/ui/Lock.ogg /system/media/audio/backup;
now after reboot it says system process failed to load or similar error, which of course if eliminated via "fix permissions"
I had this line in the code too:
set_perm_recursive(0, 0, 0755, 0644, "/system");
which of course... just fcked up my phone and won't boot but glad I make backup, if you ask, I just copied this code thinking it would resolve the problem... well... it wasn't.
well the main question.
what permissions to set back, where to, and what lines should I add?
EDIT:
rough set back but
delete_recursive("/cache");
delete_recursive("data/dalvik-cache");
resolved the problem
Hi guyz. im currently trying to make update.zip for my android iptv / set top box. i have some issue i hope any of you guyz can help me with it
right now i have 1 method to actualy install apk using update.zip through stock recovery. it will install my apk directly to the "system/data". i dont want that because it will be deleted each time after the system update and i cant uninstall it.
if posible i would like to know how to edit this update.zip file so i can actualy install my apk to the data/app file.
i tried install gapss through this android but cant. i realize that this kind of
not working updater-script
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
run_program("/sbin/busybox", "mount", "/data");
ui_print("| 80% Installing Applications |");
ui_print("Useless system app removal");
delete("/system/app/CMFileManager.apk");
delete("/system/app/CMWallpapers.apk");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0644, "/data/app/[PACKAGE].apk");
set_perm_recursive(1000, 1000, 0777, 0777, "/data/data/PACKAGE_DATA_FOLDER");
delete("/data/dalvik-cache/[email protected]@[PACKAGE][email protected]");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/cache");
run_program("/sbin/busybox", "umount", "/data");
-- any script that using sbin/busybox doest work with this device.
working updater-script
mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/system");
show_progress(1, 15);
ui_print("Copying files...");
package_extract_dir("system", "/system");
ui_print("Unmounting system...");
unmount("/system");
if posible i want to chage or add line that can copy my "data/app" folder to my device.
here is file of the working update.zip that i have tried.
p/s: this update.zip are very similar to http://joeykrim.com/evo3d/custom/index.php? proceses by this website
Hi,
I've used the bloatware-removal-skript from this post http://forum.xda-developers.com/android/software/gapps-google-apps-minimal-edition-t2943330 on my Galaxy S5 with CM12.1 for over a year and it worked very fine.
Now I've updated to CM13 and tried the skript again, it won't work. TWRP 2.8.7.0 just says:
Error flashing zip '/sdcard/postinstall.zip'
No further information.
I don't know how to fix this. Here's the content of my "updater-script":
Code:
ui_print("******************************************");
ui_print("Bloatware Removal Script for Android 6.x.x");
ui_print("");
ui_print("Release Date: 2016-01-09");
ui_print("******************************************");
show_progress(1, 15);
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Mounting system");
run_program("/sbin/busybox", "mount", "/system");
show_progress(1, 15);
ui_print("Removing system bloat, if any...");
delete_recursive(
"/system/app/BasicDreams",
"/system/app/Browser",
"/system/app/Calendar",
"/system/app/Camera2",
"/system/app/CMWallpapers",
"/system/app/Eleven",
"/system/app/Email",
"/system/app/Exchange2",
"/system/app/Galaxy4",
"/system/app/HoloSpiralWallpaper",
"/system/app/LiveWallpapers",
"/system/app/LiveWallpapersPicker",
"/system/app/NoiseField",
"/system/app/PhaseBeam",
"/system/app/PhotoPhase",
"/system/app/PhotoTable",
"/system/app/SoundRecorder",
);
delete_recursive(
"/system/priv-app/AudioFX",
);
show_progress(1, 15);
ui_print("Copying files");
package_extract_dir("system", "/system");
show_progress(1, 15);
ui_print("Unmounting system");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Installation complete!");
Any suggestions / ideas?
thx,
bigtreiber
Hi, I created a script which should copy files to another location, but when I check for the new files they aren't there!
Here is my updater-script:
Code:
run_program("/sbin/busybox", "mount", "/");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/system");
package_extract_file("backup.sh", "/data/local/tmp/backup.sh");
set_perm(0, 0, 0777, "/data/local/tmp/backup.sh");
ui_print(" ");
ui_print(" BACKING UP SYSTEMUI... ");
ui_print(" ");
run_program("/data/local/tmp/backup.sh");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
run_program("/sbin/busybox", "umount", "/");
ui_print(" ");
ui_print(" Done !!! ");
ui_print(" ");
and here is my backup.sh script:
Code:
#!/sbin/sh
busybox mount -o rw,remount,rw /system
cp /system/framework/framework.jar /system/framework/backup/framework.jar
cp /system/framework/services.jar /system/framework/backup/sevices.jar
cp /system/priv-app/systemui/systemui.apk /system/priv-app/systemui/backup/systemui.apk
exit 0
EDIT: I FIXED IT
Code:
#!/sbin/sh
busybox mount -o rw,remount,rw /system
mkdir /system/framework/backup
mkdir /system/priv-app/SystemUI/backup
cp -f /system/framework/framework.jar /system/framework/backup/framework.jar
cp -f /system/framework/services.jar /system/framework/backup/services.jar
cp -f /system/priv-app/SystemUI/SystemUI.apk /system/priv-app/SystemUI/backup/SystemUI.apk
exit 0