FORUMS
Remove All Ads from XDA

[TUTORIAL] The updater-script completely explained

2,303 posts
Thanks Meter: 5,237
 
By KINGbabasula, Recognized Developer on 25th July 2013, 12:32 PM
Post Reply Email Thread
13th September 2013, 10:46 AM |#11  
Dark Wraith's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 885
 
Donate to Me
More
Quote:
Originally Posted by Kurotsuchi

Thanks for the answer buddy, here it's, ( this is for Galaxy note 8.0 ) my previous phones rom didn't have this problem because it was NOT using
MTD.

Problem is with
format("MTD", "system");
mount("MTD", "system", "/system");

Open your ramdisk contents extracted from your kernel. There you should see something like fstab or .fstab. Open those files with notepad++. you will see the path to your system or data..say for xperia s the mount point for the system is dev/block/mmcblk0p12 and format is ext4 so the command becomes format("ext4","EMMC","dev/block/mmcblk0p12") and mount("ext4","EMMC","dev/block/mmcblk0p12)respectively.

Similarly for assert(package_extract_file("boot.img", "/tmp/boot.img").This tells cwm to extract boot.img and load it in /tmp/boot.img which is wrong..again you need to find the mount point of your phone where you need to extract the boot.img...Again taking xperia s as an example. it is
package_extract_file("boot.img", "/dev/block/mmcblk0p3").
Hope that helps
The Following 4 Users Say Thank You to Dark Wraith For This Useful Post: [ View ] Gift Dark Wraith Ad-Free
 
 
13th September 2013, 07:13 PM |#12  
KINGbabasula's Avatar
OP Recognized Developer
Flag Treviso
Thanks Meter: 5,237
 
Donate to Me
More
Quote:
Originally Posted by Kurotsuchi

Thanks for the answer buddy, here it's, ( this is for Galaxy note 8.0 ) my previous phones rom didn't have this problem because it was NOT using
MTD.

Yes it's as Dark Wraith said

Inviato dal mio GT-I9070 con Tapatalk 2
14th September 2013, 06:53 PM |#13  
Kurotsuchi's Avatar
Senior Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by Dark Wraith

Problem is with
format("MTD", "system");
mount("MTD", "system", "/system");

Open your ramdisk contents extracted from your kernel. There you should see something like fstab or .fstab. Open those files with notepad++. you will see the path to your system or data..say for xperia s the mount point for the system is dev/block/mmcblk0p12 and format is ext4 so the command becomes format("ext4","EMMC","dev/block/mmcblk0p12") and mount("ext4","EMMC","dev/block/mmcblk0p12)respectively.

Similarly for assert(package_extract_file("boot.img", "/tmp/boot.img").This tells cwm to extract boot.img and load it in /tmp/boot.img which is wrong..again you need to find the mount point of your phone where you need to extract the boot.img...Again taking xperia s as an example. it is
package_extract_file("boot.img", "/dev/block/mmcblk0p3").
Hope that helps

MANY THANKS BUDDY! really appreciate it,
17th September 2013, 05:53 AM |#14  
dstruct2k's Avatar
Senior Member
Flag Winnipeg
Thanks Meter: 941
 
Donate to Me
More
I seem to remember reading somewhere that you can just replace the update-binary with a shell script in plain text and some recoveries will read it, but I can't seem to find the post. Anyone else know what I'm talking about?

If that's not possible and I've just gone crazy, is there a way to force a reboot into recovery in an Edify script? I'm wanting to fix my bootloader update packages so they automatically reboot back to recovery after install, otherwise the recovery doesn't know the new bootloader version and ROMs still fail on asserts that check it until after a reboot.

EDIT: I just tried using run_program("/sbin/busybox", "reboot", "recovery"); but busybox doesn't understand "reboot recovery" and simply reboots back to the currently installed ROM.
17th September 2013, 06:08 AM |#15  
try this
run_program("/system/xbin/busybox", "reboot recovery");
or
run_program("/system/xbin/busybox", "reboot-recovery");
cant remember but its something like this


EDIT:
@dstruct2k
run_program("/sbin/reboot", "recovery");
is the proper syntax
18th September 2013, 10:34 PM |#16  
dstruct2k's Avatar
Senior Member
Flag Winnipeg
Thanks Meter: 941
 
Donate to Me
More
Quote:
Originally Posted by demkantor

try this
run_program("/system/xbin/busybox", "reboot recovery");
or
run_program("/system/xbin/busybox", "reboot-recovery");
cant remember but its something like this


EDIT:
@dstruct2k
run_program("/sbin/reboot", "recovery");
is the proper syntax

"/sbin/reboot" does not exist in TWRP, is there another way you can think of? Busybox also does not have a reboot-recovery applet, only "reboot" (which starts Android)
18th September 2013, 10:59 PM |#17  
quick google search
https://github.com/syhost/TWRP_CN/bl...-functions.cpp

didnt realize twrp was so different than 4ext recovery and clockwork, as the run_program("/sbin/reboot", "recovery"); works in both of those as i have added them to some of my scripts... Ill look into some more of twrp's handling....
26th September 2013, 06:58 PM |#18  
Monty.728's Avatar
Junior Member
Thanks Meter: 3
 
More
How to do this in micromax a57 can u plzz hlp me
7th October 2013, 03:54 AM |#20  
shoey63's Avatar
Recognized Contributor
Flag Somewhere in Oz...
Thanks Meter: 3,304
 
More
Great guide :thumbup:

Sent from my C6603 using xda app-developers app
8th October 2013, 08:48 PM |#21  
KINGbabasula's Avatar
OP Recognized Developer
Flag Treviso
Thanks Meter: 5,237
 
Donate to Me
More
Quote:
Originally Posted by Monty.728

How to do this in micromax a57 can u plzz hlp me

It depends on what you want to flash. A rom, a file or just a script. Please add more informations


Quote:
Originally Posted by pradeepxtremehacker

good work thanks




Quote:
Originally Posted by shoey63

Great guide :thumbup:

Sent from my C6603 using xda app-developers app



Inviato dal mio GT-I9070 con Tapatalk 2
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes