All Projects → PabloZaiden → Switchroot Android Build

PabloZaiden / Switchroot Android Build

Scripts and environment to build Switchroot Android image

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Switchroot Android Build

Buildout
Buildout is a deployment automation tool written in and extended with Python
Stars: ✭ 510 (+1242.11%)
Mutual labels:  build-automation
Joycon Driver
A vJoy feeder for the Nintendo Switch JoyCons and Pro Controller
Stars: ✭ 798 (+2000%)
Mutual labels:  nintendo-switch
Splatoon 2 Meme Mod
Splatoon 2 mod about memes.
Stars: ✭ 11 (-71.05%)
Mutual labels:  nintendo-switch
Sysdvr
Stream switch games to your PC via USB or network
Stars: ✭ 523 (+1276.32%)
Mutual labels:  nintendo-switch
Joycontrol
Emulate Nintendo Switch Controllers over Bluetooth
Stars: ✭ 667 (+1655.26%)
Mutual labels:  nintendo-switch
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+2255.26%)
Mutual labels:  build-automation
Cbt
CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala
Stars: ✭ 489 (+1186.84%)
Mutual labels:  build-automation
Doit
task management & automation tool
Stars: ✭ 972 (+2457.89%)
Mutual labels:  build-automation
Flubucore
A cross platform build and deployment automation system for building projects and executing deployment scripts using C# code.
Stars: ✭ 695 (+1728.95%)
Mutual labels:  build-automation
Vba M Nx
WIP full featured port of VBA-M for Nintendo Switch
Stars: ✭ 11 (-71.05%)
Mutual labels:  nintendo-switch
Drone
Drone is a Container-Native, Continuous Delivery Platform
Stars: ✭ 24,287 (+63813.16%)
Mutual labels:  build-automation
Nx Shell
A multi-purpose file manager for the Nintendo Switch.
Stars: ✭ 639 (+1581.58%)
Mutual labels:  nintendo-switch
Hopp
Crazy rapid build system.
Stars: ✭ 24 (-36.84%)
Mutual labels:  build-automation
Opencore Factory
Discontinued
Stars: ✭ 514 (+1252.63%)
Mutual labels:  build-automation
Stu
Build automation
Stars: ✭ 32 (-15.79%)
Mutual labels:  build-automation
Deepsea
The new All-in-One CFW package for the Nintendo Switch.
Stars: ✭ 488 (+1184.21%)
Mutual labels:  nintendo-switch
Hydrosphere
Ocean beyond the Horizon
Stars: ✭ 17 (-55.26%)
Mutual labels:  nintendo-switch
Hbupdater
A simple python app for keeping your switch apps up-to-date using the github api.
Stars: ✭ 37 (-2.63%)
Mutual labels:  nintendo-switch
Tegrarcmgui
C++ GUI for TegraRcmSmash (Fusée Gelée exploit for Nintendo Switch)
Stars: ✭ 965 (+2439.47%)
Mutual labels:  nintendo-switch
Brunch
🍴 Web applications made easy. Since 2011.
Stars: ✭ 6,801 (+17797.37%)
Mutual labels:  build-automation

Scripts and environment to build Switchroot Android image

This repo provides a set of scripts and a Dockerfile (build-scripts/Dockerfile) to create the basic environment for building Lineage and Switchroot Android.

Read this before doing anything else, or Voldemort will come for you and summon his dragons:

This build environment is meant to automate the steps from the following guide: Q Tips Guide

Read and understand that guide before continuing.

Also, if you have built Switchroot Pie before, delete the whole ./android directory before starting with Q

After doing that, you can use this to generate the content of your SD card for flashing and installing via Hekate and TWRP.

