Tuesday, September 3, 2013

[GUIDE][HOW-TO] Mod Flyme OS Status Bar

  Screenshot taken from Flyme OS port , not from moded systemui **

Hello MIUIers ..
In this thread i have showed you that how to mod systemui which looks like flyme os systemui for your rom ..
it's simple ... and by this guide your doubts will be solved , also its good for newbie also .


So , What you need ?
-> Apktool

-> Notepad ++
-> Basic Compiling And Decompiling Knowledge
-> apks from your ROM
-> A active mind that can work and follow with this guide


Here you go , get ready and take a long breath and start developing


First , pull systemUI.apk  in the folder system / app and  framework-res.apk and SemcGenericUxpRes.apk in system / framework into apktool's folder
Now you will get apks that you need ...

Run apktool Command Prompt (.batch) and install framework files and systemui that you are gonna to mod ..

type :
apktool if framework-res.apk
then press enter

then type
apktool if SemcGenericUxpRes.apk
then press enter

then type (For Stock or Stock based firmare)
apktool if SystemUI.apk
or
(For MIUI firmware)
apktool if MiuiSystemUI.apk
So, you have installed all the apks

Now, you need to decompile systemui
Type this to decompile
apktool d  SystemUI.apk
or
apktool d MiuiSystemUI.apk
Okay , you have decompiled systemui !

Get Ready to mod ....

Open Status_bar.xml from SystemUI/res/layout/ or MiuiSystemUI/res/layout/

Now compare this code with your .xml
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:background="@drawable/statusbar_costum_background" android:focusable="true" android:fitsSystemWindows="true"  android:descendantFocusability="afterDescendants"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
    <LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
                <ImageView android:gravity="left|center" android:id="@id/carrier_logo_id" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/carrier_logo" android:scaleType="fitCenter" android:adjustViewBounds="true" />
                <LinearLayout android:orientation="vertical" android:paddingLeft="6.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
            <LinearLayout android:gravity="right" android:paddingRight="3.0dip" android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
                                <com.android.systemui.statusbar.phone.IconPartitioner android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
                                        <com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
                                        <com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
                                </com.android.systemui.statusbar.phone.IconPartitioner>
                                <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textSize="16.0dip" android:gravity="left|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
                        </LinearLayout>
            <LinearLayout android:paddingRight="3.0dip" android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
                <LinearLayout android:gravity="right" android:layout_width="fill_parent" android:layout_height="fill_parent">
                                        <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
                                        <ImageView android:layout_gravity="center_vertical" android:id="@id/stat_no_sim" android:background="@drawable/stat_sys_no_sim" android:paddingLeft="2.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                                        <com.android.systemui.statusbar.policy.Traffic android:textAppearance="@style/TextAppearance.StatusBar.Traffic" android:gravity="left|center" android:id="@id/traffic" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="2.0dip" android:singleLine="true" />
                                        <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
                                                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                                                <TextView android:layout_gravity="left|center" android:id="@id/name_carrier_id" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/carrier_name_abal" android:singleLine="true" style="@style/StatusBarNotificationText" />
                                                <TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:visibility="gone" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
                                                <ImageView android:id="@id/battery" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
                                        </LinearLayout>
                                </LinearLayout>
                        </LinearLayout>       
                </LinearLayout>       
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
        <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
            <com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
        </ImageSwitcher>
        <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
            <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
        </com.android.systemui.statusbar.phone.TickerView>
    </LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Next,
open folder SystemUI\smali\com\android\systemui\statusbar\policy or MIuiSystemUI\smali\com\android\systemui\statusbar\policy
copy and paste
Traffic$1.smali
Traffic$2.smali
Traffic$3.smali
Traffic$SettingsObserver.smali
Traffic.smali

Now,
open open ids.xml in folder SystemUI/res/value/ids.xml or MiuiSystemUI/res/value/ids.xml
add this code :-
  <item type="id" name="traffic">false</item>
    <item type="id" name="carrier_logo_id">false</item>
    <item type="id" name="name_carrier_id">false</item>
