i decided i wanted to try an open source android installation, specifically lineageos. mainly just to see what it’s like, but also because i’d like to move to a non-Google android setup in the long term. however, i couldn’t do this with my main phone, first because it’s not supported by lineageos, but secondly because i don’t want to muck up the phone i use for all my 2FA.

here is a step-by-step account of what i did to get it working.

the installation instructions are here.

0 getting the hardware

first i had to choose a phone to try with lineageos. i chose a oneplus two because it’s a supported device, has an official bootloader unlocking technique, doesn’t require a SIM card, and is relatively cheap (this process breaks the warranty so no returns!).

i just bought a ‘factory unlocked’ phone from ebay. it came with android 6.

1 preparation

install required command-line tools:

pacman -Syu adb fastboot

on the phone, set developer options:

  1. enable developer options (tap “Build number” under settings 7 times)
  2. enable developer options => USB debugging
  3. enable developer options => OEM unlocking

2 check phone/computer connection

  1. plug phone into computer. after this point, i left the phone plugged in until the end
  2. on computer run adb devices
  3. on phone “Allow USB debugging” prompt appears. select “always allow” and “OK”

3 unlock bootloader

  1. on computer run adb reboot bootloader
  2. run fastboot devices. my output was <hex string> fastboot
  3. run fastboot oem unlock:

     OKAY [  0.120s]  Finished. Total time: 0.121s
    
  4. on phone, dialog appears: “Unlock will erase user data, continue?”. select “Yes”
  5. phone reboots

4 install custom recovery

  1. from TWRP, download latest .img file
  2. once phone reboots, go through entire phone setup process (i didn’t enable any google features or allow wifi)
  3. on phone, reenable developer mode and allow USB debugging
  4. on computer run adb reboot bootloader
  5. run fastboot devices to confirm device is found
  6. run fastboot flash recovery <img-file> to flash recovery

    Sending ‘recovery’ (22180 KB) OKAY [ 0.861s] Writing ‘recovery’ OKAY [ 1.591s] Finished. Total time: 2.494s

  7. run fastboot boot <img-file> to boot into recovery image

    Sending ‘boot.img’ (22180 KB) OKAY [ 0.827s] Booting OKAY [ 0.569s] Finished. Total time: 1.410s

5 install lineageOS

  1. from LineageOS download the latest build (mine was from 2020-04-18)
  2. on phone, swipe to allow modifications
  3. tap “Wipe”, “Format Data”, type yes to continue
  4. tap “Back”, go back another time, and tap “Advanced Wipe”
  5. select “Cache” and “System”, then swipe to run
  6. go back 3 times to the main menu, then press tap “Advanced”, “ADB Sideload”, then swipe
  7. on computer, run adb sideload <lineage-zip>

6 install lineageOS addon su

  1. from LineageOS, download the su (arm64) package.
  2. on phone, press “Back” and “ADB Sideload”, then swipe
  3. on computer, run adb sideload <su zip>

NOTE: if you want to install any other lineageOS or other addons, you have to do it now.

7 reboot and follow setup procedure

  1. run adb reboot
  2. go through setup procedure on phone

ready to use!

after this, i installed Aptiode for my app store.