[Q] ROMs vs Kernel Compile and Upgrade - Android Software/Hacking General [Developers Only]

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....

Related

Load a different OS from the SD card? (MeeGo)

Hi,
I know there was done some work on dualbooting the HTC Dream, enabling you to launch a different OS of the SD card.
What exactly is needed to accomplish this? And was the methods used able to load a different kernel alltogether, or just lanch another useland using the kernel from your current ROM?
I have both a Dream and a Desire, and would like to try and get Meego running on one of them. (Maybe finding my way on the Dream, which is not my primary phone anymore, and then on the Desire when I have figured it a bit more out.)
MeGo uses the 2.6.34 kernel, which I believe several Froyo ROMS use too.
The first thing I will do, is to try to run it with minimal modification to the kernel found in an existing Dream ROM, o avoid adapting the Meego kernel to support the neccessary hardware, as the ARM-release is made especially for the N900, and probably doesn't have that wide a hardware support.
But where would I change the kernel to boot? I guess it is not really possible to modiy the bootloader in the device directly (uboot sure would be nice ), so I guess it has to be done in initramfs or similar? Not really familiar with how phones do this.
thats wt i wanted to try on my cliq too! Do u have the rom for meego?
There is no ROM of MeeGo, which is why i need to load kernel/userland from SD card. I have asked for the ARM-release of MeeGo here, but the reply wanæt very helpfull.

[Q] Custom ROM, complete howto?

This question is probably already asked, but I can't find a clear answer for it.
2nd thing is that I can`t see the forest for the trees anymore cause I'm quite an android noob.
I wan't to try to build a custom rom, but how do I get started?
As far as I know there are 2 ways:
1) Take an existing rom (either stock or custom) and mod it.
2) Start from scratch.
The 2nd method is of course the most interesting (but probably also the hardest) method.
So say we take that method.
First of all I think android basically consists of 2 parts, being the kernel + all the rest.
You can take a kernel from a working rom, which may be moddified, but can you also build the original kernel from the source? For getting that to work on my device I'll probably need the drivers, but how? Extract it from the latest official rom? And how to add them?
Samsung (yes I have a samsung s5660 aka gio) also uses the rfs filesystem, would it be possible to use ext4 and does the kernel need to be adapted to that?
And how do you make the rom flashable for odin?
A lot of questions, I know, but isn't there a step to step guid for doing this kind of things?
Thanks
yes, its possible to create an odin flashable rom with ext4 as default filesystem. and yes, obviously the kernel need to support ext4.
read this thread, particularly the first post.
http://forum.xda-developers.com/showthread.php?t=1202049

[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.

kernel with loop device support?

I'm trying to get Ubuntu installed on my phone using the chroot/vnc method. Please don't refer me to the official Ubuntu for Android page.
The issue I'm running into it seems is that the kernel on my ROM (Glorious Overdose with Platypus Egg Kernel) does not support loop device, so I've hit a wall.
If there is a kernel available for our phone which does support loop devices a link would be highly appreciated, since it seems that virtually all of the existing links to ROMS, kernels and mods are 404ing.
This kind of sucks because my last phone, an LG Optimus was able to run Ubuntu, but it was too slow to really be useful. I'd really like to be able to get more out of my new Sidekick.
bump. Seriously, not a single response? Stock kernel doesn't have it. Bali kernel doesn't have it. Platypus Egg Kernel doesn't have it. Any way to incorporate it into the kernel?
This may be the wrong place to ask, but how does one go about building/modding an Android kernel? I've compiled Gingerbread to run on a netbook successfully before and I've modded the regular Linux kernel (added drivers for odd hardware, etc) many times before so it shouldn't be that different. Maybe it's time to get into ROM cooking.
Download the source from opensource.samsung.com, extract the ramdisk from a working kernel, rebuild with whatever changes you want.
As of now, no kernels that are released for the Sidekick include loop support.
Noob-un-2: I took a look again at this, and found that loopback is already enabled, but the mount is an actual binary, rather than being linked from busybox. you should be able to mount an image to a dir through loopback with the following command:
busybox mount -o loop /sdcard/myimage.img /mnt/mount_dir
(assuming that /mnt/mount_dir already exists, if it doesn't, create it).

Using an Arm-V8a Emulator / QEMU to boot full device firmware

I've come to ask if anyone could give me some more insight on using PC application to emulate the Arm 64-Bit Arch in a way that would allow it to boot a full android firmware package? Namely a Samsung Device, it would entail the pieces of an ODIN firmware package or a normal system dump from the device.
Now I've seen this done. But that usually involves building AOSP from source or using a factory nexus image. I understand I could achieve my goal if I wanted to use a stock AOSP rom, but it should still be achievable using one of Samsung's roms right? Especially since a lot of their devices include init files for goldfish.
But I'd really like to ask for some pointers from some people knowledgeable in the commands of the emulators.

Categories

Resources