• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][UNOFFICIAL] LineageOS 17.1 for Xperia 10 II [OTA][SODP]

Search This thread
Lineage 17.1 for the Sony Xperia 10 II
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...

Code:
/*
* 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.
*/

Features
  • 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)

What does not work?
  • 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...

Download
There you have multiple options:
  • To get the complete package (both including the ota and imgparts; only needed for the initial setup) visit...
  • 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.

Changelog

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.


How to install your system
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!

  1. Unlock the bootloader - a "how to" is here...
  2. Download the oem binaries from here, make sure to use exactly that version!
  3. Boot into the bootloader (hold "Volume up + Insert the USB cable" until led lights blue) and then update the oem partition:

    Code:
    fastboot flash oem_a [EXTRACTED_OEM_IMAGE_FILE]
    fastboot flash oem_b [EXTRACTED_OEM_IMAGE_FILE]
  4. Flash now the Lineage recovery partition as well as the dtbo partition (they are inside the img folder of the complete package):
    Code:
    fastboot flash recovery [EXTRACTED_RECOVERY_IMAGE_FILE]
    fastboot flash dtbo [EXTRACTED_DTBO_IMAGE_FILE]
  5. Disable the verity checks for now, as your new recovery violates the Sony verity profiles of the Stock ROM:

    Code:
    fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
    fastboot flash --disable-verity --disable-verification vbmeta_system vbmeta_system.img
  6. Okay, you are now ready to boot the first time into the Lineage recovery, unplug the phone NOW!
  7. To boot into recovery: Hold "Volume down + Power" until it vibrates...
  8. 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.
  9. 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 include boot, system, product, vendor, vbmeta_system, as these are normally part of the OTA update (I extracted the payload.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.
  10. Select "Apply update -> Apply from ADB" (now make sure the adb server runs as root - may use adb kill-server && sudo adb start-server to fix that) and execute (the OTA zip is inside the ota subdir):
    Code:
    adb sideload [OTA_SYSTEM_UPDATE_ZIP_FILENAME]

Something went wrong - help!

(Step 7-8) When you now see a device corrupt error
  • 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 new fastboot --set-active=, you can choose between a and b) 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, try fastboot getvar all and look out for something like a unbootable flag.

(Step 9) When you get Operation not permitted during flashing
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.

(Step 10) When you get the kDownloadPayloadPubKeyVerificationError error
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!


Want to install Magisk?
Install the Magisk zip like the OTA system update by using adb sideload [MAGISK_FILE_NAME].

Want to install OpenGApps?
Make sure to use the pico-variant, 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].

Credits
As much I would like, I can't do everything by myself. A huge thank you to...

XDA:DevDB Information
LineageOS 17.1 for pdx201, ROM for the Sony Xperia 10 II

Contributors
Simonmicro, MartinX3
Source Code: https://gitlab.simonmicro.de/android/lineage/lineage-pdx201

ROM OS Version: Android 10
ROM Kernel: Linux 4.x
ROM Firmware Required: Sony OEM Package
Based On: AOSP

Version Information
Status:
Beta
 
Last edited:

bamdadkhan

Senior Member
Oct 7, 2013
90
10
hmm, i flashed everything according to the instructions, but the system still looks the same as Sjll's ROM and there is no updater in settings>system. anyone else getting this?

EDIT: nevermind, all is well, i was on the wrong slot.. : / wish we wouldn't have to deal with this, TWRP+lineage+one slot was perfect. this is not about the ROM though, it's awesome.
 
Last edited:
hmm, i flashed everything according to the instructions, but the system still looks the same as Sjll's ROM and there is no updater in settings>system. anyone else getting this?

EDIT: nevermind, all is well, i was on the wrong slot.. : / wish we wouldn't have to deal with this, TWRP+lineage+one slot was perfect. this is not about the ROM though, it's awesome.

:D - you made my day. Now I know which ROM you used before :p

No serious: Did you follow the guide step-by-step or did you altered it in some way (maybe forgot to reboot after switching slots) - as it should normally flash both slots (when using ota), even when not you should be at least on the right slot after flashing?!
 

bamdadkhan

Senior Member
Oct 7, 2013
90
10
:D - you made my day. Now I know which ROM you used before :p

No serious: Did you follow the guide step-by-step or did you altered it in some way (maybe forgot to reboot after switching slots) - as it should normally flash both slots (when using ota), even when not you should be at least on the right slot after flashing?!

