# iodéOS build instructions For the most part, building iodéOS is not much different than building [LineageOS](https://lineageos.org/). You can refer for example to LineageOS build instructions for [Pixel 5](https://wiki.lineageos.org/devices/redfin/build). Please note that these instructions concern devices officially supported by LineageOS: in order to build iodéOS for unsupported devices, you will have to create/modify a device tree for your phone. ## Obtaining a basic build: differences with LineageOS instructions We list here the differences w.r.t. LineageOS build instructions, which are sufficient to obtain a running iodéOS build. ### Part "Install the build packages" We use [Git LFS](https://git-lfs.github.com/) to maintain the `vendor/extra` repository where prebuilt applications are stored. You must install Git LFS on your system, for example the `git-lfs` package on Debian or Ubuntu. ### Part "Initialize the LineageOS source repository" To initialize the iodéOS source repository, you must replace the Android manifest repository in the `repo init ...` command: ``` repo init -u https://gitlab.iode.tech/os/public/manifests/android.git -b v6-staging ``` The branch `v6-staging` corresponds to the latest active development branch of iodéOS v6, and may be subject to deep changes. iodéOS official stable release branches will be added when available. ### Part "Download the source code" After having sucessfully downloaded the sources with the `repo sync` command, you must download the Git LFS stored objects: ``` cd vendor/extra git lfs pull iode v6-staging ``` ### That's all folks You can now start building iodéOS, after carefully following LineageOS build instructions. ## Fine-tune your iodéOS build Some iodéOS features need some more work. ### Make SafetyNet pass Due to recent changes in the way iodéOS pass safetynet, no more additionnal config is required: it should work out-of-the-box. ### Sign your builds You can sign your builds with developer keys by creating a directory called `certs` at the root of your source tree, and generating signing keys in it (modify the `subject` variable in the code below). There is no need to modify iodéOS sources, in particular the `PRODUCT_DEFAULT_DEV_CERTIFICATE` variable will be modified accordingly. ``` subject='/C=US/ST=France/L=Toulouse/O=iodeOS/OU=iodeOS/CN=iodeOS/emailAddress=suport@iode.tech' mkdir certs for x in releasekey platform shared media networkstack testkey; do \ ./development/tools/make_key certs/$x "$subject"; \ done ``` ### Configure Smart Charging Smart charging has been removed, as there is now the new Charging Control feature in LineageOS.