• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][S9+/S9][UNOFFICIAL][LineageOS 18.1][21-03-2021]

Search This thread

ElPakoTech

Member
Apr 18, 2020
17
26
would you mind specifying exactly what you did to build this? I am using the lineage for microg docker based build and it currently succesfully builds 17.1. I would like to build 18.1 with OTA and sign it myself and provide the OTA like you do.
There are fragments of info across this thread, it would be great if you or anyone else can put them together.
Thanks!
Hi,

Sure I can share what I did.

1. Prepare directories and get Lineage sources (https://wiki.lineageos.org/devices/starlte/build)

# Create directories
Bash:
mkdir -p ~/bin
mkdir -p ~/android/build
mkdir -p ~/android/build/src
mkdir -p ~/android/build/ccache
mkdir -p ~/android/build/keys
mkdir -p ~/android/build/logs
mkdir -p ~/android/build/zips
mkdir -p ~/android/build/manifests

# Get repo tools
Bash:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

# Create a "~/.profile" file and paste this into:
Bash:
“if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi”

# Prepare git
Bash:
cd ~/android/build/src
git config --global user.email "[email protected]"
git config --global user.name "Your Name"

# Init repo
Bash:
source ~/.profile
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1

# Time to sync (it can take a very long time, so be patient).
Bash:
repo sync

2. At this point, I forked all Synt4x.93 related repositories on my Github. But, you don’t really need to do that if you just want to build.

For OTA, the only repo you will need to fork is android_device_samsung_starlte.

3.
Create an other repository named OTA.

4. From your forked android_device_samsung_starlte repository, modify the file lineage_starlte.mk

Change the last line with your GitHub username:
Code:
PRODUCT_PROPERTY_OVERRIDES += \
lineage.updater.uri=https://raw.githubusercontent.com/<Your_username>/OTA/lineage-18.1/starlte.json

5. Then you need to add the roomservice.xml file to add the device and kernel sources.

You can use the resources from Synt4x.93, mine or from Neurotical (He’s maintaining a more recent version of the kernel, you should have a look: https://forum.xda-developers.com/t/rom-s9-s9-unofficial-lineageos-18-1-weekly.4302901/ )

Get one of the manifests:
-Synt4x.93: https://github.com/synt4x93/local_manifests
-pakaoraki: https://github.com/pakaoraki/local_manifests
-Neurotical: https://github.com/Geoknyda/local_manifests

Then modify the file roomservice.xml: change "project name" with your GitHub username to match your repository:
Code:
...
<project name="synt4x93/android_device_samsung_starlte" path="device/samsung/starlte" remote="github" revision="lineage-18.1" />
...

Copy your version of roomservice.xml into ~/android/build/manifests directory.

# Update source again
Bash:
repo sync

6. Generate your own keys (https://wiki.lineageos.org/signing_builds.html)

From the root of your Android tree, run these commands, altering the subject line to reflect your information:
Bash:
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/[email protected]'

cd ~/android/build/src
for x in releasekey platform shared media networkstack testkey; do \
    ./development/tools/make_key ~/android/build/keys/$x "$subject"; \
done
make a copy of the “keys” directory and keep it safe.

7. Install docker and get docker-lineage-cicd image:

You can use lineaos4microg : https://hub.docker.com/r/lineageos4microg/docker-lineage-cicd/Dockerfile
Bash:
docker pull lineageos4microg/docker-lineage-cicd

Or

I also re-write my own docker image to add some options. You can try: https://hub.docker.com/r/pakaoraki/docker-lineage-cicd
Bash:
docker pull pakaoraki/docker-lineage-cicd

8. Then you are ready to build:

Execute this command (change pakaoraki/docker-lineage-cicd with lineaos4microg/docker-lineage-cicd if needed)

Bash:
docker run \
-e "BRANCH_NAME=lineage-18.1" \
-e "DEVICE_LIST=starlte" \
-e "INCLUDE_PROPRIETARY=false" \
-e "SIGN_BUILDS=true" \
-v "~/android/build/src:/srv/src" \
-v "~/android/build/zips:/srv/zips" \
-v "~/android/build/logs:/srv/logs" \
-v "~/android/build/ccache:/srv/ccache" \
-v "~/android/build/keys:/srv/keys" \
-v "~/android/build/manifests:/srv/local_manifests" \
pakaoraki/docker-lineage-cicd

9. When build is done, create a new release on your OTA repo: choose a tag and upload recovery.img and zips file.

you will need to create a starlte.json that match to your build and release information:
Code:
{
   "response": [
      {
         "datetime": 1627204505,
         "filename": "lineage-18.1-20210725-UNOFFICIAL-starlte.zip",
         "id": "39b85208c5c30edfafd983673a703d60",
         "romtype": "UNOFFICIAL",
         "size": 608774193,
         "url": "https://github.com/<username>/OTA/releases/download/<tag>/lineage-18.1-20210725-UNOFFICIAL-starlte.zip",
         "version": "18.1"
      }
   ]
}

<tag>: the tag you use when creating the release on Github.
<username>: your username.

Then, upload starlte.json to your OTA repository.

It's possible that I forget something but you get the global idea.
 
Last edited:

Davy-Jones

Member
Aug 2, 2021
13
0
Hey,

anyone also got problems with:

- flickering screen while scrolling
- artefacts / blocks in dark pictures
- problem with GPS-positioning
- slow mobile data
- device get's hot sometimes
- very high battery use sometimes, till restart

Thank you.
 
Last edited:

Im1Random

New member
Jul 7, 2021
3
1
Hey,

anyone also got problems with:

- flickering screen while scrolling
- artefacts / blocks in dark pictures
- problem with GPS-positioning
- slow mobile data
- device get's hot sometimes
- very high battery use sometimes, till restart

Thank you.
I never had any of this problems with my Galaxy S9 (only with HDMI output my TV sometimes flickers when scrolling). Maybe try wiping everything again and do a complete reinstall
 
  • Like
Reactions: francoism90

Neurotical

Senior Member
Feb 7, 2011
121
140
Hey,

anyone also got problems with:

- flickering screen while scrolling
- artefacts / blocks in dark pictures
- problem with GPS-positioning
- slow mobile data
- device get's hot sometimes
- very high battery use sometimes, till restart

Thank you.
Try updating your baseband modem firmware. It's probably out of date.
 
  • Like
Reactions: francoism90

ElPakoTech

Member
Apr 18, 2020
17
26
Hi @ElPakoTech

I have seen you have updated you build on 03.08.
Can you provide a changelog or something?
That would be good to know wether a update is necessary or not.

Thanks
dreas
Hi,

I did the last build because I noticed a very annoying bug on the previous one: the keyboard doesn't respond well, and some input were ignored. So for example, when you're typing a text, some letters/word were missing and you had to be very slow to avoid any lost letters. Same issue when entering a code to unlock the phone for example. Since yesterday on the last build, the problem seams to be solved.

Initially, I wanted to build at least once a month for security patch, but I also like to make some build time to time to keep rom updated from LOS sources when I can (I don't have a precise schedule). So basically, the last build will be the most updated.

There is the full LOS 18.1 changelog here : https://www.lineageoslog.com/18.1
And here the link to the list of merged commit (I excluded devices and kernels changes to match our build): https://review.lineageos.org/q/bran...ndroid_kernel+-repos:LineageOS/android_device, so you can check all changes between two dates.

Changelog is good point, I will see what I can do. Maybe first, I think i'll just add "security patch version..." in description when it get updated.

About bugs, I notice also a keyboard flikering when I use chrome (and only chrome). I also want to update baseband as suggested by Neurotical.
 

Davy-Jones

Member
Aug 2, 2021
13
0
I'll try to flash 18.1 once again. The problems are really to big.

Could sb kindly tell, what's the easiest way to do a new 18.1 flash on the existing 18.1? I'm not into ADB, I'd prefer a way using TWRP only. Thank you.
 

Im1Random

New member
Jul 7, 2021
3
1
I'll try to flash 18.1 once again. The problems are really to big.

Could sb kindly tell, what's the easiest way to do a new 18.1 flash on the existing 18.1? I'm not into ADB, I'd prefer a way using TWRP only. Thank you.
You dont need ADB to do a reinstall only a usb stick or sd card to store the zip files. In TWRP wipe system, cache and dalvik. Then install the lineageos zip (and other zips like magisk if needed) again. Of course making a backup of the data partition isn't a bad idea in case something goes wrong
 

Davy-Jones

Member
Aug 2, 2021
13
0
You dont need ADB to do a reinstall only a usb stick or sd card to store the zip files. In TWRP wipe system, cache and dalvik. Then install the lineageos zip (and other zips like magisk if needed) again. Of course making a backup of the data partition isn't a bad idea in case something goes wrong
Hey, thank you. I did this, but - no change. Problems still the same. Guess I will flash 17.1 again.
 

Davy-Jones

Member
Aug 2, 2021
13
0
Hey Guys,

just one more request: To reinstall 17.1 (while using 18.1) - can I also wipe system, dalvik and cache and flash 17.1 again, or Do I have to do a Full wipe /factory reset?

Thank you.
 

ElPakoTech

Member
Apr 18, 2020
17
26
I am not sure about the issues you have installing 18.1 as the build available are pretty stable.
I will recommend you to use lineage recovery instead of TWRP and wipe system/cache and dalvik again regardless of installing LOS 17.1 or LOS 18.1.
 
  • Like
Reactions: Neurotical

Davy-Jones

Member
Aug 2, 2021
13
0
Hey Guys,

I eventually gave it a last try with 18.1 after doing a factory reset - and - it worked! The noticed problems are gone - by now.

Great. Thank you, for your support.
 

BlackVoltage

Member
Aug 3, 2020
22
1
Hi,

my Samsung Galaxy S9 runs with Lineage 17.1 (lineage recovery) ... seems there are no further updates (till january 2021 I got one about every 2 Weeks).
Therefore (and coz of newer and so on) I would like to use Lineage 18.1

A few Questions regarding that:

1. )Is that ok - or would I have the same or even more (update) problems? Coz 18.1 seems not official for S9?
2.) How to make a backup (like with clockworkmod tool I uses years ago)? I want to restore the backup after installing clean 18.1
3.) What else should I know (made a lot of custom rom installations but mostly years ago on my htc desire)

Thank you very much in advance!
Best regards
BlackVoltage


Edit: titanium backup - was One of my earlier tools. Would it work to make a backup within 17.1 and recover after updating to 18.1?

Will your 18.1 here work as good as formerly oficial 17.1 ?
 
Last edited:

Davy-Jones

Member
Aug 2, 2021
13
0
Hey,

there are no updates for S9 17.1 since the day you named, because the support came to an end. 18.1 is an unofficial ROM, so there are no updates also. (I think?)

Greetings
 

Davy-Jones

Member
Aug 2, 2021
13
0
Hey,

thank you very much for this information. I read this Thread, but - please apologize - I'm not into the Custom ROM world very good. Just trying to understand, how things work.

I installed your Version from march, I think. What's the easiest way, to update it to the latest version from August? I read sth in the thread, but I don't understand it, really. Apologizes.

Can I save the zip on my phone and just flash it over the old 18.1 from march? Or can I wipe system, data + cache and flash the latest version after that in TWRP?

Thank you so much for help.
 

Neurotical

Senior Member
Feb 7, 2011
121
140
Hey,

thank you very much for this information. I read this Thread, but - please apologize - I'm not into the Custom ROM world very good. Just trying to understand, how things work.

I installed your Version from march, I think. What's the easiest way, to update it to the latest version from August? I read sth in the thread, but I don't understand it, really. Apologizes.

Can I save the zip on my phone and just flash it over the old 18.1 from march? Or can I wipe system, data + cache and flash the latest version after that in TWRP?

Thank you so much for help.
You can dirty flash the latest unofficial 18.1 over the March 18.1 from this thread :)
 
  • Like
