XtGem Forum catalog
TUT Hướng dẫn Mod Stt3 4 dòng từ A-Z

TUT Hướng dẫn Mod Stt3 4 dòng từ A-Z

26-06-2016 bởi Hoàng Đức

TUT Hướng dẫn Mod Stt3 4 dòng từ A-Z

Bài viết này mình xin để nguồn bạn Hoàng Đức, đây là TUT của bạn ý mod stt3 4 dòng cực chuẩn, có rung và chuông, rất chi tiết. Anh em nào thích thì làm luôn nhé, rất đẹp.
Ngoài ra bạn có thể xem nhiều bài

hướng dẫn mod android

khác ở đây: http://9apk.mobie.in/mod-android/
TUT Hướng dẫn Mod Stt3 4 dòng từ A-Z

Hướng dẫn mod status bar 4 dòng:


1.Decompile framework-res.apk
- Theo đưòng dẫn framework-res/res/values/dimens.xml
- Tìm dòng code:
<dimen name="status_bar_height">25.0dip</dimen>

Sửa thành:
<dimen name="status_bar_height">74.0dip</dimen>


Tiếp tục tìm dòng code:
<dimen name="status_bar_icon_size">18.0dip</dimen>

và sửa thành:
<dimen name="status_bar_icon_size">17.0dip</dimen>

2.Recompile framework-res
3.Decompile SystemUI.apk
-Theo đưòng dẫn SystemUI/res/layout/status_bar.xml(gemini_status_bar.xml hoặc tw_status_bar.xml tùy máy )
-Tìm code:
<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="6.0dip">


-Bôi đen từ đoạn code dưới code đó đến code trên code này :

<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip">


-Di chuyển đoạn code vừa bôi đen ra một file mới (Tí nữa sẽ sử dụng đến)
-Copy đoạn code này :

<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="74.0dip">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="54.0dip">
<ImageView android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="1.0dip" android:layout_height="55.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="left" android:orientation="vertical" android:id="@id/trai" android:layout_width="fill_parent" android:layout_height="54.0dip" android:layout_weight="1.0">
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="left|center" android:orientation="horizontal" android:id="@id/trai1" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
(Vị trí 1)
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/trai2" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
(Vị trí 2)
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/trai3" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
(Vị trí 3)
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
</LinearLayout>
<ImageView android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="1.0dip" android:layout_height="55.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="vertical" android:id="@id/giua" android:layout_width="fill_parent" android:layout_height="54.0dip" android:layout_weight="1.0">
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="vertical" android:id="@id/giua1" android:layout_width="fill_parent" android:layout_height="36.0dip" android:layout_weight="1.0">
<AnalogClock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:layout_marginRight="0.0dip" android:dial="@drawable/wa_clock" android:hand_hour="@drawable/wa_hour" android:hand_minute="@drawable/wa_minutes" android:singleLine="true" android:layout_centerVertical="true" />
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="vertical" android:id="@id/giua2" android:layout_width="80.0dip" android:layout_height="18.0dip" android:layout_weight="1.0">
<TextView android:gravity="left|center" android:background="@drawable/canhtrai" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
<TextView android:gravity="right|center" android:background="@drawable/canhphai" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
</LinearLayout>
<ImageView android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="1.0dip" android:layout_height="55.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="right" android:orientation="vertical" android:id="@id/phai" android:layout_width="fill_parent" android:layout_height="54.0dip" android:layout_weight="1.0">
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/phai1" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
(Vị trí 4)
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/phai2" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
(Vị trí 5)
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/phai3" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
(Vị trí 6)
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
</LinearLayout>
<ImageView android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="1.0dip" android:layout_height="55.0dip" android:src="#ffff0000" />
</LinearLayout>
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="18.0dip">
<ImageView android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="1.0dip" android:layout_height="19.0dip" android:src="#ffffffff" />
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/duoi" android:layout_width="fill_parent" android:layout_height="18.0dip" android:layout_weight="1.0">
<TextClock android:layout_width="wrap_content" android:layout_height="wrap_content" android:format12Hour="EEEE, dd MMMM yyyy" android:format24Hour="EEEE, dd MMMM yyyy" android:textColor="#ffffffff"/>
</LinearLayout>
<ImageView android:paddingTop="0.0dip" android:paddingBottom="0.0dip" android:layout_width="1.0dip" android:layout_height="19.0dip" android:src="#ffffffff" />
</LinearLayout>
<ImageView android:paddingLeft="0.0dip" android:paddingRight="0.0dip" android:layout_width="fill_parent" android:layout_height="1.0dip" android:src="#ffff0000" />
</LinearLayout>
</LineaoutrLay>

Vào dưới code này :

<LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip" android:paddingEnd="6.0dip">

-Đã đặt code xong giờ đến lúc cắt các code icon vào vị trí mà mình muốn nó hiển thị nhé (Tìm code tròn đoạn bôi đen vừa di chuyển sang file khác)
-Code thông báo: Tìm code này và di chuyển vào vị trí 3

<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />


-Code sóng: Tìm code này và di chuyển vào vị trí 1

<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" />


-Code pin : Tìm code này và di chuyển vào vị trí 4

<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent">
<TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />
<ImageView android:gravity="center" android:id="@id/battery" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>


-Code icon Rung+Chuông: Tìm code này và di chuyển vào vị trí 2

<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />


*Lưu ý :
1.Phải copy đủ 4 code trên không sẽ gây lỗi
2.Còn 2 vị trí 5 và 6 tùy các bạn gì thì tùy còn không đặt thì xóa cả đoạn đi (Xóa '(Vị trí 6)')

-Tiếp tục theo đường dẫn SystemUI/res/values/ids.xml mở và thêm code bên dưới và cuối ids.xml

<item type="id" name="trai">false</item>
<item type="id" name="trai1">false</item>
<item type="id" name="trai2">false</item>
<item type="id" name="trai3">false</item>
<item type="id" name="giua">false</item>
<item type="id" name="giua1">false</item>
<item type="id" name="giua2">false</item>
<item type="id" name="phai">false</item>
<item type="id" name="phai1">false</item>
<item type="id" name="phai2">false</item>
<item type="id" name="phai3">false</item>
<item type="id" name="duoi">false</item>


-Giải nén tệp Icon.zip mình để bên dưới copy tất cả các file ảnh vào theo đường dẫn SystemUI/res/drawable-hdpi (có thể là drawable-xhdpi hoặc drawable-xxhdpi tùy máy )

4.Recompile SystemUI

Chúc các bạn thành công !!