Skip to content

Commit b8b18fa

Browse files
committed
[v3] santoni: Update README with full build map (#13)
Problem: README lacked complete build instructions and screenshots Fix: Added full repository map (7 repos), step-by-step build guide, AI agent quick reference, screenshots section Files: README.md, docs/screenshot/about_phone.png, docs/screenshot/recents_overview.png Impact: Anyone (human or AI) can build from scratch — clone 7 repos + build
1 parent bb61a25 commit b8b18fa

3 files changed

Lines changed: 152 additions & 46 deletions

File tree

README.md

Lines changed: 152 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,192 @@
11
# DerpFest 13 — Xiaomi Redmi 4X (santoni)
22

3-
Device tree for building [DerpFest](https://github.com/DerpFest-AOSP) Android 13 for Xiaomi Redmi 4X (santoni).
3+
Unofficial DerpFest Android 13 for Xiaomi Redmi 4X (santoni).
44

5-
## Repositories
5+
Maintained by [ziachi](https://github.com/ziachi).
66

7-
| Component | Repository | Branch |
8-
|:----------|:-----------|:-------|
9-
| **Device Tree** | [ziachi/device_xiaomi_santoni_derpfest](https://github.com/ziachi/device_xiaomi_santoni_derpfest) | `derp-13-dev` |
10-
| **Kernel** | [ziachi/kernel_xiaomi_msm8937_derpfest](https://github.com/ziachi/kernel_xiaomi_msm8937_derpfest) | `derp-13-dev` |
11-
| **Vendor** | [ziachi/vendor_xiaomi_santoni_derpfest](https://github.com/ziachi/vendor_xiaomi_santoni_derpfest) | `derp-13-dev` |
12-
| **Frameworks Base** | [ziachi/frameworks_base_derpfest](https://github.com/ziachi/frameworks_base_derpfest/tree/derp-13-dev) | `derp-13-dev` |
7+
## Repository Map
138

14-
## Build Notes
9+
This build requires DerpFest source + 7 custom repos. All patches are committed to forks — no manual/local patches needed.
1510

16-
- **Vanilla build** — no GApps included (3GB system partition too small)
17-
- Flash GApps (Pico/Nano/Full) separately via recovery after installing ROM
18-
- Uses AOSP clang `r450784d` for kernel compilation
19-
- SELinux: **Enforcing**
20-
- **Spectrum kernel profiles** — Balance, Performance, Battery, Gaming (QS tile)
21-
- **Setup Wizard** — set to OPTIONAL (auto-provisions when no Setup Wizard present)
22-
- **LiveDisplay** — disabled (MSM8937 has no SDM HAL support)
11+
| # | Component | Repository | Branch | Path in source tree |
12+
|:-:|:----------|:-----------|:-------|:--------------------|
13+
| 1 | **Device Tree** | [ziachi/device_xiaomi_santoni_derpfest](https://github.com/ziachi/device_xiaomi_santoni_derpfest) | `derp-13-dev` | `device/xiaomi/santoni` |
14+
| 2 | **Kernel** | [ziachi/kernel_xiaomi_msm8937_derpfest](https://github.com/ziachi/kernel_xiaomi_msm8937_derpfest) | `derp-13-dev` | `kernel/xiaomi/msm8937` |
15+
| 3 | **Vendor (device)** | [ziachi/vendor_xiaomi_santoni_derpfest](https://github.com/ziachi/vendor_xiaomi_santoni_derpfest) | `derp-13-dev` | `vendor/xiaomi/santoni` |
16+
| 4 | **Frameworks Base** | [ziachi/frameworks_base_derpfest](https://github.com/ziachi/frameworks_base_derpfest) | `derp-13-dev` | `frameworks/base` |
17+
| 5 | **Settings** | [ziachi/packages_apps_Settings_derpfest](https://github.com/ziachi/packages_apps_Settings_derpfest) | `derp-13-dev` | `packages/apps/Settings` |
18+
| 6 | **Vendor (DerpFest)** | [ziachi/vendor_derp_derpfest](https://github.com/ziachi/vendor_derp_derpfest) | `derp-13-dev` | `vendor/derp` |
19+
| 7 | **Calendar** | [ziachi/packages_apps_Calendar_derpfest](https://github.com/ziachi/packages_apps_Calendar_derpfest) | `derp-13-dev` | `packages/apps/Calendar` |
2320

24-
## Spec Sheet
21+
## Build Guide
22+
23+
### Prerequisites
2524

26-
| Feature | Specification |
27-
| :---------------------- | :-------------------------------- |
28-
| CPU | Octa-core 1.4 GHz Cortex-A53 |
29-
| Chipset | Qualcomm MSM8940 Snapdragon 435 |
30-
| GPU | Adreno 505 |
31-
| Memory | 2/3 GB |
32-
| Shipped Android Version | 6.0.1 |
33-
| Storage | 16/32 GB |
34-
| MicroSD | Up to 256 GB |
35-
| Battery | 4100 mAh (non-removable) |
36-
| Dimensions | 139 x 69 x 8.65 mm |
37-
| Display | 720 x 1280 pixels, 5" (~294 PPI) |
38-
| Rear Camera | 13 MP, LED flash |
39-
| Front Camera | 5 MP |
40-
| Release Date | May 2017 |
41-
42-
## Setup Guide
43-
44-
### 1. Initialize DerpFest manifest
25+
- Ubuntu 22.04 (or WSL2)
26+
- 200+ GB free disk space
27+
- 16+ GB RAM (32 GB recommended)
28+
- Fast internet for repo sync (~100 GB download)
29+
30+
### Step 1 — Initialize DerpFest source
4531

4632
```bash
33+
mkdir derpfest && cd derpfest
4734
repo init -u https://github.com/DerpFest-AOSP/manifest.git -b 13 --git-lfs
4835
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
4936
```
5037

51-
### 2. Clone device repos
38+
### Step 2 — Replace upstream repos with forks
5239

5340
```bash
54-
# Device tree
41+
# Remove upstream repos that we replace
42+
rm -rf device/xiaomi/santoni kernel/xiaomi/msm8937 vendor/xiaomi/santoni \
43+
frameworks/base packages/apps/Settings vendor/derp packages/apps/Calendar
44+
45+
# Clone all custom repos
5546
git clone -b derp-13-dev https://github.com/ziachi/device_xiaomi_santoni_derpfest.git \
5647
device/xiaomi/santoni
5748

58-
# Kernel
5949
git clone -b derp-13-dev https://github.com/ziachi/kernel_xiaomi_msm8937_derpfest.git \
6050
kernel/xiaomi/msm8937
6151

62-
# Vendor
6352
git clone -b derp-13-dev https://github.com/ziachi/vendor_xiaomi_santoni_derpfest.git \
6453
vendor/xiaomi/santoni
54+
55+
git clone -b derp-13-dev https://github.com/ziachi/frameworks_base_derpfest.git \
56+
frameworks/base
57+
58+
git clone -b derp-13-dev https://github.com/ziachi/packages_apps_Settings_derpfest.git \
59+
packages/apps/Settings
60+
61+
git clone -b derp-13-dev https://github.com/ziachi/vendor_derp_derpfest.git \
62+
vendor/derp
63+
64+
git clone -b derp-13-dev https://github.com/ziachi/packages_apps_Calendar_derpfest.git \
65+
packages/apps/Calendar
6566
```
6667

67-
### 3. Build
68+
### Step 3 — Fix linker symlink
69+
70+
```bash
71+
ln -sf $(pwd)/prebuilts/clang/host/linux-x86/clang-r450784d/bin/ld.lld \
72+
prebuilts/build-tools/path/linux-x86/ld
73+
```
74+
75+
> This is a build environment fix — `ld` is missing from AOSP build-tools for kernel compilation.
76+
77+
### Step 4 — Build
6878

6979
```bash
7080
source build/envsetup.sh
7181
lunch derp_santoni-userdebug
72-
mka derp
82+
mka derp -j$(nproc)
7383
```
7484

75-
> **Note:** This is a vanilla build. Flash GApps package after installing the ROM ZIP.
85+
Build output: `out/target/product/santoni/DerpFest-13-Unofficial-Tango-santoni-*.zip`
86+
87+
### Step 5 — Flash
7688

77-
## Device Picture
89+
1. Boot into custom recovery (TWRP / OrangeFox)
90+
2. Wipe System, Data, Cache, Dalvik
91+
3. Flash `DerpFest-13-Unofficial-*.zip`
92+
4. (Optional) Flash GApps ZIP — Pico/Nano recommended (system partition is 3 GB)
93+
5. Reboot
94+
95+
## Build Notes
96+
97+
- **Vanilla build** — no GApps included (3 GB system partition too small for built-in GApps)
98+
- Uses AOSP clang `r450784d` for kernel compilation
99+
- SELinux: **Enforcing**
100+
- **Spectrum kernel profiles** — Balance / Performance / Battery / Gaming (Quick Settings tile)
101+
- **Setup Wizard** — set to OPTIONAL (auto-provisions when no Setup Wizard present)
102+
- **LiveDisplay** — disabled (MSM8937 has no SDM HAL support)
103+
- **Power HAL** — uses AOSP example HAL (QTI AIDL v3 incompatible with kernel 4.9)
104+
105+
## Custom Patches in Forks
106+
107+
### frameworks_base_derpfest
108+
109+
| Commit | Description |
110+
|:-------|:------------|
111+
| `2851d711` | Spectrum QS tile — Quick Settings tile for kernel profile switching |
112+
| `0faf8796` | SystemUIGoogle privapp permissions — add missing allowlist entries |
113+
| `a3d667c5` | Reticker crash fix — isAttachedToWindow() guard before createCircularReveal() |
114+
115+
### packages_apps_Settings_derpfest
116+
117+
| Commit | Description |
118+
|:-------|:------------|
119+
| `0b559483` | Set maintainer info to ziachi |
120+
121+
### vendor_derp_derpfest
122+
123+
| Commit | Description |
124+
|:-------|:------------|
125+
| `24cb349` | Make WITH_GMS conditional — allows vanilla build without GApps |
126+
127+
### packages_apps_Calendar_derpfest
128+
129+
| Commit | Description |
130+
|:-------|:------------|
131+
| `95291a1` | Fix FragmentManager crash in GeneralPreferences (vanilla build) |
132+
133+
## For AI Agents
134+
135+
If you're an AI agent building this ROM, here's the quick reference:
136+
137+
```bash
138+
# Full build sequence (after repo sync + clones + ld symlink)
139+
cd ~/derpfest
140+
source build/envsetup.sh
141+
lunch derp_santoni-userdebug
142+
mka derp -j$(nproc)
143+
```
144+
145+
**Key facts:**
146+
- Lunch target: `derp_santoni-userdebug`
147+
- Build command: `mka derp` (NOT `mka bacon`)
148+
- Vendor inherit: `vendor/derp/config/common_full_phone.mk`
149+
- Clang version: `r450784d` (NOT `zyc_clang`)
150+
- `WITH_GMS := false` in `derp_santoni.mk`
151+
- System partition: 3 GB max — vanilla only
152+
- SELinux must stay **Enforcing**
153+
- All patches are in fork repos — clone all 7 repos from the Repository Map
154+
155+
**Common build errors:**
156+
157+
| Error | Fix |
158+
|:------|:----|
159+
| `ld` not found in sbox | Symlink `ld → ld.lld` in `prebuilts/build-tools/path/linux-x86/` |
160+
| System image too large | Ensure `WITH_GMS := false` in `derp_santoni.mk` |
161+
| Power HAL bootloop | Already fixed — uses `android.hardware.power-service.example` |
162+
163+
## Screenshots
164+
165+
| About Phone | Recents + Play Integrity |
166+
|:-----------:|:------------------------:|
167+
| ![About Phone](docs/screenshot/about_phone.png) | ![Recents Overview](docs/screenshot/recents_overview.png) |
168+
169+
## Spec Sheet
78170

79-
![Redmi 4X](https://cdn.tgdd.vn/Products/Images/42/99145/xiaomi-redmi-4x-400-400x460.png "Redmi 4X")
171+
| Feature | Specification |
172+
|:--------|:-------------|
173+
| CPU | Octa-core 1.4 GHz Cortex-A53 |
174+
| Chipset | Qualcomm MSM8940 Snapdragon 435 |
175+
| GPU | Adreno 505 |
176+
| Memory | 2/3 GB |
177+
| Shipped Android Version | 6.0.1 |
178+
| Storage | 16/32 GB |
179+
| MicroSD | Up to 256 GB |
180+
| Battery | 4100 mAh (non-removable) |
181+
| Dimensions | 139 x 69 x 8.65 mm |
182+
| Display | 720 x 1280 pixels, 5" (~294 PPI) |
183+
| Rear Camera | 13 MP, LED flash |
184+
| Front Camera | 5 MP |
185+
| Release Date | May 2017 |
80186

81187
## Credits
82188

83-
- [androidsantoni](https://github.com/androidsantoni) — Original device tree (risingos-13-dev base)
189+
- [androidsantoni](https://github.com/androidsantoni) — Original device tree (RisingOS 13 base)
84190
- [DerpFest-AOSP](https://github.com/DerpFest-AOSP) — ROM source
85191

86192
## Changelog

docs/screenshot/about_phone.png

84.6 KB
Loading
120 KB
Loading

0 commit comments

Comments
 (0)