Code:
show_progress 0.100000 0
ui_print =-=-=-=-=-=-=-=
ui_print XDA-Developers
ui_print DeoDex Droid x2
ui_print Android 2.3.4
ui_print By: Peperm1nt
ui_print =-=-=-=-=-=-=-=
ui_print
ui_print
ui_print Cleaning...
delete_recursive /system/app
delete_recursive /system/framework
show_progress 0.400000 0
ui_print Extracting Files...
package_extract_dir system /system
show_progress 0.700000 0
ui_print Setting permissions...
set_perm_recursive 0 0 0755 0644 /system
set_perm_recursive 0 0 0755 0644 /framework
show_progress 1.000000 0
ui_print DeoDex Complete!! Enjoy
I have been trying to fix this for at least an hour. I've tried using
ui_print("");
Type of codes and still get nowhere. I always end up with Syntax Error. From what I can see, all the commands are fine. For reference, Yes there is a blank line in the end.
Thanks
ANSWER: ui_print doesnt work in these type of commmands. You need the binary and the script to be updater-script for the ui_print command to work
ie ui_print("");
You're Using Edify For An "update-script" When You Should Be Using Amend Commands.
Ok, how do I go to amend commands?
EDIT: THis is amend. I also tried Edify
Using Notepad++ Save These Files As "All Files"
Also Be Sure To Add In The "update-binary" That Came With The Rom You're Using.
This File Needs To Be Named "updater-script"
Code:
ui_print("=-=-=-=-=-=-=-=");
ui_print("XDA-Developers");
ui_print("DeoDex Droid X2");
ui_print("Android 2.3.4");
ui_print("By: Peperm1nt");
ui_print("=-=-=-=-=-=-=-=");
ui_print("");
ui_print("");
ui_print("");
ui_print("Cleaning...");
ui_print("");
ui_print("");
ui_print("Extracting Files...");
ui_print("");
ui_print("");
ui_print DeoDex Complete!! Enjoy
Name This File "update-script"
Code:
show_progress 0.1 0
delete SYSTEM:/system/app
delete_recursive SYSTEM:framework
show_progress 0.4 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.7 0
set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:framework
show_progress 1.0 0
If its edify script you want it needs to be called updater-script and you need an update-binary with it. If you want Amend then u just need an update-script.
Sent from my DROID X2 using XDA App
ryman222 said:
If its edify script you want it needs to be called updater-script and you need an update-binary with it. If you want Amend then u just need an update-script.
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
Right Edify is
ui_print("Hello World");
Amend is
ui_print Hello World
When using edify, you need the update-binary and updater-script
Amend you just need update-script without the binary.
I understand this. But for some reason, I CAN NOT get past syntax error, although I did rename my script to updater-script and it hangs on installing script. I guess cause of no binary. But just giving an update. Idk how to make an update-binary to go with this script otherwise I would try that as well.
For Reference Im using the amend(ui_print Hello World).
Try taking one from one of the atrix ports.
Sent from my DROID X2 using XDA App
Also I think this line might be wrong but I'm not positive. Just a suggestion.
Code:
delete SYSTEM:/system/app
Edit: I'm not very good with Amend scripts.
Sent from my DROID X2 using XDA App
ryman222 said:
Also I think this line might be wrong but I'm not positive. Just a suggestion.
Code:
delete SYSTEM:/system/app
Edit: I'm not very good with Amend scripts.
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
show_progress 0.100000 0
delete_recursive /system/app
delete_recursive /system/framework
THat is what im using and its from the Eclipse script if I'm not mistaken. idk what the deal is. Encoding is fine.
ryman222 said:
Try taking one from one of the atrix ports.
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
update-binary has to be from updater-script doesnt it?
I thought it had had to do withthe version of Android running, that's why I suggested Atrix ones.
Sent from my DROID X2 using XDA App
But again Idk.
Sent from my DROID X2 using XDA App
I'll try it later, but regardless the one used should work... Syntax error implies command if I'm not mistaken, and all the commands are correct from what I can tell.
Sent from my DROID X2 using Tapatalk
Moved to proper forum.
Appolgeez, figured this would go dev cause of it being a script.. But does anyone have a suggestion? Would it be the ui_print lines?
Sent from GBP7 xSquared
Bump
Sent from GBP7 xSquared
Did You Try What The Syntax I Gave You This Morning?
It showing it as two separate scripts edified and I need the binary script for edify and I don't know how to compile that.
Sent from GBP7 xSquared
Also Be Sure To Add In The "update-binary" That Came With The Rom You're Using.
Click to expand...
Click to collapse
Did You Miss That Part?
MikeJ92YJ said:
Did You Miss That Part?
Click to expand...
Click to collapse
From the atrix port? Won't work will it?
If eclipse can run the same syle on 2.3.3, I SHOULD be able to run one on 2.3.4.
Related
Hey everyone just thought that this info might be useful to the this community...
this info is already available, though in parts, over XDA forums.. so i thought that i will try n make it easily available/understandable to all users here...
seems this info is useful to other android users too... so will try and post generic as well as X10 specific info...
WARNING:
I AM NOT RESPONSIBLE FOR THE FILES THAT U CREATE USING THIS INFO
I AM NOT RESPONSIBLE IF U LOOSE UR DATA WHEN TRYING THIS OUT
REMEMBER THIS DEALS WITH SYSTEM MODIFICATIONS AND ANY WRONG COMMAND CAN RENDER UR CURRENT ROM UNUSABLE/BROKEN
SO BE SURE U CAN USE FLASHTOOL TO FLASH STOCK FW IF U END UP WITH UNUSABLE/BROKEN SYSTEM
DO NOT CIRCULATE THE UPDATE.ZIPs CREATED UNLESS U ARE CERTAIN THAT THEY WORK PROPERLY
ALSO DO NOT FLASH ANY RANDOM UPDATE.ZIP WHICH U DOWNLOAD UNLESS U CHECK OUT THE CODE WRITTEN IN THE UPDATE SCRIPT
now that i have scared u enough lets begin...
[BASICS]
there are two versions of update scripts (codes/syntax) which can be used:
Amend (update-script)
Edify (updater-script) [along with update-binary]
both of the above mentioned versions use different syntax...
both of these versions work on the recoveries currently available for x10 (xRecovery & FreeXperia Recovery)
ONLY EDIFY SYNTAX IS SUPPORTED BY xRecovery v1.0.0 (latest recovery for X10)
these files can be found in "\META-INF\com\google\android" of the zip package... depending on which file update-script OR updater-script is present in the update.zip u will understand which update scripts (codes/syntax) is to be used...
[SYNTAX | READING MATERIAL]
following are very useful guides which cover most of the available syntax...
Amend (update-script) by TylTru
Edify (updater-script) by coolexe
[WIP] How to Write an Updater-Script with Edify Code
UID and GIDs [related to setting proper permissions]
[IMP] info related to Edify for ROM makers
[PROGRAM | APPLICATION]
now that u follow the differences lets get the program to make update.zips and sign them...
Update.zip 2.0 Modifier/Creator by Daneshm90
its a windows only tool and i personally use it regularly to make update.zips
read through that post as it is pretty straight forward on how the application works... there is even a video... and it even signs the zip...
this program basically handles (modifies/creates) only Amend (update-script) but u can just place ur modified updater-script (along with the update-binary) in <ROOT_DIR_OF_PROGRAM>\placehere\META-INF\com\google\android\
and execute update.bat to make the update.zip package.... this program automatically signs the zip so u wont have any errors while flashing...
[ EXAMPLES ]
Amend scripts (update-script)
list of functions that can be used in Edify scripts and explanations about them by nubecoder
[ CONVERTORS ]
update-script to edify script converter by Chumby_666 (a.k.a. aZuZu)
amend2edify script converter by nubecoder
[ADDITIONAL INFO]
i will keep adding more to this as and when i get time...
till then happy reading the links posted here...
also if u have any queries/doubts feel free to post them here...
[BEST OF LUCK]
Usefull information. There is update zip for ubuntu?
hymns said:
Usefull information. There is update zip for ubuntu?
Click to expand...
Click to collapse
anantshri is working on Ubuntu Lucid CHROOT but the images are around 140 to 700 MB compressed and 3.5GB uncompressed... so as of now it doesnt make much sense to create update.zips for them... better option is to uncompress them on the PC and then place the extracted files on SDCARD (card reader/etc)...
thats wonderful...
Hi Doomlord,
thats a wonderful work..i mean thats a perfect explanation of creating update.zips...
another alternative, which i use frequently to update apps in system forlder only is..
go to titanium back up options and create update.zip
now select this update.zip from mounted SD card and then open it with 7zip or any zip editor.
then replace system/app forlder ->app to any app u want to install in system..
save and close the file. and u r good to go...
just an alternative which i personally found easy...but nothing to take away from your awsum thread here..keep the good work..thanks..
Nikhil_007 said:
Hi Doomlord,
thats a wonderful work..i mean thats a perfect explanation of creating update.zips...
another alternative, which i use frequently to update apps in system forlder only is..
go to titanium back up options and create update.zip
now select this update.zip from mounted SD card and then open it with 7zip or any zip editor.
then replace system/app forlder ->app to any app u want to install in system..
save and close the file. and u r good to go...
just an alternative which i personally found easy...but nothing to take away from your awsum thread here..keep the good work..thanks..
Click to expand...
Click to collapse
ah thats a nice idea to do it on the device itself!
u can even add specific files which need to be placed on other partitions (SYSTEM / DATA / SDCARD) when flashing it from recovery... though u will have to edit update-script for the recovery to copy those files..
Root Explorer:
1. Long press on folder you want to zip
2. Select Compress into .zip
3. Wham, Bam, thank you Ma'am!
Use META Wipe Data for flashing ROMS
Use META No Data Wipe for flashing Updates, themes, etc.
Thank you mate. Great source of info as usual
thank you DooMLoRD for this great topic and for all your usffull comment around X10 dev forum .
but i have a qustion :
i am beginner in cooking roms but i want to ask you how to use FreeX10 Froyo by Z to built a full froyo rom ?
and what i can do with X10_2.2_Froyo_sources.tar.bz2
thanks alot
Ahmed radi said:
thank you DooMLoRD for this great topic and for all your usffull comment around X10 dev forum .
but i have a qustion :
i am beginner in cooking roms but i want to ask you how to use FreeX10 Froyo by Z to built a full froyo rom ?
and what i can do with X10_2.2_Froyo_sources.tar.bz2
thanks alot
Click to expand...
Click to collapse
hi! thank you!
i am sorry but even i dont know how to build a rom from sources... wht most chefs do is just mix files from various roms, using FreeX10 as base and then adding content from other roms (of other devices)
thank you DooMLoRD
ok great , but i need to know what is the important files should copy from Freex10 to other roms ?
thanx man
have found a other methode for make a update.zip fast and easier!!
hi..
I have found a other methode for make a update.zip fast and easier!!
You can downloading a update.zip, whatever you want ... for example;
you downloaded update3.zip. open it with 7zip
in update3.zip> (you have 3 folders> data, META-INF, system)
is missing you as a path,
for example, because you want to update an audio fix .. can you just move the lib folder in System Folder.
if you want to update system apps, you can move the desired app in the System folder> app
framework-res> in system> framwork
the META-INF file from update3.zip should always be maintained.
It is important that you choose a update.zip,! Since the directories and systemlinks / already been set with the open-mentioned program are correct!
can not explain it better .. this method saves me a lot of time and is, I think the easiest way.
greeting edgar......
EdgarCupari said:
hi..
I have found a other methode for make a update.zip fast and easier!!
You can downloading a update.zip, whatever you want ... for example;
you downloaded update3.zip. open it with 7zip
in update3.zip> (you have 3 folders> data, META-INF, system)
is missing you as a path,
for example, because you want to update an audio fix .. can you just move the lib folder in System Folder.
if you want to update system apps, you can move the desired app in the System folder> app
framework-res> in system> framwork
the META-INF file from update3.zip should always be maintained.
It is important that you choose a update.zip,! Since the directories and systemlinks / already been set with the open-mentioned program are correct!
can not explain it better .. this method saves me a lot of time and is, I think the easiest way.
greeting edgar......
Click to expand...
Click to collapse
so u dont believe in setting permissions in the update.zip is it?
the most important thing is that u READ the update-script / updater-script PROPERLY before using any update.zip... and modify it for ur needs...
Create it in mnt since its a rootfs set perms rxrxrx Meta then set your perms 4 w.e else I'd getzipsigner 2 to make sure its right..
Sent from my X10a using XDA App
EXAMPLE FOR AMEND SCRIPTS (update-script)
from my experience (for X10 users only):
Edify scripts (updater-script) support copying to /tmp but Amend scripts (update-script) doesnt allow such a location... it only allows for SYSTEM, DATA, CACHE
the Edify scripts (updater-script) doesnt always work properly on our current recovery... better stick to Amend scripts (update-script)...
any programs that u want to run (which doesnt require additional files) place it at the root of ur packege
any programs that u want to run (which require additional files) place it at the /data/local/tmp folder of ur packege
Additional: http://forum.xda-developers.com/showpost.php?p=5776278&postcount=3
(generic info for all androids)
format:
Code:
format SYSTEM:
format DATA:
format CACHE:
copy package:
Code:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
copy_dir PACKAGE:cache CACHE:
set permissions:
Code:
set_perm_recursive 0 0 0755 0644 SYSTEM:
set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
set_perm 0 0 04755 SYSTEM:bin/su
set_perm 0 0 0755 SYSTEM:etc/dhcpcd/dhcpcd-run-hooks
...
.
.
..
busybox installation:
Code:
run_program PACKAGE:installbusybox
installbusybox:
Code:
#!/system/bin/sh
cd /system/bin
/system/bin/chmod 755 busybox
./busybox --install -s /system/bin
OR
Code:
#!/system/bin/sh
cd /system/bin
/system/bin/chmod 755 busybox
./busybox --install -s /system/xbin
running any other program/shell script:
Code:
run_program PACKAGE:mycustomshellscript.sh
OR
Code:
copy_dir PACKAGE:data DATA:
set_perm 0 0 777 DATA:local/tmp/mycustomshellscript.sh
run_program DATA:local/tmp/mycustomshellscript.sh
OR
-[ i have not tested the following but might work ]-
Code:
copy_dir PACKAGE:tmp TMP:
set_perm 0 0 777 TMP:mycustomshellscript.sh
run_program TMP:mycustomshellscript.sh
contents of mycustomshellscript.sh:
Code:
#!/sbin/sh
<commands u want to execute>
using update.zip for app installation :
place the app (appname.apk) in <rootdir>\app\
if u want to "install" an app as system app then
Code:
copy_dir PACKAGE:app SYSTEM:app
else if u want it as a user app then
Code:
copy_dir PACKAGE:app DATA:app
for modules:
place the module (modulename.ko) in <rootdir>\system\lib\modules
Code:
copy_dir PACKAGE:system SYSTEM:
set_perm 0 0 0644 SYSTEM:lib/modules/modulename.ko
for modified chargemon (Xperia Android users only):
place the modified chargemon script in <rootdir>\system\bin
Code:
copy_dir PACKAGE:system SYSTEM:
set_perm 0 0 04755 SYSTEM:bin/chargemon
set_perm 0 0 04755 SYSTEM:bin/charger
for copying files to SDCARD:
place the files u want to copy to sdcard in: <rootdir>\sdcard\
for copying GScript scripts: place the .sh files in: <rootdir>\sdcard\gscript\
Code:
copy_dir PACKAGE:sdcard SDCARD:
Hi doom thanks for this great tutorial...Im trying to learn these thing so I tried to make an update.zip to install astro as system app
using Daneshm90 tool here is what I did but didnt work...
first copied the directories to the placehere folder:like this=>> placehere/system/app/astro.apk
then chose the forst option: creat update-script
then 1. copy directories
what partition to place files in?: system
what folder within that partition?: app
what folder from this update.zip within placehere folder?: app
then I chose 6. set permissiions for file
what partition is the file located in?: system
what file within that partition?: app/astro.apk
UID ?: (I had no Idea what this is so I entered chmod number 644)
GID ?: (again have no idea so just pressed enter and skiped)
MODE ?: (same as above)
then 8.done
and 2.create update.zip
and obviously didnt work
could you please help me?
Thanks
Mortyx10 said:
Hi doom thanks for this great tutorial...Im trying to learn these thing so I tried to make an update.zip to install astro as system app
using Daneshm90 tool here is what I did but didnt work...
first copied the directories to the placehere folder:like this=>> placehere/system/app/astro.apk
then chose the forst option: creat update-script
then 1. copy directories
what partition to place files in?: system
what folder within that partition?: app
what folder from this update.zip within placehere folder?: app
then I chose 6. set permissiions for file
what partition is the file located in?: system
what file within that partition?: app/astro.apk
UID ?: (I had no Idea what this is so I entered chmod number 644)
GID ?: (again have no idea so just pressed enter and skiped)
MODE ?: (same as above)
then 8.done
and 2.create update.zip
and obviously didnt work
could you please help me?
Thanks
Click to expand...
Click to collapse
If you are just copying a file then do this. Create a folder "app" and place the apk inside it.
And use only this line in update-script to copy it to /system/app
Code:
copy_dir PACKAGE:app SYSTEM:app
I know it is not "ideal" but works for me and saves me some time. ( i am one of the most laziest persons you will ever meet)
Hi thanks for the reply
I just did it and its a no go for me
Cant mount system/app
error in line 1 or something like this
Mortyx10 said:
Hi thanks for the reply
I just did it and its a no go for me
Cant mount system/app
error in line 1 or something like this
Click to expand...
Click to collapse
Are you adding a blank line after that?
Sent from my X10project using XDA App
Mortyx10 said:
Hi doom thanks for this great tutorial...Im trying to learn these thing so I tried to make an update.zip to install astro as system app
using Daneshm90 tool here is what I did but didnt work...
first copied the directories to the placehere folder:like this=>> placehere/system/app/astro.apk
then chose the forst option: creat update-script
then 1. copy directories
what partition to place files in?: system
what folder within that partition?: app
what folder from this update.zip within placehere folder?: app
then I chose 6. set permissiions for file
what partition is the file located in?: system
what file within that partition?: app/astro.apk
UID ?: (I had no Idea what this is so I entered chmod number 644)
GID ?: (again have no idea so just pressed enter and skiped)
MODE ?: (same as above)
then 8.done
and 2.create update.zip
and obviously didnt work
could you please help me?
Thanks
Click to expand...
Click to collapse
actually i just use the update.zip creator to "pack" & sign the files...
once u have the files in place... just go to...
placehere\META-INF\com\google\android
and edit the update-script
if u have app in:
placehere\system\app\astro.apk
u just need
Code:
copy_dir PACKAGE:system SYSTEM:
once u finish editing the file
just run Script.bat
enter: n (do not clean previous files)
enter: 2 (create update.zip)
thats it!
a new file update.zip will be created in root folder of the program
@realunited no I don't do it manually
@Doom well dont know why but still not working....same error in recovery...cant mount system line1
Dont I need to set permissions cuz its in system?
Sent from my X10 TripNMiUI using XDA App
Im trying to make a flashable zip but it seems the X2 works diffrently than others...i tried using the examples given in forums and it doesn't work...can someone give me a quick example?
I was trying to make a script to install a bootanimation and it just hangs on installing.
Here is my update-script
Code:
ui_print("=============================================");
ui_print(" =========== ");
ui_print(" ================= ");
ui_print(" ");
ui_print(" ## ## ## ## ## ## ");
ui_print(" ### ### ## ## ## ## ");
ui_print(" #### #### ## ## ## ## ");
ui_print(" ## ### ## ##### ### ");
ui_print(" ## ## ## ## ## ## ");
ui_print(" ## ## ## ## ## ## ");
ui_print(" ## ## ## ## ## ## ");
ui_print(" ");
ui_print(" ================= ");
ui_print(" =========== ");
ui_print(" ");
ui_print(" ======Blue Droid Eye BootAnimation===== ");
ui_print(" ");
ui_print(" ======Created by MattFox27===== ");
ui_print("=============================================");
ui_print("Installing ...");
show_progress 0.1 0
copy_dir PACKAGE:media SYSTEM:media
show_progress 0.1 100
I can't get it to install...any help please
File...http://db.tt/nGms7W0p
From what I've done with all the bootanimations is push the files to system/media
Sent from my DROID X2 using XDA App
Ya i have made some bootanimations and im trying to make it easy for people to install them but my zip scripts fail...im using uato zip maker program...weird...i will post example later
Are you making them in Linux. I tried a few times but when I copied them to the phone they always were blank. Maybe a link to point me in the right direction? Sorry to ask a question on top of yours.
Sent from my DROID X2 using XDA App
Mr_GreenJeans said:
Are you making them in Linux. I tried a few times but when I copied them to the phone they always were blank. Maybe a link to point me in the right direction? Sorry to ask a question on top of yours.
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
No im using windows...sometimes i get an error like E: something or it will look like its installing but just sit there...i have it all on my other computer and im at work right now so i can't post my script...lame sorry
R you talking about animations or boot logos?
Sent from my DROID X2 using XDA App
script posted...
Mr_GreenJeans said:
R you talking about animations or boot logos?
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
Boot Animations, not logos i make them all the time and usually just copy them over with file explorer but im trying to make a flashable zip just to learn and what works normally on android phones seems to not work on X2 because other examples of update-script i have looked at for X2 stuff looks more complex then what i have in OP which is what i got from searching around.
bump...for some help.
try Amend scripting your example uses edify. ui_print is edify
Your not setting permissions. Ill look for the syntax ina second.
I'm going to make a tutorial on making these kind of files when I get the chance(and figure out the permissions).
By chance is the file named updater-script? Just curious.. and does the rest of the script work(ie you see the progress bar)?
First off, you have to mount /system if you're going to copy anything to it.
Second, pick update-script style or updater-script style. The updater-script style is the one I use, and the update-script style is the one that nitro uses (if you want examples). You are using both, so of course it's going to hang.
@Peperm1nt, I appreciate you trying to help, but what exactly are you trying to set permissions for? You don't have a file pointer in that instruction.
Try this:
(Make sure you are naming this updater-script.)
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p12", "/system");
ui_print("Installing ...");
show_progress(0,0);
delete("/system/media/bootanimation.zip");
set_perm(0, 0, 0755, "/system/media/bootanimation.zip");
show_progress(10.000000, 1);
ui_print("Done");
ui_print("Now reboot");
0vermind said:
@Peperm1nt, I appreciate you trying to help, but what exactly are you trying to set permissions for? You don't have a file pointer in that instruction.
Click to expand...
Click to collapse
lmao, I just noticed that. I edited it after I reread the script and for some reason in my head, I put the link haha. My bad ill edit it since you got it cleared up.
EDIT: I think you forgot to add unmount in your fix 0vermind.
EDIT#2:
update-script is amend scripting and DOES NOT REQUIRE update-binary
updater-script is edify scripting and it REQUIRES update-binary
SO in other words,
amend=
Code:
show_progress 0.1 0
delete SYSTEM:media/bootanimation.zip
copy_package SYSTEM: SYSTEM:
set_perm 0 0 0755 SYSTEM:media/bootanimation.zip
show_progress 10.000000 1
edify=
Code:
mount("ext3", "EMMC", "/dev/block/mmcblk0p12", "/system");
ui_print("Installing ...");
show_progress(0,0);
delete("/system/media/bootanimation.zip");
copy("/system", "/system");
set_perm(0, 0, 0755, "/system/media/bootanimation.zip");
show_progress(10.000000, 1);
ui_print("Done");
ui_print("Now reboot");
NOTE: ui_print is not a command in amend; only edify! And these will only work if your folders are set up correctly in the update.zip.
bootanimation.zip is in
Code:
UPDATE.ZIP(the actual zip file)>system/media/bootanimation.zip
;otherwise, you would need to edit the locations in the script. Someone please correct the copy command if it is incorrect in the edify script. hope this helps.
OK...so question on permissions. I created a zip file (Amend) that I install after I flash a rom...basically contains my ringtones that installs into system/media/ringtones and installs my titanium backup apk into the system/app folder. I do not set permissions, just copy them over and everything works fine. Now if I were to copy a bootanimation over as well and not set permissions, what would happen? How do we determine what needs permissions to be set? when I look at my ringtones ...the permissions are exactly like the other ringtones.
Sent from my DROID X2 using XDA App
mjdavis871 said:
OK...so question on permissions. I created a zip file (Amend) that I install after I flash a rom...basically contains my ringtones that installs into system/media/ringtones and installs my titanium backup apk into the system/app folder. I do not set permissions, just copy them over and everything works fine. Now if I were to copy a bootanimation over as well and not set permissions, what would happen? How do we determine what needs permissions to be set? when I look at my ringtones ...the permissions are exactly like the other ringtones.
Sent from my DROID X2 using XDA App
Click to expand...
Click to collapse
all those files need permissions. what is your update-script syntax?
Peperm1nt said:
all those files need permissions. what is your update-script syntax?
Click to expand...
Click to collapse
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
I install my .ogg ringtones and my titanium backup apk using this update-script with no issues
Sent from my DROID X2 using XDA App
that is a correct script to a point i guess.... here use this.
Code:
show_progress 0.1 0
delete_recursive SYSTEM:media
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:media
show_progress 1.0 10
this is assuming the zip structure is correct.
.zip>system/media
media contents:
audio(folder)
bootanimation.zip
audio contents:
alarms
notifications
ringtones
and you have the respected files within those folders that you want.
also, if you have any other files in other folders.. system/app etc. you need to fix those as well.
Peperm1nt said:
that is a correct script to a point i guess.... here use this.
Code:
show_progress 0.1 0
delete_recursive SYSTEM:media
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:media
show_progress 1.0 10
this is assuming the zip structure is correct.
.zip>system/media
media contents:
audio(folder)
bootanimation.zip
audio contents:
alarms
notifications
ringtones
and you have the respected files within those folders that you want.
also, if you have any other files in other folders.. system/app etc. you need to fix those as well.
Click to expand...
Click to collapse
The million dollar question is why does this still work without setting permissions?
Sent from my DROID X2 using XDA App
.. does your phone show the custom boot animation? tibu redoes everything you set it to. So if permissions were set a certain way, then it would put them back. BUT TiBu has nothing to do with that folder.
Peperm1nt said:
.. does your phone show the custom boot animation? tibu redoes everything you set it to. So if permissions were set a certain way, then it would put them back. BUT TiBu has nothing to do with that folder.
Click to expand...
Click to collapse
I haven't tried a custom boot animation yet...just ringtones and titanium backup. I'm gonna give it a shot...and let you know.
Sent from my DROID X2 using XDA App
Can somebody point me to or give me a quick write up on how to. I found this one here http://forum.xda-developers.com/showthread.php?t=732957 and read it and downloaded a zip here on xda and for the most pat it was the same but there were some other things than described.
like this:
Code:
show_progress 0.1 0
copy_dir PACKAGE:(x) (X):
set_perm_recursive 0 0 0755 0644 (X):(y)
show_progress 0.1 10
vs this:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
package_extract_dir("system", "/system");
and an update binary file and other various files.
Any and all help is greatly appreciated. if it helps ill add that im using TWRP as recovery.
YoMaMa7467 said:
Can somebody point me to or give me a quick write up on how to. I found this one here http://forum.xda-developers.com/showthread.php?t=732957 and read it and downloaded a zip here on xda and for the most pat it was the same but there were some other things than described.
like this:
show_progress 0.1 0
copy_dir PACKAGEx) (X):
set_perm_recursive 0 0 0755 0644 (X)y)
show_progress 0.1 10
vs this:
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
package_extract_dir("system", "/system");
and an update binary file and other various files.
Any and all help is greatly appreciated. if it helps ill add that im using TWRP as recovery.
Click to expand...
Click to collapse
if you want to avoid the post from coverting to the faces, you can use the tags [ code ] in front of your text and [ /code ] after your text w/o the spaces.
your first quote is the amend language which is older and depreciated while your 2nd quote is the edify language which is the newer and currently used syntax.
show progress updates the small status bar which appears while the zip is being processed.
set perms recursive sets the uid/gid and then file/dir or dir/file permissions recusively.
copy package goes from source, inside zip to destination on the device.
mount command obviously just mounts the system partition, when done you should unmount.
the package extract dir extracts the direction from the zip to the destination. you'll notice the names correspond to the directories inside the zip and on the device.
the updater-binary file is used in the newer version, edify and must accompany the updater-script file. the older amend version uses an update-script file. only diff in file name is the "r".
this guide is pretty helpful - http://forum.xda-developers.com/showthread.php?t=936175 .
also, i spent some time making a great updater-script file instead of my stock rom. i suggest you take a look as it outlines all the basics and properly performs all the functions with correct syntax for a ROM install. many of the syntax commands can be used for installing/modifying a number of other things outside of just a ROM, for example a kernel install .zip.
[ROM] joeykrim-original-1.2.0 Odex *Stock Rooted 2.08.651.2*
thats all off the top of my head but hope that helps!
Just off the top of your head! :O That's fantastic information. Thank you for taking the time and key strokes to help me out!
im made a flashable zip but i need it to be able to edit some lines in the build.prop and edit a line in /system/customize/mns/default.xml can that be done i seen a zip for the evo 4g that did it but how to on the evo 3d can someone help pls
oakieville said:
im made a flashable zip but i need it to be able to edit some lines in the build.prop and edit a line in /system/customize/mns/default.xml can that be done i seen a zip for the evo 4g that did it but how to on the evo 3d can someone help pls
Click to expand...
Click to collapse
As far as I know, your only real option is to include the edited build.prop/default.xml in your flashable zip. Obviously, this would make your mod ROM (and ROM version) specific, however.
If you can find the evo 4g zip that you're referring to, and link it here, I may be able to figure out how they had done it for you
Its the metrodroid script http://www.uploadking.com/NVX96MXX1R they do it with a .sh file they link to in the updater-script then the .sh runs a .sql file i dont need the .sql part tho
I might be able to help with a workaround flashable, depending on what you're editing in the build prop. What are you trying to edit? Like what lines exactly?
oakieville said:
Its the metrodroid script http://www.uploadking.com/NVX96MXX1R they do it with a .sh file they link to in the updater-script then the .sh runs a .sql file i dont need the .sql part tho
Click to expand...
Click to collapse
The "sed" command used in their script is the stream editor command. From your limited explanation in your OP, it seems like this would be what you'd need. If you want, I could probably make a script for you, but I'd need you to pm me exactly which line(s) need changed/what you're trying to accomplish. I'm at work for the next two and a half hours, but I could maybe get to it after work tonight.
I also may need your entire zip if you want me to set up the updater script too. I'm not incredibly experienced in scripting, but I can fake it till I make it
Vinchenzop said:
The "sed" command used in their script is the stream editor command. From your limited explanation in your OP, it seems like this would be what you'd need. If you want, I could probably make a script for you, but I'd need you to pm me exactly which line(s) need changed/what you're trying to accomplish. I'm at work for the next two and a half hours, but I could maybe get to it after work tonight.
I also may need your entire zip if you want me to set up the updater script too. I'm not incredibly experienced in scripting, but I can fake it till I make it
Click to expand...
Click to collapse
He sent me a PM with all the lines, so let me know if you get one too. I told him of the magic of a local.prop in /data/local and how you can override any line in the build.prop so long as it doesn't begin with ro. Part of it was a default.xml which of course can be edited and then put in the zip - easy. It's the ro (read-only) lines that I can't help with, since I'm no script maker. I told him freeza knew how, since I used a freeza .sh script on my heroc to get bootsound on aosp ROMs. Cool to see people still being helpful around here
I have a flashable zip that will edit anything in the build.prop file. At work till midnight, but I'll shoot it your way in the morning.
Sent from my PG86100 using XDA App
Originally Posted by oakieville
im trying to edit these lines
ro.cdma.home.operator.alpha=sprint
gsm.sim.operator.alpha=sprint
gsm.operator.alpha=sprint
ro.cdma.home.operator.numeric=310120
gsm.sim.operator.numeric=310120
gsm.operator.numeric=310120
ro.product.brand=sprint
ro.product.brand=sprint(YES THERE ARE TWO OF THESE)
and make them this
ro.cdma.home.operator.alpha=MetroPCS
gsm.sim.operator.alpha=MetroPCS
gsm.operator.alpha=MetroPCS
ro.cdma.home.operator.numeric=310027
gsm.sim.operator.numeric=310027
gsm.operator.numeric=310027
ro.product.brand=metropcs
ro.product.brand=metropcs
i also need to edit /system/customize/mns/default.xml
this line
<item name="MMS_Msg_Size_Choose">5M</item>
and make it this
<item name="MMS_Msg_Size_Choose">500k</item>
can you help thanks
Well, for anything in the build prop that DOESN'T start with ro (read only), you can add the lines you want into local.prop in /data/local and it will override the lines in build prop, and since it's in /data it will survive flashovers. You probably need to create the local.prop file.
For the xml you can change those lines in yours and then copy the modded file into a flashable zip.
The duplicate line is unnecessary and you can simply delete it (using an sh).
Unfortunately the only way to modify ro lines in the bp is with the sh method you mentioned and i don't know how to do those. But freeza does, so send a pm to him/her.
Please copy paste this response into the thread so others may benefit from the info.
Peace
il Duce said:
He sent me a PM with all the lines, so let me know if you get one too. I told him of the magic of a local.prop in /data/local and how you can override any line in the build.prop so long as it doesn't begin with ro. Part of it was a default.xml which of course can be edited and then put in the zip - easy. It's the ro (read-only) lines that I can't help with, since I'm no script maker. I told him freeza knew how, since I used a freeza .sh script on my heroc to get bootsound on aosp ROMs. Cool to see people still being helpful around here
Click to expand...
Click to collapse
You know me Luke...always trying to help someone. I'll try to write him the script, then maybe post it here, for others benefit (of knowledge)
unCoRrUpTeD said:
I have a flashable zip that will edit anything in the build.prop file. At work till midnight, but I'll shoot it your way in the morning.
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
unCoRrUpTeD always ftw
This is a .sh file that is run by the updater-script (in the meta folder) when an update.zip is flashed. It uses a shell script to tell the phone to target the build.prop, find the "to be edited" lines and changes them to the new value. I modded the one that was part of the zip linked earlier in the thread for oak's specific needs
Code:
#!/sbin/sh
mount system
mount data
sed 's/^ro.cdma.home.operator.numeric.*/ro.cdma.home.operator.numeric=310027/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
sed 's/^ro.cdma.home.operator.alpha.*/ro.cdma.home.operator.alpha=MetroPCS/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
sed 's/^gsm.sim.operator.alpha.*/gsm.sim.operator.alpha=MetroPCS/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
sed 's/^gsm.sim.operator.numeric.*/gsm.sim.operator.numeric=310027/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
sed 's/^gsm.operator.alpha.*/gsm.operator.alpha=MetroPCS/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
sed 's/^gsm.operator.numeric.*/gsm.operator.numeric=310027/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
sed 's/^ro.product.brand.*/ro.product.brand=metropcs/g' /system/build.prop > /tmp/build.prop
mv /tmp/build.prop /system/build.prop
The following line needs to be added to the updater-script before the system and data are unmounted (usually one of the last couple of lines in the updater-script), to tell the phone to run the *.sh script.
Code:
run_program("metropcs.sh");
I'll send you the file you need via pm Oakieville
The "sed" command used in the script is the command to edit the stream. It will find the line(s) with the specified target, and change them to reflect the user's desire
There's no need to move the file. Just take that line out and remove all the > tmp/build.prop. It will just edit the build.prop
Sent from my PG86100 using XDA App
unCoRrUpTeD said:
There's no need to move the file. Just take that line out and remove all the > tmp/build.prop. It will just edit the build.prop
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Can you still upload your generic script tonight though? Hoping to use it myself
unCoRrUpTeD said:
There's no need to move the file. Just take that line out and remove all the > tmp/build.prop. It will just edit the build.prop
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Thanks for the tip man. I'm not extremely experienced in scripting. Like I said in a previous post, I just edited a file that was linked earlier in the post to include the "ro.product.brand". Since the first part was done including the move and the > tmp/build.prop setup, I just left it all the same for uniformity and figured it may be easier for inexperienced users to understand what the script is doing, since it more or less explains itself.
Does it look correct though uncorrupt? I don't want to give oak a bad file
And uncorrupted, are you referring to just do it this way?
Code:
#!/sbin/sh
mount system
mount data
sed 's/^ro.cdma.home.operator.numeric.*/ro.cdma.home.operator.numeric=310027/g' /system/build.prop
sed 's/^ro.cdma.home.operator.alpha.*/ro.cdma.home.operator.alpha=MetroPCS/g' /system/build.prop
sed 's/^gsm.sim.operator.alpha.*/gsm.sim.operator.alpha=MetroPCS/g' /system/build.prop
sed 's/^gsm.sim.operator.numeric.*/gsm.sim.operator.numeric=310027/g' /system/build.prop
sed 's/^gsm.operator.alpha.*/gsm.operator.alpha=MetroPCS/g' /system/build.prop
sed 's/^gsm.operator.numeric.*/gsm.operator.numeric=310027/g' /system/build.prop
sed 's/^ro.product.brand.*/ro.product.brand=metropcs/g' /system/build.prop
After relooking at the file, I noticed a few errors in the script...
first...
Code:
#!/sbin/sh
This line was changed to
Code:
#!/bin/sh
since "sh" is located in /system/bin not "sbin"
Removed the mount system and mount data, since the updater script will already do this.
Upon advice of uncorrupted and viper, removed the
Code:
> /tmp/build.prop
mv /tmp/build.prop /system/build.prop
. Viper says using that line would actually wipe the build prop every time it appears in the script.
i tried it with the second file vinchenzop sent and it still dont work this is my update-script
ui_print("*************************************************");
ui_print("* *");
ui_print("* *");
ui_print("* HTC EVO 3D *");
ui_print("* METROPCS MMS FIX *");
ui_print("* 2.08.651.2 *");
ui_print("* by -OAKIEVILLE * *");
ui_print("* *");
ui_print("* *");
ui_print("*************************************************");
show_progress(1.000000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p24", "/data");
ui_print("Metroizing system...");
delete("/system/app/mms.apk");
delete("/system/app/mms.odex");
delete("/system/app/Mms.apk");
delete("/system/app/Mms.odex");
delete("/system/app/MMS.apk");
delete("/system/app/MMS.odex");
package_extract_dir("system", "/system");
ui_print("done...");
ui_print("Metroizing data...");
delete("/data/data/com.android.providers.telephony/databases/telephony.db");
delete_recursive ("/data/data/com.android.mms");
delete("/data/dalvik-cache/[email protected]@[email protected]");
delete("/data/dalvik-cache/[email protected]@[email protected]");
delete("/data/dalvik-cache/[email protected]@[email protected]");
package_extract_dir("data", "/data");
run_program("metropcs.sh");
unmount("/system");
unmount("/data");
ui_print("done...");
ui_print("*************************************************");
ui_print("* *");
ui_print("* *");
ui_print("* u've been Metroized *");
ui_print("* oakieville style *");
ui_print("* E.S.O.V *");
ui_print("* *");
ui_print("* *");
ui_print("* *");
ui_print("*************************************************");
set_progress(1.000000);
do you see anything wrong there
also you guy are awesome for all this help
What folder is metropcs.sh in. You have to extract the file. I would extract it to /tmp and then chmod it and then run /tmp/metropcs.sh
I'll try and upload my script tonight if I can locate it tonight. Been through a couple if computers and hard drives, but I should have at least one online, too.
Sent from my PG86100 using XDA App
unCoRrUpTeD said:
What folder is metropcs.sh in. You have to extract the file. I would extract it to /tmp and then chmod it and then run /tmp/metropcs.sh
I'll try and upload my script tonight if I can locate it tonight. Been through a couple if computers and hard drives, but I should have at least one online, too.
Sent from my PG86100 using XDA App
Click to expand...
Click to collapse
Metropcs.sh is on the root of my zip
FIRST: The location of shell in recovery should be /sbin/sh. But when you are booted into the ROM it will be /system/bin/sh. Recovery and the ROM are 2 seperate partitions and setup.
SECOND: The script linked WILL NOT add the lines you want if it doesn't exist in the build.prop to begin with.
I removed some things from this as it was used for something else. I haven't tested it but all I did was remove some extra things that were in it and renamed some things.
First thing to note is that in the updater-script you need to extract the files. We will get to that in a second. There are 2 files that are used. Create a folder inside the zip called tmp. Inside the tmp folder should be 2 files. The first one is called mytweaks.sh and the second one is called misc.
mytweaks.sh
Code:
#!/sbin/sh
bp="/system/build.prop"
busybox mount /system
busybox mount /data
if [ -f /system/build.prop.bak ];
then
rm -rf $bp
cp $bp.bak $bp
else
cp $bp $bp.bak
fi
echo " " >> $bp
echo "# unCoRrUpTeD build.prop editor" >> $bp
echo " " >> $bp
for mod in misc;
do
for prop in `cat /tmp/$mod`;do
export newprop=$(echo ${prop} | cut -d '=' -f1)
sed -i "/${newprop}/d" /system/build.prop
echo $prop >> /system/build.prop
done
done
misc
Code:
dalvik.vm.startheapsize=24m
windowsmgr.max_events_per_sec=60
ro.product.multi_touch_enabled=true
ro.product.max_num_touch=2
keyguard.no_require_sim=true
debug.sf.hw=1
ro.opengles.version=131072
ro.default_usb_mode=2
ro.qualcomm.proprietary_obex=false
ro.display.width=320
ro.display.height=960
ro.telephony.call_ring.delay=1000
ro.mot.eri.losalert.delay=1000
There should be no reason to mess with mytweaks.sh unless "#!/sbin/sh" needs to be changed.
Inside the misc file you can delete what I have posted and add the lines you want to add or modify in the build.prop. Make sure that each setting is on it's own line.
The script should run through each line and if it found a line that has the same text before the "=" it will remove that line and then add the contents of misc to the bottom of the build.prop file. This way, even if the line is not present in the build.prop it will still be added.
Now back to the updater script. You will need to extract the tmp folder so that you can access the files. Add the following lines in the updater-script
updater-script
Code:
package_extract_dir("tmp", "/tmp");
set_perm(0, 0, 0777, "/tmp/mytweaks.sh");
run_program("/tmp/mytweaks.sh", "mytweak");
Attached is the zip with everything setup.
The script also creates a backup of the original build.prop in /system/build.prop.bak just in case there is a problem.
Okay, I have done this before and it worked fine. This time it's not working.
In my script I put :
Code:
package_extract_file("scripts/touchfiles.sh", "/tmp/touchfiles.sh");
set_perm(0, 0, 0777, "/tmp/touchfiles.sh");
run_program("/tmp/touchfiles.sh");
touchfiles.sh has this inside:
Code:
#!/sbin/sh
#
#
#
touch /tmp/aroma/themenew.prop
touch /tmp/aroma/stocknew.prop
touch /tmp/aroma/themestock.prop
touch /tmp/aroma/stockstock.prop
exit 0
The result is file not found when it gets to the run_program part.
I can adb shell in and cd to /tmp and see the file. I can cat the file. But when I attempt to execute it, I get file not found.
I know it's something stupid that too many hours behind the keyboard is preventing me from seeing.
Anybody see what's wrong?
Thanks!
D
.
Wait a sec,the script start but don't find the /tmp/aroma/.. or the touchfiles.sh don't start?
I don't have understand this.
dsb9938 said:
Okay, I have done this before and it worked fine. This time it's not working.
In my script I put :
Code:
package_extract_file("scripts/touchfiles.sh", "/tmp/touchfiles.sh");
set_perm(0, 0, 0777, "/tmp/touchfiles.sh");
run_program("/tmp/touchfiles.sh");
touchfiles.sh has this inside:
Code:
#!/sbin/sh
#
#
#
touch /tmp/aroma/themenew.prop
touch /tmp/aroma/stocknew.prop
touch /tmp/aroma/themestock.prop
touch /tmp/aroma/stockstock.prop
exit 0
The result is file not found when it gets to the run_program part.
I can adb shell in and cd to /tmp and see the file. I can cat the file. But when I attempt to execute it, I get file not found.
I know it's something stupid that too many hours behind the keyboard is preventing me from seeing.
Anybody see what's wrong?
Thanks!
D
.
Click to expand...
Click to collapse
Can you paste the error?
Sent from my Galaxy Nexus using xda premium
Running shell scripts
I'm not sure, but
1. I don't think you can execute shell scripts directly.
2. to run a shell script the shell needs to be available, so /system needs to have been mounted
Try something like (no need to make the script executable):
# ensure /system is mounted (replace the mount parameters with the ones for your system)
ifelse( is_mounted("/system") == "/system",
ui_print(" /system already mounted!"),
ifelse (mount("ext4", "EMMC", "/dev/block/stl12", "/system") == "/system",
ui_print(" Successfully mounted /system" ),
ui_print(" Could not mount, aborting") ) );
assert( is_mounted("/system") == "/system" );
package_extract_file("scripts/touchfiles.sh", "/tmp/touchfiles.sh");
run_program( "/system/bin/sh", "/tmp/touchfiles.sh");