Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ unica/mods/csc/*/** binary
unica/mods/rezetprop/system/bin/rezetprop binary

# Platform-specific prebuilt blobs
platform/exynos1280/patches/vendor/vendor/** binary
platform/exynos9820/patches/vendor/vendor/** binary
platform/exynos990/patches/vendor/vendor/** binary

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [beyond0lte, beyond1lte, beyond2lte, beyondx, x1s, y2s, z3s, c1s, c2s, r8s, o1s, t2s, p3s, r9s, r0s, b0s, g0s]
target: [beyond0lte, beyond1lte, beyond2lte, beyondx, x1s, y2s, z3s, c1s, c2s, r8s, o1s, t2s, p3s, r9s, r0s, b0s, g0s, a53x]

steps:
- name: Checkout repo
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
List of maintainers
-------------------

Exynos 1280
M: Ksawlii (@ksawlii)
S: Maintained
F: platform/exynos1280/*
F: target/a53x/*

Exynos 9820
M: ExtremeXT (@ExtremeXT)
S: Maintained
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Original UN1CA credits:
- *All the UN1CA project contributors and testers ❤️*

# Kernel sources and device trees
- 1280 Kernel Source Code (Maintainer: @Flopster101): https://github.com/FlopKernel-Series/flop_s5e8825_kernel/
- 9820 Kernel Source Code (Maintainer: @ExtremeXT): https://github.com/ExtremeXT/M62-backport
- 9820 Device Tree Code (Maintainer: @ExtremeXT): https://github.com/ExtremeXT/android_device_samsung_exynos9820
- 990 Kernel Source Code (Maintainer: @ExtremeXT): https://github.com/ExtremeXT/990_upstream_v2
Expand Down
57 changes: 57 additions & 0 deletions platform/exynos1280/debloat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#
# Copyright (C) 2025 Ksawlii
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

# Debloat list for Galaxy A53 5G (a53x)
# - Add entries inside the specific partition containing that file (<PARTITION>_DEBLOAT+="")
# - DO NOT add the partition name at the start of any entry (eg. "/system/dpolicy_system")
# - DO NOT add a slash at the start of any entry (eg. "/dpolicy_system")

# Overlays
SYSTEM_DEBLOAT+="
system/app/WifiRROverlayAppQC
system/app/WifiRROverlayAppWifiLock
"
PRODUCT_DEBLOAT+="
overlay/SoftapOverlay6GHz
overlay/SoftapOverlayOWE
overlay/SoftapOverlayQC
"

# Camera SDK
SYSTEM_DEBLOAT+="
system/etc/default-permissions/default-permissions-com.samsung.android.globalpostprocmgr.xml
system/etc/default-permissions/default-permissions-com.samsung.petservice.xml
system/etc/default-permissions/default-permissions-com.samsung.videoscan.xml
system/etc/permissions/cameraservice.xml
system/etc/permissions/privapp-permissions-com.samsung.android.globalpostprocmgr.xml
system/etc/permissions/privapp-permissions-com.samsung.petservice.xml
system/etc/permissions/privapp-permissions-com.samsung.videoscan.xml
system/etc/permissions/sec_camerax_impl.xml
system/etc/permissions/sec_camerax_service.xml
system/framework/sec_camerax_impl.jar
system/framework/scamera_sep.jar
system/priv-app/GlobalPostProcMgr
system/priv-app/PetService
system/priv-app/SCameraSDKService
system/priv-app/sec_camerax_service
system/priv-app/VideoScan
"

# mAFPC
SYSTEM_DEBLOAT+="
system/bin/mafpc_write
"
77 changes: 77 additions & 0 deletions platform/exynos1280/patches/camera/customize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
LOG_STEP_IN "- Replacing camare blobs"
BLOBS_LIST="
system/lib64/libface_recognition.arcsoft.so
system/lib64/libpic_best.arcsoft.so
system/lib64/libfrtracking_engine.arcsoft.so
system/lib64/libFaceRecognition.arcsoft.so
system/lib64/lib_pet_detection.arcsoft.so
system/lib64/libae_bracket_hdr.arcsoft.so
system/lib64/libdigital_tele_scope.arcsoft.so
system/lib64/libdigital_tele_scope_rawsr.arcsoft.so
system/lib64/libhybrid_high_dynamic_range.arcsoft.so
system/lib64/libenn_wrapper_system.so
"

for blob in $BLOBS_LIST
do
DELETE_FROM_WORK_DIR "system" "$blob" &
done

BLOBS_LIST="
system/lib/libFace_Landmark_API.camera.samsung.so
system/lib/libsecjpeginterface.camera.samsung.so
system/lib/libface_landmark.arcsoft.so
system/lib64/libUltraWideDistortionCorrection.camera.samsung.so
system/lib64/libFacialBasedSelfieCorrection.camera.samsung.so
system/lib64/libhumantracking.arcsoft.so
system/lib64/libPortraitDistortionCorrectionCali.arcsoft.so
system/lib64/libface_landmark.arcsoft.so
system/lib64/libFacialStickerEngine.arcsoft.so
system/lib64/libveengine.arcsoft.so
system/lib64/libimage_enhancement.arcsoft.so
system/lib64/liblow_light_hdr.arcsoft.so
system/lib64/libobjectcapture_jni.arcsoft.so
system/lib64/libobjectcapture.arcsoft.so
system/lib64/libFacialAttributeDetection.arcsoft.so
system/lib64/libHpr_RecFace_dl_v1.0.camera.samsung.so
system/lib64/libSceneDetector_v1.camera.samsung.so
system/lib64/libPortraitDistortionCorrection.arcsoft.so
system/lib64/vendor.samsung_slsi.hardware.eden_runtime@1.0.so
system/lib64/libhigh_dynamic_range.arcsoft.so
system/lib64/libsnap_aidl.snap.samsung.so
system/lib64/vendor.samsung.hardware.snap-V3-ndk.so
system/lib64/libMyFilterPlugin.camera.samsung.so
system/lib64/libeden_wrapper_system.so
system/lib64/libFacePreProcessing_jni.camera.samsung.so
system/lib64/libsaiv_HprFace_cmh_support_jni.camera.samsung.so
system/lib64/libHprFace_GAE_jni.camera.samsung.so
system/lib64/libFace_Landmark_Engine.camera.samsung.so
system/lib64/libFaceRestoration.camera.samsung.so
system/lib64/libHprFace_GAE_api.camera.samsung.so
system/lib64/libFace_Landmark_API.camera.samsung.so
system/lib64/libImageTagger.camera.samsung.so
"

for blob in $BLOBS_LIST
do
ADD_TO_WORK_DIR "$TARGET_FIRMWARE" "system" "$blob" 0 0 644 "u:object_r:system_lib_file:s0" &
done

# shellcheck disable=SC2046
wait $(jobs -p) || exit 1
LOG_STEP_OUT

LOG "- Fixing portrait mode"
sed -i "s/ro.product.name/ro.unica.camera/g" "$WORK_DIR/system/system/lib64/libDualCamBokehCapture.camera.samsung.so"

LOG_STEP_IN "- Fixing AI Photo Editor"
cp -fa \
"$WORK_DIR/system/system/cameradata/portrait_data/single_bokeh_feature.json" \
"$WORK_DIR/system/system/cameradata/portrait_data/nexus_bokeh_feature.json"
SET_METADATA "system" "system/cameradata/portrait_data/nexus_bokeh_feature.json" 0 0 644 "u:object_r:system_file:s0"
sed -i "s/MODEL_TYPE_INSTANCE_CAPTURE/MODEL_TYPE_OBJ_INSTANCE_CAPTURE/g" \
"$WORK_DIR/system/system/cameradata/portrait_data/single_bokeh_feature.json"
sed -i \
's/system\/cameradata\/portrait_data\/single_bokeh_feature.json/system\/cameradata\/portrait_data\/nexus_bokeh_feature.json\x00/g' \
"$WORK_DIR/system/system/lib64/libPortraitSolution.camera.samsung.so"
LOG_STEP_OUT
4 changes: 4 additions & 0 deletions platform/exynos1280/patches/camera/module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id=camera
name=Camera
author=Ksawlii
description=Some Camera Fixes.
11 changes: 11 additions & 0 deletions platform/exynos1280/patches/floppy/configs/a25x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
a25x_swa_open_w00_r00.dtbo
custom0=0x00000000
custom1=0x00000003

a25x_swa_open_w00_r04.dtbo
custom0=0x00000004
custom1=0x00000004

a25x_swa_open_w00_r05.dtbo
custom0=0x00000005
custom1=0x00000020
19 changes: 19 additions & 0 deletions platform/exynos1280/patches/floppy/configs/a33.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
a33x_eur_open_w00_r00.dtbo
custom0=0x00000000
custom1=0x00000000

a33x_eur_open_w00_r01.dtbo
custom0=0x00000001
custom1=0x00000001

a33x_eur_open_w00_r02.dtbo
custom0=0x00000002
custom1=0x00000002

a33x_eur_open_w00_r03.dtbo
custom0=0x00000003
custom1=0x00000003

a33x_eur_open_w00_r04.dtbo
custom0=0x00000004
custom1=0x00000020
19 changes: 19 additions & 0 deletions platform/exynos1280/patches/floppy/configs/a53x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
a53x_eur_open_w00_r00.dtbo
custom0=0x00000000
custom1=0x00000000

a53x_eur_open_w00_r01.dtbo
custom0=0x00000001
custom1=0x00000001

a53x_eur_open_w00_r02.dtbo
custom0=0x00000002
custom1=0x00000004

a53x_eur_open_w00_r05.dtbo
custom0=0x00000005
custom1=0x00000005

a53x_eur_open_w00_r06.dtbo
custom0=0x00000006
custom1=0x00000020
7 changes: 7 additions & 0 deletions platform/exynos1280/patches/floppy/configs/f34x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
m34x_swa_ins_w00_r00.dtbo
custom0=0x00000000
custom1=0x00000000

m34x_swa_ins_w00_r01.dtbo
custom0=0x00000001
custom1=0x00000020
11 changes: 11 additions & 0 deletions platform/exynos1280/patches/floppy/configs/m33x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
m33x_eur_open_w00_r00.dtbo
custom0=0x00000000
custom1=0x00000000

m33x_eur_open_w00_r01.dtbo
custom0=0x00000001
custom1=0x00000001

m33x_eur_open_w00_r02.dtbo
custom0=0x00000002
custom1=0x00000020
7 changes: 7 additions & 0 deletions platform/exynos1280/patches/floppy/configs/m34x.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
m34x_eur_open_w00_r00.dtbo
custom0=0x00000000
custom1=0x00000000

m34x_eur_open_w00_r01.dtbo
custom0=0x00000001
custom1=0x00000020
117 changes: 117 additions & 0 deletions platform/exynos1280/patches/floppy/customize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
BUILD_KERNEL()
{
local PARENT="$(pwd)"
cd "$KERNEL_TMP_DIR/floppy"

EVAL "./do_build.sh ku"

cd "$PARENT"
}

BUILD_DTBO_IMAGE()
{
local PARENT="$(pwd)"
cd "$KERNEL_TMP_DIR/floppy"

EVAL "mkdtboimg cfg_create "kernel_build/images/dtbo.img" "$SRC_DIR/platform/exynos1280/patches/floppy/configs/$TARGET_CODENAME.cfg" -d "out/arch/arm64/boot/dts/exynos/samsung/$TARGET_CODENAME""

cd "$PARENT"
}

SAFE_PULL_CHANGES()
{
set -eo pipefail

local PARENT="$(pwd)"
cd "$KERNEL_TMP_DIR/floppy"

git fetch origin

LOCAL="$(git rev-parse @)"
REMOTE="$(git rev-parse origin)"
BASE="$(git merge-base @ origin)"

# Now we have three cases that we need to take care of.
if [ "$LOCAL" = "$REMOTE" ]; then
LOG "- Local branch is up-to-date with remote"
elif [ "$LOCAL" = "$BASE" ]; then
LOG "- Fast-forward possible. Pulling"
git pull --ff-only
elif [ "$REMOTE" = "$BASE" ]; then
LOG "- Local branch is ahead of remote. Not doing anything"
else
cd "$PARENT"
LOGE "Remote history has diverged (possible force-push)"
fi

cd "$PARENT"
}

REPLACE_KERNEL_IMAGES()
{
local KERNEL_TMP_DIR="$KERNEL_TMP_DIR-s5e8825"
local FLOPPY_REPO="https://github.com/FlopKernel-Series/flop_s5e8825_kernel"

[ ! -d "$KERNEL_TMP_DIR" ] && mkdir -p "$KERNEL_TMP_DIR"

if [ -d "$KERNEL_TMP_DIR/floppy/.git" ]; then
LOG "- Existing git repo found, trying to pull latest changes"
if ! SAFE_PULL_CHANGES; then
LOGE "Could not pull latest Kernel changes. If you hold local changes, please rebase to the new base. If not, cleaning the kernel_tmp_dir should suffice."
fi
else
LOG "- Cloning FloppyKernel"
[ -d "$KERNEL_TMP_DIR/floppy" ] && rm -rf "$KERNEL_TMP_DIR/floppy"
EVAL "git clone "$FLOPPY_REPO" --single-branch "$KERNEL_TMP_DIR/floppy""
fi

LOG "- Running the kernel build script"
BUILD_KERNEL

LOG "- Building dtbo image"
BUILD_DTBO_IMAGE

# Move the files to the work dir
KERNEL_IMAGES=(dtbo.img boot_oneui.img vendor_boot.img)
for b in "${KERNEL_IMAGES[@]}"; do
[ -f "$WORK_DIR/kernel/$b" ] && rm -f "$WORK_DIR/kernel/$b"
cp -fa "$KERNEL_TMP_DIR/floppy/kernel_build/images/$b" "$WORK_DIR/kernel"
done
mv -f "$WORK_DIR/kernel/boot_oneui.img" "$WORK_DIR/kernel/boot.img"
}

ADD_KERNELSU_NEXT_MANAGER()
{
local KERNELSU_MANAGER_APK="https://github.com/KernelSU-Next/KernelSU-Next/releases/download/v1.0.9/KernelSU_Next_v1.0.9_12797-release.apk"
# https://github.com/tiann/KernelSU/issues/886
local APK_PATH="system/preload/KernelSU-Next/com.rifsxd.ksunext-mesa==/base.apk"

LOG "- Adding KernelSU-Next.apk to preload apps"
mkdir -p "$WORK_DIR/system/$(dirname "$APK_PATH")"
curl -L -s -o "$WORK_DIR/system/$APK_PATH" -z "$WORK_DIR/system/$APK_PATH" "$KERNELSU_MANAGER_APK"

sed -i "/system\/preload/d" "$WORK_DIR/configs/fs_config-system" \
&& sed -i "/system\/preload/d" "$WORK_DIR/configs/file_context-system"
while read -r i; do
FILE="$(echo -n "$i"| sed "s.$WORK_DIR/system/..")"
[ -d "$i" ] && echo "$FILE 0 0 755 capabilities=0x0" >> "$WORK_DIR/configs/fs_config-system"
[ -f "$i" ] && echo "$FILE 0 0 644 capabilities=0x0" >> "$WORK_DIR/configs/fs_config-system"
FILE="$(echo -n "$FILE" | sed 's/\./\\./g')"
echo "/$FILE u:object_r:system_file:s0" >> "$WORK_DIR/configs/file_context-system"
done <<< "$(find "$WORK_DIR/system/system/preload")"

rm -f "$WORK_DIR/system/system/etc/vpl_apks_count_list.txt"
while read -r i; do
FILE="$(echo "$i" | sed "s.$WORK_DIR/system..")"
echo "$FILE" >> "$WORK_DIR/system/system/etc/vpl_apks_count_list.txt"
done <<< "$(find "$WORK_DIR/system/system/preload" -name "*.apk" | sort)"
}

ADD_KERNELSU_NEXT_MANAGER &
REPLACE_KERNEL_IMAGES

# shellcheck disable=SC2046
wait $(jobs -p) || exit 1

rm -rf "$TMP_DIR"

4 changes: 4 additions & 0 deletions platform/exynos1280/patches/floppy/module.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id=floppy
name=FloppyKernel support
author=Ksawlii, Flopster101, @alyassin105g
description=Adds FloppyKernel in ROM.
Loading