[ApkTool] [4.x.x] How To Add Dynamic System Bar On Android Device

[ApkTool] [4.x.x] How To Add Dynamic System Bar On Android Device

[ApkTool] [4.x.x] How To Add Dynamic System Bar On Android Device
Hello Guys I'm Showing To You How To Add Dynamic Status Bar & Navigation Bar On Android Kitkat Device Using ApkTool.
New Light Template Documentation
How To Add Dynamic System Bar 

I'm Recommended To You Using ApkTool X v7.3.0+ Android Version Because ApkTool X Is Best Apk For Android Device. ApkTool X is working perfectly. 


Disclaimer : Plz work at your own risk, If your device damage or brick then Rom Claims is not responsible to your complain. 

Requirement Tools :
- ApkTool (Android or PC Version)
- Flashable Zip File
- DSB Resource File
- Notepad++ or Any Text Editor
- Zip Extractor & Creator
- Knowledge For Decompiling & Recompiling


Show More : [ApkTool] [4.4.x] How To Add Android Lollipop Platlogo On Kitkat Device


Download Link :


- Flashable.zip


- DSB Resource File.zip


How To Add Dynamic Status Bar & Nav Bar :

# Settings.apk Edit

Step 01 : Decompile Settings.apk

Step 02 : Go To res/values & Open "Strings.xml" Using Notepad++ & Add This Code Berofe  & Save it.

    <string name="dynamic_system_bars_title">Dynamic system bars</string>
    <string name="dynamic_status_bar_title">Dynamic status bar</string>
    <string name="dynamic_status_bar_summary">Automatically update the background of the status bar</string>
    <string name="dynamic_navigation_bar_title">Dynamic navigation bar</string>
    <string name="dynamic_navigation_bar_summary">Automatically update the background of the navigation bar</string>
    <string name="dynamic_system_bars_gradient_title">System bar gradient</string>
    <string name="dynamic_system_bars_gradient_summary">Overlay a gradient on the system bars</string>
    <string name="dynamic_status_bar_filter_title">Darker status bar</string>
    <string name="dynamic_status_bar_filter_summary">Overlay a darkening filter on the status bar</string>

Step 03 : Go To res/xml & open "display_settings.xml" Using Notepad++ & Add This Code Wherever You Want.

   <PreferenceScreen android:title="Dinamic Status Bar" android:fragment="com.android.settings.oplosandev.DSBSettings" />

Example :

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen android:title="@string/display_settings"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
    <com.android.settings.BrightnessPreference android:persistent="false" android:title="@string/brightness" />
    <PreferenceScreen android:title="@string/wallpaper_settings_title" android:key="wallpaper" android:fragment="com.android.settings.WallpaperTypeSettings" />
    <CheckBoxPreference android:title="@string/accelerometer_title" android:key="accelerometer" />
    <ListPreference android:persistent="false" android:entries="@array/screen_timeout_entries" android:title="@string/screen_timeout" android:key="screen_timeout" android:summary="@string/screen_timeout_summary" android:entryValues="@array/screen_timeout_values" />
    <PreferenceScreen android:title="Dinamic Status Bar" android:fragment="com.android.settings.oplosandev.DSBSettings" />
 <PreferenceScreen android:title="@string/screensaver_settings_title" android:key="screensaver" android:fragment="com.android.settings.DreamSettings" />
    <com.android.settings.flipfont.FontListPreference android:title="@string/monotype_preference_title" android:key="MONOTYPE" android:summary="@string/monotype_preference_summary" />
    <com.android.settings.WarnedListPreference android:entries="@array/entries_font_size" android:title="@string/title_font_size" android:key="font_size" android:summary="@string/summary_font_size" android:dialogTitle="@string/dialog_title_font_size" android:entryValues="@array/entryvalues_font_size" />
    <CheckBoxPreference android:persistent="false" android:title="@string/notification_pulse_title" android:key="notification_pulse" />
    <PreferenceScreen android:title="@string/wifi_display_settings_title" android:key="wifi_display" android:fragment="com.android.settings.wfd.WifiDisplaySettings" />
</PreferenceScreen>