Reactions: Davy-Jones

Davy-Jones

Member
Aug 2, 2021
13
0
I tried and it worked very well. Thank you so much for sharing the OS and your support.

Are there any disadvantages, doing dirty flashs every 3-4 weeks, when wiping the cache after flashing?
 

Neurotical

Senior Member
Feb 7, 2011
121
140
I tried and it worked very well. Thank you so much for sharing the OS and your support.

Are there any disadvantages, doing dirty flashs every 3-4 weeks, when wiping the cache after flashing?
Great! There are no disadvantages of dirty flashing if you are using the same build base. To make it easier all you have to do is use OTA on your phone (Settings -> System -> Advanced -> Updater) and you'll get the most recent build I upload. This includes Kernel updates (security & performance), LOS updates (security & performance), and monthly AOSP security updates.
 
  • Like
Reactions: Davy-Jones

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi @Synt4x.93
    I'm trying to compile lineage starlte using your source code, include device, common, kernel and vendor.
    When I run brunch starlte to begining compile, I got an error: build/make/core/Makefile:2347: error: hardware/samsung/mkbootimg.mk: No such file or directory.
    Where I can clone samsung hardware source code for lineage 18.1?
    I'm looking forward to hearing from you!
    Thanks for reading.
    Hi,
    You need to apply this fix to the code source: https://github.com/pakaoraki/androi...mmit/7397c44c12fdc3fe669bf0ead10c908b16d88ab0

    Fix is not present yet in the original Synt4x.93 repo.
    1
    Hi, @ElPakoTech
    I'm trying to get all buildprop properties from default.prop, /system/build.prop and vendor/build.prop, but it not of all.
    For example: [ro.product.brand] and [ro.product.odm.brand], i cannot find them in any file I just find [ro.product.system.brand] in /system/build.prop and [ro.product.vendor.brand] in /vendor/build.prop
    Where I can find them?
    How to write ro.product.brand, ro.product.odm.brand in to /system/build.prop when I compile the lineage starlte
    For example, to me (as I am not an expert android dev) you can modify this file for starlte: /device/samsung/starlte/lineage_starlte.mk

    Code:
    ...
    # Device identifier. This must come after all inclusions
    PRODUCT_DEVICE := starlte
    PRODUCT_NAME := lineage_starlte
    PRODUCT_BRAND := samsung
    PRODUCT_MODEL := SM-G960F
    PRODUCT_MANUFACTURER := samsung
    ...

    If you just want to build for starlte/star2lte (S9/S9+), you don't need to modify any files but I am not sure about what you to do.
    1
    Is there any way to transfer (or keep) the samsung "hidden" system apps to this rom?

    The thing is that I need to use the "Samsung Network Settings" app, which cannot be downloaded from Google PlayStore, nor Galaxy Store, and comes preinstalled with the phone.

    I need to use specifically that app because the high-frequency antennas in my machine are working poorly and 4G LTE only works well on the 700 Mhz band, and I use that software to lock the radio on my phone on those frequencies (900 Mhz for 3G and 700 Mhz for 4G LTE).
  • 42
    2okPze5.png


    REQUIREMENTS:
    • Stock Samsung Oneui 2 - 2.5 (Android 10) Firmware. (Bootloader + Vendor)

    INSTRUCTIONS:
    • Lineage Recovery or TWRP
    • Format /system + /data + /cache
    • Flash
    • Reboot

    WORKING:
    • Wi-Fi
    • Bluetooth
    • Mobile Network
    • GPS
    • NFC
    • Audio
    • Camera
    • Fingerprint Sensor
    • HDMI
    • Ethernet
    • MTP/ADB
    • Call Recording
    • Encryption
    • SELinux Enforcing
    • Android Auto
    • Glove Mode
    • OTA Updates

    BROKEN:
    • Iris Scanner
    • VoLTE

    DOWNLOADS:

    XDA:DevDB Information
    LineageOS 18.1, ROM for the Samsung Galaxy S9

    Version Information
    Status:
    Stable
    ROM OS Version: Android 11
    ROM Kernel: Linux 4.9.118
    ROM Firmware Required: Oneui 2 - 2.5

    Contributors
    synt4x.93

    Source Code: https://github.com/synt4x93/

    Created: 16-12-2020
    Last Updated: 21-03-2021
    6
    would you mind specifying exactly what you did to build this? I am using the lineage for microg docker based build and it currently succesfully builds 17.1. I would like to build 18.1 with OTA and sign it myself and provide the OTA like you do.
    There are fragments of info across this thread, it would be great if you or anyone else can put them together.
    Thanks!
    Hi,

    Sure I can share what I did.

    1. Prepare directories and get Lineage sources (https://wiki.lineageos.org/devices/starlte/build)

    # Create directories
    Bash:
    mkdir -p ~/bin
    mkdir -p ~/android/build
    mkdir -p ~/android/build/src
    mkdir -p ~/android/build/ccache
    mkdir -p ~/android/build/keys
    mkdir -p ~/android/build/logs
    mkdir -p ~/android/build/zips
    mkdir -p ~/android/build/manifests

    # Get repo tools
    Bash:
    curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    chmod a+x ~/bin/repo

    # Create a "~/.profile" file and paste this into:
    Bash:
    “if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi”

    # Prepare git
    Bash:
    cd ~/android/build/src
    git config --global user.email "[email protected]"
    git config --global user.name "Your Name"

    # Init repo
    Bash:
    source ~/.profile
    repo init -u https://github.com/LineageOS/android.git -b lineage-18.1

    # Time to sync (it can take a very long time, so be patient).
    Bash:
    repo sync

    2. At this point, I forked all Synt4x.93 related repositories on my Github. But, you don’t really need to do that if you just want to build.

    For OTA, the only repo you will need to fork is android_device_samsung_starlte.

    3.
    Create an other repository named OTA.

    4. From your forked android_device_samsung_starlte repository, modify the file lineage_starlte.mk

    Change the last line with your GitHub username:
    Code:
    PRODUCT_PROPERTY_OVERRIDES += \
    lineage.updater.uri=https://raw.githubusercontent.com/<Your_username>/OTA/lineage-18.1/starlte.json

    5. Then you need to add the roomservice.xml file to add the device and kernel sources.

    You can use the resources from Synt4x.93, mine or from Neurotical (He’s maintaining a more recent version of the kernel, you should have a look: https://forum.xda-developers.com/t/rom-s9-s9-unofficial-lineageos-18-1-weekly.4302901/ )

    Get one of the manifests:
    -Synt4x.93: https://github.com/synt4x93/local_manifests
    -pakaoraki: https://github.com/pakaoraki/local_manifests
    -Neurotical: https://github.com/Geoknyda/local_manifests

    Then modify the file roomservice.xml: change "project name" with your GitHub username to match your repository:
    Code:
    ...
    <project name="synt4x93/android_device_samsung_starlte" path="device/samsung/starlte" remote="github" revision="lineage-18.1" />
    ...

    Copy your version of roomservice.xml into ~/android/build/manifests directory.

    # Update source again
    Bash:
    repo sync

    6. Generate your own keys (https://wiki.lineageos.org/signing_builds.html)

    From the root of your Android tree, run these commands, altering the subject line to reflect your information:
    Bash:
    subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/[email protected]'
    
    cd ~/android/build/src
    for x in releasekey platform shared media networkstack testkey; do \
        ./development/tools/make_key ~/android/build/keys/$x "$subject"; \
    done
    make a copy of the “keys” directory and keep it safe.

    7. Install docker and get docker-lineage-cicd image:

    You can use lineaos4microg : https://hub.docker.com/r/lineageos4microg/docker-lineage-cicd/Dockerfile
    Bash:
    docker pull lineageos4microg/docker-lineage-cicd

    Or

    I also re-write my own docker image to add some options. You can try: https://hub.docker.com/r/pakaoraki/docker-lineage-cicd
    Bash:
    docker pull pakaoraki/docker-lineage-cicd

    8. Then you are ready to build:

    Execute this command (change pakaoraki/docker-lineage-cicd with lineaos4microg/docker-lineage-cicd if needed)

    Bash:
    docker run \
    -e "BRANCH_NAME=lineage-18.1" \
    -e "DEVICE_LIST=starlte" \
    -e "INCLUDE_PROPRIETARY=false" \
    -e "SIGN_BUILDS=true" \
    -v "~/android/build/src:/srv/src" \
    -v "~/android/build/zips:/srv/zips" \
    -v "~/android/build/logs:/srv/logs" \
    -v "~/android/build/ccache:/srv/ccache" \
    -v "~/android/build/keys:/srv/keys" \
    -v "~/android/build/manifests:/srv/local_manifests" \
    pakaoraki/docker-lineage-cicd

    9. When build is done, create a new release on your OTA repo: choose a tag and upload recovery.img and zips file.

    you will need to create a starlte.json that match to your build and release information:
    Code:
    {
       "response": [
          {
             "datetime": 1627204505,
             "filename": "lineage-18.1-20210725-UNOFFICIAL-starlte.zip",
             "id": "39b85208c5c30edfafd983673a703d60",
             "romtype": "UNOFFICIAL",
             "size": 608774193,
             "url": "https://github.com/<username>/OTA/releases/download/<tag>/lineage-18.1-20210725-UNOFFICIAL-starlte.zip",
             "version": "18.1"
          }
       ]
    }

    <tag>: the tag you use when creating the release on Github.
    <username>: your username.

    Then, upload starlte.json to your OTA repository.

    It's possible that I forget something but you get the global idea.
    4

    @ElPakoTech

    Thanks for your work!
    I will test the build and give you feedback.

    Nice , if we have a maintained LOS with current security patches.
    Have you a paypal adress, that i can buy you a beer?

    Regards
    dreas
    I will do my own build anyway if there is no official support so I'm happy to share it. No need to tips but thanks :)
    4
    5th July security update ready on this build if you are compiling your own.
    How to check when its available besides going thru the make process and checking
    ~/android/build/core/version_defaults.mk
    once complete for the security update date ?

    Also checking the
    //source.android.com/security/bulletin
    for the monthly date and
    https://lineageos.org/blog/
    changelog
    isnt helpful. How to know what patch is ready to build before I go thru the whole process ???

    Need to keep the device patched to the latest at all times to be able to use as a daily for work :p
    To check for security update version of Lineage 18.1 before building your own: https://github.com/LineageOS/android_build/blob/lineage-18.1/core/version_defaults.mk#L243

    There is a build with July security update and an upstreamed kernel here: https://forum.xda-developers.com/t/rom-s9-s9-unofficial-lineageos-18-1-weekly.4302901/

    I am upstreaming the kernel daily and building these new builds daily as well.
    4
    Don't mean to be a jerk, simply stating my choices. The person who made this unoffical rom has been online several days this past week and has given us zero communication on future updates.

    I'll be heading to arrow os soon.
    In open source nobody owes anything to anyone. People are working in their free time. Which is kind of obvious.