yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Need special TWRP for single SIM and Lineage

I flashed Lineage 15.1 using TWRP on my Sony Xperia XZ F8331 and it wouldn't boot. I see in this thread that a special version of TWRP has been put together for Lineage ROMs. I would like to try this version 16.0 but see that the only special TWRP available for download is for the dual SIM model. Can this download be used for both versions of the Xperia XZ?

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Kryshoft:
Hi all, rom works fine (31.08 version), but you gotta flash the rom reboot the recovery and flash magisk then gapps, that worked for me atleast.

And yes, i have the single sim variant of the phone.

TWRP needs to be polished as you guys said, it takes about 10 minutes to boot, same could be said about rom
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Did u do all your flashing on the single sim model using the dual sim TWRP the OP put up or another version of TWRP? If it's different than what was posted, could u link it?

Thanks,

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Kryshoft:
I used twrp that was listed above.

Also camera is broken.

Update: rebooting fixed the camera.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] J.M.Siyath:
TWRP same for single and dual!

XZ dual model has only dual sim & more storage (build prop things) other than single model.

Follow these method What I did :

1. Unlock boot-loader (if you are in locked boot-loader).

2. Flash Oreo 8.0 stock rom for your model(single/dual). (optional if you are from stock)

3. Download TWRP (here) , Los 16 Rom (here), Gapps (here) and Magisk (here)

4. Download the ADB ZIP file for Windows(here).

5. Extract the contents of this ADB ZIP file into an easily accessible folder (such as C:\adb).

6. Move TWRP & Rom to adb folder.

7. Flash TWRP via ADB : "fastboot flash recovery twrp-lineage-stock.img"

8. Unplug phone &reboot to recovery by pressing power + Vol down

9. Wait until TWRP Logo.

10. Wipe > Format > type "yes" > enter

11. Plug phone while TWRP.

13. Copy ROM,Gapps and Magisk via adb like : "adb push <source-path> <target-path>"

adb push C:\adb\open_gapps-arm64-9.0-pico-20200905.zip /sdcard/

adb push C:\adb\lineage-16.0-20200831-UNOFFICIAL-kagura.zip /sdcard/

adb push C:\adb\Magisk-v20.4.zip /sdcard/

14. Now flash one by one in order Rom, Gapps and Magisk.

14.1. If you face any gapps flash error, just reboot to recovery and try again from step 14. or step 10 (if not solve by step 14).

15. Reboot & wait (Phone reboot automatically one or more time no issue).

16. Done!:fingers-crossed:

---------- Post added at 10:38 PM ---------- Previous post was at 10:20 PM ----------

Bugs & lags :

1. PC file sharing not working in TWRP (adb push working).

2. No sound on calling for wire headphone (Bluetooth not tested).

3. Top speaker not working on loudspeaker call.

4. Can't reduce call volume.

4. Every time phone automatically encrypted on first boot after rom flash. (no such issue in los 15.1)

Most liked things :

1. Super battery life i ever see after stock rom.

2. No auto restart on sim change (automatically detect).

3. Stable, Fast & smooth.

4. More customizable.

Thank you [MENTION=8321130]Sjll[/MENTION] for the best stock alternative.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
I finally got it installed....it took a while and I followed the directions to the T but those didn't seem to work for me. The ROM would boot but gapps would put my phone in an endless boot loop. Somebody else posted that they got it working by flashing the ROM in TWRP and then reboot into the recovery (I powered off and manually used the Vol Down key with Power to get into recovery). Once in TWRP the second time I flashed magisk and then gapps and powered off. Everything booted fine then.

Like somebody else said, the speaker phone doesn't work. I also tried to return to my Oreo nandroid backup I had and that won't boot (endless boot loop) and it would not let me re-flash TWRP that seems to be ROM dependent. I also tried to use Flashtool to revert it back to the stock Sony ftf file and got the message that my F8331 phone is now an F8332 device. Now that I have a working ROM on my phone I should be able to change my TWRP to the one that works with Sony ROMs if needed (I'm not sure the ROM would be so stable then) but this Lineage 16 ROM seems stable.

If u get into a boot loop and need to shutdown manually then press Power key, volume up and camera button. Screen shuts down in a couple seconds and phone vibrates but keep holding till vibrates 3 times. Get back to recovery with Power and volume down-hold for 30 seconds and after a good minute or five the TWRP screen shows up.

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] nhicko95:
do you guys think that thermal mod for XZ magisk module will work on this rom?
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] nhicko95:
just notice my camera on LOS 16 is not working i am the only one?
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] J.M.Siyath:
camera working but cannot recording videos.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] nhicko95:
edit:

