[TUTORIAL] The updater-script completely explained

2,301 posts
Thanks Meter: 5,268
By KINGbabasula, Inactive Recognized Developer on 25th July 2013, 12:32 PM
Post Reply Email Thread
8th October 2013, 08:48 PM |#21  
KINGbabasula's Avatar
OP Inactive Recognized Developer
Flag Treviso
Thanks Meter: 5,268
Donate to Me
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

Originally Posted by pradeepxtremehacker

good work thanks

Originally Posted by shoey63

Great guide :thumbup:

Sent from my C6603 using xda app-developers app

Inviato dal mio GT-I9070 con Tapatalk 2
11th October 2013, 02:14 PM |#22  
Account currently disabled
New Delhi
Thanks Meter: 410
how to set permissions like this??
I will be glad if you me for changing some permissions in root directory.

I have attached Screenshot from what i currently have and what permissions i do want to have, if you have knowledge regarding this please guide me.

I need to change these permissions coz after a factory RESET these files get deleted and i get some serious errors of WIFI and IMEI. than again i need to put these files in the ROOT.

this is located in root/data/nvram

Thanks in advance..
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2013-10-11-13-59-29-picsay.jpg
Views:	575
Size:	96.3 KB
ID:	2317676  
13th November 2013, 05:20 AM |#23  
tejasjani55's Avatar
Flag Surendranagar
Thanks Meter: 14
How can I know that numbers of permission?

Sent from my ST21i using XDA Premium 4 mobile app

---------- Post added at 10:50 AM ---------- Previous post was at 10:50 AM ----------

Guide to gid uid and permission mode for diff path

Sent from my ST21i using XDA Premium 4 mobile app
19th December 2013, 09:44 PM |#24  
Shaftamle's Avatar
Recognized Themer
Flag Ellicott City
Thanks Meter: 5,353
Donate to Me
I see these 2 a lot. What is the difference? Pro's and Con's? Why use one and not the other? Thanks!

mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");


run_program("/sbin/busybox", "mount", "/system");

Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
19th December 2013, 09:46 PM |#25  
insan.waq3y's Avatar
Thanks Meter: 12
28th February 2014, 07:36 AM |#26  
Senior Member
Flag Manila
Thanks Meter: 151
Thanks for the guide. One thing though, what's the difference in installing busybox. I've often seen this code

symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");

whereas in others, they're just symlinks like in the op