Step 04 : Now Copy "Settings_res" Folder From "DSB Resource File" & Past Decompile Settings_res.apk folder Under.


Step 05 : Recompile "Setting_res.apk" & Decompile Again.


Step 06 : Go To res/values Folder & Open Public.xml File & Search This Code

<public type="xml" name="dsb_settings"

Step 07 : Now Open "DSBSettings.smali" From smali/com/android/settings/romclaims/ Folder & Search 0x7f050071 & replace it with "dsb_settings" id="code" this code & Save it.


Step 08 : Recompile, sing & Past system/priv-app folder under.


#SystemUI.apk Edit

Step 01 : Decompile SystemUI.apk

Step 02 : Go To smali/com/android/systemui/statusbar/phone Folder & Open "PhoneStatusBarTransitions.smali" Using Notepad++


Find This Code:

# instance fields

Add Above

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$1;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$GradientObserver;,
        Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable;
    }
.end annotation

Find This Code:

.method public constructor (Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V

Replace With

.method public constructor (Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
    .locals 4
    .parameter "view"

    .prologue
    const/4 v3, 0x1

    .line 47
    new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable;

    invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackgroundDrawable;->(Landroid/content/Context;)V

    invoke-direct {p0, p1, v1}, Lcom/android/systemui/statusbar/phone/BarTransitions;->(Landroid/view/View;Lcom/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable;)V

    .line 48
    iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions;->mView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    .line 49
    iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions;->mView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;

    invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 50
    .local v0, res:Landroid/content/res/Resources;
    const v1, 0x7f0b002b  #type="dimen" name="status_bar_icon_drawing_alpha"

    invoke-virtual {v0, v1, v3, v3}, Landroid/content/res/Resources;->getFraction(III)F

    move-result v1

    iput v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarTransitions;->mIconAlphaWhenOpaque:F

    .line 51
    return-void
.end method
Skip This Step If in Your have it.

Step 03 : Go To res/values Folder & Open "dimens.xml" Using Notepad++ & Add This Code Before & Save it.

    <item type="dimen" name="status_bar_icon_drawing_alpha">75.0%</item>

Step 04 : Open "colors.xml" & Add This Code Before & Save it.

    <color name="status_bar_background_opaque">#ff000000</color>
    <color name="status_bar_background_semi_transparent">#66000000</color>

Step 05 : Open "intergers.xml" & Add This Code Before & Save it.

    <integer name="dsb_transition_duration">500</integer>

Step 06 : Now Copy "SystemUI_res" Folder From "DSB Resource File" & Past Decompile SystemUI_res.apk folder Under.


Step 07 : Recompile & Decompile Again & Search This Code & Replace With smali/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions$PhoneStatusBarBackground Drawable.smali This.


Find From "colors.xml"


    const v1, 0x7f07000a  #type="color" name="status_bar_background_opaque"
    const v3, 0x7f07000b  #type="color" name="status_bar_background_semi_transparent"

Find From "drawables.xml"


    const v4, 0x7f0201dd  #type="drawable" name="status_background"

Replace This Code With smali/com/android/systemui/statusbar/phone/BarTransitions$BarBackgroundDrawable.smali


Find From "integers.xml"


 const v1, 0x7f090015  #type="integer" name="dsb_transition_duration"

Step 08 : Recompile, Sing & make flashable.zip file & flash it using recovery. 


Credit : 
- Rom Claims
- S M Nahid Emon 
- Mediatek Art and Dev 
- XDA Developer 
- Github
Android Apk Modifying Tips & Tricks

1 Response to "[ApkTool] [4.x.x] How To Add Dynamic System Bar On Android Device"

  1. plz publish a articel with full tutorial that how to add flyme statsber on any rooted andriod ..

    Thanks

    ReplyDelete
375/5000
A Note for Entrepreneurs
  • Please leave a trace in accordance with the title of the article.
  • Not allowed to promote goods or sell.
  • Do not include active links in comments.
  • Comments with active links will be automatically deleted.
  • Comment well, your personality reflects when commenting.

Top Ad Articles

Middle Ad Article 1

Middle Ad Article 2

Advertise Articles