[Tutorial] Decompile/Recompile APKs - Samsung Captivate Glide

Complete guide on how to Decompile/Recompile Apks with APKTOOL
This Tutorial is for Windows Only
Apktool and all .bat files outlined in this tutorial have been uploaded here for your convenience
Requirements
- 7zip / Winrar (or similar)
- Apktool - (Package link above)
Notes
- I use .bat file to make the whole process alot quicker ...
- Copying Apktool files (aapt.exe, apktool.bat, apktool.jar, baksmali.jar, zipalign.exe) into C:/windows will allow you to use the .bat files anywhere on your computer without the need for apktool in the same directory
Step 1 - First you need to install the framework files so the apktool can use them to decompile other apks in the rom that depend on the framework
- Make a text document and rename it "Install Framework.bat"
- Edit it with a txt editor and paste in this code
Code:
CMD /K apktool if framework-res.apk
- with your framework-res.apk in the folder run the Install Framework.bat file and it should output
Code:
Framework installed to: C:\Users\USER\apktool\framework\1.apk
Step 2 - Decompiling (we will be decompiling framework-res.apk in this tutorial)
- First make a copy of the apk you wish to decompile and name it backup.apk (this will be used later)
- Make a text document and rename it "Decompile.bat"
- Edit it with a txt editor and paste in this code (replace the "framework-res.apk" with the name of the apk you wish to decompile)
Code:
CMD /K apktool d framework-res.apk
- with your apk in the same folder run the Decompile.bat file and it create a folder that you can edit as you see fit
Step 3 - Recompiling (we will be Recompiling framework-res.apk in this tutorial)
- Make a text document and rename it "Compile.bat"
- Edit it with a txt editor and paste in this code (replace the "framework-res.apk" with the name of the apk you wish to recompile)
Code:
del almostdone.apk
CMD /K apktool b framework-res almostdone.apk
- Run the Compile.bat file and it create an apk called almostdone.apk (if you get errors you most likely made a change which broke the apk)
- Open both almostdone.apk and backup with 7zip or Winrar
- Drag all the contents of almostdone.apk except for AndroidManifest.xml into backup.apk and replace existing files
- Now make a text document and rename it "Zipalign.bat"
- Edit it with a txt editor and paste in this code (replace the "framework-res.apk" with the name of the apk you wish to recompile)
Code:
del framework-res.apk
zipalign.exe -v 4 backup.apk framework-res.apk
- Run the Zipalign.bat file and it create the finished apk

Nice one :good:, but i think very few takers in our forum. I was also thinking about posting on ROM Porting, but there are many guides already out there .

yeah ... seems so.... iv'e tryed porting myself ... never got it booting ...

Related

[Android] I8000 Theme's & Creating Theme's [UPDATED]

