The guide is now considered to be fully-functional and ready for use by anyone! Do not be afraid of looking up other guides if you ever feel that this guide lacks any details, however. 🙂 The risk of bricking is somewhat low: Even if you do end up with no Android version on your phone, you can still use the recovery environment(s) and the phone’s bootloader to remedy the issue in some or another way. If you do somehow brick it, however, I am not responsible for anything bad that do/has/will occur (nor for any of the faults that the phone manufacturers have committed).
There are twenty fantasillion guides out there on how to install custom updates on your Android phone. You’ve heard talk everywhere about them. Cyanogenmod, Ubuntu Touch, LineageOS, SailfishOS, or just a promise to install a new Android version that your phone manufacturer (or in rare cases your cellular service) couldn’t be arsed to send out to you. And then you look up guides on how to do it, and you quickly realize that the guides omit vital details, fail to cover entire chunks of the process, and are written by such stuck-up nerds that they assume that you already know all this stuff.
Therefore I will write a summary on how to do it, the right way. This has been tested with LineageOS 14.1 (a vendor-edited version of Android 7.1) on my own Lenovo Vibe K5 (A6020a40 system structure), on the 4th of June 2017, as well as Cyanogenmod 11 on an HTC Wildfire S. I see no reason why this wouldn’t work with other phones too, although some differences may occur for users of Samsung phones and other smug brands, as they’re notorious for changing vital Android system functions to their own liking. Let’s delve into this, shall we?
Note: The process will delete your local app settings, meaning that your phone’s apps will need to be set up all over again (If the app uses Smart Lock or Google Play Game cloudsaving functions, you merely need to login to them again and/or play through the tutorial level). If you’ve activated security backups in your phone settings, you’ll get to keep the background image, and the apps that you have on your phone now will be instantly re-installed after the upgrade (once you’ve connected to a Wi-Fi network).
Chapter 1: Finding ALL the prerequisites
- Find the OS you want to install, designed for the unit you’re running. In the case of LineageOS, which is the most prominent way to install newer Android versions on your phone than what your manufacturer wants you to have, and its version 14.1 (almost entirely based on Android 7.1), look through their list of phones that they support, and download the version that is for the phone that you actually have. Often there’s some differences in each phone type’s inner structure, meaning that you’d want a version that actually works on your phone.
• If you can’t find your phone on the list, see if you can find anything on their list for version 13. If you can’t find anything there either, Google around a bit and see if you can find any old Cyanogenmod versions.
• Many Android 1-3 phones had so little power in them, that no functional Cyanogenmod versions were ever made for them. Consult XDA Developers’ forum threads about tools for your phone, and to see if the Cyanogenmod version (if any) for the phone is considered to be properly functional.
- Once you’ve found the OS that you want to install on your phone, it’s time to download the other prerequisites too. In particular you want all the following things:
• “One Click ADB and Fastboot” (The guide for it is here), which integrates Android Debug Bridge’s command line tools into your Windows PC OS’ command line and into PowerShell. This is crucial to install, in order to change your phone’s recovery environment into something that actually wants to install custom updates, which a phone’s default environment generally does not.
• A custom recovery environment of your choice. Team Win Recovery Project is a good and well-proven option among them. Team Win builds are also bound to their phone types, so take the same precautions as you would have done during Step 1!
• Download the OpenGapps package (in singular tense) of your choice, in order to ensure that you can actually access the Google Play store when the phone has had its first-run setup. In addition you’ll normally also want to install “My Device” from Google Play in advance and look through its CPU details, if you do not explicitly know if your phone(s) uses an ARM or ARM64 processor (Cellphone Androids never ever use x86). This is to help you pick the right OpenGapps package version. If you’re hoping to install Ubuntu Touch, however, then you actually won’t need (nor support) OpenGapps.
• A microSD card in FAT32. A 2GB card should be perfectly sufficient, if you don’t already have a microSD inside your phone. It does not need to be reformatted or emptied either, as long as you can comfortably fit the ZIP files of the OS and Gapps packages onto it.
• Place the ZIP files of both the OS and the OpenGapps package onto your SD card, before doing anything beyond this point. Do NOT pack them out. They’re supposed to remain as ZIP files on the card during the installation process. Use either A) your phone’s MTP connection ability, or B) insert the SD card into your PC’s card reader, to place the files on the card. If you used #B, you should of course also reinsert the card into your phone afterwards.
Chapter 2: Setting up the installation environment
- You’ve got all of the above stuff ready for use, right? Right? Okay, let’s do it! First thing you want to do is to turn off your phone. Don’t connect it to the PC just yet. Now, find a way to boot into its “fastboot”, usually by means of a button combination on your phone during startup. “Fastboot” is a part of an Android phone’s bootloader, which places it into a static state in which it receives commands from a PC connection.
• On many phones you first need to boot into the phone’s bootloader and/or default recovery environment (depending on the phone), also by means of a button combination, and from that menu then pick the option to “boot into fastboot” or something very close to that.
• Troubleshooting for Step 1: I swear on my guts that my phone’s bootloader/fastboot shortcut buttons doesn’t work, as well as how the reserve solution of using the command adb reboot fastboot only causes a normal reboot — In that case, there is a major chance that your phone’s bootloader doesn’t work. I’m unsure how that could come to be, except that it happened to me when testing with my Huawei Ascend Y100 (a.k.a. Huawei U8185). In that case you’ve pretty much hit the wall, and you’re sadly unable to upgrade your phone as far as I can tell.
- Only now should you connect the USB cable between the phone and your PC. You wouldn’t want to do that during Step 3, since then the phone would auto-start and make you unable to press the required button combination fast enough.
- Find out where you downloaded the Team Win Recovery Project .img file, and paste it into the C:/ADB folder on your PC. If you don’t do that, Android Debug Bridge can’t detect the file’s existence, wasting valuable time in Step 6.
- Open up Windows PowerShell (not the 32-bit version) as an administrator. Write the following commands in order, without their italics or dashes. Feel free to copy and paste them into PowerShell if you’re scared of misspelling them (but make sure to replace the square-bracket entries below with the filename in question). 🙂
• cd c:/adb — This asks PowerShell to specifically focus on the Android Debug Bridge folder’s commands, which it quickly does. c:/adb refers to the filepath that “One Click ADB and Fastboot” auto-installs the Debug Bridge tools to. If it worked, the command line should now say C:/adb> instead of C:/WINDOWS/system32>.
• fastboot devices — A simple way to double-check that ADB is actually able to detect your phone. If you see a hash of ~12 digits quickly pop up, it went well. If you see “Waiting for device”, something’s wrong and you need to find a way to solve that, which is not covered in this guide.
• If you followed Chapter 2 Step 3, then this is a pretty crucial moment: type in fastboot flash recovery [The filename of your Team Win file]. Only if all the permissions and filepaths mentioned so far have been sorted out correctly on your PC, will the flashing process successfully work. If you don’t have them, you’ll see such errors as how it can’t open the file. Carefully wait until the process says that it’s finished, which hopefully shouldn’t take more than 15 minutes at most.
- Troubleshooting 1: Windows doesn’t recognise my phone when I connect it with a USB cable, and therefore I am unable to send fastboot commands to it — This is a genuine and frustrating issue that affects most Android 2.x phones; and while it may be difficult to find good Google results out there, there is indeed very likely some info out there from people who couldn’t connect that phone model to their PCs. It’s very likely missing drivers (both/either for USB connections and for phone-specific ADB drivers), or plausibly some missing entries in the Windows Registry. Also, when you’ve installed the needed drivers, make sure to restart Windows so that the drivers can take effect.
- Troubleshooting 2: ADB can find and open the file, but I still get errors when using fastboot flash recovery [The filename of the Team Win .img file] — This may indicate that your phone’s bootloader is so-called “Locked”, which means that the phone is set up to not install any custom things by default. Try to run the command fastboot oem unlock, which may or may not require admin/sudo permissions on your PC. If you get errors with that command too, you’re in for a hellride, as your phone producer may have set up outlandish barriers that you need to unlock, one after another (especially if it’s an HTC phone). Good luck with doing that.
Chapter 3: Replacing the operative system
- Now you can breathe a sigh of relief that the most difficult part of the process is over. If you want a tea break to check out your Instasnapbook notifications on your old Android version while you still have it, this would be the appropriate time to do so. The next part when you feel safe and ready, is about using the Team Win custom recovery environment to install your OS. If you were able to find a button combo to head straight to fastboot in Chapter 2 Step 1, then this is where you’ll need to look up on Google for your phone’s button combination to boot to the bootloader nonetheless (It commonly involves the volume keys somehow), and from there choose to go to recovery.
- Do the following things in the right order, if you’re using Team Win 3.1.2:
• Swipe to allow system modification. You’re going to need it if you want to keep your new Android version safe from being reverted back to the previous version by your manufacturer.
• (Optional) If you want to take a backup, choose Backup.
• Go to Wipe → Advanced Wipe → Choose only System, Cache and Data. Deselect all the other options, and then start the wipe of those areas. It should go pretty quickly. Only after you’ve done this step, there is no going back to your old Android version if you didn’t take a backup.
• When that has been done, go back to the menu and choose Install. First, choose the OS file (and nothing else, as I don’t trust the queue-system in TWRP 3), and install it. This should take about 10 minutes, normally. Of course, do NOT interrupt the process before it says that it’s finished.
• When that has been done, do not choose to reboot just yet, but instead you must also install the OpenGapps ZIP file as well, which’ll take another 10 minutes and with fewer command-line process details.
- Troubleshooting for Step 2: I get a Status 0 error each time I try to install the new OS — First of all, don’t get frantic. Your phone hasn’t been doomed to certain death. It’s just that there’s an issue with the TWRP version that you’re using. See if there are any alternative recovery environments you can use instead to install the OS, such as “ClockworkMod Recovery”, and then restart the guide from Chapter 2 Step 3 onwards with the intent of flashing the recovery with ClockworkMod (or anything else you come across that is supported on your phone) instead.
- Now… now, is the moment where your dreams are about to come true, and in which you see that the sun in the end of the tunnel is getting increasingly more bright. Now you can choose to reboot the phone, which after a few minutes at the booting screen (It shouldn’t normally need more than 15 minutes) will initiate the first-run setup of your new phone version, which generally covers Google-related settings. You’ve done it, man. You’ve succeeded at it. You have now sideloaded an update for your own Android phone on your own! :’)
Post-installation troubleshooting for Android 7:
- I get “Setup Wizard has stopped” every time I run the first-run setup — There’s some issues with the Gapps package you installed during Chapter 3 Step 2, and/or you didn’t install the Gapps package at all. See if the XDA Developers page for your LineageOS/Cyanogenmod build is recommending any specific customized Gapps packages in the thread opener, and then repeat the installation process from Chapter 3 Step 1 onwards with the intent of using the new Gapps package instead.
- 403 error while adding a Gmail account to the Outlook app — Install Chrome, and set it as your default browser. This may sound weird and very vendor-locking-esque, but that is indeed what Google appears to be mandating to use for certain Google login processes now, if this particular problem is affecting you.
- My Norwegian/Swedish BankID doesn’t show the codewords and instead tries to send an empty command back to the bank/login — This is caused by mashing the OK button during the BankID setup process multiple times. Do only press OK once for each step in the process.
- The Google searchbar at the top of the screen in Android 7 is a piece of junk — Install “Nova Launcher” from Google Play, and set it as your default homescreen environment.
- Where did the notification badges with all those numbers go? I really miss them… — This is a paid extra in Nova Launcher through the Prime version of its app, which costs ≥US$5.00. It also requires the app “TeslaUnread”, made by the same company.
Chapter 4: How to install LineageOS build updates
So now you’ve been enjoying LineageOS (with Android 6 or 7) for some weeks, and you’ve been able to get used to it and have set up everything again. Then suddenly you get a peculiar notification on your lockscreen. There’s a LineageOS update ready for installation, and it has to be installed manually. “What’s the best course of action to not fuck up everything”, you may ask? Here’s the base advices.
(Note that this chapter’s advices do NOT work with Cyanogenmod builds. The guide also presumes that you’ve successfully used Team Win as your recovery environment of choice.)
- Tap the notification (or go to “Phone status” → “LineageOS updates” in the settings). There you will see one or more updates that are ready to be downloaded. Download only one of them! Normally you will want the latest update. However, if the latest update is very new (As in, released within the past 24 hours or so), you can also go for the second-most-recent update to quelch any fears that the update would break your phone.
- Tap “Download”. Let the download finish! If you were to tap “Install” after that, you’d be shown a message that you’d be rebooted into recovery mode to install it. However, since this guide’s installation procedure does not root the phone, the phone is unable to auto-reboot just like that.
- Turn off the phone, and boot into the recovery environment through the required button combination (The same as it was during Chapter 3).
- When you’ve reached the Team Win main menu (And you’ve of course chosen to allow system modifications once again, or you’ve already chose to not show the modification warning again during Chapter 3), choose “Install”. It is NOT necessary to wipe your phone yet again!
- Now, find your way to a very specific folder that the LineageOS updates are autodownloaded to. [System storage] → data → data → org.lineageos.updater → app_updates → And there you’ll find the newest update.
• If you see multiple updates there, make sure to only pick the newest one! The date is (as far as I can remember) written in Japanese notation, so that an update from the 9th of June 2017 would have “20170609” as part of the update’s filename.
- Choose to install. Saying it once again, do NOT wipe anything when you’re given the choice.
- If the update procedure says that it’s “patching” instead of “flashing”, that’s a very good sign, and shows that you have nothing to fear at all. When it says “…….done”, choose to immediately reboot.
- The first boot after an update will take a bit longer than usual, but will send you straight to the same lockscreen as you had before the update. No need to set up anything again at all; everything on your phone is still there, just where you left them!