• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Updater Script Syntax

Curtis1973

Android Expert
Anyone have any clue what the proper syntax would be for our stock rom in regards to simply installing a "data/apps/" folder upon install of rom??? I have tried multiple methods and all fail with updater binary errors. Need to figure this out.
 
/data/app or /data/apps?

Is app a folder or does the device have a separate /data/app partition? (Very old school.)

Required dumb question - are you mounting it first?

Trying to make the folder?

Want to share what you've done so far?

(I make no promises, I haven't written updater-script pieces in forever.)

Are you trying to do it with a package_extract_dir?

Have you tried moving the files over via a shell script?

package_extract_file("your-install-script.sh", "/tmp/your-install-script.sh");
set_perm(0, 0, 0777, "/tmp/your-install-script.sh");
run_program("/tmp/your-install-script.sh");
 
Last edited:
I enter what most 4.4 roms use to format /data,i always put it directly under the same format syntax for system,then i mount both,then use package extract dir. Does not work. Ill upload the current attempts updater script...just a minute.
 
Try it without the /data symlinks just in case it doesn't like crossing filesystems...

Also maybe try -

run_program("/sbin/mount", "/data");

Instead of the mount you're using.
 
Ok heres what the stock binary always says when trying to format,mount and install to device "/data" no matter what i try. It also always says same thing just wiping and doing a straight flash of the stock rom without any changes UNLESS you wipe first,select reboot recovery where you are notified root is not installed...if you allow twrp to install root then reboot recovery..the rom will not give you a binary error. But this does not apply to trying to flash a data/app directory.
 

Attachments

  • Screenshot_1970-01-05-23-12-51.png
    Screenshot_1970-01-05-23-12-51.png
    26.1 KB · Views: 144
Have not tried your method yet Earlymon but will if I get some free time later this evening. We will hash this out one way or another fellas lol
 
I think it could be that this device does not like the way twrp is writing to the device in certain circumstances via flash. Ive noticed other errors also not related to what im trying to do. For instance,when wiping device and you select caxhe,dalvik-cache,internal storage and data everything wipes fine except you get an error 255 regarding "data/media" every time. I can replicate the error and post a sceeenshot of it for more detail.
 
Ok heres what the stock binary always says when trying to format,mount and install to device "/data" no matter what i try. It also always says same thing just wiping and doing a straight flash of the stock rom without any changes UNLESS you wipe first,select reboot recovery where you are notified root is not installed...if you allow twrp to install root then reboot recovery..the rom will not give you a binary error. But this does not apply to trying to flash a data/app directory.
This is an error with TWRP on most devices lately. Before flashing the rom, go to mounts and uncheck system and data. Should get you past the error.
 
SuperR do you think that this twrp issue would be the indirect cause of not being able to get a data/app directory installed? I have always wiped this way and maybe its causing the issue because im fobbing up things in the way i wipe the system.
 
I am not sure, but I would unmount system and data before flashing to see if it sorts you out. I have had the same error on all my devices running TWRP and the reboot to recovery worked. Then I discovered if you unmount them first there is no problem so it may work for you too :)
 
Back
Top Bottom