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

[DEV][WIP] brcmfmac wifi driver & qcwcn libs for MSM8974-based devices like Sony Shinano

Search This thread

navidmafi

Member
Dec 24, 2019
23
5
Tehran
i have a question
should i flash system directly with "fastboot flash system ROM.zip"
or use adb sideload?
i used sideload last time

Edit: Thanks @netwave but i will flash it again for clean system

Edit 2 : sorry i misunderstood zip files in flashing

my question solved
 
Last edited:

navidmafi

Member
Dec 24, 2019
23
5
Tehran
I flashed ROM again and the problem still exists

how i flashed :

Code:
fastboot erase userdata
fastboot erase system
fastboot erase recovery
fastboot erase cache
fastboot flash boot ~/Downloads/recovery-20201012-TESTING-z3dual.img

// Formatting all partition with recovery then Apply Update - ADB sideload

adb sideload ~/Downloads/lineage-17.1-20210320-UNOFFICIAL-z3dual.zip

//result : Total xfer: 1.00x
//then reboot to system and setup lineage - turning display off with power button and turn on again , wifi was disconnected
// NOTE: i disabled "allow apps to use location" checkbox in setup
 

netwave

Senior Member
I flashed ROM again and the problem still exists

how i flashed :

Code:
fastboot erase userdata
fastboot erase system
fastboot erase recovery
fastboot erase cache
fastboot flash boot ~/Downloads/recovery-20201012-TESTING-z3dual.img

// Formatting all partition with recovery then Apply Update - ADB sideload

adb sideload ~/Downloads/lineage-17.1-20210320-UNOFFICIAL-z3dual.zip

//result : Total xfer: 1.00x
//then reboot to system and setup lineage - turning display off with power button and turn on again , wifi was disconnected
// NOTE: i disabled "allow apps to use location" checkbox in setup
There was no need to erase any of that, Magisk only patches the boot.img & you still have the modified boot.img flashed hence no Wifi
Follow instructions from Post #20
 

navidmafi

Member
Dec 24, 2019
23
5
Tehran
Thanks for instructions, but i was ok with erasing all partitions and flashing again. the problem was not there
the problem is WiFi still disconnects on screen sleep

Edit: I tried disabling ALL APPS battery optimization ONE BY ONE but it didn't help
 
Last edited:
  • Like
Reactions: Mr.Tom_Tom

netwave

Senior Member
Thanks for instructions, but i was ok with erasing all partitions and flashing again. the problem was not there
the problem is WiFi still disconnects on screen sleep
Screen lock & screen time out turns off WiFi by default to consume battery life I suspect.
This would make perfect sense for screen timeout ranging from 15 seconds to 30mins

I see your point regarding WiFi off for "screen lock" as users would not be able to receive messages via social media apps via WiFi
May be worth asking the Dev if Wifi On/Off option can be implemented for screen lock.
 
  • Like
Reactions: Mr.Tom_Tom

navidmafi

Member
Dec 24, 2019
23
5
Tehran
There was WiFi problem with previous release

to connect and see WiFi network i should put phone on airplane mode , reboot and connect to WiFi network
But when i was connected everything was fine and it did not disconnect with screen lock
i think this is something wrong in ROM or settings app : my father phone is XZ2 and there is an option to enable/disable "sleep wifi on lock screen" which i think is missing on settings app on this ROM
 

navidmafi

Member
Dec 24, 2019
23
5
Tehran
Magisk 22 was not caused wifi problem for me (Same results with and without Magisk, wifi disconnects on lock screen)
but the root functions not worked too
 

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
222
Munich
WiFi still disconnects on screen sleep
Thanks for reporting this @navidmafi & @netwave ! I did see myself that Wifi did not seem to be connected instantly after returning from sleep. I think that the default behavior should be something like "always connected" but did not look into that yet. Sure that you can't e.g. ping the device while it is sleeping?

If I find some time I will do some checks myself.
 

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
222
Munich

New build​

Warning, still experimental!

Lineage Sources* as of 31 March 2021
  • Kernel sources* based on Linux 3.4.113 with backported wifi from 5.8.18 plus cherry-pick of the following changes:
    • bluetooth: fixed #ifdef'ed PM callbacks ("BTLowPower" wakelock) 50f16d16b32871c5ce97b029e68692008c848bb2
  • SELinux enforcing
  • Build as userdebug, normal loglevels
  • Contains Fix for Auto Rotation bug