lol it's easy to know when the ROM in question is the only available aside from yours xd

seriously: i followed all the steps to the letter. flashed the SW binaries on both oem_a and oem_b. really everything.

i have a theory though. i originally flashed your ROM when 'side b' had previously been set active. if this persists across reboots - i really don't know, this whole 'dual ROM' concept is new to me - then there's your answer: the lineage install script probably has a command to use 'side a' for flashing. is completed successfully, but then i went ahead and booted the 'side b', which still had Sjll's ROM on it.
 
lol it's easy to know when the ROM in question is the only available aside from yours xd

seriously: i followed all the steps to the letter. flashed the SW binaries on both oem_a and oem_b. really everything.

i have a theory though. i originally flashed your ROM when 'side b' had previously been set active. if this persists across reboots - i really don't know, this whole 'dual ROM' concept is new to me - then there's your answer: the lineage install script probably has a command to use 'side a' for flashing. is completed successfully, but then i went ahead and booted the 'side b', which still had Sjll's ROM on it.

Well, I also tested my guide to the letter - and there i saw on my device screen that the ota flashed on both partitions. Did you also used my recovery? When you did: Lets see if others also have that problem... :angel:
 
Great job, thank you. Can I install NikGapp? Or does it also cause bootlaps?

On their website:

Code:
OpenGapps Team (for base package and providing Open Gapps)

Therefore is a really good chance that the installer has the same problems like OpenGApps - but I can't say that for sure, I guess you'll need to try it out (when is does bootloop / never starts, please send me a adb logcat -b all for further diagnostics).
 
Last edited:

xdauserart

Member
Oct 13, 2020
41
2
Done till the step 9.

