Someone have studies "Kexec" solution for locked bootloader ?
Kexec : http://en.wikipedia.org/wiki/Kexec
We keep our stock kernel with bootloader locked (not unlocked allowed), but at start (early), we run the kexec process witch kill in memory the stock kernel, and run custom kernel and custom rom
It's elegant, and like CWM process.
Someone have informations ?
Well, i answer myself.
Kexec need 2 parts to run.
1/ A patched stock kernel, or a patch for stock to be flashed by recovery.
This patch is needed to reinitialize CPU without a full memory scratch.
This is necessary to keep kexec alive in memory and finish to load new kernel.
A example of patch here : https://gist.github.com/Tasssadar/6687647
and here : https://gist.github.com/4558647
These patch are for S4Pro APQ8064 CPU
Config Option :
•CONFIG_KEXEC=y
•CONFIG_KEXEC_HARDBOOT=y
•CONFIG_ATAGS_PROC=y
•CONFIG_GROUPER_HARDBOOT_RECOVERY=n
2/ Kernel loader
It is a userspace binary.
The command to boot is :
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x85000000 --command-line="$(cat /proc/cmdline)"
kexec -e
This binary "kexec" drop the memory from current stock kernel (even with a locked bootloader),
and load new kernel "initrd.img" to boot.
The command interpreter is called by command-line
To work, we need to dev a patch for stock current kernel.
The rest is easy... "just" modify a CWM to create userspace for kernels and roms on sdcard1, and the load option to boot onto
Please help us to found documentations
I think the devs will be more interested in making the camera work after an unlock.
DooMLoRD is working hard (As he always does for xperia devices) on making a recovery for LB, then I think he will spend time updating DooMKerneL to the same level as it is for other devices, then if he gets time he will work on Kexec, but he has said its low down on his todo list...
I'm waiting for a long time when you are able to load other kernel on my phone locked, if you find a solution I would be very grateful, I'm even willing donate for it
Google translator
I have the same Situation, and i would donate too
Related
I'm new to flashing SafeStrap Roms and I have a couple questions
1.) Do/Can SS Roms run there own kernels say if its not in the stock rom slot
The reason I ask is I would like to enable UMS but through my research it can only be done if you are running a patched kernel to enable UMS?
2.) "Mostly seeking verification on this one" Is it true that there is currently no way to run a modded kernel on our variant because of the locked BL?
3.) Are there any Roms, &/or, Kernels currently allowing for UMS for our variant?
4.) Is Over/Under - Clocking/Volting Possible with SS Roms, with/without init.d support also With/Without Kernel Patching
5.) What is and is not possible with init.d support on our variant and could UMS be enable through the use of init.d script to change the build.prop persist.UMS.Enabled=True
Really I'm just trying to get my bearings I'm not new to Android Modding but definately new to Safestrap Roms and there ins & Outs
Any Knowledge on the subject will be greatly appreciated and may help others coming from devices that previously did not require knowledge of SafeStrap do to Non-Locked BootLoaders.
Thanks in advance
Hi. Is there any such custom kernel built? I can't find any. They all seem to be <3.1. Even ones which were built this year.
Is it impossible/unfeasible to build such kernel?
I want it because I'm installing Arch on Android(in chroot) - it works fine, but I can't update it. Because when I update glibc, everything fails - I get "FATAL: kernel too old" message. And if I won't update glibc, I won't be able to install/update software which requires recent glibc - like gcc. I probably could meddle with glibc(compile it myself manually and relax kernel restrictions), but I'd prefer to just update kernel.
Same thing
I'm in the same situation.
I could not find any kernel higher than 3.0.x
I was happy using Arch on N7000 (using Linux Deploy), but after an update I get "FATAL: kernel too old" for all commands.
It's possible and not so infeasible, just not worth it.
Alright, we need to stir the scene up... and God is it past the due time.
Blu has had the Kernel sources available in their ftp server since August IIRC and the Gionee equivalent of this phone has been running Marshmallow for more or less the same time.
So here's my github with the kernel sources on it: https://github.com/batoussai/android_kernel_VivoXL
I fixed the problems I found with improper makefile prepending and inclusions in headers and c files. It compiles successfully but so far I haven't had time to test if the phone works with it flashed, and I really need some sleep now.
What needs to be done now is:
-Get a reliable way to unlock the bootloader.
-Test the kernel as it is now.
-Start development of modified kernels.
-Think of what should be done afterwards.
Anyone and everyone is more than welcome to help (specially since I'm mediocre dev and things will take forever with only me working)
Reserved
you mention getting the bootloader unlocked, but is that only to get TWRP on there or allow kernel changes? i have TWRP, supersu, but still have a locked bootloader... I have been wanting to make some real changes on this phone
stonerphoner said:
you mention getting the bootloader unlocked, but is that only to get TWRP on there or allow kernel changes? i have TWRP, supersu, but still have a locked bootloader... I have been wanting to make some real changes on this phone
Click to expand...
Click to collapse
I'm not sure you will be able to edit the kernel partition with a locked bootloader.
My phone decided that it would accept having the bootloader unlocked now and I don't really want to test relocking it.
And in other news, the compiled kernel works as supposed and my phone still boots after flashing it (had to repack the ramdisk from the stock kernel to make the boot.img)
let's try it for variant condor pgn-605 p8 the same as blu vivo xl but bootloader is already unlocked
i have bootloader unlocked i hope i can test it with rom like cm 13 as soon as one of you can make it for us
https://atozhacks.blogspot.com/2016/10/rommmhios-rom-for-gionee-splus-by-splus.html
i found this rom work perfectly
This might might provide some pretty useful references for me. Thanks @mwalid25!
And updating a bit, currently working on the device tree and proper ramdisk generation. As soon as I get results I'll upload it to github too.
Also, if anyone wants to help pester Blu into releasing the stock firmware too, that'd be appreciated since currently we depend on third party stock releases that I can't attest the integrity since I didn't bother comparing them to my stock firmware while I could.
Hi everyone,
I was one of the early "plungers" for the XZ1c, so I unlocked my bootloader without any TA key backup, flashed Oreo (47.1.A.12.145), and got by with Xperifix. But now I want to upgrade to Pie for a plethora of reasons (e.g. development).
I did a bit of reading here and there, and I came up with a set of steps for me to follow (and maybe anyone else who wants to attempt the same). Please do correct me if I'm wrong, and risk a brick:
Method A:
Backup all my stuff (a combination of manually, TitaniumBackup, Google, Sony)
Download the official stock firmware for Pie (47.2.A.10.45) via Xperifirm.
Flash Pie with a full format, to prevent any instabilities from apps.
Flash j4nn's bootloader unlock hide kernel to get root + Magisk (v18.1).
Restore backups.
Method b:
Backup all my stuff (a combination of manually, TitaniumBackup, Google, Sony)
Download the latest firmware and kernel for Pie (47.2.A.8.24) from janjan's thread.
Flash Pie with a full format, to prevent any instabilities from apps.
Flash janjan's kernel to get root + Magisk (v?).
Restore backups.
I'm leaning towards method A, as it'll be a newer version of Pie, but I do have some questions I couldn't manage to find a clear answer for:
Will Google Pay work with either method? This is kind of a deal breaker for me, as contactless payments are prevalent in my region.
Is there a reason to use Newflasher over Flashtool? I had used Flashtool for my XZ1c (even before they added official support in 0.9.24.3).
Does the gimmicky slo-mo video camera feature still work?
Is it possible to get TWRP with j4nn's method?
@TheFuzzy, concerning janjan's kernel, there is no drmfix included in pie releases, so that kernel seems to be only somehow tuned stock kernel.
My kernel releases are stock identical, no tuning at all, the only difference to stock is the kernel patch to hide bootloader unlocked state.
I believe this is a great benefit even in case of lost drm keys, if you need to use google pay or such apps. And yes, by following alternate use guide, my kernel can be flashed and used with twrp.
As tested by @russel5 (with some help and ideas from me), google pay now seems to use Android Attest Key (as I've expected long ago to happen) to truly detect bootloader unlock state.
In case you have Android Attest Key _working_ (see here to find out), even my kernel would not help to hide bootloader unlock (you can test that with the linked Auditor app even while running my kernel).
Destroying Android Attest Key seems to help to make google pay working as tested by russel5 - I did not test that myself, but @russel5 might confirm (thanks again for your testing and your finds, russel5).
But it seems to be irreversible change - we might still try to do some backup and restore tests...
@j4nn Thanks for the info! It is a bit confusing to keep up with the differences between the different methods.
I used your bootloader with 47.2.A.10.45, and it works like a charm.
I flashed your kernel directly as I'm not interested in FOTA. I've not tried to flash TWRP as I was afraid it might break the bootloader hide unlock patch (unless there is a specific order to follow, i.e. flashing it over TWRP or vice versa).
I ended up using Newflasher too, as I had read about not flashing the persist.sin file, and it seemed too tricky to do it with Flashtool.
One odd side effect is that I required the patched kernel to be flashed instead of booted from via adb, otherwise the device would boot loop and boot with the stock kernel instead.
I wasn't able to use your patched Auditor app as I don't have another phone at Nougat to verify. Indeed, Google Pay did pick up on the bootloader unlock status (maybe because of the Attest Key), but I was able to re-enable it using the SQLite trick mentioned here. My banking apps work fine with MagiskHide, too.
@TheFuzzy, you may use my patched Auditor app just with your single phone, which you like to check your attest key in.
Just install the patched Auditor and scan the QR code available on google play store in the Auditor's screenshots, instead of using a second phone.
That will trigger the verification just fine and then the audit results are simply displayed on the phone.
Hello all!
I'm trying to play with Linux kernel source code for various reasons: e.g. add new feature to netfilter.
But i got problems even with pure "vanilla" kernel!
What i've do:
downloaded Google source code for Linux kernel
built it
copy to <rom_src_root>/device/google/coral-kernel (replacing old one)
make bootimage
adb reboot bootloader
fastboot boot <rom_src_root>/out/target/product/coral/boot.img
Touchscreen and Wi-Fi don't work at all.
I moved touchscreen driver to drivers/staging, make it compile, and after that touchscreen began to work.
So, how one can debug kernel with complete ROM flashing?
Do fastboot requires fully monolithic kernel, or i am doing smth wrong?
P.S. My first post here, don't sure where to place such kind of question
Hi!, I know this is from a while ago. Sorry sorry for disturbing you with this.
I'm facing the same issue.
Did you happen to find a solution for this?
eraxillan said:
Hello all!
I'm trying to play with Linux kernel source code for various reasons: e.g. add new feature to netfilter.
But i got problems even with pure "vanilla" kernel!
What i've do:
downloaded Google source code for Linux kernel
built it
copy to <rom_src_root>/device/google/coral-kernel (replacing old one)
make bootimage
adb reboot bootloader
fastboot boot <rom_src_root>/out/target/product/coral/boot.img
Touchscreen and Wi-Fi don't work at all.
I moved touchscreen driver to drivers/staging, make it compile, and after that touchscreen began to work.
So, how one can debug kernel with complete ROM flashing?
Do fastboot requires fully monolithic kernel, or i am doing smth wrong?
P.S. My first post here, don't sure where to place such kind of question
Click to expand...
Click to collapse