[TOOL] Apktool : decompile and recompile apk on android - Micromax Canvas Magnus A117

decompile and recompile apk or even extract android boot.img/recovery.img on your android phone using this tool
This tool might come in handy is for all respected devs,modders and themers of our device
How to's :
First Download the package apktool4.4_armhf.zip from
https://code.google.com/p/apktool/downloads/detail?name=apktool4.4_armhf.zip&can=2&q=
Extract archive to /sdcard or if you want Better read write speed use the cache/data folder set permission to rwrr
Install Apktool4.x.apk
Now open the app from app drawer.
And
Make the most out of it !
For boot.img and recovery.img
Copy your boot.img to sdcard or /cache/yourfolder(for fast processing)
Single click boot.img select "extract"You will see new file named "kernel" and new folder "ramdisk"
if extracted properly no error will show up.
You can edit files in ramdisk folder.after editing touch ramdisk and select "repack" you can make the new boot.img which is named as new.img. For recovery.img it's the same way.
Hope this helped

NIKHILALWAYZ said:
decompile and recompile apk or even extract android boot.img/recovery.img on your android phone using this tool
This tool might come in handy is for all respected devs,modders and themers of our device
How to's :
First Download the package apktool4.4_armhf.zip from
https://code.google.com/p/apktool/downloads/detail?name=apktool4.4_armhf.zip&can=2&q=
Extract archive to /sdcard or if you want Better read write speed use the cache/data folder set permission to rwrr
Install Apktool4.x.apk
Now open the app from app drawer.
And
Make the most out of it !
For boot.img and recovery.img
Copy your boot.img to sdcard or /cache/yourfolder(for fast processing)
Single click boot.img select "extract"You will see new file named "kernel" and new folder "ramdisk"
if extracted properly no error will show up.
You can edit files in ramdisk folder.after editing touch ramdisk and select "repack" you can make the new boot.img which is named as new.img. For recovery.img it's the same way.
Hope this helped
Click to expand...
Click to collapse
first thnk u sir for ur tutorial i am mtk user. i put my boot.img into system folder and extracted i got this msg:-
"1250 1 records in
1250 1 records out
2247 blocks". and following folders are created there 1)ramdisk
2)kernal
3)ramdisk.cpio.gz (this file also get created) is it ok? should i go ahead?

prajul1123 said:
first thnk u sir for ur tutorial i am mtk user. i put my boot.img into system folder and extracted i got this msg:-
"1250 1 records in
1250 1 records out
2247 blocks". and following folders are created there 1)ramdisk
2)kernal
3)ramdisk.cpio.gz (this file also get created) is it ok? should i go ahead?
Click to expand...
Click to collapse
yes:good: ,for more info search on xda about decompiling and tools for editing.

I want to make a duplicate apk by using apktool 4.6 for phone.
example wechat.apk to wechat01.apk
And to install both on same device..
PLEASE PROVIDE TUTORIAL FOR DOING IT...
THANKS

Nit Patel said:
I want to make a duplicate apk by using apktool 4.6 for phone.
example wechat.apk to wechat01.apk
And to install both on same device..
PLEASE PROVIDE TUTORIAL FOR DOING IT...
THANKS
Click to expand...
Click to collapse
First,you will have to change the entire framework of the app (sorry,i have no idea how to do that) and secondly, both apps won't work in using the same device because of the android ID. i know to how to edit text/pictures/icons /fonts etc of an app..but no idea relating permissions management , so if you have any questions regarding that feel free to ask

Related

[Android 4.0][GUIDE]Port ICS transition animations on EVERY ROM & EVERY PHONE

