[tutorial] creating simple update.zip - Samsung Galaxy Mini

creating simple update.zip is very easy if you know all the basics
some basics are as follows
1. folder structure
*META-INF (compulsory)
*system
*data
many folders can be added but for simple update.zip these three are required.
Click to expand...
Click to collapse
2. META-INF folder structure
META-INF> com (certificates lies here)
META-INF> com> google
META-INF> com> google> android (updater-script and update-binary lies here)
Click to expand...
Click to collapse
3. update-binary:-
created in C language cannot be created by anyone, it handles every command which is written in updater-script and do everything from extraction to writing image files
Click to expand...
Click to collapse
4. updater-script:-
this file contains all the commands which are needed to do the work, basic commands are provided below
Click to expand...
Click to collapse
5. update-script common commands:-
Code:
ui_print("");
# put the lines in between "" what you want cwmr to show while flashing
e.g ui_print("text by DHLALIT11");
-------------------------
Code:
show_progress(0, 0);
# before comma is the number by which you want to increase the progress, 1 is complete 0.20 is 20%, after comma is the time until which progress bar will keep progressing when time will be completed progress bar will show 20%
e.g:- show_progress(.50, 5);
-------------------------
Code:
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
# command is used to mount system without mounting nothing can be copied to system (will not work on rfs file system
-------------------------
Code:
package_extract_dir("folder name", "/path");
# this command is used to extract the files which you have copied to system folder of the package to the system folder of the phone
(e.g:- package_extract_dir("system", "/system");
-------------------------
Code:
run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p2", "/data");
# command is used to mount data without mounting nothing can be copied to data (may not work on rfs file system )
-------------------------
Code:
package_extract_dir("data", "/data");
# this command is used to extract the files which you have copied to data folder of the package to the data folder of the phone
-------------------------
package_extract_file("path/to/file", "/path/to/extract");
# command is used to extract the script or any other file to temp folder.
e.g:-
Code:
package_extract_file("script/tool.sh", "/tmp/tool.sh");
-------------------------
Code:
delete_recursive("folder name");
# use to delete a complete folder that can be system, data, cache etc.
e.g:- delete_recursive("/system/media");
# will delete media folder from /system
-------------------------
Code:
delete("file with complete patch");
# use to delete a single file
e.g:- delete("/system/app/app.apk");
# app.apk will be deleted from /system/app
-------------------------
Code:
set_perm(0, 0, 06755, "/system/xbin/su");
# this command is used to give permission to a file, in this scenario we are giving permission to su file to make it work properly.
-------------------------
Code:
set_perm_recursive (1000, 1000, 0771, 0644, "data/app");
# this command is used to give permission to the whole folder, in this scenario we are giving permission to app folder to make it work properly.
Click to expand...
Click to collapse
6. ";" sign must be written after the completion of every command if a single one is missing package will not flash
Click to expand...
Click to collapse
7. adding "#" before any command will tell system not to read that line
Click to expand...
Click to collapse
8. /tmp folder:- a folder where all temporary files like boot.img, updater.sh, modem.bin are extracted
Click to expand...
Click to collapse
9. updater script is very sensitive about line break code if you edit the updater script with any windows editor without changing line break code it will give error so to edit updater script use jota text editor(android) or notepad++(windows)
Click to expand...
Click to collapse
------------------------------------
the file you want copy to system or data through update.zip must be placed in the system or data folder of update.zip along with the folder structure
suppose you want to install busybox then the file must be placed like this:- update.zip> system> xbin> busybox
want to install YouTube as system app then the app must be placed like this:- update.zip> system> app> YouTube.apk
want to install YouTube as data app then the app must be placed like this:- update.zip> data> app> YouTube.apk

Helpful tut !

Good tut but why not just install java and that batch file programme made buy someone here at xda..

freakyfriday said:
Good tut but why not just install java and that batch file programme made buy someone here at xda..
Click to expand...
Click to collapse
you must be talking about d4 update.zip maker
this tut is only to give info
and suppose you are not near to your PC and you want to make a cwm zip then if you know all this you can easily create the package with you android smartphone or tab

please guys reply if you like and if you get something from this tut

dhlalit11 said:
please guys reply if you like and if you get something from this tut
Click to expand...
Click to collapse
OK, Thank you very much for this quick tutorial. It's so useful for me
I think you should add it to your signature to point out it (I didn't notice it untill you had mentioned it in my topic).
I think also you may add some more commands for Updater-Script.
Q: Can I get input from user via CWM? ^_^

I don't like to update my sig with my mobile and am away from my computer from about 1 week don't know when I will update it

Nice.
It should give noobs a guide to modify roms to their liking instead of asking rom devs to remove this and add that,now they can edit the rom themselves and with rootexplorer do it all from your phone.

updated op, there was a mistake in show progress command please read it again

thank.. i found what i need

I finally found this tutorial, as I suspect, like copy-paste it in the same directory.
*sorry for my bad english*

what you want to copy and paste in the same directory

Very well written tutorial !!!. Was very easy to understand.
...
@dheeraj (dhlalit11)
This script is called "edify" script. This is just a suggestion because you have not mentioned it in your tutorial.
...
...
Is it possible to set properties of "build.prop" file from updater-script?. From terminal we can use "setprop" command, is there similar command that can be used in the updater-script. Or may be some busybox command i.e "run_program(...)" ???

you will need to create a script then create its flashable zip in updater-script first extract it to /tmp, make it executable then run it through run program command

awesome............

done editing
guys any fixing needed please reply

What is the difference between mount("yaffs2", "MTD", "system", "/system"); and run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p2", "/data"); ??
I am getting an error - mount() expects 3 args. got 4
Code:
assert(getprop("ro.product.device") == "beni" || getprop("ro.build.product") == "beni" || getprop("ro.product.board") == "beni" ||
getprop("ro.product.device") == "GT-S5670" || getprop("ro.build.product") == "GT-S5670" || getprop("ro.product.board") == "GT-S5670");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
ui_print("Root for AOSP by harryhades");
ui_print("--------------------------------");
show_progress(0.100000, 0);
show_progress(0.500000, 0);
package_extract_dir("system", "/system");
set_perm(0, 0, 06755, "/system/xbin/sqlite3");
set_perm(0, 0, 06755, "/system/xbin/su-v1");
set_perm(0, 0, 06755, "/system/xbin/su-v2");
set_perm(0, 0, 06755, "/system/xbin/su-v3");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/sh");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
#unmount("/system");
P.S: what permssion should be set for the superuser binaries?? i am confused between 06755 and 04755

Harryhades said:
What is the difference between mount("yaffs2", "MTD", "system", "/system"); and run_program("/sbin/busybox", "mount", "/dev/block/mmcblk0p2", "/data"); ??
I am getting an error - mount() expects 3 args. got 4
Code:
assert(getprop("ro.product.device") == "beni" || getprop("ro.build.product") == "beni" || getprop("ro.product.board") == "beni" ||
getprop("ro.product.device") == "GT-S5670" || getprop("ro.build.product") == "GT-S5670" || getprop("ro.product.board") == "GT-S5670");
mount("ext4", "EMMC", "/dev/block/stl12", "/system");
ui_print("Root for AOSP by harryhades");
ui_print("--------------------------------");
show_progress(0.100000, 0);
show_progress(0.500000, 0);
package_extract_dir("system", "/system");
set_perm(0, 0, 06755, "/system/xbin/sqlite3");
set_perm(0, 0, 06755, "/system/xbin/su-v1");
set_perm(0, 0, 06755, "/system/xbin/su-v2");
set_perm(0, 0, 06755, "/system/xbin/su-v3");
set_perm(0, 0, 06755, "/system/xbin/su");
set_perm(0, 0, 06755, "/system/xbin/sh");
set_perm(0, 0, 06755, "/system/xbin/busybox");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
#unmount("/system");
P.S: what permssion should be set for the superuser binaries?? i am confused between 06755 and 04755
Click to expand...
Click to collapse
Just remove it n at last '#' is used for command line!!

from the first command remove the yaffs2
that busybox mount command will mount /data
the permission should be 06755
and also remove those getprop lines they are useless

Please tell permissions for frameworkres.apk
Sent from my GT-S5570 using xda premium

Related

[SOLVED] Updater-script How to flash userdata in "data/data" with cwm???

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

help me /hidden/data/CDA/cda.prop

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

Can't install Holoblur

Hi guys.
I've been trying to install the mighty HoloBlur but I'm unable to. I get error:
set_perm: some changes failed (status 7)
Now, I readed the updater-script and noticed a reference to a file named fixperm.sh. The line says the following:
package_extract_file("system/etc/releasetools/fixperm.sh", "/tmp/fixperm.sh");
set_perm(0, 0, 0777, "/tmp/fixperm.sh");
I looked at that directory on the .zip but didn't find the releasetools folder. Neither the fixperm.sh file.
I deleted that line and another reference to that file, and it advanced. Next I had to modify this line:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
It said that I needed 5 parameters and was only giving 4. I modified it to this:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
And it advanced. But then, error on symlinks:
symlink: some symlinks failed
And because that error didn't specified which ones, I couldn't continue with my quest.
Anybody has an idea how to fix this? Or has a past version of HoloBlur? Original links in the thread don't work. BTW, I'm using Philz Touch 6 with CWM v6.0.4.7

[Fixed] Error Flashing two flashable zips I created

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");

[Help] How overwrite a file in system/bin with Safestrap, with no rooted phone

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

Categories

Resources