/e/ Build for Sony Xperia XZ1 Dual Sim - G8342

Given Sony’s development-friendliness, I was curious whether this device might be a good candidate for /e/, and asked @petefoth about it earlier today.

Although Sony didn’t certify it for VoLTE in the U.S., which will soon make it obsolete here, it could still be useful for international travel, for example.

I see at least one LineageOS dev has been creating unofficial XZ1 builds (latest is 18.1):

I think this is the dual sim version:

Does anybody here have one of these running LineageOS already?

I’ve had a quick look at the available source for this ROM and there is one small problem: this developer does not store all the proprietary vendor blobs in their github android_vendor_sony_poplar_dsds repo. Instead they rely on having a device available during the build, and run the extract-files.sh as part of the build.

I don’t have one of these devices, so I can’t do that. Instead, I would have to try extracting the vendor blobs from one of the LOS zip files. I know that is possible, and I could give it a try, but it will take me a while to get it right :slight_smile:

It would be easier if there is someone who owns one of these devices who can either make the whole build, or build as far as the extract-files.sh stage then make the extracted bolbs available in a git repo somewhere accessible.

1 Like

Understood, thanks. I wouldn’t say that this is a high priority, unless more users here want it, or if someone else provides the blobs to make it easy.

In any case, I guess it would only be useful for a limited time before 3G networks are shut down everywhere… unless VoLTE can somehow be enabled in a device that apparently never had it.

Thanks for looking into it!

The other day I pulled another of my old Sonys, the 2014-era Xperia Z1 Compact, out of the drawer, lamenting the fact that it was still full of “spyware,” even with as much of it disabled as possible on stock Android.

This phone was stuck at Lollipop, it has no VoLTE (so can’t be activated in the US), the micro-USB port is loose, and the frame is cracked from the time I opened it up to replace the battery. So, I thought…why not use it for “target” practice?

To my knowledge, there’s no /e/ build for the Z1c, so I went to XDA Developers Forum, found a LineageOS 18.1 (Android 11!) build with the latest security patches, some privacy adjustments, and micro-G already incorporated, and gave it a shot. I’m still evaluating it, but all seems to have gone well. (This is only the second time ever that I’ve converted a stock Android to a custom ROM.)

This resurrected phone can now be used for:

SIP calls over WiFi
SIP calls over mobile network, with use of a data SIM or travel SIM, etc.
FM Radio
Internet Radio
Playing stored music
Browsing the web
Checking Email
Signal Messenger
Camera (It lost the Sony camera app, though.)
…and more.

Thank goodness Sony makes it easy to unlock their phones. And this wiki is easy to follow: Install LineageOS on mint | LineageOS Wiki

Still looking for a custom ROM for the XZ1 G8342, though, if anybody has a recommendation. :slight_smile:

(My main device is an XZ1 Compact with /e/OS.)

Are you sure the model number you have given (G8432) is correct? There are a number of ROMs for XZ1 on the Sony Xperia XZ1 ROMs page at XDA Forums. Most of them seem to support several variants - poplar (G8341), poplar_dsds (G8342 which is suspiciously close to G8432 :slight_smile:) , and poplar_canada (G8343)

If those ROMs will work with your device then I think there are two which would be interesting

  1. The Unofficial LOS 18 ROM. They guy who made this also made the unofficial LOS ROM for XZ1 Compact which my /e/ ROM is based on. A couple of problems with it - a: it doesn’t support signature spoofing so microG will be limited and b: the most recent build is from January, and development seems to have stopped.
  2. The iodéOS ROM. iodéOS seems to have very similar goals to /e/, and seems to be built in a similar way - LOS + degoogling + MicroG + adblocker. The only problem - and for me it is quite a large one - is that not all their code is open source (yet). They say

About our sources:
We completely agree that transparency is at the core of a privacy-oriented project and we will (no ETA) open source our code.
We will publish them when we consider it is the good timing. We have many features that remain to be done, we have to clean up the sources, and we want our work to be more known before doing so.

If I owned one of the phones that they support, I would be tempted to install it and see what it’s like. I look forward to the day when their code is open and I can try building it for the phones I do own :slight_smile:

Good luck!

1 Like

I should have written G8342; fixed it. Thanks.

Yes, I looked at those, too. I have the same reservations as you about the iodéOS build, but it does look interesting. I’ll definitely keep track of their project. (And they don’t yet support the dual SIM model.)

As for the unofficial LineageOS 18 build, I’m guessing I don’t really need microG, as I typically avoid applications that depend on Play Services. (Unless I’m not considering something I should…?)

Also, you had mentioned vendor blobs in answer to my OP. Apart from loss of the Sony camera software, what else might that affect?

Good question, and I don’t really know I’m afraid. Anything to do with device specific hardware I guess, and possibly other stuff?.