Tutorial & Theme's Download Hold On To Your Balls.
| How To Create You Own Theme. (There are images contain in the framework-res.apk Extract it using 7-Zip & edit it) [You Can Start Theme-ing now]
| How To Change Status Bar Font Color. Time Font Color: (Refer To Post: #2) | StatusBar Font Color - : (Refer To Post: #3)
| How To Get It Installed On Your I8000
- Basically its o2bupdate.tar.gz thingy.
File's Provided:
- Original Android 2.1(Eclair) Theme From Almar's android files [Beta1 Original Theme Extracted, Beta1 Original Framework-res.apk]
- Modified StatusBar Font Color: White/Black. [Statusbar - White, Statusbar - Black [Original] ]
- .... more will come
Requirement's To Start:
- Any photo editing software [Recommended **Adobe Photoshop/GIMP]
- Some files to work around with. [Smali Dex Compile&decompile, Context Editor, HxD Hex Editor]
- 7-Zip You will need it for some reason [You Will Understand Why Later]
- .... more will come
Smali Dex Compile & Decompile:
This small program is used generally for extensions that are .dex its a simple thing to use. (Refer To Post: #2)
Context Editor:
A program use to edit the file's that are found after using smali. (Refer To Post: #2)
Will Update More Soon.
Here are some screen-shots of what I've been working on:
Note: Please Ignore - (No Service)|Starhub. My sim got suspended for not paying bill's
There's so much that you can do but sadly im only a designer who designs theme. so with this info and file provided i hope you guys out there can do something better. Peace.
Please Take Note That Current Theme Won't Work On Beta 2, Only For Beta 1. I'm Currently working on Beta 2 File's. Will Update Soon.
How To Use Smali Dex Compile / DeCompile For classes.dex and Context Editor: [Changing Of Font Color Time On You Status Bar!]
Download This Files: [Smali Dex]
Normally I will place all my files to C:\Android\ for a new project. But you can choose anywhere you like that is at your own convenience.
1. You will need classes.dex from Service.jar - Extract it out using 7-Zip or WinRAR.
2. Once You have already done extracting classes.dex out put it in you project folder.
3. You can start following the steps below.
So lets start. Lets say i have already extracted all the file i've needed and placed it to my project folder here is what you need to do. Run CMD.
Type in cd C:\Android\ or where ever you project folder is located it. It should show you something like this once you've pressed ENTER.
[attachment=69743:1.png]
Okay lets move one, now here is what you need to check be sure that classes.dex is located inside the folder in order for you to start de-compiling the dex files.
Now Type in java -Xmx512M -jar baksmali.jar -o classout/ classes.dex
After pressing enter you should now get a classout folder inside you project folder.
[attachment=69746:2.png]
Now double click on the classout folder. [Do not close the CMD it will save you alot of time.] Inside the folder contains alot of files so lets cut it short with a photo:
Locate the file here: classout\com\android\server\status
Item will be: StatusBarIcon.smali
[attachment=69748:3.png]
Okay once you see the StatusBarIcon.smali we will now start using the Context Editor that is given on the first Post.
Right Click on StatusBarIcon.smali open with Context Editor or You could run context editor and just drag StatusBarIcon.smali into it.
You should get something like this:
[attachment=69752:4.png]
Now on Context Editor press CTRL+F and type color and press enter.
You should all be getting this paragraph that i've highlighted:
[attachment=69754:5.png]
Follow the following lines stated below: From original to edited.
Text Original:
Code:
.line 46
const/high16 v6, -0x100
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Text Edited:
Code:
.line 46
const v6, -0x1
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Once you are done, Save the file & close context editor. Go to your Project folder and rename your classes.dex to classes-old.dex You need to do this just incase you mess up some stuffs. After you have done with this go to cmd and type in java -Xmx512M -jar smali.jar classout/ -o classes.dex Press enter and now you'll get the new classes.dex
Here's what you need to do open service.jar with 7-Zip and drag the new classes.dex inside and save. You're done changing your status bar Time into white color. The next tutorial is changing your status bar text to white color [The Tricky Part].
To store the new service.jar you have compiled you can use ADB USB or o2bupdate.tar.gz your own convenience [I'll touch on a how to soon]
If your using o2bupdate.tar.gz place it in My Storage/ where haret is at and run haret. Let the o2bupdate do it stuffs & You'll get a white color time font something like this: [attachment=69760:tada.png]
Photo's Will Be Updated Soon.
How to use HxD Hex Editor: I Believe Most Of You Knows How To. (Changing Status Bar Font Color To White) Other colors may work to you can try.
Download Files: HxD Hex Editor 1.7.7.0
By now most of you should have the Framework-res.apk with you. Inside the apk contain images & XML for the android theme. You can mess around with the images & the xml.
But what i'm about to teach you all here is basically changing the font color of the status bar.
Go inside the framework-res folder that you have extracted. Go to this directory: framework-res\res\layout
Look for a file named status_bar.xml
[attachment=69761:1_1.png]
Now once you have found it. Open HxD Hex Editor and drag status_bar.xml into it.
Now once you have done that, press the search tab and click find 08 00 00 1C. change text string to hex value.
The first one should come out: [Now in the photo you see the red box Change it to FF FF FF.]
[attachment=69762:2_2.png]
We are not done yet. Do The same thing again search for 08 00 00 1C.
This is what you should get: [Now in the photo you see the red box Change it to FF FF FF.]
[attachment=69763:3_3.png]
One you change it save it but don't close it just yet. There's another few more steps you need to do.
Now search for 39 00 01 01.
You should get this: [Now in the photo you see the red box change it to 1C FF FF FF FF.]
[attachment=69764:4_4.png]
Now save it and close Hex editor. Open your framework-res.apk with 7-Zip and drag your edited Status_bar.xml in it and save.
Use o2bupdate.tar.gz to update or you can simply use adb usb. Remember if you use o2bupdate.tar.gz the should contain \system\framework\ in order for it to be updated. save goes to service jar.
Now this is what you should get after the update :
[attachment=69765:Tada_2.png]
Further Developement =D =D
Further Developement =D =D Further Developement =D =D

[HOW TO] Add more wallpapers to TwWallpaperChooser

Although there are 26 wallpapers in TwWallpaperChooser.apk, only 5 are selectable. To add the missing wallpapers (or more) to the TwWallpaperChooser app, do the following:
1) Decompile TwWallpaperChooser.apk (apktool d TwWallpaperChooser.apk)
2) Make sure there are no errors, if so grab another copy of TwWallpaperChooser.apk
3) Edit the file res/values-hdpi/arrays.xml
4) Add wallpapers as new items (images should be in res/drawable-hdpi).
eg.
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="wallpapers">
<item>wallpaper_bliss</item>
<item>wallpaper_brown</item>
<item>wallpaper_cafe</item>
<item>wallpaper_canyon</item>
<item>wallpaper_cat2</item>
<item>wallpaper_circle</item>
<item>wallpaper_desert</item>
<item>wallpaper_field</item>
<item>wallpaper_flower</item>
<item>wallpaper_glass</item>
<item>wallpaper_grass</item>
<item>wallpaper_grass_new</item>
<item>wallpaper_light</item>
<item>wallpaper_motion</item>
<item>wallpaper_nexuswallpaper1</item>
<item>wallpaper_phasebeam</item>
<item>wallpaper_rock</item>
<item>wallpaper_secdesert</item>
<item>wallpaper_speedlight</item>
<item>wallpaper_secdesert</item>
<item>wallpaper_stars</item>
<item>wallpaper_street</item>
<item>wallpaper_street_lights</item>
<item>wallpaper_tree</item>
<item>wallpaper_venezia</item>
<item>wallpaper_zanzibar</item>
</string-array>
</resources>
5) Recompile TwWallpaperChooser.apk (apktool b TwWallpaperChooser TwWallpaperChooserNew.apk)
6) Extract new resources.arsc file from TwWallpaperChooserNew.apk (unzip TwWallpaperChooserNew.apk resources.arsc)
7) Rename TwWallpaperChooser.apk to TwWallpaperChooser.zip
8) Add new resources.arsc file to TwWallpaperChooser.zip (zip TwWallpaperChooser.zip resources.arsc)
9) Rename TwWallpaperChooser.zip to TwWallpaperChooser.apk
10) Put TwWallpaperChooser.apk back on phone.
works like charm! simple and easy instructions!!!
can i use this method to add in new wallpapers?
I have managed to extract the TwWallpaperChooser.apk using Android Commander. I have followed steps 1 and 2 but the directory in step 3 doesn't exist on my phone. Can someone help?
Transform said:
I have managed to extract the TwWallpaperChooser.apk using Android Commander. I have followed steps 1 and 2 but the directory in step 3 doesn't exist on my phone. Can someone help?
Click to expand...
Click to collapse
You can see the directory only after decompiling the apk. It is inside resources.arsc in the normal apk.
Sent from my GT-I9100 using Tapatalk 2
Ok so I got as far as step 8 in this guide:
HTML:
http://forum.xda-developers.com/showthread.php?t=1188389
where I moved the TwWallpaperChooser.apk from my device to the 'place-apk-here-for-modding' folder.
I then completed step 1 of the guide in this thread but I'm not sure where to go next...