* For links to sources see 1st post. Z3Dual does not have official Lineage17.1 sources yet, bringup is in progress.


Xperia Z3 (D6603):
md5: 0833d989160f4eb7d3cb8bf88ec10d7f

Xperia Z3c (D5803):
md5: 8f793346144c83a7884d86783b1924bd

Xperia Z3Dual (D6633):
md5: 5be222194cf4f2e5da92e0e2b2c58fe4

As always, feedback is welcome.
 
Last edited:

TheShadowOfAGhost20

Senior Member
Mar 8, 2020
51
14
Rasht

New build​

Lineage Sources* as of 31 March 2021
  • Kernel sources* based on Linux 3.4.113 with backported wifi from 5.8.18 plus cherry-pick of the following changes:
    • bluetooth: fixed #ifdef'ed PM callbacks ("BTLowPower" wakelock) 50f16d16b32871c5ce97b029e68692008c848bb2
  • SELinux enforcing
  • Build as userdebug, normal loglevels
  • Contains Fix for Auto Rotation bug
* For links to sources see 1st post. Z3Dual does not have official Lineage17.1 sources yet, bringup is in progress.


Xperia Z3 (D6603):
md5: 0833d989160f4eb7d3cb8bf88ec10d7f

Xperia Z3c (D5803):
md5: 8f793346144c83a7884d86783b1924bd

Xperia Z3Dual (D6633):
md5: 5be222194cf4f2e5da92e0e2b2c58fe4

As always, feedback is welcome.[/URL]
the previous build still had problems with channel 12 and 13 detection, will they be fixed?
 

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
222
Munich
Tom_Tom I'm impressed with the speed your rolling out these new builds! nice one (y)
Well, it took me ~ 2 years to understand the issue with screen rotation and priovide a fix. Therefore I feel some irony in your message :LOL:.

the previous build still had problems with channel 12 and 13 detection, will they be fixed?
No changes regarding wifi. I am not convinced yet that the reported issues with channel 12/13 are related to this ROM. Would require more user feedback and logs from multiple countries.

I see myself that the wifi driver is not fully stable yet. It works, but some features are not yet enabled and regarding stability I see some crashes now and then. Will have a closer look in the future when I find some time.

Getting repeated Wifi dropouts when connected to screen cast
Logs please
 
  • Like
Reactions: TheShadowOfAGhost20

navidmafi

Member
Dec 24, 2019
23
5
Tehran
Thanks @Mr.Tom_Tom for new build

the *previous build* caused so many instability issues in my phone
1-the phone reboots 40 to 50 time per day
sometimes it got to bootloop and reboots and reboots and reboots
and half of the time i wanted to check my phone , i saw it was in boot logo

2-the wifi problem that you saw yourself

3-yesterday when i was sleep it seems the phone rebooted
and when it booted up again , phone Time was at 7:30
but the real time was 10:30
and i'm checking alarms and date and time of my phone every night i set the clock, nothing was wrong as always.
and i missed one of the most important exams of my school and i ran into so many problems.
(this can be my operator issue i NEVER saw that happen in any phone any time ever)

i think that older ROM (that WiFi just connects in airplane mode) did not had THIS kind of problems and was so stable

and the ping test Mr.Tom_Tom asked for:
the phone replied normally when screen was on
but instantly after turning off screen by power button , requests timed out

anyway i will try new build and report the results
 
  • Like
Reactions: Mr.Tom_Tom

Mr.Tom_Tom

Senior Member
Feb 16, 2008
176
222
Munich
Thank you @navidmafi for your feedback.

I can confirm that the current builds are not stable. Looking into the reboots. They seem to be related to wifi disconnects during standby and wifi scans starting after returning from standby. Hopefully there is an easy fix to address all these issues at once.

In the meanwhile there is some development ongoing with some changes likely being incorporated into the official Lineage builds which will bring some wifi improvements.
 
  • Like
Reactions: navidmafi

Mahmaod Rad

