[HELP]-kernel compiling issues-Wi-Fi password forget after reboot & NO Bluetooth - General Topics

For the 1st time ever, I compiled a kernel, Samsung J7 prime nougat (exynos 7870) kernel from source.
Compilation ended with some warnings and I went ahead with installing it on my device.
Now I am facing 2 Problems:-
1) device doesnot remebers Wi-fi passwords after rebooting.
2) Bluetooth isn't working (Doesnot turn On).
I tried the securestorage=false method in the build prop for wifi but it's not working.
Only changes made in the kernel to make it permissive were :-
1) Change in /security/selinux - hooks.c file
Added :-
selinux_enforcing = 0;// enforcing ? 1 : 0;
2) Change in /security/selinux selinuxfs.c file
Added :-
new_value = 0;
before
if (new_value != selinux_enforcing) {
Also attaching the complete log.
Can somebody please help ?

Related

[DEV] Framebuffer console

Make a backup first.
So i have managed to get framebuffer console output , but its stil not working.
So any help is wellcome.
The error i get is more the same as This.
You can try this kernel ( fastboot flash zimage zImage ) <- Dont flash if you dont know what your doing .
more info about whats going on is here.
Vids
With framebuffer active , but display is scrambled!.
With framebuffer console and display fixed.
For thoose that dont know what this is , its simpel.
For GNU/Linux we need this to work.
Some Info:
You could use any kernel that works with DHD , mine is Leedroid's Ace Kernel
.Config File
Mod file /drivers/video/msm/msm_fb.c to look (ADD) like this ( add x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; )
x = msmfb->update_info.left;
y = msmfb->update_info.top;
w = msmfb->update_info.eright - x;
h = msmfb->update_info.ebottom - y;
x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; <-----------Do not add this airow
Thats it. Start modding
change log space
0.1 - Enabled frambuffer -> makes screen scrambled
0.2 - Fixed lcd but got atomic panic.
0.3 - fixed Frambuffer console and lcd trying to boot ubuntu but sdcard is mounted after command line partition list is mmcblk0** needs to be mmcblk1p2
Did we realy need console output to the framebuffer to boot ubuntu nativ, or would it only be a importend debug feature during porting?
Following video shows meego booting on an desire, but the have no console output during the boot. Maybe the have the same bug when the use tty on the framebuffer!?
http://www.youtube.com/watch?v=GtnfHNjcdzg
Not needed !!!! -->
Most for debugging , and evry thing i try i cant get ubuntu to boot.
Also did find sometging about cmdline hack as command line seems to be skipt --> look at setup.c the modded command line.
This could be an alternative:
http://sven.killig.de/android/N1/serial/
Try following zImage.
Jhinta said:
Make a backup first.
So i have managed to get framebuffer console output , but its stil not working.
So any help is wellcome.
The error i get is more the same as This.
You can try this kernel ( fastboot flash zimage zImage ) <- Dont flash if you dont know what your doing .
more info about whats going on is here.
Vids
With framebuffer active , but display is scrambled!.
With framebuffer console and display fixed.
For thoose that dont know what this is , its simpel.
For GNU/Linux we need this to work.
Some Info:
You could use any kernel that works with DHD , mine is Leedroid's Ace Kernel
.Config File
Mod file /drivers/video/msm/msm_fb.c to look (ADD) like this ( add x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; )
x = msmfb->update_info.left;
y = msmfb->update_info.top;
w = msmfb->update_info.eright - x;
h = msmfb->update_info.ebottom - y;
x = 0; y = 0; w = msmfb->xres; h = msmfb->yres; <-----------Do not add this airow
Thats it. Start modding
Click to expand...
Click to collapse
Hi can you help out on enabling Mediatek framebuffer, Alcatel OT918D ?
On compiling I get this error
http://pastebin.com/N6Ct51ub
I think the problem is the files are not in the linux/kernel/drivers/video directory
here is the makefile in linux/kernel/drivers/video
http://pastebin.com/3kfRnrKA
while in the mediatek/drivers directory we have :
http://pastebin.com/mDSTthG0
I need framebuffer console for debugging, please help out if you can.

Sensorhub and Note 2 recovery maintainers

Please compile, if possible, your embedded recovery kernels without the sensorhub defconfig options.
CONFIG_SENSORS_SSP=y
CONFIG_SENSORS_SYSFS=y
CONFIG_SENSORS_SSP_ACCELEROMETER_POSITION=7
CONFIG_SENSORS_SSP_GYROSCOPE_POSITION=7
CONFIG_SENSORS_SSP_MAGNETOMETER_POSITION=7
CONFIG_SENSORS_SSP_LSM330=y
CONFIG_SENSORS_SSP_CM36651=y
CONFIG_SENSORS_SSP_AK8963C=y
CONFIG_SENSORS_SSP_BMP182=y
CONFIG_SENSORS_SSP_AT32UC3L0128=y
CONFIG_SENSORS_SSP_SENSORHUB=y
The kernel flashes over the sensorhub firmware on every single entry of recovery, and rebooting into the normal kernel, if the embedded kernel firmware mismatches the live hardware firmware. I consider this dangerous because firstly I don't know what happens if a firmware flash fails on boot, and secondly, the whole procedure is done over the I2C bus and takes about 22 seconds, increasing the boot time (and recovery entry) dramatically. The firmware changes relatively often and we have like 4 different versions out there in the wild at this moment and they will surely increase.
Off-topic: The sensorhub is a new dedicated micro-controller chip found on the Note 2 which handles all device sensors, instead of them being handled by the main CPU itself. The point of the thing is to offload that work from the CPU to vastly improve battery life.
Thank you a lot for the feedback and input about this issue
When compiling recoveries, we get the binary (recovery file) and the kernel. Sorry if I seem noob here, but I do not compile kernels, I am only used to cwm source. And in the recovery binary sources, there is no sensors flashed, it is the kernel that is repacked with it.
Now, if I take a recovery.img as it is outputted when compiled from cm10 sources, that is packed with a cm10 kernel, the recovery will boot without a delay.
However, that will break exfat support since we cannot insmod the external modules
So, the only choice is to repack the recovery ramdisk with a stock Samsung kernel, and that's what I do in my recoveries. However, this seems to induce the boot delay for people using custom kernels built around some sources (redpill, Perseus)
These recoveries repacked with a Samsung kernel will run fine along stock kernels and Note2core custom kernel (also a 4.1.2 source).
One of the potential causes is this part of code I believe (have no Note 2 to debug it)
drivers/sensor/ak8963.c
Code:
if (retry_count < 5) {
retry_count++;
pr_warn("############################################");
pr_warn("%s, retry_count=%d\n", __func__, retry_count);
pr_warn("############################################");
goto retry;
} else {
There is a check routine repeated 5 times, and on each repeat count a goto loop. The retry loop restarts much above in the code
retry:
Code:
#ifdef FACTORY_TESTstatic int ak8963c_selftest(struct akm8963_data *ak_data, int *sf){
.
.
.
retry:
/* read device info */
i2c_smbus_read_i2c_block_data(ak_data->this_client,
AK8963_REG_WIA, 2, buf);
pr_info("%s: device id = 0x%x, info = 0x%x\n",
__func__, buf[0], buf[1]);
/* set ATSC self test bit to 1 */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_ASTC, 0x40);
/* start self test */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_CNTL1,
AK8963_CNTL1_SELF_TEST);
/* wait for data ready */
while (1) {
msleep(20);
if (i2c_smbus_read_byte_data(ak_data->this_client,
AK8963_REG_ST1) == 1) {
break;
}
}
i2c_smbus_read_i2c_block_data(ak_data->this_client,
AK8963_REG_HXL, sizeof(buf), buf);
/* set ATSC self test bit to 0 */
i2c_smbus_write_byte_data(ak_data->this_client,
AK8963_REG_ASTC, 0x00);
x = buf[0] | (buf[1] << 8);
y = buf[2] | (buf[3] << 8);
z = buf[4] | (buf[5] << 8);
/* Hadj = (H*(Asa+128))/256 */
x = (x*(ak_data->asa[0] + 128)) >> 8;
y = (y*(ak_data->asa[1] + 128)) >> 8;
z = (z*(ak_data->asa[2] + 128)) >> 8;
pr_info("%s: self test x = %d, y = %d, z = %d\n",
__func__, x, y, z);
if ((x >= -200) && (x <= 200))
pr_info("%s: x passed self test, expect -200<=x<=200\n",
__func__);
else
pr_info("%s: x failed self test, expect -200<=x<=200\n",
__func__);
if ((y >= -200) && (y <= 200))
pr_info("%s: y passed self test, expect -200<=y<=200\n",
__func__);
else
pr_info("%s: y failed self test, expect -200<=y<=200\n",
__func__);
if ((z >= -3200) && (z <= -800))
pr_info("%s: z passed self test, expect -3200<=z<=-800\n",
__func__);
else
pr_info("%s: z failed self test, expect -3200<=z<=-800\n",
__func__);
sf[0] = x;
sf[1] = y;
sf[2] = z;
if (((x >= -200) && (x <= 200)) &&
((y >= -200) && (y <= 200)) &&
((z >= -3200) && (z <= -800))) {
pr_info("%s, Selftest is successful.\n", __func__);
return 1;
} else {
if (retry_count < 5) {
retry_count++;
pr_warn("############################################");
pr_warn("%s, retry_count=%d\n", __func__, retry_count);
pr_warn("############################################");
goto retry;
}
These are many retries using a non efficient goto loop.
Basically, here's the current possibilities I see:
- if we repack the recovery with your kernel or redpill, people will get delay issues on stock ROMs/Kernels
- if we use cm10 kernel: no delays but we loose exfat support
- if we use note2core kernel we'll probably loose exfat support
- if I recompile kernel from samsung sources without the sensors, it seems it will also break exfat
So, at the end I do not see a good choice that will satisfy every one. Either I wait for Samsung to release their sources so that you fix the kernel or I repack with 2 kernels: Samsung stock and redpill, so people can chose
Hope I am not getting it all wrong, but that's how I understand it
All that code is totally irrelevant and has nothing to do with the issue. I also don't understand what you want to say about that loop? Goto is inefficient? Nonsense.
The firmware flash and logic happens in /drivers/sensorhub/ssp_firmware.c and its just a few lines of code. The whole flash process is logged in kmsg at boot so you can just retrieve that and see for yourself.
And you're missing the point, as long as you embed ANY kernel with the sensorhub drivers, they will flash it. There are stock kernels out there with versions 91100, 92600, 92800, 102600 (just from the top of my head, might differ). If you use any recovery kernel whose version mismatches the boot.img kernel firmware, you will get the issue.
And to be honest, I don't understand what the fuss is about fixing it, TWRP includes now a kernel with exFat and removed sensor drivers. You just have to do the same.
Phil3759 said:
Either I wait for Samsung to release their sources so that you fix the kernel
Click to expand...
Click to collapse
There is nothing to fix from the live kernel side, I hope you understand that...
AndreiLux said:
All that code is totally irrelevant and has nothing to do with the issue. I also don't understand what you want to say about that loop? Goto is inefficient? Nonsense.
The firmware flash and logic happens in /drivers/sensorhub/ssp_firmware.c and its just a few lines of code. The whole flash process is logged in kmsg at boot so you can just retrieve that and see for yourself.
And you're missing the point, as long as you embed ANY kernel with the sensorhub drivers, they will flash it. There are stock kernels out there with versions 91100, 92600, 92800, 102600 (just from the top of my head, might differ). If you use any recovery kernel whose version mismatches the boot.img kernel firmware, you will get the issue.
And to be honest, I don't understand what the fuss is about fixing it, TWRP includes now a kernel with exFat and removed sensor drivers. You just have to do the same.
There is nothing to fix from the live kernel side, I hope you understand that...
Click to expand...
Click to collapse
AndreiLux said:
Sorry but you're a bit out of bound here with accusing kernel developers and doing such claims about the source of the issue while you seem pretty ignorant about the technical aspects of the problem.
As I said and explained in the thread you linked, the problem lies with the recovery and not the boot kernel. You're the one who will have to adapt your embedded kernel that you include here.
Click to expand...
Click to collapse
You also seem a bit ignorant about recoveries
TWRP doesn't included any custom kernel with exfat support. It comes with cm9 kernel and maybe now cm10.1 since they moved sources to 4.2 recently. Their source is just the android/bootable/recovery part built around cyanogenmod source. CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay. That's the only reason why twrp won't have the delay. I can also include cm10 kernel and no more delays, but say good bye to exfat.
TWRP includes native exfat support where as CM and AOKP choose to not include it in their source (thus cwm) because it is not legal (MS patent). Only thing cwm devs can do:
- import twrp source for exfat support and break the MS patent
- use Samsung genuine kernel to get exfat support
So, not an easy decision / move as you suggest
Phil3759 said:
TWRP doesn't included any custom kernel with exfat support. It comes with cm9 kernel and maybe now cm10.1 since they moved sources to 4.2 recently. Their source is just the android/bootable/recovery part built around cyanogenmod source. CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay. That's the only reason why twrp won't have the delay. I can also include cm10 kernel and no more delays, but say good bye to exfat.
TWRP includes native exfat support where as CM and AOKP choose to not include it in their source (thus cwm) because it is not legal (MS patent). Only thing cwm devs can do:
- import twrp source for exfat support and break the MS patent
- use Samsung genuine kernel to get exfat support
So, not an easy decision / move as you suggest
Click to expand...
Click to collapse
Sorry but almost everything you said its wrong.
TWRP includes a modified CM kernel with added exFat and since I've made Bigbiff aware, also removes the sensorhub drivers.
CM kernel, as I said in my answer, doesn't flash the sensors that's why there is no delay.
Click to expand...
Click to collapse
The CM kernel is based on the Samsung sources and has the flash logic intact, because it's obviously needed in the OS to even have functioning sensors. It's not flashing in your case because you have matching firmwares, and that's all.
Sorry but I suggest you inform yourself here a bit more, I've explained it pretty clearly yet you seem to be ranting about things which are just not correct.
delete

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.

[KERNEL] [Q] N9600 klabit kernel

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!

Question [ROOT] A52 device setup for TS.43 testing

I want to test the TS.43 flow by changing some of the carrier configuration (cc) parameters as described in: IMS Service Entitlement | Android Open Source Project
For that, I use:
Samsung Galaxy A52
AP: A525FXXS4BVE1
CP: A525FXXU4BVC2
CSC: A525FOXM4BVC3
Model: SM-A525F/DS
According to documentation, for that, I require the root access and I actually managed to set this up with Magisk and Odin (following this guide: https://www.samsungsfour.com/tutorials/root-galaxy-a52.html , except for some minor deviations like downloading Magisk from official github page).
However, I would still get the error message “cc: Permission denied.” when running the cc command in shellin mode.
I have tried to find information about it but the best I could find was the following:
https://android.googlesource.com/pl.../com/android/phone/TelephonyShellCommand.java
Here on lines 908 and 1481, I can see the check for whether we are running in root mode AND also validation for whether we have a non-"user" build type.
From TelephonyUtils - boolean IS_USER = “user”.equals(android.os.Build.Type);
From Build.TYPE - /** The type of build, like “user” or “eng”. */
public static final String TYPE = getString(“ro.build.type”);
I am not too familiar with Android development, so I would like to ask the following.
How do I get the ro.build.type as something other than “user”?
As I understand, I would need to download the Samsung firmware for my phone which has the ro.build.type=eng OR ro.build.type=userdebug ? Where can I get such ROM? As eng and userdebug are for testing, does Samsung even provides such firmware?
If I am mistaken, could you please generally advise me on such issues and propose some possible solutions?
Note: I understand that what I do might void my phone of warranty and block some applications. This device is for testing purposes only and it is not going to be used in common user activities.
P.S. And yes I decided to try (out of desperation rather than sane mind) and change the build props with BuildProp Editor app (had to reset to factory, I'm not the brightest man around)

Categories

Resources