Problem with charge battery icon

Hi,
I have Minco V3, I would like to change the battery icon of this mod
https://www.dropbox.com/s/yng6akbnxnxxu98/ThunderStick-SAC-NoSearchButton-RLMenu.zip
With the icons contained in this zip: http://d-h.st/ssN
I followed this guide:
• Place your SystemUI.apk in place-apk-here-for-modding of your apktool/apkmanager folder
• Use apktool/apkmanager to extract the images (no need to decompile/compile) with option 1
• Look inprojects of your apktool/apkmanager folder for your SystemUI.apk
• Go to /res/drawable-xhdpi and replace the images with your favorite battery icon files.
• Zip the SystemUI.apk back with option 3 (as a system app)
• In place-apk-here-for-modding you should find an unsignedSystemUI.apk
• Rename it to SystemUI.apk and push it to /system/app (I have modified permissions to rw-r-r).
But systemUI go to crash and I have to restore the rom using nandbackup.
Is there something wrong in this procedure?
I have also noticed that the battery icons are provided in two different folders in the two zip files. drawable-hdpi instead of drawable-xhdpi. Could it be a problem?
thanks
up.. :angel:
If changing images in an APK file they need to have the same file name and be placed in the same directories as the images you wish to replace.
To move the menu button to the opposite side of the screen you need to decompile the APK, then edit the navigation_bar.xml file located in the res/layout folder.
Find lines containing
Code:
android:id="@id/menu"
Move these lines so that they are before what ever item is furthest to the left.
You can rearrange any items by using this same method.
Adding items how ever is more complicated as there needs to be smali additions.
Good luck, let me know if you need any more help. I will keep my responses in the forums so the knowledge can be shared. It took me a while to figure this stuff out as not too many people are willing to help out when it comes to teaching noobs. They forget we all started somewhere.
EDIT:
Oh yeah,
Don't use APK Manager, it is easier to use for some things but can really complicate things when problems arise.
If just replacing images, dont decompile anything, just open the APK using 7ZIP, then drag and drop image files directly in to the APK file. Don't unzip it to a folder, drag and drop.
Be certain all file names being added are replacing existing files with the same file names and types.
thank you! I changed the battery icons.
I'm trying to edit the xml file, but when I decompile and compile the file apk I have errors. i use apk manager and apk multitool.
error with apk manager 5.0.2
HTML:
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f02002d drawable/ic_sysbar_ime_default, config=-xhdpi-v13
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Looks like you have two instances of the same file in two different folders. Remove one of them.
First decompile the APK, with out making changes try to recompile it. If you still have errors. This may be a problem with APKTOOL, try a different version. If not you made the error when making modifications. Read the output
The very first line in the exception thread is the problem you need to work on.
Code:
Multiple resources: spec=0x7f02002d drawable/ic_sysbar_ime_default, config=-xhdpi-v13

