YiHôm nay mình xin mạn phép hướng dẫn một số bạn chưa biết về những thủ thuật mod với systemui và framework (đặc biệt là dòng máy của samsung, còn của hãng khác mình chưa thử bao giờ) Bài này mình có sử dụng tài liệu từ bác bác Vinhvinh305, bác thanhfhuongf và bác kurom cùng 1 số bài khác bên xda Để tạo file systemui mang phong cách riêng của các bạn thì có một vấn đề cơ bản là các bạn phải biết decompile và recompile Chi tiết về decompile và recompile thì các bạn xem ở đây: http://www.tinhte.vn/threads/samsun...r-center-clock-transparent-statusbar.2012376/ ( khuyến khích các bác làm xong dc mod home+lọck thì mới làm những cái mod dưới để dễ thao tác hơn) 1 số công cụ: + Jdk/java link tải: http://www.java.com/en/ (nếu có sẵn java trong máy rồi thì thôi) + Apktool: http://www.mediafire.com/download.php?qza7uquol5fugto(giải nén file apktool.zip và copy cả thư mục apktool chứ 3 file vào ổ đĩa C) + notepad ++: http://download.tuxfamily.org/notepadplus/6.2.3/npp.6.2.3.Installer.exe + Winrar hoặc 7zip (để nén, giải nén): đầy trên net * Chú ý nhỏ: để tìm code các bạn dùng tổ hợp phím Ctrl+F cho nhanh Điều kiện: máy đã root, android 4.1.2, 1 số file liên quan đến smali thì cần deodex trc khi làm 1. Mod transparent noti - đầu tiên các bác decompile file systemui. apk giống như link bên trên đã hướng dẫn - sau khi decompile thành công và tiến hành chỉnh sửa Systemui đã bung. a.vào res/layouts tw_status_bar_expanded.xml tìm Code: Code: android:background="#something" trong xml đổi code "#something" thành "#00000000". chú ý : + cứ tìm cái background=#............" đổi hết như trên. + Riêng cái này ko cần đổi nhé android:background="@drawable/notification_panel_bg" b. vào SystemUI\smali\com\android\systemui\statusbar\phone tìm PhoneStatusBar.smali - find -0x100 (có 2 chỗ như thế này nhé. phải đổi cả 2) ( dùng tính năng seach trong notepad++ cho nhanh. search 2 lần ra 2 chỗ. chứ tìm lòi hết cả mắt ko thấy đâu. nó nhiều lắm) - change both to 0x0 (0=zero) - save smali. XONG. recompile lại là Ok. - giờ mới thay hình nền notification_panel_bg.9.png trong suốt vào( tuỳ bạn thik thay hình j thì thay) NHỚ ĐỪNG THAY HÌNH NỀN NÀY TRƯỚC KHI DECOMPILE DỄ GÂY LỖI 9PATCH LẮM. - thay tiếp tw_quick_panel_quick_setting_button_bg_normal.9.png trong suốt để làm trong suốt phần toggle button background. giờ thì xong rồi. chúc các bạn may mắn. 2. Mod trong suốt All rom 1. decompile framework-res.apk 2. vào framework-res.apk/res/drawable-nodpi chỉnh sửa 2 file background_holo_dark.png và tw_background_holo_dark.png thành trong suốt 3. vào framework-res.apk/res/values/style.xml mở file style.xml lên Tìm dòng code sau: Code: <style name="Theme.Holo" parent="@style/Theme"> kéo xuống tìm đoạn code này: Code: <item name="windowShowWallpaper">false</item> thay đổi thành thế này Code: <item name="windowShowWallpaper">true</item> Tìm tiếp dòng code sau: Code: <style name="Theme.Holo.InputMethod" parent="@style/Theme.Holo.Light.Panel"> thêm dòng này dưới nó Code: <item name="windowShowWallpaper">false</item> Tìm tiếp dòng code sau: Code: <style name="Theme.Holo.Dialog" parent="@style/Theme.Holo"> thêm dòng này dưới nó Code: <item name="windowShowWallpaper">false</item> Tìm tiếp dòng code sau: Code: <style name="Theme.DeviceDefault.InputMethod" parent="@style/Theme.DeviceDefault"> thêm dòng này dưới nó Code: <item name="windowShowWallpaper">false</item> 4. save và compile 3. Đổi màu chữ ở stt 1. decompile file systemui 2. đổi màu chữ ở stt: tìm đến res/layout mở file tw_status bar.xml + đổi màu chỉ thị pin: Code: <TextView android:textSize="12.0dip" android:textColor="#something" + đổi màu đồng hồ: Code: <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#something" các bác đổi cái something ở cuối dòng code đó thành màu các bác muốn bảng mã hex của các màu các bác xem ở đây và thay vào:http://vntim.blogspot.com/2009/06/bang-ma-mau-code-color.html 3. đổi màu chữ ở noti mở file tw_status_bar_expanded_header.xml + cho pull down clock Code: <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#something" + cho ngày: Code: "@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#something" 4. save và compile 4. Đổi chỗ các toggle trc sau 1. decompile systemui. xong vào res/values mở arrays.xml 2. tìm code Code: <string-array name="QuickSettingButtonAttribute"> <item>Wifi</item> <item><string-array name="QuickSettingButtonAttribute"> <item>Wifi</item> <item>Location</item> <item>SilentMode</item> <item>AutoRotate</item> <item>Bluetooth</item> <item>MobileData</item> <item>DormantMode</item> <item>PowerSaving</item> <item>AllShareCast</item> <item>MultiWindow</item> <item>Sync</item> </string-array> 3. di chuyển vị trí theo ý bạn, sau đây là ví dụ Code: <string-array name="QuickSettingButtonAttribute"> <item>Wifi</item> <item>SilentMode</item> <item>AutoRotate</item> <item>Bluetooth</item> <item>MobileData</item> <item>DormantMode</item> <item>PowerSaving</item> <item>AllShareCast</item> <item>MultiWindow</item> <item>Location</item> <item>Sync</item> </string-array> 4. save và compile 5. Xóa BRIGHTNESS BAR 1. decompile systemui 2. vào res/layouts mở tw_status_bar_expanded.xml 3. tìm code Code: <LinearLayout androidrientation="vertical" android:id="@id/brightness_controller" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="56.0dip"> 4. thay cái này Code: android:layout_height="56.0dip" bằng Code: android:layout_height="0.0dip" 5. save và compile 6. Mod transparent stt * Cách 1 1. decompile systemui 2. vào res/values mở drawables.xml 3. tìm code Code: <item type="drawable" name="status_bar_background">#something</item> 4. đổi something thành 00000000 nếu bạn muốn trong suốt 100% 3f000000 nếu muốn trong suốt 75% 7f000000 nếu muốn trong suốt 50% 5. save và compile * Cách 2 Decompile SystemUI.apk + /res/layout/tw_super_status_bar.xml Code: <com.android.systemui.statusbar.phone.StatusBarWindowView android:background="#00000000" 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"> + \res\layout\tw_status_bar Code: <com.android.systemui.statusbar.phone.PhoneStatusBarView androidrientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants" Đổi mã hex ở cả 2 code trên tương tự như cách 1 7. Mod thanh toggle xuống dưới cùng + decompile SystemUI.apk và tìm đến /res/layout/tw_status_bar_expanded + tìm đến code và di chuyển (move) nó Code: <include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" /> <TextView android:gravity="center" android:id="@id/emergency_calls_only" androidaddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_marginTop="@dimen/tw_notification_panel_header_height" /> + paste cái code trên vào giữa code này: Code: <LinearLayout androidrientation="vertical" android:id="@id/scrollCart"........... và code này: Code: <LinearLayout androidrientation="vertical" android:id="@id/brightness_controller"................... +sau đó ở trước code này: Code: <com.android.systemui.statusbar.phone.CloseDragHandle.... * đối vs bạn nào dùng 13 toggle tạo 1 LinearLayout , bạn sẽ dc như này: Code: <LinearLayout android:layout_gravity="bottom" androidrientation="vertical" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginBottom="32.5dip"> <HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:layout_width="fill_parent" android:layout_height="0.0dip" androidverScrollMode="never"> <com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel androidrientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="#00000000" android:showDividers="middle" /> </HorizontalScrollView> </LinearLayout> * nếu bạn dùng 23 toggle Code: <LinearLayout android:layout_gravity="bottom" androidrientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="80.0dip" android:layout_marginBottom="32.5dip"> <com.wanam.systemui.quickpanel.PowerWidget android:id="@id/exp_power_stat" android:layout_width="wrap_content" android:layout_height="75.0dip" /> <HorizontalScrollView android:id="@id/quicksetting_scroller" android:visibility="gone" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="100.0px" android:layout_width="fill_parent" android:layout_height="0.0dip" androidverScrollMode="never"> <com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel androidrientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="#00000000" android:showDividers="middle" /> </HorizontalScrollView> </LinearLayout> + save và compile 8. Center clock có giây(tks bác boykinhdi) - decompile systemui.apk, vào res/layout, mở tw_status_bar.xml lên - tìm dòng code này và xóa dòng này đi Code: <com.android.systemui.statusbar.policy.Clock - tìm đến code Code: <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" androidaddingTop="2.0dip" androidaddingRight="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:id="@id/ticker_text_view_old" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" /> <TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:id="@id/ticker_text_view_new" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" /> </com.android.systemui.statusbar.phone.TickerView> </LinearLayout> - thêm code này dưói nó( lui vào 4 dấu cách) Code: <LinearLayout android:gravity="center" androidrientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <DigitalClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="center" android:id="@id/clock" android:background="#00000000" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" /> </LinearLayout> - save and recompile 9. Update transparent stt bar ở lockscreen(tks bác lượng)áp dụng cho các dòng máy samsung 4.1 1: decompile ( bug file ) android.policy.jar 2: vào theo đường dẫn com/android/internal/policy/impl/KeyguardViewManager.smali 3; open file KeyguardViewManager.smali lên 4: Tìm dòng code sau: Code: .method public declared-synchronized show()V Tìm kiếm dòng mã này trong đó 0x100800 Thay đổi mã 0x100800 Thành 0x10900 5: đóng gói lại apk là xong 10. Mod sense style task manager - decompile framework-res.apk - mở res/values/dimens.xml đổi cỡ khung hình, tuỳ theo bạn muốn cái khung app nó to cỡ nào ở đây Code: Code: <dimen name="thumbnail_height">267.0dip</dimen> <dimen name="thumbnail_width">168.0dip</dimen> -save and recompile framework - decompile systemui.apk - mở res/drawable/status_bar_recents_background.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="#e6000000" android:endColor="#c0000000" android:angle="@integer/status_bar_recents_bg_gradient_degrees" name="status_bar_recents_background" /> </shape> mod này có nền đen, vậy nếu bạn muốn nền trong suốt thì thay đổi 2 cái mã hex bên trên nhé - mở res/layout/status_bar_no_recent_apps.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <TextView android:textSize="20.0dip" android:textColor="@*android:color/holo_blue_light" android:gravity="left" android:layout_gravity="bottom|left|center" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_no_recent_apps" /> </FrameLayout> - mở res/layout/tw_system_bar_no_recent_apps.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <Button android:textSize="@dimen/status_bar_recents_app_label_text_size" android:layout_gravity="center" android:id="@id/no_recent_apps_launch_button" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="55.0dip" android:text="@string/status_bar_recent_launch_task_manager_title" /> <TextView android:textSize="20.0dip" android:textColor="@*android:color/holo_blue_light" android:gravity="center_horizontal" android:layout_gravity="center" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_no_recent_apps" /> </FrameLayout> - mở res/layout-land/status_bar_recent_item.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <FrameLayout android:paddingLeft="@dimen/status_bar_recents_item_padding" android:paddingRight="@dimen/status_bar_recents_item_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <RelativeLayout android:layout_gravity="center_vertical" android:id="@id/recent_item" android:paddingTop="@*android:dimen/status_bar_height" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true"> <FrameLayout android:id="@id/app_thumbnail" android:background="#00000000" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:foreground="#00000000" android:layout_centerInParent="true"> <ImageView android:id="@id/app_thumbnail_image" android:layout_width="120.0dip" android:layout_height="320.0dip" android:scaleType="centerInside" /> </FrameLayout> <ImageView android:gravity="center_horizontal" android:id="@id/app_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="232.0dip" android:scaleType="centerInside" android:adjustViewBounds="true" android:maxWidth="20.0dip" android:maxHeight="20.0dip" /> <TextView android:textSize="20.0dip" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/app_label" android:paddingTop="0.0dip" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="0.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_icon" android:layout_alignParentBottom="true" /> <TextView android:textSize="@dimen/status_bar_recents_app_description_text_size" android:ellipsize="marquee" android:id="@id/app_description" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginTop="3.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_label" android:layout_alignParentBottom="true" /> </RelativeLayout> </FrameLayout> - mở res/layput-land/status_bar_recent_panel.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"> <View android:id="@id/recents_transition_background" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true"> <ImageView android:id="@id/recents_transition_placeholder_icon" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="bottom|right|center" android:eek:rientation="horizontal" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" android:stackFromBottom="true" android:divider="[USER=920]null[/USER]"> <LinearLayout android:eek:rientation="horizontal" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" /> </com.android.systemui.recent.RecentsHorizontalScrollView> </FrameLayout> <include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" /> </com.android.systemui.recent.RecentsPanelView> - mở res/layput-land/tw_status_bar_recent_panel.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"> <View android:id="@id/recents_transition_background" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_centerVertical="true"> <ImageView android:gravity="center" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginTop="0.0dip" android:src="@drawable/status_bar_recents_background" /> <com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="bottom|left|center" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:stackFromBottom="true" android:divider="[USER=920]null[/USER]"> <LinearLayout android:eek:rientation="horizontal" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </com.android.systemui.recent.RecentsHorizontalScrollView> <TextView android:textSize="20.0dip" android:textColor="#ffd7d7d7" android:gravity="center_horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5.0dip" android:text="@string/accessibility_recent" /> <LinearLayout android:layout_gravity="bottom|center" android:eek:rientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <ImageView android:layout_gravity="center" android:id="@id/shortcut_line" android:visibility="gone" android:layout_width="450.0dip" android:layout_height="1.0dip" android:layout_marginTop="2.0dip" android:src="@drawable/shortcut_head_line" android:scaleType="center" /> <LinearLayout android:gravity="center" android:eek:rientation="horizontal" android:id="@id/application_shortcut_layout" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="7.0dip"> <LinearLayout android:gravity="center" android:eek:rientation="vertical" android:id="@id/shortcut1_layout" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="18.0dip" android:layout_marginRight="18.0dip"> <ImageView android:id="@id/shortcut1_icon" android:layout_width="52.0dip" android:layout_height="52.0dip" /> <TextView android:textSize="14.0dip" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:id="@id/shortcut1_text" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" /> </LinearLayout> <LinearLayout android:gravity="center" android:eek:rientation="vertical" android:id="@id/shortcut2_layout" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="18.0dip" android:layout_marginRight="18.0dip"> <ImageView android:id="@id/shortcut2_icon" android:layout_width="52.0dip" android:layout_height="52.0dip" /> <TextView android:textSize="14.0dip" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:id="@id/shortcut2_text" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" /> </LinearLayout> <LinearLayout android:gravity="center" android:eek:rientation="vertical" android:id="@id/shortcut3_layout" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="18.0dip" android:layout_marginRight="18.0dip"> <ImageView android:id="@id/shortcut3_icon" android:layout_width="52.0dip" android:layout_height="52.0dip" /> <TextView android:textSize="14.0dip" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:id="@id/shortcut3_text" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" /> </LinearLayout> <LinearLayout android:gravity="center" android:eek:rientation="vertical" android:id="@id/shortcut4_layout" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="18.0dip" android:layout_marginRight="18.0dip"> <ImageView android:id="@id/shortcut4_icon" android:layout_width="52.0dip" android:layout_height="52.0dip" /> <TextView android:textSize="14.0dip" android:textColor="#ffd7d7d7" android:ellipsize="marquee" android:id="@id/shortcut4_text" android:fadingEdge="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxLines="1" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_gravity="bottom" android:eek:rientation="horizontal" android:background="@drawable/tw_ab_bottom_transparent_dark_holo" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0"> <Button android:textSize="@dimen/tw_status_bar_recent_panel_button_text_size" android:textColor="@color/tw_status_bar_recent_btn_color" android:ellipsize="marquee" android:id="@id/recents_launch_button" android:background="@drawable/tw_recent_panel_button_forphone" android:paddingLeft="@dimen/tw_status_bar_recent_panel_button_left_padding" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_recent_launch_task_manager_title" android:singleLine="true" android:drawableLeft="@drawable/tw_recent_panel_ic_task_manager_holo_dark" android:layout_weight="1.0" /> <LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" /> <Button android:textSize="@dimen/tw_status_bar_recent_panel_button_text_size" android:textColor="@color/tw_status_bar_recent_btn_color" android:ellipsize="marquee" android:id="@id/recents_google_button" android:background="@drawable/tw_recent_panel_button_forphone" android:paddingLeft="@dimen/tw_status_bar_recent_panel_button_left_padding" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_recent_launch_google_button" android:singleLine="true" android:drawableLeft="@drawable/tw_recent_panel_ic_google_holo_dark" android:layout_weight="1.0" /> <LinearLayout android:layout_gravity="center_vertical" android:background="@drawable/tw_divider_vertical_holo_dark" android:layout_width="1.0dip" android:layout_height="29.0dip" /> <Button android:textSize="@dimen/tw_status_bar_recent_panel_button_text_size" android:textColor="@color/tw_status_bar_recent_btn_color" android:ellipsize="marquee" android:id="@id/recents_RemoveAll_button" android:background="@drawable/tw_recent_panel_button_forphone" android:paddingLeft="@dimen/tw_status_bar_recent_panel_button_left_padding" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_recent_remove_all_button" android:singleLine="true" android:drawableLeft="@drawable/tw_recent_panel_ic_delete_holo_dark" android:layout_weight="1.0" /> </LinearLayout> </LinearLayout> </FrameLayout> <include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/tw_status_bar_no_recent_apps" /> </com.android.systemui.recent.RecentsPanelView> - mở res/layout-port/status_bar_recent_item.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <FrameLayout android:paddingLeft="@dimen/status_bar_recents_item_padding" android:paddingRight="@dimen/status_bar_recents_item_padding" android:layout_width="wrap_content" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <RelativeLayout android:layout_gravity="center_vertical" android:id="@id/recent_item" android:paddingTop="@*android:dimen/status_bar_height" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true"> <FrameLayout android:id="@id/app_thumbnail" android:background="#00000000" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:foreground="#00000000" android:layout_centerInParent="true"> <ImageView android:id="@id/app_thumbnail_image" android:paddingTop="60.0dip" android:layout_width="212.0dip" android:layout_height="455.0dip" android:layout_marginTop="30.0dip" android:scaleType="centerInside" /> </FrameLayout> <ImageView android:gravity="center_horizontal" android:id="@id/app_icon" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="405.0dip" android:scaleType="centerInside" android:adjustViewBounds="true" android:maxWidth="@dimen/status_bar_recents_app_icon_max_width" android:maxHeight="@dimen/status_bar_recents_app_icon_max_height" /> <TextView android:textSize="@dimen/status_bar_recents_app_label_text_size" android:textColor="@color/status_bar_recents_app_label_color" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/app_label" android:paddingTop="0.0dip" android:fadingEdge="none" android:fadingEdgeLength="0.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="3.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_icon" android:layout_alignParentBottom="true" /> <TextView android:textSize="@dimen/status_bar_recents_app_description_text_size" android:ellipsize="marquee" android:id="@id/app_description" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_text_fading_edge_length" android:layout_width="@dimen/status_bar_recents_app_label_width" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin" android:layout_marginTop="40.0dip" android:scrollHorizontally="true" android:singleLine="true" android:layout_below="@id/app_label" android:layout_alignParentBottom="true" /> </RelativeLayout> </FrameLayout> - mở res/layout-port/status_bar_recent_panel.xml thay nó Code: Code: <?xml version="1.0" encoding="utf-8"?> <com.android.systemui.recent.RecentsPanelView android:id="@id/recents_root" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:recentItemLayout="@layout/status_bar_recent_item" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"> <View android:id="@id/recents_transition_background" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <FrameLayout android:id="@id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true"> <ImageView android:id="@id/recents_transition_placeholder_icon" android:visibility="invisible" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <com.android.systemui.recent.RecentsHorizontalScrollView android:layout_gravity="bottom|right|center" android:eek:rientation="horizontal" android:id="@id/recents_container" android:scrollbars="none" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin" android:stackFromBottom="true" android:divider="[USER=920]null[/USER]"> <LinearLayout android:eek:rientation="horizontal" android:id="@id/recents_linear_layout" android:clipChildren="false" android:clipToPadding="false" android:layout_width="wrap_content" android:layout_height="fill_parent" /> </com.android.systemui.recent.RecentsHorizontalScrollView> </FrameLayout> <include android:id="@id/recents_no_apps" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" layout="@layout/status_bar_no_recent_apps" /> </com.android.systemui.recent.RecentsPanelView> - mở res/layout-port/tw_status_bar_recent_panel.xml download Sense style Recent apps rồi thay thế file tw_status_bar_recent_panel.xml của bạn bằng file tương tự ở trong file vừa down( mở cái file vừa down ra, vào Sense Style recent apps/ res/layout-port mà lấy file mới rồi thay vào) http://upfile.vn/e2ht - mở res/values/bools.xml tìm Code: Code: <bool name="config_recents_thumbnail_image_fits_to_xy">false</bool> đổi false thành true, nếu nó sẵn là true rồi thì thôi - mở res/values/ids.xml thêm code này ở cuối cùng Code: Code: <item type="id" name="no_recent_apps_launch_button">false</item> - mở res/values/integers.xml tìm đoạn tương tự như này ( khác cái 0x37) Code: Code: <integer name="notification_panel_layout_gravity">0x37</integer> rồi xoá nó đi, thay = code này Code: Code: <integer name="notification_panel_layout_gravity">0x37</integer> - mở res/values-sw600dp/integers.xml tương tự như trên, tìm code nhưng khác 0x31 thay nó = code Code: Code: Code: <integer name="notification_panel_layout_gravity">0x31</integer> - mở res/values-sw600dp-land/integers.xml tương tự trên, tìm code nhưng khác 0x33 thay = code Code: Code: <integer name="notification_panel_layout_gravity">0x33</integer> - mở smali/com/android/systemui/recent/RecentsPanelView.smali thay file RecentsPanelView.smali bằng file mới có trong tập tin vừa down về( mở Sense Style recent apps\smali\com\android\systemui\recent là thấy) - save and recompile Nguồn: tinhte
11. Mod home lock part 2( bác nào biết mod home lock như bác vinhvinh hd rồi thì làm part2) Nhiều bạn muốn mod home lock nhưng lại sợ nó chiếm diện tích. Sau 1 thời gian nghiên cứu, bác thành và mình đã tìm ra cách để ẩn home lock đi, icon khác như nhạc, gõ tiếng việt, thậm chí cả tin nhắn có thể đè lên 2 cái icon home lock kia. nhưng khi bấm vào đó vẫn là nút home/lock như thường a) sau đây mình xin hướng dẫn các bác mod icon pin là lock -tìm đoạn code Code: Code: </com.android.systemui.statusbar.phone.PhoneStatusBarView> - thêm code này phía trên nó Code: Code: <LinearLayout android:gravity="right" android:eek:rientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:src="@drawable/ic_sysbar_lock" android:singleLine="true" android:layout_toRightOf="@id/recent_apps" android:layout_alignParentLeft="true" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" /> </LinearLayout> - dùng ps đổi icon lock thành icon trong suốt rồi vứt vào chỗ cũ - save and recompile b) mod ẩn icon home - vẫn ở tw_stt_bar.xml - tìm code: Code: Code: </com.android.systemui.statusbar.phone.PhoneStatusBarView> - thêm code này phía trên nó Code: Code: <LinearLayout android:gravity="left" android:eek:rientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:paddingRight="0.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:glowBackground="@drawable/ic_sysbar_highlight" /> </LinearLayout> - đổi icon home thành icon trong suốt bằng ps rồi vứt vào chỗ cũ - save and recompile 12. Mod icon sóng,pin sang trái(tks bác kui8xx đã cho mình ý tưởng) - decompile systemui, mở res/layout/tw_status_bar.xml a) sóng - tìm code Code: Code: <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/tw_signal_cluster_view" /> copy ra đâu đó để tí dùng, word chẳng hạn, xong rồi mới xoá nó đi - ở dưới code này Code: Code: <LinearLayout android:eek:rientation="horizontal" android:id="@id/left_icons" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0"> tìm code Code: Code: <com.android.systemui.statusbar.StatusBarIconView rồi thêm code vừa mới copy ở trên dưới nó -save and recompile b) pin - tìm code, copy nó ra đâu để tí dùng =))) xong rồi xoá đi nhé Code: Code: <TextView android:textSize="12.0dip" android:textColor="#ff33b5e5" 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" /> - ở dưới code này Code: Code: <LinearLayout android:eek:rientation="horizontal" android:id="@id/left_icons" android:paddingLeft="4.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0"> tìm code này Code: Code: <com.android.systemui.statusbar.StatusBarIconView rồi thêm code vừa copy dưới nó -save and recompile 13. Add lưu lượng mạng trên stt 1. decompile systemui. Mở res/layout/tw_status_bar.xml 2. tìm code Code: Code: <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" /> rồi thêm code này phía trên nó Code: Code: <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:singleLine="true" /> 3. mở res/values/ids.xml thêm code này xuống dưới cùng Code: Code: <item type="id" name="traffic">false</item> 4. mở res/values/styles.xml thêm code này xuống dưới cùng Code: Code: <style name="TextAppearance.StatusBar.Traffic" parent="@style/TextAppearance.StatusBar.Clock"> <item name="android:textSize">14.0dip</item> <item name="android:textStyle">normal</item> <item name="android:textColor">#ffffffff</item> <item name="android:textAllCaps">false</item> </style> 5.down load file này về, giải nén sau đó copy các file smali vàosmali/com/android/systemui/statusbar/policy/ http://d-h.st/A3P 6. save and recompile 14. Thêm chữ vào stt(tks bác @giaanlove) 2. mở res/layout/tw_stt_bar.xml 3. tìm code(dưới cùng) Code: Code: </com.android.systemui.statusbar.phone.TickerView> thêm code này trên nó Code: Code: <LinearLayout android:gravity="center" android:eek:rientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:textSize="16.0sp" android:textStyle="bold" android:textColor="@*android:color/holo_red_light" androidaddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/text" android:singleLine="true" /> </LinearLayout> 4. vào res/values/strings.xml kéo xuống cuối cùng và add code Code: Code: <string name="text">Giaanlove</string> thay chữ giaanlove bằng chữ bạn thích 5. save and recompile 15. Mod set stt hình ảnh(tks bác @thanhfhuongf) Update mod thanh status bar theo file ảnh mình thik. Ko phải trong suốt mà cũng chẳng phải đen. Vd: 1. Mod 2 file theo đường ntn. Statusbarbgtile.png vào systemui/res/drawable-xhdpi. Tuỳ bạn thik ảnh j thì cho. Sẽ làm background của status bar. Xong. Recompile. Và đây là ảnh mình có như hình vd phía trên. https://db.tt/of6N9owV Sau khi mod xong các file của mình các bạn có thể dùng root explore để di chuyển vào chỗ cũ hoặc tạo một file zip để flash qua cwm Cách tạo file zip để flash qua cwm(bê luôn tiếng anh cho dễ hiểu ) -down load sample.zip: http://d-h.st/jq4 (1) Download and place the sample.zip (attached below) anywhere on your desktop; (2) Right-click on it and open the archive with 7zip, winrar ... [DO NOT extract] Now you should see two folders: one called "system" and one called "META-INF". 1. Let's start with the "system" one, so open it: In there, will go all files that what you want to add or replace to the system. So let's say for example that you want to replace the bootanimation. Make a "New Floder" -Rename its as "media" (make sure its aint in CAPS nor with in quotation marks) -drag those two new empty folders into the /system/ folder of the 7-zip opened archive -now simply drop the two files in their respective place: the bootanimation.zip file should go in '/system/media' folder .. If you have more files to add, just follow the logic above; I'm sure you get the idea by now.. Hints /system/app - all the system apps (SystemUI.apk etc) /system/framework/ -framework-res.apk,android.policy.jar /system/media - bootanimation.zip /system/lib - libraries (*.so) 2. The other folder included in the opened archive is named "META-INF" and all the file in it should be left unchanged. Now,just place the zip into your sd card! & try your luck KHẮC PHỤC LỔI KHI DECOMPILE VÀ COMPILE _Có rất nhiều bạn khi decompile và compile bị lổi như trên diển đàn, mặc dù các bạn đã cài đầy đủ java. -Download file APKTOOL :http://www.mediafire.com/download/nzbj7o1w3s3h4pj/Apktool_Good.zip -Giải nén chép vào ổ C: chép file framework-res.apk và lge-res.apk(hoặc twframework-res.apk cho samsung) và các file bạn muốn chỉnh sửa vào cùng thư mục Apktool_Good -Chạy file : Command Prompt.bat trong Apktool_Good -Dùng lệnh: apktool if framework-res.apk và apktool if lge-res.apk -Sau khi chạy 2 dòng lệnh này bạn kiểm tra theo đường dẩn : C:\users\tên nguoi su dung\apktool\framework\. Nếu có 2 file 1.apk và 2.apk bạn tiếp tục dung lệnh decompile để bung file apk cần sửa. ví dụ : apktool d SystemUI.apk (chi tiết chỉnh sửa file ở trang 1 đã có nên kô hướng dẩn lại) -Sau khi chỉnh sửa dung lệnh build để đóng gói lại -Tool này đã được tích hợp smali ,baksmali và các công cụ sign file apk luôn. Hổ trợ đến android 4.2
Rất chi tiết. Nhưng k có hứng lắm. Chờ 4.4 tự trong suốt stt luôn. Hêhe Sent from my LG-E975 using Tapatalk
e kết cái số 10 của bác quá,tắt recent app kiểu giống như ios7 bây giờ,trên 820 vẫn mod được đúng k bác?hay v2 bác mod vào đi cho đẹp
Em làm giề có oc đâu.toàn ra net mầy mò thôi a ạ.không làm đc thì thôi chứ mắc công nhờ a.mà đâu phải lúc nào cũng ra net đc.hehe