Android OS Forum banner

[MOD] [4.1.1] Jelly Bean Soft Key Mods with Menu and Search (Stock/BB)

71K views 159 replies 66 participants last post by  Brion1 
#1 · (Edited by Moderator)
Here are some soft key mods for Jelly Bean. On the versions without Recent Apps, long pressing Home brings up Recent Apps. Long pressing Search brings up Voice Search on all.

NOTE: These mods were made for stock Toro Jelly Bean (based on the first release of Bugless Beast which had a stock System UI) when JB was first released (and there were not ROMS with nav bar customizations). They have not been updated since then, meaning further updates to JB may have broken these. Flash at your own risk.

4.1.1
Based on the Bugless Beast LTE JB Rom (which has a stock SystemUI):

Back - Home - Recent - Menu
Back - Home - Recent - Menu (w/ Circle Battery)
Back - Home - Recent - Menu (w/ 1% Fat Battery) credit: Jimmi3_T

Back - Recent - Home - Search - Menu
Back - Recent - Home - Search - Menu (w/ Circle Battery)
Back - Recent - Home - Search - Menu (w/ 1% Fat Battery) credit: Jimmi3_T

Back - Search - Home - Recent - Menu (w/ Circle Battery)
Back - Search - Home - Recent - Menu (w/ 1% Fat Battery) credit: Jimmi3_T

Search - Back - Home - Recent - Menu (w/ Circle Battery)
Search - Back - Home - Recent - Menu (w/ 1% Fat Battery) credit: Jimmi3_T

Back - Home - Menu - Search (w/ Circle Battery) credit: biz79
Back - Home - Menu - Search (w/ 1% Fat Battery) credit: Jimmi3_T

More to come eventually.

4.1 Leak
Based on the "stock" leaked JB SystemUI and should work on any ROM that hasn't modified it.
Note: These may also work on 4.1.1 but flash at your own risk.

Back - Home - Recent - Menu
Back - Home - Recent - Menu (w/ Circle Battery)

Back - Home - Search - Menu
Back - Home - Search - Menu (w/ Circle Battery)

Back - Home - Menu - Search
Back - Home - Menu - Search (w/ Circle Battery)

Menu - Back - Home - Recent
Menu - Back - Home - Recent (w/ Circle Battery)

Back - Recent - Home - Menu - Search
Back - Recent - Home - Menu - Search (w/ Circle Battery)

Back - Recent - Home - Search - Menu
Back - Recent - Home - Search - Menu (w/ Circle Battery)

Back - Home - Recent - Search - Menu
Back - Home - Recent - Search - Menu (w/ Circle Battery)

Menu - Back - Home - Search - Recent
Menu - Back - Home - Search - Recent (w/ Circle Battery)

Stock (Revert)

Flash in CWM/TWRP and Enjoy!

I will not be making anymore variations, so please no more requests. If you would like an order that isn't here, see the post below with the Do-It-Yourself guide.
If you do make your own, please post it, I will add it to the OP and credit you!

For different colors and/or styles of softkeys, see this thread. Installing these will not affect this mod.

For just the 1% Circle Battery Mod, click here

Special thanks to Bouchigo for help with the mod.





 
See less See more
3
#2 · (Edited by Moderator)
For a complete step by step guide for this mod, see here: http://rootzwiki.com/topic/30278-how-to-step-by-step-guide-to-add-menu-and-search-soft-keys/

Guide to DIY SoftKey Order:

Note: This guide assumes you can already decompile and compile apks. There are plenty of guides and tools on here, xda, and the rest of the internet to get you setup for this. I personally use APKManager with the newest JellyBean SDK components.

Adding the Menu and/or Search softkey has two main parts - modifying xml to add them to the nav bar, and modifying smali code to actually make them do something. The smali edits are a bit advanced so I will not be covering them here, however you don't need to worry about that because its already done in the apk's above.

1. Download one of the zips above (closest to the order you want) and decompile SystemUI.apk from within it. (If you also want the circle battery, grab one with the battery mod)

2. Open res/layout/navigation_bar.xml. You will see four main LinearLayout sections. The first specifies the key layout in portrait from left to right, and the second specifies the same thing but in lights out mode (camera, gallery, etc). The third specifies the key layout in landscape from top to bottom, and the fourth again the same lights out layout.

3. Here is a the XML of the first section for Back - Recent - Home - Search - Menu:
Code:
<br />
<br />
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true"><br />
	<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /><br />
	<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" /><br />
	<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /><br />
	<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" /><br />
	<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /><br />
	<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" /><br />
	<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /><br />
	<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/search" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_search" android:layout_weight="0.0" android:contentDescription="@string/accessibility_search" systemui:keyCode="84" systemui:glowBackground="@drawable/ic_sysbar_highlight" /><br />
	<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /><br />
	<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" /><br />
	<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /><br />
</LinearLayout><br />
<br />
The lines that start with "<View..." are the spacers between the keys, and the lines that start with "<com.android.systemui...." are the actual keys (with the id and keycode properties specifying which key they are).

4. To reorder the keys, all you need to do is switch the order of the xml lines. So, if you wanted to switch the above to Back - Menu - Home - Search - Recent, you would put the line with =@id/menu where the line with =@id/recent_apps is, and vice versa.

5. Do this same thing in the third section so your landscape layout is also changed.

6. If you want to remove a key, do not just delete the line! Instead, set the width and height properties to "0.0dip". I suggest moving it to the bottom of the list as well, just to get it out of the way.
Example:
Code:
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/search" android:layout_width="0.0dip" android:layout_height="0.0dip" android:src="@drawable/ic_sysbar_search" android:layout_weight="0.0" android:contentDescription="@string/accessibility_search" systemui:keyCode="84" systemui:glowBackground="@drawable/ic_sysbar_highlight" /><br />
Make sure you also update the lights-out section. However here you can just delete the line instead of making it 0 width/height.

7. If you want long-press on that soft key (home and search), add the property systemui:keyRepeat="true" to that button. Set it to false if you want to disable long-press.

8. Save your XML edits, compile the apk, and install it in system/app using the method of your choice (adb, file manager, zip).

9. Enjoy
 
#10 ·
Nice job man!

I used to like pumping out mods too, but I kind of got over it
Glad to see there's still people out there giving everyone options.

Sent from my Galaxy Nexus using RootzWiki
 
#31 ·
Nice mods! I'm currently running a theme (badass black) that modifies SystemUI so flashing your mod obviously removes some of the themed parts. Can you post a tutorial of some sort? I've never had any luck with decompiling and recompiling apks but I'll give it a try because I miss my big menu button dearly! Thanks
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top