[TUT][INFO]Making Flashable Package With right premisions[NOOB FRINDLY] - Galaxy Y GT-S5360 General

Hello
Today iam guiding u How To Make A Flashable UPDATE Zip with correct premisions..
Frist
What is premisions?
Droid Premisions is Like Your Life Premisions
Ex: You Want to Take Premision to Go out For A walk / buy something /...etc
Haha
Android is just like that
But you are its masterso u give the target the premision to Control your device
about Some Premisions
R: Read only
W: Modify
Ex: run like excutable packages
How to Set That premisions to updatable Zip?
There Are two ways for that
1-u can use that code for example to set premisions to rw-r-r
Code:
set_perm(0, 0, 0755, "/(system/data)/...../.....");
2-Simply u can Use My Package Flasher To Flash Any Update without Need Of Setting Premisions to each File u put in package
how to use it?
Simply u can
Code:
-extract the zip
-add the file u want in correct folder in system
Ex:u want to flash an app
Go to system >create folder called "app">input the app in it
Ex2: u want to add binary
Navigate to system>create folder "bin" put binary in it
-Then zip is Ready
Without changing Any Command
[B]Its only to flash system updates not data ones[/B]
Have a good day

Related

edit framework-res.apk no boot!

i have all frameworks and apps deodexed
i made some changes on a framework-res.apk then i have repacked it, signed, flash on my rom.
but it no boot, stay ever on "HERO" screen!
i try to modify com.htc.resource.apk , flashing it, and all ok!!
anyone can help me?
M
You can't sign the framework file with a test key! Same applies to Rosie - don't try to re-sign it, or it'll just bootloop.
Just edit the files directly in the zip using 7-zip or something like that
Woops ^^, sounds like your implementing Manup456 SenseHero theme...
Stickman89 said:
Woops ^^, sounds like your implementing Manup456 SenseHero theme...
Click to expand...
Click to collapse
yes but with some changes to color map.. and maybe to components
M
nprussell said:
You can't sign the framework file with a test key! Same applies to Rosie - don't try to re-sign it, or it'll just bootloop.
Just edit the files directly in the zip using 7-zip or something like that
Click to expand...
Click to collapse
yayyyy haha i don't like working on a theme
M
i am on a mac.. i have 7zip ecc ecc but i can't edit without unrar the archive!
help!
just repack the framework-res.apk,dont sign it and it will flash fine
it wont work if you repack framework-res.apk as the classes.dex cannot be compressed, youll notice if you extract a 3mb framework-res, recompressing it makes it 1.5mb
ok so:
1- rename framework-res.apk to framework-res.zip
2- unarchive it
3- do changes
4- recompress all? file into a .zip
5- mv ./framework-res.zip ./framework-res.apk
6- push into the /system/framework directory
right?
mr.bang said:
ok so:
1- rename framework-res.apk to framework-res.zip
2- unarchive it
3- do changes
4- recompress all? file into a .zip
5- mv ./framework-res.zip ./framework-res.apk
6- push into the /system/framework directory
right?
Click to expand...
Click to collapse
Yes, but you must choose to pack in a zip without compression
after renaming to .zip and doing the work just rename to .apk no need to repack that
eriously, im getting pretty tierd of this....
I`ve followed your tutorial (slaved) and it seems to be working awsome, BUT I did it with my own ROM and called it Update.zip and I did everything you said, even let the 9. files alone, but when I'm restarting the system, the boot window is there constantly/for ever, what is wrong?
mr.bang said:
i am on a mac.. i have 7zip ecc ecc but i can't edit without unrar the archive!
help!
Click to expand...
Click to collapse
Make sure you have zip (the package) installed.
You should also install a MAC port of the midnight commander.
Browse to your framework apk and just enter it via mc. It should recognize the magic bytes as ZIP and enter VFS mode, allowing you to enter the apk just as if you were entering a folder.
After you make all your changes (I guess simply overwriting some pngs), just exit from the folder through ".." till you see the apk itself.
There. Done.
I do my cooking on a linux workstation, and this is one way of doing it.

help with flashable zips for a rom im maken

im trying to make my own rom trying to try new this out and i was going around taken lil apps tht other roms hads like hulu, mastermind mirror, ect and i dont think i zip it correctly cause when i check the inside of the zip folder the other file is still not zip and i am sure that is a problem right ??? ps im using cwm 3.0 is tht a problem ?
i use this meth...
ok, here it goes.
first, figure out where you want to push your file. i'd reccomend pushing manually in recovery to make sure the file itself works. then, using a tool like 7zip (pc) or betterzip (mac) create a file structure that matches the one on the phone. for example, if you wanted a boot animation to be put in system/customize/resource, make a folder system, customize in that, resource in that, and the bootanimation.zip inside that. now you have the main part. next, make a folder in the root of the zip called META-INF (caps counts) inside that, com, inside that, google, and inside that, android. thats /META-INF/com/google/android/. inside android, you need to place in an update-script. i'd reccomend taking one from another zip and just editing it becasue i still have not figured out a way to make that type of file (unix exec) from scratch. open it up in a .txt editor like notepad++ (pc) or coda (mac) and write your script. here is the baisic script for copying the directory system on the zip to system on the phone (like flashing a boot animation).
copy_dir PACKAGE:system SYSTEM:
CAPS COUNT AND MAKE SURE YOU HAVE AN ENTER AT THE END. IF YOU DO NOT HAVE AN ENTER AT THE END (TO MAKE IT TWO LINES INSTEAD OF ONE, LIKE ISSUEING A COMMAND) THEN IT WILL NOT WORK AT ALL ( E:SYNTAX ERROR IN UPDATE-SCRIPT IS THE ERROR YOU WILL GET)
so put this file into the folder android, and zip it. make sure it is in store only, compatibility mode, if you have such options. then, use an auto signer (or just say zip is not signed and make sure to put sig verification off) to sign the zip. flash, and watch your work magically appear.
the update-script i showed is written in amend. i have no idea how to write in edify bcuz it is much more complicated with the binary and stuff. so dont flash with cwm 3.0+.
i only have 1 thing to say first switch to amon ra amon ra is 1000 times better than clockwordmod
how do i switch?? lol also what if i unroot my phone would tht be a problem?
Jcki4 said:
how do i switch?? lol also what if i unroot my phone would tht be a problem?
Click to expand...
Click to collapse
go here and download the PC36IMG.zip and follow the directions
http://forum.xda-developers.com/showthread.php?t=705026.
as for setting up a rom unzip one to see how it's set up, i have changed a few things in some and zipped it back up and signed it but never built one, sorry couldnt be more help

[GUIDE] How To make a CWM recovery flashable zip (patch) - the easy way

* * * * * * * * * * * * * * * * * * * * * * *
Important update (Oct 19, 2012):
Two important things to add here:
1-) it seems that my updater-script mounting script was wrong and it is surprising that it worked for me all that time.
--> mount() expects 4 args, had 3.
So this should be changed --> from: mount("MTD", "system", "/system") to:
mount("ext3", "EMMC", "/dev/block/mmcblk1p21", "/system");
So I attached an UPDATED empty patch for that.
If your phone uses another ext or dev/block #, you can also try this mounting script:
run_program("/sbin/busybox", "mount", "/system");
2-) Somewhere in September 2012, CM7 team added support for TLS (will add commit details later if I find it), without explaining what it is, this brought changes in the update-binary file and if it is the rom you're using, you might need to use a recent update-binary within your patch. So I also attached an updated empty patch for CM7 recent builds.
That's it! have fun with cwm recovery patches.
Cheers,
/AL
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
I've been asked about this a few times, so finally here it is: a simple guide on how to make a flashable zip - usable on CWM recovery version 3 and higher (Edify script).
Disclaimer:
Before you go on and follow my directives, I remind you that from here on, you step into the "make this at your own risks and perils" land. I don't pretend to be a guru on this and I might even be wrong on something here; so make a nandroid backup of your current system and apps and copy of any important system file or data you do not want to lose.
Please also understand that there are many different files of various functions on your phone and that the method I've chosen to share below might not apply to all files or situations; this is a basic quick guide for a basic system file replacement.
Ok, now that the things are set straight, let's do this!
Here's what you'll need:
[] a file (or more) that you want to replace or add on your phone;
[] an existing patch.zip file to use as a base - I've attached one below;
[] a good archive manager - I recommend 7-Zip;
[] a good text editor software for your computer - I recommend Notepad++ ;
[] a signing tool - I use apkmanager from here on xda
-> Download it and extract the files into a folder [c:\apkmanager for example]
--> perequisite: java libs installed on your computer.
[] a couple fingers with a normally developped brain attached to them.
All set up?, now let's do this!
- Place the patch.zip on your desktop and rename it to something more indicative of what it will be used for;
- Right-click on it and choose: "7-Zip / Open archive" [*DO NOT extract; just *Open archive*];
Now you should see two folders: one called "system" and one called "META-INF".
I - FILES AND FOLDERS:
Let's start with the "system" one, so double-click on it:
In there, will go all files that what you want to add or replace to the system. So let's say for example that you want to replace the camera and one of its related library. To do so, we first have to create the directory arborescence and create sub-directories in the /system/ folder by following this easy method:
- On your desktop, right-click on an empty spot and select "New / Folder" then edit the name to "app" (no " ") using no CAPS or space at the end;
- repeat the process to make another folder called "lib";
- drag those two new empty folders into the /system/ folder of the 7-zip opened archive [just click yes on the popup dialogs];
- now simply drop the two files in their respective place: the Camera.apk file should go in '/system/app' folder and the library file into '/system/lib' folder.
.. If you have more files to add, just follow the logic above; I'm sure you get the idea by now..
II - UDATER-SCRIPT
The other folder included in the opened archive is named "META-INF" and all the file in it should be left unchanged except for one file: "updater-script" located in the "\META-INF\com\google\android\" folder.
- So navigate to it and drag the file to your desktop and open it with Notepad++ (you can use another text editor but I would not recommend the Windows' default Notepad for that).
That file is just a text file in which all the update instructions/commands are set.
The demo patch.zip that I've attached includes a very standard and basic script which does the bear minimum: it only mounts the system, then adds / overwrites the system files and then unmount the system. That is probably what most endusers need for the vast majority of cases. No need to worry about setting files permissions; your rom/bootmenu should set that for the whole system on boot. But there are tons of other uses and commands we can use in there; things like deleting files or entire folders, setting ownership and permissions, etc., etc. If you're interested in reading more or want to go a little more 'hard-core' on this, you can go read here and here.
So, what to change in the updater-script anyway?
Well, for this example, not much! You can edit the text on the lines starting with "ui_print": those will be displayed on the CWM screen during the update process. A good coding ethic would be to include a patch description and to add in any useful comments like if the patch is for a specific build only, say hello to your mom... or whatever!
2 important notes here though in order to avoid problems:
* Each line of the updater-script MUST end with a ";" (no " ") ;
* There HAS TO BE at least one blank line after the last ( ; ) line of code.
Done with updater-script? -> Save the file and drop it over the old one in the opened archive and close it.
Almost done here... one last step:
III- SIGNING THE PATCH
This is simply done by:
- placing the patch in the apkmanger folder called "place-apk-here-for-signing"
[which should be in C:\~your location~\apkmanager\];
- executing the script (double-click on Script.bat file inside the apkmanager folder) and then selecting option 16* (*this option # might have change in latest version tbd)
Edit: as ktmbikerman has kindly confirmed, the latest version of apkmanager is now called APK multitool and that (signing) option is now # 19;
- Then (type 24?) exit, grab the now signed patch from the same folder and move it to safe place and on the phone's sdcard.
Congratulations you've done your first CWM patch !!!
One last warning:
Sometimes you don't know what a new system file or apk will do to your system. Applying a new patch can be risky and might even prevent your phone from booting up altogether; it happened to me before.. But luckily, I was kind of expecting it and I had been clever enough to first make myself a second patch with the original files and place it along with the other patch on the sdcard before testing the patch. So the no-boot was no big deal afterall because I've then just re-accessed CWM recovery and installed my undo/revert patch.
So all this to say, that it's better be safe than sorry and you can do this by
preparing a fallback patch sometimes..
That's it on this for today; hope it is of any help to some of you guys.
This is a first draft version and I will add more to it soon.
Comment/suggestions are always welcomed, but PLEASE do not full-quote this (or any) long post.
Cheers.
/A
Thanks for this i usually use autoapktool the easy way but the manual way is more fun
Thanks so much for this tutorial Al, I really appreciate the effort. I'll give some feedback once I've flashed my first patch.
Edit: worked perfectly... I can now flash my country's baseband on any rom
I'm still building the update.zip files using the classical/manual method described by [] AL [], however this is not for everyone. For rookies there is an easier way to do it (check this out).
Thanks for the feedback guys. I'm glad that you like the guide.
I will check out autoapktool and the "D4 Update Zip Maker" eventually...
[Although I had a quick peak at the zip maker and found it more confusing than anything...but that might be just me; need more coffee at this time...]
My guide is very long and maybe too detailed for the job needed really; but I find the manual way is really quick to do once you have everything set up.
OK, one thing I'd like to ask:
Any of you have used the latest version of apk manager that I've linked to?
If so, could you confirm/tell me what option number is the signing apk option?
The version I've beeen using is very old and that (option 16) might be different now... and I'd like to correct the OP if needed. I'm just too lazy to download and try the new soft at this time.. 1 Thank for 1st the answer on this
[] AL [] said:
OK, one thing I'd like to ask:
Any of you have used the latest version of apk manager that I've linked to?
If so, could you confirm/tell me what option number is the signing apk option?
The version I've beeen using is very old and that (option 16) might be different now... and I'd like to correct the OP if needed. I'm just too lazy to download and try the new soft at this time.. 1 Thank for 1st the answer on this
Click to expand...
Click to collapse
Hey AL, I used the same apk manager as you, but the in new APK multitool it is option 19 - Sign an apk.
Signign zip
I'm having trouble signing the zip. This is the log from APK multi tool:
Spoiler
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)
'""platform-tools"\adb.exe"' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
Error: Unable to access jarfile signapk.jar
Could Not Find C:\Program Files\place-apk-here-for-signing\../place-apk-here-for-signing/empty_Patch.zip
The system cannot find the file specified.
I do not understand what's wrong? Is there another way to sign the zip?
Thanks [] AL []…
I really like the detailed manual guides, they really help you understand things clearly..
Doesn't matter from where I send it, what matters is written above
pavelcheto said:
I'm having trouble signing the zip. This is the log from APK multi tool: ...
I do not understand what's wrong? Is there another way to sign the zip?
Click to expand...
Click to collapse
Well, I'm no expert of the APK multitool and as mentioned before, I'm even using an old outdated one w different options... But look around on xda and on the Play store, there are numerous apk signing tools around and it should be a fairly simple process (I might look further into it for you later once I get access to my desktop...)
neo.ank said:
Thanks [] AL []…
I really like the detailed manual guides, they really help you understand things clearly..
Click to expand...
Click to collapse
Thanks.
I'm glad you like them.
recovery.zip
Hi,
I used the steps you outlined to build myself a CWM 5.0.2.7 'recovery.zip' to switch back from touch on my T989..
what I did was to use recovery instead of system so there is a recovery folder and inside it, recovery.img:
ui_print("CWM recovery 5.0.2.7 Flasher");
ui_print("----------------------------");
mount("MTD", "recovery", "/recovery");
show_progress(0.100000, 40);
ui_print(" Unpacking ");
show_progress(0.100000, 40);
package_extract_dir("recovery", "/recovery");
ui_print(" Replacing Files ");
unmount("/recovery");
show_progress(1.000000, 10);
ui_print(" Done !! ");​
my updater-script seemed to work fine but my phone is still at 5.8.1.3 touch..
Any suggestions as to what I did wrong?
Oh, and many many thanks for the well written tutorial
mycorrado said:
Hi,
I used the steps you outlined to build myself a CWM 5.0.2.7 'recovery.zip' to switch back from touch on my T989..
what I did was to use recovery instead of system so there is a recovery folder and inside it, recovery.img:
Code:
[I]ui_print("CWM recovery 5.0.2.7 Flasher");
ui_print("----------------------------");
mount("MTD", "recovery", "/recovery");
show_progress(0.100000, 40);
ui_print(" Unpacking ");
show_progress(0.100000, 40);
package_extract_dir("recovery", "/recovery");
ui_print(" Replacing Files ");
unmount("/recovery");
show_progress(1.000000, 10);
ui_print(" Done !! ");
[/I]​my updater-script seemed to work fine but my phone is still at 5.8.1.3 touch..
Any suggestions as to what I did wrong?
Oh, and many many thanks for the well written tutorial
Click to expand...
Click to collapse
You're welcomed and thanks to you.
As for your question, well, I'm no real 'zip patch guru' here and I'd have to dig and learn quite a lot more on this before writing up or suggesting a script to you.
But, I think that recovery is a 'big piece' to replace on the system and really, this would fall outside the scope of this tuttorial. Remember that I mentioned 'for simple apk/file replacement'...
Furthermore, your script might need to delete the files you want to replace first, then replace them and then set their permission/owner ...and what not!?! [again I'm just speculating here and don't take my words for granted - I might be completly off...] All that might actually be done more easilly with the help of a (or some) [sub-] script...
Finally, I'd suggest you to download [if you haven't already] the touch recovery ( v2.2.1) from Team Win and to have a look at its updater-script and the scripts it uses. It's a good occasion to learn anyway... I also imagine that it is very close to what you want to achieve and you might just need to replace your recovery file(s) and re-sign the zip before flashing....
Like always; do a nand backup before flashing anything serious like this...
Good luck and tell us how this turns out for you.
Cheers,
/A
Hey.. Can you convert my updater-script to Edify's updater-script ?
I tried but something is wrong.. Please can you make it for me ?
Here is the zip file of that script..
http://dl.dropbox.com/u/51440399/update-script.zip
Thanks for this guide anyway..
androidnerd2 said:
Hey.. Can you convert my updater-script to Edify's updater-script ?
I tried but something is wrong.. Please can you make it for me ?
Here is the zip file of that script..
http://dl.dropbox.com/u/51440399/update-script.zip
Thanks for this guide anyway..
Click to expand...
Click to collapse
Your Amend script was very simple:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:framework
set_perm_recursive 0 0 0755 0644 SYSTEM:app
show_progress 0.1 10
From the OP, 2 links: "If you're interested in reading more or want to go a little more 'hard-core' on this, you can go read here and here."
--> First of them @ § Section "Copy To System & Data:-" (exactly like yours):
Code:
copy_dir PACKAGE:system SYSTEM:
becomes these two lines:
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
--> @ § Section "Folder Permission:-":
Code:
set_perm_recursive 1000 1000 0771 0644 DATA:app
becomes:
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
So your next 2 lines become:
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
set_perm_recursive(0, 0, 0755, 0644, "/system/app");
--> "Progress bar":
Code:
Edify:
show_progress(fraction, duration);
Amend:
show_progress fraction, duration
So your old script is mainly doing the same thing as I've explained in the OP: it replaced files from a package onto the system folder. It was also setting permissions/ownership for 2 system folders [but those are the default values for those folders anyway and this might not be needed afterall...]
So basically, you can use the example zip from the OP and its' script untouched; I believe that it should work "as is". Just make sure that you follow the rest of the OP and organize your "package" [files inside] properly and then sign the zip. If it still doesn't work, please refer to these comments below.
Cheers and good luck.
General comments 'to all' re this:
Different phones and roms use different mounting partitions, block sizes, SD-EXT1/2/3/4,...; that means that there will be cases where certain specific scripts will be required. No one can give that to you if you do not give the basic details/info about what you run on.. Again, also please read the two links given above and do your part of the work in order to find out your system's specifics and learn the very basic 1 or 2 scripts.
Check different zip patches that worked for you before and study their scripts and then go experiment... But as always, backup first.
/A
thanks for tut
i followed your tutorial. well written:good:
but i have a problem here.. everytime i put the patch zip in the "place-apk-here-for-signing" folder and do the signing using apk multi tools using option *17( new version), the script window closes suddenly and the zip file disappears from that folder.
Whats wrong???
Error Log found:
Code:
|07-Jul-12 -- 2:40:18.72|
--------------------------------------------------------------------------
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
'platform-tools\adb' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find E:\Program Files (x86)\apkmultitool\place-apk-here-for-signing\../place-apk-here-for-signing/signed.apk
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.io.ByteArrayOutputStream.grow(Unknown Source)
at java.io.ByteArrayOutputStream.ensureCapacity(Unknown Source)
at java.io.ByteArrayOutputStream.write(Unknown Source)
at java.util.zip.DeflaterOutputStream.deflate(Unknown Source)
at java.util.zip.ZipOutputStream.closeEntry(Unknown Source)
at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
at java.util.jar.JarOutputStream.putNextEntry(Unknown Source)
at com.android.signapk.SignApk.copyFiles(SignApk.java:401)
at com.android.signapk.SignApk.main(SignApk.java:473)
The system cannot find the file specified.
Any help??
chinmay_7d said:
i followed your tutorial. well written:good:
but i have a problem here.. everytime i put the patch zip in the "place-apk-here-for-signing" folder and do the signing using apk multi tools using option *17( new version), the script window closes suddenly and the zip file disappears from that folder.
Whats wrong???
Error Log....
Any help??
Click to expand...
Click to collapse
Hi and thanks,
as per your issue, strange apk that disappear..
Well I've said it before: I'm no expert at debugging apk multi-tool issues.. but what came to my mind is did you set your windows variables path for java?
Other than that, I see out of memory message...don't know if it's part of the issue or just part of the crash spitout... I suggest that you seek further help on the apkmultitool thread directly maybe.
Otherwise, try getting something like "zip signer 2" from the Market and try signing that way.
/A
double-post - sorry!
...my first here I think ;P
* * * * IMPORTANT UPDATE * * * *
Your old zips created following this guide might no longer work on recent (post-Sept 2012) cm7 builds.
PLEASE READ THE OP CAREFULLY AGAIN (and redo/update your patches).
Cheers
/AL

[HowTo] Create your own custom rom using kitchen

Not my responsibility if you soft brick your phone.
What you need:
1.Kitchen by Dsixda http://forum.xda-developers.com/showthread.php?t=633246
2./system directory of your custom/stock rom.
3.Root access on phone
Root browser https://play.google.com/store/apps/...xLDEsImNvbS5qcnVtbXkucm9vdC5icm93c2VyZnJlZSJd
Root explorer https://play.google.com/store/apps/details?id=com.speedsoftware.rootexplorer&feature=search_result
5.Common sense and half an hour (MOST IMPORTANT)
Instructions:
(I presume that you have already installed Cygwin.)
GETTING SYSTEM FILES
1.Install your preferable Root file browser in your phone.
2.Open and look down for system folder in it.
3.Copy the whole folder on your sd card
OR
1.Open your favourite custom rom and copy the system files in there.I personally used creeds v2.5
(Use this method if you want to test it or you are a lazy kid like me!)
SETTING UP ROM
1.Open Cygwin and type "cd kitchen" and press enter
2.Type "./menu" in it. You will see a menu after that.
3.Go to Cygwin>>home>>user>>kitchen>>original_update
4.Make a folder there named as "WORKING_XXXXX" and put the /system files you obtained in it.
5.Go back to Cygwin and press 1.
6.Press enter once again and select the name of your working folder by pressing the number against it.
7.After this it will ask for naming another folder.Do as you want.
8.Now you have a working folder which is going to become your future rom. Select any options from the menu which you would like to have in your rom.(I have not tested all of them so there is a chance that some of them wont work).
BUILDING THE ROM
1.Press 99 to build the working folder.
2.Go for the interactive mode so press 1.
3.Zipalign them by pressing y. A wall of text would come but dont worry
4.Add updater-script. Again a hell lot of text
5.Press y again
6.Sign your rom by pressing y
7.Change the name of your rom by pressing y
8.Press Enter to finish!
9.Go to OUTPUT_ZIP and open the your rom and go in META-INF fodler.Over here you need to put the updater scripts which you want for your rom. I have tested the scripts from Creeds v2.5 and it installs perfectly. (This is not a necessary step because you can also install your rom with the original META-INF script.)
10.Copy the rom to your sdcard
11.Boot in cwm and wipedata+cache and then install your rom.(Have a backup in hand)
12.It should install perfectly cuz it booted properly in my 9/10 tests.
If you want to customise your rom then look below. It should be done before the building the rom.
UNDER CONSTRUCTION
MORE TO COME: TWEAKS,ICONS,ICS SETTINGS,USEFUL APPS and many other customizations.
DONT KNOW IF THEY WORK OR NOT. I AM STILL TESTING THEM.
Ok here is it for tweaking and making your rom beautiful.
Tweaking-
Use these links for init.d scripts. To install them open the zip files on your pc and drag the scripts in system>>etc>>init.d into the WORKING_XXXX folder.
http://forum.xda-developers.com/showthread.php?t=1491714- [email protected]
http://forum.xda-developers.com/showthread.php?t=1227269
http://forum.xda-developers.com/showthread.php?t=1353903
http://forum.xda-developers.com/showthread.php?t=991276
Icon Packs-
Open the links and install these packs through cwm.
http://forum.xda-developers.com/showthread.php?t=1553292 - Specifically for Galaxy Y
http://forum.xda-developers.com/showthread.php?t=824656- Supports all phones and has over 700+ packs!!
http://forum.xda-developers.com/showthread.php?t=1552767- 3D icons
ICS Settings Mod-
Follow the thread
http://forum.xda-developers.com/showthread.php?t=1576565
Now adding launchers: There are two ways 2 do this.
1.Remove touchwiz30.apk from your system>>app and replace it with the apk of your launcher.
2.Put your launcher.apk system>>app directory and flash it. http://www.mediafire.com/?kr1oc425451nzvy (Please thank here once of you use htis http://forum.xda-developers.com/showthread.php?t=1602200 its the source of script)
Adding lidroid 14 bar toggle
http://forum.xda-developers.com/showthread.php?t=1511307
Locker
http://forum.xda-developers.com/showthread.php?t=1403761
UOT kitchen for many customizations
http://galaxyygaming.blogspot.in/2012/03/uotdevelop-ur-own-themesmaking-ur-own.html
Bootanimation
http://forum.xda-developers.com/showthread.php?t=1602200
Useful Apps:
UNDER CONSTRUCTION
Will add new things as I discover them. I am forgetting alot of things right now.
Sent from my GT-S5360 using XDA
TROUBLESHOOTING
1. If you get problems in installing a rom then change your META-INF folder with this one :http://www.mediafire.com/?0g1m8cobnby046u
1A .Use the script above if you have integrated kernel in your rom.
1B. If you have a rom without kernel then remove these lines:
Code:
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
2. If there is a package error then extract the files of the rom and repack them using any compression software.
3. If rom installed correctly but stuck onto logo screen?? Then remove try removing kernel and flashing rom again.
4. If rom installed correctly but got onto bootloop then there could be many possibilities which could lead to this. If you want accurate cause of it then do a logcat.
5. If there are some apk's which are not working then check if you correctly modded them.
Most of the problems occur because of updater-script problems so before trying any of the troubleshooting try the first tip.If you face different problem then post below.
Sent from my GT-S5360 using XDA
Last one maybe.
Sent from my GT-S5360 using XDA
in case if dsixda's script didn't work (show error 7) we can follow these guide:
1. extract the rom.
2. open updater-script with notepad++
3.1 if we want install only the rom, without kernel. delete 'write_raw_image PACKAGE:boot.img BOOT:'
3.2 if we want install the kernel and the rom, replace 'write_raw_image PACKAGE:boot.img BOOT:' with
package_extract_file("bmlunlock", "bmlunlock");
package_extract_file("boot.img", "boot.img");
set_perm(0, 0, 0755, "bmlunlock");
mount("vfat", "/dev/block/mmcblk0p1", "/sdcard", "rw");
run_program("bmlunlock");
run_program("/system/bin/dd", "if=boot.img", "of=/dev/block/bml7");
4. save the file
5. rezip the rom
kurotsugi said:
in case if dsixda's script didn't work (show error 7) we can follow these guide:
1. extract the rom.
2. open updater-script with notepad++
3.1 if we want install only the rom, without kernel. delete 'write_raw_image PACKAGE:boot.img BOOT:'
3.2 if we want install the kernel and the rom, replace 'write_raw_image PACKAGE:boot.img BOOT:' with
package_extract_file("bmlunlock", "bmlunlock");
package_extract_file("boot.img", "boot.img");
set_perm(0, 0, 0755, "bmlunlock");
mount("vfat", "/dev/block/mmcblk0p1", "/sdcard", "rw");
run_program("bmlunlock");
run_program("/system/bin/dd", "if=boot.img", "of=/dev/block/bml7");
4. save the file
5. rezip the rom
Click to expand...
Click to collapse
No chance of that error because I am not using any kernel (boot.img) in my rom.
well...you didn't need that but someone may want to install another kernel in their rom.
kurotsugi said:
well...you didn't need that but someone may want to install another kernel in their rom.
Click to expand...
Click to collapse
hmm.. ur right
btw, you can add another method to get system folder. in case if we dont have rootex we can get it from a nandroid backup. we can copy system.rfs.tar from the backup folder to original_update then use kitchen to extract it.
kurotsugi said:
btw, you can add another method to get system folder. in case if we dont have rootex we can get it from a nandroid backup. we can copy system.rfs.tar from the backup folder to original_update then use kitchen to extract it.
Click to expand...
Click to collapse
I hav not tried it so cant assure it yet
it is an exact copy of system partition. i made my rom in this way. you may test it if you want
sir can you update this? been waiting..by the way...have you created your custom rom already?
devion14 said:
sir can you update this? been waiting..by the way...have you created your custom rom already?
Click to expand...
Click to collapse
its already complete for basic cooking. I'm sure it will work. do you need another spesific information?
about this one?
MORE TO COME: TWEAKS,ICONS,ICS SETTINGS,USEFUL APPS and many other customizations.
will it be the same with your tut sir?
nope...I already put all I want on my post. there are several things that should be learned by ourself. I want my guide as easy as possible to be followed. I think its already too long to be called 'simple' guide (lol)
ok..thanks....by the way is there any offline uot kitchen or theming kitchen?
theming is not as difficult as you think. create our own theme is sure fun. I think you should give it a shot.
devion14 said:
sir can you update this? been waiting..by the way...have you created your custom rom already?
Click to expand...
Click to collapse
I will update this post tomorrow and yes I have created my own custom rom using this but its only for my friends presently ... u can also use kurotsugi's thread for some customization too...
will be waiting....
devion14 said:
will be waiting....
Click to expand...
Click to collapse
Updated it... There isnt a step by step tut cuz i dont hav much time(exams are near) and the threads are pretty much self explanatory. I will add many more, I just made this in a hurry.

[Q] How Can I Make CWM Flashable Zip ?

Hello ,
How can I make CWM flashable zip ?
I'm making mod but I can't make flashable zip
Example : I made icon pack for Contacts , mms, video player. Carry the system folder manually. And set permissions. This is very exhausting. I want to make flashable zip.Please make detailed guide. If you help me I would be happy. Thank you.
Arnadel said:
Hello ,
How can I make CWM flashable zip ?
I'm making mod but I can't make flashable zip
Example : I made icon pack for Contacts , mms, video player. Carry the system folder manually. And set permissions. This is very exhausting. I want to make flashable zip.Please make detailed guide. If you help me I would be happy. Thank you.
Click to expand...
Click to collapse
Scripts for creating flashable zips and signing apk/zip files
Just wanted to share a few scripts that I have created for making things a little bit easier. These are bash scripts so they are only going to be functional in a bash shell such as Linux or OS X. If you're running on Windows then you might be able to execute these in Cygwin but I don't know that for certain. You could simply run the same commands in a DOS prompt. You might have to change syntax a little and manually execute them, but the basic process is the same.
I'm going to assume that you are familiar with adb. If not, go learn about it -- download the Android SDK, install the platform-tools, and make sure you can use it! You will probably want it to be in your PATH variable so that you can execute it at any time from a command line.
The next thing you will need is apktool installed, so that you can extract and build .apk files. This can be found here:
http://code.google.com/p/android-apktool/
Now we can move on to using these scripts. There are three files included inside of the scripts.zip file attached to this post. The zip file contains the following:
1. signit: This script will sign a .zip file or a .apk file. If you send in a .apk file as an argument then it will also zipalign the file. It uses testkeys to sign files. 2. createzip: This script will create a skeleton zip file for you. It will print out some instructions to help guide you with the creation. 3. update-binary: This file will never change. It's an interpreter for Edify scripts -- which is what YOU will be writing! You need to include an Edify script inside of the zip file so that recovery knows what exactly you want it to do. This file should be carried around inside of each zip as it converts your Edify script into something that recovery can actually understand and execute.
You will need to make sure that signit and createzip are executable. I would just use chmod +x on them.
The fourth and final thing you need is testsign.jar. You can get it here:
http://code.google.com/p/zen-droid/d...n.jar&can=2&q=
If you look at the top of the createzip/signit script you will see that the the variable binLoc gets set to /usr/local/bin. What this means is that you should place all four of the above files into that location. If you don't like /usr/local/bin then just change the binLoc variable to point to some other directory where you will store these 4 files, and make sure that directory is in your PATH variable.
We'll start by just modifying some images in a single file. For example, let's modify the battery icons in /system/framework/framework-res.apk. I'm not going to add or remove any icons that didn't previously exist, I'm simply going to change a few of them. If you really want to get into modifying some files then you will need to decompile the file in order to change any corresponding XML files (sidetrack -- if you're curious then look in res/drawable at the following 3 files: stat_sys_battery.xml, stat_sys_battery_charge.xml, zzz_stat_sys_battery_1.xml). I'm going to throw this step into the instructions, not because it's necessary here, but because it's a good idea to know how to do it anyway. So let's try and modify our icons!
The basic steps would be something like what I outline below. Before you try this I suggest you make a full backup in recovery just in case something goes wrong. I have reviewed the steps below several times and even walked through them to make sure they are correct so they should work for you.
1. Get the apk file:
Code: $ adb pull /system/framework/framework-res.apk
Copy this file somewhere safe because we are going to push it back to the phone later (you probably won't want to keep the edits we make in step 3 below indefinitely).
2. Decompile it with apktool:
Code: $ apktool d framework-res.apk
3. Update the necessary files:
Step 2 should have unpacked the file into a folder named framework-res. We want to update the necessary files inside of it. The battery icons are all stored res/drawable-hdpi. Navigate to that directory and look for files like stat_sys_battery_*.png. These are the images that get displayed while your phone is running on battery power. The charging images are stat_sys_battery_charge_anim*.png. If you have a set of icons that you want to use then simply paste those icons in and overwrite the existing ones. You can move on to the next step.
If you don't already have images lined up then we can just modify some existing ones to verify that your changes worked. I'll assume you have the stock MikG battery icons (or some way of knowing what your current charge level is) so take note of what your current charge level is, and then modify a few of those images around that area. For example, if your phone is currently at 65% then maybe you will want to modify stat_sys_battery_charge_anim66.png, stat_sys_battery_charge_anim67.png, stat_sys_battery_charge_anim68.png, etc. Just open up these files in GIMP, Photoshop, or whatever. Don't change their size but just change something -- maybe change the color from white to green. Or you could just draw some lines on them. Just make some changes that will be noticeable and then save the files.
4. Package it back up:
Code: $ apktool b framework-res framework-res.apk
5. Sign it using the signit script:
Code: $ signit framework-res.apk
6. Create a skeleton zip file using the createzip script:
Code: $ createzip system/framework framework-res.apk
Note that the createzip script accepts 2 arguments. The first is the directory where the file needs to go, and the second is the name of the .apk file. If you wish, you can run the script without any arguments and it will prompt you for the values. In either case it will give you instructions for what to do next. Here is an example in interactive mode (values that I typed in are highlighted in blue):
Code: $ createzip Please enter the directory that your apk file will go in Example: system/framework system/framework Please enter the apk file to put into this zip Example: framework-res.apk framework-res.apk Creating appropriate directory structure Directory structure complete. A sample updater-script file has been created for you. This sample script will push a file to the /system mount point.
Next steps: 1. If necessary, modify the file /home/gamblor/Desktop/scripts/zip/META-INF/com/google/android/updater-script
2. When script is complete then zip up the directory and sign it: $ cd zip $ zip -r name.zip * $ signit name.zip
7. Make the actual zip file:
Zip up the directory in a recursive fashion using the exact instructions supplied by the script. Note that the createzip script will build a sample updater-script file for you, which says to mount /system and push the files over to it (since that's what most flashable zips do anyway). For this reason, you shouldn't actually need to modify that script at all for the purposes of this tutorial. It doesn't do anything fancy like scroll text across the screen, but it should do the trick to get the file installed. Feel free to open it up with a text editor and see what it does. It will also copy the file framework-res.zip to the appropriate location so everything is in place and we can create our actual zip:
Code: $ cd zip $ zip -r battery-icons.zip * $ signit battery-icons.zip
8. Flash it like you would any other file:
At this point you should have a file named battery-icons-signed.zip. Copy that file to your sdcard and then reboot into recovery and flash it (remember to backup first, if you haven't already). If everything goes well then you should be able to reboot and then check the battery icons for the percentage level that you modified. If everything went well then you should see your modified icons. Congratulations!
As a side note, if you're making mods for yourself and don't plan on creating a flashable zip (or maybe not just yet), you can easily just push the file in adb. This saves you from having to make a zip file, sign it, copy it to your zip card, reboot, and then flash from recovery. So you can just replace step 6 above with the following commands and stop after this:
Code: $ adb remount $ adb shell stop $ adb push framework-res.apk /system/framework $ adb shell start
Obviously since this post was supposed to demonstrate creating a zip file, I included those instructions. But pushing stuff in adb is a shortcut if you're just looking to test things out on a single phone and don't want to waste time dropping into recovery. Remember that file that I told you save away in step 1? Well, if you want to restore your battery icons so that some of them don't have weird colors/marks on them then cd into the directory where you saved the original file away, and then just run the 4 commands above. It should replace the file with the original one, thus setting the battery icons back to the way they were before you ever ran any of the commands above.

Categories

Resources