[KERNEL] [Q] N9600 klabit kernel - Samsung Galaxy Note 9 (Snapdragon) ROMs, Kernels,

As most of you guys know Magisk will not work for us on the international snapdragon S9, S9+, and N9
So, I have made a custom kernel that will allow us to have root on stock pie firmware..
Files needed:
N9600:
klabit kernel V6.5
FK Manager n9600 kernel download configuration link
FK Manager n9600 GSI kernel download configuration link
Copy the n9600_q_vx.zip to your external sd card.
Make sure you have TWRP installed with instructions found in this thread.
Flash the n9600_q_vx.zip
Flash Magisk (only necessary if you have not flashed Magisk previously or if coming from a clean install from stock)
Reboot to system.
If you currently do not have a working lockscreen/pin/fingerprint setup, you will need to restore your stock boot.img either via backup or extract your boot.img from the official firmware and flash the img then flash my kernel.
Changelog:
Code:
V6.5
[LIST]
Merge OSRC: N9600ZHU5FTK1
[/LIST]
V6.4
[LIST]
Merge OSRC: G9650ZHS6DTG2
Merge OSRC: G9650ZHS7ETH1
Remove additinal SafetyNet flags from /proc/cmdline
Proc: Fake CMDline
Merge OSRC: G9650ZHU7ETI3
Merge OSRC: G9650ZHU7ETJ2
Expanded GSI kernel compatibility for Android 11 support
[/LIST]
V6.3
[LIST]
Merge OSRC: G9650ZHS6DTF1
Merge OSRC: G9650ZCU6ETF6
[/LIST]
V6.2
[LIST]
Merge OSRC: G9650ZCS6DTD5
[/LIST]
V6.1
[LIST]
Add powersave governor
Add conservative governor
Add ondemand governor
[/LIST]
V6.0
[LIST]
[*]7e123dad108c Import crownqlte && starqlte defconfigs
[*]824f70f8d070 Add .gitignore
[*]7d3612a88cbf Import G9600 and N9600 defconfig && initialize
[*]c1e7a35e59a7 Import G9600 and N9600 dts with verity removed
[*]0a587fae1745 Add option for gsi mtp driver
[*]10b851dfaa03 star2qlte: Initialize defconfig
[*]5f38f4cc0d99 Remove verity
[*]101dedaf7aec scripts: remove localversion + from kernel version strings
[*]c1b726584344 selinux: enable selinux faking
[*]70ed91e9c15a star2qltechn: Enable Samsung MTP driver
[*]9c88019d96fd drivers: usb: add separated Samsung MTP option
[*]6c54f88a648b star2qltechn: Update defconfig
[*]13a223ea3ed9 dts: disable avb,verify
[*]5c36fed8d37b Regen configs
[*]9a37c1921037 (osrc) OSRC: G9650ZCU6DTA9
[/LIST]
V5.9
- Small version bump to 5.9.
- Integrate auto patch of security patch date since Samsung slow af. (Credit to [user=4280397]@djb77[/user])
- Better GSI compatibility.
- Better OneUI compatibility for recent/most up-to-date firmwares.
V5.8
- Fix compilation issue for n9600
- Version update to V5.8
- Add changelog
- Update crownqlte defconfig
- OSRC: G9650ZCU6CSJ2
- Merge SM-N9600 defconfig and dts
V5.7
- Merge G9650ZHU5CSH6 source which includes fix for the recent zero day on android binder driver
- Prevents potential wake-lock while on wireless charger
- Merge G9650ZCU5CSI3 source which includes some Note9 camera integrations
- Adds support for wireless adapters based on Broadcom 43436 chipset
- Increased wifi security
- Increased wifi hotspot security
- DHD 100.13.36.1 - 2019.07.31
Security Patch
- CS8424803(By Choi Hyeonu) SI-14869: Moved the length check routine for the nlioc variable before accessing it in the wl_cfgvendor_priv_string_handler() function
DHD 100.13.36 - 2019.05.24
New Feature
- CS5350346(By Jung Junyeop) Fake AP - Fixed to provide correct channel information for beacon receive result
- Enable to support Fake AP
(This patch should be sync up with FW 13.38.60(4361B0), FW 13.50.10(4361B2) or higher version)
- WIPS attack warning reporting
(This patch should be sync up with FW 13.38.60(4361B0), FW 13.50.10(4361B2) or higher version)
Security Patch
- CS8069399(By Kang Hyung Wook) SI-13926 Fixed use-after-free in the wl_cfg80211_set_mgmt_vndr_ies function
Others
- CS7939107(By Kim Tae-Yong) Included memdump value prints in the dump information
- Added missing options into the Kconfig file
DHD 100.13.32 - 2019.04.26
Kernel Panic
- CS7696936(By Min SungBin) Fix misspelling of CUSTOMER_HW4_DEBUG definition
- CS7706946(By Min SungBin) Fixed to avoid kernel panic due to race condition of cfg->scan_request
Security Patch
- CS7860687(By Kang Hyung Wook) SI-12455: Fixed use-after-free write in dhd_set_monitor() function
- CS7949699(By Choi Hyeonu) SI-14074: Fixed Security issue, Potential stack-based buffer overflow in dhd_pktfilter_offload_set
- CS7956197(By Choi Hyeonu) SI-14130: Fixed the multiple NULL pointer dereference in wl_cfgvendor.c
Others
- CS6844193(By MinSoo Kim) Changed log level of LQCM report
- CS7099653(By Nitesh Suthar) Enabled frameburst to enhance throughput for BCM43436 projects
- CS7362375(By Gu Ja Heon) Added Private command in order to receive every beacon in Suspend
- CS7526157(By Suthar Nitesh) Fixed DualBandConcurrency field in .softap.info
- CS7765577(By Park Heebae) Wifi-on time reduction by reading necessary CIS information
- CS7827257(By Choi Hyeonu) Fixed kernel panic caused by invalid memory access
- CS7834653(By Kang MinHo) Removed redundant TX error prints during suspend in SDIO
- CS7884436(By Beom Jip Kim) Fixed to cancel p2p listen offloading by framework scan request
- CS7892037(By Sun Yinghan) Fixed to support W2018/KELLY Android P OS upgrade
DHD 100.13.31.1 - 2019.04.19
Others
- CS4726130(By Min Hyun-Ki) Added User priority to AC mapping in case of various DSCP types that may not compatible with RFC8325
- CS6951980(By Min Hyun-Ki) Changed the UP to AC mapping of CS6 based on the RFC8325
DHD 100.13.31 - 2019.02.15
Others
- CS7241767(By LEE EONJI) Added more logs for the DPC schedule error debugging
- CS7299641(By Kim MinSoo) Enabled LB_TXP for MSM8998 Platform
- CS7323375(By kwon Jaecheol) Enabled the softap.info file support in BCM4359 platform
- CS7362527(By Hyeonu Choi) Cancel P2P listen offloading operation when SoftAP brings up
- CS7363197(By Junhak Lim) Fixed prevent issues
- CS7386068(By Lee Gibum) Disabled frameburst for "2.4Ghz + SoftAP" (Drame & Great projects)
- Fixed the scan failure when p2p listen offload is triggered
- Fixed to abort scan when connection/disconnection requested
- Prevented the bus suspend by the PCIe Runtime PM from abnormal ISR status
V5.5
- Merge G9650ZHU5CSG8 source which includes some stock Samsung debugging sanity checks and increase of stability
- Prevent possible IO/wake-locks when accessing sdcard
V5.4
- Merge G9650ZCU5CSFB source which includes additional ethernet support and additional battery stats support
- Removed more verity from the appended dtb
- Finally fixed FK Manager compatibility!! (ie no longer need to reflash Magisk)
V5.3
- Added Conservative gov for G9600 (sorry I could have sworn I included this in V5.2)
- Fix stability issues
- Remove Interactive governor
V5
- Removed Defex
- Removed Samsung rooting protections
- Removed RKP (Realtime Kernel Protection)
- Added Conservative cpu governor
- Sanity checks for video drivers and the power share feature
- Added support for broadcom 43456 wireless cards
- Added ddhd random mac scanning
- Added more security to wifi hotspot to protect from ARP attacks,
- CS7111512(By LEE EONJI) Detect turn on failure in factory binary
- CS7299329(By Kim Yu-Kyoung) Fixed SoftAP CTS fail due to interface creation failure
- Blocked WLC_E_ROAM event to fix wakes-up frequently under weak signal AP
- Changed error results of GETSTAINFO private command to BCME_UNSUPPORTED if the BIGDATA_SOFTAP is not supported
- Fixed kernel panic during mfg mode interface creation
- CS7091164(By Kang Hyung Wook) SI-13561: Fixed kernel heap overflow security issue at dhdpcie_downloadvars
- CS7091371(By Kang Hyung Wook) SI-13584: Fixed kernel panic due to access to not allocated memory
- CS6785460(By Jeong Min Cheol) Send HANG event to the framework for the sequential private command failure
- CS7003600(By Kang MinHo) Support android private command for restoring roam/scan parameters
- CS7094302(By Yoon YeJi) Fixed connect failure caused by connection information not initialized
- CS7103552(By LEE EONJI) Fixed the recovery routine to fix the D3_ACK timeout issue
- CS7119174(By Kim Seong Hwan) Avoid HANG event indication due to sequential private command failures in case of unsupported error
- CS7137399(By Yoon YeJi) Fixed connect failure caused by connection information not initialized
- CS7141596(By Suthar Nitesh) Fixed MHS operates with STA mac address
- Control HANG report for consecutive Android private command failure by sysfs
- Increased the NUMBER_SEQUENTIAL_PRIVCMD_ERRORS from 4 to 7
- Taking a SOCRAM dump in the sequential private command error case
- CS6935603(By Hong Min Whoa) SI-13638: Fixed Kernel warning message by restructuring the DMA_LOCK and DMA_UNLOCK
- CS7091347(By Kang Hyung Wook) SI-13585: Fixed kernel panic due to write buffer exceeds the size
- CS6650676(YeJi Yoon) Fixed mismatch connect status between framework and DHD
- CS6678972(By Hwang MinSik) Fixed TIS/TRP test failure and high current issue from sysfs change
- CS6715508(By Choi Hyeonu) Exported sysfs for ADPS bad AP list
- CS6744438(By Yoon Jae Ho) Fixed duplicated roaming notification to WPA supplicant during FT roaming
- CS6769798(By Kim Beom Jip) Fixed for GraceR/4359c0 P OS P2P connection failure issue
- CS6856753(By kwon Jaecheol) Added the dual interface capability filed in the SoftAP info file (.softap.info)
- CS6870793(By Tae-Yong Kim) Fixed prevent issues
- CS6871138(By Lee Gibum) Configure AER registers to debug PCIE ERROR ATTN issues
- CS6880409(By Sung-gi Choi) Fixed prevent issues
- CS6887298(By Min Whoa Hong) Fixed prevent issues
- CS6928243(By Sung-gi Choi) Fixed prevent issues
- CS6935678(By Hwang MinSik) Fixed array out of bound issue from sysfs mac address
- CS6984743(By Min SungBin) Print DPC schedule request timestamp for ROT issue
- CS6985032(By LEE EONJI) Enabled DHD_RECOVER_TIMEOUT for D3_ACK missing case on 4359C0 and 4361B0
- CS6993967(By Jeong Min Cheol) Added last_d3_inform_timestamp to check root cause of ROT
- CS7042030(By Min SungBin) Implemented the new API to sync up the status between RC and EP to avoid unwanted L1ss configuration
- Changed the DHD_COMMON_DUMP_PATH for non-BCM4375 Android P OS projects
- DHD driven random mac enable by default for 4361B0
- Enable frameburst for standalone 2.4GHz SoftAP on Dream and Great project
- Wi-Fi Sharing-Lite feature support for Android P OS
- CS6461136(By Min SungBin) Fixed for kernel panic due to stack overflow at get_roamscan_channel_list()
- CS6302259(By Kang Hyung Wook) Supported DHD driven Random MAC feature
- CS6324532(By Choi Hyeonu) Port files under /data/vendor/conn to sysfs after Android P OS
- CS6396705(By Min SungBin) Added additional timestamp log to debug resumed on timeout issue
- CS6398346(By Hyeonu Choi) Fixed prevent issues
- CS6516071(By Choi Hyeonu) Fixed for corner case of schedule_timeout() API at dhd_timeout_expired()
- CS6536174(By Choi Hyeonu) CS6433018(By Choi Hyeonu) Fixed prevent issues
- CS6594869(By Min SungBin) Triggering Kernel panic for the scheduling problem only if the memdump mode is enabled
- CS6600348(By LEE EONJI) Implemented 4359c0/GraceR P OS Wi-Fi sharing feature
- CS6658253(By Choi Hyeonu) Fixed random mac setting issue instead of otp mac
- CS6678972(By Hwang MinSik) Fixed TIS/TRP test failure and high current issue from sysfs change
- CS6713692(By Kim MinSoo) Fixed NET_RX delay issue
- CS6769798(By Kim Beom Jip) Fixed for GraceR/4359c0 P OS P2P connection failure issue
- CS6791516(By Lee Gibum) Fixed the unexpected frameburst enable on standalone SoftAP in 2GHz
- CS6791556(By Hwang MinSik) Removed CR/LF character at .cid.info including sysfs
- CS6809444(By Hwang MinSik) Unified DHD_COMMON_DUMP_PATH for the Android P OS project of all chips
- Changed the timestamp value to Kernel local time to debug resumed on timeout and scan timeout issues
- Defer RxBuf post size based on the rxbufpost_sz iovar return value for monitor mode
- Disabled DHD_LB_IRQSET for Exynos8890 platform
- Dump AER HeaderLog registers in configuration space for PCIe debugging
- Dumping PCIe registers for PCIe debugging enhancement
- Fixed VHT features enable issue from GraceR project
- Fixed unexpected RSDB mode configuration for legacy RSDB chip
- Implemented the debug code to check if the scan timeout or resumed on timeout happens due to the DPC scheduling problem
- Refined TDLS initialization code
Kernel source: https://github.com/klabit87/android_kernel_samsung_sdm845
Thanks to @tylerhole and the @stang5litre test group for testing anything I throw at them!
As well as @hibuk , @Lavachita , and @HakandSack for testing the Note9 specific kernel.
Thanks to @djb77 for the ramdisk patches
You guys are the best!

Reserved

I've had it working for a while using your instructions.. something I'm missing here ?
Sent from my SM-N9600 using Tapatalk

mentathf said:
I've had it working for a while using your instructions.. something I'm missing here ?
Sent from my SM-N9600 using Tapatalk
Click to expand...
Click to collapse
I don't understand what you mean.
This is an updated pie kernel.
I haven't made anything for pie on the note9 before.
Sent from my Pixel 2 XL using Tapatalk

It feels so good to be rocking pie rooted on the n96000. Kinda hilarious because i went and purchased an n960fds last month to get pie/root. I no longer have to live without google camera as it doesnt work on eynos .Thanks alot!

Thank you so much @klabit87 for your continued support of this amazing phone

@klabit87 Thanks a lot for the kernel. I just wonder if after flash, something get lost.. for example encryption.. Samsung health.. or any knox crap dependencies.. Thanks!

andrew.mackew said:
@klabit87 Thanks a lot for the kernel. I just wonder if after flash, something get lost.. for example encryption.. Samsung health.. or any knox crap dependencies.. Thanks!
Click to expand...
Click to collapse
Anytime you trip Knox when you unlock your bootloader you will loose something. Encryption is an option and a choice.
Health and whatnot can be fixed but the kernel is not responsible for it.
Sent from my Pixel 2 XL using Tapatalk

Kernel source: https://github.com/klabit87/android_kernel_samsung_sdm845
Thanks to @tylerhole and the @stang5litre test group for testing anything I throw at them!
As well as @hibuk , @Lavachita , and @HakandSack for testing the Note9 specific kernel.
You guys are the best![/QUOTE]
I successfully compiled kernel with my needed modules, however when using "anykernel" to flash to device, all good except NO WIFI.
I also used the "tar-Tool_Odin3-v3.10.7_by_mkh.mourad" used pulled boot.img from phone to test if tar-tool worked for me and wifi worked, then replaced my compiled Image.gz-dtb , everything works but no wifi.
I pulled proc/config.gz from my working wifi device
then renamed to config_defconfig
then compiled
ran thru tar-tool ,converted to md5.tar
flashed with odin
Works as before NO WIFi
EDIT: Is it possible Magisk has something to do with the kitchen not repacking everthing into new boot.img?
Going to try to repack using magisk tools..
Any sugestions would be helpfull

Homefix said:
Kernel source: https://github.com/klabit87/android_kernel_samsung_sdm845
Thanks to @tylerhole and the @stang5litre test group for testing anything I throw at them!
As well as @hibuk , @Lavachita , and @HakandSack for testing the Note9 specific kernel.
You guys are the best!
Click to expand...
Click to collapse
I successfully compiled kernel with my needed modules, however when using "anykernel" to flash to device, all good except NO WIFI.
I also used the "tar-Tool_Odin3-v3.10.7_by_mkh.mourad" used pulled boot.img from phone to test if tar-tool worked for me and wifi worked, then replaced my compiled Image.gz-dtb , everything works but no wifi.
I pulled proc/config.gz from my working wifi device
then renamed to config_defconfig
then compiled
ran thru tar-tool ,converted to md5.tar
flashed with odin
Works as before NO WIFi
EDIT: Is it possible Magisk has something to do with the kitchen not repacking everthing into new boot.img?
Going to try to repack using magisk tools..
Any sugestions would be helpfull[/QUOTE]
I meant to respond to this earlier but no magisk isn't breaking wifi. You need to export a couple of variables before compiling.
Code:
export ANDROID_MAJOR_VERSION=p
export PLATFORM_VERSION=9.0.0
add those to your build script or just run them manually before running your build script and the wifi drivers will be included properly.

klabit87 said:
I successfully compiled kernel with my needed modules, however when using "anykernel" to flash to device, all good except NO WIFI.
I also used the "tar-Tool_Odin3-v3.10.7_by_mkh.mourad" used pulled boot.img from phone to test if tar-tool worked for me and wifi worked, then replaced my compiled Image.gz-dtb , everything works but no wifi.
I pulled proc/config.gz from my working wifi device
then renamed to config_defconfig
then compiled
ran thru tar-tool ,converted to md5.tar
flashed with odin
Works as before NO WIFi
EDIT: Is it possible Magisk has something to do with the kitchen not repacking everthing into new boot.img?
Going to try to repack using magisk tools..
Any sugestions would be helpfull
Click to expand...
Click to collapse
I meant to respond to this earlier but no magisk isn't breaking wifi. You need to export a couple of variables before compiling.
Code:
export ANDROID_MAJOR_VERSION=p
export PLATFORM_VERSION=9.0.0
add those to your build script or just run them manually before running your build script and the wifi drivers will be included properly.[/QUOTE]
OMG I have been googelin for 2 days ,Not a mention of that. Going to try now.

Homefix said:
I meant to respond to this earlier but no magisk isn't breaking wifi. You need to export a couple of variables before compiling.
Code:
export ANDROID_MAJOR_VERSION=p
export PLATFORM_VERSION=9.0.0
add those to your build script or just run them manually before running your build script and the wifi drivers will be included properly.
Click to expand...
Click to collapse
OMG I have been googelin for 2 days ,Not a mention of that. Going to try now.[/QUOTE]It was mentioned in the official kernel source release notes which should be included in the osrc branch.
Sent from my Pixel 2 XL using Tapatalk

How did the test build go @Homefix ?
Sent from my Pixel 2 XL using Tapatalk

In light of the most recent update to FK Manager see here for details ------->> https://twitter.com/franciscof_1990/status/1215673739435704320?s=20
I have added support for the kernel download configuration which will allow you to update directly within the app. It will also notify you when an update is ready.
Check the OP for the links to the configuration.
Just copy the link address and paste into the "Import a kernel download configuration" box and done.
You can remove and add different ones if you want as well.

Also wanted to note that I will still post the updates in the OP. I am not going to make the updates only available through the app.
With that said, V5.8 will drop today

New minor update to v5.9.
This will make using gsi and most up to date/latest firmware versions much easier and more compatible.
Sent from my Pixel 2 XL using Tapatalk

klabit87 said:
New minor update to v5.9.
This will make using gsi and most up to date/latest firmware versions much easier and more compatible.
Click to expand...
Click to collapse
Awesome, thanks man! Flashing through FKM worked perfectly as well. Everything seems to be running great.

klabit87 said:
How did the test build go @Homefix ?
Sent from my Pixel 2 XL using Tapatalk
Click to expand...
Click to collapse
Sorry I was away,
Yes it went perfect. Thank you.
However since android 4.4 I have compiled kernels and modules with ease.
I really don't have the time to commit to my hobby(Debian on Android) like I used to, so my reading and experience has slipped a bit.
Now I read Android 8.0 and up have "Modular Kernel splitting the device kernel into a system-on-chip (SoC), device, and board-specific deliverables ".
For reasons "ensure a workable booting system remains on the disk during an over-the-air (OTA) update. This approach reduces the likelihood of an inactive device after an update, which means fewer device replacements and device reflashes at repair and warranty centers" as explained here: https://source.android.com/devices/tech/ota/ab_updates.
Well that's all fine but I still cannot figure out how to tell the system upon bootup to load a specific module. How would I load the module from adb or terminal. The older way ,depmod -a , insmod , modprobe, seems to have no effect with android 8 and up.
I have successfully built modules with:
CONFIG_MODULES=y (and not with...CONFIG_MODULES=m)
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
After flashing kernel, I can see the module folders under /sys/module and within that folder is another, "parameters" and an empty "uevent" file. Within the "parameters" folder is a file "oom_pages" the content is "256"
So how would I load say "virtio"
The old way would work:
1st: depmod -a
2nd: modprobe virtio
Not working with android 8
By the way Im using ubuntu 16.04 image mounted here: mount -t ext4 -o rw,noatime /dev/block/mmcblk0p2 $mnt
$mnt=/data/local/Linux
As a side note: I like to play around with qemu , virt-manager, (windows-xp runs fast enough to be usable with this snapdragon)
and I can run full Minecraft , haha.

Homefix said:
Sorry I was away,
Yes it went perfect. Thank you.
However since android 4.4 I have compiled kernels and modules with ease.
I really don't have the time to commit to my hobby(Debian on Android) like I used to, so my reading and experience has slipped a bit.
Now I read Android 8.0 and up have "Modular Kernel splitting the device kernel into a system-on-chip (SoC), device, and board-specific deliverables ".
For reasons "ensure a workable booting system remains on the disk during an over-the-air (OTA) update. This approach reduces the likelihood of an inactive device after an update, which means fewer device replacements and device reflashes at repair and warranty centers" as explained here: https://source.android.com/devices/tech/ota/ab_updates.
Well that's all fine but I still cannot figure out how to tell the system upon bootup to load a specific module. How would I load the module from adb or terminal. The older way ,depmod -a , insmod , modprobe, seems to have no effect with android 8 and up.
I have successfully built modules with:
CONFIG_MODULES=y (and not with...CONFIG_MODULES=m)
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
After flashing kernel, I can see the module folders under /sys/module and within that folder is another, "parameters" and an empty "uevent" file. Within the "parameters" folder is a file "oom_pages" the content is "256"
So how would I load say "virtio"
The old way would work:
1st: depmod -a
2nd: modprobe virtio
Not working with android 8
By the way Im using ubuntu 16.04 image mounted here: mount -t ext4 -o rw,noatime /dev/block/mmcblk0p2 $mnt
$mnt=/data/local/Linux
As a side note: I like to play around with qemu , virt-manager, (windows-xp runs fast enough to be usable with this snapdragon)
and I can run full Minecraft , haha.
Click to expand...
Click to collapse
I haven't messed with modules in a long time. I just include what I want in the kernel instead of building modules lol.
I would have to do a little investigating to find the answer you're looking for tbh.
But that's awesome that you can run such different software on your device, mainly the qemu stuff.
If I recall correctly, you need to allow unsigned modules to be loaded as well as remove lkmauth from the kernel.
Sent from my Pixel 2 XL using Tapatalk

Kernels are updated and live for Android 10!

Related

Kexec-hardboot patch

In this post, I would like to explain what kexec-hardboot patch is and also bring it to light a bit more since until now, it was only burried in MultiROM thread.
@kernel developers: I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows me to boot any kernel without changing the boot partition. I realize that it is no small request, but the patch is not big, touches relatively stable parts of kernel and should not cause any problems. Thank you.
What is kexec?
It is syscall of Linux kernel, which allows you to boot another Linux kernel without restarting the device - "Linux boots itself". The functionality is equivalent to fastboot -c *cmdline* boot zImage initrd.img, but without PC and fastboot. It is fairly known thing, so more info at wikipedia and man kexec.
Standard kexec call unfortunatelly does not work on Nexus 7. It freezes somewhere, and it is very difficult to find out where - probably some of the drivers are not shut down/re-initialized properly, it is a commong thing among Android devices, which is why kexec-hardboot was made.
What is the difference between normal and hardboot exec?
Kexec-hardboot patch adds a real device restart to that process, so that all the drivers can be properly reinitialized. It stores new kernel to RAM, reboots the device as usual, and kernel from boot partition immediately jumps to the one which was stored to RAM before reboot.
Another difference is that both kernels must be patched. The "host" kernel requires a full patch, the one which is being kexecd' requires only two small compatibility patches.
To sumarize the process:
kexec --load-hardboot.... is called and kernel it loaded into RAM.
kexec -e is called. Special info is written to memory (to area which is not overwritten on reboot) and the device is rebooted.
After reboot, very early in the boot process, kernel checks if that special info is present in RAM and if so, it loads new kernel from RAM and jumps to it.
Kexecd' kernel starts and boots.
For more info, read the original thread.
Patches:
Full kernel patch: https://gist.github.com/4558647, 4.1 kernel repo, cm 10.1 kernel repo
This is the full kernel patch. Kernels with this patch can be both "host" and "guest" kernels.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
CONFIG_GROUPER_HARDBOOT_RECOVERY=n
First three options must be enabled. Last one, GROUPER_HARDBOOT_RECOVERY, specifies if the kexec call should reboot to normal mode or to recovery. This can be useful if you don't have the kernel in boot partition but only as kernel in recovery partition. You usualy want to disable this option.​
Compatibility patch: https://gist.github.com/4458581
This patch only makes the kernel bootable via kexec, ie. it can't be the host kernel. This was made for Ubuntu kernel (and it was accepted), because I did not want to drag the whole patch in there. If your kernel is for Android ROMs, you should use the full patch.​
Userspace kexec binary: View attachment kexec-tools.zip
That ZIP file contains kexec source, patches and README. It is from the original patch from Mike Kasick. It also contains precompiled, statically linked kexec binary, so you probably just want to use that.​
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x85000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Currently used by:
MultiROM - I use it to boot different kernels (eg. Ubuntu).
MOSLO - Part of Plasma Active for Nexus 7, also usefull tool for every N7 developer - read more: http://ruedigergad.com/2012/12/09/nexus-7-easily-flashaccess-entire-userdata-partition/
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - I used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped me out with that, thanks.
Hi Tasssadar,
im trying to get this to work on the HOX in order to have a shot at multiboot,
the patched applied with no problem... however on compiling i gett this error
"Adress for kexec hardboot page not defined"
ask this error naturely defined to kick in with every device beside N7 i that comment completely....
and that ended up giving me an error about KEXEC_HB_PAGE_ADDR not defined,
so i readded it, but i removed the "#if defined(CONFIG_MACH_GROUPER)"
now trying to compile it, its gets pretty close to the end... but failed with unexpected string error at line OUTPUT_ARCH(arm) in file linux/arch/arm/boot/compressed/vmlinux.lds
Code:
/*
* linux/arch/arm/boot/compressed/vmlinux.lds.in
*
* Copyright (C) 2000 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
/DISCARD/ : {
*(.ARM.exidx*)
*(.ARM.extab*)
/*
* Discard any r/w data - this produces a link error if we have any,
* which is required for PIC decompression. Local data generates
* GOTOFF relocations, which prevents it being relocated independently
* of the text/got segments.
*/
*(.data)
}
. = 0;
_text = .;
.text : {
_start = .;
*(.start)
*(.text)
*(.text.*)
*(.fixup)
*(.gnu.warning)
*(.glue_7t)
*(.glue_7)
}
.rodata : {
*(.rodata)
*(.rodata.*)
}
.piggydata : {
*(.piggydata)
}
. = ALIGN(4);
_etext = .;
.got.plt : { *(.got.plt) }
_got_start = .;
.got : { *(.got) }
_got_end = .;
_edata = .;
. = ALIGN(8);
__bss_start = .;
.bss : { *(.bss) }
_end = .;
. = ALIGN(8); /* the stack must be 64-bit aligned */
.stack : { *(.stack) }
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
}
also, im booted into windows now... so i can't provide the exact error.
I'm afraid "comment everything which doesn't work" won't work here. The KEXEC_HB_PAGE_ADDR and END_MEM is device-specific, it will most likely be different for HTC One X. You can find out what address is it supposed to be by examining /proc/iomem on your device. For example, here's memory map from grouper:
Code:
...
80000000-be9fffff : System RAM
80008000-808faba7 : Kernel text
80940000-80b8228f : Kernel data
beb00000-bebfffff : ram_console
...
So, for grouper, END_MEM is 0xbe9fffff + 1 = 0xbea00000.
KEXEC_HB_PAGE_ADDR is located 1MB before console RAM, which is in this case also immediatelly after System RAM, so for grouper, it is also 0xbea00000.
but failed with unexpected string error at line OUTPUT_ARCH(arm) in file linux/arch/arm/boot/compressed/vmlinux.lds
Click to expand...
Click to collapse
That doesn't seem to be related to this patch. Are you using correct cross-compiler?
Tasssadar said:
I'm afraid "comment everything which doesn't work" won't work here. The KEXEC_HB_PAGE_ADDR and END_MEM is device-specific, it will most likely be different for HTC One X.
Click to expand...
Click to collapse
i figured
but im walking you through what i did.
You can find out what address is it supposed to be by examining /proc/iomem on your device. For example, here's memory map from grouper:
Code:
...
80000000-be9fffff : System RAM
80008000-808faba7 : Kernel text
80940000-80b8228f : Kernel data
beb00000-bebfffff : ram_console
...
So, for grouper, END_MEM is 0xbe9fffff + 1 = 0xbea00000.
KEXEC_HB_PAGE_ADDR is located 1MB before console RAM, which is in this case also immediatelly after System RAM, so for grouper, it is also 0xbea00000.
Click to expand...
Click to collapse
Code:
7d000000-7d003fff : tegra-udc.0
7d000000-7d003fff : tegra-otg
7d000000-7d003fff : tegra-udc
7d004000-7d007fff : tegra-ehci.1
80000000-beafffff : System RAM
80008000-8094000f : Kernel text
809a8000-810b940f : Kernel data
beb00000-bebfffff : ram_console
bec00000-beffffff : fbmem
bf000000-bf7fffff : fbmem
0xbeafffff + 1 = 0xbeb00000
grrr that would put me inside the ram_console...
aaaa would it wok if i used the address before??
7d00800
Edit:
or did your ram RAM end earlier because you set you END_MEM 0xbea00000
in that case, it works out just the same with the HOX
That doesn't seem to be related to this patch. Are you using correct cross-compiler?
Click to expand...
Click to collapse
i would have guessed so, but the kernel compiled and is working before the patch.
im using the one provided by google (Android NDK r9) while it contains booth gcc 4.6/4.8 im using 4.6 (arm-linux-androideabi-)
The patch will move ram_console 1MB further, see https://gist.github.com/Tasssadar/4558647#file-n7_hardboot-diff-L387 . You'll have to modify this part of the patch, it will be in different file for your device.
Tasssadar said:
The patch will move ram_console 1MB further, see https://gist.github.com/Tasssadar/4558647#file-n7_hardboot-diff-L387 . You'll have to modify this part of the patch, it will be in different file for your device.
Click to expand...
Click to collapse
HOX is also a Tegra 3 device... so im guessing i wont need to touch a thing?
also note... that iomem provided is from an unpatched kernel (as i cant compile a patched one)
also,
im currently on freenode #htc-one-x
if you dont mind joining.
I've been looking through the kexec-hardboot patch these last few days, trying to actually understand it instead of just blindly porting it and after several hours of messing with assembler with no means to debug it, I've managed to remove the need for guest kernel to be patched. This is not really useful for grouper, since thanks to multirom and accepting kernel devs, nearly every third-party kernel has the proper patches. But, if I'll port multirom to some other device (hello, flo), it will be very useful
To know more see the changes in this commit, but you'll probably need to understand how the patch does things: https://github.com/Tasssadar/androi...mmit/2ce4130061f72430a8ddfde25346c4e528c5c30b
@mkasick: Could you please look over this? I'm afraid there's some good reason why you didn't do this in the first place, like rewriting some part of memory which shouldn't be rewritten or something like that. Thank you.
Tasssadar said:
I've been looking through the kexec-hardboot patch these last few days, trying to actually understand it instead of just blindly porting it and after several hours of messing with assembler with no means to debug it, I've managed to remove the need for guest kernel to be patched. This is not really useful for grouper, since thanks to multirom and accepting kernel devs, nearly every third-party kernel has the proper patches. But, if I'll port multirom to some other device (hello, flo), it will be very useful
To know more see the changes in this commit, but you'll probably need to understand how the patch does things: https://github.com/Tasssadar/androi...mmit/2ce4130061f72430a8ddfde25346c4e528c5c30b
@mkasick: Could you please look over this? I'm afraid there's some good reason why you didn't do this in the first place, like rewriting some part of memory which shouldn't be rewritten or something like that. Thank you.
Click to expand...
Click to collapse
Perfect timing, just finished my last exam
Edit:
Also, this applies on top of the original patch right??
Edit2:
i can't seem to get it to kexec boot, but i didn't do much testing, maybe 2morrow night!
Edit3:
fixed, it was a problem with min-addr,
changed it to 0x82000000 and it worked
One more question...
TEGRA_PMC_BASE is also device specific, ain't it???
So, for a Qualcomm device, what should I be using? I am guessing it is MSM_RPM_BASE, which I got from here: http://forum.xda-developers.com/showpost.php?p=31127486&postcount=7
Yes, it is SoC-specific. This is using some special register to reset the chip, I'm not sure if that is available on msm chips - probably yes, but in some different form. Your best chance is to examine restart sequence in arch/arm/mach-msm/restart.c and port it to assembler.
Tasssadar said:
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0xA0000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Click to expand...
Click to collapse
The address of 0xA0000000 is not necessarily the best choice going forward. It originally made perfect sense, as it is well above everything else. But now that we can boot unpatched guest kernels, we can hit the interesting situation where the guest decompression may take a full minute. At least it's when I've seen on the Ouya game console that's running the next chip after Grouper.
When I realized what's going on, I changed to 0x8E000000, as it gets me just below the 256 MB limit of cache-enabled memory that's present on a typical guest at that early decompression stage. It's enough to hold a typical 8 MB boot image kernel/ramdisk. Now the guest kernel startup is fast in all cases.
Thank you Tasssadar for continuing your work in this area, especially with finding that way to allow unpatched guests.
Indeed, that's actually what I'm using in MultiROM for flo and mako (and grouper, but it is useless 'cause not all 3rd-party kernels have been updated), I just kinda "forgot" to update these threads.
Would it work on devices with locked bootloaders (Xperias). I mean :does the idea of this patch would also work on bootloader unlock allowed :no devices?
Sent from my LT22i using xda app-developers app
I am trying to build a kexec patched kernel integrated into a ROM. I make sure that the following code is there in the defconfig:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
The ROM works well, except that it does not boot my secondary ROMs - kexec hardboot patch missing. I have multi ROM and TWRP recovery installed
What am I missing?
Logs or it didn't happen.
Show me dmesg from normal boot into android, with MultiROM and your kernel installed.
Code:
adb shell
su
dmesg > /data/local/tmp/dmesg.txt
exit
exit
adb pull /data/local/tmp/dmesg.txt
Porting?
Tassadar which things do I need to boot kexec kernel on my device (Motorola Electrify 2) .
@Tasssadar, Sorry for picking up this kinda "old topic" but I'm sadly experiencing some problems while trying to port kexec-hardboot to the Sony Xperia Z2 (aka sirius). I applyed all needed commits (cherry-picked from a apparently working Z1 repo for stock kernel) to my CM based custom kernel (https://github.com/Myself5/android_kernel_sony_msm8974/tree/kexec-cm-12.0) and it does not boot at all. It's stuck on the Sony Logo, and it seems like I can't get any log either. I also tryed the stock cm kernel with the patch (https://github.com/Myself5/android_kernel_sony_msm8974-kexec) cause I tought it might be some incompatibility, but sadly it wasn't. Hope you have any ideas to solve my problems, cause I'm out of ideas ATM. I also checked the kexec commits for other devices (namely the One Plus One) and it seems like I got everything needed.
Thanks in Advance
Tasssadar said:
In this post, I would like to explain what kexec-hardboot patch is and also bring it to light a bit more since until now, it was only burried in MultiROM thread.
@kernel developers: I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows me to boot any kernel without changing the boot partition. I realize that it is no small request, but the patch is not big, touches relatively stable parts of kernel and should not cause any problems. Thank you.
What is kexec?
It is syscall of Linux kernel, which allows you to boot another Linux kernel without restarting the device - "Linux boots itself". The functionality is equivalent to fastboot -c *cmdline* boot zImage initrd.img, but without PC and fastboot. It is fairly known thing, so more info at wikipedia and man kexec.
Standard kexec call unfortunatelly does not work on Nexus 7. It freezes somewhere, and it is very difficult to find out where - probably some of the drivers are not shut down/re-initialized properly, it is a commong thing among Android devices, which is why kexec-hardboot was made.
What is the difference between normal and hardboot exec?
Kexec-hardboot patch adds a real device restart to that process, so that all the drivers can be properly reinitialized. It stores new kernel to RAM, reboots the device as usual, and kernel from boot partition immediately jumps to the one which was stored to RAM before reboot.
Another difference is that both kernels must be patched. The "host" kernel requires a full patch, the one which is being kexecd' requires only two small compatibility patches.
To sumarize the process:
kexec --load-hardboot.... is called and kernel it loaded into RAM.
kexec -e is called. Special info is written to memory (to area which is not overwritten on reboot) and the device is rebooted.
After reboot, very early in the boot process, kernel checks if that special info is present in RAM and if so, it loads new kernel from RAM and jumps to it.
Kexecd' kernel starts and boots.
For more info, read the original thread.
Patches:
Full kernel patch: https://gist.github.com/4558647, 4.1 kernel repo, cm 10.1 kernel repo
This is the full kernel patch. Kernels with this patch can be both "host" and "guest" kernels.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
CONFIG_GROUPER_HARDBOOT_RECOVERY=n
First three options must be enabled. Last one, GROUPER_HARDBOOT_RECOVERY, specifies if the kexec call should reboot to normal mode or to recovery. This can be useful if you don't have the kernel in boot partition but only as kernel in recovery partition. You usualy want to disable this option.​
Compatibility patch: https://gist.github.com/4458581
This patch only makes the kernel bootable via kexec, ie. it can't be the host kernel. This was made for Ubuntu kernel (and it was accepted), because I did not want to drag the whole patch in there. If your kernel is for Android ROMs, you should use the full patch.​
Userspace kexec binary: View attachment 1653562
That ZIP file contains kexec source, patches and README. It is from the original patch from Mike Kasick. It also contains precompiled, statically linked kexec binary, so you probably just want to use that.​
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x85000000 --command-line="$(cat /proc/cmdline)"
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Currently used by:
MultiROM - I use it to boot different kernels (eg. Ubuntu).
MOSLO - Part of Plasma Active for Nexus 7, also usefull tool for every N7 developer - read more: http://ruedigergad.com/2012/12/09/nexus-7-easily-flashaccess-entire-userdata-partition/
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - I used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped me out with that, thanks.
Click to expand...
Click to collapse
I'm sorry for picking up this older topic as well, but I always played with the thought of merging kexec support into a kernel and I'm doing one right now.. But my secondary device is a LG G2 and since the era of Lollipop began, somehow MultiBoot just stopped working and nobody can figure out why. I think they even started to build some new concept now.. So before I spark a heated debated by Note 4 users I'd love to know if you have any idea if this patch is still applicable? Altough the only way to find out is to probably just try it lol.
Tasssadar said:
In this post, ....
Click to expand...
Click to collapse
Bro can you please mention on your wiki that kexec isnt supported for x64 devices? It will be great help and save developers hours! I was porting for oneplus 2 when a dev told me that kexec isnt there for x64. I was shocked
Is any alternative available for that? Please reply! Thanks.
All other devs, who cant make multirom to work (lollipop is the x64 era) stop working. Kexec isnt supported for x64. Find an alternative for it.
Can Anyone help me to port this? Here is my patched kernel (ignore arch/arm64) and this is /proc/iomem.
Code:
80000000-854fffff : System RAM
80008000-80fa43ef : Kernel code
81112000-817bf797 : Kernel data
8cb00000-9fefffff : System RAM
9ff00000-9ff3ffff : persistent_ram
9ff40000-9ff7ffff : persistent_ram
9ff80000-9fffffff : persistent_ram
a0000000-ffffefff : System RAM
For kexec_hb_page_addr the value i inseted is 85500000 coz as tasssadar said 884fffff + 1 = 85500000, but I don't know what value add for
Code:
#elif defined(CONFIG_ARCH_MSM8916)
/* Restart using the PMIC chip, see mach-msm/restart.c */
ldr r0, =MSM8916_HARDBOOT
mov r1, #0
str r1, [r0, #0]
loop: b loop
MSM8916_HARDBOOT, and if I compile the kernel it stucks on samsung logo.

[ROM][GT-I9305][Marshmallow][6.0][Cyanogenmod 13.0][UNOFFICIAL]

Disclaimer (partially borrowed from MIT license) - WARNING:
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. If you loose your data, brick your device, any other damage or anything else happens (e.g. your cat eats your dog), it is YOUR PROBLEM and YOUR RESPONSIBILITY. Your device warranty is most probably void after installing this.
Although my original intention was just to help with porting CM 13 to i9305, I ended up with my build
To avoid any confusion a because I still have a felling that some people don`t understand this, I have to explain one more detail. I didn`t create this, I only built it. It is a big difference, similar to buying versus building a house. Buying a house is not a simple thing (at least in my country) and you`d probably need to do some changes and repairs before you can start living in it. But building a house is something completely different and much more difficult. The work I`ve done on this CM build is more like buying a house. The see the list of people who "built the house" go into Settings on your phone, section About phone and then Contributors. It is a really long list. Thanks to all of them
Also, please, keep in mind, that I am only sharing results of my hobby.
It is build mostly directly from CyanogenMod 13.0 sources. I only added support for i9305 and cm12 chroot for RIL support. See the original thread for some details. Anyway my work on this is really small, I fixed some problems a put all of this together.
You can download here:
cm-13.0-20160907-UNOFFICIAL-i9305.zip
There is also another builds from @evilracer123. (EDIT 31.3. 2016)
If you want you can also download unofficial build of TWRP with f2fs support TWRP-UNOFFICAIL-3.0.1.img
Changelog:
EDIT (17.1. 2016) - new build with bluetooth fixed
EDIT (19.1. 2016) - new build with bluetooth for non owner fixed, the code for this build downloaded yesterday
EDIT (22.1. 2016) - new build
EDIT (25.1. 2016) - new build - there is some bug in FileManager - see http://forum.xda-developers.com/showpost.php?p=64980000&postcount=150
EDIT (27.1. 2016) - new buld - FileManager bug fixed, Answer call with hardware HOME button commit included
EDIT (29.1. 2016) - new build
EDIT (1.2. 2016) - new build - attempt to fix bluetooth audio problem
EDIT (8.2. 2016) - new build - clock overflow fix (details)
EDIT (17.2. 2016) - new build - I added the SlimISP_PH.bin file, fixed the crashing gallery for non-owner (I added the INTERACT_ACROSS_USERS permission, I hope that it is a correct fix) and added rules for selinux denies @BMP007 reported for logcat.
EDIT (25.2. 2016) - new build with multiple RIL implementations, diff attached
EDIT (19.3. 2016) - new build, f2fs support (some hints here). I attached 2016-03-18_16-49-21-cm-13.0-20160318-UNOFFICIAL-i9305.tar.gz, which contains diff file, roomservice.xml and list of used commits.
EDIT (31.3. 2016) - new build
EDIT (18.4. 2016) - new build
EDIT (25.4. 2016) - new build
EDIT (20.5. 2016) - new build
EDIT (23.6. 2016) - new build
EDIT (7.9. 2016) - new build
EDIT (10.4. 2016) - new build, compiled with ArchiDriod optimizations (thanks to @JustArchi), fixed mDNIe settings
This ROM supports F2FS - you can find some hints, how to use it here. (EDIT 31.3. 2016)
If you want world writable sdcard, set property persist.world_writable_sdcard to true (search the thread to see how) , but be aware that this is not standard behavior.
Multiple RIL implementation
In this ROM, there are more then one RIL implementations. None of them is perfect, but you can choose, which one of them works better for you. The first RIL implementation is the usual CM 12.1 based one (this is the default one), the second one is based on proprietary files extracted from stock 4.4.4 ROM downloaded from sammobile.com (I9305XXUFOB2_I9305PHNFOB2_I9305XXUFOA1_HOME.tar.md5), the third is based on proprietary files from TheMuppets, with one small change (see here for details). To switch between them open shell (over adb, or using the build in app, or whatever you like) and execute command ril. You will see something like this:
Code:
Select RIL implementation:
* 1 - CM 12.1 based
2 - Stock 4.4.4 based
3 - TheMuppets based
x - quit
?
Type 1,2,3 or x and hit enter. The requires root, so be sure it is enabled. After switching, reboot the phone. If you don`t want bother with this, don`t. The default one is, based on my experience, the best
If you want gapps, use http://opengapps.org/. As mentioned several times elsewhere flash it RIGHT AFTER the ROM. I tried the nano version and it works fine.
As far as I know all hardware and RIL is working without problems (even barometer is correctly detected).
Know BUGs:
- sometimes after boot RIL is not started correctly (http://forum.xda-developers.com/galaxy-s3/development-i9305/rom-t3252492/post64740417#post64740417) - data connection (and maybe something else) is not working. In that case turn on and of flight mode (or go somewhere without signal). I trying to fix this, but it is difficult.
- the led flash light used as a torch goes off together with the display (http://forum.xda-developers.com/galaxy-s3/development-i9305/rom-t3252492/post64699946#post64699946)(fixed http://review.cyanogenmod.org/#/c/132783/)
- I suppose there is still msm_hsic_host wakelock bug (https://jira.cyanogenmod.org/browse/CYAN-2266). Supposedly unplugging the charger with display on should prevent this. EDIT (13.2. 2016) Some people are reporting that is fixed. I didn`t anyting specific to fix it, so I am not sure. One possibility is that this was also caused by the clock bug.
- if you have non FAT partition on you sdcard, you get a message that sdcard is corrupted. I`ll try to fix this one, it should not be difficult and it is annoying for me.
- gallery app is crashing for non owner (EDIT 19.1. 2016) (EDIT 17.2. 2016)
- there a problem with bluetooth audio - it occasionally stops for few seconds may be fixed in the today`s build (EDIT 1.2. 2016)
- on the first boot (after /data wipe) the SIM may not be found. Reboot should fix this. (EDIT 31.3. 2016)
Selinux is enforcing. If you used some of my previous builds from the original thread and there is something broken, what worked before, this may be the reason. In that case output of dmesg | grep 'avc.*denied' from the moment the problem happens, is a big help to solve it.
Code related to this can be found here:
https://github.com/p-an/i9305-cm13-device
https://github.com/p-an/android_system_core/tree/cm-13.0
https://github.com/p-an/android_build/
and some smaller changes in attached diffs (part of attached tar.gz archives as code.diff since 2016-3-18)
Build instructions:
This is definitely not the only way how to build CM13 for i9305, but it is the procedure, which I, more or less, use.
First of all read (and understand) the original guide. My build process is modified version of it. The modification is necessary, because there is no official CM13 for i9305, so the breakfast command won`t work. It is replaced by creating .repo/local_manifests/roomservice.xml file. Another change is that proprietary file are part of my github repo, so you don`t have to connect the phone.
Followe the guide mentioned above till the repo command setup. The next step is to initialize the CyanogenMod source repository - use the cm-13.0 branch:
Code:
$ cd ~/android/system/
$ repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
Now before you do repo sync, you have to create the roomservice.xml file (note the actual command is old, download the latest .tar.gz archive attached to this post and extract roomservice.xml from it):
Code:
$ mkdir .repo/local_manifests
$ wget "http://forum.xda-developers.com/attachment.php?attachmentid=3657032&d=1456237857" -O .repo/local_manifests/roomservice.xml
Now is time for downloading the code (it takes some time):
Code:
$ repo sync
After this is done you will probably need to sync the code from my github with upstream. It may up to date, but i can`t guarantee it. First add the upstream repo:
Code:
$ cd ~/android/system/system/core/
$ git remote add upstream https://github.com/CyanogenMod/android_system_core.git
And now sync the code:
Code:
$ cd ~/android/system/system/core/
$ git checkout cm-13.0
$ git fetch upstream
$ git merge upstream/cm-13.0 -m 'sync with upstream'
The checkout is necessary to have cm-13.0 branch active. Following two commands download the code from upstream and merge it. They can be replaced with one pull command. Now apply patches. I usually attach them either to this post, or the post, where I announce something new (like a fix). The reason why I share some changes this way, is that I don`t wan`t to fork whole big repository because of a small change. In the latest (cm-13.0-20160217-UNOFFICIAL-i9305.diff) diff there is only one change bigger than one line - delete 5 lines (2 of them are comments). This is usually easy to change manually, if patch fails. You can use this https://groups.google.com/forum/#!topic/repo-discuss/43juvD1qGIQ to apply the patch (store the script into ~/bin/repo_patch and make executable).
Code:
$ cd ~/android/system/
$ repo_patch cm-13.0-20160217-UNOFFICIAL-i9305.diff
Now proceed to the Extract proprietary blobs step. The commands are the same, but you don`t have to connect the phone to the computer:
Code:
$ cd ~/android/system/device/samsung/i9305
$ ./extract-files.sh
Since you skipped the breakfast step, you should now return to the ~/android/system/ directory and setup the environment:
Code:
$ cd ~/android/system/
$ source build/envsetup.sh
Now setup the ccache, if you want. See Turn on caching to speed up build in the original guide.
Start the build:
Code:
$ brunch i9305
If you find some problem let me know, I can try to fix it. But I can`t promise anything, this is only hobby for me and my original intention was just to help with porting CM 13 to i9305.
pAn
reserved
The bug whit the flashlight is on every CM12.1 rom.
2 min using the flashlight and the phone automaticly booting (bootloop).
Is there a chance the problem whit the sdcard to be permision problem?
Thanks i was start thinking that no one want we to have a marshmallow rom for our devices. Live long and prospect.
Sectorian said:
The bug whit the flashlight is on every CM12.1 rom.
2 min using the flashlight and the phone automaticly booting (bootloop).
Click to expand...
Click to collapse
This is new for me. I`ve probably newer used it for such a long time. I`ll put on my list
Sectorian said:
Is there a chance the problem whit the sdcard to be permision problem?
Click to expand...
Click to collapse
I don`t think so. I suppose that this is because there is ext2 partition (with Debian chroot) and Android has never designed to use sdcard with something like this. Until this version it was simply ignored. It is not a big problem, just annoying message.
Nvm sry for asking
russia101 said:
Are there some more changes then the build you already posted on the other thread ?
Click to expand...
Click to collapse
You quote entire OP and you can't read it ?
Please ...
russia101 said:
Are there some more changes then the build you already posted on the other thread ?
Click to expand...
Click to collapse
Edit your post please. No need to quote entire OP
@p.a.n gongrats for your first and the new thread with your rom and many thanks for uploading your sources.
But I am wondering, why you haven't pushed the changes in build and smdk-common, which are present in your posted diff file? Are they not needed (anymore?). And still not clear is, where to put mount_chroot.sh? In system/bin or cm12chroot/system/bin?
ok ... I tried it with usual cyanogenmod smdk-common cm-13.0 branch and original cyanogenmod build and without mount-croot.sh and: sim card and ril is working. But I still cannot hear something or anybody during a call . What vendor/samsung repo are you using? themuppets or crazyweazel and which branch? Maybe there is the problem located?
rodman01 said:
ok ... I tried it with usual cyanogenmod smdk-common cm-13.0 branch and original cyanogenmod build and without mount-croot.sh and: sim card and ril is working. But I still cannot hear something or anybody during a call . What vendor/samsung repo are you using? themuppets or crazyweazel and which branch? Maybe there is the problem located?
Click to expand...
Click to collapse
All the my changes from smdk-common are either in upstream (e.g. the incomminmg call fix) or I moved them to i9305. Script mount-croot.sh is not necessary anymore, the mounts are handled by init (init.target.rc). The only changes from the diffs which are not in those two repositories were in kernel and they are not necessary. The proprietary files which I am using are in the repo (https://github.com/p-an/i9305-cm13-device/tree/cm-13.0/proprietary, https://github.com/p-an/i9305-cm13-device/blob/cm-13.0/cm12chroot/cm12chroot.tgz), I don`t remember where I have it from Just execute extract-files.sh in device/samsung/i9305.
I really have no idea what could be wrong in your case You problems with audio or is it the still the problem with incoming calls (the phone doesn`t ring when someone calls)?
p.a.n. great work brother, installed this ROM with this Gapps (https://www.androidfilehost.com/?fid=24269982086993883) with my outdata Philz Touch 6.48 and works pretty damm good! GPS and wifi OK, incoming and outcoming calls smooth. Congratz!!!
Im expirience a slow charging whit your Rom whit agni kernel. Before that i was on Acip10 whit the same version of agni kernel and the charging work corectly. Hope im helpes.
Oher bugs: trebuchet crashing, skype is not working.
@p.a.n thanks for your all you've done,the rom works great for me,ril data 3g and lte works fine,many thanks ......
@rodman01 just and idea, you`ve probably tried it - do you have data connection, when you try the call? The bug which requires airplane mode on/off effects more than only data connection - if it happens also Llama doesn`t correctly detect area based on cell id. So it could be the reason for your problems.
Sectorian said:
Im expirience a slow charging whit your Rom whit agni kernel. Before that i was on Acip10 whit the same version of agni kernel and the charging work corectly. Hope im helpes.
Click to expand...
Click to collapse
What about cpu load, wakelocks? Did you check it?
Sectorian said:
Oher bugs: trebuchet crashing, skype is not working.
Click to expand...
Click to collapse
Could you provide some details - how to replicate it, logcat, etc. ? Trebuchet seems to be stable to me, but I using mostly another launcher. I don`t use skype, so I am afraid I can`t help with that one
Many thanks for the the tip, I will look at it and make some tests. Sim and ril is working, incoming and outgoing calls too...but no call audio, so I cannot hear the caller and he doesn't hear me neither.
rodman01 said:
Many thanks for the the tip, I will look at it and make some tests. Sim and ril is working, incoming and outgoing calls too...but no call audio, so I cannot hear the caller and he doesn't hear me neither.
Click to expand...
Click to collapse
Can you talk on a headset via the 3.5mm jack? If you can then it's related to RIL or the microphone and earpiece don't work in call.
Thanks for the awesome rom! Do I need to flash anything to get root?
floopyb said:
Thanks for the awesome rom! Do I need to flash anything to get root?
Click to expand...
Click to collapse
No, just enable the developer options, it is there
Sectorian said:
Im expirience a slow charging whit your Rom whit agni kernel. Before that i was on Acip10 whit the same version of agni kernel and the charging work corectly.
Click to expand...
Click to collapse
In AGNi control set 'Ignore unstable charging power', 'ignore safety margin', 'AC charge rate 1500mA'.
You won't damage anything, not phone nor charger.
There is a free app called Galaxy Charging Current which shows you the charging rate.
If you're too scared, just do the ignore unstable power and that will cure your issue. The other two things just make it charge even quicker.

[ROM+KERNEL]HUAWEI WATCH 2[LTE-Sawshark]+[BT-Sawfish]-[OWDE.180926.001.A1][22-Jan-20]

[HUAWEI WATCH 2 (LTE/4G-Sawshark) & (Bluetooth/BT-Sawfish)-OWDE.180926.001.A1]​INTERNATIONAL VERSION
Please read the instructions and notes before flashing anything. Don't ask me if you don't read the instructions.
Code:
###Disclaimer###
[COLOR="Red"][B]WARNING:
IMPROPER FLASHING MAY POTENTIALLY BRICK YOUR DEVICE. SO PLEASE PROCEED AT YOUR OWN RISK. ME OR ANY OTHER DEVELOPER MENTIONED IN THIS POST WILL ASSUME NO RESPONSIBILITY FOR THIS.[/B][/COLOR]
​
DONATE ME HERE
DONATE-ME
##############################
REQUIREMENT
##############################
- An Unlock bootloader
- Working adb/fastboot and driver - Download from Here
- A custom recovery (twrp) See my twrp thread for custom twrp recovery
TWRP-RECOVERY
##############################
HOW TO FLASH KERNEL/BOOT IMAGE
##############################
- Steps via adb/fastboot
- Unzip the folder and move the boot image into your adb/fastboot folder and apply the following commands
Code:
- adb devices
- adb reboot bootloader
- fastboot flash boot boot.img
- fastboot reboot
##############################
HOW TO FLASH THE ROM AND ROOT
##############################
1- Move the build/ROM and Busybox and Magisk to your watch
2- Make a backup - there's always 1% chance something goes wrong.
3- Full wipe is recommended....Wipe data/Factory reset
4- Flash the ROM, then flash Busybox and Magisk (Please flash in this order, ROM, then Busybox and Magisk)
5- Reboot and complete your initial setting
6- Open Magisk Manager and go to settings and set Automatic Response to Grant
7- Done. Don't forget to donate if you like my work, Thanks.
##############################
ROM AND KERNEL FEATURES [22-Jan-2020]
##############################
[Changelog]-Huawei Watch 2 LTE(Sawshark)+Huawei Watch 2 BT(Sawfish)-[22/Jan/2019]
- Based on latest kernel source (-Source 3.18.24) android-wear with latest security patch
- Linux version 3.18.24 (gcc version 4.9.3 20141215 (prerelease) (UBER-SaberMod-4.9.3_arm-graphite)) #1 SMP PREEMPT Wed Jan 22 9:45:39 CET 2020
- Forced-encryption disabled
- dm-verity removed/disabled
- Auto memory killer set to default
- Sepolicy is patched
- Fix the CPU idle latency unvote timeout. It should reduce the wasting power and CPU go to deep idle states immediately after a request
- Add and use a timer frequency of 100 Hz. It should improve power consumption.
- Add and update/Hide verifiedbootstate from /proc/cmdline in order to fix the failed SafetyNet CTS check(It can still fail through other means)-GOOGLE PAY SHOULD WORK. USE MAGISK TO HIDE ROOT. U may need Gpay enabler
- Remove verifiedbootstate flag from /proc/cmdline - Disable CRC check
- Scheduler optimize/support for heterogeneous multi-core
- Scheduler support for heterogeneous multi-processor systems
- Enable all core with scaling_available_frequencies (200000 400000 533333 800000 1094400 1267200 MHz)- scaling down the frequency of the CPUs to 200 MHz during idl mode and rise the freq. to 1.26Ghz during high pressure.
- Set swappiness to 60
- Change zswap max pool % to 20%. It will reduce CPU usage a lot
- Enable zram & zswap and add 256MB virtual memory default. It will speed up the device a lot
- Removed nolog usage, remove rtb logging from the kernel
- Remove selinux auditing from kernel for lower overhead
- Remove IPC logging from the kernel
- Disabled some kernel parameter to speed up the performance- at the cost of battery/ power consumption
- Remove some logging from several drivers
- Improve memory allocations -Should improve the device a lot
- Add some tweaks to improve the overall speed, apps startup are too faster
- Set zswap compressor to lz4 by default
- APM driver updated again to reduce battery usage during sleeping
- Several other patches to reduce battery usage
- Multi-core scheduler enable/optimized
- APM driver updated reduce battery usage during sleeping
- Fix the wake up time. The screen should wake up more quickly when pressing the button.
- Tweaked the scheduler to reduce/save power by scaling down the frequency of the CPUs or idling them,
- A lot subsystems converted to use power efficient workqueue
- The watch goes to sleep during no action in order to save battery
- Remove debug event logging-Kill the useless logging to reduce overhead
- Remove sync debug entirely to cut down CPU waste in the frame render hot path
- Remove 10 ms CPU idle latency unvote timeout- Doesn't force the CPU to stay out of deep idle states for far longer than necessary, which wastes power
- Disable audit support, usually comes with a measurably significant amount of overhead
- Remove audit dependency
NOTE: THERE IS NO NEED TO FLASH THE LATEST KERNEL IF YOU FLASH THE LATEST ROM.
##############################
DOWNLOAD
##############################
[Huawei Watch 2 4G/LTE]+[Huawei Watch BT][22-Jan]
[DECRYPTION KEY]
WO0FVexxQnrtcODYdmNvnQ
##############################
MAGISK/BUSYBOX/APP-KERNEL-CONTROL
##############################
DOWNLOAD LATEST MAGISK FROM HERE
DOWNLOAD LATEST BUSYBOX FROM HERE
KERNEL CONTROL APP WEAR OS
##############################
How to get the Gpay back...
##############################
1-https://pastebin.com/HKV7cj7H
2-https://forum.xda-developers.com/smartwatch/other-smartwatches/rom-kernel-t3821013/page172
3-https://www.youtube.com/watch?v=UKxGfNxRjo4&t=320s
4-https://forum.xda-developers.com/showpost.php?p=79637148&postcount=1720
##############################
HOW TO FLASH THE STOCK IMAGES-(BACK TO STOCK)
##############################
1- Download and unzip the system image below
2- Attach the watch charger to the watch and plug the USB cord (from the charger) into your computer
3- Use the following adb command to start the watch in fastboot mode: adb reboot bootloader
4- On your computer, navigate to the directory where you unzipped the system image in Step 1. At the top level of that directory, execute the flash-all script:
- On Linux or MacOS, type ./flash-all.sh
- On Windows, type flash-all.bat
5 -DONE. Don't forget to donate if you like my work, Thanks.
STOCK-IMAGES-HUAWEI-WATCH-2-LTE-LEO-DLXX-OWDE.180215.017-SAWSHARK-(13/Oct/2018)
STOCK-IMAGES-HUAWEI-WATCH-2-BT-LEO-BX9-OWDD.180215.018-SAWFISH-(22/7/2018)
##############################
Source/GitHub
##############################
-Source
IF YOU LIKE MY WORK AND WANT ME TO CONTINUE, THEN BUY ME A SHOT OF WHISKY
DONATE ME HERE
DONATE-HERE
Special thanks to:
If you can, donate and respect all the devs and enjoy
@Chainfire for great work in android
@Maxr1998 Big thanks for giving me knowledge and your great work for Asus Zenwatch_3 and your great github guide. Please thank and donate him for all his efforts
@topjohnwu for his great effort (Magisk)Thank you so much
@SuperR.R for the great kitchen
@Xmaster24 for system-less root-
@moneytoo for his great app. Please appreciate and donate him
Pay Enabler
@SuperThomasLab for great tools
Please always support devs and others (soon).​
ROM download asking for decryption key?Can fix the link?
Hello All,
Is it possible to install this latest ROM on model without LTE?
Thank you for reply :good:
arthos7 said:
ROM download asking for decryption key?Can fix the link?
Click to expand...
Click to collapse
Hoffmanns said:
Hello All,
Is it possible to install this latest ROM on model without LTE?
Thank you for reply :good:
Click to expand...
Click to collapse
Link are fixed now. It will properly not gonna work on non-lte. I can build a new for non-lte version if some one send me the latest system image and boot image. (I can extract from your watch via teamviewer, in case you can't) But you need to flash the latest firmware without root.
IF YOU LIKE MY WORK AND WANT ME TO CONTINUE, THEN BUY ME A SHOT OF WHISKY
DONATE ME HERE​
I will upload a complete latest stock images N7176C (lte) incase anyone wanna go back to latest stock again.
The only thing you have to do is boot into bootloader mod and then run the script by double click on it. After some reboots you will be back on latest stock.
I will combine both Linux and Windows together, use one you prefer.
IF YOU LIKE MY WORK AND WANT ME TO CONTINUE, THEN BUY ME A SHOT OF WHISKY
DONATE ME HERE​
Just received my Huawei SW 4G this weekend and after installing Huawei wear I got the alert message that the watch was rooted.
How can I confirm is it's rooted or not.
Thanks
Sent from my ONEPLUS A3003 using Tapatalk
Can anyone who's used this verify that it's notably faster or has improved battery life compared to stock? Or is the difference negligible?
How to build boot.img
Hi Janjan,
I am trying to build a custom kernel for my Huawei Watch 2 (non LTE) and I was wondering if you could share a little of your development work.
How do you actually put the boot image together? I am able to compile the kernel from android-msm-sawshark-3.18-nougat-mr1-wear-release,
which gives me a zImage. I also have the original images. So I tried to unmkbootimg the original boot image and replace the kernel. However, this doesn't seem to work. when I compare the sizes of the supposedly original zImage and the one created from the repository above, their size differs by roughly a factor of 100. So there must be something seriously wrong
What steps do you use to create the kernel and the boot image?
I also checked your github code and tried to use it but it seems to depend on other stuff that is not in your repos. Where did you find the code you have in your repos?
Best regards,
Mogli
janjan said:
I can build a new for non-lte version if some one send me the latest system image and boot image. (I can extract from your watch via teamviewer, in case you can't) But you need to flash the latest firmware without root.
Click to expand...
Click to collapse
Does that offer still stand? If yes I am willing to let my watch be used as a test subject.
mogli19 said:
Hi Janjan,
I am trying to build a custom kernel for my Huawei Watch 2 (non LTE) and I was wondering if you could share a little of your development work.
How do you actually put the boot image together? I am able to compile the kernel from android-msm-sawshark-3.18-nougat-mr1-wear-release,
which gives me a zImage. I also have the original images. So I tried to unmkbootimg the original boot image and replace the kernel. However, this doesn't seem to work. when I compare the sizes of the supposedly original zImage and the one created from the repository above, their size differs by roughly a factor of 100. So there must be something seriously wrong
What steps do you use to create the kernel and the boot image?
I also checked your github code and tried to use it but it seems to depend on other stuff that is not in your repos. Where did you find the code you have in your repos?
Best regards,
Mogli
Click to expand...
Click to collapse
Sure, tell me what you did and your steps for building zImage + modul. I am away from my office for a while.
janjan, have you had success with making a non-lte version?
cdkg said:
janjan, have you had success with making a non-lte version?
Click to expand...
Click to collapse
If you send me the latest boot.img, system.img and vendor.img then I will definitely make.
janjan said:
If you send me the latest boot.img, system.img and vendor.img then I will definitely make.
Click to expand...
Click to collapse
I have the boot.img and system.img. Is there a tutorial or any instructions you could give on how to get the vendor.img?
janjan said:
Sure, tell me what you did and your steps for building zImage + modul. I am away from my office for a while.
Click to expand...
Click to collapse
Hi Janjan,
(Apparently I am not allowed to post links yet, so I am trying my best to explain without them)
1. I got the source code for the Sawshark watch from github (mr1-wear-release). I guess there is no dedicated Seafish kernel source. Short question: There is a choice of 3 different kernel codes. Which one shall I take?
2. I tried to compile this source code without changes (to rule out errors before I make modifications). This works and I get as zImage. What do you mean by modul though? I thought zImage was the only product.
3. Using unmkbootimg, I un-packed an stock boot.img. The unmkbootimg tool says that the boot.img has been compiled with a non-standard mkbootimg program. However the offsets and other values (I am supposed to tune when I use mkbootimg) are contradicting. Eventually, the "non-custom" values recommended by unmkbootimg caused errors in mkbootimg and I ended up using the default values. This worked.
4. When I flash the resulting boot.img my watch gets stuck during boot with the Huawei logo on all the time.
To verify my tools, I tried step 3. in two more ways:
3.1. re-pack the un-packed boot.img, flash it (no errors and boot works)
3.2 pack a boot.img using a zImage obtained from a sawshark boot.img (instead of the seafish). This also worked and boot was successful
I have also looked at the boot.img and zImage files in a hex editor. I can locate the beginning of the kernel but not the end. Also if I did, I wouldn't know how to replace the kernel in hex mode But from what I have understood about mkbootimg, this script does not much more than concatenate zImage and ramdisk and add a header. Is this somewhat correct?
Eventually, I need to turn on some currently disabled kernel features (which is why I am doing all of this ). So I am still trying to figure out the right tools and components. And therefore the question: How do you usually build the kernel and how do you pack it into the boot.img. Do you modify the ramdisk when you replace the kernel?
Best,
Mogli
Instructions to modify ramdisk
Hi Janjan,
How do you disassemble and re-assemble the ramdisk?
Wanted to make a few modifications to the ramdisk.cpio.gz. Again, I wanted to try the tools first. So I unpacked and re-packaged the ramdisk without modifications. After flashing the regenerated boot image, my watch goes into recovery mode...
I found these instructions in a tutorial (again, I can't post links yet... sorry):
For disassembly:
Code:
$ mkdir ramdisk_dir
$ cd ramdisk_dir
$ gunzip -c ../ramdisk.cpio.gz | cpio -i
for re-assembly
Code:
$ find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
Update to my previous post:
I found my mistake in building the kernel:
Instead of using
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-androidkernel-
I was using
Code:
make ARCH=arm CROSS_COMPILE=arm-linux-androideabi-
mogli19 said:
Hi Janjan,
How do you disassemble and re-assemble the ramdisk?
Wanted to make a few modifications to the ramdisk.cpio.gz. Again, I wanted to try the tools first. So I unpacked and re-packaged the ramdisk without modifications. After flashing the regenerated boot image, my watch goes into recovery mode...
I found these instructions in a tutorial (again, I can't post links yet... sorry):
For disassembly:
for re-assembly
Update to my previous post:
I found my mistake in building the kernel:
Instead of using
I was using
Click to expand...
Click to collapse
It seems much better now. Are you in Windows or Linux? I will post my script and tools once I reach my PC. I am away from my PC right now. It means you destroy something during generating or packaging the boot image. Does you kernel /boot.img work without or before editing the ramdisk?
Update:- seems you are in Linux.
janjan said:
It seems much better now. Are you in Windows or Linux? I will post my script and tools once I reach my PC. I am away from my PC right now. It means you destroy something during generating or packaging the boot image. Does you kernel /boot.img work without or before editing the ramdisk?
Update:- seems you are in Linux.
Click to expand...
Click to collapse
Yes, I am on linux. I found a different approach that works for me now:
Code:
Extract the ramdisk.
$ mkdir ramdisk
$ cd ramdisk
$ gzip -dc ../ramdisk.cpio.gz | cpio -i
# Make any changes necessary (e.g., set ro.secure=0 in default.prop).
# Recreate the cpio archive using the mkbootfs binary produced from building the Android source code
$ cd ..
$ mkbootfs ./ramdisk | gzip > ramdisk-new.gz
You said you were able to turn on all the cores. Can this be done by modifying the ramdisk or how do you do this?
mogli19 said:
Yes, I am on linux. I found a different approach that works for me now:
You said you were able to turn on all the cores. Can this be done by modifying the ramdisk or how do you do this?
Click to expand...
Click to collapse
Did I said? But It can't be done by editing the ramdisk only. You need to add and edit alot (add driver edit cores etc) in kernel sources.
Okay, before anyone flames, I did look everywhere in this thread and cannot find it. Does anyone have the link to the flashing instructions for this rom?
janjan said:
Did I said? But It can't be done by editing the ramdisk only. You need to add and edit alot (add driver edit cores etc) in kernel sources.
Click to expand...
Click to collapse
Oh sorry, I thought I had read this on your feature list I actually looked at this and asked myself if there was a way to make the cpu settings permanent:
https://stackoverflow.com/questions/20221680/android-how-to-force-cpu-core-offlineshut-down-cores

Building kernel from Xiaomi's source for cereus (probably, cactus too)

Since Xiaomi released source code for kernel, I tried to build it.
https://github.com/Dhoine/android_kernel_cereus
Current status of this - it compiles, boots, but unusable.
Bugs:
Broken bluetooth
Broken wifi
Soft-reboots after some time
Propably, more bugs that remained undiscovered because of reboots.
Tested with miui 9 on cereus 3/32.
--------
You can test builded kernel using this:
GDrive
Use Carliv image Kitchen to repack your rom's boot.img, then flash it via fastboot (UNLOCKED BOOTLOADER REQUIRED). To restore working state after testing, flash stock boot image again.
WARNING
Our kernel uses android regular boot.img format, not MTK.
---------
If you want to build this, any manual for building kernel will fit. I used google's android arm eabi 4.9 toolchain, our arch is arm, defconfig is cereus_defconfig.
For now, I don't have enough time to take a closer look at this (work, university exams), so, any help (last_kmsg, dmesg, pull requests) will be appreciated.
Wait seriously? Does that mean that i can buil LOS rom now? I have my UbuntuVM with whole LOS source code downloaded but i got stuck at no kernel found for cereus. So it might work now(Im extremely new to linux) I'll try to build the rom asap
TanRayCz said:
Wait seriously? Does that mean that i can buil LOS rom now? I have my UbuntuVM with whole LOS source code downloaded but i got stuck at no kernel found for cereus. So it might work now(Im extremely new to linux) I'll try to build the rom asap
Click to expand...
Click to collapse
This kernel for now won't really help with building los. I haven't find any device tree for our SoC (or close). MTK always requre a ton of patches to android sources. But i have reference MTK 9.0 android sources for this SoC - ALPS (can't share, it's probably illegal, but you can find them on 4pda.ru, if you want). It builds on almost unmodified reference device tree, but i haven't tested it on device. First, we need to make this kernel usable.
[email protected] said:
This kernel for now won't really help with building los. I haven't find any device tree for our SoC (or close). MTK always requre a ton of patches to android sources. But i have reference MTK 9.0 android sources for this SoC - ALPS (can't share, it's probably illegal, but you can find them on 4pda.ru, if you want). It builds on almost unmodified reference device tree, but i haven't tested it on device. First, we need to make this kernel usable.
Click to expand...
Click to collapse
This may not really help, but can you try that kernel again after upgrading to MIUI 10.2.4 ?
EDIT : See https://www.kimovil.com/en/list-smartphones-by-processor/mediatek-helio-p22-mt6762 for a list of devices with MT6762. Probably we can check out their trees?
EDIT 2 : It seems like our Redmi 6 is the only device with available kernel source in that list.
EDIT 3 : Try this?
minhducsun2002 said:
EDIT : See https://www.kimovil.com/en/list-smar...lio-p22-mt6762 for a list of devices with MT6762. Probably we can check out their trees?
EDIT 2 : It seems like our Redmi 6 is the only device with available kernel source in that list.
Click to expand...
Click to collapse
Maybe them exists, but I haven't found them.
minhducsun2002 said:
This may not really help, but can you try that kernel again after upgrading to MIUI 10.2.4 ?
---------------------
EDIT 3 : Try this?
Click to expand...
Click to collapse
I finally finished my university exams, so now I have some free time to play with it.
The kernel you link is just forked xiaomi sources merged to linux 4.9 kernel. It shouldn't be buildable at all, since there is the same problem in sources I "fixed" with this.
Probably, this too.
[email protected] said:
I finally finished my university exams, so now I have some free time to play with it.
The kernel you link is just forked xiaomi sources merged to linux 4.9 kernel. It shouldn't be buildable at all, since there is the same problem in sources I "fixed" with this.
Probably, this too.
Click to expand...
Click to collapse
[email protected] said:
Maybe them exists, but I haven't found them.
Click to expand...
Click to collapse
You're right, they're identical.
By the way, I couldn't find any implementation available for our Helio P22; the chipset itself is fairly new, thus not many devices have the source code available.
minhducsun2002 said:
This may not really help, but can you try that kernel again after upgrading to MIUI 10.2.4 ?
Click to expand...
Click to collapse
Ok, i've tested it on latest GS. It seems to work a way better. At least, it doesnt reboot after few seconds of usage. It makes things a lot easier.
Tested a few more things:
-sound - works
-camera (both photo and video) - works
- mobile data - works
- phone calls - work
- dual sim -works
- all sensors work
The only thing i was unable to test is gps. It didn't worked for me, but i was inside 9-floor building near the window to inner corner of building... So idk.
And usb otg - since i don't have adapder.
After this I can tell, that there are only 2 major bugs - wifi and bluetooth.
Maybe gps, fm radio and exfat too. This is modules loading problem, I think (though, there shouldn't be any modules, drivers are marked as built-in in config, but .ko files for them exist in /vendor/lib/modules)
[email protected] said:
Ok, i've tested it on latest GS. It seems to work a way better. At least, it doesnt reboot after few seconds of usage. It makes things a lot easier.
Tested a few more things:
-sound - works
-camera (both photo and video) - works
- mobile data - works
- phone calls - work
- dual sim -works
- all sensors work
The only thing i was unable to test is gps. It didn't worked for me, but i was inside 9-floor building near the window to inner corner of building... So idk.
And usb otg - since i don't have adapder.
After this I can tell, that there are only 2 major bugs - wifi and bluetooth.
Maybe gps, fm radio and exfat too. This is modules loading problem, I think (though, there shouldn't be any modules, drivers are marked as built-in in config, but .ko files for them exist in /vendor/lib/modules)
Click to expand...
Click to collapse
Yeah, Treble definitely makes things easier.
Nevertheless I'm trying to integrate those kernel modules into the compiled zImage - there's no modprobe in Android, sadly.
Adding modules support and disabling modules versions check in config didn't help.
I can't find any source files in kernel sources, from which these modules can be built. Maybe, they are built from separate platform code (they are placed in vendor, so...) Need to download ALPS (brrr, around 50 gb of tar.bz2 archives) to check it.
I've looked into reference mediatek 4.9 kernel sources and found this:
Code:
# Do build-in for Makefile checking
# export CONFIG_WLAN_DRV_BUILD_IN=y
ifeq ($(CONFIG_WLAN_DRV_BUILD_IN),y)
PATH_TO_WMT_DRV = vendor/mediatek/kernel_modules/connectivity/common
PATH_TO_WLAN_CHR_DRV = vendor/mediatek/kernel_modules/connectivity/wlan/adaptor
PATH_TO_WLAN_DRV = vendor/mediatek/kernel_modules/connectivity/wlan/core/gen4m
ABS_PATH_TO_WMT_DRV = $(srctree)/../$(PATH_TO_WMT_DRV)
ABS_PATH_TO_WLAN_CHR_DRV = $(srctree)/../$(PATH_TO_WLAN_CHR_DRV)
ABS_PATH_TO_WLAN_DRV = $(srctree)/../$(PATH_TO_WLAN_DRV)
# check wlan driver folder
ifeq (,$(wildcard $(ABS_PATH_TO_WMT_DRV)))
$(error $(ABS_PATH_TO_WMT_DRV) is not existed)
endif
ifeq (,$(wildcard $(ABS_PATH_TO_WLAN_CHR_DRV)))
$(error $(ABS_PATH_TO_WLAN_CHR_DRV) is not existed)
endif
ifeq (,$(wildcard $(ABS_PATH_TO_WLAN_DRV)))
$(error $(ABS_PATH_TO_WLAN_DRV) is not existed)
endif
$(warning symbolic link to $(PATH_TO_WMT_DRV))
$(warning symbolic link to $(PATH_TO_WLAN_CHR_DRV))
$(warning symbolic link to $(PATH_TO_WLAN_DRV))
$(shell unlink $(srctree)/$(src)/wmt_drv)
$(shell unlink $(srctree)/$(src)/wmt_chrdev_wifi)
$(shell unlink $(srctree)/$(src)/wlan_drv_gen4m)
$(shell ln -s $(ABS_PATH_TO_WMT_DRV) $(srctree)/$(src)/wmt_drv)
$(shell ln -s $(ABS_PATH_TO_WLAN_CHR_DRV) $(srctree)/$(src)/wmt_chrdev_wifi)
$(shell ln -s $(ABS_PATH_TO_WLAN_DRV) $(srctree)/$(src)/wlan_drv_gen4m)
# for gen4m options
export CONFIG_MTK_COMBO_WIFI_HIF=axi
export MTK_COMBO_CHIP=CONNAC
export WLAN_CHIP_ID=6765
export MTK_ANDROID_WMT=y
# Do build-in for xxx.c checking
subdir-ccflags-y += -D MTK_WCN_REMOVE_KERNEL_MODULE
subdir-ccflags-y += -D MTK_WCN_BUILT_IN_DRIVER
obj-y += wmt_drv/
obj-y += wmt_chrdev_wifi/
obj-y += wlan_drv_gen4m/
endif
No such code in xiaomi's source. And this prooves my words: these modules CAN BE BUILT IN and SOURCES FOR THEM ARE IN ALPS. I have to download this ton of ****...
-------
I tried to backpors drivers from 9.0 - no success. It compiles,but doesn't boot. I tried to hack modules loading - no success too.
[email protected] said:
Adding modules support and disabling modules versions check in config didn't help.
I can't find any source files in kernel sources, from which these modules can be built. Maybe, they are built from separate platform code (they are placed in vendor, so...) Need to download ALPS (brrr, around 50 gb of tar.bz2 archives) to check it.
Click to expand...
Click to collapse
Most of the time those binaries are not open-source (you probably know vendor blobs for Google devices are too, but that is a different story). Nevertheless I don't really get why kernel modules are placed in
Code:
/vendor
- after all, mobile devices don't have hot-plugging hardware that requires dynamic LKM loading, why do they separate them out?
I'll attempt to crawl the web for those sources while waiting for Mi Unlock to allow my device being unlocked (the waiting period sucks).
[email protected] said:
I've looked into reference mediatek 4.9 kernel sources and found this:
No such code in xiaomi's source. And this prooves my words: these modules CAN BE BUILT IN and SOURCES FOR THEM ARE IN ALPS. I have to download this ton of ****...
-------
I tried to backpors drivers from 9.0 - no success. It compiles,but doesn't boot. I tried to hack modules loading - no success too.
Click to expand...
Click to collapse
1. Backports? How?
2. In which file did you got those lines?
3. Indeed those modules' source are removed from our tree - if you have the link, I don't really mind having another 50GB occupied on my PC to get those source code.
minhducsun2002 said:
1. Backports? How?
2. Indeed those modules' source are removed from our tree - if you have the link, I don't really mind having another 50GB occupied on my PC to get those source code.
Because attached below is the existence of the modules. /shrug
Click to expand...
Click to collapse
I already said that i have leaked mtk alps 9.0 sources These modules have sources, they are not prebuilt. I managed to built in them, but kernel doesn't boot at all after that. And i can't take any logs because the system dies before adb init.
Ok, after one little, but very cruel hack modules are fixed. Enjoy testing the kernel.
https://drive.google.com/open?id=1Z3p2fAWOZFyp045QMNV6vhLZvj9ZZPSY
[email protected] said:
Ok, after one little, but very cruel hack modules are fixed. Enjoy testing the kernel.
Click to expand...
Click to collapse
does it work well?
Lonewolf_1210 said:
does it work well?
Click to expand...
Click to collapse
Users from 4pda reported it fully working.
---------------------
Soon will be build with usb network adapters support enabled (requested by romanxdream from 4pda).
P.S. I'm not adding everything requested to kernel. But this was only config modification.
-------
I don't check xda often, so there can be a huge delay in my responses.
[email protected] said:
Users from 4pda reported it fully working.
---------------------
Soon will be build with usb network adapters support enabled (requested by romanxdream from 4pda).
P.S. I'm not adding everything requested to kernel. But this was only config modification.
-------
I don't check xda often, so there can be a huge delay in my responses.
Click to expand...
Click to collapse
Great job then, hope for a custom rom coming soon
Ok, download link to all versions. I'll edit the first post later.
https://drive.google.com/open?id=1yEZRS8L8bPgkk58tT5Uv2b-vsLqk7aql
Should we make a telegram group for this?

[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