Compare commits
10 Commits
712b25f786
...
6156a43052
Author | SHA1 | Date | |
---|---|---|---|
|
6156a43052 | ||
|
8098c6143c | ||
|
13a8776665 | ||
|
c12dc0d8a7 | ||
|
0739aa6e5a | ||
|
7d90015f98 | ||
|
18bcc482e7 | ||
|
1de918fbc4 | ||
|
1400cac197 | ||
|
a3448c828f |
11
blob-patches/BackupAgent.patch
Normal file
11
blob-patches/BackupAgent.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -72,7 +72,7 @@
|
||||
<package android:name="com.xiaomi.scanner"/>
|
||||
<package android:name="com.android.htmlviewer"/>
|
||||
</queries>
|
||||
- <application android:allowBackup="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:backupAgent="com.android.camera.backup.CameraBackupAgent" android:extractNativeLibs="false" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher_camera_cv" android:label="@string/camera_label" android:largeHeap="true" android:name="com.android.camera.CameraAppImpl" android:networkSecurityConfig="@xml/network_security_config" android:resizeableActivity="false" android:supportsRtl="true" android:theme="@style/ThemeCamera">
|
||||
+ <application android:allowBackup="false" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:extractNativeLibs="false" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher_camera_cv" android:label="@string/camera_label" android:largeHeap="true" android:name="com.android.camera.CameraAppImpl" android:networkSecurityConfig="@xml/network_security_config" android:resizeableActivity="false" android:supportsRtl="true" android:theme="@style/ThemeCamera">
|
||||
<meta-data android:name="required_permissions" android:value="@string/required_permissions_supportModifiable"/>
|
||||
<meta-data android:name="miui.supportRequiredModifiable" android:value="true"/>
|
||||
<meta-data android:name="com.miui.bugreport.LOG_DIR" android:resource="@xml/log_paths"/>
|
61
blob-patches/ReadoutTimestamp.patch
Normal file
61
blob-patches/ReadoutTimestamp.patch
Normal file
@ -0,0 +1,61 @@
|
||||
--- a/smali_classes2/com/xiaomi/protocol/ICustomCaptureResult.smali
|
||||
+++ b/smali_classes2/com/xiaomi/protocol/ICustomCaptureResult.smali
|
||||
@@ -346,7 +346,7 @@
|
||||
.end method
|
||||
|
||||
.method public static toTotalCaptureResult(Lcom/xiaomi/protocol/ICustomCaptureResult;IZ)Landroid/hardware/camera2/TotalCaptureResult;
|
||||
- .locals 23
|
||||
+ .locals 27
|
||||
|
||||
const-string v0, "android.hardware.camera2.impl.PhysicalCaptureResultInfo"
|
||||
|
||||
@@ -434,7 +434,7 @@
|
||||
|
||||
if-lt v7, v8, :cond_0
|
||||
|
||||
- const/16 v7, 0xb
|
||||
+ const/16 v7, 0xd
|
||||
|
||||
:try_start_1
|
||||
new-array v8, v7, [Ljava/lang/Class;
|
||||
@@ -488,6 +488,18 @@
|
||||
|
||||
aput-object v19, v8, v21
|
||||
|
||||
+ sget-object v19, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
|
||||
+
|
||||
+ const/16 v23, 0xb
|
||||
+
|
||||
+ aput-object v19, v8, v23
|
||||
+
|
||||
+ sget-object v19, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
|
||||
+
|
||||
+ const/16 v24, 0xc
|
||||
+
|
||||
+ aput-object v19, v8, v24
|
||||
+
|
||||
.line 8
|
||||
invoke-virtual {v1, v8}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
|
||||
|
||||
@@ -565,6 +577,22 @@
|
||||
|
||||
aput-object v19, v7, v21
|
||||
|
||||
+ const/16 v25, 0x0
|
||||
+
|
||||
+ invoke-static/range {v25 .. v25}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
||||
+
|
||||
+ move-result-object v19
|
||||
+
|
||||
+ aput-object v19, v7, v23
|
||||
+
|
||||
+ const/16 v26, 0x0
|
||||
+
|
||||
+ invoke-static/range {v26 .. v26}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||||
+
|
||||
+ move-result-object v19
|
||||
+
|
||||
+ aput-object v19, v7, v24
|
||||
+
|
||||
.line 11
|
||||
invoke-virtual {v8, v7}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
|
@ -16,10 +16,10 @@ cc_prebuilt_library_shared {
|
||||
target: {
|
||||
android_arm64: {
|
||||
srcs: ["proprietary/system/lib64/libcamera_algoup_jni.xiaomi.so"],
|
||||
shared_libs: ["libgui_shim_miuicamera", "libandroid", "libandroid_runtime", "libbase", "libbinder", "libcamera_client", "libcamera_metadata", "libcutils", "libgui", "liblog", "libmedia_jni_utils", "libnativehelper", "libnativewindow", "libui", "libutils", "libvndksupport", "android.hidl.token@1.0-utils", "libc++", "libc", "libm", "libdl", ],
|
||||
},
|
||||
},
|
||||
compile_multilib: "64",
|
||||
check_elf_files: false,
|
||||
prefer: true,
|
||||
}
|
||||
|
||||
@ -32,10 +32,10 @@ cc_prebuilt_library_shared {
|
||||
target: {
|
||||
android_arm64: {
|
||||
srcs: ["proprietary/system/lib64/libcamera_mianode_jni.xiaomi.so"],
|
||||
shared_libs: ["libgui_shim_miuicamera", "libandroid", "libbinder", "libcamera_client", "libcamera_metadata", "libcutils", "libgui", "liblog", "libmedia_jni_utils", "libui", "libutils", "libvndksupport", "libxml2", "libc++", "libc", "libm", "libdl", ],
|
||||
},
|
||||
},
|
||||
compile_multilib: "64",
|
||||
check_elf_files: false,
|
||||
prefer: true,
|
||||
}
|
||||
|
||||
@ -48,10 +48,10 @@ cc_prebuilt_library_shared {
|
||||
target: {
|
||||
android_arm64: {
|
||||
srcs: ["proprietary/system/lib64/libmicampostproc_client.so"],
|
||||
shared_libs: ["liblog", "libutils", "libcutils", "libhardware", "libnativewindow", "libEGL", "libGLESv2", "libfmq", "libgui", "libui", "libcamera_client", "libcamera_metadata", "libmedia_jni_utils", "libnativehelper", "libhidlbase", "vendor.xiaomi.hardware.campostproc@1.0", "libc++", "libc", "libm", "libdl", ],
|
||||
},
|
||||
},
|
||||
compile_multilib: "64",
|
||||
check_elf_files: false,
|
||||
prefer: true,
|
||||
}
|
||||
|
||||
@ -64,47 +64,13 @@ cc_prebuilt_library_shared {
|
||||
target: {
|
||||
android_arm64: {
|
||||
srcs: ["proprietary/system/lib64/vendor.xiaomi.hardware.campostproc@1.0.so"],
|
||||
shared_libs: ["android.hardware.camera.common@1.0", "libhidlbase", "liblog", "libutils", "libcutils", "libc++", "libc", "libm", "libdl", ],
|
||||
},
|
||||
},
|
||||
compile_multilib: "64",
|
||||
check_elf_files: false,
|
||||
prefer: true,
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "libarcdualcamsat",
|
||||
owner: "xiaomi",
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
target: {
|
||||
android_arm64: {
|
||||
srcs: ["proprietary/vendor/lib64/libarcdualcamsat.so"],
|
||||
},
|
||||
},
|
||||
compile_multilib: "64",
|
||||
check_elf_files: false,
|
||||
prefer: true,
|
||||
soc_specific: true,
|
||||
}
|
||||
|
||||
cc_prebuilt_library_shared {
|
||||
name: "libarcsat",
|
||||
owner: "xiaomi",
|
||||
strip: {
|
||||
none: true,
|
||||
},
|
||||
target: {
|
||||
android_arm64: {
|
||||
srcs: ["proprietary/vendor/lib64/libarcsat.so"],
|
||||
},
|
||||
},
|
||||
compile_multilib: "64",
|
||||
check_elf_files: false,
|
||||
prefer: true,
|
||||
soc_specific: true,
|
||||
}
|
||||
|
||||
android_app_import {
|
||||
name: "MiuiCamera",
|
||||
owner: "xiaomi",
|
||||
|
@ -11,6 +11,4 @@ PRODUCT_PACKAGES += \
|
||||
libcamera_mianode_jni.xiaomi \
|
||||
libmicampostproc_client \
|
||||
vendor.xiaomi.hardware.campostproc@1.0 \
|
||||
libarcdualcamsat \
|
||||
libarcsat \
|
||||
MiuiCamera
|
||||
|
Binary file not shown.
BIN
common/proprietary/vendor/lib64/libarcdualcamsat.so
vendored
BIN
common/proprietary/vendor/lib64/libarcdualcamsat.so
vendored
Binary file not shown.
BIN
common/proprietary/vendor/lib64/libarcsat.so
vendored
BIN
common/proprietary/vendor/lib64/libarcsat.so
vendored
Binary file not shown.
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
@ -17,6 +16,8 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
export TARGET_ENABLE_CHECKELF=true
|
||||
|
||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
echo "Unable to find helper script at ${HELPER}"
|
||||
@ -32,19 +33,20 @@ SECTION=
|
||||
|
||||
while [ "${#}" -gt 0 ]; do
|
||||
case "${1}" in
|
||||
-n | --no-cleanup )
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
-k | --kang )
|
||||
KANG="--kang"
|
||||
;;
|
||||
-s | --section )
|
||||
SECTION="${2}"; shift
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
* )
|
||||
SRC="${1}"
|
||||
;;
|
||||
-n | --no-cleanup)
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
-k | --kang)
|
||||
KANG="--kang"
|
||||
;;
|
||||
-s | --section)
|
||||
SECTION="${2}"
|
||||
shift
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
*)
|
||||
SRC="${1}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
@ -55,19 +57,29 @@ fi
|
||||
|
||||
function blob_fixup() {
|
||||
case "${1}" in
|
||||
system/priv-app/MiuiCamera/MiuiCamera.apk)
|
||||
[ "$2" = "" ] && return 0
|
||||
apktool_patch "${2}" "$MY_DIR/blob-patches"
|
||||
;;
|
||||
system/lib64/libcamera_algoup_jni.xiaomi.so|system/lib64/libcamera_mianode_jni.xiaomi.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
grep -q "libgui_shim_miuicamera.so" "${2}" || "${PATCHELF}" --add-needed "libgui_shim_miuicamera.so" "${2}"
|
||||
;;
|
||||
system/lib64/libmicampostproc_client.so)
|
||||
[ "$2" = "" ] && return 0
|
||||
"${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if [ -z "$SRC" ]; then
|
||||
echo "Path to system dump not specified! Specify one with --path"
|
||||
exit 1
|
||||
fi
|
||||
function blob_fixup_dry() {
|
||||
blob_fixup "$1" ""
|
||||
}
|
||||
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||
|
@ -22,10 +22,6 @@ PRODUCT_DEXPREOPT_SPEED_APPS += \
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/xiaomi/sweet-miuicamera/configs/permissions/privapp-permissions-miuicamera.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-miuicamera.xml
|
||||
|
||||
# Shims
|
||||
PRODUCT_PACKAGES += \
|
||||
libgui_shim_miuicamera
|
||||
|
||||
# Sysconfig
|
||||
PRODUCT_COPY_FILES += \
|
||||
vendor/xiaomi/sweet-miuicamera/configs/sysconfig/miuicamera-hiddenapi-package-whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/miuicamera-hiddenapi-package-whitelist.xml
|
||||
|
@ -1,9 +1,7 @@
|
||||
# These proprietary files are extracted from Redmi Note 10 Pro (codenamed `sweet`) MIUI V14.0.9.0.TKFMIXM, unless pinned
|
||||
|
||||
-product/priv-app/MiuiCamera/MiuiCamera.apk:system/priv-app/MiuiCamera/MiuiCamera.apk;OVERRIDES=Aperture,Snap,Camera2,GoogleCameraGo|0a5f5e9c5158ade7d23bd1501dde4228191b1f30
|
||||
-system/lib64/libcamera_algoup_jni.xiaomi.so
|
||||
-system/lib64/libcamera_mianode_jni.xiaomi.so
|
||||
-system/lib64/libmicampostproc_client.so
|
||||
-system/lib64/vendor.xiaomi.hardware.campostproc@1.0.so
|
||||
-vendor/lib64/libarcdualcamsat.so
|
||||
-vendor/lib64/libarcsat.so
|
||||
product/priv-app/MiuiCamera/MiuiCamera.apk:system/priv-app/MiuiCamera/MiuiCamera.apk;OVERRIDES=Aperture,Snap,Camera2,GoogleCameraGo
|
||||
system/lib64/libcamera_algoup_jni.xiaomi.so
|
||||
system/lib64/libcamera_mianode_jni.xiaomi.so
|
||||
system/lib64/libmicampostproc_client.so
|
||||
system/lib64/vendor.xiaomi.hardware.campostproc@1.0.so
|
||||
|
2
sepolicy/vendor/miuicamera_app.te
vendored
2
sepolicy/vendor/miuicamera_app.te
vendored
@ -12,4 +12,6 @@ allow miuicamera_app {
|
||||
mediaserver_service
|
||||
}:service_manager find;
|
||||
|
||||
allow miuicamera_app proc_stat:file r_file_perms;
|
||||
|
||||
dontaudit miuicamera_app radio_service:service_manager find;
|
||||
|
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
@ -17,6 +16,8 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
|
||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||
|
||||
export TARGET_ENABLE_CHECKELF=true
|
||||
|
||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
echo "Unable to find helper script at ${HELPER}"
|
||||
|
Loading…
Reference in New Issue
Block a user