Unofficial DerpFest Android 13 for Xiaomi Redmi 4X (santoni).
Maintained by ziachi.
This build requires DerpFest source + 7 custom repos. All patches are committed to forks — no manual/local patches needed.
| # | Component | Repository | Branch | Path in source tree |
|---|---|---|---|---|
| 1 | Device Tree | ziachi/device_xiaomi_santoni_derpfest | derp-13-dev |
device/xiaomi/santoni |
| 2 | Kernel | ziachi/kernel_xiaomi_msm8937_derpfest | derp-13-dev |
kernel/xiaomi/msm8937 |
| 3 | Vendor (device) | ziachi/vendor_xiaomi_santoni_derpfest | derp-13-dev |
vendor/xiaomi/santoni |
| 4 | Frameworks Base | ziachi/frameworks_base_derpfest | derp-13-dev |
frameworks/base |
| 5 | Settings | ziachi/packages_apps_Settings_derpfest | derp-13-dev |
packages/apps/Settings |
| 6 | Vendor (DerpFest) | ziachi/vendor_derp_derpfest | derp-13-dev |
vendor/derp |
| 7 | Calendar | ziachi/packages_apps_Calendar_derpfest | derp-13-dev |
packages/apps/Calendar |
- Ubuntu 22.04 (or WSL2)
- 200+ GB free disk space
- 16+ GB RAM (32 GB recommended)
- Fast internet for repo sync (~100 GB download)
mkdir derpfest && cd derpfest
repo init -u https://github.com/DerpFest-AOSP/manifest.git -b 13 --git-lfs
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags# Remove upstream repos that we replace
rm -rf device/xiaomi/santoni kernel/xiaomi/msm8937 vendor/xiaomi/santoni \
frameworks/base packages/apps/Settings vendor/derp packages/apps/Calendar
# Clone all custom repos
git clone -b derp-13-dev https://github.com/ziachi/device_xiaomi_santoni_derpfest.git \
device/xiaomi/santoni
git clone -b derp-13-dev https://github.com/ziachi/kernel_xiaomi_msm8937_derpfest.git \
kernel/xiaomi/msm8937
git clone -b derp-13-dev https://github.com/ziachi/vendor_xiaomi_santoni_derpfest.git \
vendor/xiaomi/santoni
git clone -b derp-13-dev https://github.com/ziachi/frameworks_base_derpfest.git \
frameworks/base
git clone -b derp-13-dev https://github.com/ziachi/packages_apps_Settings_derpfest.git \
packages/apps/Settings
git clone -b derp-13-dev https://github.com/ziachi/vendor_derp_derpfest.git \
vendor/derp
git clone -b derp-13-dev https://github.com/ziachi/packages_apps_Calendar_derpfest.git \
packages/apps/Calendarln -sf $(pwd)/prebuilts/clang/host/linux-x86/clang-r450784d/bin/ld.lld \
prebuilts/build-tools/path/linux-x86/ldThis is a build environment fix —
ldis missing from AOSP build-tools for kernel compilation.
source build/envsetup.sh
lunch derp_santoni-userdebug
mka derp -j$(nproc)Build output: out/target/product/santoni/DerpFest-13-Unofficial-Tango-santoni-*.zip
- Boot into custom recovery (TWRP / OrangeFox)
- Wipe System, Data, Cache, Dalvik
- Flash
DerpFest-13-Unofficial-*.zip - (Optional) Flash GApps ZIP — Pico/Nano recommended (system partition is 3 GB)
- Reboot
- Vanilla build — no GApps included (3 GB system partition too small for built-in GApps)
- Uses AOSP clang
r450784dfor kernel compilation - SELinux: Enforcing
- Spectrum kernel profiles — Balance / Performance / Battery / Gaming (Quick Settings tile)
- Setup Wizard — set to OPTIONAL (auto-provisions when no Setup Wizard present)
- LiveDisplay — disabled (MSM8937 has no SDM HAL support)
- Power HAL — uses AOSP example HAL (QTI AIDL v3 incompatible with kernel 4.9)
| Commit | Description |
|---|---|
2851d711 |
Spectrum QS tile — Quick Settings tile for kernel profile switching |
0faf8796 |
SystemUIGoogle privapp permissions — add missing allowlist entries |
a3d667c5 |
Reticker crash fix — isAttachedToWindow() guard before createCircularReveal() |
| Commit | Description |
|---|---|
0b559483 |
Set maintainer info to ziachi |
| Commit | Description |
|---|---|
24cb349 |
Make WITH_GMS conditional — allows vanilla build without GApps |
| Commit | Description |
|---|---|
95291a1 |
Fix FragmentManager crash in GeneralPreferences (vanilla build) |
If you're an AI agent building this ROM, here's the quick reference:
# Full build sequence (after repo sync + clones + ld symlink)
cd ~/derpfest
source build/envsetup.sh
lunch derp_santoni-userdebug
mka derp -j$(nproc)Key facts:
- Lunch target:
derp_santoni-userdebug - Build command:
mka derp(NOTmka bacon) - Vendor inherit:
vendor/derp/config/common_full_phone.mk - Clang version:
r450784d(NOTzyc_clang) WITH_GMS := falseinderp_santoni.mk- System partition: 3 GB max — vanilla only
- SELinux must stay Enforcing
- All patches are in fork repos — clone all 7 repos from the Repository Map
Common build errors:
| Error | Fix |
|---|---|
ld not found in sbox |
Symlink ld → ld.lld in prebuilts/build-tools/path/linux-x86/ |
| System image too large | Ensure WITH_GMS := false in derp_santoni.mk |
| Power HAL bootloop | Already fixed — uses android.hardware.power-service.example |
| About Phone | Recents + Play Integrity |
|---|---|
![]() |
![]() |
| Feature | Specification |
|---|---|
| CPU | Octa-core 1.4 GHz Cortex-A53 |
| Chipset | Qualcomm MSM8940 Snapdragon 435 |
| GPU | Adreno 505 |
| Memory | 2/3 GB |
| Shipped Android Version | 6.0.1 |
| Storage | 16/32 GB |
| MicroSD | Up to 256 GB |
| Battery | 4100 mAh (non-removable) |
| Dimensions | 139 x 69 x 8.65 mm |
| Display | 720 x 1280 pixels, 5" (~294 PPI) |
| Rear Camera | 13 MP, LED flash |
| Front Camera | 5 MP |
| Release Date | May 2017 |
- androidsantoni — Original device tree (RisingOS 13 base)
- DerpFest-AOSP — ROM source
See CHANGELOG.md

