[ROM][UNOFFICIAL][10][Q]LineageOS 17.1 for z5c (suzuran)

Search This thread

Berni-0815

Senior Member
Sep 22, 2016
2,269
2,049
Germany
Sony Xperia Z5 Compact
New version out; see 1st post.
  • Android security patch level: 5 September 2021
  • Switched to signed builds!
 

Attachments

  • Screenshot_20210919-203536_Settings.png
    Screenshot_20210919-203536_Settings.png
    78.9 KB · Views: 40

petefoth

Senior Member
Hi Berni

I've been debugging a problem in the /e/ OS build based on this ROM and it seems the problem is in this ROM as well. The problem is that Factory Reset fails, at the point where the phone would normally reboot into recovery to wipe the data.

To reproduce:
  • Settings | System | Advanced | Reset options | Erase all data (factory reset)
  • Choose Erase all data (factory reset)
  • Choose Delete all data
  • Confirm screen pattern
  • Choose Delete all data
At this point, nothing happens. What should happen is that the device should boot into TWRP, wipe data partition, and reboot into a 'fresh system'.

I suspect that the problem is with TWRP (because another function in /e/ - applying an OTA update - also fails at the point where the device should boot into TWRP). I have tried with several different versions of TWRP (see below), but the problem remains the same.

Do you have any ideas how I can proceed? I have tested this on the latest release of your ROM `lineage-17.1-20210919-SIGNED-suzuran.zip` and on TWRP versions
  • version 3.2.1-0 from file `recovery_suzuran_230218.img` as recommended in the first post in this thread
  • TWRP_3.5.0_9-0-recovery_suzuran_2021-01-04.img (which I seem to have been using for a while)
  • TWRP_3.5.2_9-0-recovery_suzuran_2021-04-11.img (linked from TWRP 3.5.2 for the XPeria Z5 compact (suzuran) XDA Forum)

Very grateful for any ideas on how to take this forward. Thanks

Pete

EDIT:
logcat output is here. The interesting bit is from line 542
Code:
--------- switch to main

09-29 06:58:21.691  5088  5088 I /system/bin/uncrypt:   received command: [--wipe_data

09-29 06:58:21.692  5088  5088 I /system/bin/uncrypt: --reason=MasterClearConfirm,2021-09-29T06:58:20Z

09-29 06:58:21.692  5088  5088 I /system/bin/uncrypt: --locale=en-GB

09-29 06:58:21.692  5088  5088 I /system/bin/uncrypt: ] (76)

09-29 06:58:21.695  5088  5088 E /system/bin/uncrypt: failed to set bootloader message: failed to find /misc partition

--------- switch to system

09-29 06:58:21.701  1031  5087 E RecoverySystemService: uncrypt failed with status: -1

09-29 06:58:21.702  1031  5087 E MasterClear: Can't perform master clear/factory reset

09-29 06:58:21.702  1031  5087 E MasterClear: java.io.IOException: Reboot failed (no permissions?)

09-29 06:58:21.702  1031  5087 E MasterClear:     at android.os.RecoverySystem.bootCommand(RecoverySystem.java:1082)

09-29 06:58:21.702  1031  5087 E MasterClear:     at android.os.RecoverySystem.rebootWipeUserData(RecoverySystem.java:788)

09-29 06:58:21.702  1031  5087 E MasterClear:     at com.android.server.MasterClearReceiver$1.run(MasterClearReceiver.java:75)

--------- switch to main

09-29 06:58:21.703  5088  5088 I /system/bin/uncrypt:   received 0, exiting now

This is the same error as occurs when OTA Install fails, and it appears to be something to do with encryption.

