Blog · Varifocal
Bringing up Evolution X 12.4 on the Galaxy A12
Debugging a 302-tombstone camera crash loop, regenerating stock A127F mixer paths, fitting Full GMS into 4 GB of RAM, and shipping a 2.66 GiB release past GitHub's asset cap.
ExynosCameraSensorInfo: [CAM_ID(4)]-ASSERT(createExynosCameraSensorInfo[293]):Unknown sensorId 210That single line was firing every five seconds on the first booted Evolution X 12.4 build for the Galaxy A12 (SM-A127F / a12s). By the time I pulled logcat over ADB, tombstoned had already written 302 crash dumps from android.hardware.camera.provider-service.samsung. Every other HAL (Wi-Fi, Bluetooth, Dual-SIM RIL, GNSS, NFC, Thermal AIDL, Exynos C2 video codecs, 16 hardware sensors) was sitting at running, yet the phone felt broken because the camera daemon was hammering CPU and storage in an infinite loop.
Forking a working LineageOS 24.0 device tree onto Evolution X 12.4 (CP2A.260605.016, Android 17) sounds mechanical until you boot the zip on real hardware. Below is what actually broke on the live phone, what turned out to be a false alarm, and how we shipped a 2.66 GiB Full-GMS build cleanly.
Evolution X 12.4 release baseline
- Release tag
- evox-12.4-20261201
- Build ID
- Android 17 (CP2A.260605.016) · Evolution X 12.4
- Variant
- userdebug · test-keys · WITH_GMS=true
- Zip size
- 2.66 GiB (2,861,302,451 bytes)
- Device commits
- a12s 2760c0d · a12s-common 870d2e8
- Optional kernel
- Muru v2.0 (2216e7ee1) · KSU-Next + SuSFS
Why the camera crash-looped on first boot
Section titled “Why the camera crash-looped on first boot”The tree already carried our GC5035 and SR846 patches under device/samsung/a12s/patches/. Nobody had run apply.sh in the Evolution X workspace before compiling. As a result, hardware/samsung_slsi-linaro/camera and hardware/samsung_slsi-linaro/graphics compiled completely unpatched, leaving libexynoscamera3.so unaware of sensor ID 210 (GC5035 ultrawide) and aborting vendor.camera.provider on every probe.
Applying 0003-hwc3-fix-brightness-underflow.patch and 0004-camera-n23-a12s-gc5035-sr846.patch, then wiring device/samsung/a12s/patches/apply.sh directly into build_evo.sh, stopped the loop cold. Before pulling the rebuilt zip off the server, we grepped vendor/lib64/libexynoscamera3.so for ExynosCameraSensorGC5035 and ExynosCameraSensorSR846 so an unpatched build can’t sneak through again. On the reflashed phone, dumpsys media.camera reported Number of camera devices: 4 with zero provider restarts.
Auditing audio routing and mixer paths
Section titled “Auditing audio routing and mixer paths”During early testing, the top earpiece sounded suspect on a call. Turned out to be a false alarm on the hardware side, though checking it led to a real bug in device/samsung/a12s-common/configs/mixer/mixer_paths.xml.
On the SM-A127F, the bottom loudspeaker runs through an sma1303 amplifier on UAIF1, while the top earpiece runs through the aud3004x codec on UAIF0. Diffing our tree’s mixer_paths.xml against stock A127FXXSDDXJ5 (mixer_paths.xml plus mixer_gains.xml) turned up three mismatches:
<!-- Missing top-level default in the old mixer_paths.xml --><ctl name="Speaker Mute Switch(1:muted_0:un)" value="1" />Without that top-level default, audio_route had nothing to reset Speaker Mute Switch(1:muted_0:un) back to when unrouting dev-speaker and switching to dev-handset. All 108 MAIN MIC Gain, SUB MIC Gain, and EAR MIC Gain entries had also been stripped even though sound/soc/codecs/aud3004x.c implements all three controls, and several handset, headset, and FM gains drifted from stock values (gain-media-handset sat at 141 instead of stock 136).
We regenerated configs/mixer/mixer_paths.xml (870d2e8) directly from stock A127FXXSDDXJ5, restoring all 96 top-level defaults and 677 paths. Whether that exact cleanup should be backported to lineage-24.0 is still on the list, though calls already work fine on both branches.
Restoring Health HAL and fitting Full GMS into 4 GB of RAM
Section titled “Restoring Health HAL and fitting Full GMS into 4 GB of RAM”The initial Evolution X port (105c4be) had commented out vendor.lineage.health-service.default, assuming Evolution X lacked the Lineage Health AIDL interface. Both hardware/lineage/interfaces/health/aidl and device/lineage/sepolicy/exynos were sitting right there in the source tree. Restoring them in BoardConfigCommon.mk and common.mk (870d2e8) brought back Charging Control and Fast Charge with no sepolicy errors.
Memory pressure was trickier. Unlike our 1.06 GiB vanilla LineageOS 24.0 build, Evolution X ships Full GMS (WITH_GMS=true), and free -m on a 4 GB A12s showed 3641/3706 MB used with kswapd0 busy whenever apps switched. In 2760c0d and 870d2e8, we made four targeted changes:
- Added PSI-based LMKD thresholds in
vendor.prop(ro.lmk.use_psi=true,psi_partial_stall_ms=70,psi_complete_stall_ms=700,thrashing_limit=100,swap_free_low_percentage=20,swap_util_max=90). - Bumped
zramsizeinfstab.exynos850from 2 GB (2147483648) to 3 GB (3221225472). - Set
TARGET_SUPPORTS_QUICK_TAP := falseinevolution_a12s.mkbecause the A12s has no gyroscope. - Added 4 GB Dalvik heap properties (
heapgrowthlimit=192m,heaptargetutilization=0.75,heapminfree=512k,heapmaxfree=8m) inevolution_a12s.mkafter inheritingcommon_full_phone.mk.
One honest caveat: the first few minutes after a fresh flash or update still feel sluggish while Play Services finishes background dexopt and indexing. Once that settles, UI scrolling smooths out on its own. Note also that this Evolution X build is currently userdebug with test-keys (not a user release like LineageOS release-4), so Recovery prompts for signature confirmation during sideload.
Shipping a 2.66 GiB zip past GitHub’s 2 GiB limit
Section titled “Shipping a 2.66 GiB zip past GitHub’s 2 GiB limit”GitHub Releases rejects any single asset over 2,147,483,648 bytes (2.00 GiB). Our first upload split the 2.66 GiB zip into .part00 and .part01 with a download.sh helper script to concatenate them, which worked but added an extra step for anyone flashing from Windows or a phone.
For the updated evox-12.4-20261201 release, we uploaded the single full zip directly to Pixeldrain (https://pixeldrain.com/u/LjeRMF8p), checked Pixeldrain’s returned server-side SHA-256 (6bce5a6aae7b4d4259b4f15c8236fa6484782c320af73950d056ab7eaf2329e3) against our build, deleted the old .part00 and .part01 files from GitHub, and kept boot.img, dtbo.img, recovery.img, vbmeta.img, and SHA256SUMS-evolution_a12s.txt on the GitHub release.
Side note: tuning the optional Muru v2 kernel
Section titled “Side note: tuning the optional Muru v2 kernel”Skip this section if you only care about the stock ROM kernel. Because we keep android_kernel_samsung_exynos850 untouched for official LineageOS compatibility, all custom kernel work lives in a separate repo (a12s-dev/muru, tag v2.0-ksun-susfs).
Three hard lessons came out of building Muru v2 for Evolution X:
- Exynos 850 EL3 text-size limit:
drivers/soc/samsung/exynos-el3_mon.cprotects kernel.textat EL3 and enforces an in-RAM size ceiling near 48 MiB. Full LTO with-O3bloatedImageto52.55 MiBand rebooted eight seconds after the bootloader warning screen. Switching to Clang 22 ThinLTO (--lto-O3,-mcpu=cortex-a55) with unusedIKHEADERSdisabled broughtmuru-perfdown to45.65 MiBin RAM, where it boots cleanly. - Never reuse a LineageOS ramdisk on Evolution X: Unpacking both
boot.imgfiles showed different ramdisks (e4b6bb4b...withbuildvariant=userdebugon Evolution X vs.3ef89603...with an empty cmdline on LineageOS 24.0).scripts/build_muru.shnow supportsROM=evoxandROM=losseparately so each image keeps its own ramdisk. - KernelSU-Next UAPI version matching: Because EL3 locks kernel
.text, KernelSU-Next on Exynos 850 usesCONFIG_KSU_MANUAL_HOOK=yinstead of kprobes. Our firstv3.4.0-legacybuild reportedKERNEL_SU_UAPI_VERSION = 4, which caused Managerv3.4.2to show “Working” while locking out Modules and Superuser (isFullFeatured()checks for an exact UAPI match). Syncing tolegacyHEAD overshot to UAPI6(preinit, disabled on 4.19 anyway) and triggered “Manager version too low”. SettingKERNEL_SU_UAPI_VERSION = 5(2216e7ee1) alongside SuSFSv1.5.5(3615c63de) matched released Managerv3.4.2cleanly.
Key takeaways
Section titled “Key takeaways”- Wire
device/samsung/a12s/patches/apply.shinto your ROM build script and greplibexynoscamera3.soforGC5035andSR846before pulling a 2.66 GiB zip off the server. - Diff
mixer_paths.xmlagainst stock firmware whenever audio routing acts up, especially top-level mute defaults likeSpeaker Mute Switch(1:muted_0:un). - Verify whether a ROM already ships
hardware/lineage/interfaces/health/aidlbefore commenting out HAL services during a port. - Check
unpack_bootimgramdisk hashes before flashing any custom kernelboot.imgacross different Android 17 ROMs.
Download Evolution X 12.4
Section titled “Download Evolution X 12.4”Grab the single-file Evolution X 12.4 zip, recovery images, and SHA-256 checksums from the release page, or pair it with Muru v2.0 once booted.
Evolution X 12.4 (evox-12.4-20261201) Single-zip Pixeldrain mirror plus boot.img, recovery.img, dtbo.img, vbmeta.img, and SHA256SUMS.