its working now just need to restart the device
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Check your front camera. Mine won't record the picture (the file is green).

The bluetooth audio gets messed up over time too. Music skips.

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Also the camera app gets buggy over time. After 16 hours the app shuts down right away and won't run. Rebooting the phone usually fixes this.

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] nhicko95:
mine too front camera only take green pictures

mine was fine just some times no audio on MXPlayer just need to switch to SW decoder to make work again
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
I was having trouble with the camera app getting unstable and not opening after the phone was up for 16 hours but I had open gapps installed. I wiped the phone by formatting and just flashing the Lineage 16 ROM from 090120 and that's it-no rooting and no gapps. The ROM works just fine and the camera app is stable, though bluetooth audio remains sketchy as it skips and the selfie camera doesn't work. But if u just want to be able to send email/texts, surf the web, take pictures and make phone calls with awesome battery life then ditch open gapps.

Maybe some apps can be safely sideloaded onto this?

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] elm_bacchus:
You can use F-Droid to install or find apk files instead of gapps. if you want to download googleplay apps. install "Aurora Store" apps in F-droid. Dont log in with your google account you may be banned by google! I choose anonymous option.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Thanks for the tip! It's been a while since I used F-Droid and it's lots bigger now with hundreds of apps and I already installed a couple and Lineage 16.0 remains stable.:D

The Aurora Store app works perfectly using the anonymous account settings. One of the apps I use is apk extractor. I extracted the apk file of all these gapps and put them on my micro SD card in case I need them again.

One thing that this ROM doesn't have is SWYPE for easy use of the keyboard (that's in open gapps). Is there anyway to add the needed libraries to the existing Android keyboard?

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] 2faraway2:
That's one reason why I asked to include the signature spoofing patch to be able to install MicroG ... ;)
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Preferred network type and VoLTE

The reason I installed this ROM is because my cell phone carrier says that my phone will not be able to connect to USA phone networks by the end of this year as 4G gets phased out at the towers here and upgrades to 5G. My provider (Ting) will support VoLTE but the stock Sony ROM does not offer this. With the Lineage 16.0 ROM I now have some new Preferred Network Types available but I don't think any of these are VoLTE (I did search these):

GSM

WCDMA

EvDO

CDMA + LTE

Global

TDSCDMA

The OP says this:

6. VoLTE is supported, but you need to enable it on stock firmware at first.

How do I enable it on the stock firmware first?

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Hirul11:
Error

I want flash stock ROM but error /054/2020 22:54:07 - ERROR - The bundle does not match the connected device can help me..
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
I'm not sure. Which Xperia XZ do u have?

I have the F8331 which is the single sim model. I wanted to go back to stock a while ago and tried to flash it using flash tool but got an error doing that my Xperia XZ is now a F8332 and so flash tool couldn't flash my F8331 with the F8331 software. Maybe use ADB but that may brick things?

I can say that the camera gets undetected at times with this Lineage ROM and your flashlight won't launch and neither will the camera app. The Bluetooth pairing also gets messed up with a speaker as music skips. The BT problem can be fixed by turning off your BT speaker and then back on after a minute and re-pair. To fix the camera, u need to power off the phone for a couple minutes and then restart. Hopefully that makes it work-it did for me. A restart without powering down won't do it.

I have a mostly FOSS phone now as I didn't flash gapps but am using the F-Droid store to get apps.

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Hirul11:
F8331

Delete.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Hirul11:
I'm have F8331 but error when flashing stock ...

I'm install Lineage 16.0 success but the broblem no internet Sim card detect. I had to use wifi. Any ROM

Sorry bad English..
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] jordan851017:
report