Because some people asked me, I wrote this tutorial that explains how to port ICS transition animations on EVERY ROM & especially on EVERY PHONE!!!.
1) First of all, you need to download and install APK MANAGER:
http://forum.xda-developers.com/showthread.php?t=695701
2) Extract with WinRAR, from the ROM you want to modify, the file framework-res.apk, that you can find in the directory \System\framework\.
3) Go to the apk manager folder and place the framework-res.apk file in the folder "place-apk-here-for-modding".
4) In the apk manager folder, double click on the file "Script". A cmd window will open.
5) Where it says "Please make your decision", write "22" (Set current project) and enter. Then enter "1" (to choose the first apk) and enter. Then enter "9" (Decompile apk) and enter.
The script will decompile the framework-res.apk.
6) Now go to your apk manager folder, go to Projects\framework-res.apk\res\anim\.
In this folder there are the animations of your rom. They consist in some .xml files decompiled.
7) Download this:
http://www.mediafire.com/?1qjwtotg1r8umm1
8) Copy the files from the folder "anims" of the zip downloaded into the anim folder and you are asked to replace the files; choose yes. Then copy also the files from the folder "other_files" to the anim folder.
9) Now go to your apk manager folder, go to Projects\framework-res.apk\res\values\. Edit the file integers.xml and put these two lines under the line of "shortAnimTime":
<integer name="config_activityShortDur">150</integer>
<integer name="config_activityDefaultDur">220</integer>
Save.
10) Return to Script. Enter "11" (Compile apk) and enter.
The script will rebuild the framework-res.apk.
11) You are asked if this is a system application. Enter "y" and enter. Then a second question appears. Enter newly "y".
12) Then after it processes, Don't press anything & DON'T CLOSE THIS WINDOW!!! A new folder "keep" is created in the apk manager folder. Go inside it and delete the file "resources.arsc". Now go inside keep\res\anim\ and delete every file with the same name as every file of the "anims" folder of the zip downloaded.
Then return to Script and press enter. It processes, then if everything went ok, in the folder "place-apk-here-for-modding" a file "unsignedframework-res.apk" is created. Copy it outside and rename it "framework_res.apk".
13) Now you can create a flashable zip or you can simply push it to your system (but you have to sign the apk).
CONGRATRULATIONS!!! YOU ARE DONE!!!
And if you think this tutorial is useful, CLICK THANKS!!!
Now I'm satisfied and i can continue studying phylosophy for tomorrow test...
P.S.: If you think that this post can help or interest people of other forums (with other devices), please share this post and also give credit to me!!!
Video of this mod working:
http://www.youtube.com/watch?v=vf1U_30Ngfk
capez said:
Work in progress
Click to expand...
Click to collapse
WHAAOOON, that's great, that's the post I was looking for mate !
This is what we should expect on this forum : knowledge sharing ! Work sharing and ROM/THEME/APPS sharing is great but knowledge is even better.
If I can test something ...
capez said:
Work in progress
Click to expand...
Click to collapse
Will this work with every devices ?? Wow... Cant wait to do this!!!
Sent from my Nexus One using Tapatalk
Finally DONE!!!
cool animations, thanks!!!
(Replaced)
got bootloops on my desire hd.. running glanet ics..
Rotation animations??
I already installed the CM7 transition animation zip from your other thread.. So, thank you in case I haven't appreciated your work
Does this one have screen rotation animation too?
digkong said:
got bootloops on my desire hd.. running glanet ics..
Click to expand...
Click to collapse
Did you pushed the modded framework-res.apk directly into the phone?
Do you think [Android 4.0 ICS] should be in the title in this form? It's a little misleading.
Hmm...It started FC. Removing my links for now. Gonna see why.
Works great
Great guide. It worked for me.
Oddly though, I replaced my framework-res.apk through root explorer, set all the correct permissions, and when I rebooted, my google accounts were deleted, along with my contacts and google music library.
Not a problem though, Ill just have to relogin to them.
Great, it works very well. I maybe found a more simple way to do it :
1. Dowload ApkTools package I've done here :
http://www.multiupload.com/Q6YSAF2MH3
2. Unzip it to your harddrive and put your FrameWork-res.apk in it,
3. Click on "decomp.bat"
4. A new "unpack" directory has been created, with decompiled files in it,
5. Download this:
http://www.mediafire.com/?1qjwtotg1r8umm1
6. Copy the files from the folder "anims" of the zip downloaded into the anim folder and you are asked to replace the files; choose yes. Then copy also the files from the folder "other_files" to the anim folder.
7. Now go to your apk manager folder, go to Projects\framework-res.apk\res\values\. Edit the file integers.xml and put these two lines under the line of "shortAnimTime":
<integer name="config_activityShortDur">150</integer>
<integer name="config_activityDefaultDur">220</integer>
Save.
8. Patch the anim files in it, and edit the xml,
9. When finished, just click "recomp.bat" to get a new compiled file "framework-res2.apk",
10. Juste rename the file and put it in a update zip file, you can use this one and replace the framework file in it by yours :
http://www.multiupload.com/PPMFV9Y316
Should work !!!
PS : If your framework-res.apk contains .9.png files, decompilation will fails. No problem with standard CM7 framework-res.apk, but some custom themed ROM can have the problem. Don't know how to fix that, maybe the 1st solution with APK MANAGER work better !?
capez said:
Did you pushed the modded framework-res.apk directly into the phone?
Click to expand...
Click to collapse
i used root explorer..
hmmm.. it maybe beacause i did not set permissions right...
great it worked after i set the permissions.. thanks for ur work will post this guide in dhd forum too..
nmeuret said:
Great, it works very well. I maybe found a more simple way to do it :
1. Dowload ApkTools package I've done here :
http://www.multiupload.com/Q6YSAF2MH3
2. Unzip it to your harddrive and put your FrameWork-res.apk in it,
3. Click on "decomp.bat"
4. A new "unpack" directory has been created, with decompiled files in it,
5. Patch the anim files in it, and edit the xml,
6. When finished, just click "recomp.bat" to get a new compiled file "framework-res2.apk",
7. Juste rename the file and put it in a update zip file, you can use this one and replace the framework file in it by yours :
http://www.multiupload.com/PPMFV9Y316
Should work !!!
PS : If your framework-res.apk contains .9.png files, decompilation will fails. No problem with standard CM7 framework-res.apk, but some custom themed ROM can have the problem. Don't know how to fix that, maybe the 1st solution with APK MANAGER work better !?
Click to expand...
Click to collapse
Maybe this is the problem someone is having...Someone must compare your version and mine, to see which one works and which not. (Obviously with a non-cyanogenmod rom )
Update done for CM7 Nightly 176 (latest) :
http://www.multiupload.com/J88VTO2SU6
---------- Post added at 07:01 PM ---------- Previous post was at 06:59 PM ----------
capez said:
Maybe this is the problem someone is having...Someone must compare your version and mine, to see which one works and which not. (Obviously with a non-cyanogenmod rom )
Click to expand...
Click to collapse
Well, in the APK MANAGER post they say :
>Optimize pngs (ignores .9.pngs)
So it should work better !! (but as I'm lazy, I still use APKTOOL one click solution )
I got instant bootloops! How? Can u patch for me??
Sent from my Nexus One using Tapatalk
nmeuret said:
Update done for CM7 Nightly 176 (latest) :
Click to expand...
Click to collapse
Just a heads up. I downloaded your file and you renamed your framework-res wrong. There's a space between "framework-res" and ".apk" so it won't overwrite the original.
this does not have the rotation animation..
anyway to get that..
dawgpound6985 said:
Just a heads up. I downloaded your file and you renamed your framework-res wrong. There's a space between "framework-res" and ".apk" so it won't overwrite the original.
Click to expand...
Click to collapse
OOpppsss, thanks, fixed here :
http://www.multiupload.com/J88VTO2SU6

[Guide]Create Custom ROMs | Modify Apks

Hello xda.
This is a Guide to help anyone who wishes to create custom ROMs. This Guide aims to be as complete as possible, and will give all information related to creating a custom ROM... editing apks, adding or removing apps, de-odexing apps, and so on.
Al suggestions to improve upon this guide are welcome.
0. Pre-requisites
Click to expand...
Click to collapse
Credits to...
1. puppet13th... My mentor, teacher, and a great friend.
2. Wanman... ApkTool for ICS
3. langthang... For a great Guide on Creating Update Script
4. lokeshsaini94... For lots of help
Downloads
You need to Download the following...
1. Apk Tool [link(ICS)|link(GB)]... A tool for De-Compiling apks
2. 7 zip [link]... A tool for un-compressing any sort of compressed file
3. ROM signer [link]... Restores the signing of the ROM zip file, which is messed up while uncompressing
4. Any Image Resizer​
Setting up your PC
You need to do the following...
1. Create a folder (preferably in Desktop, and name it "Android")
2. Create Sub-Folders by the names "Base ROM" and "Custom ROM". Also make Sub Folders by the name...
a. ApkTool... Extract contents of ApkTool Here
b. Signer... Extract Autosigner here​
I. Let's get our Base ROM
Click to expand...
Click to collapse
You need to get the base ROM in the ./Desktop/Base ROM folder. It is also recommended that you flash the Base ROM into your phone, as it will help in testing the mods, as you make them.
The process of getting the base ROM will depend on the scenario your situation fits in, from amongst the following...
1. You want an already made Custom ROM as your Base... Download the ROM [willl come in .zip folder], and extract it in /Desktop/Android/Base ROM folder
2. You want to base your ROM on a stock firmware, which came in an ftf package... Use the following tool to extract the files from the ftf file.
3. You want to base your ROM on a stock firmware, which is instaled on your phone...
Take a back up of the ROM using ClockWork Mod, and copy the back up files (from /sdcard/clockworkmod/backup), somewhere to your computer. Then, using this tool, extract the files to /Destktop/Android/Base ROM
Copy the following folders from /system of your phone using Root Browser
/app
/bin
/etc
/fonts
/framework
/lib
/media
/semc
/usr
/xbin
build.prop​
4. You want to base your ROM on a stock firmware, that comes as a ready to flash .zip file on the internet... Download the ROM, and extract it in /Desktop/Android/Base ROM folder
After completion, the Base ROM will have the following Folder Structure
Desktop
Android
Base ROM
META-INF [only if you got your base from another Custom ROM][/INDENT][/INDENT][/INDENT]
system
apps
bin
etc
.
.
.
data [may be]
Click to expand...
Click to collapse
*ScreenShots*
Copy the contents of Base ROM folder to Custom ROM folder.
We now have the foundation of our ROM laid out in front of us, inviting us to show our creativity.
II. Let's work on the Base ROM... Creation of the Custom ROM
Click to expand...
Click to collapse
A. Apks Make up the Android System...
We will now work, only on the /Desktop/Android/Custom ROM Folder
1. Look into the /system/apps...
You will find apk files which will be raninging frm 100 to 200 in number. Err, half or more are known as "Crapware". You need to remove files which are useless, that's a very important step to enhance performance of your final ROM. Look into your device's forums, to get the list of Safe-To-Remove appks from the respective firmware. In case your base is an already built custom ROM, you will have to remove lesser or none of the files.
2. Here, you can add your desired files as well, keeping compaitability in mind.
3 [Optional]. On a .txt file, keep a record of all the apps your removed or added, as it will help in troubleshooting at a later stage.​
B. Implementing Already-Built-MODs in your ROM...
1. Download any Mod you want to keep in your ROM [Make sure your device, and the Base ROM is compaitable]
2. Extract the zip file and you will get a system folder.
3. Copy the files from the system folder to /Custom ROM/sytem, making sure the files go into the folders they came from.
That is, all apk files from /system/apps folder of the Mod should go to /Custom ROM/system/app folder, and so on...​
C. Changing the Interface... Let's Mess with SystemUI[nterface].apk
Go to /system/app and copy SystemUI.apk to
/Desktop/Android/ApkTool/place-apk-here-for-modding
Working with ApkTool
The link provided in this post is of an easy to use software called ApkTool.
1. Double Click on the Script.bat file to open up the software.
*Screenshot*
2. Decompress the SystemUI.apk using option '9'.
Wait for the process to complete
3. Go to /Projects, and you will find a folder called SystemUI.
Open the /SystemUI.apk/res/drawable folders and you will find lots and lots of .png files
*Screenshot*
4. Look into the files carfully.
Bingo, they correspond to the various system elements of the SystemUI of the Base ROM.
5. Open any file you want to edit, edit it, and save in the original location, replacing the original un-edited file. [On a temporary notepad file, note which all files you edit]
Note: You will notce that there are .png files for, say the Battery Icon. You will find that there are files for each state of the Battery Icon. So if you intend to edit the Battery Icon, you need to edit all the files corresonding to each of the states.
5.A. A common exaple of such editing is making the elements of a Gingerbread SystemUI.apk look like ICS SystemUI.apk. For this get hands on any ICS SystemUI.apk and extract both the files in seprate locations, and then copy the files from the ICS SystemUI folder to GB SystemUI folder. However, here you must make sure that the names of the files coming from ICS SystemUI are changed to corresponding values of the GingerBread SystemUI.apk. Here, also ensure that the new files, which replace the original files, have the same dimensions as the original files. If not use any image resizing tool.
*Screenshot*
6. If you want to edit some values in the .xml files, carry on. Edit the files as you wish, and replace the original files. Once you are done with the editing...
7. Open the Script.bat file and run command 11. [Say NO when it asks if the file is a system file]You will have a new SystemUI.apk file called unsignedSystemUI.apk in /place-apk-here-for-modding folder.
Go and fill your pockets with some cookies from the kitchen. Start having them.
8. Keep the temporary notepad file on one side and open the unsignedSystemUI.apk with 7zip, and open the original SystemUI.apk using 7zip besides it.
*Screenshot*
9. Drag and extract the files you edited to a temporary folder.
10. Drag the extracted files to the SystemUI.apk, replacing the older files, making sure all the edited files go to the proper place. [That's why I asked to keep a note of which all files were edited].
*Screenshot*
11. If you edited some .xml files, then you MIGHT need to copy the resources.acrc file at the root of the unsignedSystemUI.apk file to the root of the original SystemUI.apk file.
Once done, the original SystemUI.apk has now become a modded SystemUI.apk, with your creativity embedded into it. Time to test the SystemUI.apk.
12. Using Quick ADB, push the edited SystemUI.apk to your phone.
*Screenshot*
13. Re-boot your phone and you shoud see the changes you made in the UI. .
In case it gives force close message, you messed up somewhere. So you will have to push the original SystemUI.apk [from /Base ROM/system/apps folder], and try to mod the file from scratch again.
14. Copy the sucessfully modded SystemUI.apk from /Apktool/place-apk-here-for-modding folder to /Custom ROM/system/app folder, replacing the older file.​
D. Changing the Interface... Editing other .apks
1. As earlier, copy the apk you want to edit from /Custom ROM/System/app to /Apktool/**** folder, and perform the modification to optain a new modded .apk file.
2. Test this file if you wish, by pushing it using Qucik ADB.
3. If the modded file wrks, copy this new file to /Custom ROM/System/app and replace the original file​
E. Changing the Interface... Editing the font
1. Take your desired font.ttf file and rename it as DroidSans.ttf..
2. Go to the folder system/fonts/
3. Now, replace the file DroidSans.ttf with your desired DoridSans.ttf...
4. To change the lock screen clock font...replace the Clocktopia.ttf with your desired one (rename first)...​
If you did a good job in the above steps, the /Custom ROM folder should be having the contents of a wonderful ROM in making.
Here, I will like to mention that, if you want to upload your custom ROM on the internet and share it, you must ensure that you did lots of hard work in the above steps. There's no point making a custom ROM without modifying lots of files and adding lots of tweaks.
Just make sure that you do so much of modding that, say, your Gingerbread ROM looks like Jellybean, or say, your ROM made for Galaxy Y works as smooth as an SIII.
III. Compiling the Custom ROM
Click to expand...
Click to collapse
A. If you got your base ROM as in [1 or 4] in step I above
1. Copy the META-INF folder from /Base ROM to /Desktop/Android/Custom ROM
2. Rename the Custom ROM folder to whatever-you-want-your-ROM-to-be-called.
3. Add the Folder to a zip file using 7zip.
4. Take this zip file to /Desktop/Android/Signer folder and run sign.bat.​
X. The new zip file called Update.zip is your ROM.
Copy this file to the SD Card of your phone, format /system, /data, /cache using CWM and flash your .zip file. And enjoy your custom ROM.
B. If you got your base ROM as in [2 or 3] in step I above... Creating your own Update script
Read the following Tutorial. [link]
Once you are done, try the ROM on your phone. Share it if you feel it's great. And hit Thanks Button.
Reserved
Reserved2
nice guide!
thanks for the tutorial.
Nice guide, continue finish it.:good:
Awesome
Adds some more tutorial please:thumbup:
Thanks for your work
Inviato dal mio GT-N7000 con Tapatalk 2
Please also add link to original thread....
Btw .. Nice guide....
In 1. Looking into system apps... you should delete .apk as well as .odex files when you want to remove an app... Like browser.apk and browser.odex... Many peoples won't delete them....
Sent from my GT-S7500 using xda premium
Thanks for this nice guide. :highfive:
Please add the placeholder *Screenshot* s :good:
beautiful
Thanks a lot for this beautiful guide. Loved it
i tried it ............
i followed the guide n tried editin my custom rom technoduos on sgy duos GT-s6102
all i did was extract the rom using CWM and then added removed some apps at /system/apps
no other tweaks just addin n removin apps dats all then compressed it n signed it
then wen i flashed it on my set it worked (yayyyyyyy)
but there were some problems the apps which i del were gone but the ones i added were not there ..........
also wen i flashed the rom again the apps which were del were back how is it possible i made sure i had del em
plz help
thank you very much for your tutorials are very helpful to me
nice guide! thx
Nice Guide...
Thanks for the hard work to track down all this information and publish for us.
Thanks
Thanks... im gonna give this a whirl
Sent from my SGH-T999 using Tapatalk 2
R: [Guide]Create Custom ROMs | Modify Apks
Very useful giude thanks ; )
Inviato dal mio GT-N7100 con Tapatalk 2
:Good:
Sent from my potato oO
thanks

[GUIDE] How to make a flashable .zip file

Today I will show you how to make a flashable .zip file to use with any CWM based recovery.
Thanks - pankaj88
REQUIREMENTS:
- Any file that you want to replace or add to your phone;
- An existing (base) cwm flashable zip file. - I've attached one below;
- 7-zip, Winrar or any program which can open and modify zip files .
STEPS:
DIRECTORY STRUCTURE:
(1) Download and place the sample.zip (attached below) anywhere on your desktop;
(2) Right-click on it and open the archive with 7zip, winrar ... [DO NOT extract]
Now you should see two folders: one called "system" and one called "META-INF".
1. Let's start with the "system" one, so open 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 bootanimation and bootsound. To do so, we have to 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 "etc" (remove " ") using no CAPS or space at the end;
- repeat the process to make another folder called "media";
- 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 sanim.zip file should go in '/system/media' folder and the PowerOn.wav into '/system/etc' folder.
.. If you have more files to add, just follow the logic above; I'm sure you get the idea by now..
Hints
/system/app - all the system apps (SystemUI.apk etc)
/system/framework/ -framework-res.apk, twframework-res.apk, android.policy.jar
/system/etc - vold.fstab, PowerOn.wav(bootsound)
/system/media - sanim.zip (bootanimation) (only for custom ROMs)
/system/lib - libraries (*.so)
2. The other folder included in the opened archive is named "META-INF" and all the file in it should be left unchanged.
That's it !!
Press thanks it that helped u
hi
requirement mentions notepad++
why do we need that ?
can you pls explain how to write scripts or direct me to an easy guide. ?
Sent from my GT-I9003 using Tapatalk
This is the copy paste of an existing thread on xda
I guess its a violation of xda rule
Sent from my GT-I9003 using xda premium
Sorry no need of notepad.
Sent from my GT-I9003 using xda premium
No I studied a thread from pankaj88 and shared it with u guys
Sent from my GT-I9003 using xda premium
As I can see nobody likes to read FAQs
That is the hard way. And thus is the simple way
Sent from my GT-I9003 using xda premium
Moving thread
I agree this is different enough to remain open in the General forum. Moving thread out of the Dev forum. The reason Notepad++ is recommended is that Notepad or Wordpad in Windows will strip off the Unix formatting. There are other editors besides Notepad++ that will work as well, check around if you like.
Thank you,
mf2112
flashable zip steps explain us by screen shots
hi all,
please tell me that how to make flashable zip file for fonts and many.........please upload steps with it's screen shots
thanks all:good:
Stock Flashable Recovery
Hi there I need to create a flashable recovery zip to flash in TWRP. I have all files ready and waiting, I just need to know where to put the recovery.img within the zip.
Thanks in advance.

[TUT] How to extract .ftf file to make custom rom - and few tips [2012 Xperia]

[TUT] How to extract .ftf file to make custom rom - Flashable ZIP [2012 Xperia]
This tutorial is for developers who want to make their own custom rom based on official firmware. OK, let's start.
Explanations:
Inside every flashable zip file there are two folders - system and META-INF:
1) system folder - That is actually your ROM and all it's content (If you ROOT your device you gain access to this folder in your device).
2) META-INF folder - That folder gives instructions to your device (ClockWorkMod) how to flash ROM, sets permissions...
This is method to get Stock/Official system folder that you need to edit to make custom ROM.
You will need to find/make yourself contents of META-INF folder - You may took it from another ROM and (maybe) edit.
NOTE: If you use this method your ROM will work for both Locked/Unlocked bootloaders, and it will require that you have firmware your ROM is based on already installed before flashing.
Click to expand...
Click to collapse
How to get contents of stock/official system folder - Extract .ftf file:
1. Download .ftf file for your device.
2. Extract .ftf file using 7Zip.
3. You will get system.sin and other files. You only need system.sin file so delete others.
4. Open flashtool and inside flashtool open SIN Editor to dump data from system.sin - you will get an ext4 file.
5. Open ext2Read and extract ext4 file.
6. Done.
Click to expand...
Click to collapse
How to put CWM into your ROM:
OK, Now you ask - Why do I have to put CWM into ROM? Let's explain:
CWM is custom recovery that you use to flash zip files to your device. There are two types of CWM:
1. For both Locked and Unlocked bootloaders - Recovery is in the system folder of the ROM.
2. Only for Unlocked bootloaders - Recovery is somewhhere else (You don't need that).
Because your ROM is based on official firmware it will be for both Locked/Unlocked bootloaders.
Therefore, you will flash your ROM in CWM for both Locked/Unlocked bootloaders.
And if you flash you will replace system folder of previous ROM. Because CWM was in that folder of previous ROM - You will lose CWM.
That is why you need to put CWM.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1. Find CWM for both bootloaders for your device.
1. Copy sh file inside files folder to system/xbin.
2. Copy other files inside files folder to system/bin.
3. Go to META-INF/com/google/android/ and you will find updater-script.
4. Add the following lines to it
Code:
set_perm(0, 0, 0755, "/system/bin/recovery.tar");
set_perm(0, 0, 0755, "/system/bin/battery_charging");
set_perm(0, 0, 0755, "/system/bin/battery_charging_help");
set_perm(0, 0, 0755, "/system/xbin/sh");
Thanks srl3gx for tutorial.
Click to expand...
Click to collapse
How to add ROOT into your ROM:
Want your custom rom to be rooted? Here is how:
1. First you need to choose from two great root management apps: Superuser (choose ARM one) and SuperSU(I prefer SuperSU).
2. Download zip file.
3. Go to "system" folder in downloaded zip and copy files within their folders to its place in your rom (same directory - if was "app" then copy in "app".
4. Edit updater-script to set correct permissions - Find that on someone elses rom, it should look just like for CWM, but for those files.
5. Done.
Click to expand...
Click to collapse
Useful notes:
1. Don't edit any file in zip with Windows Notepad or else you will get an error in CWM - you need Notepad++.
2. When you put system and META-INF folders into zip set compression to - Store.
Click to expand...
Click to collapse
thanks.....
very helpful :good:
Option58 said:
[TUT] How to extract .ftf file to make custom rom - flashable ZIP [2012 Xperia]
This tutorial is for developers who want to make their own custom rom based on official firmware. Note that as of 2012 our Xperias use ext4 file system so other tutorials won't work.
Inside every flashable zip file there are two folders - system and META-INF...System folder is ROM content...and META-INF gives instructions to CWM how to flash ROM Content....This is method to get contents of SYSTEM folder, you must find META-INF yourself....​
1. Download .ftf file for your device.
2. Extract .ftf file using 7Zip.
3. You will get system.sin and other files..You only need system.sin file so delete others...
4. Open flashtool and inside flashtool open SIN Editor to dump data from system.sin - you will get an ext4 file.
5. Open ext2Read and extract ext4 file...
6. Done...you will get contents of system folder that you need to modify...
7. IMPORTANT - When you later make zip choose compression - Store
PS: Don't edit files with Windows Notepad or else you will get an error in CWM - you need Notepad++...
Maybe later I will make Screenshots
Click to expand...
Click to collapse
any idea on how I can edit boot.img? the one used for this device are different from what I know.. I am trying dual boot..
you can pack and repack boot img with Android kitchen i think
Great tut
Sent from my Xperia Tipo using xda app-developers app pro
I already knew this method. However I congratulate you for your initiative. :highfive:
Well I learned something else. Before it only used to extract some files. I did not know we could do this way the custom roms.
I'll try to make a custom rom.
However verified that the file size of system.ext4 is 665,654 KB. Once extracted using ext2read, is only 467 MB.
It is normal for this situation? Instead of decreasing, should not increase after extracted?
Kind regards,
Jorge Moreira
drummer1839 said:
you can pack and repack boot img with Android kitchen i think
Click to expand...
Click to collapse
nope.. you cant.. It says android magic header not found. researching a bit, found out that this is a cpio archive.. I did manage to extract it to get 2 .gz files.. but they cannot be opened..
Jorge Moreira said:
I already knew this method. However I congratulate you for your initiative. :highfive:
Well I learned something else. Before it only used to extract some files. I did not know we could do this way the custom roms.
I'll try to make a custom rom.
However verified that the file size of system.ext4 is 665,654 KB. Once extracted using ext2read, is only 467 MB.
It is normal for this situation? Instead of decreasing, should not increase after extracted?
Kind regards,
Jorge Moreira
Click to expand...
Click to collapse
That was my problem too I ended up with an ext2read error and less size
But ext4 is Linux system partition and not zip file. Maybe flashtool made partition that big so every file could go there easily and it couldn't set exact size.
There is no other tool on internet, only ext2read.
Option58 said:
That was my problem too I ended up with an ext2read error and less size
But ext4 is Linux system partition and not zip file. Maybe flashtool made partition that big so every file could go there easily and it couldn't set exact size.
There is no other tool on internet, only ext2read.
Click to expand...
Click to collapse
Anyway I will try this weekend, make a custom rom lighter and functional.
Kind regards,
Jorge Moreira
Jorge Moreira said:
Anyway I will try this weekend, make a custom rom lighter and functional.
Kind regards,
Jorge Moreira
Click to expand...
Click to collapse
OK, don't forget to add CWM and root into your ROM. Actually I will rewrite my post in few days.
OK, the tutorial is rewritten. But it is not done. I will finish the rest later.
i did these steps[even without adding CWM ,just making a flashable stock rom(not included cwm) from cwm] ,but while want to install zip (my custome rom) from recovery ,installation after 2 seconds facing with error("installation aborted")
what is it's reason?
thanks
Jamal_RS said:
i did these steps[even without adding CWM ,just making a flashable stock rom(not included cwm) from cwm] ,but while want to install zip (my custome rom) from recovery ,installation after 2 seconds facing with error("installation aborted")
what is it's reason?
thanks
Click to expand...
Click to collapse
There's some error in updater script, upload it...
Have you edited with notepad or Notepad ++
Option58 said:
There's some error in updater script, upload it...
Have you edited with notepad or Notepad ++
Click to expand...
Click to collapse
i didn't edit updater script
Jamal_RS said:
i didn't edit updater script
Click to expand...
Click to collapse
And you took it from who?
Option58 said:
And you took it from who?
Click to expand...
Click to collapse
oh understood!!
i want to combine your tutorial and this thread
to make a rooted and included cwm custom rom
so i used from "META-INF folder and ROOTING files" that presented on that thread
i think this is my fault!
is it right?
thanks
Jamal_RS said:
oh understood!!
i want to combine your tutorial and this thread
to make a rooted and included cwm custom rom
so i used from "META-INF folder and ROOTING files" that presented on that thread
i think this is my fault!
is it right?
thanks
Click to expand...
Click to collapse
I understand now.
First that zip should only make use to you to learn a little bit more about development. To install that you need already to be rooted with CWM installed.
Second it doesn't install because our devices use a little bit different things. Edit and change every MTD to EMMC and every yaffs (or similar) to ext4. (Notepad ++)
I have only one recovery, from this thread : http://forum.xda-developers.com/showthread.php?t=2034639
Where I need to put it? in zip file or in system folder?
lozohcum said:
I have only one recovery, from this thread : http://forum.xda-developers.com/showthread.php?t=2034639
Where I need to put it? in zip file or in system folder?
Click to expand...
Click to collapse
Read my tut again, that recovery wont do the job.
Does anybody want help me about the new project. Extract ftf. Look at Q&A section.
I read it several times and still can't get it. So please explain. And can You reupload flashtool?

[Tutorial][Guide] How to make a CWM flashable zip

Tutorial on [how to] make a flashable zip 
Credits:
Special Thanks to google.com for teaching me  and rishik999 for sample.zip
---------------------------------------------------------------------------
REQUIREMENTS
- Any file that you want to replace or add to your phone;
- An existing (base) cwm flashable zip file. - I've attached one below;
- 7-zip, Winrar or any program which can open and modify zip files .
STEPS:
DIRECTORY STRUCTURE:
(1) Download and place the base.zip (attached below) anywhere on your desktop;
(2) Right-click on it and open the archive with 7zip, winrar ... [DO NOT extract]
Now you should see two folders: one called "system" and one called "META-INF".
1. Let's start with the "system" one, so open 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 bootanimation.
Make a "New Floder"
-Rename its as "media" (make sure its aint in CAPS nor with in quotation marks)
-drag those two new empty folders into the /system/ folder of the 7-zip opened archive
-now simply drop the two files in their respective place: the bootanimation.zip file should go in '/system/media' folder
.. If you have more files to add, just follow the logic above; I'm sure you get the idea by now.. :silly:
Hints
/system/app - all the system apps (SystemUI.apk etc)
/system/framework/ -framework-res.apk,android.policy.jar
/system/media - bootanimation.zip
/system/lib - libraries (*.so)
2. The other folder included in the opened archive is named "META-INF" and all the file in it should be left unchanged.
Now,just place the zip into your sd card! & try your luck  Of course it will work 
That's it !
Hihihihi...damn easy na ???
Common friend ..dont be a noob ..be a newbiee !!
HIT THANXXX !!
NOTE: Always backup your existing system file that you are going to replace by the patch(zip).
Here is the sample.zip which u can use to make any sort of flashable zip file
Deleted : Solved
kk9999gada said:
Where are Credits?
Click to expand...
Click to collapse
2nd line
Deleted : Solved
Edit : Done
thanks
i will try... :laugh:
Thanks, I will try it
Thanks will tryyy...
Sent from my Sony Ericsson Xperia Mini Pro(SK17i) using Tapatalk 2
How to make a flashable zip of a recovery.img?
Sent from my GT-S7500 using Tapatalk 2
video recorder problem
hello, I use the camera fix for CM10.1.
It works awesome but the video recorder cannot work after fixing.
Before fixing, I use both stock camera and camera jb+.
Video recorder can wok on camera jb+ then.
But it cannot work after flashing fixing camera jar via cwm!
How should I do ?
Warning:No file context!
Does this sentence "Warning:No file context" might affect the phone recovery????
Thumbs Up Bro !!
You made my day !!
learned something new...
Really nice thread.
I wanna ask that i want to edit my build. Prop file. So in case if anything goes wrong can i flash the original one via this method or it will work only for apps.
Because i once had modified it but stucked at bootloop. So i don't want it to happen again.
coolsid. said:
Really nice thread.
I wanna ask that i want to edit my build. Prop file. So in case if anything goes wrong can i flash the original one via this method or it will work only for apps.
Because i once had modified it but stucked at bootloop. So i don't want it to happen again.
Click to expand...
Click to collapse
It'working for every single file that's in the android os...i allways backup in a flashing zip the original files that i am tryng to change/mod
Sent from my GT-S7500
HEY BUDDY YOU SAID THAT..
Make a "New Floder"
-Rename its as "media" (make sure its aint in CAPS nor with in quotation marks)
-drag those 'two new' empty folders into the /system/ folder of the 7-zip opened archive
-now simply drop the "two files" in their respective place: the bootanimation.zip file should go in '/system/media' folder
this includes what are the two folders and the two files. Sorry but i could figure out only one. I Want To Make a zip file using your method but don't want to take any risk.

Categories

Resources