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

[Unofficial] LineageOS 18.1 for D6633 Xperia Z3Dual

Search This thread

Mahmaod Rad

May 22, 2021
Correct, no errors on flashing to recovery!

I had flashed TWRP previously to root and unlock the bootloader.

So I just flashed to boot instead of recovery. That worked and I can boot into LOS recovery now. Following Mahmaod-Rad's instructions, I then tried to sideload the LOS4µG rom, but then I run into the same problem zpunout had earlier:
"E3004: This package is for device: z3; this device is Z3dual."

So, I'm clearly missing something! I'm sorry, I may be over my head on this (previous experience is all Samsung and like ten years ago). I had thought it was possible to flash the LOS4µG and then edit build.prop and replace the modem files from stock. I have no doubt that @Mr.Tom_Tom's unofficial would work, but microG is the goal for me. I've de-googled an otherwise stock MM D6603, but for my new Dual D6633, I was hoping to keep this install as clean as possible with LOS4µG.
For the error you have to edit the rom by
Unzip it and open
Meta-inf/com/google/android/update -script or update-binary
And look to z3 and edit it to z3dual and rezip the file and flash it
For the recovery i froget that when you flash recovery to boot the stock rom will brick and not will boot
  • Like
Reactions: pi r


Sep 17, 2013
No, I am sorry... I'm to tired, confused and don't remember.
Please forget my previous post.

LOS4µG don't need Magisk. That's the point of using it. But as you noticed it is built for Z3 D6603 devices. Just as zpunout described in the first point in his first post here, we had to first use "flashtool" to flash our D6683 devices with a Sony stock D6633 ROM, to be able to use the ROM in this tread.

You will have to first flash a Sony D6603 ROM, before you can flash LOS4µG recovery and ROM. Then you need to manipulate build.prop, adsp.* and modem.* files.
It's a good idea to extract those files from your stock ROM with adb, or some other tool, if you still have them in your device.
Thanks @pi r ! The stock D6603 was what I was missing.

Success! I got it up and running with LOS4µG as D6603 and then replaced the modem files and and edited the build.prop via adb. Everything was looking good, so I put my SIM card in, connected to the network, sent a few text messages and placed a phone call, and thought I was in good shape.

I powered it off and put the SIM back in my regular phone (D6603) for the day. However, when I put the same SIM back in the D6633 this evening, it's not recognizing the SIM card at all: "No SIM card - No service." I tried both SIM slots and a spare SIM from another phone, nothing is coming up. Could the modem files have reverted somehow? Is there something else that might cause this? The D6633 is new to me, but random hardware failure seems unbelievable.

Any thoughts or advice still very much appreciated! Thanks again!
Last edited:
  • Like
Reactions: Mr.Tom_Tom

pi r

Sep 22, 2021
Hi @minethlos..!
I'm glad you managed to get your phone working - well, briefly anyway...

First (I'm sure you have already tried this, but just to verify...)
Reboot, or Power up, after you insert the SIM-card. Sony's ROM always automatically forces a reboot on insert, or removal, of SIM-cards. But I noticed that LOS don't do that.

I can't imagine how your modem.* files, or build.prop, could be reverted by a power off. You must have rebooted after your modifications, and a power off "should" be the same thing..?
But fortunately, that's easy to verify. Just list the files with ls -l in adb, and check their dates. And install them again to see if it works...

Top Liked Posts

  • There are no posts matching your filters.
  • 3


    This is the unofficial LineageOS 18.1 thread for the Sony Xperia Z3 DUAL D6633. Although Lineage is maintaining a device tree for the D6633 it is currently not supported officially, but this may change in the future.

    If you own a Z3 single SIM D6603 go here.
    If you own a Z3 Compact D5803 go here.
    If you own a Z3 DUAL SIM Hongkong variant D6683 see post#2.

    LineageOS 18.1 is an open-source Android distribution based on the Android Open Source Project (AOSP) version 11 (R).


    If you are on stock OS, you need a custom recovery first. You can get the recommended recovery with the download link below.
    If you are coming from stock or other ROMs, you need to make a factory reset. You also will need a factory reset if you come from LineageOS 17.1 with encryption enabled.
    As always, make sure to backup before installing this ROM.

    Detailed installation instructions

    Please follow the installation instructions for LineageOS on z3. However, do not use the provided recovery and ROM links for the z3 but use the download links for the z3dual below.


    Source Code

    The source code of LineageOS is available here. If you would like to contribute to LineageOS, please visit out Gerrit Code Review.
    • The z3dual device tree is available here.
    • The kernel is based on V3.4 and source code for this device is available here. The used configuration is lineageos_shinano_leo_defconfig available at arch/arm/configs/lineageos_shinano_leo_defconfig in the kernel source.


    NeoArian, Mr.Tom_Tom

    If you want to donate to support development:
    Donate via PayPal to NeoArian
    Donate via PayPal to LineageOS
    However - I have now a working Z3 D6683 with your ROM !
    Would be happy to get more feedback if everything is working correctly. We could then think about building for D6683 as well.
    Thanks for porting Lineage 18.1 to D6633. I'm trying to install this to a D6683 which has had the following already done:
    1. Flashed D6633 23.5.A.1.291 stock OS using FlashTool (in the downloaded XperiFirm files, I deleted fwinfo.xml and manually selected D6683 in the FlashTool > Bundles > Create )
    2. Got root access with SuperSU with locked bootloader then backed up TA partition to preserve DRM keys.
    3. reboot into temporary TWRP (still with locked bootloader) and attempt adb sideload lineage 18.1 D6633
    When attempting to adb sideload Lineage 18.1 for the D6633 onto the D6683 device, TWRP returns an error: "E3004: This package is for device: z3dual; this device is ." (see attached screenshot).

    The other screenshot of the About Phone screen is for general reference. Despite the phone actually being a D6683, the Model Number shows D6633. Also, to get a temporary TWRP running, the kernel was downgraded from 23.5.A.1.291 to 23.5.A.0.575 despite showing 23.5.A.1.291 in the Build Number. Under Kernel Version, it shows Apr 22 instead of June which supposedly means it is actually running 23.5.A.0.575

    A couple of questions: Is it possible for me to get this Lineage 18.1 for D6633 image to work on this D6683 device somehow?
    My main question:
    Do I have to unlock the bootloader first and install TWRP permanently to the recovery partition? This question is why I'm writing this post here as I will only unlock the bootloader if I have to, assuming Lineage18.1 for D6633 can work on a D6683
    as far as i know, you must be on the latest official firmware available for your device, then use lineage recovery, not the twrp.
    then you can install this rom. i could install D6603 roms on my dual device so i guess you can install this rom on your device too.
    Thanks TheShadowOfAGhost20 for your help. Got Lineage 18.1 z3dual running with the recovery image you provided.
    Worth noting here in case others have an issue: The only hiccup I had with trying to flash and boot into the new Lineage recovery was this error: "fastboot: error: Couldn't parse partition size '0x'"
    I tried "fastboot flash:raw boot recovery.img" and was then able to reboot into Lineage custom recovery.
    Have now successfully installed Lineage 18.1 D6633 onto a D6683 and will test if the device works normally with LTE bands etc...
    Hi zpunout to flash the rom just flash the recovery on 1st post but not in recovery so type fastboot flash boot
    Or in recovery put the recovery.img in internal storage or sdcard and got to install image and go to where you put the file and flash it on boot and then reboot you will see los recovery and go to flash adb and side load and side load it from pc with gapps and magisk root
    Don't ues 23 build but ues this one https://github.com/topjohnwu/Magisk/files/6330986/Magisk-v22.1_mod_sony.zip and there you go