yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
LineageOS 16.0 for Sony Xperia XZ1 Compact

[IMG="LILAC01"]https://xor.cryptomilk.org/android/lilac/LineageOS_16.0_Trebuchet.png[/IMG] [IMG="LILAC02"]https://xor.cryptomilk.org/android/lilac/LineageOS_16.0_Trust_Settings.png[/IMG]

RELEASE

This is an alternative ROM for the Sony Xperia XZ1 Compact. It offers several privacy features and F-Droid App Store preinstalled. If you're coming from LineageOS 15.1 you can simply update! No need to wipe anything.

FEATURES

Signed with dev keys

FDroid preinstalled

FDroid Privilege Extension

Well tested but some bugs maybe included

DOWNLOAD

You can download the latest release here. Check the ChangeLog below for firmware requirements!

INSTALLATION

Put the zip file of the ROM on you sdcard or internal store and boot into recovery. If you use my TWRP recovery, you should use that one to flash the ROM.

Make sure you select Zip signature verification.

This will make sure the zip file has not been altered!

KNOWN ISSUES

NFC is not working yet

Phone doesn't work well with Mifare NFC tokens

IMS does not fully work for some carriers yet

XDA:DevDB Information

lineageos_16_sony_lilac, ROM for the Sony Xperia XZ1 Compact

Contributors

modpunk, derf elot, myself5

Source Code: https://github.com/cryptomilk/android_device_sony_lilac

ROM OS Version: 9.x Pie

ROM Kernel: Linux 4.x

Based On: LineageOS

Version Information

Status: Stable

Current Stable Version: 1.2

Stable Release Date: 2020-02-11

Created 2019-04-28

Last Updated 2020-02-11
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
SECURITY ADVICE

Don't flash ROMs or Magisk modules which set SELinux to permissive or you welcome malware on your device!

UPGRADE LINEAGEOS

If you're running LineageOS 15.1 you can simply flash LineageOS 16.0, upgrade the firmware for modem etc. and be done. There is no need to wipe the data partition, just clean dalvik and cache after updating LineageOS.

UPGRADE FIRMWARE

Grab the Sony Stock firmware using e.g. XPeriFrim. You should always flash the firmware matching the LOS build.

Grab newflasher and put it in the same folder as the firmware files.

Read the newflasher original post on XDA for general instructions!

Remove the follwing from the folder so they won't get flashed:

all *.ta files (keep the one in the boot/ directory)

cache*.sin

fotakernel*.sin

kernel*.sin

persist*.sin

system*.sin

userdata*.sin

vendor*.sin

Turn off your phone

Hold the volume down button and attach it via USB to your system till you see LED turning green

Run newflasher from within this directory to flash the remaining files

You can say yes to the first optional step, in case you dont have working drivers installed.

Skip the second optional step (dumping of trim area), it's useless if your bootloader is unlocked already and takes a long time.

How to get root?

Flash the su addon from LineageOS you can find here: https://download.lineageos.org/extras

Google Apps

You can download and install the Google Apps from opengapps.org. You need ARM64 and 9.x. I suggest to *always* use the pico package. If you need additional apps you find them in the Play Store.

Privacy Guard for GApps

I wouldn't run GApps without Privcy Guard. Here is what you need to do:

Go to: Settings -> Security & location -> Privacy Guard

Open the advanced menu (3 dots) and select: Enable by default and Show built-in apps.

Search for Google Play Services and turn it on by tapping the entry. A long press will give additional options. There are more Google Apps you should turn it on and revoke permissions like the syncing stuff.

FDroid

This ROM comes with FDroid and the Privilege Extension pre-installed.

MicroG

This ROM doesn't support Signature Spoofing. However we are watching MicroG and check if they provide newer builds e.g. for Android Pie.

Simple Mobile Tools

This is a collection of really awesome Open Source and AD-free Apps! Don't get confused by the name! Especially the Calendar and Gallery app are really good! If you like his stuff, support him by buying the Simple Thanks app.

