[Droid Eris Android Development] gnarlyc:
Ok folks. I got this phone in March. It's my first Android phone. I love it. What do I love most? Hacking, tweaking, building, learning cool stuff. Yeah, it makes calls and stuff like that too. Whatever. So did my Startac.

I've been very slowly creating a 'how to get started' post for people who what to be devs. The info is out there elsewhere, but I'd like to consolidate much of it into kind of an overview with links to more detail. The first part is pretty much ready to post, so I figure I'll post it and keep working on the rest. Maybe some of you would like to contribute. Maybe not. I welcome the help though.

Some basics:

1) ROM structure - unzip an existing ROM and get to know the structure

Here's a fairly standard folder structure for an Eris ROM. Most other devices will have something similar.

/system
/app <- system apps and others that can't be uninstalled normally
/bin <- system binaries (small, standalone programs)
/customize <- has files that control initial boot and some screen settings (not always here)
/etc <- generally system configuration files
/bluez <- bluetooth config files
/clockwidget <- ? (not always here)
/dhcpd <- dhcp config files (dhcp is used to negotiate a network address)
/dmdata <- ?(not always here)
/firmware <- system firmwares
/iproute2 <- configuration files for network routing? (not always here)
/permissions <- describes permissions that apps may use
/ppp <- ppp configuration files?
/security <- certificates for over-the-air (OTA) updates
/wifi <- configuration files and firmwares for wifi
/fonts <- fonts
/framework <- mostly java jar files that contain code that other apps call
/lib <- C (mostly?) libraries that contain code for the system and apps to call
/bluez-plugin <- bluetooth stuff
/egl <- files needed for hardware 3d rendering
/hw <- files needed for various hardware like lights & sensors
/modules <- modules that the kernel might load, such as wlan (wifi)
/media <- audio and animations (usually here)
/audio <- audio files
bootanimation.zip <- well... (can be done another way or two)
/usr <-
/keychars <- keyboard drivers
/keylayout <- keyboard definitions (you can edit the .kl files!)
/share <- ?
/srec <- dictionaries?
/xbin <- more system binaries
build.prop <- config file that sets system variables and stuff

/META-INF
/com
/google
/android
update-script - script that actually copies the ROM to the phone when you flash
CERT.RSA <- created when ROM is signed
CERT.SF <- created when ROM is signed
MANIFEST.MF <- created when ROM is signed

boot.img - see #2 below

/data <- user and app data
/app <- apps that are installed by and can be removed by user (not always in ROM, but created on device
/other folders (Android/apps create some folders in here post flash and some devs will also add an extra folder or two occasionally

Some .apks can be removed and some cannot. Many different things tie together. For instance, one apk may call code in a lib file, so it's dependant on the lib file.

If you do take an existing ROM apart and change it, you'll have to zip it back up and resign it before it will flash. Here are some tools that will sign a ROM -

EasySign - http://android.grdlock.net/index.php?&direction=0&order=&directory=HTC Droid Eris/Extras

dsixda's Kitchen - http://xdaforums.com/showthread.php?t=633246

AutoSign - http://androidforums.com/developer-101/8665-how-signing-roms.html

2) boot.img - kernel, ramdisk, and init files

The boot.img has the actual linux kernel with some Android and device specific tweaks. Here's the structure for it -

boot.img-kernel <--- actual kernel (zImage renamed)
boot.img-ramdisk.cpio.gz <--- ramdisk
/data
/dev
/proc
/sbin
/sys
/system
default.prop
init
init.desirec.rc <-- will be named different for different devices, supposed to be device-specific init file
init.goldfish.rc <-- for emulator (You can lose this.)
init.rc <-- always here, this is run on boot

The *.rc files are initalization files, in case you didn't get that. They run when the phone boots up and do things like start 'services' and change permissions on files/folders. I highly recommend that you look at them and compare different ones with something like WinMerge.

I attached an example. You can see where there's been a typo in the stock init.rc for a long time. This is a comparison between the stock init.rc and the one from CELBFroyo.

3) Hardware

Confused as to what refers to what? Me too! Here's a few things that I've figured out. Please point out anything you think is incorrect or needs to be added.

melfas, capella, synaptics = touchscreen

i2c = bus

akmd/akm8973 = accelerometer

mtd/nand/sdio = internal memory

s5k3e2fx = camera sensor

qdsp/adsp/dsp = audio

brf6350 = bluetooth?

Fw1251r1c/wpa/wifi/tiwlan0 = wifi

gralloc/copybits = framebuffer/video/display/graphics memory

malloc = memory allocation