I have tried on a device without a screen pattern but the same error occurs. No idea what to try next :(
 
Last edited:

petefoth

Senior Member
I would try it myself. But I've fear to loose the devices internal memory which would be a nightmare!
What does a wipe delete?
Pretty much everything in internal memory storage. It returns your device to that state it left the factory. However, if yiu back up the data partition with TWRP, there's no risk whatsoever ;)

Great if you have time to try, but not essential. I'm just waiting for the /e/ bureaucracy to tell me how to get their servers to make a test build. I can test it locally myself, but I'd still have to jump through that hoop to get the fix released to /e/ users.

The other effect of the bug in /e/ OS is that it breaks OTA updates: Updater app downloads the update, then tries to reboot into recovery and fails with the same log messages as Factory Reset
 

petefoth

Senior Member
Heureka!
This commit is doing what you want!
And /data/media keeps untouched!
:cool:
Rather than cherry picking that commit, I tried to build using the latest in your repos. Unfortunately, that gave me a bug where WiFi refused to tun on, in First Time Setup Wizard or afterwards. That isn't a problem in your 19 September ROM which works fine. I haven't got a logcat yet, but I wondered if you had any idea why I might be getting this bug.

This is my manifest
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>


  <!-- Devices -->
  <project name="Professor-Berni/android_device_sony_kitakami-common"
           path="device/sony/kitakami-common"
           remote="github"
           revision="lineage-17.1" />
  <project name="Professor-Berni/android_device_sony_suzuran"
           path="device/sony/suzuran"
           remote="github"
           revision="lineage-17.1" />

  <!-- Kernel-->
    <project name="Professor-Berni/android_kernel_sony_msm8994"
           path="kernel/sony/msm8994"
           remote="github"
           revision="lineage-17.1-lmk" />

  <!-- Vendor -->
  <project name="Professor-Berni/proprietary_vendor_sony"
           path="vendor/sony"
           remote="github"
           revision="lineage-17.1" />
  <!-- Extra vendor blobs -->
  <project name="Professor-Berni/proprietary_vendor_sony_extras"
           path="vendor/sony/kitakami-common-extras"
           remote="github"
           revision="lineage-17.1" />

  <project name="LineageOS/android_hardware_broadcom_fm"
           path="hardware/broadcom/fm"
           remote="github" revision="lineage-17.1" />
  <project name="LineageOS/android_hardware_sony_timekeep"
           path="hardware/sony/timekeep"
           remote="github"
           revision="lineage-17.1" />

</manifest>

Full log file is at https://pastebin.com/NZFy0F9x

The interesting bit https://pastebin.com/xCj5cb1B
Code:
--------- switch to events
10-05 14:56:47.739  6776  6776 I sysui_multi_action: [757,139,758,4]
--------- switch to main
10-05 14:56:47.743  1031  1071 I WifiService: setWifiEnabled package=com.android.settings uid=1000 enable=true
10-05 14:56:47.745  1031  3295 D WifiController: StaEnabledState.enter()
10-05 14:56:47.745  1031  3296 D WifiActiveModeWarden: received a message in WifiDisabledState: { when=0 what=0 target=com.android.internal.util.StateMachine$SmHandler }
10-05 14:56:47.745  1031  3296 D WifiActiveModeWarden: Switching from WifiDisabledState to ClientMode
10-05 14:56:47.745  1031  3296 D WifiActiveModeWarden: Entering ClientModeActiveState
10-05 14:56:47.746  1031  3296 D WifiClientModeManager: entering IdleState
10-05 14:56:47.746  1031  3296 D WifiActiveModeWarden: State changed from client mode. state = 2
10-05 14:56:47.749  1031  1031 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
10-05 14:56:47.754  1031  3296 I WifiVendorHal: Vendor Hal started successfully
--------- switch to events
10-05 14:56:47.755   385   385 I snet_event_log: [121035042,-1,]
--------- switch to main
10-05 14:56:47.755  1031  3297 I WifiP2pNative: Registering for interface available listener
10-05 14:56:47.757  1031  3296 I SupplicantStaIfaceHal: Starting supplicant using HIDL
--------- switch to events
10-05 14:56:47.758   385   385 I chatty  : uid=1000(system) hwservicemanage identical 1 line
10-05 14:56:47.759   385   385 I snet_event_log: [121035042,-1,]
--------- switch to main
10-05 14:56:47.759  1031  3296 I android_os_HwBinder: HwBinder: Starting thread pool for getting: [email protected]::ISupplicant/default
10-05 14:56:47.760  1031  3296 E SupplicantStaIfaceHal: Death handler already present
--------- switch to system
10-05 14:56:47.763   473   473 E [email protected]: Failed to open wlan fw path param: No such file or directory
10-05 14:56:47.763   473   473 E [email protected]: Failed to change firmware mode
--------- switch to main
10-05 14:56:47.763  1031  3296 D HalDevMgr: updateRttController: no one is interested in RTT controllers
10-05 14:56:47.763  1031  3296 E HalDevMgr: executeChipReconfiguration: configureChip error: 9 ()
10-05 14:56:47.763  1031  3296 E WifiVendorHal: Failed to create STA iface
10-05 14:56:47.763  1031  3296 E WifiNative: Failed to create STA iface in vendor HAL
10-05 14:56:47.763  1031  3296 E WifiClientModeManager: Failed to create ClientInterface. Sit in Idle
10-05 14:56:47.763  1031  3296 D WifiActiveModeWarden: State changed from client mode. state = 4
10-05 14:56:47.763  1031  3296 D WifiClientModeManager: expected stop, not triggering callbacks: newState = 1
10-05 14:56:47.764  1031  3296 E WifiNative: Could not get Iface object for interface null
10-05 14:56:47.764  1031  3296 D WifiActiveModeWarden: ClientMode failed, return to WifiDisabledState.
10-05 14:56:47.764  1031  3296 D WifiController: ClientMode unexpected failure: state unknown
10-05 14:56:47.764  1031  3296 D WifiClientModeManager:  currentstate: IdleState
10-05 14:56:47.764  1031  3296 D WifiScanRequestProxy: Sending scan available broadcast: false
10-05 14:56:47.765  1031  1031 D WifiP2pService: Wifi enabled=false, P2P Interface availability=true
10-05 14:56:47.765  1031  3298 I WifiScanningService: wifi driver unloaded
--------- switch to events
10-05 14:56:47.766   384   384 I snet_event_log: [121035042,-1,]
--------- switch to main
10-05 14:56:47.769  1031  3296 I WifiScanRequestProxy: Scanning is disabled
10-05 14:56:47.769  1031  3296 D WifiActiveModeWarden: Entering WifiDisabledState
10-05 14:56:47.769  1031  3296 D WifiActiveModeWarden: received a message in WifiDisabledState: { when=-4ms what=1 target=com.android.internal.util.StateMachine$SmHandler }
10-05 14:56:47.769  1031  3296 D WifiActiveModeWarden: Switching from WifiDisabledState to ScanOnlyMode
10-05 14:56:47.769  1031  3296 D WifiActiveModeWarden: Entering ScanOnlyModeActiveState
10-05 14:56:47.769  1031  3296 D WifiScanOnlyModeManager: entering IdleState
10-05 14:56:47.770  1031  3296 I WifiVendorHal: Vendor Hal started successfully
--------- switch to system
10-05 14:56:47.772   473   473 E [email protected]: Failed to open wlan fw path param: No such file or directory
10-05 14:56:47.772   473   473 E [email protected]: Failed to change firmware mode
--------- switch to main
10-05 14:56:47.772  1031  3296 D HalDevMgr: updateRttController: no one is interested in RTT controllers
10-05 14:56:47.772  1031  3296 E HalDevMgr: executeChipReconfiguration: configureChip error: 9 ()
10-05 14:56:47.773  1031  3296 E WifiVendorHal: Failed to create STA iface
10-05 14:56:47.773  1031  3296 E WifiNative: Failed to create iface in vendor HAL
10-05 14:56:47.773  1031  3296 E WifiScanOnlyModeManager: Failed to create ClientInterface. Sit in Idle
10-05 14:56:47.773  1031  3296 D WifiActiveModeWarden: ScanOnlyMode mode failed
10-05 14:56:47.773  1031  3296 E WifiNative: Could not get Iface object for interface null
10-05 14:56:47.773  1031  3297 I WifiP2pNative: Registering for interface available listener
10-05 14:56:47.774  1031  3296 D WifiActiveModeWarden: ScanOnlyMode failed, return to WifiDisabledState.
10-05 14:56:47.774  1031  3296 D WifiController: ScanOnlyMode unexpected failure: state unknown
10-05 14:56:47.774  1031  3296 D WifiScanOnlyModeManager:  currentstate: IdleState
10-05 14:56:47.774  1031  3296 D WifiScanRequestProxy: Sending scan available broadcast: false
10-05 14:56:47.774  1031  3298 I WifiScanningService: wifi driver unloaded
10-05 14:56:47.774  1031  3296 I WifiScanRequestProxy: Scanning is disabled
10-05 14:56:47.777  1031  3296 D WifiActiveModeWarden: Entering WifiDisabledState
10-05 14:56:47.777  1031  3296 E WifiNative: Could not get Iface object for interface null
10-05 14:56:47.782   461   502 D audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
10-05 14:56:47.782  1031  3296 E WifiNative: Could not get Iface object for interface null
10-05 14:56:49.091   657   657 I MSM-irqbalance: Decided to move IRQ240 from CPU0 to CPU3
10-05 14:56:50.889   461   503 D audio_hw_primary: out_standby: enter: stream (0xf6e14600) usecase(1: low-latency-playback)
10-05 14:56:50.936   461   503 D audio_hw_primary: disable_audio_route: reset and update mixer path: low-latency-playback
10-05 14:56:50.939   461   503 D hardware_info: hw_info_append_hw_type : device_name = speaker
10-05 14:56:50.939   461   503 D audio_hw_primary: disable_snd_device: snd_device(2: speaker)


Thanks
 
Last edited:

Berni-0815

Senior Member
Sep 22, 2016
2,269
2,049
Germany
Sony Xperia Z5 Compact
Rather than cherry picking that commit, I tried to build using the latest in your repos.

This is my manifest
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <!-- Kernel-->
    <project name="Professor-Berni/android_kernel_sony_msm8994"
           path="kernel/sony/msm8994"
           remote="github"
           revision="lineage-17.1-lmk" />
</manifest>
Try to use the 18.1 kernel. Since some released versions I'm using my own 18.1 kernel because it's more actual.
Maybe there is a mismatch between the 17.1 device tree and the 17.1 kernel since my latest changed in device tree. But I'm not sure about that.
 
  • Like
Reactions: darkangel32

sabotage154

Senior Member
Apr 24, 2011
131
10
i flashed this and in my battery is draining at a rate of 10% per hour with screen off. i tried doing a fresh reinstall of stock and then flashed the rom again and im still having the issue. anyone have any ideas what could be causing this.
 

roohooo

Member
Apr 22, 2020
46
4
Good morning all,

over the last 4 days, I've noticed a severe degradation of my main Z5C's connectivity, which has been running fine with the 20210615 build since July. General signal strength is low and data connection sometimes takes minutes to establish before it shows "LTE" but even then there is no data flow with apps.

This happens with 2 different SIM of different providers. Both SIM are working fine in another Z5C with the older 20210208 build. So, the SIM appear to be ok and a provider issue seems unlikely. I've reset app and WiFi/mobile data settings but no effect.

@Berni-0815 and others: any ideas what I am seeing here? Is my Z5C dying? Anything else I could try without having to do a factory reset and/or fresh LOS install?


Any suggestions are very much appreciated!
Thanks,
r.
 

roohooo

Member
Apr 22, 2020
46
4
Well, thanks for the good weekend news! ;-) Will try you latest build but I too suspect that might be in vain... :-(
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Thanks! Formatting the data partition solved the problem.
    1
    Issues with whatsapp audio is well known and not my business. Whatsapp seems to use another audio driver or codec. Please contact whatsapp for further help.
    Audio is working flawlessly in the ROM itself and that is what I'm responsible for.
    Third party apps are not part of my responsibility. I don't have the time and energy to fix every possible error in third party apps.
    Please respect this. ;)
    1
    The audio stuff is very complicated. I've tried a lot of things and there is no way to meet all needs.
    Feel free to "play with" the file "/system/vendor/etc/mixer_paths.xml". That's the file where all audio settings are defined.
  • 48
    Hi all:

    Here is a LineageOS 17.1 ROM for Z5 compact (suzuran).

    Download 2022-08-15

    This is a 7z archive with the zip'ed rom and the md5 file in it. Please unpack this archive, copy the included two files somewhere to your device, reboot into TWRP and flash this zip file. Enable md5sum checking. The zip file itself is not signed, so you have to disable zip verification.

    Kernel sources
    Tree sources

    Features:

    • OS Version: 10.0 (Q)
    • Kernel: Linux 3.10
    • Kernel 3.10.108
    • New: Android security patch level: 5 August 2022
    • Using sony blob's from stock version 32.4.A.1.54
    • Memory issues finally fixed!
    • Battery consumption significantly reduced! For further reduction, please follow these instructions.
    • Google Pay does not give an error when starting the app. This does not mean, that payment is working. I can't test it, because I don't use this feature at all. Please report if it's working or not.
    • Updated aptX encoder blobs.
    • P2P-Crashes fixed.

    Important informations:
    • You should be familiar with general installation of custom ROMs.
    • Required for installation: TWRP 3.2.1 (pick the version from 2018-02-23!!!) There is a version 3.2.3 out there, but with that version I had problems to restore my backups. 3.2.1 is just working perfect for me!
      OR use my self built TWRP-version 3.6.2!
    • This ROM needs a clean install, old /data may cause problems!
    • This ROM is NOT pre-rooted.
    • It is highly recommended that your device is running (or HAS RUN in the past!) the latest stock ROM from Sony (32.4.A.1.54) before flashing this ROM.
      Otherwise the baseband files may not match.

    Working:
    • Bluetooth
    • Camera; both built-in camera (Snap) and 3-rd party camera apps.
      Snap may be a little bit laggy, please use 3-rd party camera app instead; for example OpenCamera. If you're running into errors, please report.
    • Enforced SELinux support (see attached screenshot)
    • Fingerprint
    • FM-Radio
    • GApps (pick this version: ARM64, 10.0, pico [tested])
    • German app AusweisApp2 working (see this post)
    • GPS
    • Headset
    • LiveDisplay (see attached screenshots)
    • Location services
    • Notification LED
    • Offline charging
    • Phone calls (see attached screenshot)
    • SafetyNet test passed successfully
    • Signed build
    • SMS
    • Torch
    • WiFi
    These things are NOT working (or badly working):
    • Camera focus at low distances.
    • Encryption
    • Payment
    • Streaming (mirroring)
    • VoLTE
    Maybe some more things are not working.

    If you have problems with GApps:
    Sometimes the SetupWizard of GApps crashes on and on. Then you have to boot into TWRP, mount system, and go into terminal, where you have to delete SetupWizard (see screenshots):
    Code:
    cd /system/system/priv-app
    rm -rf SetupWizard
    Reboot.


    Use this rom at your own risk! It comes without any warranty! I'm not responsible for any damage! If you don't agree with that, don't try to flash this rom in any way.

    Benefits:

    • Added F-Droid and UnifiedNLP! If you don't want this, simply de-install it.
    • I've set maximum speaker volume to a higher value.
    • I've increased microphone gain.
    • I've changed the microfone gain to avoid echo in phone calls.
    Changelog

    Troubleshooting:


    • If you're running into an error, please search in this thread if this error is already posted, before you post it again!
      If not, I need a LOG to see what went wrong. Without a LOG I can't help you!
      A LOG can be fetched by connecting the device with an USB cable to your PC and then by typing these commands line by line:
      Code:
      adb root
      adb shell logcat -b all -d > logcat
      Send my this LOG file via PM.
    • If you think this could be a SELinux related issue, please try to set the device to permissive mode first.
      If the issue is gone, I need the policy file too (plus LOG). Fetch it by typing this line in a terminal:
      Code:
      adb pull /sys/fs/selinux/policy
    • If you stuck in a bootloop you can fetch a LOG with this trick:
      • Press the power button and the volume up button together until the device shuts down.
      • HOLD the power button.
      • Release the volume up button and press the volume down button immediately after releasing the volmue up button.
      • The device should start into TWRP recovery.
      • Tap on "Advanced", then on "Terminal" and enter these commands line by line:
        Code:
        cd sys/fs/pstore
        cp * /sdcard
      • Send me the copied file(s), if any, via PM.
    10
    New version out; see 1st post.
    New: Phone calls and SMS fully working! :good:
    9
    New version out; see 1st post.
    • Android security patch level: 5 August 2020
    • Offline charging working
    • Notification LED working
    8
    New version out; see 1st post. Some memory improvements. Device runs smooth without GApps and keeps quite cool and battery loss is low.
    But with GApps the device becomes unusable after quite short time.
    7
    Very good! :good:

    Next big thing is memory. The device freezes too fast and I have problems with OpenGApps. I can neither flash the rom and OpenGApps together nor the rom first and OpenGApps after full install. Everytime the device freezes down to zero... :eek:

    Next version is on the way; stay tuned...