[{"data":1,"prerenderedAt":549},["ShallowReactive",2],{"blog-\u002Fen\u002Fblog\u002Finstaller-lineageos-sur-oneplus":3,"blog-\u002Fen\u002Fblog\u002Finstaller-lineageos-sur-oneplus-surround":490,"blog-\u002Fen\u002Fblog\u002Finstaller-lineageos-sur-oneplus-certifications":548},{"id":4,"title":5,"body":6,"categories":477,"cover":479,"cover_contain":212,"credly_badge_id":480,"date":481,"description":482,"extension":483,"meta":484,"navigation":212,"path":485,"related_certifications":480,"seo":486,"slug":487,"stem":488,"__hash__":489},"blog\u002Fen\u002Fblog\u002Finstaller-lineageos-sur-oneplus.md","Installing LineageOS 14.1 on the OnePlus 5",{"type":7,"value":8,"toc":464},"minimark",[9,14,18,22,36,41,63,67,74,108,118,121,124,153,156,164,167,232,235,243,249,252,271,274,277,303,306,343,346,355,431,434,437,448,457,460],[10,11,13],"h2",{"id":12},"real-world-use-case","Real-world use case",[15,16,17],"p",{},"You want to bring your OnePlus 5 back up to date: here's how to install LineageOS 14.1.",[10,19,21],{"id":20},"lineageos","LineageOS",[15,23,24,27,28,31,32,35],{},[25,26,21],"strong",{}," is the successor to the ",[25,29,30],{},"free, alternative CyanogenMod system"," running on ",[25,33,34],{},"Android",". It's popular because it's an open-source replacement operating system for smartphones and tablets, based on Android. I mainly use it on my Android devices for privacy, stability, and security reasons. This article will cover every aspect of the installation on a freshly unboxed OnePlus 5 device.",[37,38,40],"h3",{"id":39},"table-of-contents","Table of contents",[42,43,44,48,51,54,57,60],"ol",{},[45,46,47],"li",{},"Installing the Android SDK tools on Debian 9",[45,49,50],{},"Installing the Android SDK tools on Windows",[45,52,53],{},"Unlocking the Bootloader and installing the recovery",[45,55,56],{},"Installing the LineageOS 14.1-20171106 image",[45,58,59],{},"Message when starting the phone? Explanation",[45,61,62],{},"Conclusion on installing LineageOS 14.1",[37,64,66],{"id":65},"prerequisites-and-required-tools","Prerequisites and required tools",[15,68,69,70,73],{},"Before you start, know that your phone will lose all of its data. I recommend backing it up.",[71,72],"br",{},"\nThen let's start by downloading the following prerequisites:",[75,76,77,87,96],"ul",{},[45,78,79,80],{},"The TWRP recovery at the following link: ",[81,82,86],"a",{"href":83,"rel":84},"https:\u002F\u002Feu.dl.twrp.me\u002Fcheeseburger",[85],"nofollow","TWRP OnePlus 5",[45,88,89,90,95],{},"The ",[81,91,94],{"href":92,"rel":93},"https:\u002F\u002Fdownload.lineageos.org\u002Fcheeseburger",[85],"LineageOS 14.1"," custom ROM",[45,97,89,98,101,102,107],{},[25,99,100],{},"Google Apps"," ",[81,103,106],{"href":104,"rel":105},"https:\u002F\u002Fgithub-production-release-asset-2e65be.s3.amazonaws.com\u002F35368384\u002F01ab98ae-c530-11e7-8b21-e3f61f0415e0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20171109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20171109T123207Z&X-Amz-Expires=300&X-Amz-Signature=c8a76e6abddd4d272c5c041347be153a23f6b867b9f59596a8f7a8cec4ff5df0&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dopen_gapps-arm64-7.1-pico-20171109.zip&response-content-type=application%2Foctet-stream",[85],"Pico example",".",[15,109,110,111,113,114,107],{},"If you run into a problem during the procedure, you can absolutely return to the OnePlus 5's original Android version.",[71,112],{},"\nFor more information: ",[81,115,116],{"href":116,"rel":117},"http:\u002F\u002Fdownloads.oneplus.net\u002Foneplus-5\u002Foneplus_5_oxygenos_4.5.3\u002F",[85],[10,119,47],{"id":120},"installing-the-android-sdk-tools-on-debian-9",[15,122,123],{},"To be able to communicate with the Android smartphone, we need the Android development tools. Let's install the following packages with the apt package manager:",[125,126,131],"pre",{"className":127,"code":128,"language":129,"meta":130,"style":130},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","apt-get install android-tools-adb android-tools-fastboot\n","bash","",[132,133,134],"code",{"__ignoreMap":130},[135,136,139,143,147,150],"span",{"class":137,"line":138},"line",1,[135,140,142],{"class":141},"sBMFI","apt-get",[135,144,146],{"class":145},"sfazB"," install",[135,148,149],{"class":145}," android-tools-adb",[135,151,152],{"class":145}," android-tools-fastboot\n",[15,154,155],{},"Once the installation is complete, let's check that our device is detected over USB:",[125,157,162],{"className":158,"code":160,"language":161},[159],"language-text","lsusb\nBus 001 Device 007: ID 18d1:4ee1 Google Inc. Nexus 4 \u002F 10\n","text",[132,163,160],{"__ignoreMap":130},[15,165,166],{},"We can now use the ADB and FASTBOOT commands:",[125,168,170],{"className":127,"code":169,"language":129,"meta":130,"style":130},"adb version\nAndroid Debug Bridge version 1.0.36\nRevision 1:7.0.0+r33-1\n\nfastboot --version\nfastboot version 1:7.0.0+r33-1\n",[132,171,172,180,198,207,214,223],{"__ignoreMap":130},[135,173,174,177],{"class":137,"line":138},[135,175,176],{"class":141},"adb",[135,178,179],{"class":145}," version\n",[135,181,183,185,188,191,194],{"class":137,"line":182},2,[135,184,34],{"class":141},[135,186,187],{"class":145}," Debug",[135,189,190],{"class":145}," Bridge",[135,192,193],{"class":145}," version",[135,195,197],{"class":196},"sbssI"," 1.0.36\n",[135,199,201,204],{"class":137,"line":200},3,[135,202,203],{"class":141},"Revision",[135,205,206],{"class":145}," 1:7.0.0+r33-1\n",[135,208,210],{"class":137,"line":209},4,[135,211,213],{"emptyLinePlaceholder":212},true,"\n",[135,215,217,220],{"class":137,"line":216},5,[135,218,219],{"class":141},"fastboot",[135,221,222],{"class":145}," --version\n",[135,224,226,228,230],{"class":137,"line":225},6,[135,227,219],{"class":141},[135,229,193],{"class":145},[135,231,206],{"class":145},[10,233,50],{"id":234},"installing-the-android-sdk-tools-on-windows",[15,236,237,238,242],{},"On Windows, simply get the files from the following link: ",[81,239,240],{"href":240,"rel":241},"https:\u002F\u002Fdl.google.com\u002Fandroid\u002Frepository\u002Fplatform-tools-latest-windows.zip",[85],", and once downloaded, unzip them:",[15,244,245],{},[246,247],"img",{"alt":130,"src":248},"\u002Fimages\u002Fblog\u002Finstaller-lineageos-sur-oneplus\u002F9df890cadf.png",[15,250,251],{},"We can use adb and fastboot like this via the CLI:",[125,253,255],{"className":127,"code":254,"language":129,"meta":130,"style":130},".adb.exe version\n.fastboot.exe --version\n",[132,256,257,264],{"__ignoreMap":130},[135,258,259,262],{"class":137,"line":138},[135,260,261],{"class":141},".adb.exe",[135,263,179],{"class":145},[135,265,266,269],{"class":137,"line":182},[135,267,268],{"class":141},".fastboot.exe",[135,270,222],{"class":145},[10,272,53],{"id":273},"unlocking-the-bootloader-and-installing-the-recovery",[15,275,276],{},"Unlocking the Bootloader is a very simple step, but you first need to use the developer options:",[75,278,279,291,297],{},[45,280,281,282,286,287,290],{},"Go to: ",[283,284,285],"em",{},"Settings → About phone",", then tap ",[25,288,289],{},"Build number"," 5 times.",[45,292,293,294,107],{},"Then simply go back to find: ",[25,295,296],{}," Developer options",[45,298,299,300,107],{},"In the options, enable: ",[25,301,302],{},"OEM unlocking",[15,304,305],{},"We're ready to unlock the bootloader and install a recovery like TWRP from Linux:",[42,307,308,311,314,326,332,337,340],{},[45,309,310],{},"Unplug the USB cable connected to the smartphone and hold down: Power + volume up (UP).",[45,312,313],{},"Once FastBoot mode appears, connect your smartphone to the computer again.",[45,315,316,317,320,321,323],{},"Use the following command: ",[25,318,319],{},"fastboot devices",", your smartphone should now be visible,",[71,322],{},[283,324,325],{},"XXXXXXXX  fastboot",[45,327,316,328,331],{},[25,329,330],{},"fastboot erase recovery",", and the smartphone will remove the default recovery.",[45,333,316,334],{},[25,335,336],{},"fastboot flash recovery \"\u002Fhome\u002Fjeremie\u002Fdocuments\u002Ftwrp.img\"",[45,338,339],{},"The recovery installation is now successful.",[45,341,342],{},"Reboot the smartphone.",[10,344,56],{"id":345},"installing-the-lineageos-141-20171106-image",[15,347,348,349,351,352,354],{},"The smartphone boots up with an unlocked bootloader and an up-to-date TWRP recovery.",[71,350],{},"\nNow, the next step is to reconfigure OxygenOS as you would on first use.",[71,353],{},"\nOnce that's done, here are the steps to install the LineageOS image:",[42,356,357,367,378,388,395,398,406,409,416,428],{},[45,358,359,360,363,364,107],{},"We'll re-enable the developer options as well as ",[25,361,362],{},"USB debugging"," or ",[25,365,366],{},"Enable USB Debugging Mode",[45,368,369,370,373,374,377],{},"We need to connect the smartphone to the PC and copy the ",[25,371,372],{},"LineageOS image"," and the ",[25,375,376],{},"gapps"," onto the smartphone.",[45,379,380,381,384,385,107],{},"We'll hold down: ",[25,382,383],{},"Power + volume down (DOWN)"," to ",[25,386,387],{},"boot into TWRP recovery",[45,389,390,391,394],{},"We then use the ",[25,392,393],{},"Install"," option and tap our LineageOS image file to start the installation.",[45,396,397],{},"If you get error 7 during installation, make sure to clear the cache and start the installation again.",[45,399,400,401,403],{},"We should get the following result:",[71,402],{},[246,404],{"alt":130,"src":405},"\u002Fimages\u002Fblog\u002Finstaller-lineageos-sur-oneplus\u002Fd1ea74ae4a.png",[45,407,408],{},"We'll reboot the system to confirm LineageOS is properly installed on our OnePlus 5 (this may take a while, about 3 to 5 minutes for the first boot).",[45,410,411,412,415],{},"Once LineageOS's setup is complete, let's go back into recovery mode (",[25,413,414],{},"Power + volume down (DOWN",").",[45,417,418,419,422,423,425],{},"We'll ",[25,420,421],{},"install the Gapps"," in Pico version, which only contains the Google Play Store:",[71,424],{},[246,426],{"alt":130,"src":427},"\u002Fimages\u002Fblog\u002Finstaller-lineageos-sur-oneplus\u002Facda916855.png",[45,429,430],{},"We reboot again, and the Google Play Store is now available on our smartphone.",[10,432,59],{"id":433},"message-when-starting-the-phone-explanation",[15,435,436],{},"Every time the OnePlus 5 boots up, a message consistently appears letting us know we've unlocked the bootloader, which prevents it from verifying the device's security. It also slows down the smartphone's boot time, and it seems to be the same for other models like the Nexus 6p and Google's Pixel devices. Apparently, this may not be something that can be changed (to be confirmed).",[15,438,439,444,445],{},[283,440,441],{},[25,442,443],{},"Warning",": ",[283,446,447],{},"Also make sure to never re-lock your bootloader while a custom ROM is installed, otherwise your smartphone will become unusable.",[15,449,450,451,456],{},"I speak from experience, since I tried to lock it. Nothing too serious happened, but it's annoying to have to reinstall the original bootloader, including the ",[81,452,455],{"href":453,"rel":454},"http:\u002F\u002Fdownloads.oneplus.net\u002Foneplus-5\u002Foneplus_5_oxygenos_4.5.14\u002F",[85],"oxygenOS"," spyware.",[10,458,62],{"id":459},"conclusion-on-installing-lineageos-141",[461,462,463],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":130,"searchDepth":182,"depth":182,"links":465},[466,467,471,472,473,474,475,476],{"id":12,"depth":182,"text":13},{"id":20,"depth":182,"text":21,"children":468},[469,470],{"id":39,"depth":200,"text":40},{"id":65,"depth":200,"text":66},{"id":120,"depth":182,"text":47},{"id":234,"depth":182,"text":50},{"id":273,"depth":182,"text":53},{"id":345,"depth":182,"text":56},{"id":433,"depth":182,"text":59},{"id":459,"depth":182,"text":62},[478],"Google","\u002Fimages\u002Fblog\u002Finstaller-lineageos-sur-oneplus\u002Fe7495dc103.png",null,"2017-11-25","Get started installing LineageOS 14.1 on the OnePlus 5. Unlock your recovery and install TWRP in just a few steps.","md",{},"\u002Fen\u002Fblog\u002Finstaller-lineageos-sur-oneplus",{"title":5,"description":482},"installer-lineageos-sur-oneplus","en\u002Fblog\u002Finstaller-lineageos-sur-oneplus","rJHfCMM70-kTeaxB9qhg8wQMkHUVKy9SAgpe0azMqwM",[491,497,503,510,517,526,533,541],{"title":492,"path":493,"stem":494,"date":495,"cover":496,"categories":480,"children":-1},"Choosing Computer Components","\u002Fen\u002Fblog\u002Fle-choix-des-composants-ordinateur","en\u002Fblog\u002Fle-choix-des-composants-ordinateur","2017-12-30","\u002Fimages\u002Fblog\u002Fle-choix-des-composants-ordinateur\u002F2d28a826a8.jpg",{"title":498,"path":499,"stem":500,"date":501,"cover":502,"categories":480,"children":-1},"Understanding Bitcoin and Blockchain","\u002Fen\u002Fblog\u002Fcertificat-comprendre-bitcoin-blockchain","en\u002Fblog\u002Fcertificat-comprendre-bitcoin-blockchain","2017-12-29","\u002Fimages\u002Fblog\u002Fcertificat-comprendre-bitcoin-blockchain\u002F8572419165.jpg",{"title":504,"path":505,"stem":506,"date":501,"cover":507,"categories":508,"children":-1},"Manage Your Digital Identity","\u002Fen\u002Fblog\u002Fcertificat-gerer-son-identite-numerique","en\u002Fblog\u002Fcertificat-gerer-son-identite-numerique","\u002Fimages\u002Fblog\u002Fcertificat-gerer-son-identite-numerique\u002Ff5c2120e5b.png",[509],"Sécurité",{"title":511,"path":512,"stem":513,"date":514,"cover":515,"categories":516,"children":-1},"SecNumacadémie by ANSSI","\u002Fen\u002Fblog\u002Fcertificat-secnum-academie-par-anssi","en\u002Fblog\u002Fcertificat-secnum-academie-par-anssi","2017-12-01","\u002Fimages\u002Fblog\u002Fcertificat-secnum-academie-par-anssi\u002Ffb98b6526c.png",[509],{"title":518,"path":519,"stem":520,"date":521,"cover":522,"categories":523,"children":-1},"LPI Linux Essentials – Exam 010-150","\u002Fen\u002Fblog\u002Fcertificat-lpi-linux-essentials-exam-010-150","en\u002Fblog\u002Fcertificat-lpi-linux-essentials-exam-010-150","2017-11-24","\u002Fimages\u002Fblog\u002Fcertificat-lpi-linux-essentials-exam-010-150\u002F4497f02702.jpg",[524,525],"Certifications","Linux",{"title":527,"path":528,"stem":529,"date":530,"cover":531,"categories":532,"children":-1},"ESET Remote Administrator: Installation on Ubuntu 16.04 LTS","\u002Fen\u002Fblog\u002Feset-remote-administrator-installation-sous-ubuntu-lts","en\u002Fblog\u002Feset-remote-administrator-installation-sous-ubuntu-lts","2017-11-01","\u002Fimages\u002Fblog\u002Feset-remote-administrator-installation-sous-ubuntu-lts\u002F15dab17188.jpg",[525],{"title":534,"path":535,"stem":536,"date":537,"cover":538,"categories":539,"children":-1},"Veeam Backup and Replication on Windows Server 2016 Core","\u002Fen\u002Fblog\u002Fveeam-backup-replication-sous-windows-server-2016-core","en\u002Fblog\u002Fveeam-backup-replication-sous-windows-server-2016-core","2017-10-29","\u002Fimages\u002Fblog\u002Fveeam-backup-replication-sous-windows-server-2016-core\u002Fb6d80a8d4b.jpg",[540],"Microsoft",{"title":542,"path":543,"stem":544,"date":545,"cover":546,"categories":547,"children":-1},"Integrating Windows Server 2016 Core under KVM\u002FQEMU","\u002Fen\u002Fblog\u002Fintegration-windows-server-2016-core-sous-kvm-qemu","en\u002Fblog\u002Fintegration-windows-server-2016-core-sous-kvm-qemu","2017-10-17","\u002Fimages\u002Fblog\u002Fintegration-windows-server-2016-core-sous-kvm-qemu\u002F9b895102f9.jpg",[525],[],1786644885683]