Member
May 22, 2021
39
9
Everyone here please pay attention here
If you will shot down your sony z3 dual do not pris volume up immediately because this will hard brick your phone
It happened to me so the there is two ways to fix it
1 wait until the battery died (i don't use this(
2 Or open your phone and unplug the battery and plug it back
Thanks for your time for read and spread it out because it powerful if any one have opened phone than test it out to confirm it and thanks for your time
 

Mahmaod Rad

Member
May 22, 2021
39
9
Everyone here please pay attention here
If you will shot down your sony z3 dual do not pris volume up immediately because this will hard brick your phone
It happened to me so the there is two ways to fix it
1 wait until the battery died (i don't use this(
2 Or open your phone and unplug the battery and plug it back
Thanks for your time for read and spread it out because it powerful if any one have opened phone than test it out to confirm it and thanks for your time
I mean on shutdown it by press power and vol up to force to shutdown and don't presed volume up immediately just wait for it
 

Mahmaod Rad

Member
May 22, 2021
39
9

New build​

Warning, still experimental!

Lineage Sources* as of 31 March 2021
  • Kernel sources* based on Linux 3.4.113 with backported wifi from 5.8.18 plus cherry-pick of the following changes:
    • bluetooth: fixed #ifdef'ed PM callbacks ("BTLowPower" wakelock) 50f16d16b32871c5ce97b029e68692008c848bb2
  • SELinux enforcing
  • Build as userdebug, normal loglevels
  • Contains Fix for Auto Rotation bug
* For links to sources see 1st post. Z3Dual does not have official Lineage17.1 sources yet, bringup is in progress.


Xperia Z3 (D6603):
md5: 0833d989160f4eb7d3cb8bf88ec10d7f

Xperia Z3c (D5803):
md5: 8f793346144c83a7884d86783b1924bd

Xperia Z3Dual (D6633):
md5: 5be222194cf4f2e5da92e0e2b2c58fe4

As always, feedback is welcome.
I flashed the dual sim build and this what i found
Root is not working (magisk) what ever i did
I can,t flash the rom on it because it say
(This rom for z3dual your device is ,) with 07 on twrp 3.1.1 that xkeita Posted on his form
And if i trid using twrp 3.3.1 that on Androidfilehost it siad (this rom for z3dual this device is z3 ) or leo and 07
So the only way to flash it is edit the script from z3dual to z3 to flash it but when it boot it give you a Signature Notice and not only that like on restart menu reboot to recovery is not working
When phone is charging and using (i was download apps ) change is stoped and phone will run on battery like xkeita build
And i wont to say the rom is so good but it need some work like
1 double check on screen while off dose not turn it on
2 Dual sim settings are need some work (plz make it like xkeita build )
3 Led settings ane not found i cant change my led cooler is always green and yellow i cant change it
So thinks for this rom because it fantastic and i was looking for it for long time even i think to flash single sim build and loes sim like make it like taplet so plz Continue for it and make it official and this is my email and my Telegram account
[email protected]
@Mahmaod_Rad
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5

    New builds​

    Feedbacks have been positive so far, so here are some updated builds.
    • Lineage Sources* as of 20 March 2021
    • Kernel sources* based on Linux 3.4.113 with backported wifi from 5.8.18 plus cherry-pick of the following changes:
      • bluetooth: fixed #ifdef'ed PM callbacks ("BTLowPower" wakelock) 50f16d16b32871c5ce97b029e68692008c848bb2
    • SELinux enforcing
    • Build as userdebug, normal loglevels
    * For links to sources see 1st post. Z3Dual does not have official Lineage17.1 sources yet, bringup is in progress.


    Xperia Z3 (D6603):
    md5: d7aaf1fea120df3e2aad10b3a2d32226

    Xperia Z3c (D5803):
    md5: 456ff87441c3a63e8dc8c7a8d03bdf39

    Xperia Z3Dual (D6633):
    md5: 1848681c82d608f3212f1ace621327cb


    As always, feedback is welcome.
    4
    The intention behind this thread is to share some experience of a little project where I try to migrate the Sony Xperia Shinano devices (based on Qualcomm MSM8974 chipset with a Broadcom BCM4339 wifi/bluetooth chip) from the old bcmdhd wifi driver to a close-to-mainline brcmfmac driver. I want to share the progress and status here, and maybe get some hints. It is work in progress, and for sure it still contains some mistakes - I haven't done something like this before and am still learning.

    Why?
    • The Shinano devices are still maintained by the LineageOS, and some devices are currently on the official LineageOS 17.1 stream.
    • The kernel however is terribly outdated, based on msm-3.4
    • There are some wifi issues with all LineageOS-based ROMs since years, like weak 5GHz connections and non-working wifi in some countries. There are some hacks around that, but they work (afaik) by practically disabling the kernel-level regulatory system by e.g. setting a static country code like "DE".
    I am curious if we can improve that by updating the kernel drivers and network/wifi components, and maybe also the firmware (to the latest release available from Broadcom, 6.37.34.43 ?) . I got the ideas from Sonyxperiadev/Loire (+ related platform config), the Linux Backport Project and other MSM8974 based devices.

    Working so far:
    • Did a few tests only so far, STA with WPA2 and p2p (hotspot) seem to work
    • Wifi connection is stable on 2,4GHz on 00 world regulatory domain (tested on a Z3 and a Z3c)
    • 5GHz manually setting a country code (could only test DE)
    • Switching countries / setting new regulatory domains is now working, too
    • Download speed looks OK to me, in my case at least better than before Download >60MBit, Upload >30 Mbit on some initial tests.
    Not working yet:
    • WifiHAL (qcom-caf) does not work correctly. This may create multiple issues, tbd.
    • Connection bandwidth seems to be not reported correctly
    • I don't know if wowlan works (interrupts working?)
    • Stability: After 1-2 days without reboot wifi sometimes crashes but immediately reconnects. Reason not yet understood.

    Patches & Picks
    3

    New build​

    Warning, still experimental!

    Lineage Sources* as of 31 March 2021
    • Kernel sources* based on Linux 3.4.113 with backported wifi from 5.8.18 plus cherry-pick of the following changes:
      • bluetooth: fixed #ifdef'ed PM callbacks ("BTLowPower" wakelock) 50f16d16b32871c5ce97b029e68692008c848bb2
    • SELinux enforcing
    • Build as userdebug, normal loglevels
    • Contains Fix for Auto Rotation bug
    * For links to sources see 1st post. Z3Dual does not have official Lineage17.1 sources yet, bringup is in progress.


    Xperia Z3 (D6603):
    md5: 0833d989160f4eb7d3cb8bf88ec10d7f

    Xperia Z3c (D5803):
    md5: 8f793346144c83a7884d86783b1924bd

    Xperia Z3Dual (D6633):
    md5: 5be222194cf4f2e5da92e0e2b2c58fe4

    As always, feedback is welcome.
    2
    Hey
    Thanks @Mr.Tom_Tom for new build and @TheShadowOfAGhost20 for testing dev builds!
    today i installed the new release
    but i have some problems with recovery and boot
    after installing Lineage i cannot boot to recovery again
    i tried adb, android advanced boot options and "fastboot boot image.img"
    none of them taken me to recovery mode

    so i needed to install Magisk , OpenGApps , and rom itself with adb sideload and reboot to system because i can't boot to recovery again

    i'm now installing my apps for daily usage testing - i need about one or two week to test and use and see if anything is wrong or not

    for now WiFi problem is gone , i have full wifi access and both sims antenna

    again , thanks to everyone puts effort on this project (and sorry for bad English)

    i will update this post if i found anything
    1
    I need some feedback from people with a Z3/Z3c/Z3Dual to see if the new builds work in affected countries, where 5GHz wifi is not working on current custom ROMs like e.g. LineageOS 17.1. I would appreciate if you test one of the builds below and send me a full log.

    WARNING: The following builds are for debugging purpose only. Do not use them as a daily driver, as they have SELinux disabled and create excessive log entries. This ROM is not stable, some features are not yet implemented.

    Xperia Z3 (D6603):

    Xperia Z3c (D5803):

    Xperia Z3Dual (D6633) Update 10Jan2021:
    Z3Dual build has SELinux enabled already

    If possible, please follow these steps:
    1. Install ROM with TWRP for Android 10 or Lineage Recovery for 17.1
    2. If possible, factory reset the device. Be sure to get rid of all former Magisk modules which try to set country codes etc. (if applicable).
    3. Make sure a a local SIM card is inserted.
    4. Boot the device. Enable mobile data and enable wifi. Connect to a 5GHz capable access point or router.
    5. Optional: Increase log buffer size. This may be required as the kernel is set to verbose logging, creating large logfiles. You can do this via settings/developer options or via adb:
      adb logcat -G 8M
    6. Get close to the access point or router, so that the device would prefer 5GHz over 2.4GHz.
    7. Reboot the device and let wifi connect. Check if device uses a 5Ghz connection. (Ignore bandwith / speed for now.)
    8. Create a logfile, e.g. with this command via adb:
      adb shell logcat -d -b all > mylog.log
    The logfile may contain private information, so I recommend not to post them public. Together with the ligfile I would like to know
    a) Wifi 5GHz working?
    b) The country in which you have tested this.