Please note this is currently for the dual-sim model ONLY. When you need a single-sim variant leave a comment, so we can work an that...
/*
* Disclaimer - your warranty may be void.
*
* I'm not responsible for bricked devices, dead OTGs or you getting fired because the alarm app failed.
* Please do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
- OTA updates - always delayed for 1 day (to prevent broken rollouts); when you want it immediately, checkout my GitLab pipelines
- Increased volume steps to 25
- Over-provisioned system image (580MiB), to allow install of OpenGApps and other stuff
- Open Source (it is based on SODP, you can view all my patches and ci scripts here or here)
- Package signature spoofing (needed by MicroG)
- Stock camera app with wide and zoom cameras, you may use Open Camera to circumvent that.
- Notification LED blinking - kernel driver bug (see here)
- LiveDisplay
- You tell me...
There you have multiple options:
- To get the complete package (both including the
ota
andimg
parts; only needed for the initial setup) visit...- AndroidFileHost
- GitLab (make sure to download the artifacts from the
master
branch)
- To get ONLY the OTA package to update your system later on, visit (or open up the LineageOS Updater) ota.simonmicro.de - please note that only the last recent 14 days are accessible there.
2021-02-28
Fixed wifi hotspot.
2020-12-18
Fixed cameras.
2020-11-27
Fixed ADB security.
2020-11-25
Added SELinux support.
2020-11-20
Added OpenGApps support.
2020-11-17
Initial release.
The following guide assumes, you have setup adb
and fastboot
already (make sure to always use the latest version of the toolkit, otherwise you'll may get problems during flashing) - for that take a look into the internet. Also you should already downloaded the complete package from above!
- Unlock the bootloader - a "how to" is here...
- Download the oem binaries from here, make sure to use exactly that version!
- Boot into the bootloader (hold "Volume up + Insert the USB cable" until led lights blue) and then update the oem partition:
fastboot flash oem_a [EXTRACTED_OEM_IMAGE_FILE]
fastboot flash oem_b [EXTRACTED_OEM_IMAGE_FILE]
- Flash now the Lineage
recovery
partition as well as thedtbo
partition (they are inside theimg
folder of the complete package):
fastboot flash recovery [EXTRACTED_RECOVERY_IMAGE_FILE]
fastboot flash dtbo [EXTRACTED_DTBO_IMAGE_FILE]
- Disable the verity checks for now, as your new recovery violates the Sony verity profiles of the Stock ROM:
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
fastboot flash --disable-verity --disable-verification vbmeta_system vbmeta_system.img
- Okay, you are now ready to boot the first time into the Lineage recovery, unplug the phone NOW!
- To boot into recovery: Hold "Volume down + Power" until it vibrates...
- You should now be booted into the recovery. We now clean any old data from Sonys Stock ROM - this is just to make sure you have a really clean install: Choose the "Factory reset" option.
- The phone is now clean and ready to accept the new system. You now can either install just the OTA package and be done or flash every
.img
from the full package manually - the coice is yours. When you plan to flash the images manually, make sure to includeboot
,system
,product
,vendor
,vbmeta_system
, as these are normally part of the OTA update (I extracted thepayload.bin
to verify this!). For the latter approach you may orient yourself on my flashall.sh. I'll choose the simpler OTA-sideload approach for now. - Select "Apply update -> Apply from ADB" (now make sure the adb server runs as
root
- may useadb kill-server && sudo adb start-server
to fix that) and execute (the OTA zip is inside theota
subdir):
adb sideload [OTA_SYSTEM_UPDATE_ZIP_FILENAME]
- After installing the OTA, make sure to reboot your device to verify the update is indeed working. Also the update switches the slots, but the recovery needs to reboot to realize that - otherwise sideloading other stuff may won't work!
- Don't panic!
- You messed up the verity disable step from before - try again.
- Try to switch the current boot slot (get current
fastboot getvar current-slot
and set newfastboot --set-active=
, you can choose betweena
andb
) and retry disableing verity disable again! - When your device fails to boot too many times (and crashes) the current slot could also get marked as corrupt. To reset that counter you'll need to reflash the
boot
partition - to see what is going on, tryfastboot getvar all
and look out for something like aunbootable
flag.
This is commonly caused by relocking and then reunlocking the bootloader (yay - buggy firmware). You'll need to relock, restore (and boot) the device with Flashtool using Sonys original ROM and start from fresh.
Well, that's caused by using an other recovery than the provided one, as I use my own private keys to sign the build the recovery must also know them. Using an other recovery than the one from
the img
folder of the complete package will most likely not include them (and when they do - I am in big trouble), and therefore fail. But you are in luck: It seems that the recovery writes
the data to the currently inactive slot and then fails. You could simply switch the system slot like described above!
Install the Magisk zip like the OTA system update by using adb sideload [MAGISK_FILE_NAME]
.
Make sure to use the nano
-variant (or the even smaller pico
), as the system partition is even with over-provisioning really small (as the installer extracts some more stuff on the first boot) - then install the OpenGApps zip like the OTA system update by using adb sideload [OPENGAPPS_FILE_NAME]
.
As much I would like, I can't do everything by myself. A huge thank you to...
- @MartinX3 for the used local_manifests and his device tree from his LineageOS organization
- ...the team behind @sonyxperiadev, for their great work (and their kernel sources)!
PERSISTENT_DATA_STORAGE
-> path to a huge persistent drive (200GB at least)BUILD_PRIVATE_KEYS
-> base64 encoded zip archive of the private keys for signing this build (represents~/android-certs
from here)DEPLOY_DIR
-> remote path for the OTA apiDEPLOY_HOST
-> remote SSH host for the apiSSH_PRIVATE_KEY
-> remote SSH key for the api
To generate BUILD_PRIVATE_KEYS
execute (skip any password request)...
subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/[email protected]'
mkdir ./PRIVATE_KEYS
for x in releasekey platform shared media networkstack testkey; do \
./development/tools/make_key ./PRIVATE_KEYS/$x "$subject"; \
done
zip -r PRIVATE_KEYS.zip PRIVATE_KEYS
base64 -w 0 PRIVATE_KEYS.zip > STORE_THIS_INTO_ENV_VAR_BUILD_PRIVATE_KEYS
rm -rfv PRIVATE_KEYS PRIVATE_KEYS.zip