Tried the second way first (flashing images). Please see the log for this below.. Then tried OTA way. OTA way did with 0 exit status (it sent files) but when I boot device it writes "Your device is corrupt. It can't be trusted and will not boot. Your device will be powered off in 5 seconds". How to fix? :(

Also when I load into recovery it writes this:
E: Failed to bind mount /mnt/staging/mulated/media/0 to /storage/emulated: NO such file or directory.
E: emulated failed to bind mount /mnt/stagingemulated/media/0 on /storage/meulated: No such file or directory.

See full log for flashing images:
sudo fastboot flash boot boot.img
sudo fastboot flash system system.img
sudo fastboot flash product product.img
sudo fastboot flash vendor vendor.img
sudo fastboot flash vbmeta_system vbmeta_system.img

[sudo] пароль для :
Sending 'boot_b' (65536 KB) OKAY [ 2.441s]
Writing 'boot_b' OKAY [ 0.358s]
Finished. Total time: 2.812s
Sending sparse 'system' 1/2 (785636 KB) OKAY [ 29.722s]
Writing 'system' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
Sending 'product' (432072 KB) OKAY [ 16.440s]
Writing 'product' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
Sending 'vendor' (48084 KB) OKAY [ 1.725s]
Writing 'vendor' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
Sending 'vbmeta_system' (4 KB) OKAY [ 0.005s]
Writing 'vbmeta_system' OKAY [ 0.003s]
Finished. Total time: 0.016s
❯ sudo fastboot flash boot boot.img
sudo fastboot flash system system.img
sudo fastboot flash product product.img
sudo fastboot flash vendor vendor.img
sudo fastboot flash vbmeta_system vbmeta_system.img

❯ sudo fastboot flash boot boot.img
sudo fastboot flash dtbo dtbo.img
sudo fastboot flash product product.img
sudo fastboot flash recovery recovery.img
sudo fastboot flash super_empty super_empty.img
sudo fastboot flash system system.img
sudo fastboot flash vbmeta vbmeta.img
sudo fastboot flash vbmeta_system vbmeta_system.img
sudo fastboot flash vendor vendor.img
Sending 'boot_b' (65536 KB) OKAY [ 2.438s]
Writing 'boot_b' OKAY [ 0.378s]
Finished. Total time: 2.831s
Sending 'dtbo' (8192 KB) OKAY [ 0.302s]
Writing 'dtbo' OKAY [ 0.046s]
Finished. Total time: 0.357s
Sending 'product' (432072 KB) OKAY [ 16.212s]
Writing 'product' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
Sending 'recovery' (98304 KB) OKAY [ 3.699s]
Writing 'recovery' OKAY [ 0.557s]
Finished. Total time: 4.265s
Sending 'super_empty' (4 KB) OKAY [ 0.011s]
Writing 'super_empty' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
Sending sparse 'system' 1/2 (785636 KB) OKAY [ 29.755s]
Writing 'system' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
Sending 'vbmeta' (4 KB) OKAY [ 0.009s]
Writing 'vbmeta' OKAY [ 0.003s]
Finished. Total time: 0.021s
Sending 'vbmeta_system' (4 KB) OKAY [ 0.003s]
Writing 'vbmeta_system' OKAY [ 0.004s]
Finished. Total time: 0.014s
Sending 'vendor' (48084 KB) OKAY [ 1.770s]
Writing 'vendor' FAILED (remote: 'No such partition.')
fastboot: error: Command failed
 

Thapsus-cz

Member
Jul 30, 2019
26
3
54
Prague
Done till the step 9.

Tried the second way first (flashing images). Please see the log for this below.. Then tried OTA way. OTA way did with 0 exit status (it sent files) but when I boot device it writes "Your device is corrupt. It can't be trusted and will not boot. Your device will be powered off in 5 seconds". How to fix? :(

Also when I load into recovery it writes this:


See full log for flashing images:

I had the same problem yesterday with the same results. I struggled with it until morning. Eventually I downloaded the latest version of adb, flashed the stock rom again and started over. It was done in twenty minutes. Try the latest version of adb (I guess version 35 for Windows)
 
Done till the step 9.


...


Code:
Sending sparse 'system' 1/2 (785636 KB) OKAY [ 29.722s]
Writing 'system' FAILED (remote: 'No such partition.')
fastboot: error: Command failed


This indicates you tried to use the bootloader (which also has fastboot support) to flash the images. I made sure to write the guide the way that it states you should use the fastbootd service of the recovery. I have the dumb feeling that many more will go your way and fail. Damn it.


Code:
E: Failed to bind mount /mnt/staging/mulated/media/0 to /storage/emulated: NO such file or directory.
E: emulated failed to bind mount /mnt/stagingemulated/media/0 on /storage/meulated: No such file or directory.


Is fine, as you just erased all data - this also kills the partion so it cant be mounted anymore (that's the errors). This is indeed intentional as the system is now forced to really start fresh!


Your device is corrupt. It can't be trusted and will not boot. Your device will be powered off in 5 seconds"


Did you tried the help of my guide? When you failed that and your device rebooted too many times (or it just could not boot and crashed too many times) you'll need to reflash the boot partition to reset the counter (and therefore the failure message).
 

Sjll

Recognized Developer
Jun 4, 2017
516
602
Chongqing
Two PR to fix back triple cam. But front cam is still broken. :)

https://github.com/sonyxperiadev/device-sony-seine/pull/29
https://github.com/sonyxperiadev/device-sony-pdx201/pull/15

--------------EDIT-----------------
Switch to CAF powerhal, better performance we have.
https://github.com/sjllls/device-sony-common/commit/de3b2bbbc33130891263d9e81ea2178a0f6783c4
https://github.com/sjllls/device-sony-sepolicy/commit/72059258eb0ff2c854996a05a5a23a8b73b55459

--------------EDIT-----------------
Renmember to let users flash with latest platform-tools, or they could not boot because of logical partition is not resized.
https://developer.android.com/studio/releases/platform-tools
 
Last edited:

Thapsus-cz

Member
Jul 30, 2019
26
3
54
Prague
On their website:

Code:
OpenGapps Team (for base package and providing Open Gapps)

Therefore is a really good chance that the installer has the same problems like OpenGApps - but I can't say that for sure, I guess you'll need to try it out (when is does bootloop / never starts, please send me a adb logcat -b all for further diagnostics).

I can confirm that Opengapps pico can now be installed without a bootloop. I'm at work and I don't have adb. I installed them directly as an update from the sd card using recovery. Everything works fine.
 

KriiXOne

Member
Apr 13, 2018
10
3
Can we get OpenGapps Nano support?

I know that OpenGapps pico are supported, but most people use the nano package as it contains some functions that aren't possible to obtain in any other way
so is that possible?
 
I know that OpenGapps pico are supported, but most people use the nano package as it contains some functions that aren't possible to obtain in any other way
so is that possible?


As I already drastically over-provisioned the system partition, I guess it could be possible that the nano package already works: In that case try it for yourself! When it goes wrong you can just switch over to your slot used before flashing the bad OpenGApps zip. Please PN me about your result, so I could extend the guide!
 

KriiXOne

Member
Apr 13, 2018
10
3
As I already drastically over-provisioned the system partition, I guess it could be possible that the nano package already works: In that case try it for yourself! When it goes wrong you can just switch over to your slot used before flashing the bad OpenGApps zip. Please PN me about your result, so I could extend the guide!

I'll try tomorrow after the math test that i'm studying for today, and will let ya know ^^'
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Yes and no. Is it still my daily-driver? Yes. Have I any time to fix the current OTA builds? No. Any time to port to LOS 18+? Also no. So, I promise that I will update the post when I intent to not maintain this port anymore (and then also switch my daily-driver), but for now there also won't be any updates, as something somewhere upstream broke again...

    A bigger problem is that I do not want to break anything with future updates (sjll had some great additions, but they would need a reformatted data partition) and therefore also have to go that extra step of ensuring this - which take even more time.

    So yeah. This is the status now... As promised: When I give this port up, you will be notified.
  • 2
    @Simonmicro
    Is it possible to add GCam support in your ROM?
    What exactly do you want? The default camera of the LOS is already used (Snap). We could migrate it to Snap2, but this would "downgrade" the feature set of the app (loosing the qrcode scanner). When you want the Google Camera you should be able to just install it using the Google Play Store or just download the respective apk and patch the config as already by @Sjll done for her version of the rom.
    I would like to not include it by default, as the main goal of LOS is to be clean from any Google stuff by default. Also this version of LOS tries to maximize the used Open-Source code, which would also interfere with this goal.
    2
    Yes and no. Is it still my daily-driver? Yes. Have I any time to fix the current OTA builds? No. Any time to port to LOS 18+? Also no. So, I promise that I will update the post when I intent to not maintain this port anymore (and then also switch my daily-driver), but for now there also won't be any updates, as something somewhere upstream broke again...

    A bigger problem is that I do not want to break anything with future updates (sjll had some great additions, but they would need a reformatted data partition) and therefore also have to go that extra step of ensuring this - which take even more time.

    So yeah. This is the status now... As promised: When I give this port up, you will be notified.
    2
    When I was installing this on Saturday, and I found this a bit unclear. I was able to install nano but not micro (micro installed, but the phone wouldn't boot and said it was bricked. Cue panic. Re-followed instructions w/nano instead and no problems).
    The OpenGApps sizes are pico < nano < micro and so on. I'm sure that pico works, as I use it myself and (based on the size) also nano should work. I know that micro+ is broken - but as I said, I do not want to increase the system image size more to keep the update (and packages) small...

    I freaked out a bit when the GPS wasn't working, but turns out my house just kills the signal. Was working fine for either maps, osm+ or Fito track when out from under the rock. The front camera is working for open camera but not the default camera as above.
    Hehe - same for me (gps). The cameras are still fun... Somewhere is some config screwed up... Also somebody (...) told me that the camera2 HALs are beyond messy...

    My fingerprint reader isn't working for Keepass2 to do quick unlocks (ironic, as that is actually the only thing that really needs it). It looks to be some sort of Java NullPointerException. Copying it proved somewhat difficult (can't just highlight it for some reason). Lmk if the details would be useful and I'll see if I can figure it out.
    Okay. Nett2Know... I'll add it to my issue list. Damn it...

    More that all that though, thanks to all the devs working on LineageOS, and particularly Simon and Martin for putting this together and Simon for maintaining, and Sjll for her work on this ROM and the 18.1 one! Its a real quality of life upgrade having this available. Y'all are awesome.
    On behalf of the whole team: Thank you 😄
    2
    anyone else having problems with the latest OTA? it boots then immediately shuts down. lineage recovery is a crapchute and says i need to reformat, but changing active slots - essentially going back to the may 10 release - works.

    i'd like to know if this is reproducible by anyone..
    Shoot, I can confirm! I had not yet restarted my phone for a while and therefore not noticed that yet. I'll take it down ASAP and look further into it (I'm also restoring an older version of it). Sh*t!
    2
    Okay. Fixed. I've recently switched to a whole new repository architecture and somehow messed up a path for the SELinux permissions. So let us just not talk about this https://github.com/Simonmicro-Andro...mmit/470a6588ca88ff8554ee6e7ecb09e7aad3566bb1 stupid mistake :p
    I'll retest the next branch this time, before blindly merging into the master (which was a mistake for itself).