How to ACTUALLY build LineageOS for an unsupported device. For real this time.

Search This thread

kingkwahli

Senior Member
Jul 13, 2022
298
116
13
Yuma, AZ
naazimapps.com
Apple iPhones
I decided to make this into a actually reasonable ‘Bulding LOS’ guide.

Best Computer OS to build LineageOS is Ubuntu, or something Ubuntu-based.
I used Zorin OS 17 with 16GB of RAM. If you decide to use a OS that is not Ubuntu or Debian, I can't really provide much support to you, and you'll have to research the correct way to install the required packages on your system.

---FOR THOSE WHO HAVE BEEN FOLLOWING THIS POST, GO TO THE BOTTOM OF THIS POST (not the whole page, just this post) TO SEE MY LATEST UPDATES.

-Basing my guide off of this guide.
-I have a GitHub repository here that provides additional resources.

Setting up the system

Use apt to install the required packages
Code:
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev libncurses5 python-is-python3 -y

If you're on Ubuntu 23.04 or lower, check this:
1725817098441.png


And also, building for different LineageOS versions require different JDK versions:
  • LineageOS 18.1+: OpenJDK 11 (included in source download)
  • LineageOS 16.0-17.1: OpenJDK 1.9 (included in source download)
  • LineageOS 14.1-15.1: OpenJDK 1.8 (install openjdk-8-jdk)
    • NOTE: For building 14.1-15.1 you’ll need to remove TLSv1 and TLSv1.1 from jdk.tls.disabledAlgorithms in /etc/java-8-openjdk/security/java.security.
  • LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)*
1725818761396.png


Make the directories
Code:
mkdir -p ~/bin
mkdir -p ~/android/lineage
Install the repo command
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Configure git
Code:
git config --global user.email "me@naazimapps.com"
git config --global user.name "Kwahli Naazim"
Initialize LFS (Large Freaky Straws) and turn on ccache
Code:
git lfs install
git config --global trailer.changeid.key "Change-Id"
export USE_CCACHE=1
export CCACHE_EXEC=/usr/bin/ccache
ccache -M 50G

Actually building

Initialize LineageOS 20 using
Code:
~/bin/repo init -u https://github.com/LineageOS/android.git -b lineage-20.0 --git-lfs
Sync the repo with
Code:
repo sync
.
THIS WILL TAKE A WHILE, (i guess depends on your internet, but for most, you should just) END YOUR 3000 HOUR COMPUTER STREAK AND GO LAY IN THE GRASS!!!

Once that’s finished, search GitHub for your device’s vendor, device, and kernel repos. IF YOU ARE UNABLE TO LOCATE THESE REPOS, YOU CANNOT MOVE FORWARD. Once you have those, modify this file to fit your needs. For the SM-T113/T116NU, you can use this for vendor, this for device, and this for kernel.

--CREATING YOUR MANIFEST FILE--

Download the example.xml and open it in a text editor.

What it all means:

EXAMPLE_BRANCH
[Take a peek at this:
branch.jpeg

See how it says cm-14.1?
Whatever it says there for the repository(s) you've found replaces EXAMPLE_BRANCH. Remember that each different repository for the device, vendor, and kernel will not always have the same branch name.

EXAMPLE_MANUFACTURER_in_lowercase
and
EXAMPLE_DEVICE_CODENAME_in_lowercase
Let's start with the EXAMPLE_MANUFACTURER_in_lowercase:
This one is somewhat obvious. The device that you're building for's manufacturer. Samsung devices are samsung, LG is lge, and so on. Whatever the manufacturer is, goes here, but in all lowercase.

Now, the EXAMPLE_DEVICE_CODENAME_in_lowercase:
This one is also pretty obvi. Your device's codename, again in lowercase. You should already know this, as this is the key to finding the correct repo links.

EXAMPLE_GITHUB_USERNAME/EXAMPLE_GITHUB_REPO

Easy. EXAMPLE_GITHUB USERNAME would be the username of the person who created the repository. For example, in sixito007/android_vendor_samsung_goyave3g, sixito007 would be the EXAMPLE_GITHUB_USERNAME.
EXAMPLE_GITHUB_REPO follows similar directions. In that same example, android_vendor_samsung_goyave3g would be the EXAMPLE_GITHUB_REPO

After that’s all done, save the file to ~/.repo/local_manifests/devicecodename.xml (create local_manifests folder if it doesn’t exist)
<br>
Obviously devicecodename would be your device’s codename, in my case goyave3g.xml

Then rerun
Code:
repo sync
This time around it won’t take as long.

---CONTINUING THE BUILD---

Now, you need to go into ~/android/lineage and finish setting up the environment:
Code:
cd ~/android/lineage
source build/envsetup.sh

I'm back to continue my our Lineage journey in figuring out what works and what don't.

BIG UPDATE: I got the thermal paste! My PC is back in business, and after school I can get back in the game and post live updates. We’re getting LineageOS for the T113! Even if it takes a few kinks to work out.

Update 2: HUGE THANKS to @amarithetopg for building this on his PC, little by little, we're getting it done.

Update 3: I've started building again! Let's see how this goes. @parrots_ is also on the mission, so big thanks to him, we can compare errors together.
 

Attachments

  • IMG_0143.jpeg
    IMG_0143.jpeg
    113.4 KB · Views: 163
Last edited:

parrots_

Senior Member
You could go for 12GB, though your computer would likely slow down alot. Maybe you could use Puppy Linux, since some versions seem to be based on Ubuntu. Maybe it'll give you a chance to try it before fully installing, you could also dual boot on the Windows PC.

Also, small warning. I've used those tutorials about building Lineage for an unsupported device, and the title is kinda deceiving. It claims for an unsupported device, but the device has to have been previously supported. Make sure there's a Lineage Source or device tree for the device or it probably won't work.
 
  • Like
Reactions: kingkwahli

kingkwahli

Senior Member
Jul 13, 2022
298
116
13
Yuma, AZ
naazimapps.com
Apple iPhones
You could go for 12GB, though your computer would likely slow down alot. Maybe you could use Puppy Linux, since some versions seem to be based on Ubuntu. Maybe it'll give you a chance to try it before fully installing, you could also dual boot on the Windows PC.

Also, small warning. I've used those tutorials about building Lineage for an unsupported device, and the title is kinda deceiving. It claims for an unsupported device, but the device has to have been previously supported. Make sure there's a Lineage Source or device tree for the device or it probably won't work.
I'm using this as my kernel, this for device, and this for vendor. I do see that that device was supported, soI will do my best to accommodate my device.
 
  • Like
Reactions: equilibrium3663

Top Liked Posts

  • 1
    Sorry y'all, Ive had to relogin and resetup my accounts, including XDA. Seems like I'm always having tech issues but I'm almost done and on top of that, I have no school tomorrow so I can put more time into this whole thing
    1
    Sorry y'all, Ive had to relogin and resetup my accounts, including XDA. Seems like I'm always having tech issues but I'm almost done and on top of that, I have no school tomorrow so I can put more time into this whole thing
    Oh i do too
  • 2
    Guys it's possible
    1
    I'm giving up on this project is just wasting my time and does nothing and, Sorry that I couldn't do this project with you guys bye.
    I somewhat agree with you. This project was wasteful, but I wont be giving up on this. It definetly sucks that we can't get LOS 20, but we can work to get other versions on our ancient little devices.

    Thanks to all that you've contributed to this project and XDA, stay on the forum, even if outside this project!
    1
    I somewhat agree with you. This project was wasteful, but I wont be giving up on this. It definetly sucks that we can't get LOS 20, but we can work to get other versions on our ancient little devices.

    Thanks to all that you've contributed to this project and XDA, stay on the forum, even if outside this project!
    i will try again on a mac for now
    1
    I somewhat agree with you. This project was wasteful, but I wont be giving up on this. It definetly sucks that we can't get LOS 20, but we can work to get other versions on our ancient little devices.

    Thanks to all that you've contributed to this project and XDA, stay on the forum, even if outside this project!
    I will be here no matter what happens!
    1
    uhhhh... how is the development going?
    Sorry it’s been so long without updates…my sister had a birthday recently and I have had to re-setup all my computers (except the Zorin OS), so I have been a bit behind. I’m almost done, and I can hop back in
  • 7
    I decided to make this into a actually reasonable ‘Bulding LOS’ guide.

    Best Computer OS to build LineageOS is Ubuntu, or something Ubuntu-based.
    I used Zorin OS 17 with 16GB of RAM. If you decide to use a OS that is not Ubuntu or Debian, I can't really provide much support to you, and you'll have to research the correct way to install the required packages on your system.

    ---FOR THOSE WHO HAVE BEEN FOLLOWING THIS POST, GO TO THE BOTTOM OF THIS POST (not the whole page, just this post) TO SEE MY LATEST UPDATES.

    -Basing my guide off of this guide.
    -I have a GitHub repository here that provides additional resources.

    Setting up the system

    Use apt to install the required packages
    Code:
    sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev libncurses5 python-is-python3 -y

    If you're on Ubuntu 23.04 or lower, check this:
    1725817098441.png


    And also, building for different LineageOS versions require different JDK versions:
    • LineageOS 18.1+: OpenJDK 11 (included in source download)
    • LineageOS 16.0-17.1: OpenJDK 1.9 (included in source download)
    • LineageOS 14.1-15.1: OpenJDK 1.8 (install openjdk-8-jdk)
      • NOTE: For building 14.1-15.1 you’ll need to remove TLSv1 and TLSv1.1 from jdk.tls.disabledAlgorithms in /etc/java-8-openjdk/security/java.security.
    • LineageOS 11.0-13.0: OpenJDK 1.7 (install openjdk-7-jdk)*
    1725818761396.png


    Make the directories
    Code:
    mkdir -p ~/bin
    mkdir -p ~/android/lineage
    Install the repo command
    Code:
    curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo
    Configure git
    Code:
    git config --global user.email "me@naazimapps.com"
    git config --global user.name "Kwahli Naazim"
    Initialize LFS (Large Freaky Straws) and turn on ccache
    Code:
    git lfs install
    git config --global trailer.changeid.key "Change-Id"
    export USE_CCACHE=1
    export CCACHE_EXEC=/usr/bin/ccache
    ccache -M 50G

    Actually building

    Initialize LineageOS 20 using
    Code:
    ~/bin/repo init -u https://github.com/LineageOS/android.git -b lineage-20.0 --git-lfs
    Sync the repo with
    Code:
    repo sync
    .
    THIS WILL TAKE A WHILE, (i guess depends on your internet, but for most, you should just) END YOUR 3000 HOUR COMPUTER STREAK AND GO LAY IN THE GRASS!!!

    Once that’s finished, search GitHub for your device’s vendor, device, and kernel repos. IF YOU ARE UNABLE TO LOCATE THESE REPOS, YOU CANNOT MOVE FORWARD. Once you have those, modify this file to fit your needs. For the SM-T113/T116NU, you can use this for vendor, this for device, and this for kernel.

    --CREATING YOUR MANIFEST FILE--

    Download the example.xml and open it in a text editor.

    What it all means:

    EXAMPLE_BRANCH
    [Take a peek at this:
    branch.jpeg

    See how it says cm-14.1?
    Whatever it says there for the repository(s) you've found replaces EXAMPLE_BRANCH. Remember that each different repository for the device, vendor, and kernel will not always have the same branch name.

    EXAMPLE_MANUFACTURER_in_lowercase
    and
    EXAMPLE_DEVICE_CODENAME_in_lowercase
    Let's start with the EXAMPLE_MANUFACTURER_in_lowercase:
    This one is somewhat obvious. The device that you're building for's manufacturer. Samsung devices are samsung, LG is lge, and so on. Whatever the manufacturer is, goes here, but in all lowercase.

    Now, the EXAMPLE_DEVICE_CODENAME_in_lowercase:
    This one is also pretty obvi. Your device's codename, again in lowercase. You should already know this, as this is the key to finding the correct repo links.

    EXAMPLE_GITHUB_USERNAME/EXAMPLE_GITHUB_REPO

    Easy. EXAMPLE_GITHUB USERNAME would be the username of the person who created the repository. For example, in sixito007/android_vendor_samsung_goyave3g, sixito007 would be the EXAMPLE_GITHUB_USERNAME.
    EXAMPLE_GITHUB_REPO follows similar directions. In that same example, android_vendor_samsung_goyave3g would be the EXAMPLE_GITHUB_REPO

    After that’s all done, save the file to ~/.repo/local_manifests/devicecodename.xml (create local_manifests folder if it doesn’t exist)
    <br>
    Obviously devicecodename would be your device’s codename, in my case goyave3g.xml

    Then rerun
    Code:
    repo sync
    This time around it won’t take as long.

    ---CONTINUING THE BUILD---

    Now, you need to go into ~/android/lineage and finish setting up the environment:
    Code:
    cd ~/android/lineage
    source build/envsetup.sh

    I'm back to continue my our Lineage journey in figuring out what works and what don't.

    BIG UPDATE: I got the thermal paste! My PC is back in business, and after school I can get back in the game and post live updates. We’re getting LineageOS for the T113! Even if it takes a few kinks to work out.

    Update 2: HUGE THANKS to @amarithetopg for building this on his PC, little by little, we're getting it done.

    Update 3: I've started building again! Let's see how this goes. @parrots_ is also on the mission, so big thanks to him, we can compare errors together.
    3
    Didn't forget this time, gonna reboot into Linux and start building.
    2
    I'm following this and would like an updated ROM on this old SM-T116

    Hope you make progress soon 🤞
    2
    cd ~/android/lineage
    Fixed already my brother un plugged my laptop making it to turn off but fixing right now!