FORUMS
Remove All Ads from XDA

 View Poll Results: Did you find this guide usefull ?

Yes
 
164 Vote(s)
91.62%
Nope
 
15 Vote(s)
8.38%

[REF] █▌█▌█▌█▌THE ANDROID WALK>THROUGH - Guides, Explanations, Fixes & Tips █▌█▌█▌█▌

645 posts
Thanks Meter: 266
 
By RedWave31, Senior Member on 19th October 2010, 10:03 PM
Post Reply Email Thread
Find here and EXTENSIVE collection of every single information available on Android : Kernels, Builds, Updates, Fixes and much much more...
Posts Guide


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

(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 )
-> 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 )
-> 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
- Drocap2 (apk): Screenshot app. Push start, and shake HARD
- 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 ). 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? <<<

Thanks for all the devs, chefs and forum users, i'll link when available and when free
The Following 13 Users Say Thank You to RedWave31 For This Useful Post: [ View ] Gift RedWave31 Ad-Free
19th October 2010, 10:04 PM |#2  
RedWave31's Avatar
OP Senior Member
Thanks Meter: 266
 
More
Thumbs up Complementary guides
This is post 2 :
Complementary guides


Complementary guides:

> How to flash an android build, and boot issues/solutions
http://forum.xda-developers.com/showthread.php?t=732380

>A good explanation of the different terms
http://forum.xda-developers.com/showthread.php?t=774859

>Frequently asked questions (although pretty much technical to me) (Tips and Apps)
http://forum.xda-developers.com/show...91&postcount=3
The Following 4 Users Say Thank You to RedWave31 For This Useful Post: [ View ] Gift RedWave31 Ad-Free
19th October 2010, 10:04 PM |#3  
RedWave31's Avatar
OP Senior Member
Thanks Meter: 266
 
More
Question Main Problems, Concatenated Solutions, Original Threads
This is post 3 :
Main Problems, Concatenated Solutions, Original Threads (When available):


Main Problems and Solutions (compilation)
Some filenames aren't correct, i'll check that later
(One general thread)

Battery Drain (One thread there) (Another Thread here)
May be the main problem out there, although Touchscreen freezes are competing for #1 as well
- Try tweaking WM6 power management (Thread here)
- Use CurrentWidget log mode to verify
- Remove root/data/system/batterystats.bin
- Try the Airplane mode in WM6. For daily Android users, set to airplane, then switch the phone off and on without a reboot app. The airplane mode should stay indefinitely on. For constant switchers, launch haret after airplane mode. On next reboot, WM6 shouldn't have airplane mode on.
- Try checking the "lightslib.q8sk"(?) file/problem. Try replacing it with the newer "lights.htcleo.so" provided on the forums
- Try flashing a different radio or WM ROM (test radio first of course)
- Try booting Haret with the keys' lights on

Robo Voice
This issue seems to be hardware+software related. AKA It is different for everybody, and same build+rom+kernel may produce different results on similar phones.
- Current state of resolution is : FLASH RADIO and CHANGE WM ROM ^^

PPP Stuttering (no Edge/HSPA icon warnings)
- Try the libhtc_ril_wrapper.so fix provided by noellenchris (Another thread there)
- Try updating your kernel
- Try removing Taskiller Autokill feature (not the kill on sleep feature)

PPP Freezes (icon going on and off, etc)
- Try tweaking the build.prop (GSM or WCDMA prefered via "ro.telephony.default_network=" parameter ) (See "Tweaks" Section)
- Try changing the DNS inside "root/system/build.prop" (Link of your mobile provider DNS here)
- Try tweaking the APN in "root/system/etc/apns-conf.xml"

Screen of Death (Thread)
As Robo Voice, this issue seems to be hardware+software related. AKA It is different for everybody, and same build+rom+kernel may produce different results on similar phones.(Proof)
- Try flashing a new radio
- Try formating your SD with the largest FAT32 Allocation Unit Size possible (Thread Here)
- Try changing your SD-Card

Touch-screen Freezes
- Try disabling g-sensor in Parameters/Display/Auto-rotation
- Try offset change. Still haven't understand... (Thread Here)

Music Stutter
- Try updating or Changing Kernel (Thread Here)
- Try this workaround

Background Noise
See this thread

Camera "Moon picture" Preview
- Temporary fix : Disable preview

Camera : HTC 5Mpx (EVO/Desire Roms ONLY) (No Desire HD, No Desire Z...)
See thread here

011 International Dialer issue
Fix can be found here

T-MO USA MMS Issues
Thread Here

Tweaks i'm aware of
Boost DATA Speed
-> Edit your "root/system/build.prop" and check for correct values (These ones seems "overboosted") -> (Thread Here)
- Here are the "HSPA network" values explanations (See here), these seems more moderate

Build.prop Configuration

ro.telephony.default_network=
-> "0" is WCDMA/UMTS Prefered, even when network is very low
-> "3" is GSM/WCDMA Auto Mode, switch 2G/3G according to highest network
The Following 3 Users Say Thank You to RedWave31 For This Useful Post: [ View ] Gift RedWave31 Ad-Free
19th October 2010, 10:06 PM |#4  
RedWave31's Avatar
OP Senior Member
Thanks Meter: 266
 
More
How-To's
This is post 4 : How-To's
HOW TO REQUEST FOR HELP ON XDA
Again, personal point of view here, but there are a lot of "unsaid" things around there....

