8 KiB
Install LineageOS on Fairphone
1. Checklist before starting
[ ] adb and fastboot are installed on the computer?
[ ] you downloaded the bootimage (img) and LineageOS (zip)?
[ ] you have the unlock code (in case of Fairphone 3)?
[ ] you have an usb cable ready?
[ ] you have removed your screen lock?
[ ] your phone has at least 70% battery?
[ ] you are prepared to erase all the data on your Fairphone?
2. Unlock your Fairphone
Unlocking will allow us to overwrite the boot-loader.
- Navigate to "Settings - About phone"
- Tap on “Build number” 7 times to enable developer mode
- Navigate to "Settings - System – Advanced – Developer options"
- Enable USB Debugging
- In case of Fairphone3:
- Navigate to "Settings - System – Advanced – Developer options"
- Enable OEM unlocking with your unlock code
3. Connect via usb
For overwriting the boot-loader of your Fairphone, it needs to be connected to your pc.
- Connect your Fairphone to the computer via usb
- On your Fairphone allow the usb connection
- Type
adb devices
on your terminal (for Windows users: open the terminal in the directory containing adb&fastboot.exe and use the.\
prefix. The resulting command will be:.\adb devices
).
The result should show something likeList of devices attached <SerialNumberOfYourPhone> device
4. Prepare recovery image installation
The next step is critical. If something goes wrong here your Fairphone may remain broken. Time to do some checks:
- Make sure your phone has at least 70% battery.
- Reboot your Fairphone to bootloader mode: Type
adb reboot bootloader
on the terminal. - Your Fairphone should show the bootloader screen.
- Type
fastboot devices
on the terminal. The result should show something like<SerialNumberOfYourPhone> fastboot
- Check your downloaded recovery image
- In Windows type
Get-FileHash <image_filename.img>
on the terminal. - in Linux type
sha256sum <image_filename.img>
or alternativelyshasum -a 256 <image_filename.img>
on the terminal.
- In Windows type
- The result should look like
b6494278d0a399547a9344a6018a30b388f71a97ef52989bcdd661002f3a8631 lineage-18.1-20210906-recovery-FP3.img
- Now compare the number to the one given on the recovery image download page. Ensure you are browsing with "https".
- Be aware, in the next step all data will be erased on your Fairphone!
5. Install LinegaeOS recovery image
All checks passed? Then let's continue:
- If your Fairphone reboots, you might have to do the steps 2.1-2.4 again to re-enable USB debugging. Then
adb reboot bootloader
will bring you back. - For Fairphone2
- On the terminal type
fastboot flashing unlock
. - Install fastboot image & reboot to recovery by typing on the terminal
fastboot flash recovery <image_filename.img>
(<image_filename.img> is the img-file you have downloaded in 1.). - Reboot to recovery without starting your original rom: With the device powered off, hold Power + Volume Up. Release when boot logo appears.
- On the terminal type
- For Fairphone3
- On the terminal type
fastboot flashing unlock
. - Install fastboot image & reboot to recovery by typing on the terminal
fastboot flash recovery <image_filename.img>
(<image_filename.img> is the img-file you have downloaded in 1.).- If you see something like "boot partition is smaller than boot image" you might find the solution here.
- On the phone you should not see any difference and it should remain in the bootloader screen. Then hold Volume Up + Power. Release when boot logo appears.
- Reboot to Recovery without starting your original rom:
- On the terminal type
- For Fairphone4
- On the terminal type
fastboot flashing unlock
. - Do the steps 2.1-2.4 again to re-enable USB debugging. Then
adb reboot bootloader
- On the terminal type
fastboot flashing unlock_critical
- Do the steps 2.1-2.4 again to re-enable USB debugging. Then
adb reboot bootloader
- Install fastboot image & reboot to recovery by typing on the terminal
fastboot flash recovery <image_filename.img>
(<image_filename.img> is the img-file you have downloaded in 1.).
- On the terminal type
Please take care not to boot your old Android / FairphoneOS. If you missed the proper reboot to recovery by buttons you are back to step 1. because your old os reinstalls its own recovery over the one just installed.
6. Install LineageOS
This step is not very dangerous. You can retry as often you need to. The LineageOs boot-loader will verify your binaries. If you are already in the recovery mode you can go to step 6.3.
-
Return to main menu
-
Type
adb sideload <lineagos.zip>
on the terminal (<lineagos.zip> is the zip-file you have downloaded in 1.).
-
Check whether you see the
Step 2/2
on the bottom of your Fairphone.
6.1 Optional installation of google Apps
If you really need the google Apps or the google Play Store there are packages with various scopes, you will find a package comparison here: https://github.com/opengapps/opengapps/wiki/Package-Comparison. You have to install google Apps before the first start.
- Download your favored version from here.
- Install gapps the same way, you installed LineageOs:
adb sideload <gapps.zip>
6.2 Reboot into LineageOS and prepare for OEM Lock
Rebooting the system should get you straight to LineageOS.
Then do steps 2.1 - 2.4 again to re-enable USB-debugging and boot again into fastboot mode with adb reboot bootloader
.
7. OEM Lock
OEM unlocking / locking will erase all data, so we should ensure to do the lock again now.
- Type
fastboot devices
on the terminal. The result should show something like<SerialNumberOfYourPhone> fastboot
- For Fairphone2
- On the terminal type
fastboot flashing lock
.
- On the terminal type
- For Fairphone3
- On the terminal type
fastboot flashing lock
.
- On the terminal type
- For Fairphone4
- OEM lock ist not possible on FP4. You have to use your phone unlocked.
8. Start LineageOS
The first start of your new LineageOS - hurray.
- Walk through the initial setup. If you want to avoid tracking from start, you should
- execute Step 1 - 4 of [DegoogleLineageOS.md](3. DegoogleLineageOS.md)
- activate your wifi
9. Download the F-Droid App-Store
For installing more software we recommend the F-Droid app store
- Use the browser on your Fairphone to download F-Droid: https://www.f-droid.org/
- Visit the download-folder and install F-Droid (accept the warning).
- Do no longer trust your browser for installing apps: Settings -> Apps -> Browser -> extended -> switch "Install from unknown source" off.
- Now you can install Apps like DeltaChat, NextCloud, Fennec, Tusky, k9 (...) through the F-Droid Store.
10. Enable Data-Encryption
Your private data should stay safe in case of loosing your phone
- Settings -> Privacy -> Trust -> activate encryption (you have to choose at least a screen-lock-pin for this process).
11. Final steps
Now your phone is ready for use
- Disable Development Options: Settings -> System -> Development Options.
- insert your sim-card