What makes a rom device specific? And ... - General Questions and Answers

There are so many device specific roms out there that are virtually the same.
My question is what part of the rom makes it device specific?
Using this info I am planning to make a rom for my device from a clean rom.
For that I also need to know how to backup an existing rom from the firmware.
My device is a nonbranded WM compatible phone. I currently have WM6.5 in it.
Here is my theory:
1. Backup the existing rom from the firmware
2. Take the part of the rom (backup) that makes the rom device specific
3. Put that in the clean rom.
Now, I need someone to point me to the right direction to accomplish those 3 steps.

Linux
The very first think is, that linux and windows version need to be same as previous firmware rom, cause of device drivers.
Unsure if there will be working for example 2.6.29 kernel driver in 2.6.32 kernel if android core changed.
Every device, almost every have different drivers.
It can be included in linux core, but that makes core even bigger then your device need.
A version mismatch can broke or disable device capabilities.
Next thing is, that also runtime, or libraries which make device differrence can be version sensitive.
Thats my opinion.

Related

Relationship between Android and kernel

Hi all,
Looking to build my first custom Rom and had some queries terminology-wise.
What is the relationship between the kernel and Google's android platform? For instance, is froyo tied to a specific kernel and is this in the source tree?
Second q: HTC release their kernel sources. Say I wanted to get a froyo build up for a device that currently only has eclair, would the procedure be to diff the HTC modifications against the vanilla version and then make the appropriate changes to froyo?
Third q: what makes a Rom specific to a device? Probably linked to first question...
Many thanks,
Martin
Sent from my HTC Wildfire using XDA App
The kernel is basically just a linux kernel with device specific drivers and such added. I've done a 'diff' between the Eris 2.6.29 kernel from HTC and the 'generic' 2.6.29 kernel from kernel.org. It's kind of neat to see the difference. I highly recommend you do that.
There are also device specific drivers in the file structure that the ROM needs in order to function.
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
Also in my sig is the SgtShultz ROM where I tried to make a usable ROM from as close to source as possible. You might get some ideas from there. I still haven't figured out how to get the audio to work. If I get that worked out, I'll actually start using the ROM daily and work out the rest!
Froyo seems to work with kernel versions 2.6.29+, btw.
Many thanks for this; it's given me a good set of places to start reading.
Just pulling down all the AOSP source as we speak, with the hopes of getting a basic build up in the near future
gnarlyc said:
What I've done is compile AOSP from source, compile the kernel from source, zip up the needed files/folders, signed the ROM, and then flashed it to test. If you look at Android Builder in my sig, you can figure out the difference between the Eris and your device. You'll have to change the kernel that gets downloaded, of course. And it really just gives you a basic ROM without the device specific drivers, so things will not work without figuring the rest out. Grab a stock ROM to get drivers, libs, etc. out of.
[...]
/system/usr/keychars & /system/usr/keylayout usually have the keyboard drivers, which are somewhat important.
[...]
Froyo seems to work with kernel versions 2.6.29+, btw.
Click to expand...
Click to collapse
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
MartinEve said:
A couple of questions on this front...
I can see, obviously, where to get the kernel source and needed drivers; I am, however, unclear as to where I should obtain AOSP drivers from (to go, for instance, in /devices/htc/buzz and/devices/htc/buzz-common). Can I extract these from my device? (or do I need to wait until they release Froyo and then extract them from a device running the newer build?) Where on the device should I be looking for this driver set?
Thanks again,
Martin
Click to expand...
Click to collapse
For the most part, any Eclair drivers seem to work. At least that's what I have used for the Eris. 2.1 -> 2.2 isn't too big of a jump. I used drivers from a stock 2.1 ROM.
Look up vendor tree, vendor config, and 'extract-files.sh'. You'll see what people with other devices have done. I have yet to quite get the whole vendor tree thing worked out, but others have. You can just come up with a list of needed drivers to add to the 'extract-files.sh' script and just copy those files in manually. (That's what I have done.) This will get pretty close to making an AOSP build complete. However, it appears that actually using the vendor tree setup while compiling will get things 'right'. There appear to be some libs that will compile differently for different devices.
So, basically, if you compile AOSP without a vendor tree for your device, the build will be located in out/target/product/generic. (And, you can copy drivers in later while using the kitchen, but you might miss out on some AOSP stuff with device-specific changes.) If you use the vendor tree, it will be in /out/target/product/buzz and will contain the drivers that the 'extract-files.sh' script grabbed from your device along with custom compiled libs.
If you are able to get a working vendor tree for your device, it will be helpful to the entire community. They'll all be able to use it for their builds. I highly recommend doing that. Most groups use github or something similar to post the code.
I still have much to learn myself, and you are starting to reach my limit! Good stuff.
Hi,
Many thanks for your reply; to a degree, it's about knowing the terms to search for -- the extract-files.sh is a godsend for information that I would have otherwise missed.
Anyway, onwards to build a usable vendor tree
Best,
Martin

