Hi,
everytime I want to flash a new version of a rom I have to modify the zip file contents, i.e. delete some files etc, which is a very tedious process.
Thats why I created a little tool for Windows (requires .NET 3.5) that can do the following with a zip file of a rom:
- Delete files
- Add / Replace files
- extract .apk's, decompile them, modify (regex replace) inside text / xml files within, recompile them and put the updated version back into the rom zip.
The tool is still beta, so there could be many errors if you don't use it correctly... always make a copy of the rom zip before using this tool on it
The included apktool (for decompile/recompile of apk) requires JRE 1.6 and only works for Android Jellybean roms / framework-res.apk's - but I think you could just use another apktool version for different Android versions.
Included in the package is a sample configuration that is basically exactly what I am using. Of course you can change what files to add, delete and modify. Also there is a screenshot attached so you can see what it looks like - as you can see you need to have some basic knowledge of how android rom stuff works, I don't think this is useful to total noobs, sorry.
If you have any problems / suggestions feel free to write here.
I hope this is useful to someone
Regards
Abomb
Changelog:
1.0: Inital release
1.1: Some error checking, not all errors will be caught but at least some basic ones.
1.2: Files to delete and apk's to modify can now be selected from the zip file via file browser
1.3: Log during modify operation and bugfixes
1.4: More bugfixes, plus the settings are now stored in the image of a cat
This looks like it could be useful. Thanks for sharing.
Great!!! easy to edit a rom for me
Thx, great job.
New version 1.1 with some error checking released.
Version 1.3 released with the following changes:
- Files to delete and apk's to modify can now be selected from the zip file via file browser
- Log during modify operation and bugfixes
Last version don't work with last nightly CM10 and Jellybro when trying to modify Navbar DPI.
ZipTest Error.
Sorry for bad English.
DeadMetaler said:
Last version don't work with last nightly CM10 and Jellybro when trying to modify Navbar DPI.
ZipTest Error.
Sorry for bad English.
Click to expand...
Click to collapse
Yeah I noticed, the problem seems to be thatthe zip file contains some folders like "a" and "A" - which is no Problemon Linux, Android etc, but does not work under Windows I haven't found any solution yet, but I'll try to find a fix for it.
Related
Thanks to our Senior Moderator dsixda , his Android Kitchen now has support for our Leo Nand too.
You can modify any Rom:
_Shipped
_Custom
_Nandroid Backups
It is easy to use with some automated features as:
_Deodex
_Zipalign
_Add scripts
_Add App2sd
_extract Kernel and initrd
_etc
Code:
===================================================================
HTC Android Kitchen - by dsixda (xda-developers.com)
===================================================================
Main Menu
1. Set up working folder from ROM
2. Add root permissions
3. Add BusyBox
4. Disable boot screen sounds
5. Add wireless tethering
6. Zipalign all *.apk files to optimize RAM usage
7. Change wipe status of ROM
8. Change name of ROM
9. Check update-script for errors
10. Show working folder information
Advanced Options
11 - Deodex files in your ROM
12 - Add task killer tweak for speed (stock ROM only)
13 - Add /data/app functionality
14 - Add Nano text editor + sysro/sysrw
15 - Add Bash (command shell)
16 - Add Apps2SD
17 - Add /etc/init.d scripts support (busybox run-parts)
18 - Add custom boot animation functionality
19 - Porting tools (experimental)
20 - Unpack or re-pack a boot image
21 - Unpack data.img
22 - Sign APK file(s)
23 - Convert update-script or updater-script
24 - Run plugin scripts
99. Build ROM from working folder
00. About/Update kitchen
0. Exit
dsixda said:
How do I import a ROM into the kitchen to use as my base?
From a shipped ROM:
First, find the shipped ROM for your device, usually from htc.com or from searching xda-developers (check the Wiki or sticky posts under your device's sub-forum).
This link may help: Various devices
Please don't ask me for links, as I don't know everything or own all devices. ;-)
The shipped ROM can be found in three different formats. Identify the type you have downloaded:
If the shipped ROM is in a .ZIP format, then simply copy it to the kitchen's original_update folder.
OR if the shipped ROM consists of system.img and boot.img files, then copy those two files to the kitchen's original_update folder.
OR if the shipped ROM is in an .EXE format, then do the following:
In Windows, run the shipped ROM's .EXE file till it gets to the first dialog. Stop there but don't close the window yet.
Go to Start->Run and type: %TEMP%
When the folder opens, search for Rom.zip (use the "magnifying glass" Search button)
Copy Rom.zip to your kitchen's original_update folder
OR from a cooked/custom ROM:
Copy the update.zip (or equivalent ZIP file) to your kitchen's original_update folder
OR from a Nandroid backup (under /sdcard/nandroid) [NOT RECOMMENDED FOR NON-STOCK ROM BACKUPS]:
Copy the system.img and boot.img files from the backup folder to your kitchen's original_update folder
NOTE: The Nandroid-backup method of ROM customization is not the best method, because the kitchen may not account for various advanced options that were added outside of this kitchen (these options are in the update-script file which was in the original ROM but is not in the backup. The kitchen needs to re-create this file and 'guess' those options). However, it will support Nandroid backups that already have basic features like root, busybox and /data/app functionality.
Click to expand...
Click to collapse
Go to dsixda thread and grab your Kitchen now and have some fun with it!
KITCHEN THREAD
If you like it don't forget to hit thanks to dsixda and consider to him a donation for his work.
How to use HD2
Make Tut 4 HD2 plz....
oh em gee!
for those asking for a tutorial,
http://forum.xda-developers.com/showthread.php?t=633246
if you visit the kitchen's thread you will find much more information and step-by-step guide for all operating systems.
thanks
In the thread of dsixda everything are available step-by-step.
I can confirm that it is working and tested from the begin of implementation of this Nand support.
I used it for HD2, sometime work, sometime not work
Whenever I cook using this Awesome kitchen I successful have a zip file. When I try to flash it It gives me an error (Status 6) and I do not know what to do to resolve this issue.
Raptordin said:
Whenever I cook using this Awesome kitchen I successful have a zip file. When I try to flash it It gives me an error (Status 6) and I do not know what to do to resolve this issue.
Click to expand...
Click to collapse
Nice to know that an arabian is cooking
Waiting your builds because i'm sure you will be incorporating arabic roms and full arabic support by default!
This error sound of something wrong in updater-script, in this kitchen you must:
1. convert updater-script to update-script for working on it
2. convert it back to updater-script before make the zip process.
Anyway fore me it worked at 1st shot and this is what i made and in Dsixda thread there is a good tutorial and a video that explain all.
Raptordin said:
Whenever I cook using this Awesome kitchen I successful have a zip file. When I try to flash it It gives me an error (Status 6) and I do not know what to do to resolve this issue.
Click to expand...
Click to collapse
Life Engineer said:
Nice to know that an arabian is cooking
Waiting your builds because i'm sure you will be incorporating arabic roms and full arabic support by default!
Click to expand...
Click to collapse
I am still a noob when it comes to Android but will do my best, Used to be very good with WinMob bt still starting here, will try my best though.
af974 said:
This error sound of something wrong in updater-script, in this kitchen you must:
1. convert updater-script to update-script for working on it
2. convert it back to updater-script before make the zip process.
Anyway fore me it worked at 1st shot and this is what i made and in Dsixda thread there is a good tutorial and a video that explain all.
Click to expand...
Click to collapse
Thanks for your reply, I did convert it back and forth though but still same error. The tutorials are very nice and I did follow them to the letter. Will try again today after I get back home from work and will try to get another base to start from.
Np raptordin,
if you wanna say to me what build you are trying to mod and what mod you want to do, i can give it a go and see if i get the same error.
af974 said:
Np raptordin,
if you wanna say to me what build you are trying to mod and what mod you want to do, i can give it a go and see if i get the same error.
Click to expand...
Click to collapse
Will test again in an hour or so when I get home and report back. Thanks for your interest.
Just a reminder -- if you have a boot.img in your ROM's working folder, and it didn't get converted to "boot" folder after building the ROM, then you have to do the conversion manually.
1) Select option 20 - "Unpack or re-pack a boot.img"
2) Select option c - "Convert boot.img into NAND boot folder"
Then you can build.
If you are using a custom HD2 ROM then this step is probably not necessary, as the kitchen will aready have created the boot folder and removed the boot.img. To make sure, just open the .ZIP file that was created by the kitchen after building.
Thanks for info Dsixda,
I'm facing a couple of problems with the Kitchen, here they are:
1. In the Kitchen Rom info app2sd are not installed but it still in init.d
2. if i add /data/app (option 13) market apps installation end with an error.
Code:
Working folder information
Android OS version : 2.3.3
Device : bravo
ROM Name : GRI40
Rooted (unsecured boot.img) : YES
Rooted (Superuser.apk + su) : YES
BusyBox installed : YES
BusyBox run-parts support : YES
Apps2SD enabled : NO
/data/app enabled : NO
Custom boot animation allowed : NO
Nano text editor installed : YES
Bash shell support : YES
/system/framework is deodexed : YES
/system/app is deodexed : YES
radio.img found : NO
ROM will wipe all data : NO
I'm using this rom as base http://forum.xda-developers.com/showthread.php?t=933951
af974 said:
Thanks for info Dsixda,
I'm facing a couple of problems with the Kitchen, here they are:
1. In the Kitchen Rom info app2sd are not installed but it still in init.d
Click to expand...
Click to collapse
So you don't have an "a2sd" file under /system/bin or /system/xbin or anywhere else? What options did you select for apps2sd (e.g. runparts?).
2. if i add /data/app (option 13) market apps installation end with an error.
Click to expand...
Click to collapse
You need to be specific.. what is the error? And when you say 'installation' do you mean while the kitchen is adding the data/app folder, or while the ROM is booting?
Nope, there is nothing in there but there is the script in init.d " 10app2sd", though i'm speaking of original update.zip.
dsixda said:
So you don't have an "a2sd" file under /system/bin or /system/xbin or anywhere else? What options did you select for apps2sd (e.g. runparts?).
Click to expand...
Click to collapse
After the boot, i go to market and download an app but it cant be installed.
You need to be specific.. what is the error? And when you say 'installation' do you mean while the kitchen is adding the data/app folder, or while the ROM is booting?
Click to expand...
Click to collapse
Whoot! time to get my chef on!
Thanks you for this great tool
af974 said:
Nope, there is nothing in there but there is the script in init.d " 10app2sd", though i'm speaking of original update.zip.
Click to expand...
Click to collapse
Is it really apps2sd (apps to ext3) or is it just that hack that is used to move all apps to the fat32 partition of the SD card (the option that is in Settings of Cyanogen ROMs)? Can you paste the contents of that file here please (in
Code:
tags)
[QUOTE]
After the boot, i go to market and download an app but it cant be installed.[/QUOTE]
I don't know anything about that, probably your device's or ROM's issue because it works elsewhere. When the kitchen adds /data/app to the working folder it only sets the permissions for that folder when flashing.
Hey guys & gals!
Here is a little tool I made.
What it does is take 2 APK files - the original, and the modified/themed one. It then extracts the APK's and collects all the files that have changed from the original in the modified APK. It also adds the new files in the modified APK.
It wont handle changes to the smali code, but any xml or png changes will work fine.
Then it builds the changed files into a zip file that can be flashed using ZipThemer.
To use:
make an empty directory for apkdiff to work in.
create 2 folders new_apk and old_apk and place the 2 files in their respective directories.
Run the script:
apkdiff /system/app Phone
The 2 parameters are:
The folder on your device the APK is located in
The name of the APK file (without .apk on the end)
There are a couple of parameters you may need to adjust at the top of the file.
The result will be a file in the "out" folder which can then be used on other devices to modify the original apk using ZipThemer. This is a lot smaller file than if you redistribute the whole modified APK.
I hope this makes sense to someone!!
I am sure there are bugs in it somewhere, so if you give it a try and it breaks let me know.
Cheers!
Great and useful work mate,
thank you very much!!!
I want to modify the Phone.apk from teamhacksung CM9 B17 for Galaxy S.
What I want to do is to modify it that when I have an incoming call, to see the full picture of the caller. more precisely I want that the black rectangle where you have icon to answer or t reject, to be transparent.
It can be done. I got from the xda forum a moded Phone.apk for B16 where that rectangle is transparent.
I have attached a picture so that you understand what I'm talking about. i also have attached that transparent mod for B16.
Using Beyond Compare 3, I guess that I have to modify in the following file:
Phone.apk\res\layout\incall_touch_ui.xml and replace:
<com.android.internal.widget.multiwaveview.MultiWaveView android:id="@id/incomingCallWidget" android:background="@android:color/black" android:visibility="gone" android:layout_width="fill_parent" .......
with:
<com.android.internal.widget.multiwaveview.MultiWaveView android:id="@id/incomingCallWidget" android:background="@android:color/transparent" android:visibility="gone" android:layout_width="fill_parent" .......
Here comes the problem:
I decompile Phone.apk with Apk_Manager_5.0.2, change that word, save the file and the recompile.
After i install the phone.apk using a zip container from recovery, when I try to make a call or receive a call, I get the: "Voice calls not suported" error.
I tryed all the combinations for compiling: system app, signed/unnsigned; nonsystem app signed/unsigned. Same error.
What am I doin wrong? Any ideas?
Thanks.
similar problem here, but my Phone.apk just crashs
I've had similar issues on Samsung's GB ROMs. I had no problems with Contacts.apk, MMS.apk and DialerTabActivity.apk. I could easily recompile them and moded versions would work. But recompiled Phone.apk kept FC-ing so I eventually gave up.
I don't know what tools themers use to make it work.
After recompiling the Phone.apk open it with 7zip, extract the file that you have modified and put it in the original phone.apk.
Inviato dal mio GT-I9000 usando Tapatalk 2 Final
copying the file did work, thanks for that tip. However the mod did not work, the lower area is still black :-(
You need to change some files from the apk manager to compile android 4.0 files. I can upload my apk manager whitch works as soon as I get home.
those apk manager changes (it's actually not a single change in apk manager but just using apktools 1.4.1) are only related to the smali/dex files. layout/*.xml aren't influenced by that.
These are the changes that I was talking about:
"No problem I used Apk Manager 5.x(dont know exactly). But I've done this two things with the APK-Manager:
-deleted the original aapt.exe in /others and copied the one from the platform tools folder in from the sdk(has to be done if you work with ics apps)
-(de)compiled with Apk-tool 1.4.1 instead of 1.4.3 as the newer version sometimes causes some errors. Just delete the Apkttool.jar in /others and download 1.4.1 from the apk tool webite and paste it in /other
afterwards everything should work fine.."
i know those changes (see above), they don't solve the problem though.
apktool 1.4.1 + copy unchanged files (everything but ressources.arsc and incall_touch_ui.xml): FC
apktool 1.4.1 + don't copy: FC
apktool 1.4.3 + copy unchanged files: no FC but contact pic is still the old size
apktool 1.4.3 + don't copy: FC
same proble here with GS2.
this incoming call screen filled with black is very anoying...
any news on how to fiw that?
phone transparent incoming call
That app does wgat it is supposed, ask mr goodle, for i don't kjnow where i have found it
i made it AOKP build 37
Thats great, but can you explain how to do that?
Cause i' use GS2, and not GS, adn with different rom, we have to use differents phone.apk.
So instead of asking you every time, i'd like to learn how to do it.
Thanks!
Decompiled
Edited
Compiled
Signed
Hi. That's how I was able to do it:
First, copy your Phone.apk from the system folder inside your phone to your computer. Do not use any other Phone.apk, because it may be another version and it will not work. Or extract the Phone.apk from the rom that you flashed to your phone and use it.
You must make some changes to the apk manager to complie/decomplile Phone.apk.
Here is the list with the changes. If you follow it exactly, it should work:
-delete the original aapt.exe in /others and copy the one from the platform tools folder from the sdk(has to be done if you work with ics apps) - you must install android 4.0 sdk. Google it and you will find it easy.
-(de)compile with Apk-tool 1.4.1 instead of 1.4.3 as the newer version sometimes causes some errors. Just delete the Apkttool.jar in /others and download 1.4.1 from the apk tool webite and paste it in /other
afterwards everything should work fine...
Then, when you get the unsignedPhone.apk, rename it to Phone.apk, and put it in a zip file and flash via recovery. Do not copy it with inside the phone because it will not work. If you don't know how to make a zip file, just download any mod (perka, reloaded ...) and open the zip with 7zip, delete any apk's you find in it, and drag Phone.apk inside the System folder from the zip, and then flash it via recovery.
Good luck.
If it does't work, send me an email: [email protected], and I will send you my apk manager that is allready modified and works to compile/decompile.
What you will need:
Basic tools
- Notepad++
- ZIP manager tool like 7zip
Advanced tools
- Cygwin
- smali (assembler/disassembler)
- APKTool/APK Multi-tool
Lets Begin:
Download a ROM (we use CM in this guide) of your choice (don’t forget to get the permissions for it modding from the developer) and extract it. When you extract it, you will see at least two folders and one file
Folders
- system
- META-INF
Files
- boot.img [this is not present in defy/defy+ ROMs so don't worry about it ]
NOTE THAT I AM ONLY GIVING DETAILS ABOUT THOSE FOLDER WHICH YOU CAN REMOVE/EDIT
THE \system\bootmenu\2nd-boot\ FOLDER
In this folder you'll find the kernel [zImage] file of the ROM here you can change it with the one you compiled or by others.
The Tts folder
The ‘TTS folder’ is all about Text-To-Speech. It contains all the files needed by the Android system to get Text-To-Speech working. If you are removing the TTS feature from your ROM, make sure you remove this entire folder and the TTS related apps from the ‘system folder’, as this will save a lot of space.
The WiFi and Usr folders
The WiFi folder contains the drivers required by the WiFi module to function. So i strongly recommend NOT to touch this folder. If you delete any file from this folder, you will mess up the WiFi functionality.
The usr folder contains some miscellaneous but very important stuff. It may contain anything and everything needed by the Android operating system. For instance, this folder contains all the key-mapping. If such files are messed with, your device will be non-functional although it will boot.
The Build.prop
The build.prop file is pretty self-explanatory. Here, you can change the most basic things, like the android version that setting shows. Wondered how people are making 2.3.4 look like 4.0.3 in settings? Its build.prop. Also,you can change what ‘About phone’ shows here.
Other things,you can change things like,how long your wifi scans,how much battery your phone saves while in sleep, Dalvik VM heapsize and default ringtones. If you are wondering what # stands for, it signifies that, the particular line is commented out, and the system does not read it. You can use it add comments to the build.prop. This helps others understand, what is the function of a particular tweak.
A guide for some basic build.prop tweaks can be found here.
Please be aware that, these build.prop modifications are not universal. So, you will have to experiment with the tweaks and their values.
The META-INF folder
This folder contains instructions for the Android Recovery about how to work with the files present in the zip. This folder contains many folders, but the only one we need to edit is the update-script file.
Making Flashable ZIP
In order to create a flashable zip, first zip the ‘system, META-INF’ folder and the ‘boot.img’. Let’s name this zip as ‘update.zip’. Next we need to sign the zip. Get a signer here. Put your update zip in the same folder as the signer. Then run the ‘signer.bat’ file. This will sign your zip file. After the signing process is complete, you can change the name of the zip to your liking.
confused
hi,,,i'm new here,,,,
after reading ur post, actually i can't do this,,,
and i installed miui v5 rom and always find crashing about "android process stopped."
and i can't edit the rom or make update of it because of no jnderstanding it, but i like miui so far.
so, can u give me the link of miui v5 rom that not crash, in order to me just to instal it without editting.
thx so much.
gwesal said:
hi,,,i'm new here,,,,
after reading ur post, actually i can't do this,,,
and i installed miui v5 rom and always find crashing about "android process stopped."
and i can't edit the rom or make update of it because of no jnderstanding it, but i like miui so far.
so, can u give me the link of miui v5 rom that not crash, in order to me just to instal it without editting.
thx so much.
Click to expand...
Click to collapse
Checkout my miui thread I have already posted the original link there
D5+/cm11/1.2GHz.
Sent from Tapatalk app
coolshahabaz said:
Checkout my miui thread I have already posted the original link there
D5+/cm11/1.2GHz.
Sent from Tapatalk app
Click to expand...
Click to collapse
which one???
is it the official rom from miui site or edited rom you created??
actually its take too long doenloading from official site. but rom i doawnloaded is always crashing android.process.stopped.
gwesal said:
which one???
is it the official rom from miui site or edited rom you created??
actually its take too long doenloading from official site. but rom i doawnloaded is always crashing android.process.stopped.
Click to expand...
Click to collapse
The one I edited had that prob of crashing, n the one on official site is about 240mb ty its taking time
D5+/cm11/1.2GHz.
Sent from Tapatalk app
For NST/NSTG with 1.2 firmware
Hi, new NTSG owener here
After reading this thread I've decided to make similar mod for 1.2 firmware.
NOTE: this was tested on rooted 1.2 firmware on NSTG but should work fine also on NST
Modifications in framework-res.apk:
-added languages: the same as in original mod
-replaced some images: by default not-localized ones had ugly "X" painted on top, now they look as for English locale
Modifications in Settings.apk:
-all languages are now visible in language picker ( <extra android:name="hideDevLanguages" android:value="false" /> in xml/settings_locale.xml) removed due to SetupWizard incompatibility (com.bn.oobe doesn't like this)
-added Development Options in main menu (changes in xml/settings_root.xml and xml/settings_root_gossamer.xml- first file is for NSTG, second for NST)
-locale picker is present in Development Options
-added Sync & Settings submenu
If you wish to play further with Settings.apk I can recommend this tutorial (it's for ICS but workflow is the same for Eclair).
Downloads:
All files are CWM flashable zips
NSTG-MULTI-1.2.x-flash.zip -modified framework-res.apk
NSTG-settings-accounts-1.2.x.zip -modified Settings.apk
RESTORE_FRAMEWORK.zip -restore stock framework-res.apk
stock-settings.zip -restore stock Settings.apk
Remember to make a full backup before flashing anything
Updated Settings.apk- now Accounts & Sync is available
NST owners- please post feedback, I can't test modifications on your hardware.
EDIT:
Removed modded settings.apk due to SetupWizard incompatibility, testing alternate solutions
EDIT EDIT:
Modded Settings.apk back online.
BIG FAT WARNING
Settings.apk is deeply tied to other B&N system apps, Setup Wizard will fail with a modded one.
So if you want to use it keep original one around in case of data wipe
PERFECT! just what I wanted.. hey this DOES have Japanese on it right?
as in.. the list that said..
languages with better support by android:
Click to expand...
Click to collapse
EDIT: nope no Japanese... lemme see if I can add it in myself
MadHatterRyu said:
nope no Japanese... lemme see if I can add it in myself
Click to expand...
Click to collapse
Languages were taken from 2.1 Samsung EU rom.
I've used Android Multitool
If you want to add language:
1.Grab a 2.1 rom which has your language onboard, decompile framework-res.apk,
-copy /res/values-[desired language code]/ folder which includes arrays.xml, plurals.xml and strings.xml
-copy /res/raw-[desired language code] folder
2. Decompile Nook's framework-res.apk
-put both previously extracted folders to /res
-copy any of existing /res/raw-XX to /res/raw-[desired language code] -this folder holds localized images
-compile apk
-there will be warning about missing strings in translation- dont' worry, system will use english ones
-copy AndroidManifest.xml file and /META-INF from original framework-res.apk to newly compiled one (apk is a zip)
3. Replace framework-res.apk in a flashable zip and flash it
I'd advise to wipe dalvik-cache after flashing (just in case)
And better don't use modded Settings.apk, language picker can be accessed in Nook Color Tools.
Sorry, I didn't find a way to make modded Settings work in SetupWizard (oobe.apk in reality)
EDIT:
And better check if fonts support japanese
ahead of that.. I just wanted it to recognize Japanese characters.. only had to add ttf files into the fonts folder.
(oddly the stock reader doesn't do that.. meh, I didn't like it to begin with.. I'm using AIreader) but thanks though : )
This looks great! Thanks, @gen_scheisskopf. Due to this mod's being created, I'm now working on my own modified Settings.apk.
ИΘΘK¡€ said:
Due to this mod's being created, I'm now working on my own modified Settings.apk.
Click to expand...
Click to collapse
I'd suggest to take a look at dependencies, AFAIR settings.apk depends on B&N apks (this is most likely why my modified apk only FC-ed when booting system after a wipe)
gen_scheisskopf said:
I'd suggest to take a look at dependencies, AFAIR settings.apk depends on B&N apks (this is most likely why my modified apk only FC-ed when booting system after a wipe)
Click to expand...
Click to collapse
Check. I've got the beta version of my Settings.apk working famously on my NTG - here's the project thread.