Android system beautification tutorial---teach you to modify the time, date, and notification font color

 Precautions

If you perform decompilation on the computer. Most tools need to load the framework first

framework-res.apk in the /system/framework directory /framework-etx-res.apk

in the system/framework/ directory

/systemUI.apk in the system/priv-app directory

Otherwise, decompilation will fail. Ignore on mobile

The Android modification time color
time color code is in the classes.dex file in system/system/framework/severce.jar. classes.dex must be unpacked first, that is, de-translated before it can be edited. Severce.jar for Android 9 and below needs to be merged with odex before it can be decompiled and modified. After decompilation

Remember to back up the original file before operation to avoid modification errors and restore use. Can be decompiled on the computer or on the mobile phone

code

    .line 3696
    invoke-interface {v3}, Lcom/android/server/policy/WindowManagerPolicy$WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;

    move-result-object v3

    iget v5, v3, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

    and-int/lit16 v5, v5, -0x401

    iput v5, v3, Landroid/view/WindowManager$LayoutParams;->privateFlags:I

    .line 3697
    iget-object v3, p0, Lcom/android/server/policy/PhoneWindowManager;->mKeyguardCandidate:Lcom/android/server/policy/WindowManagerPolicy$WindowState;

    invoke-interface {v3}, Lcom/android/server/policy/WindowManagerPolicy$WindowState;->getAttrs()Landroid/view/WindowManager$LayoutParams;

    move-result-object v3

    iget v5, v3, Landroid/view/WindowManager$LayoutParams;->flags:I

    const v6, -0x100

    and-int/2addr v5, v6

    iput v5, v3, Landroid/view/WindowManager$LayoutParams;->flags:I

Among them, const V6, -0X100, change it to const v6, -0x1 and save it. The time color is changed from black to white. The models are different. This original document is slightly different and can be used as a reference. Or change to other colors. After the modification is completed, recompile and replace the original file and restart the phone to see the effect. If it is modified and replaced on the mobile phone, please pay attention to modifying the permissions.

Modified date color

Also modify the server.jar file. Decompile and
open classes\com\android\server\status\, find .line276, and add the code inside the dividing line.

.line 276
const v7, 0x1020059  
invoke-virtual , Lcom/android/server/status/StatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v7
check-cast v7, Lcom/android/server/status/DateView;

---------------------------------------------------------------------------------------------------------------
const v8, -0x1
invoke-virtual , Landroid/widget/TextView;->setTextColor
-------------------------------------------------------------------------------------------

Modify notification font color,

The notification font color code is controlled by three files in /system/framework/framework-res.apk,
framework-res.apk, and the decompiled framework

status_bar_latest_event_content.xml (the first one controls the notification title, and the second one controls the notification content color

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/status_bar_latest_event_content" android:background="#ffff00ff" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <include android:layout_width="fill_parent" android:layout_height="wrap_content" layout="@layout/notification_template_material_base" />
</FrameLayout>


status_bar_expanded.xml (controls the font of the line below the status bar, which is the line of China Mobile)
status_bar.xml (controls the font color of the status bar)
2. Open it with a hexadecimal file editor (Uedit32 is recommended) and search for hexadecimal 08 00 00 1C, the four characters after 08 00 00 1C, for example, 00 00 00 FF (black) is the color code               
3. It can be changed to the color you need. It should be noted that the meaning of the four-digit code is Blue, Green, Red, Alpha, Alpha value is FF, generally do not need to be touched. Change 00 00 00 FF (black) to FF FF FF FF (white), and compile again after the modification is completed. Note that you need to change the permissions after modifying and replacing on the mobile phone. Otherwise it will cause the system to crash.

Change the mobile phone signal color to white


    Decompile systemui.apk and swap the image names of the pictures stat_sys_gemini_data_connected_3g_blue.png and stat_sys_gemini_data_connected_3g_blue_roam.png with stat_sys_gemini_data_connected_3g_white.png and stat_sys_gemini_data_connected_3g_white_roam.png respectively in the compiled file \\res\\drawable-hdpi ; stat_sys_gemini_data_connected_e_blue.png, stat_sys_gemini_data_connected_e_blue_roam.png and stat_sys_gemini_data_connected_e_white respectively .png, stat_sys_gemini_data_connected_e_white_roam.png swap the picture names; G pictures, h tu pictures, H+ pictures, and R pictures are handled in the same way.

The model and Android version are different. The modification location is also slightly different. They should be treated differently. In addition, there are certain risks in modifying system classes. Remember to back up before modifying. In addition, you can also directly use various theme methods for beautification operations.

Guess you like

Origin blog.csdn.net/u011283906/article/details/132951539