[ROM] [ 6.0 ] NetHunter - Jiayu S3 [MT6752] - JiaYu S3 ROMs, Kernels, Recoveries, & Other Develo

Hi guys.
I have been working on a project to port NetHunter to Jiayu S3 (advanced for me , MT6752 platform) , working okay so far.
The rom contains two parts: Patched Kernel & NetHunter Files.
Kernel is modified and patched based on LoliTeam's project on Github.
mac80211 patched with script provided by Offensive-Security , HID manually patched regarding "Kernel-3.10-Nexus9.patch". Not exactly the same yet similar.
Additional Package of NetHunter is built under construction of [email protected]
Tested on
CM13 UNOFFICIAL for JIAYU S3a MT6752 (recommend)
AICP 6.0 UNOFFICIAL for JIAYU S3a MT6752
( Should work on JIAYU S3 basic too I guess. Never tried )
Progress:
OTG: Fix the 5V Power Supply for OTG so we can mount more than a USBdisk , like Mouse/Keyboard/JoyStick/WirelessAdapter , all avaliable now.
DuckHunter HID attack: working. Tho simple HID attack item didnt work , no idea why.
BadUSB MITM: RNDIS enabled. Capable to redirect the traffic of the computer you connected through your phone. (DHCPD on phone required, do it manually)
WiFi MITM: built-in wireless adapter does not support Monitor Mode so built-in Nethunter WiFi MITM does not work either. But we can do it manually , with a external USB via an OTG cable
Kali Chroot: Working
USBkeyboard(as HID device): Working
cSploit: Working
Shodan: Working
OpenVPN for Android: Working
VNC: Working
MSF: Working
RF Analyzer: Working
SDR softwares: Working
Not working:
aircrack-ng toolkit: seldom working. But can be replaced by manually command.
War Driving: not working normally , because aircrack-ng. Not planning a fix.
Router Keygen: Only support built-in adapter. Giving it up.
Problems:
Battery Power is consumed faster.
Easier to heat up.
I think they are bearable.
Installation Instructions:
To manually install , there is a long way to go.
Download ManuallyFlashImage.zip and unzip.
1. get a SP_FlashTool with a stock 5.1.1 RC5 firmware.
I have done most of the job.
Replace recovery.img with a TWRP one.
Modify scatter.txt to enlarge the partition of boot , recovery and system (I enlarged them * 2 , * 2, * 1.5)
You just need to select "download only" to "Format all and Download"
2.Get the roms ready in sdcard. I got [ cm13 , opengapps-mini , supersu , nethunter, xposed-framework ]
Vol-Up + Power
Vol-Up to select recovery and Vol-Down to confirm.
Wipe everything EXCEPT micro sdcard.
Install the roms in order.
CM13 - reboot to system - reboot to recovery - opengapps-mini - supersu - xposed - nethunter .
Screenshots (AICP)
Credits:
M.A.D.
DKingCN
LoliTeam
Offensive-Security
Download Link:
ManuallyFlashImage.zip
Keep track or commit:
@ https://github.com/offensive-security/kali-nethunter
@ https://github.com/DKingCN/nethunter-devices
@ https://github.com/DKingCN/android_kernel_jiayu_s3_h560
@ https://github.com/DKingCN/android-keyboard-gadget

i like that otg feature where you can plug in more than one. i hope that can be implemented in nougat too.
first time i hear about this nethunter, is that some kinda like linuxdeploy? where you can launch a desktop distros?

ak0ztik said:
i like that otg feature where you can plug in more than one. i hope that can be implemented in nougat too.
first time i hear about this nethunter, is that some kinda like linuxdeploy? where you can launch a desktop distros?
Click to expand...
Click to collapse
OTG might be avaliable on nougat , too.
I havent seen the source code of 7.0 kernel so I cant say for sure but most likely there should be OTG configuration.
Nethunter is a professional security package for android where you can do penetration test.
check NetHunter
Simplely it can be seen as Kali Linux on android.
And yes , local VNC server is avaiable so you can access local chroot kali desktop. Seems like gnome2.

