�
package_extract_dir Syntax :
package_extract_dir ("<src-dir>", "<dst-dir>");
Copy content<src-dir>at<dst-dir>. Files in<dst-dir>available in<src-dir>overwritten.
Example :
package_extract_dir ("system", "/ system"); Copies files from the update.zip/system folder to / system
�
package_extract_file Syntax :
package_extract_file ("<src-file>", "<dst-file>"); Copy file<src-file>at<dst-file>. If file<dst-file>exists, it is overwritten.
Example :
package_extract_file ("test.sh", "/tmp/test.sh"); Copies the test.sh file from update.zip to /tmp/test.sh
�
format Syntax :
format ("MTD", "<root>");
Format the partition<root>(see Attachment).
Example :
format ("MTD", "system"); Fully formatted / system. Note: formatting deletes data irreversibly.
Example 2 :
format ("ext4", "EMMC", "/ dev / block / mtdblock5", "0", "/ system"); Determining the number of the block under the spoiler "info and materials."
�
delete Syntax :
delete ("<file1>"[" file2 ", ..." fileN "]);
Deletes file (s)
Example :
delete ("/ system / app / Calculator.apk"); Delete Calculator.apk from the system / app folder.
�
delete_recursive Syntax :
delete_recursive ("<dir1>"[" dir2 ", ..." dirN "]);
Recursively deletes the folder (s) with all its contents.
Example :
delete_recursive ("/ data / dalvik-cache"); Delete the folder / data / dalvik-cache with all its contents.
�
run_program Syntax :
run_program ("<filetorun>"[, "<opt1>", "<opt2>", "<opt3>"]);
Runs the program (script)<filetorun>.
Example :
run_program ("/ tmp / install_busybox.sh"); Run the script /tmp/install_busybox.sh.
�
set_perm Syntax :
set_perm (<uid>, <gid>, <mode>, "<pathtofile>"[ ..." pathtofileN "]); Sets the owner, group and permissions for a file or folder as ‘chmod’, ‘chown’, and ‘chgrp’ all in one
Example :
set_perm (0, 2000, 0550, "/system/etc/init.goldfish.sh"); Set owner, group and permissions for the file /system/etc/init.goldfish.sh
�
set_perm_recursive Syntax : set_perm_recursive (<uid>, <gid>, <dir-mode>, <file-mode>, "<path>"[, ... "<pathN>"])
Recursively sets the owner, group and permissions for the contents of the folder.<dir-mode>- for folders,<file-mode>- for files.
Example :
set_perm_recursive (0, 0, 0755, 0644, "/ system / app"); Set permissions for the contents of / system / app, for folders - 0755, for files - 0644.
�
show_progress Syntax :
show_progress (<fraction>, <duration>); Promotion progress bar to share<fraction>behind<duration>seconds<duration>may be null for advancing it by the set_progress command, and not by time.
Example :
show_progress (0.100000, 1); Increases progress by 0.1 in 1 second.
�
set_progress Syntax :
set_progress (<fraction>); Sets the position of the progress bar to the beat.<fraction>, for the most recent invocation of the show_progress command.
Example :
set_progress (0.500000); �
symlink Syntax :
symlink ("<link target>", "<link-path1 "["<link-path2>", "<link-path3>"]); Creates a symbolic link (like ‘ln-s’).<link-path>written in root format: path, and<link target>in the format of the target file system (and can be relative).
Wikipedia Symlink.
Example :
symlink ("/ data / app_s", "/ system / app"); Creates a symbolic link to the / data / app_s folder for the / system / app folder
�
mount Syntax :
mount ("<kind>", "<what>", "<path>"); Mounts<what>let's hit the road<path>. <what>there should be a section name if<kind>this is "MTD", or a block of memory if<kind>this is "vfat"
Example :
mount ("MTD", "userdata", "/ data"); �
unmount Syntax :
unmount ("<path>"); Disables<path>.
Example :
unmount ("/ data"); �
ui_print Syntax :
ui_print ("<message>"); Displays a message<message>
Example :
ui_print ("Formatting SYSTEM ..."); �
sleep Syntax :
sleep (<time>); Pause process on<time>seconds
Example :
sleep (5); - pause 5 seconds, after which the script code is executed further.
�
wipe data -
Read more Several useful commands to check the version of Android before installing the updateInformation on launching shell scripts using updater-script+ more
option