Hi guys...
I'm trying to make a flashable zip that copy my user data in "data/data" folder.
I did this:
1) Create a zip file with "data" folder
2) "data" folder has contains "app" and "data"
3) Updater-script contains this:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
unmount("/data");
Click to expand...
Click to collapse
My rom.zip flash correctly the rom and the apps in "data\app" but I don't see my preferences because the files in "data\data" were not copied.
What can I do?
What I must write on updater-script?
Thank you very much!
Example of my rom.zip: DOWNLOAD
SOLUTION:
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
package_extract_dir("sdcard", "/sdcard");
run_program("/sbin/busybox", "umount", "/data");
thanks to (Roadrunner Team Member)
Could you attach a sample zip with some random data (doesn't have to be some paid apps, free ones are sufficient)? Then I could look at the structure...
TheSSJ said:
Could you attach a sample zip with some random data (doesn't have to be some paid apps, free ones are sufficient)? Then I could look at the structure...
Click to expand...
Click to collapse
Thanks.
I do this in first post...
I'm waiting for you...
putting them in /data/data in the zip should work...
try this
package_extract_dir("example", "/data/data");
and put the files in the zip in the map example
owain94 said:
putting them in /data/data in the zip should work...
try this
package_extract_dir("example", "/data/data");
and put the files in the zip in the map example
Click to expand...
Click to collapse
Did you see the attached zip?
I have already done as you say ..
thank you very much
erestor6 said:
Did you see the attached zip?
I have already done as you say ..
thank you very much
Click to expand...
Click to collapse
Yeah i saw it but try the second one
Make a folder like system and data give it a rondom name you like and tell the updater script to flash folder "x" to /data/data
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("x", "/data/data");
set_perm_recursive(x, x, x, x, "/data/data");
unmount("/data");
Sent from my Optimus 2X using xda premium
Code:
mount("MTD", "[B]userdata[/B]", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
unmount("/data");
NickHu said:
Code:
mount("MTD", "[B]userdata[/B]", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
unmount("/data");
Click to expand...
Click to collapse
Thanks but but I already tried this script.
My problem is in "data/data"
owain94 said:
Yeah i saw it but try the second one
Make a folder like system and data give it a rondom name you like and tell the updater script to flash folder "x" to /data/data
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("x", "/data/data");
set_perm_recursive(x, x, x, x, "/data/data");
unmount("/data");
Sent from my Optimus 2X using xda premium
Click to expand...
Click to collapse
What should the value of x?
Code:
mount("EXT3", "/dev/block/mmcblk0p8", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
unmount("/data");
Rusty! said:
Code:
mount("EXT3", "/dev/block/mmcblk0p8", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
unmount("/data");
Click to expand...
Click to collapse
Thanks but my problem is about "data/data" not "data/app"
erestor6 said:
What should the value of x?
Click to expand...
Click to collapse
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("data2", "/data/data");
set_perm_recursive(x, x, x, x, "/data/data");
unmount("/data");
now you need to make your zip like this
- system
- - app
- - bin
- - lib
- - etc
- - etc
- - etc
- data
- - app
- data2
FILES FOR DATA/DATA HERE!! NOT IN A SUB MAP
one dash for folder in root of the zip
double dash for a subfolder in the root folder
for the x just try 777 and see if it flash if it does it will just work with 777
so this line
set_perm_recursive(x, x, x, x, "/data/data");
should be
set_perm_recursive(0777, 0777, 0777, 0777, "/data/data");
just try it i don't know if it even works i hope so!
owain94 said:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
package_extract_dir("data2", "/data/data");
set_perm_recursive(x, x, x, x, "/data/data");
unmount("/data");
now you need to make your zip like this
- system
- - app
- - bin
- - lib
- - etc
- - etc
- - etc
- data
- - app
- data2
FILES FOR DATA/DATA HERE!! NOT IN A SUB MAP
one dash for folder in root of the zip
double dash for a subfolder in the root folder
for the x just try 777 and see if it flash if it does it will just work with 777
so this line
set_perm_recursive(x, x, x, x, "/data/data");
should be
set_perm_recursive(0777, 0777, 0777, 0777, "/data/data");
just try it i don't know if it even works i hope so!
Click to expand...
Click to collapse
I try also in this way but if I go (throught rootexplorer) in "data/data" there are only new files and not my files!
I tried to manually copy my configuration files in "data/data" folder and I immediately see my preferences working.
BUT WHEN I REBOOT THE PHONE I LOST MY PREFERENCES.
I noticed that the fonder that I manually copied in "data/data" had different permissions from the other folders in "data/data".
Other folders in in "data/data", all have the following code in permissions:
"rwxr-x--x"
in my opinion I have to set these permission in "data/data" but I don't know to which numbers correspond this code!
I have to set
set_perm_recursive(?, ?, ?, ?, "/data/data");
to obtain this code "rwxr-x--x"
Im having the same issue. Im trying to replace my libswypecore.so in data/data/com.swype.android.inputmethod ive tried manually doing it in root explorer with no prevail. I tried flashing and the file stays original. Any more ideas of what I can do?
Hunting for albino ducks in a snow storm.
1. get the recovery.log after you've flashed - that will tell you what the script is doing.
2. mount and look in /data/data in recovery before you reboot to tell you what the script left behind
3. log the first boot to see what Android does with /data/data upon boot
Self-help my friend using the tools you have.
Post all of those results if you have no success and we can take another look.
Bad script or bad permissions is my bet.
Probably wouldn't hurt to post up your updater-script for analysis either.
I ended up getting it to work but I think the permissions were screwing it up. At first I had "set_perm_recursive(0777, 0777, 0777, 0777, "/data/data")" and it actually turned my lib folder into some type of file (I don't know what as I have already deleted it). I deleted that line and it flashed. I had to manually edit the permission though. The file seems to be getting replaced from somewhere else tho upon reboot but thats a different thread. Anyone know how to set the "set_perm_recursive(xxxx, xxxx, xxxx, xxxx, "/data/data")" as to obtain permission of rwxr-x--x
smoochiezz24 said:
I ended up getting it to work but I think the permissions were screwing it up. At first I had "set_perm_recursive(0777, 0777, 0777, 0777, "/data/data")" and it actually turned my lib folder into some type of file (I don't know what as I have already deleted it). I deleted that line and it flashed. I had to manually edit the permission though. The file seems to be getting replaced from somewhere else tho upon reboot but thats a different thread. Anyone know how to set the "set_perm_recursive(xxxx, xxxx, xxxx, xxxx, "/data/data")" as to obtain permission of rwxr-x--x
Click to expand...
Click to collapse
That would be:
owner, group, dir, files
So if you want it owned by root (0):
Code:
0, 0, 0755, 0711
Or owned by system (1000)
Code:
1000, 1000, 0755, 0711
But I suspect these will be incorrect... they just don't look right (I'd try 0777, 0755) have a play around with chmod/chown in a recovery console first to see what they need to be.
Either way, 0777 will not work for the first two parameters, the only values you can reliably use here for system level files is 0 or 1000.
Indeed, if you use 0, 0, 0777, 0777 it's guaranteed to work, it's just a little less secure (not that it matters).
So, perhaps start with 1000, 1000, 0777, 0777 and then tighten down the last one to 0755 as necessary.
Hey guys I am from the MIUI Roadrunner Team and here is the code that will work. We use it for our own updater-script and it works perfect
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
package_extract_dir("sdcard", "/sdcard");
run_program("/sbin/busybox", "umount", "/data");
jackmu95 said:
Hey guys I am from the MIUI Roadrunner Team and here is the code that will work. We use it for our own updater-script and it works perfect
Code:
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
package_extract_dir("sdcard", "/sdcard");
run_program("/sbin/busybox", "umount", "/data");
Click to expand...
Click to collapse
It's true!
Thank you very very very much!!
Inviato dal mio LG-P990 usando Tapatalk
updater-script
Code:
ui_print("Mounting SYSTEM Partition...");
#run_program("/sbin/mount", "/hidden");
mount("ext3", "EMMC", "[COLOR="Red"]/dev/block/.............", "/hidden[/COLOR]");
set_perm_recursive(0, 0, 0777, 0777, "/hidden/data/CDA/cda.prop");
package_extract_file("change_cda.sh","/tmp/change_cda.sh");
set_perm(0, 0, 0755, "/tmp/change_cda.sh");
run_program("/tmp/change_cda.sh");
package_extract_dir("hidden", "/hidden/data/CDA");
set_perm_recursive(0, 0, 0755, 0755, "/hidden/data/CDA/cda.prop");
ui_print("Cleaning process...");
delete("/tmp/change_cda.sh");
#run_program("/sbin/umount", "/hidden");
unmount("/hidden");
ui_print("OK...");
change_cda.sh
Code:
#! /hidden/data/CDA
rm [COLOR="red"]/hidden/data/CDA/cda.prop[/COLOR]
echo -e "ro.product.model.num=0017\nro.product.name=SH8188U\nro.product.device=SH8188U\nro.product.model=test\nro.product.brand=Sharp\nro.product.board=Sharp\nro.telephony.num.auto.hyphen=true\nro.telephony.gsm.spn.shortname=true\nro.telephony.gsm.wait.switch=true\nro.telephony.rat.network.select=false\nro.telephony.gsm.sms.auto-reg=false\nro.telephony.add.mccmnctable=false\nro.telephony.spn.support.mvno=false\nro.telephony.fdn.data=false\nro.telephony.configurable.mtu=false\nro.telephony.cphs-spn.support=true\nro.telephony.dun.show=true\nro.telephony.fast.dormancy=true\nro.tether.denied=false\nro.telephony.mvno.sim.spn=false\nro.telephony.croatia.shortcode=false\nro.CDG_MENU_EVDO_ONLY=false\nro.telephony.custom.showspn=false\nro.telephony.gsm.ecclist=110,119,112\nro.telephony.ecclist=110,119,112\nro.telephony.fake.ecclist=110,112,119,911\nro.telephony.cdma.ecclist=110,112,119,911\nro.telephony.cdma.ecm=false\nro.contacts.number.match.length=7\nro.contacts.number.match.minima=0\nro.config.dbgcfgtool=3\nro.DRM_SOLUTION_ID=0\nro.SYSTEM_CTA_MODEL=false\nro.NETWORK_DISABLE_3G_MODULE=false\nro.USB_PLUG_IN_NOTIFICATION=true\nro.LOCKSCREEN_SUPPORT_ROTATION=false\nro.SETTINGS_ENABLE_MSISDN_ALPHA=false\nro.CC_SEC_INC_CALL_OPTIONS=false\nro.SETTINGS_LANG_HIDE_TW_CHINA=false\nro.CALENDAR_FESTIVALS_OPTION=false\nro.SETTINGS_LOCK_PRELOADED_APN=false\nro.PHONE_ENABLE_COUNTRY_CODE=false\nro.MEDIA_ENABLE_SRS=true\nro.FB_ENABLE_HIDE_FOLDER=false\nro.CONTACT_VCARD_VERSION=3.0\nro.NETWORK_SB_CUST_FD_MECH=false\nro.SETTINGS_LOCK_VOICEMAIL_NUM=false\nro.CC_QUERY_CF_ON_BOOT=false\nro.BROWSER_ENABLE_PROXY=false\nro.SETTINGS_REMOVE_SIGNAL_STR=false\nro.SYSTEM_GCF_MODEL=false\nro.CC_HIDE_CB_PW_CHANGE=false\nro.SYSTEM_UI_STYLE_ID=0\nro.SB_SHOW_PLMN=false\nro.SETTINGS_DISABLE_TOUCH_TONE=false\nro.NETWORK_ENABLE_HOTSPOT_SEC=false\nro.CC_ENABLE_MAKE_OOS_CALL=false\nro.NETWORK_NET_MODE_IND=false\nro.NETWORK_ENABLE_OP_LABEL=false\nro.NETWORK_HOTSPOT_AUTO_OFF=false\nro.NETWORK_OP_NAME_OPTION=0\nro.NETWORK_WIFI_SLEEP_POLICY=0\nro.NETWORK_SIGNAL_DISP_STYLE=0\nro.SYSTEM_LED_NOTIFY_STYLE=0\nro.SL_DISABLE_UNLOCK_PROMPT=false\nro.BT_ENABLE_FF_RW=false\nro.MUSIC_DEACTIVATED_BY_FW_BW=false\nro.RSS_DISABLE_COST_PROMPT=false\nro.SETTINGS_HIDE_WIFI_SCAN=false\nro.PHONE_ENABLE_REBOOT_FUNC=false\nro.SYSTEM_SIM_WATCHER=false\nro.CAMERA_DISABLE_H263_ENCODER=false\nro.SYSTEM_SPK_OFF_WHEN_HS_IN=false\nro.NETWORK_REMOVE_GSM_COMBO=false\nro.STANDMODE_ENABLE_TV=false\nro.IME_DISABLE_AUTO_PUNC=false\nro.IME_DISABLE_SHOW_SUGGESTION=false\nro.MEDIA_HIDE_3g2_FILE=false\nro.BROWSER_DL_POPUP_DIALOG=false\nro.CC_HIDE_SIP_UI=false\nro.SYSTEM_DISABLE_LOW_MM_CHECK=false\nro.SYSTEM_ENABLE_FLIP_FONT=false\nro.MUSIC_ENABLE_FORCE_TRNAS_RU=false\nro.com.google.clientidbase=android-sharp\nro.com.google.clientidbase.yt=android-sharp\nro.com.google.clientidbase.am=android-sharp\nro.com.google.clientidbase.gmm=android-sharp\nro.hwt.softbank=false" >> /hidden/data/CDA/cda.prop
Installation complete, but it does not create cda.prop.
Correct me if I'm wrong but isn't /hidden a separate partition. I think you should mount it first......
Sent from my FIH-FB0 using XDA
whyzee said:
Correct me if I'm wrong but isn't /hidden a separate partition. I think you should mount it first......
Sent from my FIH-FB0 using XDA
Click to expand...
Click to collapse
mount where 3-4 ?
i test mount ext3 :crying: missing
comdevx said:
updater-script
Code:
mount("ext3", "EMMC", "[COLOR="Red"]/dev/block/.............", "/hidden[/COLOR]");
Click to expand...
Click to collapse
The correct line should be:
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
mmaacc said:
The correct line should be:
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
Click to expand...
Click to collapse
not work
comdevx said:
not work
Click to expand...
Click to collapse
Actually what do you want to do?if the update script original is ext4,try change all the line to ext4..if you free pm me with you update script,I help you see the update script
---------- Post added at 06:51 PM ---------- Previous post was at 06:39 PM ----------
comdevx said:
updater-script
Code:
ui_print("Mounting SYSTEM Partition...");
#run_program("/sbin/mount", "/hidden");
mount("ext3", "EMMC", "[COLOR="Red"]/dev/block/.............", "/hidden[/COLOR]");
set_perm_recursive(0, 0, 0777, 0777, "/hidden/data/CDA/cda.prop");
package_extract_file("change_cda.sh","/tmp/change_cda.sh");
set_perm(0, 0, 0755, "/tmp/change_cda.sh");
run_program("/tmp/change_cda.sh");
package_extract_dir("hidden", "/hidden/data/CDA");
set_perm_recursive(0, 0, 0755, 0755, "/hidden/data/CDA/cda.prop");
ui_print("Cleaning process...");
delete("/tmp/change_cda.sh");
#run_program("/sbin/umount", "/hidden");
unmount("/hidden");
ui_print("OK...");
change_cda.sh
Code:
#! /hidden/data/CDA
rm [COLOR="red"]/hidden/data/CDA/cda.prop[/COLOR]
echo -e "ro.product.model.num=0017\nro.product.name=SH8188U\nro.product.device=SH8188U\nro.product.model=test\nro.product.brand=Sharp\nro.product.board=Sharp\nro.telephony.num.auto.hyphen=true\nro.telephony.gsm.spn.shortname=true\nro.telephony.gsm.wait.switch=true\nro.telephony.rat.network.select=false\nro.telephony.gsm.sms.auto-reg=false\nro.telephony.add.mccmnctable=false\nro.telephony.spn.support.mvno=false\nro.telephony.fdn.data=false\nro.telephony.configurable.mtu=false\nro.telephony.cphs-spn.support=true\nro.telephony.dun.show=true\nro.telephony.fast.dormancy=true\nro.tether.denied=false\nro.telephony.mvno.sim.spn=false\nro.telephony.croatia.shortcode=false\nro.CDG_MENU_EVDO_ONLY=false\nro.telephony.custom.showspn=false\nro.telephony.gsm.ecclist=110,119,112\nro.telephony.ecclist=110,119,112\nro.telephony.fake.ecclist=110,112,119,911\nro.telephony.cdma.ecclist=110,112,119,911\nro.telephony.cdma.ecm=false\nro.contacts.number.match.length=7\nro.contacts.number.match.minima=0\nro.config.dbgcfgtool=3\nro.DRM_SOLUTION_ID=0\nro.SYSTEM_CTA_MODEL=false\nro.NETWORK_DISABLE_3G_MODULE=false\nro.USB_PLUG_IN_NOTIFICATION=true\nro.LOCKSCREEN_SUPPORT_ROTATION=false\nro.SETTINGS_ENABLE_MSISDN_ALPHA=false\nro.CC_SEC_INC_CALL_OPTIONS=false\nro.SETTINGS_LANG_HIDE_TW_CHINA=false\nro.CALENDAR_FESTIVALS_OPTION=false\nro.SETTINGS_LOCK_PRELOADED_APN=false\nro.PHONE_ENABLE_COUNTRY_CODE=false\nro.MEDIA_ENABLE_SRS=true\nro.FB_ENABLE_HIDE_FOLDER=false\nro.CONTACT_VCARD_VERSION=3.0\nro.NETWORK_SB_CUST_FD_MECH=false\nro.SETTINGS_LOCK_VOICEMAIL_NUM=false\nro.CC_QUERY_CF_ON_BOOT=false\nro.BROWSER_ENABLE_PROXY=false\nro.SETTINGS_REMOVE_SIGNAL_STR=false\nro.SYSTEM_GCF_MODEL=false\nro.CC_HIDE_CB_PW_CHANGE=false\nro.SYSTEM_UI_STYLE_ID=0\nro.SB_SHOW_PLMN=false\nro.SETTINGS_DISABLE_TOUCH_TONE=false\nro.NETWORK_ENABLE_HOTSPOT_SEC=false\nro.CC_ENABLE_MAKE_OOS_CALL=false\nro.NETWORK_NET_MODE_IND=false\nro.NETWORK_ENABLE_OP_LABEL=false\nro.NETWORK_HOTSPOT_AUTO_OFF=false\nro.NETWORK_OP_NAME_OPTION=0\nro.NETWORK_WIFI_SLEEP_POLICY=0\nro.NETWORK_SIGNAL_DISP_STYLE=0\nro.SYSTEM_LED_NOTIFY_STYLE=0\nro.SL_DISABLE_UNLOCK_PROMPT=false\nro.BT_ENABLE_FF_RW=false\nro.MUSIC_DEACTIVATED_BY_FW_BW=false\nro.RSS_DISABLE_COST_PROMPT=false\nro.SETTINGS_HIDE_WIFI_SCAN=false\nro.PHONE_ENABLE_REBOOT_FUNC=false\nro.SYSTEM_SIM_WATCHER=false\nro.CAMERA_DISABLE_H263_ENCODER=false\nro.SYSTEM_SPK_OFF_WHEN_HS_IN=false\nro.NETWORK_REMOVE_GSM_COMBO=false\nro.STANDMODE_ENABLE_TV=false\nro.IME_DISABLE_AUTO_PUNC=false\nro.IME_DISABLE_SHOW_SUGGESTION=false\nro.MEDIA_HIDE_3g2_FILE=false\nro.BROWSER_DL_POPUP_DIALOG=false\nro.CC_HIDE_SIP_UI=false\nro.SYSTEM_DISABLE_LOW_MM_CHECK=false\nro.SYSTEM_ENABLE_FLIP_FONT=false\nro.MUSIC_ENABLE_FORCE_TRNAS_RU=false\nro.com.google.clientidbase=android-sharp\nro.com.google.clientidbase.yt=android-sharp\nro.com.google.clientidbase.am=android-sharp\nro.com.google.clientidbase.gmm=android-sharp\nro.hwt.softbank=false" >> /hidden/data/CDA/cda.prop
Installation complete, but it does not create cda.prop.
Click to expand...
Click to collapse
Or try delete this line "delete ("/tmp/change_cda.sh);"..then try flash again
I tried all the commands.
Not at all.
mount("ext3", "EMMC", "/dev/block/mmcblk1p9", "/hidden");
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/hidden");
mount("ext4", "EMMC", "/dev/block/mmcblk1p9", "/hidden");
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
comdevx said:
I tried all the commands.
Not at all.
mount("ext3", "EMMC", "/dev/block/mmcblk1p9", "/hidden");
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/hidden");
mount("ext4", "EMMC", "/dev/block/mmcblk1p9", "/hidden");
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
Click to expand...
Click to collapse
try this commands
show_progress(0.1, 0);
mount("ext3", "EMMC", "/dev/block/mmcblk0p10", "/hidden");
mount("ext3", "EMMC", "/dev/block/mmcblk0p9", "/hidden/data");
package_extract_dir("hiddendata", "/hidden/data");
and(set permission for you file)
hope this will help you
Ow Thank you very much Project Success :angel::victory::laugh::good::fingers-crossed:
comdevx said:
Ow Thank you very much Project Success :angel::victory::laugh::good::fingers-crossed:
Click to expand...
Click to collapse
Gud..I just try to help what I know
I created two flashable zips that I'd like to use after every rom flash:
One is all my Layers overlay apks and the other is all the font files I want to use.
Here is my updater-script that I use in both zips, the only difference being the ui_print and file names, of course:
Code:
ui_print(" Installing Layers overlays... ");
ui_print(" ");
show_progress(0.99, 30);
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0644, "/system/vendor/overlay");
show_progress(1.0, 1);
unmount("/system");
ui_print("----------------------------------------------");
ui_print("| Done!!! |");
ui_print("----------------------------------------------");
ui_print(" ");
And here is the error I get in recovery when I flash either zip:
Code:
set_perm_recursive() expects 5+ args, got 4
E:Error executing updater binary in zip '/sdcard/Mods/Zips/Layers-Themes-signed.zip'
Error flashing zip '/sdcard/Mods/Zips/Layers-Themes-signed.zip'
Obviously, I did set
Code:
set_perm_recursive(0, 0, 0644, "/system/vendor/overlay");
to be the right permissions. I know that the contents of that directory, /system/vendor/overlay need to be 644 but I don't know the proper edify script syntax for
Code:
set_perm_recursive(0, 0, 0644, "/system/vendor/overlay");
Does anyone know what I need to do differently to make these zips flash properly?
EDIT: I found this post that said that the correct syntax should be: set_perm_recursive(0, 0, 0755, 0644, "/system/vendor/overlay"); instead. Problem solved!!
I know you figured it out, but the set_perm_recursive needs 5 arguments (as stated in the error message you received). It would be for group:user ownership and then permissions for directories & files (in that order) followed by the directory that you're setting permissions in.
imnuts said:
I know you figured it out, but the set_perm_recursive needs 5 arguments (as stated in the error message you received). It would be for group:user ownership and then permissions for directories & files (in that order) followed by the directory that you're setting permissions in.
Click to expand...
Click to collapse
@imnuts, would it be this?
Code:
set_perm_recursive(0, 0, 0, 0755, 0644, "/system/vendor/overlay");
Hi mates, I need your help, thank you!
I would use my old phone (g900v cdi11 locked bootloader) as a videosurvelliance camera, to do that I need that it can reboot automatically if battery runs out and power appears again. To do that I need to change lpm file inside /system/bin folder, switch off phone, plug the power abd check if script lpm file works, if not edit it and check again. . To do that I have these ideas:
1) flash a rooted LL rom, and use a root file manager and overwhite lpm file, is it that easy and possible?
2) Boot on safestrap (which I've already installed and accessible flashing the KK bootloader with Odin, the version is about 2.7.4, don't remember exactly) and chage from there, but the SS file manager don't see any files, probably it's running not rooted (??), maybe /system not mounted, and I don't know all the Unix command I've to type in console to edit lpm or overwrite it, or eventually with ADB.. it copied but in reality I don't know where, it's not /system/bin.
3) so I need to "flash"/install a .zip file containg the /system/bin/lpm file, but for doing this I need a script, which is actually what I'm asking here
4) Any other ideas? Please remember I have a cid11 g900v, so no root on MM, and some other complications unfortunately.
For the script I've tried to arrange from one SS installation, and I tried to save only these lines, but I'm not sure it will do the job, the idea is to create a zip file with system/bin/lpm file and META-INF/com/google/android/updater-script file:
Code:
ui_print("*************************************");
ui_print("* Change lpm *");
ui_print("*************************************");
ui_print("");
unmount("/system");
ui_print("Writing System Files");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
package_extract_dir("system", "/system");
set_progress(0.600000);
ui_print("Setting Permissions...");
ui_print(" ");
#PERM
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
ui_print("------> Done!");
unmount("/system");
ui_print(" ");
ui_print(" Installation complete ");
ui_print(" ");
ui_print(" ");
What is missing eventually?
Thank you!
By the time I solved flashing every time the whole rom (exploded, edited and repacked in Windows), boot It and wit its installation.
It still interesting to read your suggestions, thank you