I'm missing something
So you used kernel repo, that is a clone from mad repo, yet where's the credits?
Call me a jackass but this is the exactly reason why there's no much development on this devices.
Ever since M.A.D. released their GPL (and more non-GPL repos like device &vendor trees)
People had been using ( and good) and making kernels & semi-compiled cm builds forgetting the ones that had the heavy work on making those trees & releasing repos to the public ( that was an huge headache )...
Well done
As the project itself , looks cool

superdragonpt said:
I'm missing something
So you used kernel repo, that is a clone from mad repo, yet where's the credits?
Call me a jackass but this is the exactly reason why there's no much development on this devices.
Ever since M.A.D. released their GPL (and more non-GPL repos like device &vendor trees)
People had been using ( and good) and making kernels & semi-compiled cm builds forgetting the ones that had the heavy work on making those trees & releasing repos to the public ( that was an huge headache )...
Well done
As the project itself , looks cool
Click to expand...
Click to collapse
I forked the kernel from LoliTeam where the project can be found no link between MAD.
I am not a historian but I checked the commits and decide that MAD should be the origin of the copy of kernel so the credit is added.

Can be used kali linux from framebuffer in this project ?

(Request) help
Using magisk we can install universal full kali net hunter on miui or any other custom android rom
Which works almost perfectly
But
to do advanced stuff like wifi related stuff we need a external adapter i already has a fully supported wifi adapter
But the problem is to use a external adapter through otg we need a kernel which support wireless adapter, adapter driver built in
(Like most of the official device oneplus nexus lg samsung has "Any kernel" its a kernel available for nexus devices fully supports nethunter has wifi adapter driver built in)
Even the net hunter detects the adapter (cheked using "lsusb" command, it shows apater name chipset) but we cant do anything on off nothing because of that kernel compablity
So is there any kernel has this type of functionility available for note 5 pro whyred
If answer is no
Then im requesting Devs to make or port one
Since there is both stock and nethunter kernel source available in internet
So it will be not that difficult to port
(even previous year note 4 note 3 has a ported kernel which fully functional with net hunter)
So why not for our star
So plz its an request
A rom for net hunter will be great but
A kernel which support wireless adapter and other functionality is enough
Thanks in advance

[email protected] said:
Using magisk we can install universal full kali net hunter on miui or any other custom android rom
Which works almost perfectly
But
to do advanced stuff like wifi related stuff we need a external adapter i already has a fully supported wifi adapter
But the problem is to use a external adapter through otg we need a kernel which support wireless adapter, adapter driver built in
(Like most of the official device oneplus nexus lg samsung has "Any kernel" its a kernel available for nexus devices fully supports nethunter has wifi adapter driver built in)
Even the net hunter detects the adapter (cheked using "lsusb" command, it shows apater name chipset) but we cant do anything on off nothing because of that kernel compablity
So is there any kernel has this type of functionility available for note 5 pro whyred
If answer is no
Then im requesting Devs to make or port one
Since there is both stock and nethunter kernel source available in internet
So it will be not that difficult to port
(even previous year note 4 note 3 has a ported kernel which fully functional with net hunter)
So why not for our star
So plz its an request
A rom for net hunter will be great but
A kernel which support wireless adapter and other functionality is enough
Thanks in advance
Click to expand...
Click to collapse
Android kernel is device-specific. You cant flash one kernel to another device.

Related

Wont connect to USB

Hey,
I connected external WiFI adapter to my Xperia Z3, and it doesn't work. Any idea how to make device recognise/connect to the adapter?....
By my understanding of that Android is technicaly based on Linux kernel, you would need a kernel module for taht WiFi dongle or kernel that Supports it (Driver compiled in kernel)...
Why external WiFi?
I want to use reaver, Z3's WiFi doesn't support monitor mode.....
And is this even possible with rooted phone, while keeping locked bootloader?...
David47 said:
I want to use reaver, Z3's WiFi doesn't support monitor mode.....
And is this even possible with rooted phone, while keeping locked bootloader?...
Click to expand...
Click to collapse
In theory yes. You would need kernel module driver compiled for that kernel you are running. Drivers in Linux can be compiled in the kernel or provided as module. So grab source code compile as module and insert module (insmod) from terminal...
Sent from my D6603 using xda Forum
Sony Xperia Z3 NetHunter Kernel monitor mode
ondrejvaroscak said:
In theory yes. You would need kernel module driver compiled for that kernel you are running. Drivers in Linux can be compiled in the kernel or provided as module. So grab source code compile as module and insert module (insmod) from terminal...
Sent from my D6603 using xda Forum
Click to expand...
Click to collapse
Helo Friends
I have the latest KaliLinux + Nethunter installed on Sony Xperia Z3 RooT / Boot unlocked MM 6.0.1 - 23.5.A.1.291 ((Kernel: 3.4.0-perf-gc14c2d5)) according to this instruction:
http://www.hackcave.net/2017/05/install-kali-nethunter-on-any-android-device.html
everything works terminal, SSH, VNC, etc., but the network card
TP-LINK TL-WN722N does not want to wake up: (((
in the Kali Terminal, the "lsusb" command shows the adapter connected to the OTG cable with power supply:
Bus 001 Device 003: ID 0cf3: 9271 Atheros Comuni ..... AR9271
, but the green light on the usb wi-fi card does not shine
Here I have a question: does my kernel support the modules needed to support external wifi ???
what's the kernel under my system ???
My English is Google Translator I wrote matter-of-fact .............
Thank you very much for any advice

[Kernel][Nethunter][Testing][Want Help][CM-14.1][Monitor Mode]Nexmon

So,I was packing up my stuff in my house to move to Hostel when I found a network adapter.In the past I owned one for my Kali Pentesting.Then I gave it up for Exams and never saw it again.Now I had free time and wanted to mess with the college hostel's WiFi.But due to the rules I am not allowed to bring in any "Level 3" devices such as Laptops PC's.All had to be done on a Mobile which should be cheap and When the time comes disposed of easily.I tried buying a Nexus 5 devices but couldn't find in my price range (50$).So instead I bought the Note 3(Great Success)Now all I needed was a Patched kernel.I was going to build one using the cm-14.1 official sources.But while I was searching for solution I found Nexmon.I tried the firmware for bcm4339 using the app on /system/etc/WiFi/bcmdhd_sta.bin and entered the command su and nexutil -m2 and after that LD_PRELOAD=/system/lib/libfakeioctl.so airodump-ng wlan0 in the terminal whi and It worked(Greater Success)Now the I needed to run some tools which only worked in ChrootThis was no easy task.I again needed a Patched kernel.So,I followed the official guide to patch the kernel.I patched and built the kernel flashed it but found that my network adapter was obsolete.So,The only option remained was to use the Inner wireless card which supported injection and all the stuff(Not Natively).For the sake of research I Used Hijacker and used the setting for precommand as LD_PRELOAD=/system/lib/libfakeioctl.so and was able to capture/Decrypt/Crack Handshakes successfully against my own network.Now I am uploading here my compiled kernel with only one patch applied kernel.It's literally the cm kernel with only one patch.I need help in achieving 2 things.
1-Enable native monitor mode without LD_PRELOAD
2-Enable monitor mode internally in chrooted Kali.
Here is the boot.img just flash it and test it with external mode.
I will keep you updated on my Discovery in achieving the 2 above things.Any help would be welcomed.I should mention here that My profession isn't Computer related or any tech stuff.I am studying Medicine and Surgery along with a Speciality in Heart.So,You can't except me to do anything related to code.Again this is a testing build which I have tried on LOS14.1 and booted but couldn't verfiy the wlan1 status due to the fact That I don't currently have a wireless card.So,If you phone blew up,,Established communist empire,Robbed a bank,Tried to invade Russia,Attacked Samsung HQ or do anything I won't be responsible.
HERE'S THE LINK to the latest built nethunter(No chroor)cm13
https://drive.google.com/file/d/1IN1PQdq8Jk9UxOnH9G-gl1yk7X6ylHXr/view?usp=drivesdk
FIND 1
Cloned CM-14.1 repo
Cloned GCC 4.9 repo
Modified the build_kernel.sh for EUR(N9005)
Patched using:
wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
Built using
sh build_kernel.sh
Success!
Made boot.img
Here's it :https://drive.google.com/file/d/1Hixwje3rSz4z9E6D7GuRhgItyJ3EsBW7/view?usp=drivesdk
FIND 2
Cloned Xenial Jairus's repo.
Built ralink,realtek and atheros capable devices.
Working
Log:3 androifilehost approved my request
This is xenial kernel by jairus with little chunks removed
Huge thanks to @Jairus980 for the amazing kernel
Here is the link1 https://www.androidfilehost.com/?w=files&flid=285679
I have ralink which works perfectly.Furthermore there is a folder named ZImages which contain and will contain All the zImages which I will ever create for this device.Just Dowoad android kitchen unpack lineageboot.img or the @Jairus980 kernel img and replace the zImages with mine.
Side note.Most of the kernel Images doesn't work.
Side Side Note:
The Note 3 is a dead device and the only reason I am working on it is the fact that I wanted to test some things before I tear apart my main device.
Side Side Side note
I will only be working on hlte aka hltexx aka hlteur aka N9005 aka The Samsung Galaxy Note 3 Internation Snapdragon Variant.
If you accidentally brick your phone,Blew it up,Damaged your PC,Blew Up your House,Established Communism or Invaded Russia for that Matter and Point finger at me I will laugh at you.Furthermore Black Holes,Accidently ending up solving the antilife equation or summoning a wish granting dragons are Issues I can help with.
Thanks XDA for teaching me stuff
Links added
Sent from my Pixel 3 XL using Tapatalk

[HELP] Porting Treble to a Relatively Old Device

Before I start, here's what I have and what I don't have:
What I have:
BLU R1 PLUS
BLU R1 PLUS Kernel Source
A possible port device (An Intex Infie 3, to use the vendor from)
Experience with the linux command line
What I DO NOT have:
A kernel source for the Intex Infie 3
Now for the explaination:
I found several ARM64 devices and vendors, however the kernel source for my device is ARMv7 (even though the SoC is ARMv8).
I soon learnt that trying to build an ARM64 kernel would be a waste of time, so I decided to go searching for the needle in a haystack (which of course was another device, with android Oreo and an ARM kernel+vendor) I eventually found this Intex Infie device which I noticed did not have any arm64-related prop lines and ONLY had the zygote32 in boot.img
However I then discovered that even if the vendor would work, Marshmallow drivers in the stock kernel for the BLU R1 Plus will cause issues to boot any GSI because of the many changes between android versions AND I need "Binderised HALs"
I intend to use my cache partition as the vendor partition (which of course, I'll have to add early mount to the DTB in the kernel for)
I struggle with kernel editing and compiling as this is my first shot at developing for an unknown or unpopular device.
What I'm asking for:
I'm not asking for it to be done for me, but rather a hand that can point me in the right direction that would at least allow me to boot a GSI.​

Nethunter Kernel (Immensity Kernel)

*ONLY FOR AOSP (Verified working on Evolution X)
This is my first Nethunter Kernel build. Based on UtsavTheGreat's Immensity Kernel this port provides all the benefits of the original Kernel with the added Nethunter functionality.
What's tested and working:
• Internal wifi monitor mode (Use the provided custom command in Nethunter app)
• Hid support (In the USB Arsenal section of the Nethunter app select hid USB function, disable adb and then click set USB function)
• External adapter support (TP-LINK TL-WN722N Tested, you may need to manually copy your WiFi card's firmware in "/vendor/firmware" from the provided zip. Also it appears as Wlan2 instead of Wlan1 if that matters)
Installation:
*Assuming you already have Magisk (and the BusyBox Magisk module), Nethunter store, Nethunter app, Kali chroot and Nethunter terminal installed.*
1) Flash the Nethunter_final.zip
2) Enjoy
Big thanks to the creator of Immensity Kernel
Source: https://github.com/Moto-John/kernel_xiaomi_raphael
Changelog:
•5/8/20 -> Fixed HID bug
Was waiting for someone to make this! Thanks!
Did you think about adding the drivedroid patch too?
Sent from my K20 Pro using XDA Labs
dr460nf1r3 said:
Was waiting for someone to make this! Thanks!
Did you think about adding the drivedroid patch too?
Click to expand...
Click to collapse
I think you can do the same thing from the USB Arsenal section in the Nethunter App
Edit: No, wait. You are right. Will try to fix it
Edit 2: Figured out it works fine as it is. Just booted an iso from it
moto-john said:
I think you can do the same thing from the USB Arsenal section in the Nethunter App
Edit: No, wait. You are right. Will try to fix it
Edit 2: Figured out it works fine as it is. Just booted an iso from it
Click to expand...
Click to collapse
Crazy. Thats pretty much all I wanted since this way the phone can replace usb sticks
Sent from my K20 Pro using XDA Labs
moto-john said:
*ONLY FOR AOSP (Verified working on Evolution X)
This is my first Nethunter Kernel build. Based on UtsavTheGreat's Immensity Kernel this port provides all the benefits of the original Kernel with the added Nethunter functionality.
What's tested and working:
• Internal wifi monitor mode (Use the provided custom command in Nethunter app)
• Hid support (In the USB Arsenal section of the Nethunter app select hid USB function, disable adb and then click set USB function)
• External adapter support (TP-LINK TL-WN722N Tested, you may need to manually copy your WiFi card's firmware in "/vendor/firmware" from the provided zip. Also it appears as Wlan2 instead of Wlan1 if that matters)
Installation:
*Assuming you already have Magisk (and the BusyBox Magisk module), Nethunter store, Nethunter app, Kali chroot and Nethunter terminal installed.*
1) Flash the Nethunter_final.zip
2) Enjoy
Big thanks to the creator of Immensity Kernel
Source: https://github.com/Moto-John/kernel_xiaomi_raphael
Click to expand...
Click to collapse
Sir plz help how to add specific WiFi card firmware plz provide full tutorial
Ralink RT5370 WiFi chipeset ... support...?
Is injection mode also work with internal wifi adaptor?
[email protected] said:
Is injection mode also work with internal wifi adaptor?
Click to expand...
Click to collapse
Unfortunately no. Only monitor mode is supported. If you want injection you have to use am external wifi adapter
swapnilj210f said:
Ralink RT5370 WiFi chipeset ... support...?
Click to expand...
Click to collapse
Have you checked if it's recognised without a specific driver first?
Can miui12 be used?
DKarls said:
Can miui12 be used?
Click to expand...
Click to collapse
It's for AOSP only, so probably no
moto-john said:
It's for AOSP only, so probably no
Click to expand...
Click to collapse
I am on latest Evolution X (https://forum.xda-developers.com/k20-pro/development/rom-evolution-x-elle-t4179163), Magisk 21.1, Busybox 1.31.1, have nethunter store, app and terminal installed and chroot is working. Installed it with:
https://forum.xda-developers.com/k20-pro/how-to/guide-how-to-install-kali-nethunter-t3998623
I flashed your kernel via twrp. But unfortunately HID is not working. I dont know what i should do anymore. Maybe you could help.
Thanks for all your work so far
EDIT: Could it fix with a fresh reboot, great work my friend
---------- Post added at 02:15 AM ---------- Previous post was at 01:42 AM ----------
moto-john said:
I think you can do the same thing from the USB Arsenal section in the Nethunter App
Edit: No, wait. You are right. Will try to fix it
Edit 2: Figured out it works fine as it is. Just booted an iso from it
Click to expand...
Click to collapse
which iso did you test? ive tryed it with a kali linux live system and it didnt work.
moto-john said:
*ONLY FOR AOSP (Verified working on Evolution X)
This is my first Nethunter Kernel build. Based on UtsavTheGreat's Immensity Kernel this port provides all the benefits of the original Kernel with the added Nethunter functionality.
What's tested and working:
• Internal wifi monitor mode (Use the provided custom command in Nethunter app)
• Hid support (In the USB Arsenal section of the Nethunter app select hid USB function, disable adb and then click set USB function)
• External adapter support (TP-LINK TL-WN722N Tested, you may need to manually copy your WiFi card's firmware in "/vendor/firmware" from the provided zip. Also it appears as Wlan2 instead of Wlan1 if that matters)
Installation:
*Assuming you already have Magisk (and the BusyBox Magisk module), Nethunter store, Nethunter app, Kali chroot and Nethunter terminal installed.*
1) Flash the Nethunter_final.zip
2) Enjoy
Big thanks to the creator of Immensity Kernel
Source: https://github.com/Moto-John/kernel_xiaomi_raphael
Click to expand...
Click to collapse
Trying to get a AR9271 chipset to work. Cant load modules with modprobe: modprobe: FATAL: Module ath9k_htc not found in directory /lib/modules/4.14.191-iMMENSITY-NethunterBuild-John//9938110c92
That is obviosuly no directory. In which directory do i have to copy the firmware? Which folder do you mean with /vendor/firmware?
Copyied the firmwares to /usr/lib/firmware and /lib/firmware, but still getting from dmesg that it couldnt found a firmware
chikko80 said:
Trying to get a AR9271 chipset to work. Cant load modules with modprobe: modprobe: FATAL: Module ath9k_htc not found in directory /lib/modules/4.14.191-iMMENSITY-NethunterBuild-John//9938110c92
That is obviosuly no directory. In which directory do i have to copy the firmware? Which folder do you mean with /vendor/firmware?
Copyied the firmwares to /usr/lib/firmware and /lib/firmware, but still getting from dmesg that it couldnt found a firmware
Click to expand...
Click to collapse
You just have to copy the whole ath9k_htc folder in /vendor/firmware. Then it should recognize the firmware
chikko80 said:
Trying to get a AR9271 chipset to work. Cant load modules with modprobe: modprobe: FATAL: Module ath9k_htc not found in directory /lib/modules/4.14.191-iMMENSITY-NethunterBuild-John//9938110c92
That is obviosuly no directory. In which directory do i have to copy the firmware? Which folder do you mean with /vendor/firmware?
Copyied the firmwares to /usr/lib/firmware and /lib/firmware, but still getting from dmesg that it couldnt found a firmware
Click to expand...
Click to collapse
Just realized you just couldn't find the vendor folder, If you use the miX file manager you should see it under the root section
https://streamable.com/lixw7d
moto-john said:
Just realized you just couldn't find the vendor folder, If you use the miX file manager you should see it under the root section
https://streamable.com/lixw7d
Click to expand...
Click to collapse
Yeah i could fix it meanwhile thank you
Everthing except drivedroid works like expected now ! do you have any advice? i tried different linux distros as well as different modis in drivedroid. I also tried the build-in image mounter of nethunter. I could not get it to work. You said u could boot. With which settings and distro did you tried it?
greetings chikko
chikko80 said:
Yeah i could fix it meanwhile thank you
Everthing except drivedroid works like expected now ! do you have any advice? i tried different linux distros as well as different modis in drivedroid. I also tried the build-in image mounter of nethunter. I could not get it to work. You said u could boot. With which settings and distro did you tried it?
greetings chikko
Click to expand...
Click to collapse
It definitely is a bit finicky. What I tested was linux mint and the built-in mounter. It definitely didn't want to work at first but after some plugging, unplugging and a few reboots which are seemingly unrelated it then worked pretty consistently every time I tried it
moto-john said:
You just have to copy the whole ath9k_htc folder in /vendor/firmware. Then it should recognize the firmware
Click to expand...
Click to collapse
Where can I find such firmware folder for rtl8812au ? Thanks in advance...
chikko80 said:
Trying to get a AR9271 chipset to work. Cant load modules with modprobe: modprobe: FATAL: Module ath9k_htc not found in directory /lib/modules/4.14.191-iMMENSITY-NethunterBuild-John//9938110c92
That is obviosuly no directory. In which directory do i have to copy the firmware? Which folder do you mean with /vendor/firmware?
Copyied the firmwares to /usr/lib/firmware and /lib/firmware, but still getting from dmesg that it couldnt found a firmware
Click to expand...
Click to collapse
Any idea where I could get such firmware folder for rtl8812au?

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

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
Kernel:
backported and configured brcmfmac, cfg800211 wireless configuration API and wireless network stack from linux-stable v5.8 by adopting the compatibility patches from the linux backporting project.
updated Shinano device tree, updated Z3, Z3c and Z2 (Z2 test needed!) defconfigs (unset bcmdhd and enabled brcmfmac) and removed board-sony_shinano-wifi.o in the arch-msm makefile
Note: the backported drivers and compatibility-patches are located in a separate backports/ subdirectory
Sorry, this is work in progress and contains some hacks, to be cleaned up later
--> https://github.com/LineageOS/androi...1...Tom1000:lineage-17.1-driver-backport-v5.8
Vendor blobs / device z3(c): removed proprietary firmware and replaced that by publicly available firmware for bcm4339 on linux-firmware.git
z3c --> https://github.com/LineageOS/androi.../lineage-17.1...Tom1000:lineage-17.1-brcmfmac
z3 --> https://github.com/LineageOS/androi.../lineage-17.1...Tom1000:lineage-17.1-brcmfmac
Shinano-common: Use qcwcn instead of bcmdhd WLAN device, serve wpa_supplicant_overlay.conf
--> https://github.com/LineageOS/androi.../lineage-17.1...Tom1000:lineage-17.1-brcmfmac
msm8974-common: raise wpa_supplicant version (unknown if we need that) and update sysfs node for MAC address
--> https://github.com/LineageOS/androi.../lineage-17.1...Tom1000:lineage-17.1-brcmfmac
As a follow up, the driver seems to work quite stable already. I still have issues with nl80211 private commands, as a mainline brcmfmac does not seem to accept command strings passed via a libnl control socket like this:
qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c
@vknecht : I've seen your backporting work for the Xperia X. How does this work for Loire with SODP? Does e.g. a "set country code request" work for you, and if so, can you give me a hint?
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):
lineage-17.1-20201227-UNOFFICIAL-z3.zip
drive.google.com
Xperia Z3c (D5803):
lineage-17.1-20201227-UNOFFICIAL-z3c.zip
drive.google.com
Xperia Z3Dual (D6633) Update 10Jan2021:
lineage-17.1-20210110-UNOFFICIAL-z3dual.zip
drive.google.com
Z3Dual build has SELinux enabled already
If possible, please follow these steps:
Install ROM with TWRP for Android 10 or Lineage Recovery for 17.1
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).
Make sure a a local SIM card is inserted.
Boot the device. Enable mobile data and enable wifi. Connect to a 5GHz capable access point or router.
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
Get close to the access point or router, so that the device would prefer 5GHz over 2.4GHz.
Reboot the device and let wifi connect. Check if device uses a 5Ghz connection. (Ignore bandwith / speed for now.)
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.
nice work bro.
i live in iran and in this build my Z3 Dual detects wifi networks while the sim card is also connected.
but in 10 Jan 2021 update my phone can't detect my router's wifi unfortunately while the previous build could do it without problems.
hotspot turns on on both 2.4GHz and 5GHz.
in this new build cellular network and data are working.
Thanks @TheShadowOfAGhost20 !
Can you please run a root shell (E.g. by connecting via ADB, run adb root, then adb shell) and then
$> iw wlan0 scan → scan for networks
and then look if your access point is found?
Furthermore, can you please check which WiFi channel this particular router ist set to, and if possible the bandwidth?
Mr.Tom_Tom said:
Thanks @TheShadowOfAGhost20 !
Can you connect via ADB, run adb shell and then
$> iw wlan0 scan → scan for networks
and then look if your access point is found?
Furthermore, can you please check which WiFi channel this particular router ist set to, and if possible the bandwidth?
Click to expand...
Click to collapse
i did that but got this error: "/system/bin/sh: iw: inaccessible or not found"
but i found the cause: my wifi channel was set to 12. i changed it and then got detected!
TheShadowOfAGhost20 said:
i did that but got this error: "/system/bin/sh: iw: inaccessible or not found"
Click to expand...
Click to collapse
Sorry I forgot to write that you have to do this as root, I edited the post accordingly.
TheShadowOfAGhost20 said:
i found the cause: my wifi channel was set to 12. i changed it and then got detected!
Click to expand...
Click to collapse
Tha sounds reasonable. However, Channel 12 should be usable in IR.
Mr.Tom_Tom said:
Sorry I forgot to write that you have to do this as root, I edited the post accordingly.
Tha sounds reasonable. However, Channel 12 should be usable in IR.
Click to expand...
Click to collapse
channel 13 has detection problem too. the others are OK
.sorry erroneous post
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):
HiDrive
hidrive.ionos.com
md5: d7aaf1fea120df3e2aad10b3a2d32226
Xperia Z3c (D5803):
HiDrive
hidrive.ionos.com
md5: 456ff87441c3a63e8dc8c7a8d03bdf39
Xperia Z3Dual (D6633):
HiDrive
hidrive.ionos.com
md5: 1848681c82d608f3212f1ace621327cb
As always, feedback is welcome.
Has anyone found a bug/installed this latest build yet? lineage-17.1-20210320-UNOFFICIAL-z3dual
Finding this super stable.. The only thing that does not work for me is the advanced boot recovery that goes back into system, But that's a known issue.
Mr.Tom_Tom said:
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):
HiDrive
hidrive.ionos.com
md5: d7aaf1fea120df3e2aad10b3a2d32226
Xperia Z3c (D5803):
HiDrive
hidrive.ionos.com
md5: 456ff87441c3a63e8dc8c7a8d03bdf39
Xperia Z3Dual (D6633):
HiDrive
hidrive.ionos.com
md5: 1848681c82d608f3212f1ace621327cb
As always, feedback is welcome.
Click to expand...
Click to collapse
hi mr.tom. it's perfect as always, found no bug except wifi signal power, it's weak compared to stock roms but there was no difference in speeds. maybe it's because of wifi icon that shows little weaker signal.
and about overheating: i didn't test this build for long but while working with it i have noticed that my device is cooler than previous builds, maybe it's because of this new kernel.
i have recorded 4k for about 7 minutes then my phone rebooted i think that was because of too much heat, then i've reinstalled stock rom, however, stock rom's camera won't let me record much and the app shuts down because of heat, so i can't find out if stock rom can record 4k at least without rebooting.
i need to test this build for more time i hope the heating is now gone
and one question: can you port cyberian camera mod for these roms? or is that possible?
netwave said:
Has anyone found a bug/installed this latest build yet? lineage-17.1-20210320-UNOFFICIAL-z3dual
Finding this super stable.. The only thing that does not work for me is the advanced boot recovery that goes back into system, But that's a known issue.
Click to expand...
Click to collapse
lineage os recoveries have these problems yet, there's no fix for that, only the developer can fix it. currently the twrp works if you flash it to FOTAKernel partition but i think the twrp is useless because it doesn't install these builds.
Surely better to do: fastboot boot recovery-20201012-TESTING-z3dual.img rather than a "flash" recovery. What would be the point in flashing a recovery if its not working.
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
navidmafi said:
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
Click to expand...
Click to collapse
If your going to settings\system\developer options\advanced restart\power\restart recovery , Forget it! this method doesn't work for now, & will only boot you back into Lineage. It's an issue that hopefully get's fixed in the future.
But here's a better way of entering recovery without having to flash it...
Check all your drivers are installed correctly & make sure you have the correct recovery to hand.
Here's what I Command:
adb devices
adb reboot bootloader
fastboot devices
fastboot boot recovery-20201012-TESTING-z3dual.img
Good luck!
Hey again
Thanks to @netwave i can now boot to recovery without problems by going to fastboot from adb , and booting image directly by "fastboot boot"
while using devices after installing new release , i have a problem with WiFi connectivity
when i lock the screen by power button , the wifi disconnects
for example i use whatsapp a lot and when screen is locked wifi is not connected
i checked power settings - and even set the battery profile to "Quick" (and battery saver is off) but it did not help
is this a bug or a feature?
navidmafi said:
Hey again
Thanks to @netwave i can now boot to recovery without problems by going to fastboot from adb , and booting image directly by "fastboot boot"
while using devices after installing new release , i have a problem with WiFi connectivity
when i lock the screen by power button , the wifi disconnects
for example i use whatsapp a lot and when screen is locked wifi is not connected
i checked power settings - and even set the battery profile to "Quick" (and battery saver is off) but it did not help
is this a bug or a feature?
Click to expand...
Click to collapse
Have you tried without Magisk installed? Don't use v22.0 what ever you do as it disables WiFi
Ow
I'm using Magisk and it is version 22.0
and even root not works
should i reflash ?
Edit : Ok i'm flashing again now
navidmafi said:
Ow
I'm using Magisk and it is version 22.0
and even root not works
should i reflash ?
Click to expand...
Click to collapse
Install the Magisk uninstall.zip from recovery
when your back in Lineage your still have a disabled WiFi as Magisk does not uninstall correctly.
So Install the original boot extracted from the Lineage.zip to get things working again.
- adb devices
- adb reboot bootloader
- fastboot devices
- fastboot flash boot boot.img
- fastboot reboot
Then your be sorted.

Categories

Resources