You can find them in FDroid and the Play Store.

Known Issues

Some apps don't work (Gardenscapes, Die Zeit, ...)

When an app is installed then it should ask for Permissions on the first startup. However for some apps this doesn't happen. To fix it you need to go to Settings -> Apps & Notifications -> See all apps -> Select the App -> Permissions. Now manually activate the required permission, normally the Storage Permission is missing in that case!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
REQUIRED FIRMWARE: 47.2.A.11.228

CHANGELOG

2020-02-11 | 1.2 | 47.2.A.11.228

Fixed issues with storing app data on sd card

2020-01-30 | 1.1 | 47.2.A.11.228

Update to kernel 4.4.213

2019-12-15 | 1.0 | 47.2.A.11.228

Update to kernel 4.4.206

Updated FDroid

2019-11-18 | RC6 | 47.2.A.11.228

Update to kernel 4.4.202

Added FlipFlap cover support

Updated FDroid

Fixed tethering issues

2019-10-18 | RC5 | 47.2.A.11.228

Update to kernel 4.4.196

Fixed FDroid permissions

Fixed application pinning

Moved to stock audio hal

Updated vendor properties

2019-09-18 | RC4 | 47.2.A.10.107

Update to kernel 4.4.193

Added WFD support

Fixed issue with NFC

Several cleanups in the device tree

2019-08-14 | RC3 | 47.2.A.10.107

Fixed random reboots (bad CAF kernel patch)

Fixed perf service and power HAL

Fixed issue showing white sony logo for too long

Fixed NFC

Fixed live display issues

2019-07-08 | RC2 | 47.2.A.10.80

Enabled bokeh mode in Snap

Fixed bluetooth issues

Fixed IMS

Fixed irq balancing

Updated kernel to latest version

Updated Android to 9.0_r44

2019-06-11 | RC1 | 47.2.A.10.62

More power efficient Kernel build

Added Sony Camera App

Improved wifi support and enabled some features

Fixed UFS firmware updates

Fixed brightness levels

Fixed some random reboot issues

Fixed some video issues with netflix

Fixed system permission issues

Fixed airplane mode

Fixed adaptive display issues

2019-04-29 | RC0 | 47.2.A.10.45

Initial release
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] DerSteppo:
YES!!! I am so excited about this moment that I want to have sex with it!

Quick question:

Any chance there will be a version without FDroid? (or, can it simply be uninstalled?)

You guys are the best!

EDIT: removed stupid question
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] danish0175:
[MENTION=4297219]modpunk[/MENTION]

Hey, I don't wanna trouble you but i have alot of problem with internet connectivity and slow connection can you upload the required firmware files in zip ,I will be really grateful and wouldn't have to spend all my time downloading the whole fw

Thanks in advance
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Hrelativity:
thank you！

Can you upload on Androidfilehost？

And I can’t download this file
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] beggar23:
For now, this thread is only a placeholder. A preparation for the "XDA-official" release of LOS16.

Edit: Ha ha, RC0 released already. Download problem solved then.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
RC0 released ...
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] mcgi5sr2:
If you coming from stock don't forget to update to latest TWRP 3.3.3 and also to mount system and advanced wipe it. Working really well on this end thanks for the great work devs
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Val81:
I'm very happy lineageOS 16 is ready! I will flash it when I know more of its battery drain, stock Android 9 sucked a lot in this when I upgraded my phone and I decided to go back to Oreo (lineageOS 15.1,that's better!)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
Just added back the stock camera and addons. Everything seems to work fine.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] beggar23:
May I ask, which stock camera you are referring to? Stock Sony or stock LOS?

