FORUMS
Remove All Ads from XDA
Honor 7x
Win an Honor 7X!

[TUTORIAL] The updater-script completely explained

2,303 posts
Thanks Meter: 5,240
 
By KINGbabasula, Recognized Developer on 25th July 2013, 01:32 PM
Post Reply Email Thread
3rd January 2017, 03:28 PM |#61  
Member
Thanks Meter: 6
 
More
How can I create a flashable zip with user apps in it (e.g; twitter, evernote, flipboard, paytm etc)? I have tried old methods of creating my own flashable zip file but that doesn't work with the latest Android 7.1.1. Please help me either with a template zip file or the process.
Thanks in advance!
 
 
3rd January 2017, 04:50 PM |#62  
Primokorn's Avatar
Recognized Contributor / Themer
Thanks Meter: 7,166
 
More
Quote:
Originally Posted by jassun16

How can I create a flashable zip with user apps in it (e.g; twitter, evernote, flipboard, paytm etc)? I have tried old methods of creating my own flashable zip file but that doesn't work with the latest Android 7.1.1. Please help me either with a template zip file or the process.
Thanks in advance!

Titanium Backup allows you to create an update-zip file to flash it from the recovery. You can use it as a template.
As for me, I have to boot to Android then reboot into TWRP to be able to successfully install Titanium Backup (user app).
The Following User Says Thank You to Primokorn For This Useful Post: [ View ] Gift Primokorn Ad-Free
3rd January 2017, 06:18 PM |#63  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by Primokorn

Titanium Backup allows you to create an update-zip file to flash it from the recovery. You can use it as a template.
As for me, I have to boot to Android then reboot into TWRP to be able to successfully install Titanium Backup (user app).

Thanks for the reply and the idea is awesome. I tried myself doing the same but some of the apps are forcing closing after installing through the zip file created. Also is it possible to use "adb install <file>" command in the update-script? If so how? Is it possible to update the system apps (stock apps by google) in this kind of zip format??
4th January 2017, 09:25 AM |#64  
Primokorn's Avatar
Recognized Contributor / Themer
Thanks Meter: 7,166
 
More
Quote:
Originally Posted by jassun16

Thanks for the reply and the idea is awesome. I tried myself doing the same but some of the apps are forcing closing after installing through the zip file created. Also is it possible to use "adb install <file>" command in the update-script? If so how? Is it possible to update the system apps (stock apps by google) in this kind of zip format??

I'm used to restoring user apps from Titanium Backup but I don't think you can use this adb command.
You can install a newer version of any system apps (/system/app and/or system/priv-app).
The Following User Says Thank You to Primokorn For This Useful Post: [ View ] Gift Primokorn Ad-Free
4th January 2017, 12:24 PM |#65  
Member
Thanks Meter: 6
 
More
Quote:
Originally Posted by Primokorn

I'm used to restoring user apps from Titanium Backup but I don't think you can use this adb command.
You can install a newer version of any system apps (/system/app and/or system/priv-app).

Thank you so much for the help.
26th March 2017, 09:49 AM |#66  
Junior Member
Thanks Meter: 0
 
More
Error status 0
Hi, i got error status 0 when i tried flashing my custom android 6.0 for my Wiko Lenny 2 lollipop device
here's my updater-script
Quote:

show_progress(0.1, 0);
format("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system");
package_extract_dir("system", "/dev/block/platform/mtk-msdc.0/by-name/system" );
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/cmp");
symlink("debuggerd", "/system/bin/csview");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pair_devlist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm(0, 1000, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
set_perm(0, 0, 06755, "/system/xbin/su");
symlink("/system/xbin/su", "/system/bin/su");
set_perm(0, 0, 04755, "/system/xbin/bash");
symlink("/system/xbin/bash", "/system/bin/sh");
set_perm(0, 0, 04755, "/system/xbin/nano");
show_progress(0.1, 10);
show_progress(0.2, 0);
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/platform/mtk-msdc.0/by-name/boot"),
delete/tmp/boot.img"));
show_progress(0.2, 10);
unmount("/system");

6th April 2017, 02:38 AM |#67  
demonseedxp's Avatar
Member
Flag Charlotte
Thanks Meter: 10
 
More
Im attempting to tweak a modded 6.0 Touchwiz Rom that has pre packaged the supersu and busybox installers with the rom. Which is fine except su is defaulting to system mode and what I really need is systemless. So magisk can be added without breaking root.
I've been reading for a while now and still haven't run across a way to execute a terminal command (echo SYSTEMLESS=true>>/data/.supersu) from the updater-script, is this even possible, or perhaps a busybox applet that can be called to perform the task?

I'm still very green when it comes to modding at this level, but I'm trying to learn! any help would be greatly appreciated!
10th May 2017, 01:10 AM |#68  
01 Vlatce's Avatar
Senior Member
Thanks Meter: 104
 
More
Is there any way to give an app root permission with the updater-script?
Let say TitaniumBackup.apk is in my Apps.zip > data/app/TitaniumBackup.apk (or sytem/app) and i install it in recovery with package_extract_dir("data", "/data"); After this, can i give TitaniumBackup.apk root permission?
9th July 2017, 05:19 PM |#69  
ShreyanshLodha's Avatar
Senior Member
Flag Bangalore
Thanks Meter: 273
 
More
when I write
package_extract_dir("system", "/system");
in the script i get
/tmp/updater: line 123: syntax error: unexpected word (expecting ")")
without the package_extract_dir its all fine.
Can anyone tell what the issue maybe?
9th July 2017, 09:00 PM |#70  
Quote:
Originally Posted by ShreyanshLodha

when I write
package_extract_dir("system", "/system");
in the script i get
/tmp/updater: line 123: syntax error: unexpected word (expecting ")")
without the package_extract_dir its all fine.
Can anyone tell what the issue maybe?

Try it without the quote marks.

Sent from my Sony Xperia XA1 using XDA Labs
26th October 2017, 08:25 PM |#71  
cd993's Avatar
Senior Member
Flag London
Thanks Meter: 169
 
More
Debloat script failing in TWRP with Error:6
Hi all, anyone able to offer an insight as to why my attempt at a debloat script results with TWRP Error code 6?

Code:
ui_print("");
ui_print("");
ui_print("Galaxy S8 Debloat Script");
ui_print("");
ui_print("");
run_program("/sbin/busybox", "mount", "/data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
delete(“/system/app/EasterEgg");
ui_print("Done!");
ui_print(" ");
delete_recursive("/cache");
delete_recursive("/data/dalvik-cache");
run_program("/sbin/busybox", "unmount", "/data");
run_program("/sbin/busybox", "unmount", "/system");
run_program("/sbin/busybox", "mount", "/cache");
It's my early attempt and I'll add more system apps to be removed in time, though upon flashing I get the error. I have selected Encoding = ANSI and EOL Conversion = UNIX within Notepadd++. I've zipped it as Store compression method along with being a .zip archive.

I've got rooted Galaxy S8.

I've attached the debloat script zip for reference.

Thanks in advance!
Attached Files
File Type: zip s8 debloat new.zip - [Click for QR Code] (343.6 KB, 10 views)
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