How to Change the Size of Navigation Bar on Nexus 4 - Guide

Some people consider that the size of navigation bar on Nexus 4 is too big, but there is no such option to change the size of navigation bar in stock Android, some custom roms allow user to change it or hidden it, but if you don’t want to change your rom, here is a method of Changing the Size of Navigation Bar on Nexus 4.

Smaller navigation bar on Nexus 4
Nexus 4 Nav bar Comparisons

Remember, to avoid the risk of losing your data, you’d better backup all the important things first.

This method needs some code operations but those are simple. Before doing the jog, you need to download two software.

1.Apktool, it is aviliable at here. Just download the file “apktool.jar” in a directory like “Apktool”.
2.Java SE Development Kit(JDK 1.7 or later), you can download it from here.

Phone root permission is required, also you need a source code editor(Do not use windows notepad!), Notepad++ for example, a zip software, WinRAR will be a good one.

OK, maybe it takes a couple minutes for all things complete their installation, I can wait…Actually, this method should work for all the Android 4.2 & Android 4.3 systems on any phone with Navigation Bar, and all you need to do is modify the frames-res.apk file. You may ask why not just hide the navigation bar and use those float menu tool like the Pie control, my answer is, none of them has better efficiency than the stock navigation bar.

Enough talking, let’s begin the magic. 🙂
1. Use file manager to make a copy of the file “framework-res.apk” and send it to the Apktool directory on your computer which was created several minutes before. framework-res.apk is located directory “/system/framework/” in your Nexus 4 phone system.
nav bar size nexus 4 step1

2. Open a Command Console in current window, for Windows users, you can hold the shift key and press right button of the mouse, select “Open a Command Console here” in the menu.
-a. Enter this command in Command window without quotation marks: java -jar apktool.jar if framework-res.apk
Wait until it let you enter command again.
-b. Enter this command: java -jar apktool.jar d framework-res.apk, this one may take over a minute, just wait until it ready to accept another command. Now we left the command console window alone, DO *NOT* close it. ( fine, if you close it by a mistake, just do over the step 2.)
nav bar size nexus 4 step2

3. Now you should notice a new directory named “framework-res” shows up, great job, now find the “dimens.xml” in this path: “framework-res\res\values\”, use your code editor to open it, you should see three line:
nav bar size nexus 4 step3
The first line is the size of navigation bar in normal status, the second line is for tablet mode, the third line is the width of navigation bar on phone landscape mode.
I used to change it to 36.0, 36.0, 32.0, those size have been tested, not too small to touch while saving the screen space.
nav bar size nexus 4 step4
I suggest do not use a value less than 30 for the normal status.

4. Victory is ahead, switch to the command console window we opened before, type this command: java -jar apktool.jar b framework-res, construct the new resources base on the value change. when it finish building, close the window.

5. Rename the framework-res.apk to, if you can’t see the file extension “.apk”, uncheck the option “hide the known file type extensions” in the folder option (Windows users). open the file by winRAR or other zip manager. go to the directory “Apktool\framework-res\build\apk\”, drag and drop the “resources.arsc” file in the and overwrite it.
nav bar size nexus 4 step5

6. Rename the back to framework-res.apk, send it to your phone’s storage, copy it to the /system directory, then change its permission and group to the same as the original one, then move it to /system/framewok/ directory and overwrite the original one. Now, phone will do a soft reboot, and you should see a small navigation bar after system boot up.

If you want to try a different size, use the original framework-res.apk to modify, DO NOT use the modified ones.
Warning: One ROM One framework-res.apk, DO NOT use the one which is not came from your current system.

It is a pity that the CyanogenMod team has removed the feature of changing the size of navigation bar for the reason that the original size(48dip) of navigation bar is in accordance with the Android design guideline, we are looking forward that Google create better things to replace the current visual button.

Update 2014.3.6: updated the apktool download link, test again with the latest CM11 (Android 4.4.2), all things working fine.

Taggs: , , .
Posted in Android How to, Android Share, Nexus 4