[OFFICIAL] LineageOS 18.1 for the Samsung Galaxy S4 (All QCOM Variants)

Search This thread

npjohnson

Recognized Developer
  • Seeing several reports about the OTA updates giving issues and it being apparently solved in the 210415 build, I would like to share an observation - and thank the developers for all their work!

    On an I9505 (jfltexx) which I upgraded via dirty flash from 17.1 to 18.1, I wasn't able to export the downloaded 210422 update what I tend to do on that device before installing. Wasn´t possible resulting in an error - I checked on permissions and also reset all data of the updater (not settings). After successful OTA update to 210422 (had done the update before on another I9505 without issues and therefore dared to do even with this error), it was possible to export.
    Fixed exporting updates. Current build should be able to.
     

    js-xda

    Senior Member
    Aug 20, 2018
    189
    91
    Fixed exporting updates. Current build should be able to.
    Is it by design that updates are now exported to "/sdcard/Android/data/org.lineageos.updater/files/LineageOS updates" and no longer to "/sdcard/LineageOS updates"? Something related to permissions?
     

    Lycon70492

    Senior Member
    Sep 19, 2016
    69
    6
    Currently running official lineage os 17.1 on the jfltexx (GT I9505) and official twrp 3.4.0.0.

    Is there anything in particular I should do before installing lineage os 18.1; for example, version of official twrp to use, twrp format data etc?
     

    kurtn

    Senior Member
  • Jan 28, 2017
    3,985
    1,725
    Small town in Bavaria
    Currently running official lineage os 17.1 on the jfltexx (GT I9505) and official twrp 3.4.0.0.

    Is there anything in particular I should do before installing lineage os 18.1; for example, version of official twrp to use, twrp format data etc?
    You are good to go. If you want to format data, do it. If you don't, all your apps and data will survive. Except email.

    If you had GApps installed and don't format, you need to flash android 11 GApps immediately after 18.1
     
    • Like
    Reactions: pocketrule

    karlico

    Member
    Nov 1, 2017
    12
    3
    Thanks for this great rom! Getting the newest android on this 2013 phone is just amazing.

    I installed the newest lineage recovery, from 2021-05-13, and it wouldn't flash the OS succussfully. Tried with the OS versions from 2021-04-22 and 2021-05-13. Outputs from the abd sideloading below(phone). The phone would then reboot back to stock rom. On the computer side the adb output updates stopped at 94%. I believe the first 2 red lines with errors(phone) popped up at 47% and the next identical ones at 94%

    Then I installed twrp instead of lineage recovery. ABD sideloading the OS went absolutely fine. And as the instruction says I did get the following error message which is fine: "If the process succeeds the output will stop at 47% and report adb: failed to read command: Success."

    s4 version is GT-I9505.

    EDIT: Managed to boot into stock recovery instead of lineage recovery. Because I booted stock rom after flashing lineage recovery.

    IMG_20210513_224646.jpg
     
    Last edited:

    rw_on_xda

    Senior Member
    Jun 24, 2013
    295
    158
    Berlin
    ...
    I installed the newest lineage recovery, from 2021-05-13, and it wouldn't flash the OS succussfully. Tried with the OS versions from 2021-04-22 and 2021-05-13. Outputs from the abd sideloading below(phone). The phone would then reboot back to stock rom. On the computer side the adb output updates stopped at 94%. I believe the first 2 red lines with errors(phone) popped up at 47% and the next identical ones at 94%
    ...
    does the sha256 checksum of the downloaded LOS match ?
     
    • Like
    Reactions: pocketrule

    x2k13

    Senior Member
    Thanks for this great rom! Getting the newest android on this 2013 phone is just amazing.

    I installed the newest lineage recovery, from 2021-05-13, and it wouldn't flash the OS succussfully. Tried with the OS versions from 2021-04-22 and 2021-05-13. Outputs from the abd sideloading below(phone). The phone would then reboot back to stock rom. On the computer side the adb output updates stopped at 94%. I believe the first 2 red lines with errors(phone) popped up at 47% and the next identical ones at 94%

    Then I installed twrp instead of lineage recovery. ABD sideloading the OS went absolutely fine. And as the instruction says I did get the following error message which is fine: "If the process succeeds the output will stop at 47% and report adb: failed to read command: Success."

    s4 version is GT-I9505.

    View attachment 5308701
    from https://wiki.lineageos.org/devices/jfltexx/install

    5. Sideload the LineageOS .zip package:
    • On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
    • On the host machine, sideload the package using: adb sideload filename.zip.

      Tip: If the process succeeds the output will stop at 47% and report adb: failed to read command: Success.
    The output on your display, Manual Mode...I've never seen that during sideloading. 🤔
     

    karlico

    Member
    Nov 1, 2017
    12
    3
    does the sha256 checksum of the downloaded LOS match ?
    I'm pretty sure I checked the checksum for OS zip files. I am trying to recheck now. The 05-13 version is fine. However the os version I flashed secondly, yesterday, was not 04-22, but 04-15 according to my local file. I am not able to find the checksum of that version anymore as it is not listed on the official download site. Weird I guess.

    I did not check the checksum for lineageos recovery file.
    from https://wiki.lineageos.org/devices/jfltexx/install

    5. Sideload the LineageOS .zip package:
    • On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
    • On the host machine, sideload the package using: adb sideload filename.zip.

      Tip: If the process succeeds the output will stop at 47% and report adb: failed to read command: Success.
    The output on your display, Manual Mode...I've never seen that during sideloading. 🤔

    I used those installation instructions step by step. But had to use another computer after I'd installed lineage recovery as I was not able to get adb to work on the first computer.
    The menu on lineage recovery did not match the instructions 100% . I had an option directly from the main menu that said "Apply update from ADB" which I used.
     

    x2k13

    Senior Member
    I'm pretty sure I checked the checksum for OS zip files. I am trying to recheck now. The 05-13 version is fine. However the os version I flashed secondly, yesterday, was not 04-22, but 04-15 according to my local file. I am not able to find the checksum of that version anymore as it is not listed on the official download site. Weird I guess.

    I did not check the checksum for lineageos recovery file.


    I used those installation instructions step by step. But had to use another computer after I'd installed lineage recovery as I was not able to get adb to work on the first computer.
    The menu on lineage recovery did not match the instructions 100% . I had an option directly from the main menu that said "Apply update from ADB" which I used.
    Are you running Windows or Linux on the computer you use to connect to the phone via adb? Asking bacause on Linux using adb is really stable and easy to setup, it's in the package repos of all major distros.

    I used to do it on Windows but that drove me nuts, always something that didn't work as it should.
     
    • Like
    Reactions: pocketrule

    karlico

    Member
    Nov 1, 2017
    12
    3
    Are you running Windows or Linux on the computer you use to connect to the phone via adb? Asking bacause on Linux using adb is really stable and easy to setup, it's in the package repos of all major distros.

    I used to do it on Windows but that drove me nuts, always something that didn't work as it should.
    I'm using windows on the computer I first tried to sideload the OS. Was not able to get that to work out.

    Then I switched to a linux computer. And yeah a flawless ADB experience.
     

    rw_on_xda

    Senior Member
    Jun 24, 2013
    295
    158
    Berlin
    I'm pretty sure I checked the checksum for OS zip files. I am trying to recheck now. The 05-13 version is fine. However the os version I flashed secondly, yesterday, was not 04-22, but 04-15 according to my local file. I am not able to find the checksum of that version anymore as it is not listed on the official download site. Weird I guess.
    ...
    yup, checked that by just exchanging the numbers of another checksum link.

    why weird ?
    I guess nobody will download an month old file, even when in newer one's security patches went in.
    It would just waste storage (summing all devices over time with each ~0.5 GB in size per week)
     

    Top Liked Posts

    • 1
      After installing LOS 18.1 I gave up root (Magisk) for everyday use.
      I only use "adb root" and TWRP recovery for root modifications.
      Same for me. I used to root all my devices back in the CM 12 times, but with TWRP at hand I simply don't need to have root as a security flaw (which root practically is) in userspace anymore.
    • 3
      are you using TWRP? Then use old TWRP 3.2 and everything works newer TWRP often not working with encryption....

      Thank you, @droi1

      I used latest TWRP. The problem it seems to be the format of /data partition. I followed instructions of the OP where it says to format /data partition. This way the filesystem take all the partition space. It seems that you need an additional 16Kb at the end of partition to be able to encryp the partition. So I had to shrink filesystem by 16KiB.

      It's explained in a URL posted by @pocketrule at post #130 (https://forum.xda-developers.com/t/...xy-s4-all-qcom-variants.4255313/post-85028669). I followed that instructions and successfully encrypt the phone.

      Maybe older versions of TWRP let those last 16 KiB of /data partition unused.
      3
      That was not the question
      no ?!
      just don't overread what comes after my "AFAIK"
      okay, today is sunday ...:cool:
      2
      Are you running Windows or Linux on the computer you use to connect to the phone via adb? Asking bacause on Linux using adb is really stable and easy to setup, it's in the package repos of all major distros.

      I used to do it on Windows but that drove me nuts, always something that didn't work as it should.
      I'm using windows on the computer I first tried to sideload the OS. Was not able to get that to work out.

      Then I switched to a linux computer. And yeah a flawless ADB experience.
      2
      ...
      Aside from the new method of taking a screenshot, is there anything from Android 11 is notably different from Android 10?
      for LOS 18.1
      2
      Unfortunately, I did not have a good experience with the upgrade of my GT-I9505 from 17.1 to 18.1.

      Before I started, I made a full backup with twrp 3.5.0_9-0 (= latest official version). I selected all partitions in twrp for this purpose. After that I tried to upgrade from LOS 17.1 to 18.1 as some users here in the forum described it, i.e. I proceeded like one installs a Nightly::
      * Installed lineage-18.1-20210506-nightly-jfltexx-signed.zip
      * Installed MindTheGapps-11.0.0-arm-20210412_124103.zip
      * Wiped Cache/Dalvik
      * Booted system

      After booting, the lockscreen appeared after some time and after I entered my PIN and left the lockscreen the system just stopped. I finally rebooted the device by long pressing the power button but unfortunately without success - after the lockscreen it was all over again.

      At this point I wanted to restore the backup I had made just before. And here came the big negative surprise: After restoring everything from the backup, I cleared Cache/Dalvik and let the system boot normally ...and it started in revovery mode (?!). I then tried several times to boot the device from twrp normally, also with the variant that I first selected Power Off in twrp and then turned on the system with the power button. Then I restored the backup again and repeated everything. But all this did not help, the device remained stuck in recovery mode.

      Finally, I proceeded as described in the OP, i.e. following the instructions in the wiki, where among other things the data partition must be deleted (= the device must be newly set up, which is partially facilitated by Google backup data). And finally it worked: LOS 18.1 boots normally and so far I haven't found any bugs.

      *** At this point a big thank you to the developers for this ROM and for the long lasting support of this device! ***

      The reason why I made a rather long post here is my negative experience (= warning) that with twrp 3.5.0_9-0 the device cannot be fully restored when restoring a full backup and that you end up in a state where the system cannot boot normally anymore. I wonder if anyone else with a recent or the latest twrp version was able to restore a full backup and then had a working device again. If so, how exactly did you create the backup and what exactly did you restore?
    • 19
      lineage-os-logo.png

      Samsung Galaxy S4

      Code:
      - Your warranty is now void.
      - You have been warned.
      - Use at your own risk.

      Introduction:
      This is the Official Lineage OS 18.1 thread for all Galaxy S4 variants.

      Downloads:
      Please follow the install instructions in your device's Wiki page linked below exactly, and make sure your device's firmware matches the required firmware listed.
      • jactivelte (GT-I9295)
      • jflteatt (SGH-I337) - Please note you will need to be on bootloader I337UCUAMDB or I337UCUAMDL
      • jfltespr (SCH-R970/C/X, SPH-L720)
      • jfltevzw (SCH-I545) - Please note you need to be on bootloader I545VRUSMDK
      • jfltexx (GT-I9505/G, SGH-I337M, SGH-M919)
      • jfvelte (GT-I9515/L)

      If you don't follow these instructions, or use 3rd party add-ons (like Magisk) please don't expect support here.

      Known Bugs:
      • MHL doesn't work after LineageOS 14.1, and likely never will again, as Google dropped support for it platform-wide in AOSP.
      • Find any? Report them according to this guide.
      Notes:
      • The only supported GApps package at the moment is MindTheGapps, linked on our Wiki page about gapps.
      Kernel Source: https://github.com/LineageOS/android_kernel_samsung_jf
      6
      thanks for response and support
      This issue is now fixed. You will need to sideload the upcoming build by hand to get back on track though.

      Sorry for the inconveniences.
      5
      USB otg is unfortunately broken at the moment. But you can get access to your external storage by installing MiXplorer (which I recommend in any case) and "enable otg" in settings -> more settings
      Should be fixed in next build.
      5
      Good news, my GT-I9505 is updating automatically at this moment ("Update recovery" option disabled).
      Next step, activate the option to update the recovery and see if this works well.
      Thanks @npjohnson for your incredible work
      the recovery image updates the second you check the box.

      after you update OS, it updates the recovery on the next boot during boot animation.

      Have fun! Good to hear.
      4
      Update to lineage-18.1-20210408-nightly-jfltexx-signed.zip by TWRP (Install).
      At first glance, everything works fine.
    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