Thanks!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
Sony stock camera, including (super) slomo, etc.. The LOS one was included already.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] mcgi5sr2:
Blowing my mind [MENTION=4292697]Derfelo[/MENTION]t . FYI running the extract-files.sh script leads to lots of files being irretrievable. Using the cryptomilk repos, will try pulling from the un-sin files today or tomorrow.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] beggar23:
Brilliant! Already included in download-ready RC0?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
Yes, only the pinned files are in the vendor repo as usual. You need to unsin and extract ramdisk/system/vendor from stock and run the script on that.

No, it'll be in next release.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] HeavyMoertel:
So, it doesn't work well for me.

I came from 47.2.A.10.45 stock (unlocked bootloader), wiped the system partition, installed it and it boots fine.

Then it struggles to get any mobile data (T-Mobile DE), before that the Gapps first installation wizard won't look for Wifi.

After that it loops at "Setting up..." until the screen gets brighter and hangs itself completely.

Not sure if I borked something beforehand or the Gapps 29. April 2019 is borked.

Probably the first option.

Sadly, I can't provide any logcat.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
i am relatively sure that you need to format data (not just wipe) in twrp if you come from stock. so you need to backup stuff from internal storage and use titaniumbackup (or similar apps) to backup app specific data.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] HeavyMoertel:
Yeah, that's what I did.

Format data, wiped /system for good measure. Still acting iffy.

I'm considering downgrading to stock 8.1, go LOS15.1 and upgrade from there.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] arnaubvendrell:
A couple of questions

Hi everyone. I'm currently on AOSP Extended 9.0 on my XZ1 compact, since Lineage wasn't avaliable then. Now, I don't know if i should do the change to this rom again.

First of all, are there all the customizations of AEX? there are a lot of them, and they work really well, so it woud be sad to loose them.

Second, in EAX I'm having problems with the camera, since the AEX stock sucks and any other app is not working, presumably due to no support for Camera2 API Level 3, only Legacy or (installing a mod or two) Full. Could anyone confirm me if LOS 9.0 Suport Level 3??? It's pretty easy to know, you only have to download Camera2 API Probe from play store . It would help to change my mind ;) !

Third: your opinion!!!

Thanks to all the work, and the answer (I hope)!!!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] piola:
I'm sorry but I think it is the ROM's fault because this problem has existed already in Lineage-Oreo and on the other hand, it has been solved with Stock ROM about half a year ago.

The problem is not that Apps cannot write anywhere to SDcard for which they would need StorageAPI permission, but that they cannot write to their own private data directory!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] neutrinobox:
i testet Lineage yet...

it runs smooth and fast but voive notes are very quiet. It sounds like there is no Audio processing ...

Thats not so cool for me because i use voice notes very often .

What now... asop testing.... waiting..... back to hungry stock pie ?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
I'm happy to review patches. Best send them to LineageOS if you know how to fix this.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] kugel.:
[MENTION=8562650]sieghartRM[/MENTION] suggests it's not a general LOS issue but specific to our lilac port (see post #184), what do you think about that?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] piola:
This is what has been described in the sonymobile forum:

The problem seems to have been resolved between June and September last year.

If it helps:

This is also my observation. You can copy an app's data from its location in internal memory to this location on the SD card and (as far as they don't write anything anymore) they can use their data as expected. But they fail to write anything to this location. I observe that the OS creates their folder and subfolders "files/" and/or "cache/" but doesn't allow the app to use them.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
I'm not interested in descriptions. I want patches which really solve this. There are none which will be accepted in AOSP or LineageOS. If stock hacks in a way to give broken apps permissions then stick to stock. LineageOS is a great Android version because it doesn't do stupid hacks.

The way to fix this is that the App use the right API provided by Android to store data on an sdcard. See OpenCamera.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] piola:
Some of the apps that are affected are very popular. If they didn't use the "right API" there would be thousands of bug reports as they wouldn't run on any Nougat, Oreo or Pie. Obviously this ain't the case.

So do you really think that it's the fault of these apps?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] _that:
It looks like the app developer documentation contradicts the device developer documentation.

https://developer.android.com/training/data-storage/files.html#MultipleExternal says:

