Monday, November 22, 2010

How to get the Android API source code

The Android SDK doesn't include the API source code and the JavaDocs are often pretty sparse. Google has closed this issue as declined, so it doesn't look good for getting this fixed officially any time soon.

Here's a workaround:

cd [android SDK installation]
mkdir source
cd source
git clone git://android.git.kernel.org/platform/frameworks/base.git -b froyo froyo
git clone git://android.git.kernel.org/platform/frameworks/base.git -b eclair eclair

symlink [android SDK installation]/source/froyo/base/core/java to [android SDK installation]/android-8/sources
symlink [android SDK installation]/source/eclair/base/core/java to [android SDK installation]/android-7/sources

Repeat for donut and cupcake as needed.

If you are running Windows, you'll probably need Windows Sysinternals Junction to create the symlinks.

After doing this, you can step in while debugging and/or view the code in Eclipse.

This is absolutely ridiculous, though. We shouldn't need to check out a 444 MB git repo (the eclair branch is "only" 373 MB) when a couple of 3.5 MB JARs could be included in the SDK instead.

Tuesday, August 31, 2010

Monospaced Programming Fonts

Anonymous 12 - serifs... meh
Anonymous Pro 14 - serifs... meh
Bitstream Vera Sans Mono 12 - almost identical to DejaVu Sans Mono
Consolas 14 - fuzzy
Courier New - looks dated compared to others
DejaVu Sans Mono 12 - almost identical to Bitstream Vera Sans Mono
Droid Sans Mono 12 - a bit more bold than DejaVu Sans Mono or Bitstream Vera Sans Mono
Inconsolata 14 - fuzzy
Lucida Console 14 - big and bold - size 12 is yuck
Monaco 12 - not a fan
Terminus - horrible, uninstalled

size 10 = 120 chars wide - Perfect! That's where I line break.
size 12 = 98 chars wide
size 14 = 88 chars wide

I've settled on Droid Sans Mono 12 10 for now.

Any others I'm missing?

Wednesday, August 11, 2010

Compiling Android Froyo for HTC's EVO4

This is a WIP.
  1. Grab the latest source code from http://developer.htc.com/ - As of this writing, the latest is http://member.america.htc.com/download/RomCode/Source_and_Binaries/supersonic-2.6.32.15-g746f4f0.tar.gz
  2. Download the Android NDK (not a typo) from http://developer.android.com/sdk/ndk/index.html - As of this writing, the latest for Linux is http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip
  3. Extract both archives, set env vars as convenient
  4. Add android-ndk-r4b/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin to your $PATH
  5. export ARCH=arm
  6. export PLATFORM=supersonic
  7. supersonic-2.6.32.15-g746f4f0/make supersonic_defconfig
  8. supersonic-2.6.32.15-g746f4f0/make
eric@fender:~/supersonic-2.6.32.15-g746f4f0$ ls -l vmlinux
-rwxr-xr-x 1 eric eric 54552672 2010-08-11 21:48 vmlinux

Similar instructions should work for other Android phones, but YYMV.

Now to apply the AAC patch and remove those crappy Sprint apps.

Sunday, October 25, 2009

HTPC

The HTPC is fully assembled and working. Parts list:


Tuesday, March 31, 2009

Technologies to research

New stuff:
thrift - http://incubator.apache.org/thrift/
hadoop - http://hadoop.apache.org/core/

Learn more about (used it, need more details on advanced configuration and uses):
ehcache - http://ehcache.sourceforge.net/
memcached - http://www.danga.com/memcached/