This is hide Traffic Icon , Carrier Logo and Carrier Name

add this code above  </resources>
it should look like this :
<item type="id" name="traffic">false</item>
    <item type="id" name="carrier_logo_id">false</item>
    <item type="id" name="name_carrier_id">false</item>
</resources>
Now, open strings.xml  in folder SystemUI/res/value/strings.xml or MiuiSystemUI/res/value/strings.xml
and add this code just above </resources> :
<string name="carrier_name_abal">Write Your Text Here !</string>
this will add custom carrier name : Replace your text with "Write Your Text Here !"

Okay , now open styles.xml  in folder SystemUI/res/value/styles.xml or MiuiSystemUI/res/value/styles.xml
And add this code just above </resources>  :
<style name="TextAppearance.StatusBar.Traffic" parent="@*android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">14.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">#ffffffff</item>
    </style>
This will design your systemui look like Flyme OS

And Now you just need to add custom carrier logo
open folder SystemUI\res\drawable-hdpi or MiuiSystemUI\res\drawable-hdpi and paste your logo and rename it to carrier_logo.png

So, you have done moding with SystemUI
now you need to recompile it

Run apktool and enter this code :
apktool b SystemUI
press enter and it will now recompile
now open the moded systemui and original systemui , you need to now sign the apks
so copy META-INF and AndroidManifest.xml from original apk and paste it into your moded apk
and set compresstion : Store
So the things with systemui is done !

Now lets start to mod framework

So, Decompile framework
Run apktool and enter this code :
apktool d framework-res.apk
and open dimens.xml

and find
<dimen name="status_bar_height">25.0dip</dimen>
and replace with this :
<dimen name="status_bar_height">40.0dip</dimen>
Again, find this code :
<dimen name="status_bar_icon_size">25.0dip</dimen>
and replace with this :
<dimen name="status_bar_icon_size">30.0dip</dimen>
This moding will change the systemui icon size

So, this only thing you need to do with framework now recompile it

Run apktool and enter this code :
apktool b framework-res
press enter and it will now recompile
now open the moded framework and original framework , you need to now sign the apks
so copy META-INF and AndroidManifest.xml from original apk and paste it into your moded apk
and set compresstion : Store

DONE !!
Now you have succesfully moded Flyme OS systemui for your ROM

Now just push it in our device !

I Hope you have Sucesfully Done

Credits :
                                        zie.do2y for the guide

admin

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.
unsecured loans mortgage us bank mortgage rates business plan auto insurance quote online auto loans mortgage refinance holiday insurance company personal loans auto accident financial business opportunitues management accounting canon camera dell laptops toshiba hp pavillion laptop deals. investment opportunities immigration lawyers insurance coverages data recovery denver data recovery los angeles student loans. conference calling companies loan consolidation rates los angeles criminal defense attorney car insurance online lung asbestos affordable insurance home refinance term insurance quotes samsung android nokia android phone sony android iphone 5 new iphone samsung galaxy sony experia iphone air hp laptop dell laptop sony laptop asus laptop hp pavillion dell inspiron touch screen ultrabox cheap laptop best laptop hd laptop android mobile phones tecno android phones android smart phones virgin mobile android phones android tablet best android tablet pc 10 inch android tablet android tablet computer capacitive touch android tablet verizon iphone 4 discount laptops computer laptops best laptops for college students laptops notebooks lenovo laptops ideapad acer laptops touchscreen laptops computers apple laptops best buy laptops laptops reviews business laptops ultrabooks laptops computers tablets cheap mini laptops toshiba laptops best buy sony vaio laptops best buy best small business laptops buy global business opportunities small business opportunities business opportunities online business opportunities internet business opportunities mortgage and insurance business career opportunities candidates job business exact

 

Copyright @ 2013 Droid Area.