[Q] Why did Huawei encript the Bootloader - Huawei Ascend P6, Mate

Hey,
I'm asking myself, why Huawei used a crypted bootloader.
Ok, i can understand if they did this to prevent custom roms and kernel-modification ... but why did the release the aops-kernel-source, if you can't flash the finished kernel and use it to make a good-working aosp-based rom?
Why did they even release this kernel-source.

They are probably planning on removing the encryption in the near future, otherwise there would be no use for the AOSP kernel.

Sounds like this ..
But i think its a little bit frustrating, if you know the sources but you cant do anything ^^

Why u all so miss informed?
Source is real kernel who runs by Huawei. Its not "AOSP".
Bootloader (u-boot) just crc check then starts init ramdisk and boot Android.
Only Update.app use MD5 RSA for verify

Related

Multiple Custom Roms and kernels

Hello Comm. and Devs,
For our Archos there are now many custom rom-images and experimental distris of linux and so on and every "rom" has its own kernel and init which have to be flashed and it seems it is only possible to have one kernel and one init.
I want to test as many roms, plasma, ics alpha, ubuntu, 3.2.80 with busybox and adobe, etc. for shorter or for everytime. And when Archos brings ICS finally i want to upgrade of course, without losing apps and settings etc.
Now i am on rooted 3.2.79 with chainfire 3d and i dont know if it makes senes to upgrade to 3.2.80 custom rom from surdu. Okay, vibrator and so on and some goodies, sounds nice, therefore i want to test and perhaps revert it later.
Which roms are compatibel with each other and which not?
Which rom is how much recommend?
What are the differences between these inits (kernel seems often to be the same seen by its size i think) - is there the possibility and the evidence to merge the inits somehow?
Or is there a kind of general initramfs one could take for most roms?
What rom has which kernel in which version and same for initfs?
What are there for possibilities that every image gets it adequate kernel and initfs?
Many of us want multi boot which i think is not really (?) supported for gen9 .
What should be done for compatibility if i want a kind of multiboot?
It would be nice if this would give a set of infos for us all.
Well, no, kernels are not the same. We're not 100% sure for Archos ones, they're currently closed source, but looking at what they fixed in the different releases, I believe there have been changes. Plasma is definitely using a different kernel, ics will require a completely new 3.0 kernel and probably require clear data.
So what you're looking for is not really possible, not matching kernel with firmware is not a good idea. The only exception would be Ubuntu, but that's it.
what about multi-boot menu from open aos?
There are roumors that people have it work but it is not supported.
Dont want to mess all up.
Do you know something or have experiences?
svennimann said:
what about multi-boot menu from open aos?
There are roumors that people have it work but it is not supported.
Dont want to mess all up.
Do you know something or have experiences?
Click to expand...
Click to collapse
Sorry - about this with multiboot i see there is already a thread.

[Kernel] TF300T JB kernel on TF300TG with ICS bootloader

