This method is tested, and working for ICS 4.0.3 IML74K (stock) framework-res.apk
ICS 4.0.3 framework-res.apk rebuild is not working with apktool 1.4.3 and latest aapt from SDK R16
Because the 'string encoding' is not correct in the 'plurals.xml' with apktool 1.4.3, and if you tried to rebuild, you get some error...
Decompile
1. Download these files:
apktool1.4.2.31e6dc5.jar
md5: 38db374a2f733000b1b0309b2b99f74b
aapt.exe (from the latest R16 SDK)
md5: 26a35ee028ed08d7ad0d18ffb6bb587a
apktool.bat
md5: 2bf3b895011fc4b1801edcfbabfdc295
2. Copy all files to your 'Windows' directory and rename apktool1.4.2.31e6dc5.jar to apktool.jar
3. Open command prompt, and install framework (apktool if framework-res.apk)
4. Decompile with apktool1.4.2.31e6dc5.jar (everytime use this to decompile framework-res.apk)
apktool d framework-res.apk
Rebuild
1. Download apktool1.4.3.tar.bz2 and copy to your windows directory (overwrite the old apktool.jar)
md5: 3d0478c4d23c7829edc024266697fef9
2. apktool b framework-res
3. extract all files from 'dist\apktool-res.apk' and create new archive with winrar or 7zip (archive type: zip | compression method: store)
4. resign
5. zipalign
6. Rename to famework-res.apk
wow,was looking for that..really thanks! it works fine..and now i can finally start my ics theme
Sent from my Nexus S
it's sounds great
Its working fine for me on decompile and recompile just with the latest apktool...
CdTDroiD said:
Its working fine for me on decompile and recompile just with the latest apktool...
Click to expand...
Click to collapse
are you sure? ICS framework doesn't give you any errors if you decompile --> recompile it with apktool 1.4.3?
i tested on my pc with 3 framework-res.apk (stock, cm9 and peter alfonso)..
Stock IML74K
apktool 1.4.3 : error (when re-compiling)
apktool 1.4.2 : no problem..
CM9 Alfa 18
apktool 1.4.2 : no problem.
(so didn't have to test with apktool 1.4.3..)
Peter Alfonso's nightly 01-02-12
apktool 1.4.2 : no problem too.....
...
your results may vary...
i modified the main script of apk manager, now it uses 1.4.2 for decompile and 1.4.3 for recompile.. no errors too
I am trying to do the same work with the HTC Sensation on InsetCoin ICS ROM framework-res.
I decopmpiled it and recompiled without modification the same stuff just to test the solution.
No way to solve it. I have got the attached error log.
Any idea?
stars2 said:
This method is tested, and working for ICS 4.0.3 IML74K (stock) framework-res.apk
ICS 4.0.3 framework-res.apk rebuild is not working with apktool 1.4.3 and latest aapt from SDK R16
Because the 'string encoding' is not correct in the 'plurals.xml' with apktool 1.4.3, and if you tried to rebuild, you get some error...
Decompile
1. Download these files:
apktool1.4.2.31e6dc5.jar
md5: 38db374a2f733000b1b0309b2b99f74b
aapt.exe (from the latest R16 SDK)
md5: 26a35ee028ed08d7ad0d18ffb6bb587a
apktool.bat
md5: 2bf3b895011fc4b1801edcfbabfdc295
2. Copy all files to your 'Windows' directory and rename apktool1.4.2.31e6dc5.jar to apktool.jar
3. Open command prompt, and install framework (apktool if framework-res.apk)
4. Decompile with apktool1.4.2.31e6dc5.jar (everytime use this to decompile framework-res.apk)
apktool d framework-res.apk
Rebuild
1. Download apktool1.4.3.tar.bz2 and copy to your windows directory (overwrite the old apktool.jar)
md5: 3d0478c4d23c7829edc024266697fef9
2. apktool b framework-res
3. extract all files from 'dist\apktool-res.apk' and create new archive with winrar or 7zip (archive type: zip | compression method: store)
4. resign
5. zipalign
6. Rename to famework-res.apk
Click to expand...
Click to collapse
Are you sure you need to sign the framework-res which is a system apk? A lot of people on the forum just write some crappy guide like this. If you don't want to write then just take a break. No one wants any sh*t like this.
ljwnow said:
Are you sure you need to sign the framework-res which is a system apk? A lot of people on the forum just write some crappy guide like this. If you don't want to write then just take a break. No one wants any sh*t like this.
Click to expand...
Click to collapse
look stars2 just posted this for those who need it, he did it with his free time and effort, I see the only sh*t is your usless post, if you have nothing to contibute please delete your post ( so you don't loose what respect you might have left) and just move on
stars2 files made in two separate folders on my computer also video of decompiling and compiling frameworks.res.apk. NOTE: I have androids apk and jdk installed with windows enviromental path set for both
APKTOOLKIT 6 MEG
capturefoxapktoolkit.zip 142 MEG video of decompiling and compiling frameworks.res.apk
capturefoxZeroCompression.zip 48 MEG How to Zero compress files
Just to report the problems I had:
- Needed to remove Android SDK from path.
- Needed to delete C:\Users\USERNAME\apktool between decompilations / recompilations.
hello
apk I do not want to settle
tHANKS
Its working fine for me on decompile and recompile just with the latest apktool...
Although decompiling and recompiling worked, the apk is not running on my phone
I tried decompiling and recompiling the apk without making any changes, and it does not run either. I noticed that my recompiled apk is slightly larger than the original apk (I followed the instructions about zipping with 7zip with store). What <align> parameter should I use for zipalign?
bluebird11 said:
Although decompiling and recompiling worked, the apk is not running on my phone
I tried decompiling and recompiling the apk without making any changes, and it does not run either. I noticed that my recompiled apk is slightly larger than the original apk (I followed the instructions about zipping with 7zip with store). What <align> parameter should I use for zipalign?
Click to expand...
Click to collapse
did you sign it? you have to open modified apk (not unzip) and open oridinal apk and copy the META-INF ( that signs it) to the modified one accually I always copy META-INF, AndroidManifest.xml
carl1961 said:
did you sign it? you have to open modified apk (not unzip) and open oridinal apk and copy the META-INF ( that signs it) to the modified one accually I always copy META-INF, AndroidManifest.xml
Click to expand...
Click to collapse
Thank you, that was the problem! I thought system apks don't need to be signed
i have problem when recompile apk file
first of all i did some mod , recompile report back with errors , second time i just decompile and then recompile it without any change , still shows error ...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Did you make sure:
1. You have the right versions of the files and you have removed your android-sdk from your path (need to restart cmd if under Windows)?
2. You delete C:\Users\USERNAME\apktool before each decompilation/recompilation?
Hope this helps.
bluebird11 said:
Did you make sure:
1. You have the right versions of the files and you have removed your android-sdk from your path (need to restart cmd if under Windows)?
2. You delete C:\Users\USERNAME\apktool before each decompilation/recompilation?
Hope this helps.
Click to expand...
Click to collapse
i have done 100% exact as he instructed
seems less errors then last time after everytime de/re-compilation with delete c:\users\name\apktool.
but still not work ...
The remaining errors you are getting are not related to apktool.
I think it means that you are using some undefined things.
Related
Here is a pack of 3 files that, if pushed to your rom will give you the white task bar. This will change status icons and is just a work in progress "fill in the the gap" type of thing until I can write a proper update script for an update.zip. Currently this has only been tested to work 100% with:
Evil Eris 2.0.1 (It will, however, break the Sense launcher. So if you want the white bar, use another launcher)
Ic3Rom 2.0
It DOES NOT work on
TaintedVanilla 1.3.1
Or any rom that has it's System/Framework apk's and jar's odexed.
Please let me know if it works with any others.
Also, please not that this will change the status bar highlights to green.
http://www.multiupload.com/4YV5D61YRX
Click to expand...
Click to collapse
Just push the three files and reboot. Reboot will take about 5 min, so don't freak out if it takes forever. If you get into a boot loop, however, it didn't work.
DISCLAIMER: I'm not responsible if this bricks your phone. Please don't yell at me if it does. Also, be smart: do a nandroid backup before you try this.
Click to expand...
Click to collapse
This tutorial is for a white menu bar. It's still kind of a work in progress, but it works for the most part. When done, it looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Ok. Here is the extremely long way to do this, but it should work with any rom and will give you a full (date/time/notifications) white/vanilla task bar.
(Seriously, this may take 30 minutes or more if you're unfamiliar with some of these commands)
DOWNLOAD: http://www.multiupload.com/VZWCE0A0FN
Unzip the files and there should be 4 folders and 1 file: framework-res, com.htc.resources, PCSCII, Tools, and StatusBarIcon.smali.
Also included are the tools needed to crack open the .dex file from services.jar, smali.jar and backsmali.jar
First you'll need to pull the proper files to modify from whatever rom you're using. Open up your command line program of choice and do this:
cd [your tools folder in the android sdk]
adb remount
adb pull /system/framework/framework-res.apk framework-res.apk
adb pull /system/framework/com.htc.resources.apk com.htc.resources.apk
adb pull /system/app/PCSCII.apk PCSCII.apk
adb pull /system/framework/services.jar services.jar
Click to expand...
Click to collapse
Copy all these files into a new folder.
Things can get messy so name them whatever you'd like to keep things organized.
After all this you can start copying files. First we need to open up services.jar. Easiest way is to change the .jar ending to .zip and expand it with whatever program you'd like. Copy the classes.dex into a new folder. Keep the original folder of the expanded services.jar, it makes things easier in a few minutes.
Here is where things get a little complicated. You'll need to open up the classes.dex file with backsmali.jar. First, make sure Backsmali.jar is in the same folder as classes.dex. Next enter this command into the terminal:
cd [the folder with backsmali and classes.dex file]
java -Xmx512M -jar baksmali.jar -o classes/ classes.dex
Click to expand...
Click to collapse
This will expand classes.dex into a folder. Click through this folder until you find a folder called Status. Now drag the StatusBarIcon.smali into the Status folder. Allow the replacement.
Now we need to close the classes.dex file back up. Make sure smali.jar is in the same folder as the classes folder (make a new folder just to avoid a conflict with your original files) and use these commands:
cd [the folder with smali and the classes folder]
java -Xmx512M -jar smali.jar -o classes.dex classes/
Click to expand...
Click to collapse
You should have a fresh classes.dex file now. Now put this new classes.dex file into the original services.jar folder (that you expanded from a zip) and rezip that file. Then change the name from a .zip to .jar.
Step 1: done.
The next few parts are a lot easier, so stick with me here.
Now we need to open up the Framework-res.apk and replace all of the image files needed for a sexy white menu bar. All of the needed files are in the folder named (you guessed it) framework-res. First, you'll need to expand this .apk, do so by changing it into a .zip. After you expand it, copy the files from my folder to the matching folders. Don't drag and drop the folders, it won't work. Select all inside them and paste/drag/whatever over to the one from your phone. There should be a folder of image files, and a folder with two xml files. Once done return to the top folder of the framework-res.zip you expanded and re-zip the contents. Make sure you select the contents and zip them.
**DO NOT ZIP THE FRAMEWORK-RES FOLDER ITSELF, SELECT THE FILES INSIDE THE FOLDER AND RE-ZIP THEM**
You should now how have a new archive. Rename it to framework-res.apk and set it aside for later use.
The last parts are essentially the same things, but with the other two folders I've included: PCSCII and com.htc.resources. Copy the files, and re-zip them into .apk files.
Ok. Almost done.
Now it's time to send the files back to your phone. Place the new versions of these files into your Tools folder in the Android SDK.
Now let's push them back to your phone:
cd [your tools folder... again]
adb remount
adb push PCSCII.apk /system/app/PCSCII.apk
adb push framework-res.apk /system/framework/framework-res.apk
adb push com.htc.resources.apk /system/framework/com.htc.resources.apk
adb push services.jar /system/framework/services.jar
adb reboot
Click to expand...
Click to collapse
Reboot can take a while, so be patient. I'm thinking rebooting into recovery and clearing your dalvik cache may help, but haven't tried it.
If everything worked correctly, you should have a brand spankin' new notification bar.
Just a note, I have tested this on Evil Eris 2.0 and IceRom 2.0 and it works perfectly. However, it should work with whatever rom you're using. Also, this will change some of your icons to Vanilla ones. If you don't want them changed, don't copy the files that will change them. Those should be apparent when copying the image files from the folders I've included.
If you have any questions, feel free to ask.
Also, if anyone knows how to wrap this all up into a nice little update.zip, please do it or let me know how to do it. It would be greatly appreciated.
Hello, I appreciate the tutorial! I'm attempting to get this set up for my Tainted Vanilla rom and ran into a snag at the beginning. Our services.jar file contains no classes.dex file. All it contains is MANIFEST.MF. Any ideas about how I should proceed?
Ok, I think I've figured it out.
The .odex file is basically the .dex file in an uncompressed format. To break it open you do the same thing you would do with a dex file. Plug it into baksmali and it should yield you a Classes folder. You do have to reassemble it though, which requires you to first deodex it... and it's kind of a pain in the ass. I've figured out the first portion of it, but deodexing the file is decently complicated for a n00b like me. I'll continue to work on it and will hopefully have a solution tomorrow.
Here's where I'm stuck if anyone wants to figure it out:
$ java -Xmx512m -jar baksmali.jar -x services.odex
Error while disassembling method Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: class Lcom/htc/connectivity/DummyStateTracker; cannot be resolved.
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedValidationException(ClassPath.java:535)
at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getClassDepth(ClassPath.java:543)
at org.jf.dexlib.Code.Analysis.ClassPath.getCommonSuperclass(ClassPath.java:383)
at org.jf.dexlib.Code.Analysis.RegisterType.merge(RegisterType.java:274)
at org.jf.dexlib.Code.Analysis.AnalyzedInstruction.mergeRegister(AnalyzedInstruction.java:199)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.propagateRegisterToSuccessors(MethodAnalyzer.java:479)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.setPostRegisterTypeAndPropagateChanges(MethodAnalyzer.java:459)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeDirectCommon(MethodAnalyzer.java:2968)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeDirectRange(MethodAnalyzer.java:2927)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:856)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:202)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:290)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:130)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:322)
at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:291)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:135)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:187)
at org.jf.baksmali.main.main(main.java:277)
opcode: invoke-direct/range
CodeAddress: 811
Method: Lcom/android/server/ConnectivityService;-><init>(Landroid/content/ContextV
Click to expand...
Click to collapse
I know that in order for successfully deodex, all the file paths have to be correct. I, however, do not have them yet.
More info here for anyone interested: http://code.google.com/p/smali/wiki/DeodexInstructions
Good work, this should be an update.zip once we have confirmed it working successfully.....
stopxstart said:
Ok, I think I've figured it out.
The .odex file is basically the .dex file in an uncompressed format. To break it open you do the same thing you would do with a dex file. Plug it into baksmali and it should yield you a Classes folder. You do have to reassemble it though, which requires you to first deodex it... and it's kind of a pain in the ass. I've figured out the first portion of it, but deodexing the file is decently complicated for a n00b like me. I'll continue to work on it and will hopefully have a solution tomorrow.
Here's where I'm stuck if anyone wants to figure it out:
I know that in order for successfully deodex, all the file paths have to be correct. I, however, do not have them yet.
More info here for anyone interested: http://code.google.com/p/smali/wiki/DeodexInstructions
Click to expand...
Click to collapse
I get the same error. I posted a issue about this on the project page.
EDIT: Figured it out. Add -c :com.htc.resources.jar
You will need to deodex it first thou.
Can we see screenshots of this notification bar
If you look at the IC3 rom screenshots, this should be the same.
Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
gritts said:
If you look at the ICQ rom screenshots, this should be the same.
Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
Click to expand...
Click to collapse
ICQ ROM do you mean IC3 ROM?
Yes, thanks, I corrected it.
gritts said:
If you look at the IC3 rom screenshots, this should be the same.
Also, stopxstart, thanks for the hard work! Really appreciate it. Should the phone be connected this whole time? Thanks!
Click to expand...
Click to collapse
It's easy just to keep it connected but it's not required. Just make sure you adb remount before pushing and pulling the files.
Going to try out a workaround for all of this, I'll report back sometime tonight.
Also, if this works it will allow me to write a sufficient update.script for a standalone zip.
For those following the progress of this, I am currently testing some standalone files to push that should make this whole process easier.
So far works on: Evil Eris 2.0 and Ic3Rom 2.0 (well, fixes it).
Testing others now.
I'm looking forward to your testing on Tainted Vanilla
hoban_eris said:
Hello, I appreciate the tutorial! I'm attempting to get this set up for my Tainted Vanilla rom and ran into a snag at the beginning. Our services.jar file contains no classes.dex file. All it contains is MANIFEST.MF. Any ideas about how I should proceed?
Click to expand...
Click to collapse
I second that.
ok so these are the things i can't get
the verizon wireless text is white
and the clear button is black with white text
how can i fix these
Re: [Tutorial] White Notification Bar
Did you follow the tut
-------------------------------------
Sent via the XDA Tapatalk App
gritts said:
Did you follow the tut
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
ok ive tried several times and failed every time could someone put up the final zip I could flash
iloveandroid said:
ok so these are the things i can't get
the verizon wireless text is white
and the clear button is black with white text
how can i fix these
Click to expand...
Click to collapse
Let me double check the XML files in the Framework-res.apk to make sure I put the right ones in. I literally have 60 folders filed with the same file from different testing so I could have easily posted the wrong one.
Also, there isn't a zip to flash because I haven't written the update script for it. If you would like to, please do.
stopxstart said:
Let me double check the XML files in the Framework-res.apk to make sure I put the right ones in. I literally have 60 folders filed with the same file from different testing so I could have easily posted the wrong one.
Also, there isn't a zip to flash because I haven't written the update script for it. If you would like to, please do.
Click to expand...
Click to collapse
I would make a flashable but i dont know how
Ok, I fixed the button problem.
You're using Ic3Rom right? Pretty sure the files I have will work with it straight up but let me test it.
Also, I added screenshots to first page.
Hi...
this tutorial show you how to port stock sam keyboard to a custom rom ( i don't know work on CM. now i use emanoN, next time flash CM test it.)
you need this files and folders ... take from your stock rom odin flashable file: (use magicIso or UltraIso)
- T9DB folder (from csc.rfs file)
- AxT9IME.apk and AxT9IME.odex (from system.rfs file in app folder)
- touchwiz.xml (from system.rfs file in etc->permissions folder)
- libdhwr.so and libXt9core.so (from system.rfs file in lib folder)
first deodex your AxT9IME.apk (see post #2)
make a flashable zip file and put stock files like this: (or use attachment zip file and delet my files and put your files.)
- T9DB folder in: yourzip/system/
- touchwiz.xml in: yourzip/system/etc/permissions
- libdhwr.so and libXt9core.so in: yourzip/system/lib
- deodex AxT9IME.apk in: yourzip/system/app
move zip file to SDcard and reboot to recovery(CWR) and select "install zip from SD". after install go to advanced menu and wipe dalvik cache.
finish! now reboot and use Samsung keyboard with your language.
# if your rom is odex (like emanoN) go to system/app with root explorer, find AxT9IME.apk and AxT9IME.odex and add ".bak" to end of two files then reboot to recovery.#
meddel east rom keyboard with this languages:
English(US)-English(GB)-France-Arabic-Persion-Urdo-Korean (all rom have english and Korean)
Download
How to deodex ...
Install Java Runtime Enviroment on your PC.
Download backsmali.jar and smali.jar from attachment.
Make a folder like edit in root of a drive (ex: C:\edit )
Put backsmali.jar and smali.jar files in this direction.
You need 7 odex file from stock framwork:
- android.policy.odex
- bouncycastle.odex
- core.odex
- core-junit.odex
- ext.odex
- framework.odex
- services.odex
Put all files in "edit" folder. Now put AxT9IME.odex file in this folder.
Run windows cmd (go to start menu, Run... and type cmd and then enter)
First line go to "edit" folder by insert this commend : (you can copy and past this comment from here)
Code:
cd\edit
Next, insert this line for backsmali AxT9IME.odex :
Code:
java -jar baksmali.jar -x AxT9IME.odex
Now you have a out folder. Don't touch it.
Insert this commend for smali your work :
Code:
java -jar smali.jar out
Now in "edit" folder you have a file like this: out.dex
Rename file to classes.dex , open your AxT9IME.apk with winRar (or any program like this) push your .dex file to .apk file ... WooW, now you deodex your fist android system app.
mate i extracted AxT9IME.apk and its odex version from a custom rom ( original keyboard ) and want to paste in another custom rom i.e carbon so what step i need to skip as i have already these files.
or should i flash with ur zip file ?
do i need to delete old keyboard files from my carbon rom ?
you can delet old files but have a copy off that for backup ( or add .bak to end of the old files.)
my zip file only Arabic, Persian and urdo, make your keyboard zip file. first deodex your AxT9IME.apk you want to have in your rom-very important to deodex this file.
then make a flashable zip file and flash it from CWR.
(if you don't know how to created zip file download my zip file but delet inside files and put your files, if you can make it skip downloading my zip file.)
flashed ur zip but got 1 problem :
this is original key board :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
this is ur keyboard, keys not visible :
mor_1228 said:
flashed ur zip but got 1 problem :
this is original key board :
this is ur keyboard, keys not visible :
Click to expand...
Click to collapse
1- your shot say your phone is 480X320 lcd (like galaxy ace) here for galaxy mini user.
why you flash galaxy mini package on other phone?
2- you don't need flash my zip file only put your stock rom files in zip file. all file like: apk-xml-lib and T9DB folder. it,s work for me very good!
bro u extracted stock files from which format as i have original rom in MD5 format.
if u got another format kindly tell me the source. thank you.
mor_1228 said:
bro u extracted stock files from which format as i have original rom in MD5 format.
if u got another format kindly tell me the source. thank you.
Click to expand...
Click to collapse
right click on MD5 file and select open as. select winRAR and open file. drag and drop system.rtf file on your desktop. do this way for csc.rtf.
open csc.rtf file with "magic iso" or "ultra iso" progeram. drag and drop T9DB folder on your desktop.
open system.rfs file, go to app folder and drag and drop AxT9IME.apk and AxT9IME.odex. then go to lib folder and find "libdhwr.so" and "libXt9core.so". copy to desktop. go to etc folder then go to permissions folder and find touchwiz.xml file and copy on desktop.
for deodex AxT9IME.apk , see post #2 : for that 7 files you need, go to framework folder. you find some odex file find:
- android.policy.odex
- bouncycastle.odex
- core.odex
- core-junit.odex
- ext.odex
- framework.odex
- services.odex
files and drag and drop to your desktop.(use smali tools at post #2 for deodex)
A problems :
1 file is in rfs for not rtf as u said.
2 cant find T9DB folder in csc.rfs
B sucess :
found all 12 files like
android.policy.odex
- bouncycastle.odex
- core.odex
- core-junit.odex
- ext.odex
- framework.odex
- services.odex
AxT9IME.apk and AxT9IME.odex
libdhwr.so" and "libXt9core.so
touchwiz.xml
successfully done found T9DB folder it was in recovery folder: it was deep inside folders. but now how to make flashable zip file bro ?
mor_1228 said:
A problems :
1 file is in rfs for not rtf as u said.
2 cant find T9DB folder in csc.rfs
B sucess :
found all 12 files like
android.policy.odex
- bouncycastle.odex
- core.odex
- core-junit.odex
- ext.odex
- framework.odex
- services.odex
AxT9IME.apk and AxT9IME.odex
libdhwr.so" and "libXt9core.so
touchwiz.xml
successfully done found T9DB folder it was in recovery folder: it was deep inside folders. but now how to make flashable zip file bro ?
Click to expand...
Click to collapse
Does it really need to be BIG and BOLD and RED??????
Done everything, replaced ur files with my files so no need to make new file, that file flashed successfully. but mater after restart i got this error and no keyboard was working i also renamed old keyboard to .bak
mor_1228 said:
Done everything, replaced ur files with my files so no need to make new file, that file flashed successfully. but mater after restart i got this error and no keyboard was working i also renamed old keyboard to .bak
Click to expand...
Click to collapse
do you ad .bak to both apk and odex old files?
are you deodex your new keyboard app?
yes mate added .bak to single file as my earlier keyboard was also deodex yes i deodexed my new file also u can see screenshot.
hey, what about port stock camera to CM7 using this TUT?
mor_1228 said:
yes mate added .bak to single file as my earlier keyboard was also deodex yes i deodexed my new file also u can see screenshot.
Click to expand...
Click to collapse
okey one thing ... wipe dalvik cache with recovery/advanced menu if don't work send for me your update.zip file. i work on it!
hey, what about port stock camera to CM7 using this TUT?
Click to expand...
Click to collapse
no you can't ... use other cam apps like viganti or MIUI cam.
try porting stock contacts.apk to cm7
Dialeractivtab - contacts- messaging-music- camera- ...
is based on twframework-res.apk and no one can port!
but some app maybe, like Myfiles. iwork on it ...
tried bro not working this is my zip file : both links are same
http://www.mirrorcreator.com/files/1O6P5WET/Samsung_Keyboard(meddel_East).zip_links
mor_1228 said:
tried bro not working this is my zip file : both links are same
http://www.mirrorcreator.com/files/1O6P5WET/Samsung_Keyboard(meddel_East).zip_links
Click to expand...
Click to collapse
hi man, i see your patch. all thing is okey but you put wrong lib file!
you put "libhardware.so" file in lib folder.
you must put "libdhwr.so" in your patch!
fix your patch, go to CWR and "wipe dalvik cache" then install your zip patch.
luky guy! you changed the hardware lib file and your phone work good! checke all your sensor... test all of them work?
mor_1228 said:
bro u extracted stock files from which format as i have original rom in MD5 format.
if u got another format kindly tell me the source. thank you.
Click to expand...
Click to collapse
See this video to find out how to extract .tar.md5 rom and take out system files from them. It also shows you how to extract .rfs files.
http://yagyagaire.blogspot.com/2012/02/video-extracting-system-files-and.html
After few days surfing, asking & testing. I decide to make a easily tutorial for theming in Windows, I think as long you know to use computer, they is nothing much difficult to theming/modifying the .apk yourself.
My guide only cover:
De-compile & compile of .apk
changing the .png file inside .apk
Modifying tricky .9.png file.
Modifying .xml file.
Zip Align the .apk
What you need:
Your phone must be ROOT and DEODEXED.
CWM pre-install recommended, you can simply get this function by installing superatmos / Lucifr kernel.
7-zip - for replacing file inside .apk
JRE (Java Runtime Environment) - required to run the APKtool
Android-SDK - must install before APKtool & Zipalign work.
APKTool Download the apktool & also apktool-install-windows.
Before Start:
Always remember make a backup for any .apk file you plan to change or amend.
Recommended make a flash-able version of origin not amend .apk in-case something went wrong, you can always flash back the original file via CWM. Example if you did something wrong in your systemUI.apk (for statusbar) it will probably make your phone nearly impossible access any part due to unstop FC.
I also like to take this opportunity to THANKS the following user help, without them, all this is not possible.
ronhoover88
superatmos
tarunagg
Vertumus
De-compile & Compile of .apk
Why this step is required:
You need to de-compile the .apk before you can correctly modified the tricky .9.png and also to see a readable .xml for amending.
Step:
Install JRE (Java Runtime Environment) & Android-SDK.
Download the apktool & also apktool-install-windows, extract the file and put inside your Windows Folder.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Open command prompt (Start - Run - CMD)
Before de-compile the .apk, make sure you copy out your current phone framework-res.apk & twframework-res.apk, lidroid-res.apk only required if you using lidroid-res.apk in your framework.
Code:
[B]apktool if [location of .apk][/B]
Example:
apktool if D:\APK\framework-res.apk
apktool if D:\APK\twframework-res.apk
apktool if D:\APK\lidroid-res.apk
Now, De-compile the .apk
Code:
[B]apktool d [filename.apk] [directory][/B]
Example: apktool d D:\framework-res.apk D:\De-compile
If sucess, you will seen the following line in your CMD.
The De-compile folder will be generate as seen below.
Now you can amend whatever you like to amend, after done, proceed to following step.
Compile back:
Code:
[B]apktool b [directory][/B]
Example: apktool b D:\De-compile
Extra build folder will appear inside your De-compile folder, all file inside here already compile and can use later in your Android phone.
Changing/Replacing the .png file inside .apk
Amending normal .png no need to de-compile, just extract the file and modified using any photoshop tools or simply replace the .png
Just right click any .apk file and select 7-zip extract to, as seen below:
Now go to the extracted folder and amend / replace any .png file you like to replace. (Remember .9.png file cannot just simply replace, check following post for instruction.)
Modifying tricky .9.png file.
The .9.png cannot just simply amend using any photoshop and put back, because by doing so, either the amend .9.png won't appear or just simply give you FC in your phone when running it.
What to do:
De-compile the .apk.
Below showing the different between before and after de-compile of .9.png, as you can seen on right image,they is extra 4 black dot + 1 black bar and surrouding with transparent bar, all this area must be keep and not amend during photoshop. The de-compile image will auto increase 1 x pixel + 1 y Pixel.
Just amend without touching those area, save it and then put back to correct folder and compile back.
Modifying .xml file
After you have de-compile the .apk, now all inside .xml is readable where you can make some changes on the color selection, clock position and etc. by just simply open with notepad and modified.
Before de-compile, the .xml look like below which is not readable and understand by human.
After de-compile, now the .xml is readable and understand by human.
Now you can amend what ever you like, Google/Search XDA forum for which .XML to amend.
Use this color code checker site for getting your desire color code.
After done, don't forget, you must compile back the .xml before it is understandable by Android OS.
Screenshot below showing modifying the sub text .xml to ICS blue color.
Change all
Code:
from android:color="#ffffffff to [B]android:color="#ff3f9bbf[/B]
at zzz_tw_secondary_text_sub.xml
Zipalign the .apk
Why this step is required:
You need to align the .apk to let the Android phone run the modified .apk perform much smoother and better, if you have more not align .apk file in your phone, it will eventually drag down your entire phone performance.
This step is not necessary but recommended.
Step:
Open command prompt at your Android-SDK Tools folder
Type following command and run
Code:
[B]zipalign -fv 4 [filename.apk] [filename-new.apk][/B]
Example: zipalign -fv 4 framework-res.apk framework-res-new.apk
A new Zipalign .apk will be generate as seen below, highlight in blue.
Zipalign in batch, save following code in .bat and put in your folder that contains .apk file. It will batch running zipalign all .apk inside, this guide I found from user Grumpy Old Man post at RootWiki. Thanks for this easier method.
Code:
@echo off
REM Batch file to recursively zip align *.apk files in a directory
REM and its sub-directories. This is significantly easier and faster
REM than manually zip aligning them.
@echo Zip aligning now...
for /R %%X in (*.apk) do zipalign 4 "%%X" "%%~dpX%%~nX.new"
@echo Replacing non-aligned files with zip aligned files...
for /R %%X in (*.new) do move /Y "%%X" "%%~dpX%%~nX.apk"
@echo Zip aligning done, press any key to exit
pause
Final Step
OK, done everything? now you need to put back to your phone with 2 method
Flash via CWM - highly recommended
Root Explorer - not recommended as it may not properly change for Statusbar theming.
Using CWM
Make a flash-able .zip to flash at CWM
Not sure how to do, let use a easier way, take any flash-able .zip, use 7-zip and choose open archive as seen below:
Now just drag and drop all your modified .apk inside the .zip file, choose YES when ask "Confirm File Copy" as seen below:
Copy the modified .zip to your root SDCARD and restart to CWM and install. Done!
Using Root Explorer
Temporary copy your modified .apk to your /system/csc
Right click choose permission and set as below:
Move your current .apk to correct directory /system/app
Done! This method is not recommended for framework-res.apk & systemUI.apk, better way still flashing via CWM.
ENJOY HAPPY THEMES!
My Achievement
Below is what you can get after themes. Enjoy!
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FROM BELOW, NOT RELATED TO S II - i9100G
CENTER CLOCK for SONY XPERIA Z phone.
De-compile the SystemUI.apk, then change some code at status_bar.xml in /res/layout
Step 1 - Find
Code:
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock"
android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip"
android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Step 2 - Replace Step 1 code with
Code:
<com.android.systemui.statusbar.policy.Clock android:id="@id/clock" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center_horizontal|center"
android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:singleLine="true" />
Step 3 - Then search for
Code:
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
and now cut Step 2 code and paste in bottom Step 3 code.
Step 4 - Lastly find
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker"
and past following code beside it.
Code:
android:background="@drawable/status_bar_background"
Save the edited status_bar.xml
Sony Xperia Z Center Clock Screenshot.
Very nice tutorial!i'm too lazy to type/make a tutorial..lol its good for sharing the idea..:thumbup:
Sent from my GT-I9100G using Tapatalk 2
fauzi_91 said:
Very nice tutorial!i'm too lazy to type/make a tutorial..lol its good for sharing the idea..:thumbup:
Sent from my GT-I9100G using Tapatalk 2
Click to expand...
Click to collapse
Thanks, I am still learning.
u forget to mention the deleting of edited xmls file and resources.arsc
samyam2002000 said:
u forget to mention the deleting of edited xmls file and resources.arsc
Click to expand...
Click to collapse
My final step is drag back and save using 7-zip, the file will automatic replace, no need manual delete.
By the way, thanks for highlighting removing of resources.arsc, add-in this step at final step now.
i dont know if i am doing it right what what exactly does a build folder contain a folder or .apk file
samyam2002000 said:
i dont know if i am doing it right what what exactly does a build folder contain a folder or .apk file
Click to expand...
Click to collapse
The build folder contain all the files you had de-compile just before but in compile format back.
Andrewtst said:
The build folder contain all the files you had de-compile just before but in compile format back.
Click to expand...
Click to collapse
so i just replace them or what on the original .apk
definnately apkmanager is easier
samyam2002000 said:
so i just replace them or what on the original .apk
definnately apkmanager is easier
Click to expand...
Click to collapse
Correct. Just replace to your origin .apk and remember always do a backup for any .apk you want to amend.
thanks for ur tutorial bro..
Mybe u can add a lil bit intro/tutor about uot kithen too if u want..can introduce to people out there who never used it b4..they also can get so many icons in there..
Sent from my GT-I9100G using Tapatalk 2
fauzi_91 said:
Mybe u can add a lil bit intro/tutor about uot kithen too if u want..can introduce to people out there who never used it b4..they also can get so many icons in there..
Sent from my GT-I9100G using Tapatalk 2
Click to expand...
Click to collapse
Oh, I never try before that, wait I try first, before I can add-in.
Andrewtst said:
Oh, I never try before that, wait I try first, before I can add-in.
Click to expand...
Click to collapse
Uot kitchen is the easier way to make a theme as long as we know how to use it..there are a lot of option there..n we juz need to upload the systemui.apk n framework-res.apk..but for contact,phone etc will remain stock..that one we can use ur tutor to modify..
Sent from my GT-I9100G using Tapatalk 2
I am trying to modify the stock SecWallpaperChooser and i am facing a problem. Everytime i add the wallpaper, edit the xml files(array.xml) and copy it to the system phone. But the wallpaper dont get added. After editing the apk and recompiling the apk i transferred the META_INF and Androidmanifest.xml from original to modified apk. I deleted the public.xml before recompiling the apk since i had read that it gets created each time and it gives the id automatically.
Even after doing that all thing, the wallpaper is not showing up in the display option under settings. Can someone pls tell me how to modify that apk so that i can correct my mistake.
P.S:-I decompiled my modifed apk to see whether the wallpaper was added to the corresponding folders and it was present there. I used SysFileCopymaster app to copy that apk to the system folder.
Parameswaran Iyer said:
I am trying to modify the stock SecWallpaperChooser and i am facing a problem. Everytime i add the wallpaper, edit the xml files(array.xml) and copy it to the system phone. But the wallpaper dont get added. After editing the apk and recompiling the apk i transferred the META_INF and Androidmanifest.xml from original to modified apk. I deleted the public.xml before recompiling the apk since i had read that it gets created each time and it gives the id automatically.
Even after doing that all thing, the wallpaper is not showing up in the display option under settings. Can someone pls tell me how to modify that apk so that i can correct my mistake.
P.S:-I decompiled my modifed apk to see whether the wallpaper was added to the corresponding folders and it was present there. I used SysFileCopymaster app to copy that apk to the system folder.
Click to expand...
Click to collapse
You can try something like this: http://forum.xda-developers.com/showthread.php?t=1684472
shut_down said:
You can try something like this: http://forum.xda-developers.com/showthread.php?t=1684472
Click to expand...
Click to collapse
I did the same thing and its not working. There is a file named array.xml in values folder which has the following code. I did not edit it.
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <resources>
<array name="extra_wallpapers" />
</resources>
I edited the array.xml file inside 'values-sw320dp-hdpi' and 'values-hdpi' folder. Do i need to edit the array file with above mentioned code? If no, then this is not working atleast for me. If yes, then can you pls tell me how. I had decompiled the SecWallpaperChooser apk inside the LightJB rom to see which all files the developer had edited and i found that it was only the two files which I have already mentioned
Thank You for your help
P.S:- Do i need to sign the apk? I had read somewhere that signing system apks might create a problem
Parameswaran Iyer said:
I did the same thing and its not working. There is a file named array.xml in values folder which has the following code. I did not edit it.
Code:
<?xml version="1.0" encoding="utf-8" ?>
- <resources>
<array name="extra_wallpapers" />
</resources>
I edited the array.xml file inside 'values-sw320dp-hdpi' and 'values-hdpi' folder. Do i need to edit the array file with above mentioned code? If no, then this is not working atleast for me. If yes, then can you pls tell me how. I had decompiled the SecWallpaperChooser apk inside the LightJB rom to see which all files the developer had edited and i found that it was only the two files which I have already mentioned
Thank You for your help
P.S:- Do i need to sign the apk? I had read somewhere that signing system apks might create a problem
Click to expand...
Click to collapse
For signing - you just get back META-INF folder from original apk. I am not sure about first thing you asked, I never tried to modify it.
I used Android Multitool for decompiling and recompiling and after recompiling it asked me to copy the META-INF and androidmanifest.xml files to new apk. I also tried to copy the apk without those files and it resulted in bootloop. Hence it is sure that i have to copy those files and as said i have already edited all necessary files.
Is there any developer or anyone who could confirm whether I have to edit the array.xml inside the values folder(The file with the above code)?
I would be glad if anyone could point out my mistake so that I can rectify it.
Parameswaran Iyer said:
I used Android Multitool for decompiling and recompiling and after recompiling it asked me to copy the META-INF and androidmanifest.xml files to new apk. I also tried to copy the apk without those files and it resulted in bootloop. Hence it is sure that i have to copy those files and as said i have already edited all necessary files.
Is there any developer or anyone who could confirm whether I have to edit the array.xml inside the values folder(The file with the above code)?
I would be glad if anyone could point out my mistake so that I can rectify it.
Click to expand...
Click to collapse
I know when you compile new apk - you must copy that META-INF folder. If you do not do it you will end up with a bootloop.
Why don't you try that app from the link I gave you? It is not guide for modification of TW app, it is separate app.
Here is some explanation for TW wallpaper chooser editing: http://technology-shettyprasad.blogspot.com/2013/01/adding-more-wallpapers-to.html?m=1
You must have wallpaper with exact resolution and its thumbnail. Also you need to add it to that array.xml
Ok. I just noticed that when i decompile the SecWallpaperChooser apk from LightJB rom, a build folder is created but that folder is not in the stock apk. Can someone one explain why? And do i need to make that folder while modifying?
Parameswaran Iyer said:
Ok. I just noticed that when i decompile the SecWallpaperChooser apk from LightJB rom, a build folder is created but that folder is not in the stock apk. Can someone one explain why? And do i need to make that folder while modifying?
Click to expand...
Click to collapse
I just tried to do it by that guide I sent you. This one: http://technology-shettyprasad.blogspot.com/2013/01/adding-more-wallpapers-to.html?m=1
So do this:
1.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2.
And you have apk that I made in attachemnt. I added some picture with some bottle on the beach. See if it works.
I am on CM11, so I think that I can't use TW wallpaper chooser on it to try if it works.
P.S. You have my folders path in those screenshots. For that last question.
And file was from Slim-JB ROM. But it should be the same you use.
Doesn't work buddy. Each time I copy META-INF folder and androidmanifest.xml file the apk's name changes to false which it shows in the installer screen. I know that system apks cant be installed through installer but just to check the apk is properly made I saw the name in installer and it shows false. Once i signed the apk and copied it to the system. It successfully replaced the default SecWallpaperChooser but faced FC.
Parameswaran Iyer said:
Doesn't work buddy. Each time I copy META-INF folder and androidmanifest.xml file the apk's name changes to false which it shows in the installer screen. I know that system apks cant be installed through installer but just to check the apk is properly made I saw the name in installer and it shows false. Once i signed the apk and copied it to the system. It successfully replaced the default SecWallpaperChooser but faced FC.
Click to expand...
Click to collapse
Have you tried mine apk?
shut_down said:
Have you tried mine apk?
Click to expand...
Click to collapse
Yes I tried your apk and it worked for that apk. I decompiled it, added and edited the required files and recompiled it and signed. And it worked very well. Thanks for that. But I want to modify the stock apk and this method is not working for some reasons or the other. I am still trying to modify it in some way but its not working.
Yes!!! Finally did it. My first apk modification. A small one but i think a decent start. Modified the public.xml instead of deleting it and copied the file to system using root explorer. The same apk did not work with it. Though I modified the SecWallpaperChooser from the LightJB(Sorry I did not take permission before editing) rom but i am sure that it will work with the stock one too. Will give that a try too.
P.S:-Worked with stock too. And SysFileCopymaster works for our device too.
Just one thing. Can you tell me how to make flashable zip for our phone? How do I make META_INF folder? Can i take it from some other rom? And just by creating zip file of folder will it become flashable?
Let's get ready and theme/decompile Lollipop ROM APKs!
Hey all, it's me again. I might as well be posting my entire workstation/methods here for people to learn how to get into the theming world. This is the traditional method of theming, so this would be useful for prospective themers/ROM developers alike.
NOTE: I'll be doing this on an AOSP/CM/Google based ROM, and if you are wondering if it works on TW/Sense, I do not know, but it should work the same.
In this guide, I won't be going so in depth like @Vivek_Neel, so you can go check out his thread: http://forum.xda-developers.com/android/themes/guide-t2978121 I'll be going over the BASICS of getting started to theme and how to go to his theme thread and start contributing.
Table of Contents
Setting up the Java SE Runtime Environment
Decompiling your first time
Compiling your first time
Creating a flashable zip
Repetitive? Let's simplify it using batch files.
Porting my themes or other themes to specific ROMs (WIP)
Please do note, this IS for beginners, so I'll try and respond to errors and problems when setting up your environment and using my compiling packages.
Setting up the Java SE Runtime Environment
Setting up the Java SE Runtime Environment
First of all, to make sure everything goes well, it is recommended that you set up your entire JRE on your computer.
I'm on Windows 8.1 so I'll be using screenshots from an 8.1 setup.
STEP 1: Install these two files:
- JRE8 (This is what I use): http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
- JDK8 (Install just in case): http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
STEP 2: Setting up JDK JAVA_HOME environment variable:
After installing the two files above, locate your JDK location, in my case, mine is C:\Program Files\Java\jdk1.8.0_20.
Then open up your Control Panel and click into System (Control Panel\All Control Panel Items\System)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click on Advanced system settings in the sidebar.
A popup will appear, click on the Advanced tab, then click on "Environment Variables..."
Another smaller popup, Environment Variables, will open up. Click on "New..."
According to the screenshot, click type in the Variable name (JAVA_HOME) and Variable value (Location of your JDK set up).
After everything is done, click OK on all popups, then reboot your computer.
You are now ready for apps like Virtuous Ten Studio and Android Studio, futureproofing yourself for now.
Decompiling your first time
Decompiling your first time
STEP 1: Create your working directory
- Make a directory wherever you want, for example on the desktop. Name the folder something easily memorable, e.g. WORKING AREA (C:\Users\Nicholas\Desktop\WORKING AREA\)
STEP 2: Download these two files:
- Latest APKtool.jar by @iBotPeaches: https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.0.1.jar
- apktool-install-windows-r05-ibot.tar.bz2: https://code.google.com/p/android-apktool/downloads/list
STEP 3: Place all files into the working folder
STEP 4: Rename apktool_2.0.1.jar to apktool.jar
STEP 5: Put your desired APK you want to decompile into directory (This can be framework-res.apk)
STEP 6: Put your ROM's framework-res.apk into the directory (If done in Step 5, skip this)
STEP 7: Installing the framework-res into apktool's resources.
- Shift + Right Click on a blank spot in the working directory, then click "Open command window here..."
- Type this code in, then click enter
Code:
apktool if framework-res.apk
- Your framework will be installed, ready for apktool to use it.
STEP 8: Decompile your desired APK
- Shift + Right Click on a blank spot in the working directory, then click "Open command window here..."
- Type this code in, then click enter
Code:
apktool d apkname.apk
- Your apk will be decompiled into your working directory -> apkname folder (e.g. C:\Users\Nicholas\Desktop\WORKING AREA\SystemUI)
- A small breakdown of the code is like this: apktool (calling the program) d (decompile) apkname.apk (apk input)
STEP 9: Edit your apk file!
- You can follow Vivek's thread for what to change in a specific APK file, linked here: http://forum.xda-developers.com/android/themes/guide-t2978121
Compiling your first time
Compiling your first time
To recompile, you need to have the android-sdk handy, as you'll need the zipalign.exe from it.
REQUIREMENTS
- 7-Zip installed: http://www.7-zip.org/
STEP 1: Install Android SDK from Android Studio
Android Studio: http://developer.android.com/sdk/index.html
STEP 2: Copying zipalign.exe into your working directory
- Navigate into C:\Program Files (x86)\Android\android-studio\sdk\build-tools\android-4.4W and copy zipalign.exe into your working folder.
STEP 3: Compiling your decompiled app into an APK file
- Shift + Right Click on a blank spot in the working directory, then click "Open command window here..."
- Type this code in, then click enter
Code:
apktool b appname appname.apk
- Your framework will be installed, ready for apktool to use it.
- NOTE: appname should be the same as the decompiled app's folder name.
STEP 4: Zipaligning your app
At this point, you should have your original APK located directly inside your working directory.
Your compiled app will be placed inside your working directory -> appname folder -> dist folder.
Double click your compiled APK and open it with 7-zip.
Double click your original APK and open it with 7-zip.
In your original APK opened in 7-zip, drag META-INF and AndroidManifest.xml into the compiled APK's 7-zip window. Click Yes to overwrite.
Take your compiled APK and place it in a new folder in your working directory (e.g. C:\Users\Nicholas\Desktop\WORKING AREA\ZIPALIGN)
Drag "zipalign.exe" into the new folder ZIPALIGN.
Paste the compiled APK with the original META-INF and AndroidManifest.xml into the ZIPALIGN folder.
Rename the apk from apkname.apk to apkname-t.apk (Just add a "-t" to distinguish from your output apk later)
Shift + Right Click on a blank spot in the ZIPALIGN directory, then click "Open command window here..."
Type this code in, then click enter
Code:
zipalign -v 4 appname-t.apk appname.apk
Your output APK will be available to flash now.
Creating a flashable ZIP for yourself
Creating a flashable ZIP for yourself
Download my Flashable ZIP template here: https://www.androidfilehost.com/?fid=95897840722644285
STEP 1: Designing your updater-script (What get's shown in TWRP/CWM when flashing)
This is my updater-script from the zip file:
Code:
ui_print(" =============================================");
ui_print(" Flashable ZIP Template by Nicholas Chum");
ui_print(" =============================================");
ui_print(" ");
sleep(1);
ui_print(" Now mounting the system writeable....");
sleep(1);
ui_print(" ");
run_program("/sbin/busybox", "mount", "/system");
ui_print(" Copying the files... ");
sleep(1);
package_extract_dir("system", "/system");
sleep(1);
ui_print(" ");
ui_print(" File copy complete. ");
unmount("/system");
sleep(1)
- This installs everything in the system folder of the ZIP file into the system folder on your phone.
STEP 2: Structure your APK into the correct directories of the ZIP according to your phone's layout
- If you want to install SystemUI.apk, you cannot install it like on KitKat due to different directory structure, so for example, the correct location to install SystemUI.apk would be /system/priv-app/SystemUI/SystemUI.apk, so you'll have to create your own subfolders in the zip according to the apk you want to install.
STEP 3: After you're done, flash and have fun!
Repetitive? Let's simplify it using batch files
Repetitive? Let's simplify it using batch files
I have a batch file collection here, check it out: https://www.androidfilehost.com/?fid=95897840722644292
To use my batch files, you may have to edit each batch file to confirm locations for directories on your computer.
These are the bat files you will have to edit: FRAMEWORK (Step 1) - Uninstall.bat, FRAMEWORK (Step 2) - Install.bat
You'll have to edit in your user account name, for example in FRAMEWORK (Step 1) - Uninstall.bat:
Code:
rd /s /q C:\Users\[COLOR="Red"]Nicholas[/COLOR]\apktool
Afterwards, it will work perfectly.
The point of Theming Tools.zip is to allow you to easily make new working directories and just copying everything in from the zip file to the working directory to save your time from moving files over (zipalign.exe, apktool.jar, apktool.bat...etc)
To use my batch files, use it in this order
Create working folder
Place framework-res.apk in the working folder
FRAMEWORK (Step 1) - Uninstall.bat
FRAMEWORK (Step 2) - Install.bat
Place your other APKs in, my batch only decompiles framework-res.apk, SystemUI.apk, Settings.apk, DocumentsUI.apk, TeleService.apk, so if you have another APK you want to automate, copy the structure of my calls in the batch file, then save it.
BUILD (Step 1) - Extract Starter 5 APKs.bat
Start theming your apps.
After you're done...
BUILD (Step 2) - Compile New 5 APKs.bat
Now open each of the original APKs in the working directory, then copy each META-INF and AndroidManifest.xml from the original to the new compiled ones.
Place each unzipaligned apks with the META-INF and AndroidManifest.xml into the BUILD ME folder - my batch only zipaligns framework-res.apk, SystemUI.apk, Settings.apk, DocumentsUI.apk, TeleService.apk, so if you have another APK you want to automate, copy the structure of my calls in the batch file, then save it.
After you're done...
BUILD - Zipalign All 5 APKs.bat
Place all files into a flashable zip.
Enjoy!
Last hold, just in case.
???Hold it right there .
looking forward to that!!!! nice work
Very nice my friend, we needed something like this for noobs. Sending them ALL your way..... Lol
djdarkknight96 said:
Very nice my friend, we needed something like this for noobs. Sending them ALL your way..... Lol
Click to expand...
Click to collapse
Haha.
+1.
Very nice and handy
djdarkknight96 said:
Very nice my friend, we needed something like this for noobs. Sending them ALL your way..... Lol
Click to expand...
Click to collapse
Haha I think I'll be the first "noob" to try and learn theming.. Haha what say @nicholaschum? ?
Edit - BTW can't wait for your inverted theme for L, Bryan. Always loved your theme.. ?
Khizar said:
Haha I think I'll be the first "noob" to try and learn theming.. Haha what say @nicholaschum? ?
Click to expand...
Click to collapse
Well, I think I missed a step then.
For you specifically, Step 0: Buy a new computer!!!
nicholaschum said:
Well, I think I missed a step then.
For you specifically, Step 0: Buy a new computer!!!
Click to expand...
Click to collapse
My brother ended up buying the tab and so the new laptop is just sitting there, might as well make it useful... ??
Khizar said:
My brother ended up buying the tab and so the new laptop is just sitting there, might as well make it useful... ??
Click to expand...
Click to collapse
I might change the last HOLD post to Porting themes to other ROMs, then you can start helping me do more nightly builds if theme chooser still doesn't function as well
nicholaschum said:
I might change the last HOLD post to Porting themes to other ROMs, then you can start helping me do more nightly builds if theme chooser still doesn't function as well
Click to expand...
Click to collapse
I am all for that bro. Told you I'd help and I'll try to help to the best of my abilities, while trying to learn. ?
BTW why isn't @fahadali2315 helping you out? He's become lazy since getting OPO and now shamu.. LOL
Khizar said:
I am all for that bro. Told you I'd help and I'll try to help to the best of my abilities, while trying to learn. ?
BTW why isn't @fahadali2315 helping you out? He's become lazy since getting OPO and now shamu.. LOL
Click to expand...
Click to collapse
He's my official tester......only...... and he has like a dozen flagship phones. He should really do something with them.
Where's my Sense ROM on Nexus 6? XD
@nicholaschum so this was what you did when we had no Internet and I was napping? Lol....
BellaxMiu said:
@nicholaschum so this was what you did when we had no Internet and I was napping? Lol....
Click to expand...
Click to collapse
LOL....yes.....tethering.....and I'm still not done either
nicholaschum said:
He's my official tester......only...... and he has like a dozen flagship phones. He should really do something with them.
Where's my Sense ROM on Nexus 6? XD
Click to expand...
Click to collapse
In his defense, he keeps losing the phones so he wouldn't get far.. Haha JK
The OPO sense port... Makes my point.. ?
BellaxMiu said:
@nicholaschum so this was what you did when we had no Internet and I was napping? Lol....
Click to expand...
Click to collapse
He plans to do even more once you get Internet back... LOL