[HOW TO] MOD Files with APKTool

APKTool.zip (with Signed Files & Tools) has these files inside...
_____________________________________________________
! SGS3 (TMobile) Signed Files - framework-res (4.1.1)
! SGS3 (TMobile) Signed Files - SystemUI (4.1.1)
! Instructions + Info.txt
! Tool - 7-Zip v9.20 installer.exe
! Tool - Notepad++ 6.2.3 installer.exe
aapt.exe (from Android SDK Files {adt-bundle-windows-x86\sdk\platform-tools}) Android SDK
apktool.jar (APKTool v1.5.1 - Newest Release 12-28-2012) APKTool
*** Works on Windows x86 32 bit (NOT Tested on 64 bit)
Must have installed on Windows
__________________________
Java {I use Java Runtime Environment 1.7.0.10} Java 32bit
Notepad++ {Editing tool}
7-Zip (or WinRAR)
! Instructions + Info on Post #2
Download : APKTool.zip
Other Similar Helpful Links (that relate)...
Link #1- [How To] Use and install APKtool (v6ser)
Link #2- [How To} Setup use APKtool (RMarkwald)
Update: I check on this thread only once a week to answer questions. So be patient.
! Instructions + Info
NOTES
__________________________________________________________________
*** to "ADD Back SIGNED Files", open up newly created .apk with 7-Zip (or WinRAR) and add in (META-INF folder + AndroidManifest.xml)
.apk NEED'S to be SIGNED, .jar DOESN'T
Doesn't matter which set is used, as long as they are a MATCHING SET. (META-INF folder + AndroidManifest.xml)
APKTOOL LINES Explained
__________________________________________________________________
LINE apktool if framework-res.apk (Creates this file... C:\Documents and Settings\{your username}\apktool\framework\1.apk)
-that created "1.apk" file has "resources.arsc" inside.
-It's only Needed to run 1st time to register file with APKTool
LINE apktool d {file name} (De-Compiles to {file named folder -".apk" or +".out"})
LINE apktool b {folder name} (Compiles to {folder name}\dist)
Instructions : How to Use Apktool
__________________________________________________________________
1. Extract the "APKTool.zip" file to C:\ so that it looks this C:\APKTool
2. Extract "framework-res.apk" from your ROM's "system\framework" folder & put file into C:\APKTool
3. Copy any file(s) to edit to your C:\APKTool folder {xxx.apk, xxx.jar}
4. In Windows, get to your CMD box (in WinXP - Start Menu - Run - CMD)
CD:\apktool
apktool if framework-res.apk
{Example #1 - Editing framework-res.apk}
________________________________________
apktool d framework-res.apk
...{edit file(s) with Notepad++}
apktool b framework-res
...{add back SIGNED Files}
{Example #2 - Editing SystemUI.apk}
___________________________________
apktool d systemui.apk
...{edit file(s) with Notepad++}
apktool b systemui
...{add back SIGNED Files}
{Example #3 - Editing android.policy.jar}
_________________________________________
apktool d android.policy.jar
...{edit file(s) with Notepad++}
apktool b android.policy.jar.out
{Example #4 - Editing services.jar}
___________________________________
apktool d services.jar
...{edit file(s) with Notepad++}
apktool b services.jar.out
5. Finished !
I created this thread, as to not clutter up a ROM that I posted. Now I can help others who use it here!
ktmdave7 said:
APKTool.zip (with Signed Files & Tools) has these files inside...
_____________________________________________________
! SGS3 (TMobile) Signed Files - framework-res (4.1.1)
! SGS3 (TMobile) Signed Files - SystemUI (4.1.1)
! Instructions + Info.txt
! Tool - 7-Zip v9.20 installer.exe
! Tool - Notepad++ 6.2.3 installer.exe
aapt.exe (from Android SDK Files {adt-bundle-windows-x86\sdk\platform-tools}) Android SDK
apktool.jar (APKTool v1.5.1 - Newest Release 12-28-2012) APKTool
*** Works on Windows x86 32 bit (NOT Tested on 64 bit)
Must have installed on Windows
__________________________
Java {I use Java Runtime Environment 1.7.0.10} Java 32bit
Notepad++ {Editing tool}
7-Zip (or WinRAR)
! Instructions + Info on Post #2
Download : APKTool.zip
Other Similar Helpful Links (that relate)...
Link #1- [How To] Use and install APKtool (v6ser)
Link #2- [How To} Setup use APKtool (RMarkwald)
Click to expand...
Click to collapse
Thanks for this. Maybe people will stop demanding so much and start to experiment and learn themselves....
Thanks, I've been having trouble using apkmanager and needed to get a good setup with apktools for editing framework. I'll give this a go and a very special thanks for the instructions!
Noellenchris
Ok, for me I have to type apktool.jar d framework-res.apk and then I edited \values\arrays.xml and when I type apktool.jar b framework-res it created a build/apk folder but it is empty... Any ideas? I was trying jovy's tethering mod. I also ran aptool.jar if framework-res.apk first and verified the user folder was created with a file called 1.apk. Probably a noob question and I apologize in advance.
I have also previously reinstalled JRE for both normal and x64 versions plus ensured they are added to my path environment. I also added a JAVA_HOME entry and added the path in the values to my JRE path. Hmmm....that's about it I guess for now.
Thanks
dude thanks so much.
i needed someone to hold my hand through this. ill try it once im off work.
when I use this tool on (Windows XP 32bit), I get "Build" folder, when it tries to Compile (and it can be empty, if it tried to compile and got interrupted, or possibly a error)
I usually delete these 2 folders (build + dist)... (if they are there) right before a Re-compile.
\build = project folder of Re-compiling.
\dist = project Newly created .apk (or .jar) file goes.
Working with APKTool is easy... but you learn the most by using a lot and testing it yourself. I try many different methods and recheck the file if did 1 way, then I try another way and see if any thing is changed by another method (lots of comparing and confidence builds this way) Something that is tuff to explain in Text and in Instructions, but eventually, you have confidence in file comparisons and makes sense then.
*** Sometimes I see different Text words, that seam like could be error (but to me Error text, is when the CMD box filles with much extra TEXT and you can tell it messed up... NOT just 1 text line of code)
noellenchris said:
Ok, for me I have to type apktool.jar d framework-res.apk and then I edited \values\arrays.xml and when I type apktool.jar b framework-res it created a build/apk folder but it is empty... Any ideas? I was trying jovy's tethering mod. I also ran aptool.jar if framework-res.apk first and verified the user folder was created with a file called 1.apk. Probably a noob question and I apologize in advance.
I have also previously reinstalled JRE for both normal and x64 versions plus ensured they are added to my path environment. I also added a JAVA_HOME entry and added the path in the values to my JRE path. Hmmm....that's about it I guess for now.
Thanks
Click to expand...
Click to collapse
Found my issue, my edit on the arrays.xml was bad, I kept forgetting to add a /> at the end of the edit. duh. Glad it didn't compile and I ended up with some crazy errors on my phone... Lesson learned.
Noellenchris
I cant delete files from folder-apktool after decompile, compile, give permission but dont cant delete.I on win 8.How delete
very useful. Thanks!

[MOD][TUTORIAL] Customize NavigationBar height

Hello,
In this tutorial I´ll show you how to change the height of your NavBar.
This Tutorial works for any Rom!
Requirements
Text-Editor, e.g. Notepad++
WinRar/WinZip/Bandzip
Apktool (Download)
installed Java (Download)
JDK (Download)
root on your Nexus 4
a FileManager like ES File Explorer or Root Explorer
your framework-res.apk
some Cmd experience (just a little)
.. and some time/nerves
.. let´s go
Before getting started, make a Nandroid Backup (if you get Bootoop etc)!
The decompliling:
First you need to create a new folder like "C:\apktool". Download Apktool and extract the files to C:\apktool
copy your framework-res.apk to C:\apktool
open Cmd
navigate to your apktool (with "cd C:\apktool")
type in: java -jar apktool.jar if framework-res.apk [enter] (...installation of your framework)
type in: java -jar apktool.jar d framework-res.apk [enter]
finished!
Now you should have a new folder named framework-res. That´s your decompiled framework-res.apk.
The customizing of your NavBar height:
Navigate to /res/values
open dimens.xml in your Text-Editor
search the 3 lines which include navigation_bar_height, navigation_bar_height_landscape, und navigation_bar_width
type in your desired dpi number (for default it´s 48dpi)
CAUTION: At width, you should calculate the numeral proportion of the height to the width.
If you got that, save!
The (Re-)compiling:
Cmd (if you have not left it open, you must navigate again to C:\apktool
type in: java -jar apktool.jar b framework-res [enter]
The newly compiled framework-res.apk is located in C:\apktool\framework-res\dist
CAUTION: Copy the META-INF folder and the AndroidManifest.xml from your old framework-res.apk to your newly compiled one! Otherwise you´ll get Bootloop.
Now copy your framework-res.apk with a file manager to /system/framework. After that reboot immediately!
Finished! Have fun with your smaller/higher NavBar.
If there are some question, ask in this thread, I´ll help you as good as possible. Please don´t write me PM´s with support requests.
The "small-print":
Neither XDA-Developers.com, nor me are responible for any damages on your device!
I'm pretty sure this is the same for changing your Navigation Bar white or any color you want?
But instead I think its the navbar.xml that you need to edit correct?
Sent from my Nexus 4 using xda app-developers app
Right. But maybe it's in SysUI.apk, I don't know right now.
~ via Nexus
Flextrick said:
Hello,
In this tutorial I´ll show you how to change the height of your NavBar.
This Tutorial works for any Rom!
Requirements
Text-Editor, e.g. Notepad++
WinRar/WinZip/Bandzip
Apktool (Download)
installed Java (Download)
JDK (Download)
root on your Nexus 4
a FileManager like ES File Explorer or Root Explorer
your framework-res.apk
some Cmd experience (just a little)
.. and some time/nerves
.. let´s go
Before getting started, make a Nandroid Backup (if you get Bootoop etc)!
The decompliling:
First you need to create a new folder like "C:\apktool". Download Apktool and extract the files to C:\apktool
copy your framework-res.apk to C:\apktool
open Cmd
navigate to your apktool (with "cd C:\apktool")
type in: java -jar apktool.jar if framework-res.apk [enter] (...installation of your framework)
type in: java -jar apktool.jar d framework-res.apk [enter]
finished!
Now you should have a new folder named framework-res. That´s your decompiled framework-res.apk.
The customizing of your NavBar height:
Navigate to /res/values
open dimens.xml in your Text-Editor
search the 3 lines which include navigation_bar_height, navigation_bar_height_landscape, und navigation_bar_width
type in your desired dpi number (for default it´s 48dpi)
CAUTION: At width, you should calculate the numeral proportion of the height to the width.
If you got that, save!
The (Re-)compiling:
Cmd (if you have not left it open, you must navigate again to C:\apktool
type in: java -jar apktool.jar b framework-res [enter]
The newly compiled framework-res.apk is located in C:\apktool\framework-res\dist
CAUTION: Copy the META-INF folder and the AndroidManifest.xml from your old framework-res.apk to your newly compiled one! Otherwise you´ll get Bootloop.
Now copy your framework-res.apk with a file manager to /system/framework. After that reboot immediately!
Finished! Have fun with your smaller/higher NavBar.
If there are some question, ask in this thread, I´ll help you as good as possible. Please don´t write me PM´s with support requests.
The "small-print":
Neither XDA-Developers.com, nor me are responible for any damages on your device!
Click to expand...
Click to collapse
Thanks dude!
"CAUTION: At width, you should calculate the numeral proportion of the height to the width."
What's the scale? I set 36dpi both on height and landsape_hight, what's the width should I do? And I want the background of navigation to more smaller...
First of all, please delete fullquote Second: Proportion is like 48:42=36:x (x is width, just calculate). And third: Which background do you mean?
~ via Nexus
Hello,
if somebody is interested: I built a graphical Apktool for easier modding. Check it out: http://forum.xda-developers.com/showthread.php?t=2326604
~ via Nexus
I am attempting this but its not working.
I have apktool, java, and JDK installed.
When I run the commands I get this...
Code:
c:\apktool>java -jar apktool.jar if framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01080294 drawable/ic_ab_back_holo_dark, config=-xhdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:384)
at brut.androlib.Androlib.installFramework(Androlib.java:365)
at brut.apktool.Main.cmdInstallFramework(Main.java:193)
at brut.apktool.Main.main(Main.java:69)
c:\apktool>java -jar apktool.jar d framework-res.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x01080294 drawable/ic_ab_back_holo_dark, config=-xhdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
c:\apktool>
Any help would be great.
Or if someone wants to set my dpi to 24 that would be great as well. 24/24/24
framework-res.apk
Hello, I see. Maybe you should try this one here: http://forum.xda-developers.com/showthread.php?t=1755243
I created an AndroidApktool, which makes it easier to mod your files: http://forum.xda-developers.com/showthread.php?t=2326604
It helps you in this Tutorial much, too.
How do you move the old META-INF folder and AndroidManifest.xml into the new apk after it's already compiled?
With WinRar or 7zip etc.
I followed every step and I end up with same as paperecho, empty framework-res folder.
Do you get the same error as he?
Is it possible to set the alignment of the softkeys to the left side (especially for the Nexus 7/10)?
Thanks in advance
Sent from my Nexus 4 using xda premium
It's possible for sure, but I don't know how. Ive got no experience with tablets, sorry.
I'm also finished with empty folder framework-res..
Maybe you guys should download the newest apktool version and replace it with the one in my folder. I think this should solve your problem
Does anyone know what values they use to make the softkeys stay vertical when the phone is in landscape mode? I'm trying to do that with my tablets. Thanks
Works Great Nexus 4 and Nexus 10 Kitkat
In Android L, it didn't work in type in "java -jar apktool.jar if framework-res.apk" & "java -jar apktool.jar d framework-res.apk"...

Categories

Resources