Being one of those (few apparantly) with a TF300TG, I've been trying to get the JB kernel source from the TF300T up and running - more because I'd like to work on getting Native Linux running (and all of Nvidia's drivers want the 3.1.10 kernel - I've already tried using them on the ICS kernel with correct options) than Jellybean.
While I do have my blobs for NVflash, I'd still rather not try and flash the JB bootloader to my device.
Anyhow, I've done some digging, and what I can tell for sure is that is that JB kernel panics from trying to kill the idle task, this is specifically caused by bad_mode() in arch/arm/kernel/traps.c.
If anyone has any info on how the different bootloaders might be affecting the boot process, or a better way of debugging (at the moment, I adjust the amount of time before the device restarts due to the panic) please do contribute!
EDIT: Figures that just after I post this news of a JB update comes around. Still though, I'm curious as to what exactly the bootloader is doing differently.
here is the kernel command line for the JB bootloader , I believe that it is sent by the bootloader.
I really don't know how else the bootloader could cause kernel panics, but clearly it does.
Code:
<5>Kernel command line: tegra_wdt.heartbeat=30 tegraid=30.1.3.0.0 [email protected]
commchip_id=0 androidboot.serialno=015d15b4f8101214 androidboot.commchip_id=0
video=tegrafb no_console_suspend=1 console=ttyS0,115200n8 debug_uartport=lsport,0
usbcore.old_scheme_first=1 [email protected] [email protected]
core_edp_mv=0 audio_codec=wm8903 board_info=245:0:fc:cc:28 tegraboot=sdmmc gpt
gpt_sector=60440575 android.kerneltype=recovery androidboot.productid=0x02
androidboot.carrier=wifi-only
cb22 said:
Being one of those (few apparantly) with a TF300TG, I've been trying to get the JB kernel source from the TF300T up and running - more because I'd like to work on getting Native Linux running (and all of Nvidia's drivers want the 3.1.10 kernel - I've already tried using them on the ICS kernel with correct options) than Jellybean.
While I do have my blobs for NVflash, I'd still rather not try and flash the JB bootloader to my device.
Anyhow, I've done some digging, and what I can tell for sure is that is that JB kernel panics from trying to kill the idle task, this is specifically caused by bad_mode() in arch/arm/kernel/traps.c.
If anyone has any info on how the different bootloaders might be affecting the boot process, or a better way of debugging (at the moment, I adjust the amount of time before the device restarts due to the panic) please do contribute!
EDIT: Figures that just after I post this news of a JB update comes around. Still though, I'm curious as to what exactly the bootloader is doing differently.
Click to expand...
Click to collapse
Yeah, apparently a new kernel for the TG is being released. Anyway, I own a TF300T and I would love to see Ubuntu booting natively on my device, so if you need any tester for your future endeavors send me a PM.
The reason the JB kernel doesn't work on the ICS bootloader, and vice versa is due to something that has been enabled in the new boot process called Trusted Foundations. Trusted Foundations are an implementation of the Trustzone security features present in all arm Cortex-A* and ARM1176 SoCs. This feature needs to be implemented from boot time to be set up correctly, in JB ASUS enabled the Trusted Foundations feature in the bootloader, because of this it is also required in kernel. Theoretically if you were to change CONFIG_TRUSTED_FOUNDATIONS=y to =n the kernel will probably boot on the ICS bootloader.

[Q] Important question about KEXEC - custom rom for locked bootloader

I MADE MISTAKE AT TOPIC
KEXEC is script/app/pony that allow to run custom kernel on LOCKED BOOTLOADER
I know it works on Moto RAZR
Hello. I remember that some Motorola devices has locked BL. I searched for some info and found:
Something for NOOK
http://forum.xda-developers.com/showthread.php?t=1361943
And for Moto
http://forum.xda-developers.com/showthread.php?t=1599648
IMPORTANT: i dont know - do i found something intresting?
Edit: Hmm it looks something like this:
1.Reboots phone
2.Delete Kernel from ram or it is rewriting in RAM
3.Launches System
Soooo it could be used in ous Arcs? I think it could.
IF anyone who knows something bout android could say something about it....
boss134 said:
IMPORTANT: i dont know - do i found something intresting?
Click to expand...
Click to collapse
It's interesting no doubt, let's see if anything comes from it.
I hope this will push our Locked Bootloader arcs to next level
Can someone look after that project? As you can see i am not dev and i think that someone with expirience should ask dev's of this KEXEC thing how do they done it and is this method uniwersal to evry Android device or at lest Quallcomm devices.
Ohh I remember Kexec from the old Xperia X10 days... FxP (Jerpelea) and Zdizihu both were able to run CM and Stock Froyo on custom kernels using Kexec for our Locked BL X10's....
The work was then abandoned when Sony decided to start unlocking Bootloaders when possible...
We have chance?
So can somebody make rom with that piece of software? I want to test some roms beafore i unlock my bootloader.
Besides this could be cheap way to have custom rom
Any hope to make working kexec to Arc S? I have locked bootloader,cannot unlocked...
Odd, how I have missed this topic. I will look into it as soon as I can and do some testing.
kexec
Someguyfromhell said:
Odd, how I have missed this topic. I will look into it as soon as I can and do some testing.
Click to expand...
Click to collapse
Hi!
I appearently found a working kexec command (compiled for armv7), i cannot test it,because i haven't got my USB cable now, but i can run, it displays help from terminal emulator.
trying kexec
Thats my result, not so good..
255|[email protected]:/system/bin # ./kexec /mnt/sdcard/lupus.img
./kexec /mnt/sdcard/lupus.img
Cannot open /proc/atags: No such file or directory
kexec_load failed: Function not implemented
entry = 0x208000 flags = 280000
nr_segments = 2
segment[0].buf = 0x2e008
segment[0].bufsz = 10
segment[0].mem = 0x201000
segment[0].memsz = 1000
segment[1].buf = 0x2ab3c008
segment[1].bufsz = 720000
segment[1].mem = 0x208000
segment[1].memsz = 720000
Thats Ok
I think that lupus.img kernel should have implemented some Kexec thngs to get it load to RAM, without it its useless :/
kernel
Hi!
I searched a lot, but i cannot found good information about kexec thing..it's not sure that if you have kexec compatible kernel you MUST got atags or no.( i suspect you must got atags only when you are trying to use a non kexec kernel) Someone needed who can make a kexec compatible kernel first, because i cannot compile android kernel I will found a tutorial to this, but i never compiled we need a surely working kernel..I hope some devs interested in this..

[DEV][KERNEL]Kexec-hardboot patch

I would like to explain this a little bit:
What is kexec?
It is a function which allows you to boot an alternative kernel without needing to flash it or using `fastboot boot`. I am not going to write a thousand words to explain this, so if you want more info, search it yourself.
What is kexec hardboot?
It does the same as what kexec aims to do, but instead of booting another kernel directly, it reboots the device before doing so so that the hardware can be reinitialized by the bootloader. Normal kexec boots the kernel with the hardware in an unclean state, which is not very healthy. Kexec hardboot is somehow healthier.
I know I am not explaining very well, so please refer to the original thread by @Tasssadar
So what is this post about?
At this moment, there aren't any non-stock ROM, CAF or CM kernel isn't ported yet, so this is pretty useless actually.
In the future, if there are any custom ROMs, this will come in handy because it will allow "installing" multiple ROMs without having to flash them to the device memory.
Basically, this is just to prepare for the future.
Who should be reading this?
Well, developers who can properly compile a kernel.
Patches:
Kernel patch: https://gist.github.com/alvinhochun/7945428
Or, if you cloned my github stock kernel tree, check this: https://github.com/alvinhochun/sony-xperia-m-kernel/commit/2e818d81f21f6a627bc629e477052045426b0663
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
All these options must be enabled.​
Userspace kexec binary: Use the one compiled by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952​
Usage:
I have wrote a simple shell script to automatically set the correct cmdline here:
https://gist.github.com/alvinhochun/7945270
Basically, the most important thing is to make sure the addresses are correct and the cmdline has the proper information in it.
The script requires kernel to be packed with CWM which also provides /boot/busybox. You can use this tool: http://forum.xda-developers.com/showthread.php?t=2481864
Just download the kexec binary and put it in place.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices.
My patch is based on the one by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952
So, are this is like 'Live CD' for android?
Richardsentosa said:
So, are this is like 'Live CD' for android?
Click to expand...
Click to collapse
Well, that analogy can't exactly be used. It's more like the kernel acts as a bootloader that is used to boot another kernel.
alvinhochun said:
Well, that analogy can't exactly be used. It's more like the kernel acts as a bootloader that is used to boot another kernel.
Click to expand...
Click to collapse
after see N4 multiboot, i think this is a great feature.
alvinhochun said:
I would like to explain this a little bit:
What is kexec?
It is a function which allows you to boot an alternative kernel without needing to flash it or using `fastboot boot`. I am not going to write a thousand words to explain this, so if you want more info, search it yourself.
What is kexec hardboot?
It does the same as what kexec aims to do, but instead of booting another kernel directly, it reboots the device before doing so so that the hardware can be reinitialized by the bootloader. Normal kexec boots the kernel with the hardware in an unclean state, which is not very healthy. Kexec hardboot is somehow healthier.
I know I am not explaining very well, so please refer to the original thread by @Tasssadar
So what is this post about?
At this moment, there aren't any non-stock ROM, CAF or CM kernel isn't ported yet, so this is pretty useless actually.
In the future, if there are any custom ROMs, this will come in handy because it will allow "installing" multiple ROMs without having to flash them to the device memory.
Basically, this is just to prepare for the future.
Who should be reading this?
Well, developers who can properly compile a kernel.
Patches:
Kernel patch: https://gist.github.com/alvinhochun/7945428
Or, if you cloned my github stock kernel tree, check this: https://github.com/alvinhochun/sony-xperia-m-kernel/commit/2e818d81f21f6a627bc629e477052045426b0663
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
All these options must be enabled.​
Userspace kexec binary: Use the one compiled by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952​
Usage:
I have wrote a simple shell script to automatically set the correct cmdline here:
https://gist.github.com/alvinhochun/7945270
Basically, the most important thing is to make sure the addresses are correct and the cmdline has the proper information in it.
The script requires kernel to be packed with CWM which also provides /boot/busybox. You can use this tool: http://forum.xda-developers.com/showthread.php?t=2481864
Just download the kexec binary and put it in place.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices.
My patch is based on the one by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952
Click to expand...
Click to collapse
can we use this to boot cm10 cm11 on sony Xperia z?
nabelar82 said:
can we use this to boot cm10 cm11 on sony Xperia z?
Click to expand...
Click to collapse
I guess you are mislead this is a kernel feature and is not at all related to booting of a rom
SpinXO said:
I guess you are mislead this is a kernel feature and is not at all related to booting of a rom
Click to expand...
Click to collapse
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
nabelar82 said:
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
Click to expand...
Click to collapse
Not really.
But Recognized Developer @Rachit Rawat has explained how the Locked Bootloader CM is booted and I see @Olivier have worked on the same for Xperia S you can try to contact him
Explanation Link: http://forum.xda-developers.com/showthread.php?p=49073506#post49073506
nabelar82 said:
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
Click to expand...
Click to collapse
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
aweosomeabhijeet said:
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
Click to expand...
Click to collapse
Well I am very interested on this patch but I am not a developer it will be very interesting if someone apply on a xperia z an we can test can someone try? I can test
aweosomeabhijeet said:
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
Click to expand...
Click to collapse
Contact Skrilax_CZ on freenode at channel #motomagic and he might be able to help us.

[Q] ASOP/Exynos Question

Hi,
Please can someone explain why Exynos has a bad rep for custom ROMs? Samsung release the kernel and I assume it contains either open source drivers or binary blobs. Either way we have a functional boot.img with a working ~3.4 kernel, that kernel should presumably boot any sensible 4.4+ system.img right?
I'm asking because I'm considering building a clean ASOP ROM for the Tab S just to get rid of the crazy amount of bloat. This is obviously trivial with the Nexus device line, but I'm just trying to understand why it's complex in this case? Can we not just use the stock kernel/drivers with any arbitrary userspace e.g ASOP git or CM? Does the SoC really matter to us for non-kernel projects? Or are all the problems purely in the custom kernel world?
Also, is there anything actually important in Samsung's userspace that i'm missing? It's really just the UI and little extra features for the camera and things right? I can't help but feel the speed gain from an ASOP built would be incredible, all the hardware should work just fine given a working stock kernel?
Thanks!
@eousphoros is working on porting CM right now. Why don't you PM him and see if you can put your heads together on it?
jasonfxp said:
Hi,
Please can someone explain why Exynos has a bad rep for custom ROMs? Samsung release the kernel and I assume it contains either open source drivers or binary blobs. Either way we have a functional boot.img with a working ~3.4 kernel, that kernel should presumably boot any sensible 4.4+ system.img right?
I'm asking because I'm considering building a clean ASOP ROM for the Tab S just to get rid of the crazy amount of bloat. This is obviously trivial with the Nexus device line, but I'm just trying to understand why it's complex in this case? Can we not just use the stock kernel/drivers with any arbitrary userspace e.g ASOP git or CM? Does the SoC really matter to us for non-kernel projects? Or are all the problems purely in the custom kernel world?
Also, is there anything actually important in Samsung's userspace that i'm missing? It's really just the UI and little extra features for the camera and things right? I can't help but feel the speed gain from an ASOP built would be incredible, all the hardware should work just fine given a working stock kernel?
Thanks!
Click to expand...
Click to collapse
The big problem I ran into is with gralloc/hwcomposer. The hwcomposer that ships with the device is 1.3 whereas the opensource is currently only 1.1. While the initial thought of just copying gralloc.exynos5.so hwcomposer.exynos5.so as propertietary blobs seems like it a good one, they are unfortunately linked to a ton of libraries in /system/lib that makes bringing them over troublesome at best. Though that being said that is the hack I used to get my one and only bootable rom up and running.
Going further the issue with the exynoshwc 1.1 that I have been fighting with is after opening up /dev/graphics/fb0 it trys to send it an ioctl that I assume is the S3C_WIN_CONFIG pointer and gets an ENOTTY back from the device. If you are interested in helping out please checkout the cyanogenmod porting thread in general where I have linked my local_manifests.xml with my git repo's and a blog of my progress.
Cheers.
EDIT: Has anyone ever requested source from samsung? What seems to be the most succesfull method?

Categories

Resources