feat: patches: introduce noti_ic

"fix" notification icon
TODO cleanup; fix color
ref: https://stackoverflow.com/questions/34225779/how-to-set-the-app-icon-as-the-notification-icon-in-the-notification-drawer

Signed-off-by: fukiame <fukiame@proton.me>
This commit is contained in:
Hikarie Fukirei 2025-12-04 00:34:48 +07:00
commit 2e40aac8c3
6 changed files with 69 additions and 0 deletions

View file

@ -0,0 +1,52 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="37"
android:viewportHeight="40"
android:tint="#FFFFFF">
<group android:scaleX="0.9351648"
android:scaleY="1.0109891"
android:translateX="1.1994505"
android:translateY="-0.21978022">
<path
android:pathData="m9.885,13.424 l5.686,2.615c0.331,0.139 0.694,0.244 1.091,0.174 1.025,-0.174 1.719,-1.185 1.554,-2.266 -0.132,-0.837 -0.694,-1.465 -1.422,-1.604L10.712,10.913c-0.165,-0.035 -0.331,-0.07 -0.529,-0.035 -0.694,0.105 -1.157,0.802 -1.058,1.534 0.066,0.453 0.364,0.837 0.76,1.011z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m16.86,9.135c-0.198,0.384 -0.298,0.837 -0.165,1.29 0.231,0.802 1.058,1.22 1.785,0.976 0.231,-0.07 0.463,-0.244 0.628,-0.418L22.679,6.625C23.108,6.102 23.34,5.369 23.108,4.637 22.778,3.591 21.72,3.033 20.728,3.347 20.298,3.487 19.935,3.8 19.703,4.184c-0.066,0.105 -2.843,4.951 -2.843,4.951z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m27.075,16.353c-0.397,-0.105 -0.826,-0.035 -1.19,0.244 -0.628,0.488 -0.76,1.43 -0.298,2.092 0.165,0.209 0.364,0.384 0.562,0.488 0,0 5.025,2.197 5.025,2.232 0.628,0.279 1.322,0.244 1.917,-0.174 0.826,-0.663 1.025,-1.883 0.397,-2.755 -0.264,-0.384 -0.661,-0.663 -1.091,-0.767 -0.066,-0.07 -5.289,-1.36 -5.322,-1.36z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m23.771,28.801c-0.033,-0.453 -0.231,-0.872 -0.595,-1.116 -0.628,-0.488 -1.521,-0.349 -1.983,0.349 -0.165,0.209 -0.231,0.488 -0.264,0.732 0,0 -0.463,5.718 -0.463,5.753 -0.066,0.697 0.198,1.43 0.76,1.848 0.826,0.628 2.017,0.453 2.612,-0.453 0.264,-0.384 0.397,-0.872 0.364,-1.325 0,-0.139 -0.43,-5.753 -0.43,-5.788z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m11.473,29.359c0.397,-0.174 0.694,-0.488 0.826,-0.942 0.231,-0.802 -0.165,-1.639 -0.926,-1.883 -0.231,-0.07 -0.496,-0.105 -0.727,-0.035 0,0 -5.289,1.325 -5.322,1.325 -0.661,0.174 -1.223,0.628 -1.455,1.325 -0.331,1.046 0.231,2.162 1.19,2.511 0.43,0.139 0.893,0.139 1.289,-0.035 0.165,-0.07 5.124,-2.266 5.124,-2.266z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m7.208,17.19c0.264,0.314 0.661,0.558 1.091,0.558 0.793,0 1.421,-0.663 1.421,-1.499 0,-0.279 -0.066,-0.523 -0.198,-0.767l-2.843,-4.916C6.315,9.972 5.753,9.519 5.026,9.519c-1.025,0 -1.884,0.872 -1.884,1.988 0,0.488 0.165,0.941 0.463,1.29 0.099,0.105 3.603,4.393 3.603,4.393z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m21.093,10.669 l-0.595,6.52c-0.033,0.384 0,0.767 0.198,1.151 0.463,0.976 1.587,1.36 2.512,0.872 0.694,-0.384 1.091,-1.151 1.025,-1.953l-0.595,-6.555c0,-0.174 -0.066,-0.349 -0.132,-0.523 -0.331,-0.662 -1.091,-0.941 -1.719,-0.593 -0.43,0.244 -0.661,0.628 -0.694,1.081z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m27.01,21.06 l-6.05,1.43c-0.364,0.07 -0.694,0.244 -0.992,0.558 -0.727,0.767 -0.727,2.022 0,2.79 0.562,0.593 1.388,0.732 2.05,0.418l5.719,-2.615c0.165,-0.07 0.298,-0.174 0.43,-0.314 0.496,-0.523 0.496,-1.395 0,-1.918 -0.298,-0.349 -0.727,-0.453 -1.157,-0.349z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m19.506,30.196 l-3.141,-5.649c-0.198,-0.349 -0.43,-0.628 -0.793,-0.802 -0.926,-0.488 -2.05,-0.105 -2.512,0.872 -0.364,0.732 -0.231,1.604 0.264,2.197 0,0 4.132,4.916 4.132,4.951 0.099,0.139 0.231,0.244 0.397,0.349 0.628,0.349 1.388,0.07 1.719,-0.593 0.165,-0.453 0.132,-0.907 -0.066,-1.325z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
<path
android:pathData="m8.928,25.488c0,0 4.099,-4.882 4.132,-4.916 0.231,-0.279 0.43,-0.628 0.496,-1.046 0.165,-1.081 -0.529,-2.092 -1.554,-2.266 -0.793,-0.139 -1.521,0.279 -1.917,0.941 0,0 -3.174,5.649 -3.174,5.684 -0.099,0.139 -0.165,0.314 -0.198,0.523 -0.099,0.732 0.364,1.43 1.058,1.534 0.43,0.07 0.86,-0.105 1.157,-0.453z"
android:strokeWidth="0.83832"
android:fillColor="#ff0000"/>
</group>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# PATCHNAME: Proper notification icon
# MAXVER:
# MINVER:
# shellcheck disable=SC1091
. "$DIRPATH"/common.sh
res="$DIRPATH/mbapk/mbapk_unpacked/resources/package_1/res/"
mfs="$DIRPATH/mbapk/mbapk_unpacked/AndroidManifest.xml"
blob="$DIRPATH/blob_patches/noti_ic/"
cp -r "$blob"/* "$res"
sed -i '0,/type=.font/s|^.*type="font".*| <public id="0x7f080367" type="drawable" name="ic_noti_star" />\n&|' "$res"/values/public.xml
sed -i 's|^.*android:name="flutterEmbedding".*| <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_noti_star" />\n <meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/colorAccent" />\n&|g' "$mfs"
sed -i 's|^.*com.google.firebase.messaging.FirebaseMessagingRegistrar.*| <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_noti_star" />\n <meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/colorAccent" />\n <meta-data android:name="com.google.firebase.components:com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_noti_star" />\n <meta-data android:name="com.google.firebase.components:com.google.firebase.messaging.default_notification_color" android:resource="@color/colorAccent" />\n&|g' "$mfs"