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
Hey all,
I'm trying to install a linux distro on my phone using linux deploy. But during the installation process I'm getting the error: FATAL: Kernel too old.
Currently I'm using My-ROM on my phone so that it's rooted and I can use it the way I want it to. However this seems to be shipped with a rather old kernel from 2014.
The kernel I'm using is: 3.0.8-00453-gb101afe
Is there a custom build kernel or a stock one out there for huawei ascend p7 that supports linux deploy, and I can simply do a kernel upgrade from within clockworkmod without messing things up?
I would even pay someone to build me a custom kernel that works for my phone with linux deploy if I have to...
I would very much appreciate it if someone knows of a solution.
Simbaclaws said:
Hey all,
I'm trying to install a linux distro on my phone using linux deploy. But during the installation process I'm getting the error: FATAL: Kernel too old.
Currently I'm using My-ROM on my phone so that it's rooted and I can use it the way I want it to. However this seems to be shipped with a rather old kernel from 2014.
The kernel I'm using is: 3.0.8-00453-gb101afe
Is there a custom build kernel or a stock one out there for huawei ascend p7 that supports linux deploy, and I can simply do a kernel upgrade from within clockworkmod without messing things up?
I would even pay someone to build me a custom kernel that works for my phone with linux deploy if I have to...
I would very much appreciate it if someone knows of a solution.
Click to expand...
Click to collapse
The huawei p7 is basically dead, because developers have no interest in it, just buy a newer phone and from another company like htc, because Huawei has little interest even with it's current flagships.
Sorry I shouldn't have started this thread, the error message I got was distro specific and had something to do with glibc. It wasn't the kernels fault even though thats what the error said. I went with a different distro and everything is fine now. I do however agree with your comment. If I wanted to have the latest and greatest it's probably better to buy a new phone. But it doesn't concern me as much currently if I can get things working the way I want on this phone.
Hello colleagues, I just registered and I need your help on using Linux Deploy next to a kernel that brings the WiFi drivers to monitor mode.
What I want is to have the latest official ROM stock v7.1.1 with root, install the TWRP and then Linux Deploy with the Kali Linux distribution but I want to know if it is possible to install this kernel "kernel-nethunter-shamu-nougat-3.15.4- 20170211-0304.zip" that already brings the WiFi drivers for monitor mode.
This Kernel is from the Kali Linux NetHunter ROM and I know it works great with Nexus 6 but I want to have Linux Deploy with the WiFi drivers being in the official ROM. My question is, being in v7.1.1 with root and TWRP can I install the previous kernel without problems and will Linux Deploy work by detecting the USB WiFi card?
Greetings and thank you.
I need help, please.
Try it and find out. The worst that will happen is you having to restore a stock ROM.
There may not be anyone out there with your specific use case that can help you, so you probably will have to go it alone here.
Thanks.
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
Ok, got a T380. Device specs show it should be much more snappy and responsive than it is. I want to build an ASOP or lineage build for it. There are no custom ROMs right now for my device. Can any dev point me in the direction of a tutorial for building the device tree and obtaining the proprietary blobs? I have been googling for weeks and most of them tell me to get the blobs from a similar device running LOS. I have some coding, flashing and linux expericence, so I am not going in as a complete noob. Any advice or help would be greatly appreciated. TIA
I started compiling roms in August so I have been through this journey in which you are about to start. I'm not a developer, but this is what I learned so far.
If you have a supported lineageos device, I suggest you build that first following the guides they have written. This will ensure you have the proper toolchain, tools, OS, memory, hard disk space, etc setup properly. Here is an example.
https://wiki.lineageos.org/devices/gtelwifiue/build
For the device tree, I did a search using "github sm-t380" and it came up with
https://github.com/tangalbert919/android_device_samsung_gta2swifi
Once I knew the code name, gta2swifi, then I searched "github gta2swifi" which lead to
https://github.com/lilindian16/android_device_samsung_gta2swifi
which looks like a good start.
In order to build the rom, you need 5 things.
1) device tree
2) kernel source
3) vendor blobs
4) roomservice.xml
5) twrp
For kernel source, the T380 has open source code at
https://opensource.samsung.com/main
Type T380 in search box and download the Pie kernel source code.
For vendor blobs, if the
https://github.com/lilindian16/android_device_samsung_gta2swifi/blob/master/proprietary-files.txt
is correct, there's over 2300 files that you need to copy over.
For roomservice.xml, take an existing one that is close to the T380 and make modifications to it. I built the T350 and you can look at the roomservice.xml file at
https://forum.xda-developers.com/ga...ficial-lineageos-17-1-galaxy-tab-8-0-t4162573
For twrp, use an existing T380 twrp.
Video tutorials that I found useful in building roms.
https://www.youtube.com/c/AlaskaLinuxUserAKLU/videos
Thanks so much for the help. I am pretty much in the same spot. I have rooted and flashed just about every device I have ever owned and feel pretty confident I can build a ROM for this device. I already have rooted and TWRPed my T380 it was the vendor files and proprietary blobs that were totally dumbfounding me. I will check your links and work through it. Again, thanks so much for the links.
Okiera29 said:
it was the vendor files and proprietary blobs that were totally dumbfounding me.
Click to expand...
Click to collapse
If you haven't noticed, the vendor blobs are at
https://github.com/lilindian16/android_vendor_samsung_gta2swifi
One other tip. For your first build, build an eng build so you have adb logcat enabled right away. It took me days to figure that out when the boot animation was stuck or the tablet was boot looping. The magic command is
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j2 bacon
-j2 because my machine is only dual core and I only have 12GB DRAM to build.
It's the only way to see debug and information messages while the tablet is booting.
Thanks man! Still trying to get it set up right. I tried to build a debloated, deknoxed stock rom with Android Kitchen and failed. Luckily, had a TWRP back up so the soft brick wasn't an issue. I am determined to figure this out and get a thin custom ROM built for this sucker. I need to figure out overclocking too. You have been a tremendous help!!!
@Okiera29 Were you able to get a working LineageOS rom for your T380. If you don't mind telling me what you have tried and if you had success that would help me out a lot. I'm a newbie trying to find my way around custom roms
I forgot that I participated in this thread. I don't have the SM-T380, but one of the links I referenced earlier shows activity in the last month for the SM-T380 and as recent as < 48 hours.
Looking through the commit history, @andr01dfr3ak might actually have a running 18.1 because enforcing selinux is usually done last after the build is up and running.
Albert, aka andr01dfr3ak also worked on earlier versions of the SM-T350 with 15.1. Since then, I have helped build SM-T350 16.0 with some people and then built 17.1 and 18.1 basically on my own.
I do not have the SM-T380 either, so I am not sure if what I have right now even works. I just know that I can build LineageOS for this device.
@andr01dfr3ak built this rom for me I posses a SM-T380 but I don't have it rn I got stuff removed... for awhile.... If @retiredtab has the device may I suggest having @andr01dfr3ak give @retiredtab the rom to run?
{Mod edit: Link removed} my Discord Server.
i'm trying to download the rom from @andr01dfr3ak but there aren't any available mirrors on androidhost
Want to chime in here -- I too have a Samsung SM-T380, rooted and have TWRP 3.2.3-1 flashed to recovery. I downloaded an image lineage-18.1-20220114-UNOFFICIAL-gta2swifi.zip from somewhere, which is what I think @andr01dfr3ak has been working on.
I am able to successfully install the image, but when booting, the following message is displayed at initial splash screen: "KERNEL is not seandroid enforcing"
And then the display goes dark.
I'm more than happy to provide logs and/or test images if that would be helpful? Please let me know if there's anything I can do to move this along so we have a stable Lineage 18.1 image for the SM-T380!
I've (somehow) got this tree to boot. Whatever the manifest in the tree was doing, it wasn't working, but reverting to the stock one (and downgrading everything) seemed to do it.
I can't get the camera HAL to detect any cameras, though. I think Bluetooth also has issues, but at least WiFi/sound/earbuds are working so at the very least you can use it as a media consuming tablet. And I also have no idea if it works outside of my own device either.
Am a little uncomfortable uploading something that barely works, though, but if anyone capable of building it wants to find out, I have a tree here:
https://github.com/lifehackerhansol-android/android_device_samsung_gta2swifi
https://github.com/lifehackerhansol-android/android_vendor_samsung_gta2swifi
@lifehackerhansol Mind DM'ing me a link to your build? I'd like to work on this a bit and reviewing your progress would be helpful!
christophershaw said:
@lifehackerhansol Mind DM'ing me a link to your build? I'd like to work on this a bit and reviewing your progress would be helpful!
Click to expand...
Click to collapse
So I no longer have this device, it has been given to a family member and reverted to stock. So I can't really make a build and confirm that it's working. The device tree I left above is exactly as I left it back when it did work, so you can go off that.
Sorry, I lost the existing build since. Had to reinstall Linux on my machine and all.
I now have another SM-T380. (lol)
The camera was a kernel issue. Turns out we were using j4primelte's kernel, and it worked all the way until it tried to initialize cameras, because our device's cameras aren't supported in that kernel. It's a miracle anything else worked... Well that was the first problem. The second one was that the blobs were old and Samsung botched their upgrade to 9.0 so I had to deal with several workarounds for that. Anyway camera fixed.
Currently in the middle of mucking with SELinux. When that looks clean I'll push a build(?)