[Q] ??? How to flash rom with data folder to /data - Android Software/Hacking General [Developers Only]

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!

Related

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

[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

custom recovery with file manager for Asus ME181C (K011)

Hi there guys! I'm looking for a custom recovery with a file manager (probably aroma as is most likely the only one), I've been looking for some hours but can't find anything.
The thing is I forgot the pattern and now I can't unlock my tablet... And I don't want to loose anything (no backup). So I've tried flashing an update.zip to delete the ".key" files inside /data/system but it's not working, I can only use fastboot as I don't have access to the adb shell (it's not enabled).
I'd really appreciate either a custom recovery with aroma (that I can flash using fastboot), or to know why when I flash the zip with the commands to delete these files it's not working?
Code:
ui_print("Mounting System");
run_program("/sbin/busybox", "mount", "/system");
ui_print("Mounting Data");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Deleting Pattern/ PIN Lock Keys");
delete("/data/system/*.key");
ui_print("Unmounting System");
run_program("/sbin/busybox", "umount", "/system");
ui_print("Unmounting Data");
run_program("/sbin/busybox", "umount", "/data");
This is what I tried:
Code:
sudo fastboot flash data update.zip
Why is it not working?
Thanks!

Categories

Resources