9.5 KiB
builders_rubenslte
Build scripts for TWRP recovery and a LineageOS 14.1 ROM for the
Samsung Galaxy Tab Active SM-T365 (codename rubenslte, Qualcomm MSM8926).
This repo only orchestrates the builds. The actual device configuration lives in other repos:
| Repo | Contents |
|---|---|
twrp_device_samsung_rubenslte |
TWRP device tree (BoardConfig.mk, mkbootimg.mk, dtbtool, recovery.fstab) |
android_kernel_samsung_rubenslte |
Samsung msm8226 stock kernel (Linux 3.4), built from source |
device_samsung_rubenslte |
LineageOS 14.1 device tree |
android_vendor_samsung_rubenslte |
LOS vendor blobs / proprietary files |
android_kernel_samsung_rubenslte (shared) |
the same gitea kernel clone |
| this repo | build_twrp.sh / build_los.sh (drivers), shell.nix / shell_los.nix (envs), patches/, docs |
The LOS device/vendor/kernel trees come in via local_manifests/rubenslte.xml
against the cm-14.1 manifest (the milletwifi/milletlte forks from
git.cfpi-fpsi.eu provide the shared trees).
Quick start
Requirements: a NixOS system (or Nix with nix-shell) with network access and
nix in your user's allowed-users / trusted-users.
TWRP recovery
./build_twrp.sh # full build -> recovery.img
./build_twrp.sh --no-sync # rebuild without re-syncing/re-patching sources
./build_twrp.sh clean # delete twrp-build/ and recovery.img
./build_twrp.sh env # interactive shell inside the build env
LineageOS 14.1
./build_los.sh # boot.img: kernel + dt.img + ramdisk (fast gate)
./build_los.sh bacon # full build -> lineage_rubenslte-*.zip
./build_los.sh clean # mka clean
./build_los.sh env # interactive shell inside the build env
RB_CMD=<cmd> overrides the subcommand (used by relaunch helpers).
How the builds work
- Environment — everything runs inside a nix-shell FHS environment:
shell.nixfor TWRP,shell_los.nixfor LOS (same package set + host gcc, which the kernel kconfig host tools need).nix-shell --runis unreliable here because the shellHook doesexec android-env, so the scripts re-enter the environment by piping their body intonix-shell(seereenter_build_envinlib/common.sh). - Sources —
repo init/syncfetches the omnitwrp-5.1manifest for TWRP and the cm-14.1 manifest +local_manifests/rubenslte.xmlfor LOS. The device tree(s) and kernel are shallow clones from gitea and refreshed on each full build. - Patches —
patches/{twrp,kernel,los}/*.patchfix the old 5.1/14.1 codebase for modern host tools (seepatches/README.md). Applied idempotently sorepo syncwipes are harmless. - Toolchain (TWRP) — arm-eabi-4.8 (gcc 4.8, same as stock builds) is
downloaded from Android's googlesource and put on
PATH. LOS uses the tree prebuilts. - Compiler (LOS) — Jack only. The 14.1 javac fallback is incomplete
(dangling
with-local/classes.dexintermediates) and can't build bacon. Jack runs in-process (JACK_NO_SERVER=1); the separate Jack server is disabled (JACK_SERVER=false) because its curl admin TLS (trycurlagainst 0.0.0.0:8077:SSL routines::unexpected eof) can't handshake with the Java 8 server on this host, and jack_server_setup.mk's mandatory server-start ninja edge (update jack ... || exit 47) hard-aborts ninja. Jack jars are seeded from the tree into.jack-repository/. - Kernel — built from source via the omni/lineage kernel build rules. The
variant defconfig only enables
CONFIG_MACH_RUBENSLTE_OPEN(EUR). - dt.img —
dtbToolLineagepacks the compiled.dtbfiles; the bootloader selects the right one for the hardware. - Recovery ramdisk — the stock minigzip ramdisk overflows the 10,485,248
byte partition, so
mkbootimg.mkreplaces the core ramdisk rules: drops tzdata and the f2fs tools and compresses with LZMA (CONFIG_RD_LZMA=yin the rubenslte kernel). All 19 common TWRP language packs ship as-is.
Final artifacts at the repo root: recovery.img (TWRP, currently 10,479,632
bytes) and, after bacon, los-build/out/target/product/rubenslte/lineage_rubenslte-*.zip.
Image layout (shipped recovery.img)
boot image header (base 0x0, pagesize 2048)
zImage kernel
ramdisk LZMA-compressed, 19-language TWRP 3.7.0_9-0
dt.img QCDT: two EUR dtbs, r02 + r03
SEANDROIDENFORCE trailer
total 10,479,632 fits the 10,485,248 byte partition
build_twrp.sh prints the image size and sha256 at the end (verify_image in
lib/common.sh).
Flashing
Enter Download mode: Volume Down + Home + Power, then confirm with Volume Up.
- Odin 3.x: flash
recovery.imgin the AP slot (leave BL/CP/CSC empty). - Heimdall:
heimdall flash --RECOVERY recovery.img --no-reboot
Boot into TWRP with Volume Up + Home + Power. Note: the bootloader sets the KNOX warranty bit on flashing — irreversible on this device.
recovery-stock.img (in this directory, git-ignored) is the stock recovery
image dumped from the device; flash it back to restore the factory recovery.
The ROM zip is flashed from TWRP (it does not touch the bootloader), followed
by lineage-*-kernel, or extract boot.img (with the SEANDROIDENFORCE trailer)
from the zip. The ROM is bare — no GApps — and /data is ext4 (F2FS off).
WebView provider (webview.apk)
The device's WebView (com.android.webview) lives in the vendor tree. If you wipe
or replace it, the system can fall back to a broken com.android.webview.
Restore point /system/app/webview/webview.apk; a safely-stripped variant sits
in important_files/ if you need to re-add it.
Device notes
- dt.img is EUR-only. The kernel is built with
CONFIG_MACH_RUBENSLTE_OPEN, so dt.img carries only the two EUR DTBs (r02/r03). SM-T365Y (AUS) / SM-T365M / KOR units need the correspondingCONFIG_MACH_RUBENSLTE_*enabled and a rebuild, otherwise the device may not boot from this kernel. /datais ext4, no F2FS. The kernel has no F2FS driver, so the f2fs tools are excluded. TWRP's format menu only offers F2FS when/sbin/mkfs.f2fsis present, so the option is hidden automatically. Do not formatDataas F2FS.adb shellneeds/systemmounted.adbworks in recovery, but the device-side shell is/system/bin/sh; until you check Mount → System in TWRP you'll seeCANNOT LINK EXECUTABLE DEPENDENCIES: library "libc.so" not found. The in-TWRP terminal (Advanced → Terminal) always works.
Troubleshooting
make: *** [.../mkbootimg.mk:24: /dt.img] Błąd 255(TWRP) — the custom bootimg rules are included before the kernel tasks define their paths; the recursive variables in BoardConfig.mk are what keep/dt.imgfrom collapsing to an absolute base path. Don't "simplify" them to:=.- Image won't fit the partition (TWRP) — the ramdisk must stay LZMA and trimmed;
re-check
mkbootimg.mkif you add files undertwres/orsystem/. mkfs.f2fsreappears in the ramdisk after a rebuild — stale copy inout/target/product/rubenslte/root/sbin/(the core rulecp -Rs the boot root into the recovery root without wiping it first). Delete them andrecovery/root.ts;mkbootimg.mkstrips them from the packed image anyway.- Jack complaints "not readable" about
jack-3.36.CANDIDATE.jar— the.jack-repository/seed is incomplete;seed_jack_repositoryre-copies fromlos-build/prebuilts/sdk/tools/jacks/(keep jills too). curlTLS error against the Jack server — expected; Jack runs in-process, the server path is disabled on purpose.nix-shell --run ...produces no output — known limitation of theexec android-envshellHook; use the wrapper scripts or... env.- Parallel
nix-shellinvocations can deadlock on the nix store — run builds sequentially.
Device information
| Basic | Spec sheet |
|---|---|
| Name | Galaxy Tab Active |
| Model | SM-T365 |
| Codename | rubenslte |
| CPU | Quad-core 1.2 GHz Cortex A-7 |
| Chipset | Qualcomm Snapdragon 400 (MSM8926, LTE) |
| ro.board.platform | msm8226 |
| ro.product.board | MSM8926 |
| GPU | Qualcomm Adreno 305 |
| Memory | 1.5 GB |
| Shipped Android | Android 4.4 |
| Latest Android | Android 5.1.1 |
| Storage | 16 GB |
| MicroSD | 64 GB |
| Battery | 4450 mAh |
| Display | 800x1280 px |
| Rear camera | 3.1 Mpx |
| Front camera | 1.2 Mpx |
| Similar devices | milletlte, matisselte, motorola_thea |
Links
- https://git.cfpi-fpsi.eu/rubenslte/twrp_device_samsung_rubenslte
- https://git.cfpi-fpsi.eu/rubenslte/android_kernel_samsung_rubenslte
- https://git.cfpi-fpsi.eu/rubenslte/device_samsung_rubenslte
- https://git.cfpi-fpsi.eu/rubenslte/android_vendor_samsung_rubenslte
- https://github.com/matteo0026/android_device_samsung_rubenslte
- https://github.com/matteo0026/twrp_device_samsung_milletlte
- https://github.com/matteo0026/twrp_device_samsung_matisselte