Build using the prebuilt image from Dockerhub:

  • Boot Linux (natively or a VM. Don't use WSL or WSL2 with the Dockerized build unless you really know what you are doing, since it has severe performance issues with this particular scenario)
  • Install docker (proper docker installation: apt install docker.io if on Ubuntu. It might work if installed via Snap with the latest changes, but it wasn't tested. It now requires --privileged mode)
  • Go to a directory on a drive where there are at least 250GB of free space.
  • Run the following commands:
mkdir -p ./android/lineage
sudo chown -R 1000:1000 ./android

# Don't use the "latest" tag unless you know what you're doing. 
# Use a versioned tag from https://hub.docker.com/r/pablozaiden/switchroot-android-build/tags
sudo docker run --privileged --rm -ti -e ROM_NAME=icosa -v "$PWD"/android:/build/android pablozaiden/switchroot-android-build:latest
  • Copy the content of ./android/output to the root of your SD card (partitioned as a single FAT32-formatted volume; format with Hekate as it ensures proper cluster size for performance)
  • Create the remaining partitions from within Hekate, flash TWRP and install after that. (It is expected to see some errors about mounting some partitions in TWRP the first time flashing)

Detailed usage information

Requirements

  • At least 16GB of RAM
  • At least 250GB of free storage

Build everything locally

  • Clone/Download this repo.
  • If you don't want to use Docker:
    • Avoid having the docker service enabled or set any value to the DISABLE_DOCKER environment variable.
    • By default, the BUILDBASE directory will be set to $(pwd)/build. To change this, set the BUILDBASE environment variable to the path of the base directory where the process will be executed.
    • Make sure to install all the prerequisites before starting (there is a convenience script install-prerequisites-ubuntu.sh provided with this repository. It was only tested on Ubuntu)
    • If a previous build was created using Docker, it will create a symbolic link to it instead of starting from scratch. This behavior can be disabled with the DISABLE_SYMLINK_TO_DOCKER_BUILD environment variable
    • If you're using WSL2, make sure the drive you're using is either ext4 (recommended) or NTFS, and the volume is correctly mounted in the WSL2 distro you are using. For more information on mounting drives in WSL2, see https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk (at this time, the --mount feature is only available on developer insider builds of Windows 10). Also, make sure to configure WSL2 to have, at least 16GB of available RAM or 12GB and enough swap: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig)
  • If you're using docker Either prepend sudo to the script execution, or allow the current user to run docker without sudo
  • Run ./build-android.sh --rom <icosa | foster | foster_tab> --rom-type <zip | images> --flags <nobuild | noupdate | nooutput>
    All parameters are optional. Default for --rom is icosa, default for --rom-type is zip, default for --flags is empty
  • When building the zip, the required output for installing via Hekate will be copied to ./android/output or $BUILDBASE/android/output, unless the nooutput flag is present
  • Any subsequent build execution will detect that the ./android/lineage or $BUILDBASE/android/lineage directoy contains files and will work under the assumption that the source code was already downloaded at least once. Then it will re-sync the repos, re-apply patches and re-build

Important: The docker image builds everything in the /build/android directory, inside the container. The ./build-android.sh script mounts the host directory ./android as a volume to that directory in the container, so the sources and build output can live after the container is destroyed.

If that directory is not properly mounted, the build may fail.

Custom repopics and patches

To apply custom patches to your build, create the extra-content/patches.txt file and add lines with the <patch_base_dir>:<patch_path> format or add the extra-content/repopics.txt with one patch per line. The same format is being used for default patches and repopics in build-scripts/default-patches.txt and build-scripts/default-repopics.txt The files must end with an empty line.

By default, the script will try to download the latest repopics main repository master branch and will generate the patches file based on the contents of the switchroot manifest. To avoid doing this and always use the local copy, add a non-empty LOCAL_REPOPICS_PATCHES environment variable. Keep in mind that it may not always be up to date.

When building with docker, make sure to also mount the extra-content directory to ${BUILDBASE}/extra-content (as it is done in build-in-docker.sh)

Convenience scripts

There are several .sh scripts in the repo root, for convenience. You can find usage documentation inside each script.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].