[HD2 Android SD Development] RedWave31:
[REF] █▌█▌█▌█▌THE ANDROID WALK>THROUGH - Guides, Explanations, Fixes & Tips █▌█▌█▌█▌

Find here and EXTENSIVE collection of every single information available on Android : Kernels, Builds, Updates, Fixes and much much more...

Posts Guide​

Post 1 : Android Encyclopedia

Post 2 : Complementary Guides

Post 3 : Problems, and Fixes

Post 4 : How-to's

WARNING : This post needs updating, formating, typo-checking. Please be patient, as i'll need to collect a lot more data, and rest a little as well ;)

Mods, I made a typo in my post ^^ Can somebody help there? Can't find how to edit a poll :p Thanks!​

A big THANK YOU to all the contributors of this thread, who are helping me, and the others!

​

This is a GUIDE/LINKS Thread. Suggestions are welcome, but :

PLEASE DON'T ASK QUESTIONS HERE Please check this (How to post a good question and maximize answers)

USE THE THREAD LINKS PROVIDED INSTEAD

ON POST 3

You will

save yourself double the time

: On DEDICATED THREADS you will have more experienced users and more traffic, thus a faster and/or better answer!!!​

Why this thread​

I've been reading a lot lately, but still haven't found an updated thread for basic questions, or just a welcome stop-by.

I'd add I'm not a cook neither a developer, but came to understand a few things by myself that weren't precisely told

(A common flaw of computer advices : Do this to solve that - You don't need to know how or why)

This brings pros, as I'll be more oriented towards the end users, but cons as I'll sometimes lack the necessary skills to go further. As a whole, I do believe this may still help understand the basics, and help get rid of a few misunderstandings. This is why there'll be a lot of "seems" and "mays" but in the end, most of the "basic" data here is accurate, and i'll get better as time goes by.

My current hardware and software

- HD2 Europe FR

- Hastarin 7.6 on PhireMod Sense 1.5

- Dutty CDC V11 COM2 FR

- Radio 2.15.40

However, this post covers Android as a whole, and lots may apply to other devices, be it with or without Haret "emulation"

Legend:​

-

Simple Explanation

->

A parameter or file you may change/trigger in order to enhance/solve problems/your Android build (yes, this works both ways)

[file]

An actual Windows Mobile/Windows XP/Seven file. You can see them using a SD Card reader/usb cable/etc

root/

This is Android C:\ drive

A file or directory present/visible ONLY when under Android on the phone.

/

Same as root/, but with some laziness included :p

(exe)

Means this is a Windows XP/7 Program

(apk)

Means....!

A. Android itself​

There are a few things you need to know on android on HD2.

What an Android build is made of :

- A "sound enabler" [CLRCAD.exe],

- An Android Bootloader for WM6 [HARET.exe],

- A startup command [startup.txt], Touch-screen Calibration Instructions [ts-calibration], a boot logo [initrd.gz]

- An Android Kernel [zImage],

- An Android Root Filesystem [rootfs.img]

- A ROM image [system.ext2]

- A data container [data.img]: This holds your texts, contacts and everything else. Sometimes provided BLANK by some chefs to avoid high boot times (cf Updating Android)

All of these should be on the "Android" folder of your SD card.

Note : For an easy launch of your Android, I recommend Exceller Multiple Boot Loader (link here), that you can set on autoboot (or not)

When you launch Android via EBL on WM6:

- [CLRCAD] enables sound

- [Haret] is launched, then totally closes Windows Mobile (all resources shut down)

- Kernel+Drivers, ROM and Data are loaded

What to learn about this:

- There are hardware/software interactions happening when Haret "closes" WM6 and it's own drivers take place.

-> It may be useful to activate "Airplane mode" in Windows to avoid pieces of the radio chip to stay indefinitely on without Android being able to shut them off (cf Power consumption problems)

-> Full charging may not be achieved under Android, this because of Android drivers not being able to correctly write the battery status (yet). To get to 100%, charge when the phone is off or under WM6 (although i do manage to have a 100% under Android under certain circumstances)

-> It may as well be useful to launch Android with Keypad lights on in order to ensure that lights are working properly. This depends on hardware and software, and varies from people to people.

->Flashing a radio under WM6 has the same impact over Android, as the radio chip instructions are shared between Android and WM6 (cf Robo Voice)

->The WM6 ROM used, while seemingly not worthy of attention (as it is "shut down" by Haret), seems to handle some important work when closing itself or interacting with the hardware. That's why changing from "Stock rom" to a "custom one" may resolve a few problems too.

B. Android's Internals​

First, at the current state of development, Android is ENTIRELY run through the SD card.

-> Class 2 cards have been reported to being a source of annoyance, still being able to correctly run Android, but slowing a lot of problems. T-MO USA users have different experiences with the bundled microSD card provided. However, i'd advise using AT LEAST a Class 4 microSD, with correct formating.

- File explorers under Android are reporting a "root/" directory with several files and folders, and a "root/sdcard" folder. In fact, the [data.img] of the SDcard IS (some part of) the "root/" (unzipped for you to see) whereas the SDcard is...the SDcard. That's why removing the SDcard with android running may freeze the whole file-system.

- The actual NAND work is approximately for the devs to put the [rootfs.img and system.ext2] inside the phone flash, to ensure that Android still runs when removing the Sdcard. The problem is : the [data.img], that holds Android's data, may still be on the SDcard (as EU HD2 only have 512mo of ROM, and Android already takes 300 just for booting)...To be continued.

Kernel, Libraries, Modules, File-system, and the like...

Ok, I know little about them, as I'm not a developer or a cook, but here are the basics

Kernel bundles

-> [zImage] : It is the main kernel file, it seems to contain the primary drivers using for controlling the phone. You can update this file by downloading a "Kernel" like Hastarin 7.6, by powering the phone in WM6, and replacing the [zImage,Haret,initrd.gz] in the Android folder of the SDCard

- [Initrd.gz] seems to be the logo launched when Haret is loading Android (needs confirmation)

- [rootfs.img] : It handles the basic file-system

Android Builds Bundles (further explanation)

- [system.ext2] : It contains the Android files described there-under, also provided in a build

Modules

Located in /system/lib/modules, they are here to handle the Bluetooth and Wifi. They sometimes need to be replaced manually (aka "pushed" via the shell/terminal)

Libraries

Located in /system/lib/ or /system/lib/hw, they handle other elements, like lights and so on. They can also be uploaded manually when needed.

File-system Organisation

- root/acct, root/bin, root/cache, root/config, root/dbgfs, root/sbin, root/dev, root/mnt, root/proc, root/sys, root/tmp seems to contain files used for Android. Never went there.

- root/data/etc and root/data/system holds some system files. Don't mess!

- root/data/app/ is the main location for user installed apps (.apk)

-> root/data/data/ is the location for each apps' storage (like some sort of registry), like scores for games, etc

-> root/data/data/ seems to also be the place where the "hosts" file of android is located (The other ones across the file-system are usually empty ones)

- root/system/app/ is the main location for cooked (pre-installed) apps. Removal is at your own risk!

-> root/system holds the build.prop file, responsible for some of the phone behavior. This folder seems to be physically hosted in Android's [system.ext2] file, and is dependent of the chef providing it. You can configure alternate DNS in this file (BACKUP first).

Kernels' flavors (MichyPrima Kernel Thread)(Hastarin Kernel Thread)

- There are two branches : EVO and Nexus1. They mean different libraries, drivers and modules. Nexus1 is the most stable, but the least capable. EVO, although less stable, is the most able, and thus has been selected to be at the base of the NAND development.

- There are two data approaches : RMNET and PPP. Both have their pro's and con's: Speed(PPP) vs Stability(RMNET). (Learn more here)

- There are several kernel chefs, and several available tweaks for each branch.

- There are several capabilities, such as Overclocking or Not, etc. Usually, each Kernel chef delivers its Kernel with or without these additions. Find the one that suits you best.

To summarize / To Update Android :

- A downloaded "Build" provides a FULL working Android system, you need NOTHING ELSE

- A downloaded "Kernel" provides : An updated [Haret, initrd.gz, zImage] that you just "paste" over an existing Android "Build" and sometimes updated "Modules/Libraries" that you need to manually push

->Note : There seems to be a workaround, like a [root] folder, containing many sub-folders, that is placed in the [Android] folder. The files included in this [root] folder seems to be copied by Haret into the root/ folder of Android on boot. That is why, when you "update" an entire "build", chefs ask that you deleted everything on your [Android] folder, to ensure nothing from an old "build" or "Kernel" will be copied to the new "build" upon booting Haret.

->Note on updating "Builds" : I personally erase everything but the [data.img] on my android folder, then unzip the content of a new "build". WARNING : Some chefs include [data.img] in their "builds", so be sure to CHECK to avoid an override!

How to choose a build/a kernel:

- Check what are your needs : Sense implementation, Basic but blazing Android, HTC Sense.com services.... Each come with a price

- Again, choose what do you want from your phone, cutting-edge but unstable or basic but sure...(You may have both :p)

-> I personally don't recommend going out of binded paths. Each chef, in each build, uses a specific Kernel dev, and adapts its ROMS to it. I chose to only update a similar Kernel, when the cook or chef just didn't have the time to implement it yet (usually, unless Kernels are really faulty, new ones come with new builds, so just wait for a wholesome upgrade)

C. Basic Android Tools (Survival Starter Kit)​

Some tweaks will require "Super-User Access" or stuff like that. Again, here are the basics.

First, "Droid Explorer" (exe).

No, don't look on the market, it's a WINDOWS XP/7 PROGRAM.

(Why the capitals? For the story, a few months ago, it took me HOURS to figure that, as there is also a "Droid Explorer" on the market, free as well. When you're told, "Go into ADB mode with Droid explorer and push that file in the rootlib" you're starting to think you took the wrong spaceship :p)

-> ADB Mode : Short for "Android Debugger Mode". You can switch this in "Parameters/Application/Development, Check the USB Debug). You need to enable ADB mode to use Droid Explorer.

- Droid Explorer basics : If already on ADB, click on "Connect device" at the right corner, and select the only device shown.

- Warning : I've personally got increasing problems accessing/pushing files to Android using Droid Explorer. I'm currently using the "root folder update" method. (Handle with caution!)

Other useful programs (most are free, some very useful may not, and some are included in builds):

System Apps

- Root explorer (Apk) : A useful Android program, to access files currently not available trough ES Filexplorer or Astro, although some other file explorers may possibly retrieve SU privileges to access the entire file-system. "root/data" is a typical folder not accessible with "traditional" file explorers.

- Super-User (apk): It's an Android Program, provided with your build. It enables programs to access some privileged code/areas...(To investigate)

- Terminal Emulator (apk) : It's Android's cmd.exe, used to input commands like in DOS-Mode

Usually Bundled Apps

- Astro (apk): Beautiful File Explorer :p

- Drocap2 (apk): Screenshot app. Push start, and shake HARD :p

- DSP manager (apk): Manages that crackling speaker bad bass rendition

Must-have Apps

- Adfree (apk) : Similar to winhelp2002 for windows, this block some ads while on the Internet. Doesn't block GoogleAds (developers need to survive through free apps too!)

- BatteryLevel (apk): Inputs a permanent notification, which shows the battery percentage. Lightweight and useful, albeit not always properly refreshed

- DroidWall (apk): The only? firewall for Android. Need Busybox (cf TitaniumBackup) in order to function properly. Warning : May block genuine apps from accessing Internet. And no, your cracked apps won't be prevented from calling "home", as license verification goes through the Android system itself.

- GPS Status (apk) : Handles the A-GPS, compass and other stuff

- SetCPU (apk+widget) : This is used to tweak the CPU. (see Hastarin's recommendations, a shame I can't export my settings). Install the apk, then place a widget in order for it to work (mandatory? need to investigate...)

- Shazam (apk)

- SMS Popup (apk) : Great program, pops sms and enables quick management. SMS notifications have to be handled solely by either the program, or the system. Disable one or the other accordingly.

- Startup Cleaner Program (apk) : Manages starting programs. Handle with care.

- SwitchPro (apk+widget) : Almost similar to Cookie's switches for WM6. Can't live without. Weird implementation though.

- Taskiller (apk+widget) : Selective task killer. Has been reported to cause wake-up lag when set on "autokill on sleep" (and I do, but use it on other occasions)

- TeslaLED (apk) : Ke$ha's favorite tool for impromptu parties!

- CurrentWidget (widget) : report power consumption. Helps reporting battery drain problems (I got 3ma on standby :p). Don't set to "update" on less than 1 minute. Use it to log when on sleep, then check power consumption on standby.

- DolphinBrowserHD (apk) : Very configurable, personal choice.

Very Nice Addition

- Swype (apk) : Provided on the forum, or sometimes implemented on Builds, can't live without either.

Is there a developer in the room?

​

- Taintdroid (needs implementation/compiling?)

Unusual stuff coming from me, but this program recently came to my attention. It detects every ID/IMEI/etc Internet leakage and reports to the user. It visibly need some kind of integration into the kernel in order to work. With a firewalling program, we could prevent our phones from spying hard on us (I have a dream, i know ^^)

>>>Hastarin, MichyPrima, ElBartoMe and the others, anyone there? :p <<<

Thanks for all the devs, chefs and forum users, i'll link when available and when free :p