Sunday, August 17, 2014

[GUIDE][FIX] HOW TO PORT JB 4.3.1 CARBON ROM 13 BATTERY STYLE

How to port JB 4.3.1 Carbon rom 13 battery style, Hallo droiders, setelah sekian lama ga mosting apa-apa di Blog tercinta ini ane mau ngeshare tutor nih, yaitu HOW TO PORT JB 4.3.1 CARBON ROM 13 BATTERY STYLE inimah big thanks banget buat suhu adi sukahadi, ane ngambil semua bahannya dari ROMnya ASTEDROID, (bisa mampir kesini).
         
Nahh isi dari tutor ini tuh kita bisa ganti style battery seenak jidat, ga pake reboot rebootan, tinggal pilih langsung ke ganti dah, langsung aja yah :

Bahan-bahannya :
  1. APK MULTI TOOLS, APK TOOLS, alat untuk compile/decompile lainnya.
  2. SystemUI.apk.
  3. Niat. 
Langkah-langkahnya :
  • Decompile SystemUI.apk.
  • Download Bahan ini, ekstrak lalu taroh di tempatnya.
  • Buka values/ids.xml lalu tambahkan :
<item type="id" name="circle_battery_carbon">false</item>
    <item type="id" name="battery_stock">false</item>
    <item type="id" name="battery_stock_text">false</item>
    <item type="id" name="battery_cluster_view">false</item>
    <item type="id" name="battery_combo">false</item>
    <item type="id" name="battery_text_cm">false</item>
    <item type="id" name="battery_text_center">false</item>
    <item type="id" name="battery_text_only">false</item>
    <item type="id" name="battery_text_only_low">false</item>
    <item type="id" name="battery_text_only_plugged">false</item>
    <item type="id" name="battery_cluster">false</item>
  • Buka strings.xml lalu tambahkan :
<string name="carbon_accessibility_battery_level">Battery %d percent.</string>
    <string name="carbon_status_bar_settings_battery_meter_format">%d%%</string>
  • Masih di folder yg sama, buka styles.xml , lalu tambahkan :
<style name="TextAppearance.StatusBar.BatteryTextOnly" parent="@*android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">16.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@*android:color/holo_blue_light</item>
    </style>
    <style name="TextAppearance.StatusBar.BatteryTextOnly_Plugged" parent="@*android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">16.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@*android:color/holo_green_light</item>
    </style>
    <style name="TextAppearance.StatusBar.BatteryTextOnly_Low" parent="@*android:style/TextAppearance.StatusBar.Icon">
        <item name="android:textSize">16.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:textColor">@*android:color/holo_red_light</item>
    </style>
    <style name="Battery_Offset">
        <item name="android:textSize">11.0dip</item>
        <item name="android:textStyle">bold</item>
        <item name="android:layout_gravity">bottom|left|center</item>
        <item name="android:paddingBottom">1.0dip</item>
        <item name="android:layout_marginRight">4.0dip</item>
        <item name="android:shadowColor">#66ffffff</item>
        <item name="android:shadowDx">0.0</item>
        <item name="android:shadowDy">0.0</item>
        <item name="android:shadowRadius">2.5</item>
        <item name="android:fontFamily">sans-serif-condensed</item>
    </style>
    <style name="Battery_CM">
        <item name="android:textSize">12.0dip</item>
        <item name="android:textStyle">normal</item>
        <item name="android:layout_gravity">bottom|left|center</item>
        <item name="android:paddingBottom">1.0dip</item>
        <item name="android:layout_marginRight">9.5dip</item>
        <item name="android:fontFamily">sans-serif-condensed</item>
    </style>
    <style name="Battery_Center">
        <item name="android:textSize">9.0dip</item>
        <item name="android:textStyle">bold</item>
        <item name="android:layout_gravity">center</item>
        <item name="android:layout_marginRight">0.0dip</item>
        <item name="android:shadowColor">#66ffffff</item>
        <item name="android:shadowDx">0.0</item>
        <item name="android:shadowDy">0.0</item>
        <item name="android:shadowRadius">2.5</item>
        <item name="android:fontFamily">sans-serif-condensed</item>
    </style>
  • Buka layout/status_bar.xml atau gemini_status_bar.xml, lalu lihat line ini
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
  • Lalu ubah android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" menjadiandroid:layout_width="0.0dip" android:layout_height="0.0dip"
  • Lalu tambahkan di atas line tadi, line ini :
<include android:id="@id/battery_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/fiqih_battery_cluster_view" />
  • Sehingga menjadi :
<include android:id="@id/battery_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/fiqih_battery_cluster_view" />
        <ImageView android:id="@id/battery" android:layout_width="0.0dip" android:layout_height="0.0dip" />
  • Recompile SystemUI lalu Decompile lagi
  • Buka public.xml ente (Untuk ngocokin id public bisa donlot public.xml ane disini)
  • Buka CircleBattery.smali lalu cocokan id publicnya dengan id di public xml ente
search di smali                    search di public.xml ente

   0x7f02020c                      <public type="drawable" name="stat_sys_wifi_signal_4_fully"
  • Buka juga SbBatteryController.smali dan cocokan id publicnya dengan id di public xml ente
search di smali                 search di public.xml ente
0x7f020629          <public type="drawable" name="stat_sys_battery_stock_charge"
0x7f0b012d          <public type="string" name="carbon_accessibility_battery_level"
0x7f020457          <public type="drawable" name="stat_sys_battery_charge_altcircle"   0x7f0202be          <public type="drawable" name="stat_sys_battery_altcircle"
0x7f02047b          <public type="drawable" name="stat_sys_battery_charge_square"
0x7f020553          <public type="drawable" name="stat_sys_battery_square"
0x7f0204e2          <public type="drawable" name="stat_sys_battery_gear_charge"
0x7f02047c          <public type="drawable" name="stat_sys_battery_gear"
0x7f020472          <public type="drawable" name="stat_sys_battery_charge_min"
0x7f02054a          <public type="drawable" name="stat_sys_battery_min"
0x7f0203f1          <public type="drawable" name="stat_sys_battery_carbon_charge"
0x7f02038b         <public type="drawable" name="stat_sys_battery_carbon"
0x7f020620         <public type="drawable" name="stat_sys_battery_stock"
0x7f0b012e         <public type="string"name= "carbon_status_bar_settings_battery_meter_format"
0x7f080175         <public type="id" name="battery_combo"
0x7f080172         <public type="id" name="battery_stock"
0x7f080173         <public type="id" name="battery_stock_text"
0x7f080176         <public type="id" name="battery_text_cm"
0x7f080177         <public type="id" name="battery_text_center"
0x7f080178         <public type="id" name="battery_text_only"
0x7f080179         <public type="id" name="battery_text_only_low"
0x7f08017a         <public type="id" name="battery_text_only_plugged"
  • Recompile and Done
  • Download aplikasi Tambahannya disini, dan push ke system/app
  • Doneeeeeeeeee
  • Kalo yg pake HH dan kesusahan kalo harus dari blog, ane siapin tutor dalam XML nih bro, Donlot di mari
  • Kalo ada yg FC biasakan pake Catlog biar tau dimana errornya, bisa liat di Cara memakai CatLog 

SS :



 Big Thanks to :
Allah SWT
Suhu Adi Sukahadi
AOSP
YOU