What is the best way to mount "system" via Edify? - General Questions and Answers

Hi,
I'm currently using mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system") and it works as intended on my Nexus 5, but I fear it might not be the case on other devices.
My question: is there a more generic way to describe the "system" partition? I saw in an old script the following syntax: mount("MTD", "system", "/system") but it takes only 3 args, which is not supported by modern update-binaries.
Thanks in advance!

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] Mounting method?

Hello Experts,
I notice some mounting method is like below:
mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
and some are just like below.
run_program("/sbin/busybox", "mount", "/system");
Was wondering what is the difference between two type of mounting to /system? Is there any significance in terms of permission or memory allocation?

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

[GUIDE] Fix status 6 while flashing ROMs

I assume at least half of Android users get Error status 6 while flashing ROMs. This can be explained in 2 reasons.
Number 1:The developer of the ROM was too stupid to fix this mistake
Click to expand...
Click to collapse
or
Number 2: You are tying to port a ROM and those errors come to you
Click to expand...
Click to collapse
So lets start fixing.
Extract the ROM. Open META-INF com google android and open with Notepad++ updater-scipt.
Find the line called mount("ext4", "EMMC", "/dev/block/some kind of Letters and Numbers ", "/system");
This command is telling the device to mount the system from a path. Each device has a different path.
The path is those some kind of letters and numbers up bellow.
Those numbers and letters are different for every device.
So maybe the letters are not correct and it can't find the path to mount the data.
What we need to do is change the path. For the path that is for your device.
Easiest way to do this is to find a ROM meant and tested for your device, open updater-script, got to the same line and replace the path.
Example change mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system"); to mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
Click to expand...
Click to collapse
You may also find these two lines
format("ext4", "EMMC", "/dev/block/some kind of letters and numbers", "0", "/system");
mount("ext4", "EMMC", "/dev/block/some kind of letters and numbers", "/system");
The first line is telling the device to format the data.
The second line is telling the device to mount the data
The error is similar to the error up.
You need to change the path for the data
But the path for the data is different for the path for the system
So go to the same path on the ROM for your device and change the code
But remember the codes for the data and for the system are not the same.
Example Change format("ext4", "EMMC", "/dev/block/mmcblk0p29", "0", "/system"); and
mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/system"); to format("ext4", "EMMC", "/dev/block/mmcblk0p20", "0", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p20", "/system");
Click to expand...
Click to collapse
And the errors should be fixed.
Post a reply there is still an error.
Leave a tnx or donate if I helped.

[Q] CWM Updater-Script question

It appears that the Shields "system" partition is located at the block device "mmcblk0p4" and is a EXT4 Filesystem. Knowing what very little I do know about the updater-script shell script that runs when flashing a ROM in CWM, I am under the impression that I could mount the "system" partition as follows:
format("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
and mount it with the following:
mount("ext4", "EMMC", "/dev/block/mmcblk0p4", "/system");
Is that correct? Also, agrabren's Tweaker ROM updater-script was designed for system images, but even so, it seemed to follow a different syntax, as in:
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");
if my code above was to be applied to the way he extracted the images to the corresponding block device.
Anyways, please if anybody knows, please tell me if any of those are correct, and if so, which one. I intend to make a CWM flashable ZIP of a 4.3 equivalent of my minisculeShield Nandroid backup, but need to figure this out before the ZIP will even work. Thanks
The only mount syntax that I found working on a Shield Tablet is ::
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system");

Categories

Resources