...and a bit further up on the same page:

So as an app developer I'd assume that this also applies to the results of getExternalFilesDirs() and that my app can write files to these locations without any special permissions. I haven't written a test app to check what LineageOS returns for this API though.

https://developer.android.com/refer...t.html#getExternalFilesDirs(java.lang.String) confirms: "Shared storage devices returned here are considered a stable part of the device, including physical media slots under a protective cover.".

On the other hand, https://source.android.com/devices/storage/traditional says:

However it also says:

So even if the SDcard is considered a "semi-permanent part of the device", it is now considered "portable"? That doesn't make a lot of sense to me.

One thing that I found is that this commit changed the fstab line for the sdcard: https://github.com/cryptomilk/andro...mmit/73e044af7fb6217c97747e44700946fdbc30d0a7 which may or may not be related to the observed behavior.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] 7gue8a:
Upgraded from 15 to 16 RC1.

Everything works just fine (NFC does not as advertised).

Thank you devs!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Val81:
I've just installed lineage 16 and, even if I installed opengapps package on twrp, I haven't Google play store and I can't install any app! I trust in your help to solve this situation, thanx!
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
did you install opengapps right after the ROM or did you reboot in between? I don't know if this is still a thing, but it used to be necessary to flash it right after the ROM without a reboot. I've stuck to that habit ever since.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Val81:
I haven't rebooted! I just installed opengapps with the ROM! Do you suggest to flash all over again rebooting in the middle to solve my problem?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
no, I was suggesting the opposite, but looks like you've already done that. other than double checking that you downloaded the right version (9.0, arm64), I don't know what the issue could be. maybe a bogged opengapps version? you could try an older one.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Val81:
I installed open_gapps-arm64-9.0-pico-20190608.zip.

Reinstalled opengapps and the ROM and I've working play store now! :D
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Uusername:
just flashed my new phone with this latest CM release, but it seems that the main menu button is missing! instead I have a contacts button and no way to open any other app than the ones that are on the main screen (actually none as I instantly removed all the clutter from the main screen).

How should one get this button back? I tried flashing the ROM a second time but that didn't help..

(By the way, I had to install another browser on my PC as I was getting an error about some image verification that was not correct , even when there was no question to verify anything! For what it's worth Internet Explorer also didn't work, and logging in to this site is a drag, it took me over half an hour just to be able to write these 5 lines)
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] nussbaum:
Try a swipe up. Use other launcher (e.g. from fdroid) if you really need a button to access all apps.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] ddup1:
Xperifirm let me download 47.2.A.10.80 for my country ? Is it good for installing LOS ? Firmware required is a minimum or strict version ?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] danish0175:
[MENTION=4063475]derf elot[/MENTION] , hey man , I'm sorry for this Request cus its seems I'm the only one making but I know it helps a lot of people, can you always upload the firmware files together (on Androidfilehost) with lineage os e.g 10.80 for RC2
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] beggar23:
Well, it would support updating LOS while being on the move and not having access to a PC.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] derf elot:
I'll try to upload them tomorrow. just out of curiosity, how would you flash the files without having access to a PC? I know newflasher can be run on a phone, so with a second one it might be possible, but I've never tried this.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] beggar23:
Good question. Initially I thought of a flashable zip, but while thinking about it once more, this would be hard to accomplish, probably.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] danish0175:
Thank you very much
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] ddup1:
Hum, just run newflasher as describe in first post, but firmware was not updated. Any advice ?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] danish0175:
[MENTION=4063475]derf elot[/MENTION] what I'm saying ,I don't know if its too much to ask for, is if you can create a thread to post these firmwares files when new firmwares by Sony are released. If [MENTION=4063475]derf elot[/MENTION] can't always update it others who can also update it there
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] ddup1:
Think firmware was updated well. I dont know how to check this ? Was looking for build number in system preference, but that is not firmware version i think.