[Q] ROMs vs Kernel Compile and Upgrade

Hello.
I am wondering about the distinct difference between updating Android devices (I have a Samsung Captivate) vs how it is done in linux. It has been a couple of years since my lat linux box, but the process was distinctly different. Specifically, we could get the source to the kernels and all of the modules that we wanted and compile them for added capabilities. Moreover, the file system (data, apps, etc) were all separated from the /boot partition. If a kernel didn't work, it was no problem to boot into the older kernal and try and fix the new one. Never did we have to destroy all of our data to try new kernels, modules, etc.
Why is this so different for Android? Specifically, why do we have to reflash the whole ROM destroying everything else in the process? Is there another way to do this that I am missing or what is the difference that causes this to be necessary?
Thanks so much for the feedback...
would also like to know this one..
Ok, following up on the original inquiry...
Samsung has dropped the 2.2 source for the Galaxy S. Should this source be configurable for any of the Galaxies (i.e. Captivate?) or do we need to wait for specific Captivate source? Also, can the kernel be recompiled and replaced by itself or does the whole ROM need to be flashed? I'm still confised to why this process seems so much more limited than the typical linux cycle...
If i flash a Bad Kernel and my Phone dont boot. ( HTC Desire)
I can flash the old Kernel and it will boot again No need for ROM reflash....

[Q] ROM's, Kernals, Recovery's and ROOTING?