If you look in the file proprietary-files-vendor.txt for a specific device, you will see the files that the extract-files.sh script tries to pull from a connected device (or a custom ROM). For XZ1 Compact lilac you see stuff to do with graphics, audio, media playback, bluetooth, DRM, fingerprint sensor, NFC, all of which is likely to be connected to proprietary bits of hardware.

It’s a bit of a nightmare to be honest: flailing around with vendor blobs is what is holding me up in making an Android 11 / R build for lilac. I made one build - v0-18 - which ran but the setup wizard kept crashing. Stupidly I didn’t keep the vendor\sony\lilac directory, the v0.19 build doesn’t boot, and the v0.20 build doesn’t build.

Life is much easier when the person who makes a ROM puts all the vendor blobs in a git repo somewhere public, like the guy who makes the unofficial LOS ROMs for Z5 Compact suzuran :slight_smile:

1 Like

Hmmm… I see… (figuratively).

But does he LOS build contain everything necessary, apart from the listed disclaimers, or is it so hobbled it won’t be worth it to me?

In any case, this will never be a primary communication device for me, due to the lack of VoLTE in the US, so it doesn’t matter all that much. I can install and check it out just for my own interest.

It will have all you need, including in the areas I mentioned, because all the vendor blobs are present in the ROM, on the device. The problem is only for people building ROMs who have to spend time and effort trying to extract the files from the ROM or the phone rather than just picking the files up from a git repository.

1 Like

Thanks for all the information! I’ll probably take it for a spin soon then.

P.S. I would volunteer as iodé “guinea pig” if they had a build for the dual SIM version. At least their work is “based” on open source, although not 100% yet.

A couple of posts in the iodéOS XDA thread indicate that the iodéOS ROM will run on the dual SIM version, though this post suggests you may need a different recovery, possibly this one (linked from the first post in the LOS 18 ROM thread)

1 Like

Interesting. I might try the iodéOS build, then.

Can you clarify a couple of things for me?

  1. Can TWRP restore the original Android 9 OS if I have installed a Lineage or iodé Android 11 build?
  2. If I install the iodé build first, can I then wipe/format and flash the Lineage build over it?
  3. Since some posters have reported some minor issues (and loss of the Sony camera app) with LOS 18, would it make sense to install the 17 build, which doesn’t have those issues?

(Although 17 might actually have some bugs as well…)

I don’t think so, but I may be wrong there - maybe you can do a TWRP backup of the stock Android 9 before you install anything. In not, the XDA threads have details on how to use Xperifirm and newflasher software to reinstall stock firmware.


That depends. Sony camera apps have a good reputation, possibly because of Sony’s long involvement with digital phones from well before the smartphone era. But the camera apps which ship with custom ROMs aren’t usually bad. If you really use the camera a lot, and care about image quality and advanced camera functionality, then maybe go for the LOS17 build. But it may not get the same love from the ROM developers as the 18 build, so it may go out-of-date quicker. You can always try both out. It is possible to 'downgrade` from Android R / LOS 18 to Q / 17, though you will definitely have to wipe and format.

1 Like

Awesome, thanks Pete. Hopefully today or tomorrow I’ll start my experiment. I really appreciate all your guidance.


(1) I’m now on the LOS 17 build, and oddly, wifi consistently indicates no internet after connecting to my home network, although mostly I do have internet, while the tray icon says not. I thought when it wasn’t connecting that it might be an issue with my Pi-hole setup, so I restarted that, which is maybe why wifi works now; but I don’t know why the phone tells me it’s not connected. I’m able to browse the web and install from F-Droid anyway. (And this is with the mobile network off.) Just a bug?

I tried LOS 18, but the wifi issue seemed even worse, so went back to 17. I’ve also formatted and reinstalled 17, but that didn’t correct anything. All other functions seem to be working so far.

(2) I will probably try the iodéOS build at some point. Right now I can’t figure out how to verify the authenticity of the file.

(3) I also ran into this error during the TWRP/LOS install:

x@x:~$ adb reboot bootloader
x@x:~$ fastboot devices
x@x:~$ fastboot flash boot twrp-poplar.img
target reported max download size of 536870912 bytes
sending ‘boot’ (33860 KB)…
OKAY [ 0.891s]
writing ‘boot’…
OKAY [ 0.306s]
finished. total time: 1.197s
x@x:~$ fastboot reboot

finished. total time: 0.050s
x@x:~$ adb push twrp-poplar.img /sdcard
twrp-poplar.img: 1 file pushed. 30.5 MB/s (34672640 bytes in 1.083s)
x@x:~$ adb shell
dd if=/sdcard/twrp-poplar.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTA

dd: /dev/block/platform/msm_sdcc.1/by-name/FOTAKernel: No such file or directory

Ultimately, I just unplugged, went to TWRP, and did the format/install, and it worked.