[Xperia Z2 Q&A, Help & Troubleshooting] moonryder:
This is a pretty simple modification. XDA and some devs taught me many things and helped me a lot in the past.

So this is the possibility for me to give a little knowlegde back to XDA and some of its members.

Maybe the one or other find it useful.

Long time ago i was on Custom Roms like Slim or omnirom. In these Roms there are many customisation options also for the navbar softbuttons. But i miss this feature in Stock Roms and i got used to it.

For all compiling stuff i recommend Advanced ApkTool v4.1.0[Windows] from the great [MENTION=5078388]BDFreak[/MENTION]

Let´s go.

1) Download SystemUI.apk, framework-res.apk and SemcGenericUxpRes.apk to your computer

2) decompile SystemUI.apk

3) ) Modify SystemUI\res\layout\navigation_bar.xml with a texteditor of your choice

<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">
<FrameLayout android:layout_width="@dimen/navigation_side_padding" android:layout_height="fill_parent" android:layout_weight="0.0">
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu_left" android:visibility="invisible" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_power" android:scaleType="centerInside" android:contentDescription="@string/accessibility_menu" android:layout_marginStart="0.0dip" systemui:keyCode="26" />
</FrameLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:scaleType="centerInside" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/dpad_left" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_dpad_left" android:scaleType="centerInside" android:layout_weight="1.0" android:contentDescription="@string/accessibility_dpad_left" systemui:keyCode="21" systemui:keyRepeat="true" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:scaleType="centerInside" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/dpad_right" android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_dpad_right" android:scaleType="centerInside" android:layout_weight="1.0" android:contentDescription="@string/accessibility_dpad_right" systemui:keyCode="22" systemui:keyRepeat="true" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:scaleType="centerInside" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" />
<FrameLayout android:layout_width="@dimen/navigation_side_padding" android:layout_height="fill_parent" android:layout_weight="0.0">
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="end" android:id="@id/menu" android:visibility="invisible" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:scaleType="centerInside" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" />
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="end" android:id="@id/ime_switcher" android:visibility="invisible" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_ime_switcher_default" android:scaleType="centerInside" android:contentDescription="@string/accessibility_ime_switch_button" />
</FrameLayout>
</LinearLayout>

4) Save navigation_bar.xml

5) recompile SystemUI.apk (only recomile)

6) sign SystemUI.apk

7) copy this apk into the attached zip in system/priv-app/SystemUI folder (don´t extract the zip, just copy it in there)

8) make a nandroid backup (saftey first) or create another zip with the original SystemUI.apk

9) flash it in recovery.

Done.