Hi Fellow old and New Devs,
The title suggests it all. I have four questions that I think ALL newbies want to understand. I would try and explain them, but as I am just coming out of the newbie stage, I'm sure people would prefer an answer from a experianced Dev.
When answering a question please put the Question Number. Feel free to answer only one or two of the questions, I'm sure other people will cover your missing fields of knowledge.
Here they are:
1. What is rooting? Can I root my device (HTC Buzz Wildfire) and keep the stock interface? Will I loose my data?
2. What do all these Dev's mean by Recovery? What are they, why are they needed?
3. What is a ROM? Do I need to be rooted for a custom ROM? How can you trust them? Will I loose my data when installing a custom ROM?
4. What is a Kernal? How are they Different to ROM's? Should I change from the stock Kernal?
I know this is a tall order and you could write a book on the topic, but please could you write a short (a couple of sentaces will do) paragraph on each question you choose to do.
When we get enough understandable answers I will edit this post publish the Final answers for other newbies in the future.
Also feel free to enter the poll! As this is a Dev site I presume one of the options will have the most votes but we will see....
Cheers for any contribution in advanced.
th3ant
th3ant said:
Hi Fellow old and New Devs,
The title suggests it all. I have four questions that I think ALL newbies want to understand. I would try and explain them, but as I am just coming out of the newbie stage, I'm sure people would prefer an answer from a experianced Dev.
When answering a question please put the Question Number. Feel free to answer only one or two of the questions, I'm sure other people will cover your missing fields of knowledge.
Here they are:
1. What is rooting? Can I root my device (HTC Buzz Wildfire) and keep the stock interface? Will I loose my data?
2. What do all these Dev's mean by Recovery? What are they, why are they needed?
3. What is a ROM? Do I need to be rooted for a custom ROM? How can you trust them? Will I loose my data when installing a custom ROM?
4. What is a Kernal? How are they Different to ROM's? Should I change from the stock Kernal?
I know this is a tall order and you could write a book on the topic, but please could you write a short (a couple of sentaces will do) paragraph on each question you choose to do.
When we get enough understandable answers I will edit this post publish the Final answers for other newbies in the future.
Also feel free to enter the poll! As this is a Dev site I presume one of the options will have the most votes but we will see....
Cheers for any contribution in advanced.
th3ant
Click to expand...
Click to collapse
Okay, from the best of my understanding, here we go:
1: Rooting. To understand this, we must consider a computer, running linux, windows, or mac. In windows, the "Administrator" account is similar to the root account in linux and mac. Basically if you have root privileges in a system, you can modify every part of the filesystem, as well as perform any tasks the system is equipped to handle. Basically achieving root on an android device means that you can unlock the ability to flash roms, mod, and otherwise hack your device any which way you like. Nearly every model of android device has been rooted, so in most cases, yes you can root XXXXX phone. Also, since you're just gaining privileges, you can root without losing any data, apps, or settings.
2: Recovery. This is a long standing concept in SoC/Embedded device hacking. Basically it is a minimal operating system that performs some very basic, but very important tasks. The reason for it is so that you can write to the necessary areas on the NAND, which would be "busy" while android is booted. This offers a way to access the necessary partitions and write data to them while the data is not being accessed. It's also useful for backing up your NAND. Hence the name "nandroid."
3: ROM. By definition, it means "Read Only Memory." This is a chip on the board. ROM has evolved over the years. It started out as a chip that was sensitive to UV light. The earliest ROMs were "flashed" to a device by stenciling out the pathways and exposing the chip to UV radiation. Nowadays, we have fancy EEPROMs instead, which stands for Electronically Erasable Programmable Read Only Memory. This means that you can "flash" the chip by means of software, namely via Recovery mode in our case. Different ROMs have different features. They are all variations on source code made available by AOSP, or the android open source project. Some projects have their own code tracking, such as CyanogenMod. In most devices, you must be rooted to be able to install a ROM, however it is not explicitly necessary. A bit vague, I suppose. Specifically the tablet I own, the WITS a81e, you can flash a ROM to it just by putting the correct files on the TF card. This is not very common with phones, however. Flashing any rom that is not just a newer version of your current ROM will require a full format. For instance, if you have cyanogenmod and switch to a Sense or Blur ROM, you must format, but if you update from CM6 to CM6.1 you will not need to wipe. How can you trust ROM's? Well the best way to know is to either roll your own, or go with CyanogenMod, as their source is freely and easily available for scrutiny and improvement, along with a nice changelog tracker.
4. Kernels. A kernel is basically the most low level part of an operating system. It interfaces directly with the processor and provides all instruction for operation. Linux is technically not an operating system, it's a Kernel. The different distributions have the Linux kernel, and use their own different User Interfaces. Different kernels in android devices can allow you to overclock. There are many choices in kernels, and the features they offer. Some features are BFS/CFS which is the priority scheduling of processes. Some kernels allow you to charge your battery differently and conserve life. These are often called battery kernels. Also, some kernels unlock extra multitouch points in certain devices. There are different versions of the linux kernel, with many improvements with each iteration. Currently, the latest kernel available that I know of for android devices is 2.6.37. The froyo default kernel was a 2.6.32. I wish I knew a bit more about kernels, however this is about all I know. Perhaps someone could help us out and expand on this a bit?
Brilliant answer not too complicated... let's see what others say....
Sent from my HTC Wildfire using XDA App
What he said...
Pyroboy1080 well said...
That pretty much covers it.
thx for the infos..
Agreed. Thanks for using the poll!
nothing to add on that, as we used to say "merci beaucoup"
Can't ROM
Gotta be something stupid......
Can't install 2.2 or 2.3. Tried two different ODIN flashers. When I do the reset I do not get the triangel with downloading in the center. I'm rooted, Have ROM Manager, Superuser, Root Explorer, Super Manager, I'm unlocked.
I have Android SDK, Congnitive 4.1, NPS, Samsung Kies,SGH I897 USB Drivers, What else? I think I have it covered. In any case I never get the download . Even if I do a "ROM Manager Install fron SD Card, the result is a screen, blue at top and yellow at bottom with the last line saying "Installing Multi- CSC. I can let it run all night, no change in ROM. Does the Captivate sold by ATT have some kind of block or filter keeping me from updating?
Current firmware is 2.1 update 1, baseband I897UCJH7, Kernel 2.6.29 [email protected] #2, Build ECLAIR.UCJH7
Thanks
To better answer your question, I first need to know what type of device you're using...
fxstsb said:
Gotta be something stupid......
Can't install 2.2 or 2.3. Tried two different ODIN flashers. When I do the reset I do not get the triangel with downloading in the center. I'm rooted, Have ROM Manager, Superuser, Root Explorer, Super Manager, I'm unlocked.
I have Android SDK, Congnitive 4.1, NPS, Samsung Kies,SGH I897 USB Drivers, What else? I think I have it covered. In any case I never get the download . Even if I do a "ROM Manager Install fron SD Card, the result is a screen, blue at top and yellow at bottom with the last line saying "Installing Multi- CSC. I can let it run all night, no change in ROM. Does the Captivate sold by ATT have some kind of block or filter keeping me from updating?
Current firmware is 2.1 update 1, baseband I897UCJH7, Kernel 2.6.29 [email protected] #2, Build ECLAIR.UCJH7
Thanks
Click to expand...
Click to collapse
didn't know where to ask this?
hello, everyone..
i have some questions, i'm hoping some of you can anwser.
I used unrevoked to root my htc desire. after that, I used alpharev to gain s-off.
everything went fine, i got the joker, the white screen that lets me pick different options..
now Í tried all those options, nothing works.
I've been searching all night for a solution, and it seems my recovery boot and rom are missing? and what I came across is installing ANDROID SDK tools, and then run fastboot to recover an image. So I installed SDK tools, but fastboot doesn't run, it says some .dll driver is missing. in the platform-tools map is that .dll driver, should i move it?
Can someone get me a step by step tutorial on how to make my desire work again? Im kind of a noob, all I needed was to make a screenshot..
Thanks in advance, it would be appreciated so much..
Pyroboy, I'm using a Samsung Captivate. In another thread someone lead me to "All in One Toolbox". The other stuff is just stuff. That allowed me to install my ROM.

[Q] Why is it so much work to enable a rom for a device?

When I look at the architecture of Android I would expect that the updated Android version lives in all the layers exept for the Linux Kernal. This would mean that upgrading would be as easy as overwriting the layers with the new ones.
Only when the way the drivers are called is changed would a rom require an update on the Linux Kernal.
As it takes a long time to enable updated roms for devices either the architecture picture is incorrect (or the ideal picture that can't always apply due to technical restrictions) or my understanding of it is incorrect.
Could someone please explain?

[Q] Creating Custom ROM

Hello, I'm new to all this Android stuff (I don't even have a phone yet, but its on it way)
I have been reading up on custom ROM creation but there are some things I don't quite understand.
Let's say I have a phone in Android 2.3. I want to create an Android 4.0 ROM to put on the phone.
Now... to compile Android 4.0 I need the drivers for my phone (which I doubt I will ever have access too since its only a cheap Android with a MediaTek CPU)
So I have a 2.3 ROM that contains all the compiled drivers and the Android 4.0 source code.
Is it possible to compile 4.0 and replace the zImage (if I'm correct) with the 2.3 zImage. From what I have read, that's where all the drivers are stored.
I guess its not that simple since I also think the zImage contains the OS. If so, is it then possible to extract the zImage and replace the invalid driver files in 4.0 with the correct drivers from 2.3?
Also, I think my phone will arrive with an annoying UI, is it possible to just get any 2.3 ROM (that doesn't have an annoying UI and shares the same CPU as my phone) and replace the zImage in that with my phones 2.3 zImage?
Sorry, if my questions are stupid but this is all new to me. I've tryed to read up on this but nothing is straight to the point.
Thanks
Anyone there?
try out some roms first. see what you like and dont like. it'll probably give you a better idea for how you would make your own rom.
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Kailkti said:
I don't think you could just port an entire zimage to ICs and say it will work (it might not even compile i think). It won't work. You could probably take some drivers' code (screen, speaker, etc), modify them a bit so it compiles, and test to so if it works. You more than likely have to modify the ICS code also so it works. And the zimage is just the kernel no? And the kernel really only has to do with low level system processes, drivers, etc. I think UI's and such are more fitted in frameworks and such.
Personally if it was so easy to port ICS by simply replacing the zimage or file with another, ICS would have been ported to many devices, fully working, by now.
Click to expand...
Click to collapse
Yeh, but my problem is I don't have the drivers for the phone. I just have the stock ROM that come with it.
Is not that simple. I am 99% sure that you can't do that.
The phone I'm getting has a horrible theme on it. Its running Android 2.3
I have the ROM for a very similar phone (also using Android 2.3), uses the exact same CPU so it should be compiled using the correct platform.
Is it possible to use that phones ROM but replace it with my phones Kernel and .prop (so it has all my phones drivers and settings etc...)?
the hard work required in making a custom rom
I think you can take from the stock rom and compared with existing custom rom
but some sources are not shared freely as an example Tegra
CMIIW
I will mess about with the ROM when I get my phone. Hopefully I wont brick it...
I too am fairly new to android. I spent a couple weeks reading and watching TONS of youtube videos on how to ROOT and Unlock my bootloader. My best advice from one n00b to another would be to do the same. In particular...research how to do it on YOUR phone. Also, Roms are device specific. I recommend you finding the forum here on XDA for your phone and read up on whatever ROMS are available here. This might not be the ONLY place to find ROMS, but this place simply rocks! Once you get your device rooted and if necessary, your bootloader unlocked...you can easily try out any ROM without much fear. Just make a good backup...make sure you also have a factory recovery image too...just in case. For backups...if you install and use Clockwork Mod (CWM) you can use the nandroid backup it offers. I bought Titanium backup from the market and used it to do a full backup before I started...it backs up to dropbox even, which was a nice feature for me. Extra safety so incase I hosed my external SD card which had my backups...I could easily retrieve a backup ANY place that had internet access. Lastly...get ready to have some FUN! Flashing ROMs is VERY addictive!! :-D
Ok, Thanks. I will see what I can do then.

Categories

Resources