1.After flash this rom and then flash stock (use flashtool) it will show "F8332",but my phone is "F8331",anyway it is work fine right now

2.I use TWRP of 3.3.1.0 have some trouble,so i use 3.2.3.0 version,and remember if u cant mount "data",go see https://xdaforums.com/android/general/how-to-fix-unable-to-mount-data-t3830897 ,itsolves!!!

3.After TWRP flash this rom,dont install TWRP app,it makes me stuck at boot!!!

---------- Post added at 02:57 PM ---------- Previous post was at 02:55 PM ----------

do u have try flashtool?it works every times for me
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Bellassamdir:
I have exactly the same issue. I have f8331 and I flashed this rom last month. But there was a problem with my simcard and I cannot use my simcard. Then I wanted to return stock rom but there was an error on flashtool. I cannot flash single sim stock roms. I also tried sony emma and sony pc companion but none of them worked. My phone thinking it is dual sim now and I cannot change it. I just flashed stock marshmallow for f8332 via flashtool and I am using my phone this way like one month. If is there any solution for this problem, I'd really like to hear that. Sorry for bad english...
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] elm_bacchus:
Give a try!

in the TWRP recovery ---->install---->f8331.zip (https://onedrive.live.com/?authkey=...92688B0BB9CEA7F6!614&parId=root&action=locate)

After that use flashtool to install your stock rom f8331.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Bellassamdir:
What is this actually?

Edit: No, Its still not working...
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] elm_bacchus:
(f8331.zip) it should turn back your phone from f8332 to f8331!

Anyway, Before you have attempted flash kind of rom, you supposed to make backup your stock rom f8331 with twrp recovery! ( Take that backup to your pc).

However, I use this rom it seems stable. Battery performance is close to stock rom. (Android 9). (https://xdaforums.com/xperia-xz/development/crdroid-9-0-t4168499)
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Thanks for this file! I was wondering how to get my F8331 back from thinking it was an F8332. You say flash it with TWRP but is it the same special TWRP the OP gave us or is it a TWRP for the XZ-F8331?

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] elm_bacchus:
No need special twrp. https://dl.twrp.me/kagura/

This file doesnt belong to me. in the system/build.prop file was modified to change model name (f8332 ---> f8331). https://xdaforums.com/xperia-xz/development/duality-rom-legendary-battery-beta-t3574300/page4

Anyway, May not work!.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Hopefully it does just let me flash the crDroid ROM u linked which also is supposed to enable VoLTE which is what my cell provider in USA says I will need soon.

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] elm_bacchus:
What I did is...

1. Flashed stock rom (.192). (I believe that doesnt mater your rom is f8331 or f8332. You can use this rom anyway). Shortly, get in twrp recovery and follow the instruction...

2. Flashed twrp-3.4.0-0-kagura.img. ( I have used this version).

3. power + vol down.. TWRP recovery ---> install---> PBRP-kagura-3.0.0-20200728-2027-OFFICIAL.zip " this modified twrp will let us mount data ". (https://sourceforge.net/projects/pb...ura-3.0.0-20200728-2027-OFFICIAL.zip/download) ---->(first) power off

4. power + vol down..TWRP recovery ---> wipe (format-->yes) ...wipe dalvik-cache , data, cache, system. ----------> (second) powe off.

5. (last time) power + vol down..TWRP recovery ----> install ----> crDroidAndroid-9.0-20200926-kagura-v5.12.zip ( https://sourceforge.net/projects/wi...ndroid-9.0-20200926-kagura-v5.12.zip/download) , ----->İnstall --->https://opengapps.org/ open_gapps-arm64-9.0-pico or nano...

6. Reboot . it will take 5-10 min. Also sim card detection will take time to appear. (dont panic).
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] LinuxHippy:
Where did u get the stock 192 ROM and what format is the file? The stock I got was .ftf file and needed to be flashed with flash tool software that would not work because it detected that my phone was F8332.

This is what I downloaded. It's a zip file and when extracted the ftf file is in the firmware folder.

https://drive.google.com/uc?id=1TBnL0CSkY0BfzltZdsO3ZcGUP53qLa0c&export=download

Can I just flash the zip file in TWRP?

Marty
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] elm_bacchus:
Use flashtool ----> http://www.flashtool.net/downloads.php