1. Nothing more annoying than a "noob" (and we've ALL been through there, but...) that didn't (at least) try looking for himself.
-> Use wisely the "Search on this thread" button. It's WORKING. Tip: If you're not on a specific thread, but rather in the Development of General sub-forum, tick the "Post" button to avoid going through entire threads for a single answer.

2. Do remember: you're not alone.
-> DON'T BE RUDE, BE POLITE, SAY HI, THANK PEOPLE, we all have to be patient. It's XDA Community. Plus, some threads are moving real fast, and may have flooded your question. Ask again, and just don't complain!
-> EDIT YOUR SIGNATURE. Insert your ROM, Radio, Phone model, etc etc etc. Most common answer to noob problems: "WHAT'S YOUR ROM"
->Try asking GOOD QUESTIONS, starting with (Hi!) "I've been looking for this, found this, understood this, but need help about that" (Thanks) and you'll see how people will be more inclined to answer ^^

Flash a WM6 ROM (compatible with Android)
> Need-to-Know : HSPL, RUU, WM6 Roms

1. Install the HSPL
- A HSPL is needed in order to "flash" custom roms, as well as new radios, and then Android Builds. Most up-to-date HSPL is HSPL 3 (found here).
- Plug your WM6 phone to your computer using the USB cable provided on activesync mode (SDCard Flash method here)
- Launch the "Mobile Manager" in Vista/Seven, or wait for activesync in Windows XP, and establish a connection (Connection failure : Look here)
- Launch "HSPL3_PKG.exe", and follow the instructions
- Reboot phone

2. Download and Install a WM6 ROM
- Hint: Choose and download a recent WM6 rom (advices here)
-> Your phone needs its battery to be charged at a minimum of 50%, else flashing won't occur
- Again, plug your phone in USB-Activesync mode
- Unzip the archive, and launch "CustomRUU.exe" ("ruu_signed.nbh" is the WM6 rom file)
Flash a new Radio (under WM6 only)
- Choose a recent radio, minimum required is 2.08, 2.12 recommended (radio thread here)
- Again, plug your phone in USB-Activesync mode
- Sometimes, only the radio (ruu_signed.nbh) is provided in zip files. "Pick" the "custom_ruu.ex"e of a WM6 ROM, and copy it in the unzipped radio folder, it'll work just as well.
- Launch and follow the instructions
Install Android on a SD Card
Update an Android Build (with a new build)
Update an Android Build (with a new kernel)
The Following 6 Users Say Thank You to RedWave31 For This Useful Post: [ View ] Gift RedWave31 Ad-Free
19th October 2010, 10:09 PM |#5  
FerretAD's Avatar
Senior Member
Flag Lincolnshire
Thanks Meter: 58
 
More
Yes, I did find this useful - Thank-you !
19th October 2010, 10:09 PM |#6  
msoler8785's Avatar
Member
Flag Havertown
Thanks Meter: 7
 
More
Quote:
Originally Posted by RedWave31

A.Android itself

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

>What an Android build (like mdeejay NextSense.zip) is made of :
- An Android for Windows Mobile emulator (HARET),

HaRET is not an emulator. It is a Linux bootloader.
19th October 2010, 10:20 PM |#7  
Senior Member
Flag Wellingborough
Thanks Meter: 10
 
Donate to Me
More
A Really good guide, actually explains quite a lot about the filesystem that I wasn't aware of. Well written and a great idea.
19th October 2010, 10:26 PM |#8  
RedWave31's Avatar
OP Senior Member
Thanks Meter: 266
 
More
Quote:
Originally Posted by msoler8785

HaRET is not an emulator. It is a Linux bootloader.

Thanks, updated!
Feel free to submit ideas or whatever!
19th October 2010, 10:31 PM |#9  
mstrk242's Avatar
Senior Member
Flag Chicago, IL
Thanks Meter: 262
 
More
Wow, good idea on putting it all in one thread, few things, however:

As another poster suggested, haret is not an emulator (handheld reverse engineering tool)

As far as the filesystems: rootfs.img is the linux rootfile system, startup.txt are commandline arguments for the linux startup, system.ex2 is the root android filesystem, etc. So to avoid confusion, think of it this way: system.ex2 would be closer to the android "rom image", where as rootfs, startup.txt, ts-calibration, and initrd are for the linux kernel side, so you can boot up android. (Very oversimplified I know, just trying to help)

When you install a linux box, typically it's installed on more than one partition (keeping the /home directory on a seperate one is always good practice, and some people even keep /var on a seperate one for log files as well.) data.img and system.ex2 would be like different partitions of the android filesystem. When you buy a phone that isn't "rooted", it means you don't have access to the root file system, aka in this case, system.ex2.

*edit* oops you already saw the thing about the haret. Didn't notice.

You may also want to add that for where apps are located after install, /data/app is for user installed apps, /system/app are for pre-loaded apps that are installed with the system. If you wanted to remove any app that came with the system (like the amazonmp3, for example), you'd delete it out of there. (Delete files out of the system/app at your own risk, don't delete it if you don't know what it is)
21st October 2010, 07:28 PM |#10  
RedWave31's Avatar
OP Senior Member
Thanks Meter: 266
 
More
Added HSPA Values and DNS and APN files location. Enjoy
22nd October 2010, 08:13 PM |#11  
Dblfstr's Avatar
Senior Member
Thanks Meter: 759
 
Donate to Me
More
This is a very nice guide. Has a lot of the necessary stuff that the other guides leave out.

Good job. Maybe I will just link folks to this guide in the future instead of directly answering them. (probably just do both though - I was pretty noob at one point)

Oh, and .apk = Android Package (android apps are .apk / android package file)
Post Reply Subscribe to Thread

Tags
android, fix, hd2, problem, solution

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes