possible fix for broken features on new roms - run two kernels? - Android Q&A, Help & Troubleshooting

I realize that one can run and install linux on an android device (which is running it's own kernel on top of android's kernel), so wouldn't it be just as possible to run a factory kernel on top of a modded kernel to regain access to device specific features that only the factory kernel can currently utilize (4g, 3d cameras, etc.)? As far as I understand, linux has access to those features and can interface with them (whether it can do anything with them is another topic, but...), so wouldn't this be a viable solution to make custom ICS, JellyBean, Cyanogenmod roms work 100% with each device? Sorry for the lack of specific technical mumbo-jumbo lingo, just a newbie brainstorming here.

Related

[Q] How come that specific userlands do require a certain kernel to work?

I'm very new to Android as an OS with the Linux kernel at its heart, but fairily proficient with GNU/Linux and a plethora of its distributions for what has been more than a decade by now. So, what I (amongst other things) find a bit bewildering is that very many of custom firmware images seem to require a very specific kernel version or build for handsets to actually work. For my Xperia Mini (Smultron), there are ROM images based on CyanogenMod that won't work with the "vanilla" CM7 kernel, for instance.
With a proper GNU/Linux system, you don't have that kind close coupling of userspace and kernel versions at all. Barring some minor incompatibilities between certain (old) releases of udev and modern releases of the Linux kernel (and vice versa), there's very little (if anything) that stops you from supplanting your three years old distro's kernel with something that Linus released a few days ago.
However, whenever I've come across a guide how to install/set up this and that ROM for some kind of phone, and someone (more or less prominently) states that that image will require a specific kernel build, I've _never_ been so lucky to have been offered a technicial explanation as to why exactly this is the case. Can anyone reading this thread tell me, or point me to where I can find out more about the underlying reasons for these subtle incompatibilities?
I refuse to believe noone can answer that question...
Some features are not available in stock kernel, that are needed for custom ROM.
I am personally not fully familiar with kernels.

[Q] Kernels and Android Versions

I'm not understanding how kernels and ROMs connect. Can someone give me some extra insight?
[Hardware] <-- Unique to every phone
--
[Kernel] <--- Tells the OS how to talk to the hardware
--
[ROM] <--- Slightly confused. Is the OS in the Read only Memory, or has this term changed its "street" meaning?
I understand that most ROMs (e.g. CM7 and CM9) include both the kernel and the ROM, but can you flash these separately too?
I have a 1.5 year old thunderbolt that's rooted, and has CM7 which is based on gingerbread. I believe HTC has also released the kernel as open source, which is probably the reason I have CM7
Anyway, I guess what I'm looking for is an answer/guide/forum that explains why I can't install newer versions of android onto the already working/open source kernel I'm already running. Is it accurate to view the kernel as all the phone's drivers, or just the CPU driver? If that statement is true, why can't I load ICS or Jelly Bean onto my already existing set of drivers?
I'm thinking about starting a Wiki on this if 1) it doesn't already exist, and 2) I can wrap my brain around it enough to share with others!
Thanks to anyone with a response!
shadowrelic said:
I'm not understanding how kernels and ROMs connect. Can someone give me some extra insight?
[Hardware] <-- Unique to every phone
--
[Kernel] <--- Tells the OS how to talk to the hardware
--
[ROM] <--- Slightly confused. Is the OS in the Read only Memory, or has this term changed its "street" meaning?
I understand that most ROMs (e.g. CM7 and CM9) include both the kernel and the ROM, but can you flash these separately too?
I have a 1.5 year old thunderbolt that's rooted, and has CM7 which is based on gingerbread. I believe HTC has also released the kernel as open source, which is probably the reason I have CM7
Anyway, I guess what I'm looking for is an answer/guide/forum that explains why I can't install newer versions of android onto the already working/open source kernel I'm already running. Is it accurate to view the kernel as all the phone's drivers, or just the CPU driver? If that statement is true, why can't I load ICS or Jelly Bean onto my already existing set of drivers?
I'm thinking about starting a Wiki on this if 1) it doesn't already exist, and 2) I can wrap my brain around it enough to share with others!
Thanks to anyone with a response!
Click to expand...
Click to collapse
You are correct about the ROM, but ROMs also include the kernel (if it didn't, or no kernel was flashed separately, the device would not boot). Yes, other kernels can be flashed on your existing ROM, but it's not necessarily going to be compatible.
Sort of, but there's a lot more than that. See here and here. Later versions of Android will require newer drivers,etc. which the existing kernel won't provide (they'll be outdated). Back porting and additional coding is theoretically possible, but insanely difficult (many times). Even after this some things may still not work.
Thanks for the insight, I was able to get a lot deeper into this with those links. For anyone else wandering down a similar path, you might as well stop now! Here are a few links:
http://forum.xda-developers.com/showthread.php?t=1039217&page=2#17
http://www.cs.uwc.ac.za/~mmotlhabi/avmk.pdf
http://www.iteachandroid.com/2012/01/what-is-firmware-rom-and-firmware.html
So, if anyone else is still listening, I do have two more questions:
Do any phones have truly open source drivers? (a.k.a. higher probability of allowing old hardware to work with new android OS)
Is there any way to determine which phones will be supported by the custom-ROM community early on? I know the Nexus line doesn't have vendor modified code, is that the direction which would have the highest probability to stay at top of the Custom ROM curve without upgrading devices every year?
Thanks again for any insight! I hope I'm posting this in a Newb-Friendly forum!
shadowrelic said:
Thanks for the insight, I was able to get a lot deeper into this with those links. For anyone else wandering down a similar path, you might as well stop now! Here are a few links:
http://forum.xda-developers.com/showthread.php?t=1039217&page=2#17
http://www.cs.uwc.ac.za/~mmotlhabi/avmk.pdf
http://www.iteachandroid.com/2012/01/what-is-firmware-rom-and-firmware.html
So, if anyone else is still listening, I do have two more questions:
Do any phones have truly open source drivers? (a.k.a. higher probability of allowing old hardware to work with new android OS)
Is there any way to determine which phones will be supported by the custom-ROM community early on? I know the Nexus line doesn't have vendor modified code, is that the direction which would have the highest probability to stay at top of the Custom ROM curve without upgrading devices every year?
Thanks again for any insight! I hope I'm posting this in a Newb-Friendly forum!
Click to expand...
Click to collapse
For both your questions, the Nexus-line devices would be the way to go. They usually have everything working on new Android versions the soonest, and Google always releases their code, etc.
Hi
i can use linux kernel (zimage) to update android kernel if yes ,how ?
thnx

FUSE & MAC & Android custom ROMS

Hi,
I am currently working on a least authority file system for AppArmor based Linux systems (MinorFs). The file-system is an encrypting loopback user space filesystem (FUSE), and it would be interesting if next to OpenSuse and Ubuntu, I could look at targeting a custom Android ROM also.
I am totaly new to the whole custom ROM world, so my apploogies if some of these quesions are FAQs.
I'm not fully sure yet if the concept will work for Android, I'm hoping it will.
I have a few questions that I hope I could get answers to in this forum:
1) Is there any custom ROM that supports fuse and allows for custom built fuse file systems to be added to it?
2) Are there any custom ROMs that next to fuse, also come with AppArmor enabled or the possibility to enable AppArmor?
3) If the question to 1 and/or 2 is no, where should I start if I wanted to customize a custom ROM to support both AppArmor and Fuse?
4) If the answer to 1+2 is yes, what would be the best way to customize and test the ROM using my file-system? Can I use virtualisation software for testing? Or will I have to keep flashing an old phone to do the testing?
5) Ones I'm done with testing, if things work out well, this file-system might, together with AppArmor be a good basis for a security focused custom ROM, is anyone working on custom ROMs that is to have a particular focus on security?
T.I.A.
Rob

[Q] How do I upgrade a device tree and kernel for Lollipop?

I know it's not as simple as it looks, otherwise everybody could do it, but at least can someone point me in a vague direction?
Just out of interest, how do you upgrade a device tree to support newer Android versions? Anything in particular which might prevent Android from functioning correctly?
I've acknowledged SELinux as a problem already.
I'm new to running device trees and kernels but I do know my way around Linux (I know how toolchains works, and I can build Android and kernels, for example) and I know C++, C and Java.
I've 'Google-d' the matter, but to no avail – there appears no clear way to do it.
+1 this question
i want its answer too:good:

Making an own android image?

Hello everybody. I love this community and I have been lurking for a long time.
I have noticed on a foreign language forum that some people were offering a custom rom for my android 9 TV box.
The chinese box is based on a s905x3 CPU and has a mediatek wifi chip for which it is hard (if not impossible to find the wifi drivers).
The site claims that the image was made by modifying the stock rom that came with the box. Is this possible or do all custom roms need to be build from the source?
The custom rom I want to make is going to replace the launcher with kodi.
I am prepared to build the whole rom from source but I do have a couple of questions.
Since the mediatek wifi drivers cannot be found how would I go about including the binary for the wifi?
I have noticed that the box that I have uses a .ko (kernel object) module to drive the wifi chip.
Can I include these kernel objects in build? It is a shame that the kernel is built as a 32bit system. Would that mean that I can only compile a 32bit kernel if I were to reuse those kernel modules and binaries?
Another idea is to perhaps use the kernel from coreelec in my build since it seems to include a lot of drivers.
Is it possible to use a kernel from something like coreelec but use the source from AOSP for the rest of my build?
Is there anything else that I should be aware of?
Thank you all!!!!
Can anyone give me any hints to any of the questions?
Essentially I want to swap out the stock launcher for Kodi. What is the easiest way to do so?

Categories

Resources