camera: Patch apk to change default gallery

Use Google Photos instead of MIUI Gallery.
This commit is contained in:
Adithya R
2024-01-30 22:17:27 +05:30
committed by Fabian Leutenegger
parent e483fb3b96
commit 224058106d
11 changed files with 6 additions and 1 deletions
+6 -1
View File
@@ -62,7 +62,12 @@ function blob_fixup() {
patchelf --replace-needed libgui.so libgui-xiaomi.so "${2}"
;;
system/priv-app/MiuiCamera/MiuiCamera.apk)
split --bytes=20M -d "${2}" "${2}".part
tmp_dir="${EXTRACT_TMP_DIR}/MiuiCamera"
$APKTOOL d -q "$2" -o "$tmp_dir" -f
grep -rl "com.miui.gallery" "$tmp_dir" | xargs sed -i 's|"com.miui.gallery"|"com.google.android.apps.photos"|g'
$APKTOOL b -q "$tmp_dir" -o "$2"
rm -rf "$tmp_dir"
split --bytes=20M -d "$2" "$2".part
;;
esac
}