[Q] CWM Updater-Script question - Shield Q&A

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

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?

[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] [Upadate Script] What's difference?

What is difference between these mount script
run_program("/sbin/busybox", "mount", "/system");
&
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
someone please explain in brief..
ekhasti said:
What is difference between these mount script
run_program("/sbin/busybox", "mount", "/system");
&
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
someone please explain in brief..
Click to expand...
Click to collapse
in second one, mounting is done without any external app or function. all system functions present in your rom mount the systen. in first you need busybox to mount system.
amit34521 said:
in second one, mounting is done without any external app or function. all system functions present in your rom mount the systen. in first you need busybox to mount system.
Click to expand...
Click to collapse
What mean by "mmcblk0p3"
Some place I see mmcblk0p4 or 2...
What's it??
Can you elaborate this please..
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
ekhasti said:
Can you elaborate this please..
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
Click to expand...
Click to collapse
mmcblk are different mount points for system, data and all. ext4 means type of partition.
amit34521 said:
mmcblk are different mount points for system, data and all. ext4 means type of partition.
Click to expand...
Click to collapse
How we know which mount point for which folder..
i.e. mmcblk0p3 for system...
if I want to mount data or any other root folder then??
sorry for bothering but want to know
I guess for data its stl11. Different devices have different mount points.
Sent from my GT-S6102 using xda app-developers app
ekhasti said:
How we know which mount point for which folder..
i.e. mmcblk0p3 for system...
if I want to mount data or any other root folder then??
sorry for bothering but want to know
Click to expand...
Click to collapse
Download terminal emulator app from play store or using adb shell type in the commands :
Code:
su
cat /proc/partitions
cat /proc/ext4
ls /dev/block
and try to analyze the output. Probably you will get your answer.

What is the best way to mount "system" via Edify?

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!

Categories

Resources