diff --git a/atomic-recovery.diff b/source-patches/atomic-recovery.diff similarity index 100% rename from atomic-recovery.diff rename to source-patches/atomic-recovery.diff diff --git a/source-patches/update-switch-server-url.diff b/source-patches/update-switch-server-url.diff new file mode 100644 index 0000000..159fcf6 --- /dev/null +++ b/source-patches/update-switch-server-url.diff @@ -0,0 +1,23 @@ +From fd9fd7200814c3527e46b02e3c3232e275285312 Mon Sep 17 00:00:00 2001 +From: Abdulwahab Isam +Date: Sat, 15 Mar 2025 09:29:02 +0300 +Subject: [PATCH] official_devices: switch to my repo + +Signed-off-by: Abdulwahab Isam +--- + app/src/main/res/values/strings.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml +index 48b8a95..31fedea 100644 +--- a/app/src/main/res/values/strings.xml ++++ b/app/src/main/res/values/strings.xml +@@ -31,7 +31,7 @@ + {device} - Device name + {variant} - Build variant + --> +- https://raw.githubusercontent.com/AxionAOSP/official_devices/refs/heads/main/OTA/{variant}/{device}.json ++ https://raw.githubusercontent.com/ai94iq/axion_official_devices/refs/heads/main/OTA/{variant}/{device}.json + + Verification failed + Verifying update \ No newline at end of file diff --git a/source-patches/vendor-enable-split-notifications.diff b/source-patches/vendor-enable-split-notifications.diff new file mode 100644 index 0000000..5bec8f8 --- /dev/null +++ b/source-patches/vendor-enable-split-notifications.diff @@ -0,0 +1,40 @@ +From 583031a436f448e519c3a6fea79ede078242e86e Mon Sep 17 00:00:00 2001 +From: Abdulwahab Isam +Date: Sat, 15 Mar 2025 09:27:30 +0300 +Subject: [PATCH] Revert "overlays: Disable split shade for tablets" + +This reverts commit decf8b582ae4daedd7e5b6a8f2369a3b48082065. +--- + .../res/values-sw600dp-land/config.xml | 23 ------------------- + 1 file changed, 23 deletions(-) + delete mode 100644 overlay/common/frameworks/base/packages/SystemUI/res/values-sw600dp-land/config.xml + +diff --git a/overlay/common/frameworks/base/packages/SystemUI/res/values-sw600dp-land/config.xml b/overlay/common/frameworks/base/packages/SystemUI/res/values-sw600dp-land/config.xml +deleted file mode 100644 +index 33b6a31319..0000000000 +--- a/overlay/common/frameworks/base/packages/SystemUI/res/values-sw600dp-land/config.xml ++++ /dev/null +@@ -1,23 +0,0 @@ +- +- +- +- +- +- +- false +- \ No newline at end of file diff --git a/vendorsetup.sh b/vendorsetup.sh index 45e06f1..069397e 100644 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -26,7 +26,7 @@ clone_if_missing "https://github.com/ai94iq/cr-android_hardware_xiaomi" "15.0" " # Store the root directory and device paths ROOT_DIR="$(pwd)" DEVICE_PATH="${ROOT_DIR}/device/xiaomi/pipa" - PATCH_PATH="${DEVICE_PATH}/atomic-recovery.diff" + PATCH_PATH="${DEVICE_PATH}/source-patches/atomic-recovery.diff" # Check if patch file exists if [ ! -f "$PATCH_PATH" ]; then @@ -52,3 +52,67 @@ clone_if_missing "https://github.com/ai94iq/cr-android_hardware_xiaomi" "15.0" " # Return to original directory cd "${ROOT_DIR}" || echo "Warning: Failed to return to original directory" ) + +# Apply update-switch-server-url patch +( + # Store the root directory and device paths + ROOT_DIR="$(pwd)" + DEVICE_PATH="${ROOT_DIR}/device/xiaomi/pipa" + PATCH_PATH="${DEVICE_PATH}/source-patches/update-switch-server-url.diff" + + # Check if patch file exists + if [ ! -f "$PATCH_PATH" ]; then + echo "Error: Patch file not found at ${PATCH_PATH}" + exit 1 + fi + + # Enter Updater directory + cd packages/apps/Updater || { + echo "Error: Could not change to packages/apps/Updater directory" + exit 1 + } + + echo "Applying update-switch-server-url patch from ${PATCH_PATH}..." + if git am "${PATCH_PATH}"; then + echo "Patch applied successfully" + else + echo "Patch failed to apply, cleaning up..." + git am --abort + exit 1 + fi + + # Return to original directory + cd "${ROOT_DIR}" || echo "Warning: Failed to return to original directory" +) + +# Apply vendor-enable-split-notifications patch +( + # Store the root directory and device paths + ROOT_DIR="$(pwd)" + DEVICE_PATH="${ROOT_DIR}/device/xiaomi/pipa" + PATCH_PATH="${DEVICE_PATH}/source-patches/vendor-enable-split-notifications.diff" + + # Check if patch file exists + if [ ! -f "$PATCH_PATH" ]; then + echo "Error: Patch file not found at ${PATCH_PATH}" + exit 1 + fi + + # Enter vendor/lineage directory + cd vendor/lineage || { + echo "Error: Could not change to vendor/lineage directory" + exit 1 + } + + echo "Applying vendor-enable-split-notifications patch from ${PATCH_PATH}..." + if git am "${PATCH_PATH}"; then + echo "Patch applied successfully" + else + echo "Patch failed to apply, cleaning up..." + git am --abort + exit 1 + fi + + # Return to original directory + cd "${ROOT_DIR}" || echo "Warning: Failed to return to original directory" +) \ No newline at end of file