This youtube video can help you, how to use flashtool and download xz firmware. https://www.youtube.com/watch?v=QpUzQSPEnzM

if you try to flash f8331 .192 stock rom , you may encounter error because your phone model name was changed to f8332.

As I have said before crdroid rom can work either single or dual xperia XZ model . Doesn't matter your phone model was changed to f8332. it should work fine.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] lumosimann:
Not sure how I got to that point, but after installing Lineage, it always shows me dual sim OS. SIM card also doesn't work.

How can I get a F8331 firmware back? I also tried to install a f2f file for F8331 using FlashTool, but there I get an error:

03/032/2020 01:32:16 - INFO - Current device : F8332 - CB512EQ7XU - 1306-8087_GLOBALDS-LTE3D - 1306-8087_41.3.A.2.247 - GENERIC_41.3.A.2.247

03/032/2020 01:32:16 - INFO - Closing TA partition

03/032/2020 01:32:16 - ERROR - The bundle does not match the connected device

I know this is not F8332, because it is single sim.

Any idea how I can get my phone back to F8331?
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] lumosimann:
OK here is how I managed to revert to stock image:

1. Flash this kernel: https://mega.nz/folder/iZYgkJ5I#GAZZW_uFltUPiL_TvDY84w/file/adwgVIDQ using fastboot (fastboot flash boot KERNEL_F8331_41.3.A.2.192_CLEAN.img)

2. TWPR sideload this project: https://xdaforums.com/xperia-xz/development/xplayztation-frago-t3504411 (this is for F8331 only, so *don't do this on F8332*, otherwise you are stuck with F8331).

3. Install stock image with flashtool.

(2) is needed because otherwise you canot use flashtool because it complains about an incorrect device.

[MENTION=8321130]Sjll[/MENTION] Is this OS supposed to work for F8331? I always get a F8332 OS from here, and there, my SIM card does not work. If this is not supposed to work, could you clearly indicate this in title?
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Bellassamdir:
I really thank you. I finally flashed my f8331 stock oreo via flashtool. It worked very well. I really appreciate that. After 2 months I feel like champion :good:

And I won't try any custom ROM for F8331 anymore. I tried so many of them and every one of them has different issues. Planning to return Stock Light ROM.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Hirul11:
Thank you all..flash back rom to android 6 problem solved ..if still having problems change windows.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Lanphong:
Thank you. But I got an error while calling the video. There is picture but no mic is not working

Is there any way to fix it?
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] tester444:
Thanks, good Rom

My device F8332 /MENA

1) It didn't work for me using official stock Rom, not even any ROM in this forum, I tested around 10 Rom's.

Solution: I used a modified one from "samsony dot net"

2) After booting into TWRP using "VD+Power" it didn't accept to install the OS nor the GAPPs, I tried a lot of combinations several times.

Solution: While inside TWRP I choose "Reboot" then "Recovery", it reenters TWRP again then I installed the OS and GAPPs smoothly. I don't know why but it worked.

3) After entering the OS it detects the SIM easily and fast.

4) It gives an alert about SE Linux, I couldn't fix that just stopped the alert

5) The camera didn't work but it worked after I installed "Open Camera" then restarted the phone.

6) SD Card is not working after I clicked "Format" the SDCard option in the setting crash immediately until I remove the SD Card.

7) Google Play crash while searching inside it or navigating in it.

8) Os Crash two or three times during use only for about 4 hours.

9) Battery life while using the phone is less than the Stock ROM.

10) Battery life while in standby is better than the Stock ROM up to 1000%, yes thousand percent better.

Thanks hope you can make it more perfect with the above information.

Great work thank you
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] tester444:
Additional Usage Notes:

1) The device is not detected as Sony Xperia from Sony Apps, Ex.: Xperia Transfer

2) Some pre-installed Apps are not accessible but discoverable from the settings search, Ex.: Profiles Trust Provider, Wallpapers, Live Wallpaper picker.

In two days of testing the Rom I got:

1) Three times System UI isn't responding.

2) Two times Sim disappears.

I will try to keep it up to date if I found any new notes.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] hewki98:
Could I use this ROM for XZ 601SO Softbank
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] reytzjourney:
could i use this rom on xperia xz docomo so-01j?
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] &(*):
Only if your bootloader states it is unlockable.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] &(*):
@Sjll

Would you be willing to make an XZs port of this build? XZs roms are rather limited considering the only variety is Treble, which is quite buggy. I know that most of this will install without much fuss (exception being the camera being 23mp and XZs' being 19mp). Would appreciate some other option for XZs.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] star__dust:
I have flashed new lineage-16.0-20210108-UNOFFICIAL-kagura.zip.

İt works fine but I didnt test everything. There is new kernel 4.4.xx instead of 3.18.xx .

I liked it.

Thanks for your effort. Sjll
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] 2faraway2:
Are you on dual (F8332) oder single (F8331) ? The download site says it's for dual ..
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] star__dust:
Doesnt matter your phone is single or dual this rom will work but know this. if you install this rom your single phone model will be turned to F8332 model. So, you wont able to reflash your F8331 phone to original single rom model because during the flash you will be warned that you phone is F8332 model not F8331 model.

By the way, as I said my phone model is f8331. I use this rom.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] makishart:
Hello, thanks for this release! Phone runs smooth and looks updated. Issues on this release is the small delay on boot for the sim to recognized then today I have issues with microphone and head speaker.. I already had a normal phone call yesterday but today I have issues with mic. I update on today's release and wipe dalvik and issue changed a bit. So when I get a phone call I cannot listen the other side but the other side can listen to me. On headphones the same and also can't be heard by the other side.... I run on a F8331
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] star__dust:
I have finally tested couple things special about camera.

1. Front camera or back camera works but when you take picture camera apps close itself. İf you try to take piciure 2-3 times then phone resets itself.

2. Video record works you can hear sounds again app close itself.

3. When you plug headphones jack, you cant hear any sounds. it seems during the whatsapp call other side can't hear you!.....
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] makishart:
You are correct my friend.. Camera is broken too..! After I realized that I went to recovery, wipe dalvik and cache then flash the 3/1/2021 version and reboot.

Camera is working again and tried normal phone call and works too.. I don't know what if I try social app call or using headphones.. Don't want to break it for tonight..
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] star__dust:
I have tested new lineage-16.0-20210109-UNOFFICIAL-kagura.zip rom.

1. Front and back camera works and takes picture and video record. During taken pictures once time front camera app closed itself .

2. You can hear sound from headphones! it works.

3. I have call hearing problem! when someone calls me I cant hear person but that person can hear me. I have encountered once time phone reset issue.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Xerton:
+

Flash light turns on successfully but phone crashes and restarts when i turn it off. I just tried it on quick access menu.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] Spingar:
THIS IS THE BEST ROM I'VE TEASTED.

The battery life is toooo crazy, and the fingerprint works fast (really,really fast). The rom uses correctly the RAM, dont heat, i played some games, better than stock. The one problem is camera, I can install a Open Camera,but I didnt found the settings to get working the GCAM. Is the only problem.

Tested the last versión to today:

"Lineage-16.0-20210109"

gapps micro.

Magisk 20.4

Un that order Ive Installed.

The steps given by J.M Siyath worked for me. Is the first time I can install a ROM.

Sorry for my weak english, I speak spanish.
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] makishart:
Yes, it is definitely the best rom but only if you don't want to use your phone for video calls...

Sadly our device is not supported at all by sony and not much from open source devs community.. Only one to blame is SONY... After I tried all the amazing ROMS in here I eventually went back to stock to have a more functional phone.. I am sad about it though because that device is working really well on stock and performing 2x on a custom ROM.. Still companies wants us to waste our devices and buy new ones to waste them in 2 years also.. What a **** world to live in...
[Sony Xperia XZ ROMs, Kernels, Recoveries, & Other ] SamBadyl24:
How you actually revert back to stock ROM. I am trying with Emma, it recognize phone, download firmware, start flashing and after few percent it says completed but still on LineageOS