• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Flashing rom/kernel questions

barrack

Newbie
1. Is ther kernel always stored under /boot and is backing up/restoring the "boot" partition from TWRP a safe way of testing custom kernels?
2. Where is /boot normally mounted? The doesn't seem to be an /etc/fstab or vol*, and I didn't see it in /proc/mount
3. Does a factory reset erase the dalvik/art cache as well?
 
Tricky.

The kernel is typically stored in a dedicated boot partition as a boot.img, details vary by devices.

The system boots with a ramdisk as the boot.img contains not only the kernel but the first phase startup code, and then ultimately the kernel is loaded into ram on a running system.

http://elinux.org/Android_Booting

This gives a taste of the boot.img layout but again - the directions are highly device dependent.

http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images

If "cat /proc/mtd" doesn't work, try -

cat /cache/recovery/last_log | more

... to find the block where /boot is hiding.

Typically, a TWRP restore of /boot should be sufficient to save you - except that can be device dependent as well.

Be prepared to -

fastboot flash boot boot.img

With the boot.img extracted from your current rom.zip and -

Even that is device dependent.

Not every device follows the Android standard model - in fact, not by a long shot, and given Samsung's sales numbers and the stunts they pull anymore, it's impossible to say if even the majority of devices follow the standard model.

They all mostly do, just with some extra proprietary, non-developer friendly mods.

Forget most of the above on anything with a hard bootloader lock - I'm looking at you, LG and ZTE.

You want kernel source along with the build environment from the manufacturer and failing that, some pointers from existing kernel devs for your device.

See /sys or /system/lib for modules and drivers - typically.

Factory data reset clears /cache and /data and therefore the Dalvik (ART) cache.

Hope this helps!
 
Tricky.
The kernel is typically stored in a dedicated boot partition as a boot.img, details vary by devices.
.......
Thanks for the reply. Is there a website to get started on developing on android?

Would the code for controlling the baseband processor be a device driver under /sys or /system? Or is it separate from the android OS?

Whats the reason for the non-standard stunts? Is it to thwart copycats in the industry to maintain a competitive lead or to foil 3rd party development (make their devices more proprietary)? Wouldn't it annoy google since its probably against the AOSP rules or something?
 
If it were against the agreement of the Open Handset Alliance, it wouldn't be done and still have rights to distribute Google apps.

Each kernel is tailored somewhat to unique hardware features, and each structure to the bootloader and corporate security strictures.

I've already provided links and hints, I guess you want to see -

http://developer.android.com/index.html

As well as the normal Linux kernel development sources.
 
Back
Top Bottom