[Android General] :
Before starting let me clear that this is not my work ! I'm here to share the knowledge and information to much wider audience. :angel:​

Thanks to the Charles' Guide of porting till 7.1.1 HERE

Thanks to [MENTION=7919806]ginger_evil[/MENTION] , he helped me porting this on Android 7.1.2
​

Lets Get Started

Note :- This only works for CM/AOSP based Roms. Though you can try on any ROM :p

Tools Needed : APKtool

If you are on odexed ROM you need Baksmali tool too. It is explained in Charles' tutorial so i wont touch this topic​

Step 1 Decompile your ROM's SystemUI.apk

apktool d SystemUI.apk

Step 2 Extract the Pixel-XX-7.1.2 zip in attachment.

Step 3 Copy/Replace every file in it with your decompiled SystemUI files.

Step 4 Open SystemUI\res\values\dimens.xml and add this code at the end before "</resources>".

<dimen name="halo_inner_radius">10.0dip</dimen>
<dimen name="halo_thickness">1.0dip</dimen>
<dimen name="halo_diameter">22.0dip</dimen>
<dimen name="opa_dot_diam">10.0dip</dimen>
<dimen name="opa_diamond_translation">16.0dip</dimen>
<dimen name="opa_line_y_translation">16.0dip</dimen>
<dimen name="opa_line_x_trans_ry">15.0dip</dimen>
<dimen name="opa_line_x_trans_bg">30.0dip</dimen>
<dimen name="opa_line_x_collapse_bg">46.0dip</dimen>
<dimen name="opa_line_x_collapse_ry">15.0dip</dimen>
<dimen name="opa_overshoot_translation">8.0dip</dimen>
<dimen name="opa_return_translation">-1.0dip</dimen>
<dimen name="opa_rest_to_collapse">7.0dip</dimen>

Step 5 Open SystemUI\res\values\id.xml and add this code before "</resources>".

<item type="id" name="red">false</item>
<item type="id" name="blue">false</item>
<item type="id" name="green">false</item>
<item type="id" name="yellow">false</item>
<item type="id" name="white">false</item>
<item type="id" name="home_button">false</item>
<item type="id" name="halo">false</item>

Step 6 Open SystemUI\res\values\styles.xml and add this code before “</resources> ”.

<style name="DotStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_centerHorizontal">true</item>
<item name="android:layout_centerVertical">true</item>
</style>

Step 7 Open SystemUI\res\xml\tuner_prefs.xml and search for

<Preference android:title="@string/nav_bar" android:key="nav_bar" android:fragment="com.android.systemui.tuner.NavBarTuner" />

if it is present there, skip this step, if not add this code before

<Preference android:title="@string/other" android:key="other" android:fragment="com.android.systemui.tuner.OtherPrefs" />

if you cant even find this line, skip this step.

Step 8 Now compile SystemUI.

apktool b SystemUI -c

Step 9 Go to SystemUI/dist/ You'll find the SystemUI.apk, this is the modded apk. Rename it to SystemUImod.apk and copy it in apktool folder.

Step 10 Now Decompile SystemUImod.apk

apktool d SystemUImod.apk

THE TRICKY PART

​

Step 11 Open \SystemUIGoogle\res\value\public.xml and search for

IN DIMEN

<public type="dimen" name="halo_inner_radius" id="0x7f1002a1" />
<public type="dimen" name="halo_thickness" id="0x7f1002a2" />
<public type="dimen" name="halo_diameter" id="0x7f1002a3" />
<public type="dimen" name="opa_dot_diam" id="0x7f1002a4" />
<public type="dimen" name="opa_diamond_translation" id="0x7f1002a5" />
<public type="dimen" name="opa_line_y_translation" id="0x7f1002a6" />
<public type="dimen" name="opa_line_x_trans_ry" id="0x7f1002a7" />
<public type="dimen" name="opa_line_x_trans_bg" id="0x7f1002a8" />
<public type="dimen" name="opa_line_x_collapse_bg" id="0x7f1002a9" />
<public type="dimen" name="opa_line_x_collapse_ry" id="0x7f1002aa" />
<public type="dimen" name="opa_overshoot_translation" id="0x7f1002ab" />
<public type="dimen" name="opa_return_translation" id="0x7f1002ac" />
<public type="dimen" name="opa_rest_to_collapse" id="0x7f1002ad" />

IN ID

<public type="id" name="red" id="0x7f1200c9" />
<public type="id" name="blue" id="0x7f1200ca" />
<public type="id" name="green" id="0x7f1200cb" />
<public type="id" name="yellow" id="0x7f1200cc" />
<public type="id" name="white" id="0x7f1200cd" />
<public type="id" name="home_button" id="0x7f1200ce" />
<public type="id" name="halo" id="0x7f1200cf" />

IN DRAWABLE

<public type="drawable" name="halo" id="0x7f020073" />
<public type="drawable" name="ic_sysbar_opa_blue" id="0x7f02012d" />
<public type="drawable" name="ic_sysbar_opa_green" id="0x7f02012e" />
<public type="drawable" name="ic_sysbar_opa_red" id="0x7f02012f" />
<public type="drawable" name="ic_sysbar_opa_yellow" id="0x7f020130" />

IN STYLE

<public type="style" name="DotStyle" id="0x7f13022b" />

Copy Them Somewhere. Don't Worry If Your IDs Doesn't Match Mine.

Step 12 open SystemUI\smali\com\google\android\systemui\OpaLayout.smali with sublime text or notepad++.

IMAGE :-

HERE

Now For Example in the above image the id of "red" is "0x7f1202cd". Search for "0x7f1202cd" in OpaLayout.smali and replace this id with Your red's id (Remember you copied it somewhere).

Do The Same For All The IDs.

Step 13 Recompile SystemUImod

apktool b SystemUImod -c

You'll get the file in SystemUImod/dist/SystemUImod.apk

Rename It - SystemUI.apk

Copy to Device - /system/priv-app/SystemUI/

Reboot And Enjoy