[ROM][OFFICIAL][11] LineageOS 18.1 for Samsung Galaxy S5 (klte*)

Search This thread

ludwig83

Member
May 9, 2018
25
13
Hi!
My device is not recognized by PC, tried on 2 computers, different cables, USB debugging enabled, etc. Latest Samsung USB drivers installed. Not even "unknown" device shown on PC device manager. It worked fine before. What can be the problem?
Data transfer is allowed? I sometimes forget to disable USB charging only ;)
 
  • Like
Reactions: kurtn

ludwig83

Member
May 9, 2018
25
13
Hi!
My device is not recognized by PC, tried on 2 computers, different cables, USB debugging enabled, etc. Latest Samsung USB drivers installed. Not even "unknown" device shown on PC device manager. It worked fine before. What can be the problem?
Data transfer is allowed? I sometimes forget to disable USB charging only
Yes it is allowed, I checked in developer USB options. Unless this function broke when I installed this ROM?
Did you try connection in Downloadmode to Odin or Heimdall also?
(Heimdall of course only if you have prepared it in the past and usually not on the PC were you use Odin and Samsung USB drivers)
 
Last edited:
  • Like
Reactions: curiousrom
S5 Connecting to PC - adb Wireless Debugging

...My device is not recognized by PC, tried on 2 computers, different cables, USB debugging enabled, etc. Latest Samsung USB drivers installed. Not even "unknown" device shown on PC device manager. It worked fine before...

What is the OS of your computer?

If it's Windows install the most recent drivers found in Samsung Developers - Android USB Driver for Windows.

If you used Heimdall & it's clunky Zadig.exe sidekick on Windows it may have messed up the drivers including making Odin3 fail to connect to the S5 and that may fix it. If you did use Heimdall can you reboot the S5 with print-pit in Heimdall? You could try uninstalling the driver you installed with Zadig.exe if you remember it. Maybe it's MSM8x60 or Gadget Serial or something else that you may see in Device Manager with the S5 connected & Heimdall opened.

On the S5 what does it say in > Settings > About phone > Android version > LineageOS version?

Try turning off the device, wait a few seconds then turn back on. Reboot the computer and try an other USB port or with/without a USB hub.

What are you trying to do? Connecting using adb or file transfer?

In TWRP recovery MTP file transfer & adb is enabled by default. Can you connect to PC using that? AFAIK adb is enabled in Lineage recovery. Don't know about file transfer with that recovery.

If it's not setup yet see What is ADB? How to Install ADB, Common Uses, and Advanced Tutorials (for Windows, macOS or Linux).
***

USB File transfer

With USB debugging enabled in Developer options & connected to the computer do you get a notification saying "Android System - Charging this device via USB"? If so, tap on it to get more options & select File Transfer as seen in the screenshot. On my Windows 10 PC the device model appears in Explorer. SM-G900M in my case.

If it fails try in Developer options > Default USB configuration > File Transfer.
***

Connecting via adb

With the S5 connected you should get a notification saying "USB debugging connected".

In the terminal or command prompt window type adb devices and if the response is:

List of devices attached
f3d3xxxx {device's serial number} unauthorized

then on the S5 there should be a popup asking to "Allow USB debugging?".

If not, disconnect & in Developer options > Revoke USB debugging authorizations. Then reconnect and you should get that popup.

Warning: there is an annoyance in Android 11: it will automatically revoke adb authorizations by default after 7 days if you do not enable Disable adb authorization timeout in Developer options as seen in the screenshot.

This could be important if for example your screen does not turn on & you want to use adb. In that case you will not be able to re-authorize the computer to connect to the device because it was automatically disabled and you can't see the prompt.
***

adb Wireless debugging

In previous Lineage version it was called ADB over network. In LineageOS 18.1 it's named Wireless debugging and you can add a quick tile shortcut with Developer options > Quick settings developer tiles. After that edit the quick tiles & drag it up.

With your device connected to the same Wifi network as you computer in ADB over network you could could connect in adb with just the IP address. For example:

adb connect 192.168.100.3

Now in Wireless debugging you need to include also the port which changes every time you use it. An other Android 11 annoyance. For example:

adb connect 192.168.100.3:43791

To see what it is currently for your device long press Wireless debugging as seen in the screenshot.

I copy/paste that from a adb doc I keep but with checking the new port every time.
***
 

Attachments

  • Developer_Options_Disable_adb_Timeout_LineageOS_18-1_S5_curiousrom.png
    Developer_Options_Disable_adb_Timeout_LineageOS_18-1_S5_curiousrom.png
    170.3 KB · Views: 33
  • Allow_USB_debugging_LineageOS_18-1_S5_curiousrom.png
    Allow_USB_debugging_LineageOS_18-1_S5_curiousrom.png
    793.2 KB · Views: 29
  • USB_File_Transfer_LineageOS_18-1_S5_curiousrom.png
    USB_File_Transfer_LineageOS_18-1_S5_curiousrom.png
    417.9 KB · Views: 28
  • Wireless_Debugging_LineageOS_18-1_S5_curiousrom.png
    Wireless_Debugging_LineageOS_18-1_S5_curiousrom.png
    240.8 KB · Views: 28
  • Wireless_Debugging_Notification_LineageOS_18-1_S5_curiousrom.png
    Wireless_Debugging_Notification_LineageOS_18-1_S5_curiousrom.png
    120.8 KB · Views: 31
Last edited:
Magisk 23.0 Update on Galaxy S5 LineageOS 18.1 - Magisk Installation

I used the installed Magisk 22.1 app on my S5 G900M klte 18.1 to update it to Magisk 23.0 app, then the Direct install method to update Magisk itself to 23.0 & all went well. (screenshots)

You can see the changelog in the app or: https://github.com/topjohnwu/Magisk/releases

Of note in that Magisk page it says this but it was not my case: "RESTORE THE EXISTING MAGISK MANAGER BACK TO NORMAL BEFORE UPGRADING IF HIDDEN!".

If you did not receive a Magisk update notification: Magisk app > Settings > Check Updates.

As you can see in the screenshot the SafetyNet test API was fixed in Magisk 23.0.

You can test also with apps like SafetyNet Test or SafetyNet Helper Sample for example.

If you want to try Magisk get the most recent stable version in https://github.com/topjohnwu/Magisk/releases

And follow the Custom Recovery method: https://topjohnwu.github.io/Magisk/install.html#custom-recovery :

  • Download the Magisk APK
  • Rename the .apk file extension to .zip, for example: Magisk-v22.0.apk → Magisk-v22.0.zip. If you have trouble renaming the file extension (like on Windows), use a file manager on Android or the one included in TWRP to rename the file.
  • Flash the zip just like any other ordinary flashable zip.
  • Reboot and check whether the Magisk app is installed. If it isn’t installed automatically, manually install the APK.

Make sure to enable Magisk app > Settings > MagiskHide afterwards.

I made 2 extra copies of Magisk-v23.0.apk.

One renamed Magisk-v23.0.zip & the other one uninstall.zip as per https://topjohnwu.github.io/Magisk/install.html#uninstallation and copied all 3 to the external SD Card :

The easiest way to uninstall Magisk is directly through the Magisk app. If you insist on using custom recoveries, rename the Magisk APK to uninstall.zip and flash it like any other ordinary flashable zip.
***
 

Attachments

  • Magisk_23.0_Update_LineageOS_18-1_S5_curiousrom.png
    Magisk_23.0_Update_LineageOS_18-1_S5_curiousrom.png
    191.1 KB · Views: 39
  • Magisk_23.0_Update_Direct_Install_LineageOS_18-1_S5_curiousrom.png
    Magisk_23.0_Update_Direct_Install_LineageOS_18-1_S5_curiousrom.png
    362.3 KB · Views: 38
  • Magisk_23.0_SafetyNet_Test_LineageOS_18-1_S5_curiousrom.png
    Magisk_23.0_SafetyNet_Test_LineageOS_18-1_S5_curiousrom.png
    77.2 KB · Views: 36
  • SafetyNet_attest_S5_curiousrom.png
    SafetyNet_attest_S5_curiousrom.png
    164.7 KB · Views: 42

jdrch

Senior Member
  • Jun 18, 2014
    409
    179
    Quad Cities, IA
    Is anyone else getting System UI crashing so hard that the phone locks itself immediately on unlock?

    Also, what are folks doing for Google Apps given that OpenGApps still doesn't have an official Android 11 release?
     

    x2k13

    Senior Member
    Hi!
    My device is not recognized by PC, tried on 2 computers, different cables, USB debugging enabled, etc. Latest Samsung USB drivers installed. Not even "unknown" device shown on PC device manager. It worked fine before. What can be the problem?
    If you
    Wiki.lineageos.org recommends mindthegapps. I recommend no GApps at all or Lineage.microg.org
    Running OpenGapps pico test without noticable issues so far.
     

    bgatos

    Member
    Apr 29, 2019
    29
    2
    Hi,

    In Settings/Location: Bluetooth scanning toggle works but the Wifi scanning toggle always kicks back to inactive. Any help much appreciated!

    Edit:
    Partly solved. Wifi location scanning works but only if airplane mode is off.
    Gps works fine.

    But still some apps think location service is off on device...
     
    Last edited:

    Massedil

    Senior Member
    Dec 7, 2016
    58
    17
    Paris
    Is anyone else getting System UI crashing so hard that the phone locks itself immediately on unlock?
    Yes, it looks like this :


     
    • Like
    Reactions: curiousrom
    Really want to use this but I have a G900H

    Can you please make this version compatible?

    The S5 SM-G900H 3G Exynos is not part of the S5 klte Snapdragon family & with many hardware differences (chipset, CPU, GPU, etc.) so it cannot run the same ROM. See this specs comparison: https://www.gsmarena.com/compare.php3?idPhone1=6033&idPhone2=6237#diff-*,*,*

    Try site:forum.xda-developers.com/ SM-G900H lineageos for alternatives and change keywords to taste.

    Good luck!
    ***
     
    • Like
    Reactions: Eagle_Droid

    Top Liked Posts

    • 1
      No one has two packages of GApps. I really suggest re-installation. You wasted too much time in this discussion. Especially with a Google account, installation is not that hard.
      Sorry to waste your time. However, I think I was able to get rid of any residue there might have been left of gapps or whatever that slowed down the phone and reinstall os and Bitgapps (second to last build) after a thourough wipe. So far the phone appears much quicker.
    • 10
      SDcard corruption may be caused by a recent Google security patch. I experienced this once with the "new" unofficial LOS17 for the Samsung P605, coming from unofficial 14.1,where this never happened before. But others started complaining about the same issue, after this antique rom got a recent security patch.
      It's (likely) not. I've found an issue in the legacy paths of the recent sdfat (Samsung exfat driver) revision. I haven't been able to recreate the bug/assert after the fix. After getting a second confirmation I'll upload the merge the change.

      Every kernel < 4.8.y that had updated to sdfat 1.4.5 is affected.
      7
      Follow-up on corrupted external extfat sdcard

      Test case :

      1/ spotify updates its cached files located on the external extfat sdcard
      2/ spurious reboot occurs
      3/ upon reboot, the scdard is corrupted and can't be mounted

      Diagnosis:

      Checking manually the sdcard using fsck.exfat identifies the corrupted files, which are preventing the card to be mounted : see attached log

      - fsck.exfat identifies the corrupted files but is enable to fix anything, whatever the option

      - fsck.exfat Lineageos version 1.04 (checked in by haggertk)

      - fsck.exfat current version 1.12

      Although this makes no difference because of pending issue #117 : Can't repair corrupted exfat

      - Inserting the sdcard into a PC, Windows detects the issue and offers to "scan and repair" the drive. Once the sdcard is "fixed", it can be used in the PC without problems. Although, a Windows "scanned and repaired" sdcard will still appear as corrupted in Lineageos and can't be mounted.

      Options:

      1/ On another device that can mount the sdcard, delete manually the previously identified corrupted files ; it's usually sufficient to fix the issue.

      2/ Otherwise, backup the sdcard content, reformat (also restore the volumeid), then restore the backup.

      Other thoughts :

      Under stress writing to the sdcard, lineageos can reboot unexpectedly. Since this is not an isolated incident, this should definitely be investigated, since as a result the sdcard will be more likely corrupted and the actual tools don't allow to repair it.

      I am not sure how to recover the log files preceding the reboot, once the device as rebooted. if someone can instruct me how to do so, I'll post them the next time this happens, which is unfortunately too frequently.
      6
      S5 LineageOS 18.1 Update 2021-06-06

      Using the built-in Updater I OTA updated S5 G900M LineageOS 18.1 klte build 2021-05-30 + MindTheGapps + Magisk 23.0 + TWRP 3.5.2_9-0 to build 2021-06-06: everything went smoothly.

      Thank you to the Lineage Team & Mr. haggertk for keeping our old S5 up to date. :cool: 👍
      ***
      6
      That happens when you pass a magnet near your phone and it thinks you have a smart cover accessory.

      Settings > Connected Devices > Connection Preferences > Smart Cover > Off
      6
      It's (likely) not. I've found an issue in the legacy paths of the recent sdfat (Samsung exfat driver) revision. I haven't been able to recreate the bug/assert after the fix. After getting a second confirmation I'll upload the merge the change.

      Every kernel < 4.8.y that had updated to sdfat 1.4.5 is affected.
      I have been testing @haggertk sdfat patch for the past 24h and I haven't experienced any spurious reboot nor sdcard corruption so far, whereas normally my phone would reboot several times a day and the sdcard card would generally end up being corrupted.
    • 31
      2okPze5.png



      LineageOS is a free, community built, aftermarket firmware distribution of Android 11, which is designed to increase performance and reliability over stock Android for your device.

      LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. You will need to provide your own Google Applications package (gapps) . LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

      Base source code is available in the LineageOS Github repo. And if you would like to contribute to the project, please visit our Gerrit Code Review.

      Device source code:
      Kernel source code:

      Build Compatibility:
      The noted models are the only ones supported. If you have a model that isn't listed and ask politely then I might work to add compatibility.
      BuildModel
      klteSM-G900F, SM-G900M, SM-G900R4, SM-G900R7, SM-G900T, SM-G900V, SM-G900W8
      klteactivexxSM-G870F
      klteaioSM-G900AZ, SM-S902L
      kltechnSM-G9006V, SM-G9008V
      kltechnduoSM-G9006W, SM-G9008W, SM-G9009W
      klteduosSM-G900FD, SM-G900MD
      kltedvSM-G900I, SM-G900P
      kltekdiSC-04F, SCL23
      kltekorSM-G900K, SM-G900L, SM-G900S

      Downloads:
      Installation Instructions:
      Reporting Bugs:
      Compatibility Notes:
      • Bootloader version doesn't matter. Anyone who tells you so doesn't know what they are taking about. My Developer Edition G900V is still running the original 4.4.2 KK aboot. My G900W8 is running the latest 6.0.1.
      • All builds except for klteactivexx and klteaio MUST be running a marshmallow (6.0.1) radio for RIL to work. If you are about to report that RIL/radio isn't working then I pretty much guarantee this is your issue.
      • You MUST be running a marshmallow (6.0.1) NON-HLOS for the fingerprint reader to work. If you are about to report a fingerprint reader problem then you either have old firmware (update it), your /data was previously encrypted and you performed a "clean" flash without FORMATTING /data (start over and FORMAT /data), or your reader is just broken.
      • External SD cards don't support POSIX (ext*, f2fs) or NTFS filesystems anymore. If this affects you then just bite the bullet, copy any data off you really want to save, and reformat as exfat.
      • The latest TWRP seems like it works, but if someone has issues then perhaps try using the actual supported recovery.
      Donations:
      • I absolutely don't personally accept them. If you really feel that this work deserves it, then find a local food bank or animal shelter/rescue and throw some money their way. You can also throw some the way of LineageOS, but we're actually doing pretty well right now.
      10
      SDcard corruption may be caused by a recent Google security patch. I experienced this once with the "new" unofficial LOS17 for the Samsung P605, coming from unofficial 14.1,where this never happened before. But others started complaining about the same issue, after this antique rom got a recent security patch.
      It's (likely) not. I've found an issue in the legacy paths of the recent sdfat (Samsung exfat driver) revision. I haven't been able to recreate the bug/assert after the fix. After getting a second confirmation I'll upload the merge the change.

      Every kernel < 4.8.y that had updated to sdfat 1.4.5 is affected.
      9
      S5 LineageOS 18.1 Update 2021-05-09 - Security Bump, Camera U.I. Fix & Kill App Option

      Using the built-in Updater I OTA updated S5 G900M LineageOS 18.1 klte build 2021-05-02 + MindTheGapps + Magisk 22.1 + TWRP 3.5.2_9-0 to build 2021-05-09: everything went smoothly & GApps + Magisk survived the update.

      There are a bunch of changes as you can see in https://download.lineageos.org/klte/changes/ but of note:

      After the automatic reboot as seen in the screenshot > Settings > About phone > press on Android version > Android security update: May 5, 2021.

      The Vendor security patch level just below it remains @ August 1, 2017 because the vendor is Samsung & it is not publishing security patches for it's S5 proprietary hardware related blobs anymore since August 2017.

      See Android Security Bulletin - May 2021 for details about the security fixes.

      With the change Snap: use translucent control background on 16:9 the stock camera is showing the full frame preview again (screenshot). There are other minor Camera changes.

      Interesting also there is a new Kill foreground app option in > Settings > System > Buttons > for Home, Back & Recents buttons which is useful when an app is frozen or you want to prevent it from using some RAM in the background (screenshot). Note that it may make it slower to open that killed app the next time you want to use it.

      BTW you can create a direct link to Updater & much more with the LineageOS Settings widget. I stacked a few of them on Home to create a LineageOS shortcut folder for quick access.

      Thank you to the Lineage Team & Mr. haggertk for keeping our old S5 up to date. :cool: 👍
      ***
      7
      Galaxy S5 LineageOS 17.1 Upgrade to 18.1 + OTA Update Success Using TWRP

      I upgraded my S5 7 days ago and did not lose any apps & settings: Galaxy S5 G900M LineageOS 17.1 klte build 2021-04-18 + Open GApps Pico + TWRP 3.5.2_9-0 >>> LineageOS 18.1 klte build 2021-04-25 + MindTheGapps for Android 11 ARM + Magisk 22.1 which I just OTA updated to LineageOS 18.1 klte build 2021-05-02: everything went smoothly & GApps + Magisk survived the update.

      The only major issue is the unusable stock Camera as described here: LineageOS Snap Camera U.I. Not Showing the Full Image Preview. Edit: Good news, following a conversation with a dev this commit was merged & will be included in next build: Snap: use translucent control background on 16:9.

      Note: three S5 users so far AFAIK, including @Massedil in his post here, reported not being able to unlock their devices after upgrading to 18.1 from 17.1. I always disable screen & SIM locks before an update or upgrade just to remove variables that may go wrong.

      Old versions of TWRP may fail to apply OTA updates. See How To Update TWRP Using TWRP Itself.

      BTW don't install the TWRP app when offered in TWRP as it may causes bootloop because LineageOS is enforcing priv-app whitelisting rules.

      Several S5 klte variants users reported failed to boot on 17.1 with a modem older than Android 6.0.1. This may also cause No Network or No Service issues on 17.1 & 18.1. See S5 Odin Flashable Modem & Bootloader.

      Also before a major upgrade to a higher version but not before regular updates: Magisk > Uninstall > Restore images to preserve my Magisk settings & modules while disabling Magisk (screenshot).

      Re-flashed Magisk-22.1.zip after successful boot to System after the upgrade.

      MindTheGapps is similar to Open GApps Nano. See Open GApps Package Comparison.

      Searching apps with Google in /System:
      • Android Accessibility Suite
      • Android Auto
      • Android Setup
      • Data Transfer Tool
      • Exchange Services
      • Google (search app)
      • Google Calendar Sync
      • Google Contacts Sync
      • Google Partner Setup
      • Google Play services
      • Google Play Store
      • Google Services Framework
      • Google Text-to-speech Engine
      • Market Feedback Agent
      • Markup
      You can also download the MindTheGapps package, unzip & search it with apk.

      You can disable the Google's search app with it's optional personal data hungry Assistant in it's app info. Which I did because it has too many running services for my taste.

      AFAIK from the available Open GApps for Android 11 test builds 20210130 @ the present, only the Pico package was reported as issue free in the Open GApps support thread on XDA: GAPPS DAILY Open GApps for Android; All Android Versions & Devices.

      I have been an Open GApps Pico user for years on several devices but since there are no official releases for Android 11 @ the present, I decided to test MindTheGapps because that's what LineageOS links to @ the present in https://wiki.lineageos.org/gapps.html and wanted to post about it.

      See https://wiki.lineageos.org/devices/ > {device} > Upgrade to a higher version of LineageOS.

      After a full TWRP backup (including the important EFS partition but except the Cache) & triggering a fresh Google Backup* (Settings > System > Advanced > Backup in 17.1), I did the same steps as described in that upgrade guide except that I use TWRP 3.5.2_9-0 so sideload must be started manually on the S5 before sideloading from the computer: TWRP > Advanced > ADB Sideload > Swipe to Start Sideload.

      Or simply copy the files to the device & flash from there using TWRP.

      To make the TWRP backup smaller I use SD Maid > AppCleaner to clear the cache of all apps & make sure to delete all downloaded updates in Updater by long pressing them or if rooted move them from /data/lineageos_updates/ to external or internal SD Card.

      In case of failing to boot you can restore only the System, Data & Boot (boot.img is actually the kernel) partions from the full backup.

      Obviously there are other backup methods but that's the one I use since a couple of years & restored them both successfully.

      On some devices, some versions of TWRP do not work well with LineageOS 18.1 and the Lineage recovery is recommended in those cases but on my S5 klte, TWRP wins hands-down with it's backup/restore feature, File Manager, installing both manually or via sideload & applying successfully OTA updates so I don't see any reasons for switching to the Lineage recovery @ the present.

      Tip: to make the S5 18.1 U.I. faster & more fluid when opening the apps drawer, scrolling through home pages, opening Settings, etc: > Settings > Accessibility > toggle on Remove animations.

      Try it before & after as fast as you can to see the difference.

      *: Warning for people using a pattern lock screen see this bug report: Google cloud backup cannot be restored when using a 4x4, 5x5 or 6x6 lock screen pattern
      ***

      Thank you to the Lineage Team & Mr. haggertk for keeping our old S5 up to date. :cool: 👍
      ***
      7
      Follow-up on corrupted external extfat sdcard

      Test case :

      1/ spotify updates its cached files located on the external extfat sdcard
      2/ spurious reboot occurs
      3/ upon reboot, the scdard is corrupted and can't be mounted

      Diagnosis:

      Checking manually the sdcard using fsck.exfat identifies the corrupted files, which are preventing the card to be mounted : see attached log

      - fsck.exfat identifies the corrupted files but is enable to fix anything, whatever the option

      - fsck.exfat Lineageos version 1.04 (checked in by haggertk)

      - fsck.exfat current version 1.12

      Although this makes no difference because of pending issue #117 : Can't repair corrupted exfat

      - Inserting the sdcard into a PC, Windows detects the issue and offers to "scan and repair" the drive. Once the sdcard is "fixed", it can be used in the PC without problems. Although, a Windows "scanned and repaired" sdcard will still appear as corrupted in Lineageos and can't be mounted.

      Options:

      1/ On another device that can mount the sdcard, delete manually the previously identified corrupted files ; it's usually sufficient to fix the issue.

      2/ Otherwise, backup the sdcard content, reformat (also restore the volumeid), then restore the backup.

      Other thoughts :

      Under stress writing to the sdcard, lineageos can reboot unexpectedly. Since this is not an isolated incident, this should definitely be investigated, since as a result the sdcard will be more likely corrupted and the actual tools don't allow to repair it.

      I am not sure how to recover the log files preceding the reboot, once the device as rebooted. if someone can instruct me how to do so, I'll post them the next time this happens, which is unfortunately too frequently.
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone