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

[ROM][OFFICIAL] Lineage OS 18.1 for Pixel 2 / 2 XL

Search This thread

LibreHome

New member
Jul 13, 2021
1
1
I had horrible experiences with the installation instructions, that nobody mentioned.

I am sharing it and hope it will be included in the first post.

1. Never try to perform the installation on a brand new Pixel 2 with Android 8 installed. It will NOT work! You need to first upgrade to Android 10 and then upgrade to Android 11! With stock android 8 and latest TWRP, the ADB driver is broken, you won't be bale to ADB sideload from TWRP.
2. fastboot boot twrp.img is enough. No need to actually install TWRP. Installing the TWRP image through fastboot ended up with boot loop for me.
3. After adb sideload of lineage image. You need to first reboot to bootloader, fastboot boot twrp.imgagain, then adb sideload gapps etc.

Hope my experiences help.
 
  • Like
Reactions: friedsonjm

justDave

Senior Member
Nov 17, 2006
172
52
I had horrible experiences with the installation instructions, that nobody mentioned.

I am sharing it and hope it will be included in the first post.

1. Never try to perform the installation on a brand new Pixel 2 with Android 8 installed. It will NOT work! You need to first upgrade to Android 10 and then upgrade to Android 11! With stock android 8 and latest TWRP, the ADB driver is broken, you won't be bale to ADB sideload from TWRP.
2. fastboot boot twrp.img is enough. No need to actually install TWRP. Installing the TWRP image through fastboot ended up with boot loop for me.
3. After adb sideload of lineage image. You need to first reboot to bootloader, fastboot boot twrp.imgagain, then adb sideload gapps etc.

Hope my experiences help.
  • I didn't try installing with Android 8 but I had no trouble installing over Android 10 - I didn't need to upgrade to Android 11 first.
  • I didn't need to reinstall twrp after the first sideload. I just rebooted to recovery and installed the rest of the packages.
 

neilth

Senior Member
Mar 26, 2015
65
20
Samsung Galaxy S21 Ultra
Since installing LOS overwrites the existing operating system, it doesn’t matter what version of Android is on the device prior to installing Lineage. You fast boot into TWRP and install LOS and any desired optional components, rebooting back to recovery (TWRP) after installing each component. It’s the TWRP environment that must be up to date to properly support the software installation environment, not a prior operating system.
 

73sydney

Senior Member
Jul 21, 2018
1,865
1,613
Sydney
Google Pixel 2 XL
  • I didn't try installing with Android 8 but I had no trouble installing over Android 10 - I didn't need to upgrade to Android 11 first.
  • I didn't need to reinstall twrp after the first sideload. I just rebooted to recovery and installed the rest of the packages.

Since installing LOS overwrites the existing operating system, it doesn’t matter what version of Android is on the device prior to installing Lineage. You fast boot into TWRP and install LOS and any desired optional components, rebooting back to recovery (TWRP) after installing each component. It’s the TWRP environment that must be up to date to properly support the software installation environment, not a prior operating system.

Its not a bad rule, and generally advised, to always upgrade to the latest official release for a device before flashing a custom ROM on that same Android level, as some ROM's may not include partition changes etc, or may not include updated radio or other vital components.
 

thomasck

Senior Member
May 26, 2008
276
28
All fine flashing and getting it running well. But SafeNet is failing all the time, any tips to fix? I need that in order to do online banking.
I've tried @GROOVYJOSHCLARK method but the attachments are not available any more so I can't use that.
Any idea is appreciated.
 
Last edited:

73sydney

Senior Member
Jul 21, 2018
1,865
1,613
Sydney
Google Pixel 2 XL
All fine flashing and getting it running well. But SafeNet is failing all the time, any tips to fix? I need that in order to do online banking.
I've tried @GROOVYJOSHCLARK method but the attachments are not available any more so I can't use that.
Any idea is appreciated.

Never use ancient (in terms of ROM development) advice

You havent said what you have tried, but heres the way i approach trying to pass SafetyNet on every ROM, its good to have a process, rather than take stabs in the dark, or try just one method on every ROM, and get frustrated when you fail:


You may also want to check that Google Play is certified (Google Play > Settings > About > last line):


p.s. Just be prepared that its possible to pass SafetyNet, but have banking apps fail...thats another conversation
 
Last edited:

thomasck

Senior Member
May 26, 2008
276
28
@73sydney Hi, sorry for my lack of information about what I have tried or not. The procedure you suggested is exactly what I tried.
I redone all of them, reinstalled Magisk, enables MagiskHide, added the banking app to it and it is working w/ safenetfix and MagiskHide Props Config. But ctsProfile fails.
Then I isntalled MagiskHide Props Config and Universal SafetyNet Fix, the baking app still works, but ctsProfile keeps failing.
I am not sure what to do.
 
Last edited:
Jun 1, 2017
17
1
Google Pixel 4
Hi guys,
Could someone that has switched from original Android 11 Google to LOS 18 in Pixel 2 XL tell me which are main differences?
I imagine that there aren't Pixel features in LOS, am I right?
How battery works?
I'm interested in install it on my Pixel 2 XL only for having last security patch updates.
Thanks in advance!
 

zimral.xda

Senior Member
Apr 5, 2021
88
39
Samsung Galaxy S5
Google Pixel 2
Hi guys,
Could someone that has switched from original Android 11 Google to LOS 18 in Pixel 2 XL tell me which are main differences?
I imagine that there aren't Pixel features in LOS, am I right?
How battery works?
I'm interested in install it on my Pixel 2 XL only for having last security patch updates.
Thanks in advance!
Hello, i switched earlier this year when 18.1 goes into "official" release, for exactly the same reason. I am not really familiar with dedicated "Pixel features" but i didnt like the google search bar at the bottom and the unflexible layout settings. So there was no question for me to go to LOS , i am using LOS on a Galaxy "klte" for several years now and i buyed the used Pixel2 to play with LOS on Pixels :) . I have the impression that the battery lifetime is ~ 10-15% better than before but i think the reason for that is the fact that i am using the pure LOS Rom only! That means: NO GOOGLE (opengapps/mindthegapps/nikapps) or whatever the name is. And no "root" stuff/magisk etc. This might sound weird using a google phone without google but this is possible and all of my 40-50 apps are working fine and i am using the "myLocalAccount" app to manage my contacts and i dont want google to read the names &numbers of my family/friends/buddies here. As a replacement for Google Maps i am using "MapsMe" based on open streetmaps which looks better (for me) and has no ads and does not track me. Hope this will help you a little bit..take care..:)
 
Jun 1, 2017
17
1
Google Pixel 4
Hello, i switched earlier this year when 18.1 goes into "official" release, for exactly the same reason. I am not really familiar with dedicated "Pixel features" but i didnt like the google search bar at the bottom and the unflexible layout settings. So there was no question for me to go to LOS , i am using LOS on a Galaxy "klte" for several years now and i buyed the used Pixel2 to play with LOS on Pixels :) . I have the impression that the battery lifetime is ~ 10-15% better than before but i think the reason for that is the fact that i am using the pure LOS Rom only! That means: NO GOOGLE (opengapps/mindthegapps/nikapps) or whatever the name is. And no "root" stuff/magisk etc. This might sound weird using a google phone without google but this is possible and all of my 40-50 apps are working fine and i am using the "myLocalAccount" app to manage my contacts and i dont want google to read the names &numbers of my family/friends/buddies here. As a replacement for Google Maps i am using "MapsMe" based on open streetmaps which looks better (for me) and has no ads and does not track me. Hope this will help you a little bit..take care..:)
Thank you so much! You're been really exhaustive😄
I was worried about performance and battery so your feedback is helpful.
In my case I love Pixel features and I think I'll use GApps when I'll flash it on my device.
Some kind of dedicated Pixel features are for example adaptive battery, shh feature (flip phone on back to enter in not disturb mode), Now Playing feature on always on display mode.
That reminds me another question, that could be stupid but is it still the always on display mode on phone locked, right?😅
 

zimral.xda

Senior Member
Apr 5, 2021
88
39
Samsung Galaxy S5
Google Pixel 2
OK, thx for the explanation of some Pixel Modes. As i do not use the "Always On" feature, maybe someone else can answer your question. Regarding the "Now playing" my wife uses an app for that. I dont want to have my phone listening what is around me on a permanent basis....
 

jdmst77

Senior Member
Feb 19, 2012
248
39
Its not a bad rule, and generally advised, to always upgrade to the latest official release for a device before flashing a custom ROM on that same Android level, as some ROM's may not include partition changes etc, or may not include updated radio or other vital components.
totally agree with you here and it's what did. just got the device (new old stock) and immediately unlocked the bootloader (on 8.0) and used the flash-all.bat downloaded from Google to get it to the latest 11

I never installed TWRP, as many guides tell you to, only booted into the image since I wanted to try to keep the device as close to being certified as possible. unfortunately, play store says it's not certified and I tried to install Magisk systemlessly but no change. it still fails ctsProfile. I'll check out the resources in the post below and see how it goes

Never use ancient (in terms of ROM development) advice

You havent said what you have tried, but heres the way i approach trying to pass SafetyNet on every ROM, its good to have a process, rather than take stabs in the dark, or try just one method on every ROM, and get frustrated when you fail:


You may also want to check that Google Play is certified (Google Play > Settings > About > last line):


p.s. Just be prepared that its possible to pass SafetyNet, but have banking apps fail...thats another conversation
 

Geddd

Senior Member
Nov 5, 2013
238
20
Hi Guys, can someone help me to proceed with flashing the rom for the first time? I followed the detailed tutorial posted on the wiki since as I mentioned, this is the first time I tried to install a custom rom on my 2 XL. I have successfully went on up to the twrp recovery thru adb. Wipe, format data, typed yes then proceed, and it was successful, though there were some invalid arguments like failed to mount system root and vendor. Then proceeded to adb sideload the rom. And unfortunately, nothing changes on the powershell nor the mentioned percentage of the flashing.

1627126510058.png
 

Geddd

Senior Member
Nov 5, 2013
238
20
Hi Guys, can someone help me to proceed with flashing the rom for the first time? I followed the detailed tutorial posted on the wiki since as I mentioned, this is the first time I tried to install a custom rom on my 2 XL. I have successfully went on up to the twrp recovery thru adb. Wipe, format data, typed yes then proceed, and it was successful, though there were some invalid arguments like failed to mount system root and vendor. Then proceeded to adb sideload the rom. And unfortunately, nothing changes on the powershell nor the mentioned percentage of the flashing.

View attachment 5369553
Luckily, I was able to proceed by mounting mtp in twrp and transferred the zip file. Now my question is the boot.img that mentioned in magisk installation guide. Does the recovery.img file from the download page of the rom is the same with the boot.img needed to install the magisk?
 

73sydney

Senior Member
Jul 21, 2018
1,865
1,613
Sydney
Google Pixel 2 XL
Luckily, I was able to proceed by mounting mtp in twrp and transferred the zip file. Now my question is the boot.img that mentioned in magisk installation guide. Does the recovery.img file from the download page of the rom is the same with the boot.img needed to install the magisk?

You can extract the boot image from the payload.bin file inside the ROM zip using this tool (the easy way...if you have windows 64):

https://androidfilehost.com/?fid=818070582850510260

1) Download and extract the payload dumper zip file
2) Extract the payload.bin file from ROM and put into payload_input folder of payload dumper
3) Run payload_dumper.exe
4) Check payload_output folder, when you see more than boot.img appear, you can happily terminate the payload_dumper.exe if you like
5) Transfer boot.img to phone and follow magisk install guide

If youre using other than windows, shout, theres a payload dumper for every OS
 
  • Like
Reactions: Geddd

Geddd

Senior Member
Nov 5, 2013
238
20
You can extract the boot image from the payload.bin file inside the ROM zip using this tool (the easy way...if you have windows 64):

https://androidfilehost.com/?fid=818070582850510260

1) Download and extract the payload dumper zip file
2) Extract the payload.bin file from ROM and put into payload_input folder of payload dumper
3) Run payload_dumper.exe
4) Check payload_output folder, when you see more than boot.img appear, you can happily terminate the payload_dumper.exe if you like
5) Transfer boot.img to phone and follow magisk install guide

If youre using other than windows, shout, theres a payload dumper for every OS
I just made it to install Magisk. Thank you so much!
 
  • Like
Reactions: 73sydney

Lycon70492

Senior Member
Sep 19, 2016
74
8
Hey all. I'm doing some research on the installation and updating process for the Pixel 2 XL to see if there are similarities to how I installed my Pixel XL (Marlin) running lineageos 17.1. I do not have a Pixel 2 XL and I am considering getting one at a decent price and condition.

This is how I installed lineageos 17.1 on the Pixel XL with official twrp recovery, after I unlocked the phone's bootloader:

1) Boot into twrp.img using adb command "fastboot boot "twrp recovery image"
2) Wipe, swipe to factory reset (For some reason I didn't need to format data (type yes to format) on Android 10)
3) flashed rom
4) flash gapps
5) flash twrp zip to keep twrp recovery
6) boot back to system to setup and later installed magisk

Here's how I update my Pixel XL using official lineageos 17.1 and official twrp recovery:

1) From twrp, flash updated lineageos zip
2) Flash twrp zip to retain twrp as recovery
3) Reboot back to twrp recovery
4) install gapps and magisk
5) boot back to system


Is there anything from the method of installation and updating I've listed that is comparable or different when it comes to installing and updating lineageos 18.1 for the Pixel 2 XL?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Just got a Pixel 2 XL, how stable is this rom as a daily driver?
    It has been very stable for me. I have had no issues at all.
    1
    Just got a Pixel 2 XL, how stable is this rom as a daily driver?
    Been using it since June and it's been rock solid for me.
    1
    Been using it since June and it's been rock solid for me.
    Yeah, rock Solid is a very good description
    1
    Are you guys updating nightlies all the time? Or do you just stay with one and done?
    Back in the CM days there were tools to update the nightlies with only the changed files. Anything like that nowadays?
    Glad to hear this rom is a good choice. Hope to get a lot of years out of it for my mom.
    The security patches are only once a month, so I update only once a month (mid-month) to get the security patches. I'm not aware of any way to get only the changed files. It is probably not possible, because of the dual slot update. The update goes to the current unused slot, then the slot is switched to apply the update.
    1
    Thanks! Really appreciate the answer!
    How is the update performed? same as flashing the rom? dirty flash ok for the monthly? (I should hope so) Is there any magic button in settings that does it all for me? I haven't cruised through all of the settings yet.
    Yes, there is a magic button. Settings, System, Advanced, Updater. The update takes about an hour to install after you have downloaded it. You can still use the phone while it is installing. If you have Magisk installed, you need to install Magisk with "adb sideload magisk.zip" . That will automatically patch the updated boot.img.
  • 23
    yUIn6TF.png

    LineageOS is a free, community built, aftermarket firmware distribution of Android 11.0, 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. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review. You can also view the changelog for a full list of changes & features.

    What's working

    • Active Edge
    • RIL (Calls, SMS, Data)
    • Bluetooth
    • Wi-Fi
    • Camera
    • Video Recording
    • Video Playback
    • Audio ( Record and Playback )
    • Sensors
    • Flash
    • Led

    What's not working

    • Feel free to report any issues you may encounter with relevant logs

    Installation

    1. Download the latest supported Lineage OS build, TWRP image and optionally the TWRP installer zip.
    2. Reboot to bootloader
    3. Wipe userdata for initial install (fastboot format userdata)
    4. Fastboot into TWRP recovery (fastboot boot twrp.img)
    5. Flash the latest build of Lineage OS
    6. Reboot to bootloader and fastboot TWRP again
    7. (Optional) Flash gapps of choice (MindTheGapps are recommended)
    8. Reboot to system and don't install the TWRP app
    9. (Optional) Flash custom kernel / TWRP / Magisk

    A more detailed installation guide can be found on the wiki.

    Updates

    Simply repeat steps 4 - 7. You shouldn't need to flash factory images as all partitions (firmware, vendor etc.) are updated with the lineage zip.

    Downloads


    Credits

    • razorloves
    • javelinanddart
    • RaymanFX
    • Sultanxda
    • LineageOS Team

    Source


    Feel free to join my Pixel 2 telegram group here.
    12
    Lineage OS 18.1 (5/3/21)
    • March ASB
    • March kernel security patches
    • Fixed rare app not installed toast
    • Fixed crashes when installing without gapps
    • Revamped Lineage OS recorder app
    • Added Trebuchet icon pack support
    11
    Official builds are now available for downloading. The migration process from my unofficial builds is as follows:

    1. Download the latest version of Lineage OS and the lineage recovery image for your device from here.
    2. Reboot to bootloader
    3. Flash the recovery image to your boot partition (fastboot flash --slot all boot /path/to/recovery.img)
    4. Reboot into recovery
    5. Flash the official build of Lineage OS (adb sideload lineage.zip)
    6. If you have gapps installed, reboot to recovery again and ensure you flash gapps again before booting into Lineage OS
    7. Reboot your phone and enjoy!
    Or if you use TWRP you can just follow the normal updating steps and skip flashing the new recovery image.

    If you are coming from a previous version of Lineage OS, please refer to the wiki.
    10
    I've uploaded a slightly updated build to amend the missing live captions button when adjusting volume. Apologies for the inconvenience.
    10
    Lineage OS 18.1 (8/1/21)

    • January ASB
    • January / December kernel security patches
    • Bug fixes and improvements