Showing posts with label hack. Show all posts
Showing posts with label hack. Show all posts

Wednesday, August 5, 2009

Tackling Android's Donut Branch Part II

The building process didn't finish yesterday, so I am continuing today morning. After the SDK is built, I had to symlink some directories to their proper places (wonder why this is so), because the "android" tool said "Error parsing SDK" or something like that, indicating it was missing these directories.

ln -s ~/android/mydroid/out/host/linux-x86/sdk/android-sdk_eng.zsol_linux-x86/platforms/ out/host/linux-x86/
ln -s ~/android/mydroid/out/host/linux-x86/sdk/android-sdk_eng.zsol_linux-x86/add-ons/ out/host/linux-x86/

After this, I was finally able to create an AVD like so:
zsol@silithus:~/android/mydroid$ android create avd -n donuttest -t 1
Android Donut (Preview) is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD 'donuttest' based on Android Donut (Preview), with the following hardware config:
hw.lcd.density=160

Awesome! Now I'm getting close. This command let me try the fresh build on an emulator:

zsol@silithus:~/android/mydroid$ emulator -sysdir out/target/product/generic/ -kernel ./prebuilt/android-arm/kernel/kernel-qemu @donuttest
This is what it looks like:
Hack away!

Tuesday, August 4, 2009

Tackling Android's Donut Branch

I know I should be updating the graph visualization project, but I just wasn't in the mood these days, so after getting a new layer of screen protector for my G1/Dream/ADP, I went on checking out Android's master git branch, which has seen some merges from the Donut branch.

The checkout process went on for a whole night on my sloppy "high-speed internet" connection, and grabbed a few (less than 3)Note to self: next time settle for single-core compilation, it's faster.

Now that I have a working adb tool, I can get some proprietary blobs from my phone:

zsol@silithus:~/android$ cd mydroid
zsol@silithus:~/android/mydroid$ . build/envsetup.sh
zsol@silithus:~/android/mydroid$ cd vendor/htc/dream-open/
zsol@silithus:~/android/mydroid/vendor/htc/dream-open$ ./extract-files.sh
[... output snipped off ...]
Now to configure the build for my G1:

zsol@silithus:~/android/mydroid/vendor/htc/dream-open$ lunch htc_dream-eng

============================================
PLATFORM_VERSION_CODENAME=Donut
PLATFORM_VERSION=Donut
TARGET_PRODUCT=htc_dream
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=Donut
============================================
That looks pretty promising, doesn't it.

While building I noticed something interesting with my xterm:
That's right, it supports UTF-8 properly. Take that, urxvt!


After some 20ish minutes of compiling, the process is halted with some error messages missing "camera.h", "camframe.h", "jpeg_encoder.h", and the like. A quick search leads me to this thread. The funny thing is, the solution was not posted when I found it, only now that I rechecked the link. So this is what I did:

  • patch the mentioned change with: repo download platform/vendor/htc/dream-open 10981/1
  • hack hardware/msm7k/libcamera2/Android.mk and change the "true" value
    on the first line to "false"
  • run make again
So it turns out my phone is missing /system/lib/libspeech.so (which is some proprietary library built and supplied by the vendor). I was told it should be included in the 150275 build, so now after downloading it, I copied over the corresponding file to $HOME/android/mydroid/vendor/htc/dream-open/proprietary/. Now it's building.

Friday, July 31, 2009

Ubuntu's default firefox search

So I have been using Karmic for a while now and I recently noticed that Ubuntu folks have changed the default search engine from plain old Google to Google custom search. How did I notice? I frequently use Google's built-in calculator to find out info about a great variety of things, like currency conversion:
The above is what I usually expect. It spits out a quick result with the obligatory disclaimer underneath it. Then some search results appear below it, which 99% of the time are totally uninteresting once I get the actual information I was looking for. These days the same search query produced an output like this:
Needless to say, this is does not really satisfy my needs. Now I don't have problems with these kinds of ads, my problem is that the calculator result is omitted. Hidden. Left out. So I went on and tweaked some settings like the keyword.url in about:config to no avail. My last attempt was to replace the default search engine with one of my "own" plain old google search plugins. Actually, I haven't managed to do this. Instead, I tried to add the plugin by another name, then use it instead of the ubuntu-supplied one. For this I have put up a simple web page with a stupid javascript that adds a new search plugin, which actually worked, so the story ends here.