Posts Tagged Android
Finally I’ve got time to prepare my personal Froyo image for HTC Desire, which is supposed to be stock WWE image with some tweaks and changes, that should allow it to work flawlessly on SBM network and don’t consume too much battery. First, the emergency call codes are supposed to be changed to the following (110 — police, 119 — fire/ambulance, and it still beats me what 118 means):
Besides the radio options used in the previous versions, there are a few new ones, not found anywhere else except the Softbank ROM image:
Not particularly sure what do they do, I think I might change hotspotUI to “yes” someday later. Also, “ro.telephony.default_network=2″ does not agree to the following piece found later in the same file, I wonder which one takes precedence, and what is network #2 in this context:
# Default network type.
# 0 => WCDMA preferred.
There’s also a few things not found in SBM image, but present in WWE release:
Last year I’ve got WinMobile phone (Toshiba X02T) from SoftBank, also known as TG01 in the rest of the world. I did not like it very much, so basically it slept in the box unused. Recently I’ve noticed some new development and decided to give Android a try, since I really enjoy to run games and software on large 4.1″ screen.
If you don’t like to read the whole thread on XDA-dev, here’s a quick summary: buttons, screen and sound do work, anything wireless (WiFi, GPS, calls, SMS, network access) does not (yet). So, it’s a bit early to use this on everyday phone, but quite good enough to install software and play games.
Current version of Android cannot be flashed to device, but works from SD card instead. To start Android you have to boot Windows first, run Explorer, scroll the file list and click on the .exe file, which will unload Windows and load Linux/Android, which works until power off. Next time the power is on, Windows boots up again, which is good, since I don’t want to lose the warranty and official support.
Installation is quite simple. First you have to download the necessary software (there might be a new version, it’s a good idea to check the original thread for the new version if you are reading this after 2011.01.01). Then, I really loathe this step, you have to find 7zip to unpack the file, since the usual unzip will not work. After the file is unpacked, copy the “Android” folder to the SD card in your X02T phone. There should be some empty space left on the card, since additional files will be created when Android is run for the first time.
To run Android, first start the Explorer, go to SD card, open folder “Android” and run “clrcad.exe” (nothing visible will happen), then “haret.exe”. You should get the Linux boot screen.
It might take a few minutes, and possibly a reboot or two, since hardware is checked and some files are created, but finally there will be initial setup screen and Android home page. Once you got there, everything else is quite easy.
You may read the system log with: adb logcat
The battery indicator might not work, so it’s a good idea to keep the USB cable connected. However, since we need to run the programs from SD card, the USB mode should be changed to ActiveSync once the files are successfully copied to the SD card.
Also, it’s a good idea to watch the temperature of the phone back side to avoid overheating.
How to install the software?
Software installation can be done over USB link with ADB:
$ adb install AngryBirds_1.3.5.apk
* daemon not running. starting it now *
* daemon started successfully *
2546 KB/s (13466519 bytes in 5.165s)
- waiting for device -
By Rick Rogers, John Lombardo, Zigurd Mednieks, G. Blake Meike
Publisher: O’Reilly Media
Released: May 2009
Very nice “no-bullshit” introduction book. A little bit dated, because it’s based on SDK v1.1, and Android development went far ahead since 2009. Also, some of the examples don’t run ‘as is’ with the current SDK, but actually it’s not very important (who runs them anyway?), because the main point of this book — a very concise explanation of Android internals and development process. Explanation, which don’t dig very deep into the unnecessary details, but tells everything you should know to develop for Android. Well, maybe not everything, but just the right amount to get started, including the basic work-flow scenarios and solutions to common problems.
People with no computer background may find this book a bit difficult to read, because there’s no gentle introduction to every aspect of computing and programming, but for someone with even a little experience in computers who tries to jump into Android software development it’s a must have.
In the part 1 I explained how to compile a new kernel, and here’s the explanation how to upload the newly compiled kernel to your device.
- make sure you really have arch/arm/boot/zImage file (about 2MB in case of HTC Desire/Eclair) present after your kernel compilation was over.
- download AnyKernel template by koush and unpack it somewhere
- copy your zImage file to the template /kernel directory, there supposed to be another zImage file there — just replace it
- go back to the template directory, you will see three subdirectories: META-INF, kernel & system
- zip them all (zip -r ../update.zip *)
- sign the update.zip and flash it to your device
- scripts included in the template will unpack your current boot.img, keep ramdisk, but replace the kermel
Big thanks to Bartosz Ponurkiewicz, who gave me nice advices and warned about common problems on the way!
Recently HTC released the kernel source for HTC Desire. Here’s how to compile the kernel source under Ubuntu:
- download and unpack source code
- install android SDK and NDK
- get kernel config from your device (adb pull /proc/config.gz; gunzip config.gz; mv config .config)
- put .config into the root directory where you unpacked kernel source
- run “make oldconfig”
- optionally, if you plan any changes, run “make menuconfig”
- run “make ARCH=arm CROSS_COMPILE=~/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-”, where long and complicated path points to the actual directory where you installed NDK
Wait about 10-20 minutes. You should get the following mesage:
Kernel: arch/arm/boot/zImage is ready