symlink("busybox", "/system/xbin/[", "/system/xbin/[[",
"/system/xbin/adjtimex", "/system/xbin/arp", "/system/xbin/ash",
"/system/xbin/awk", "/system/xbin/base64", "/system/xbin/basename",
"/system/xbin/bbconfig", "/system/xbin/blkid", "/system/xbin/blockdev",
"/system/xbin/brctl", "/system/xbin/bunzip2", "/system/xbin/bzcat",
"/system/xbin/bzip2", "/system/xbin/cal", "/system/xbin/cat",
"/system/xbin/catv", "/system/xbin/chattr", "/system/xbin/chgrp",
"/system/xbin/chmod", "/system/xbin/chown", "/system/xbin/chroot",
"/system/xbin/clear", "/system/xbin/cmp", "/system/xbin/comm",
"/system/xbin/cp", "/system/xbin/cpio", "/system/xbin/crond",
"/system/xbin/crontab", "/system/xbin/cut", "/system/xbin/date",
"/system/xbin/dc", "/system/xbin/dd", "/system/xbin/depmod",
"/system/xbin/devmem", "/system/xbin/df", "/system/xbin/diff",
"/system/xbin/dirname", "/system/xbin/dmesg", "/system/xbin/dnsd",
"/system/xbin/dos2unix", "/system/xbin/du", "/system/xbin/echo",
"/system/xbin/ed", "/system/xbin/egrep", "/system/xbin/env",
"/system/xbin/expand", "/system/xbin/expr", "/system/xbin/false",
"/system/xbin/fbsplash", "/system/xbin/fdisk", "/system/xbin/fgrep",
"/system/xbin/find", "/system/xbin/flash_lock",
"/system/xbin/flash_unlock", "/system/xbin/flashcp",
"/system/xbin/flock", "/system/xbin/fold", "/system/xbin/free",
"/system/xbin/freeramdisk", "/system/xbin/fstrim", "/system/xbin/fsync",
"/system/xbin/ftpget", "/system/xbin/ftpput", "/system/xbin/fuser",
"/system/xbin/getopt", "/system/xbin/grep", "/system/xbin/groups",
"/system/xbin/gunzip", "/system/xbin/gzip", "/system/xbin/halt",
"/system/xbin/head", "/system/xbin/hexdump", "/system/xbin/id",
"/system/xbin/ifconfig", "/system/xbin/inetd", "/system/xbin/insmod",
"/system/xbin/install", "/system/xbin/ionice", "/system/xbin/iostat",
"/system/xbin/ip", "/system/xbin/kill", "/system/xbin/killall",
"/system/xbin/killall5", "/system/xbin/less", "/system/xbin/ln",
"/system/xbin/losetup", "/system/xbin/ls", "/system/xbin/lsattr",
"/system/xbin/lsmod", "/system/xbin/lsusb", "/system/xbin/lzcat",
"/system/xbin/lzma", "/system/xbin/lzop", "/system/xbin/lzopcat",
"/system/xbin/man", "/system/xbin/md5sum", "/system/xbin/mesg",
"/system/xbin/mkdir", "/system/xbin/mke2fs", "/system/xbin/mkfifo",
"/system/xbin/mkfs.ext2", "/system/xbin/mkfs.vfat",
"/system/xbin/mknod", "/system/xbin/mkswap", "/system/xbin/mktemp",
"/system/xbin/modinfo", "/system/xbin/modprobe", "/system/xbin/more",
"/system/xbin/mount", "/system/xbin/mountpoint", "/system/xbin/mpstat",
"/system/xbin/mv", "/system/xbin/nanddump", "/system/xbin/nandwrite",
"/system/xbin/nbd-client", "/system/xbin/netstat", "/system/xbin/nice",
"/system/xbin/nohup", "/system/xbin/nslookup", "/system/xbin/ntpd",
"/system/xbin/od", "/system/xbin/patch", "/system/xbin/pgrep",
"/system/xbin/pidof", "/system/xbin/ping", "/system/xbin/pipe_progress",
"/system/xbin/pkill", "/system/xbin/pmap", "/system/xbin/poweroff",
"/system/xbin/printenv", "/system/xbin/printf", "/system/xbin/ps",
"/system/xbin/pstree", "/system/xbin/pwd", "/system/xbin/pwdx",
"/system/xbin/rdev", "/system/xbin/readlink", "/system/xbin/realpath",
"/system/xbin/renice", "/system/xbin/reset", "/system/xbin/resize",
"/system/xbin/rev", "/system/xbin/rm", "/system/xbin/rmdir",
"/system/xbin/rmmod", "/system/xbin/route", "/system/xbin/run-parts",
"/system/xbin/rx", "/system/xbin/sed", "/system/xbin/seq",
"/system/xbin/setconsole", "/system/xbin/setserial",
"/system/xbin/setsid", "/system/xbin/sh", "/system/xbin/sha1sum",
"/system/xbin/sha256sum", "/system/xbin/sha3sum",
"/system/xbin/sha512sum", "/system/xbin/sleep", "/system/xbin/sort",
"/system/xbin/split", "/system/xbin/stat", "/system/xbin/strings",
"/system/xbin/stty", "/system/xbin/sum", "/system/xbin/swapoff",
"/system/xbin/swapon", "/system/xbin/sync", "/system/xbin/sysctl",
"/system/xbin/tac", "/system/xbin/tail", "/system/xbin/tar",
"/system/xbin/taskset", "/system/xbin/tee", "/system/xbin/telnet",
"/system/xbin/telnetd", "/system/xbin/test", "/system/xbin/tftp",
"/system/xbin/tftpd", "/system/xbin/time", "/system/xbin/timeout",
"/system/xbin/top", "/system/xbin/touch", "/system/xbin/tr",
"/system/xbin/traceroute", "/system/xbin/true", "/system/xbin/ttysize",
"/system/xbin/tune2fs", "/system/xbin/umount", "/system/xbin/uname",
"/system/xbin/uncompress", "/system/xbin/unexpand", "/system/xbin/uniq",
"/system/xbin/unix2dos", "/system/xbin/unlzma", "/system/xbin/unlzop",
"/system/xbin/unxz", "/system/xbin/unzip", "/system/xbin/uptime",
"/system/xbin/usleep", "/system/xbin/uudecode", "/system/xbin/uuencode",
"/system/xbin/vi", "/system/xbin/watch", "/system/xbin/wc",
"/system/xbin/wget", "/system/xbin/which", "/system/xbin/whoami",
"/system/xbin/xargs", "/system/xbin/xz", "/system/xbin/xzcat",
"/system/xbin/yes", "/system/xbin/zcat");
4th March 2014, 03:36 PM |#27  
FBis251's Avatar
Senior Member
Thanks Meter: 3,761
Donate to Me
Hey, great tutorial. Do you think it'd be a good idea to also add what parameters each function takes? For example unmount will only take one parameter but symlink can take 2 or more. It would be good to see which parameter does what and the number of expected parameters.

Thanks for the writeup!
3rd April 2014, 08:56 AM |#28  
Originally Posted by KINGbabasula

Hi all XDA Members
This is not at all an updater-script guide but an explanation


Can you tell me what is the difference between:
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
run_program("/sbin/busybox", "mount", "/system");
and what and how should I use to be able to copy files to
- how can I determine partition/mount point - I am still bit a lost in this so I don't know how to design my updater-script...
this is what I have now - but I am not sure it will be working - or it will not damage the phone:
run_program("/sbin/busybox", "mount", "/res");
delete("/res/customconfig/customconfig-helper", "/res/customconfig/customconfig.xml", "/res/customconfig/actions/push-actions/config_backup_restore");
package_extract_dir("res", "/res");
set_perm(0, 0, 6755, "/res/customconfig/customconfig-helper", "/res/customconfig/customconfig.xml", "/res/customconfig/custom.profile", "/res/customconfig/actions/push-actions/config_backup_restore");
run_program("/sbin/busybox", "unmount", "/res");
thank you for any help (the script should help me to create some custom features for the kernel I use which is operated by STweaks app)
11th April 2014, 09:38 AM |#29  
Thanks Meter: 9
Anyone know how to reboot-bootloader via an ?

I have a Lenovo K910 i'm trying to Unbrick, any help is much appreciated.
25th June 2014, 09:55 AM |#30  
Junior Member
Thanks Meter: 3
Syntax for comments / comment / commenting
5th August 2014, 02:28 PM |#31  
Nikhil's Avatar
Senior Member
Flag Ahmedabad
Thanks Meter: 2,180
Donate to Me
@KINGbabasula could you explain about symlink more?
Written in OP isn't enough for my project!
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes