From e2e4dcae4e7c0f9c698cd39aa268d4f158603f3f Mon Sep 17 00:00:00 2001 From: Emil Kosz Date: Sat, 5 Sep 2026 12:21:01 +0200 Subject: [PATCH] general: readme; rename build.sh; clean.sh script Fix readme --- .gitignore | 3 ++- README.md | 35 +++++++++++++++++++++++++++++++++++ build.sh | 49 ------------------------------------------------- build_twrp.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ clean.sh | 6 ++++++ 5 files changed, 92 insertions(+), 50 deletions(-) create mode 100644 README.md delete mode 100755 build.sh create mode 100755 build_twrp.sh create mode 100755 clean.sh diff --git a/.gitignore b/.gitignore index 84c048a..a6124fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/build/ +/twrp-build/ +/recovery.img diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f1c09f --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# builders\_rubenslte + +This repository contains build scripts that automate the building of +recoveries and ROMs for the Galaxy Tab Active SM-T365. + +# Build + +## Recovery + +``` +nix-shell shell.nix --run ./build_recovery.sh +``` + +# 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 | diff --git a/build.sh b/build.sh deleted file mode 100755 index 5cab436..0000000 --- a/build.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -export ALLOW_NINJA_ENV=true -export USE_CCACHE=1 -export LD_LIBRARY_PATH=/usr/lib:/usr/lib32 -export LC_ALL=C -export LANG=C -export LC_CTYPE=C - -# export LOCAL_CFLAGS=-Wno-error - -BUILD_DIR="./build" -PATCH_DIR="./patches" -MANIFEST_URL="https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git" -MANIFEST_BRANCH="twrp-5.1" -DEVICE_TREE_URL="https://git.cfpi-fpsi.eu:8443/rubenslte/twrp_device_samsung_rubenslte" -KERNEL_URL="https://git.cfpi-fpsi.eu:8443/rubenslte/android_kernel_samsung_rubenslte" - -if [ ! -d "${BUILD_DIR}/.repo" ]; then - echo "Creating build directory ${BUILD_DIR} and cloning manifest ${MANIFEST_URL} from branch ${MANIFEST_BRANCH}..." - mkdir -p "${BUILD_DIR}" - cd "${BUILD_DIR}" - repo init --depth 1 -u "${MANIFEST_URL}" -b "${MANIFEST_BRANCH}" -fi - -if [ ! -d "${BUILD_DIR}/device/samsung/rubenslte" ]; then - echo "Cloning device tree..." - git clone "${DEVICE_TREE_URL}" "${BUILD_DIR}/device/samsung/rubenslte" -fi - -if [ ! -d "${BUILD_DIR}/kernel/samsung/rubenslte" ]; then - echo "Cloning kernel source..." - git clone "${KERNEL_URL}" "${BUILD_DIR}/kernel/samsung/rubenslte" -fi - -for patch in "${PATCH_DIR}/*.patch"; do - echo "Applying $(basename "$patch")" - (cd "${BUILD_DIR}" && patch -p1 -N -r- < "$patch" 2>/dev/null || true) -fi - -cd "${BUILD_DIR}" -set +u -source build/envsetup.sh -lunch "omni_rubenslte-userdebug" -set -u -mka recoveryimage - -echo "Build results in ${BUILD_DIR}/out/target/product/rubenslte" diff --git a/build_twrp.sh b/build_twrp.sh new file mode 100755 index 0000000..e46ac79 --- /dev/null +++ b/build_twrp.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +set -euo pipefail + +export ALLOW_NINJA_ENV=true USE_CCACHE=1 LD_LIBRARY_PATH=/usr/lib:/usr/lib32 LC_ALL=C LANG=C LC_CTYPE=C + +cd "$(realpath "$(dirname "${BASH_SOURCE[0]}")")" +SCRIPT="$PWD" + +mkdir -p twrp-build +cd twrp-build + +if [ ! -d .repo ]; then + repo init --depth 1 -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-5.1 +fi + +repo sync -j$(nproc) + +if [ ! -d device/samsung/rubenslte ]; then + git clone --depth 1 https://git.cfpi-fpsi.eu/rubenslte/twrp_device_samsung_rubenslte device/samsung/rubenslte +fi + +for p in "$SCRIPT"/patches/*.patch; do + patch -p1 -s < "$p" 2>/dev/null || true +done + +export AR="$(command -v ar)" +export CC="$(command -v gcc)" +export CXX="$(command -v g++)" + +HOST_TOOLCHAIN="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin" +if [ ! -f "$HOST_TOOLCHAIN/x86_64-linux-ar" ]; then + mkdir -p "$HOST_TOOLCHAIN" + for tool in ar gcc g++; do + src="$(command -v $tool)" + if [ -n "$src" ]; then + ln -sf "$src" "$HOST_TOOLCHAIN/x86_64-linux-$tool" + fi + done +fi + +export TOP="$PWD" +set +u +source build/envsetup.sh +lunch omni_rubenslte-userdebug +set -u +mka recoveryimage + +cp out/target/product/rubenslte/recovery.img "$SCRIPT" +echo "Done: $SCRIPT/recovery.img" \ No newline at end of file diff --git a/clean.sh b/clean.sh new file mode 100755 index 0000000..2d9b3b6 --- /dev/null +++ b/clean.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "$(realpath "$(dirname "${BASH_SOURCE[0]}")")" + +rm -rf twrp-build recovery.img