PS : LOS seems to work well, thank a lot for the hard work.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] nussbaum:
Press "Android version" in "About phone", see "Vendor security patch level" or "Baseband version".
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] kai ming:
Thanks for the rom modpunk, but i have some charge problems. It charges when the screen is off, but if i use the phone the battery does charge but at low mah (Tested ampere app). Battery dies when using.

i did not do firmware update, but in about phone it says lineage_lilac .....

Do i need to do firmware update or is it too late to do that? Because i flashed already lineage 16
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] Lemmiwinks86:
Format SD as internal

Thanks a lot for the hard work!

I have just one problem. Normally there is an option to format a SD card as internal storage. This option is simply not available. There is just the option for a normal format.. Has this option been disabled for this build? (Using RC1).
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] :
That was a bug that recently got fixed. Now it gets around 210.000 points.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] modpunk:
We looked into it but that would require a lot of kernel work to support it.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] scamix:
I have probably found a workaround.

The trick is completely wipe the sd card. To do this I used minitool partition magic, but any other format software should work.

Right click on sd, make "delete all partition" and "Apply" (These texts could be different). The partition tablet is MBR, I don't know if it's influent.

Put the sd in the phone and go to storage setting. The SD is now marked as "unsupported". Tap on it and tap on "Configure".

At this point you have to tap "Annul" (To be clear, you don't tap "Format sd card") and select "Use as extra memory" (no "portable memory"). Now you can easily follow the remaining steps.

This solution is not well tested but i can confirm that is possible to migrate app on SD and it's work even after a reboot.

There is probably a bug that show the sd half full but with double the capacity. (If sd is 64 gb it show full 64gb on 128gb).

Sorry for my english and keep in mind that all the texes may vary because my phone is not set in english.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] nussbaum:
Nice, could you please check if the SD is encrypted too when inserted in a (linux) computer?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] scamix:
I think so. Debiam mount only an 17mb partition and Gparted show "android_expand" as "unknown" file system.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] kai ming:
firmware update or not

lineage rom rc1 works, but do i need to do a firmware update with xperifirm? Everything works, only charging have problem with screen on time. I have quickcharger 3.0 . It charges when screen off. It also charges when screen on but the battery drains.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] nussbaum:
Quick charge works here with firmware FW_G8441_Customized+DE_1310-4373_47.2.A.10.62_R3C.zip from this forum, just checked with usb multimeter, no difference if screen is on or off. Around 7.5 V at 1.5 A.
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] DerSteppo:
Does the standard phone app automatically erase all entries from the speed dial page once in a while? I am wondering why the page is always empty after a day or so. I haven't saved any favourites manually, but I remember that the last contacts that I called would be there. Call logs are saved in the call history, as usual. Is it just me or regular app behavior?
[Sony Xperia XZ1 Compact ROMs, Kernels, Recoveries,] drissie:
A bit of a random question, bear with me please. I have only ever had a Windows phone and I am stubbornly holding on to my Nokia Lumia, but it is really starting to struggle now with the lack of support. I don't want an iPhone, but I'm not a fan of the Big brother habits of Google, so I was looking for something with more privacy and my husband has an old Xperia XZ1 Compact I can use, so I ended up here. Assuming I have next to zero technical knowledge, what are my chances of installing this ROM without messing stuff up or even bricking the phone? I am happy to read and follow tutorials etc. but bear in mind I really know nothing and have never used Android, so I probably won't even be able to recognise if something has gone wrong. And even if I manage to install it correctly, what would be the long term implications - I guess I'd have to go through the same process for every update, e.g. LOS 16.01 or 17 or whichever else comes out in the future, thus having more chances to get things wrong? And I would have to check proactively if there is an update available, rather than the OS prompting me? Would it also be the same with updates for apps from F-Droid or ones where I've just downloaded the .apk file from a website? Would I be better off (i.e. safer) sticking with stock Android and trying to de-Google it as much as possible?

I'd really like to give LOS a go, I just don't want to brick the phone...