miuicamera: Switch back to split MiuiCamera

* GitLFS crossing the bandwidth limit which is around 1GB of cap per month
* With the help of Android.bp genrule method we can merge the apk's .part files at compile time

Signed-off-by: Arindam Bhattacharjee <abhattacharjee717@gmail.com>
This commit is contained in:
Arindam Bhattacharjee
2025-02-21 07:32:41 +00:00
committed by ARINDAM BHATTACHARJEE
parent f3f1984a7c
commit 917a2a8c12
10 changed files with 30 additions and 18 deletions

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
MiuiCamera.apk filter=lfs diff=lfs merge=lfs -text

View File

@@ -7,6 +7,9 @@
# Inherit from the proprietary version
$(call inherit-product, vendor/xiaomi/miuicamera/common/common-vendor.mk)
# MiuiCamera
PRODUCT_PACKAGES += MiuiCamera
# Dex
PRODUCT_DEXPREOPT_SPEED_APPS += \
MiuiCamera

27
MiuiCamera/Android.bp Normal file
View File

@@ -0,0 +1,27 @@
// Rule to merge MiuiCamera.apk parts into a single APK
genrule {
name: "merge_miui_camera",
srcs: [
"*.part", // Matches all files ending with .part
],
out: ["MiuiCamera.apk"],
cmd: "cat $(in) > $(out)",
}
// Import MiuiCamera
android_app_import {
name: "MiuiCamera",
apk: ":merge_miui_camera", // Reference the output of the genrule
certificate: "platform",
overrides: [
"Snap",
"Camera2",
"Aperture",
"GCamGOPrebuilt-V3",
],
owner: "xiaomi",
privileged: true,
dex_preopt: {
enabled: false,
},
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -459,18 +459,6 @@ cc_prebuilt_library_shared {
soc_specific: true,
}
android_app_import {
name: "MiuiCamera",
owner: "xiaomi/miuicamera",
apk: "proprietary/system/priv-app/MiuiCamera/MiuiCamera.apk",
overrides: ["Aperture", "Camera2", "GoogleCamera", "GoogleCameraGo"],
certificate: "platform",
dex_preopt: {
enabled: false,
},
privileged: true,
}
android_app_import {
name: "MiuiExtraPhoto",
owner: "xiaomi/miuicamera",

View File

@@ -39,7 +39,6 @@ PRODUCT_PACKAGES += \
vendor.xiaomi.hardware.misys@1.0 \
vendor.xiaomi.hardware.misys@2.0 \
vendor.xiaomi.hardware.misys@3.0 \
MiuiCamera \
MiuiExtraPhoto \
vendor.xiaomi.hardware.misys@1.0.xml \
vendor.xiaomi.hardware.misys@2.0.xml \

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9e144441bc627fb72993fed8c6b88c880fc70d13397340e1cc3e5cbe6974c4a
size 114297065

View File

@@ -32,7 +32,6 @@ vendor/lib64/vendor.xiaomi.hardware.misys@3.0.so
# MiuiCamera
system/lib64/libcamera_algoup_jni.xiaomi.so;SYMLINK=system/priv-app/MiuiCamera/lib/arm64/libcamera_algoup_jni.xiaomi.so
system/lib64/libcamera_mianode_jni.xiaomi.so;SYMLINK=system/priv-app/MiuiCamera/lib/arm64/libcamera_mianode_jni.xiaomi.so
system/priv-app/MiuiCamera/MiuiCamera.apk;OVERRIDES=Aperture,Camera2,GoogleCamera,GoogleCameraGo
# MiuiExtraPhoto
system/lib64/libdoc_photo.so;SYMLINK=system/priv-app/MiuiExtraPhoto/lib/arm64/libdoc_photo.so