You are here

Playing with Android and a Samsung Galaxy S (I9000) - 1

DroidA few days ago, I received the Samsung Galaxy S (I9000) I had ordered. I bought it mainly to replace my Nokia 810 (tablet) and the old Nokia 3109 (mobile phone) I was using. And to have an Android platform, as I'd like to spend some time playing with this environment...

This article contains my notes on this subject.

Reference pages for Android:

References pages for the Samsung I9000:

Setting up development environment for linux Mint 8 (ubuntu 9.10) and eclipse:

  • install sun-java6-jdk, then eclipse (3.5.1 - Galileo), using synaptic
  • download and install the SDK starter package, and modify the PATH accordingly
  • install the ADT plugin for eclipse (I install DDMS as well). Configure eclipse to point to installation directory of the SDK starter package
  • using the android tool from inside the tools directory of the SDK starter package, install the following packages:
    • SDK Platform Android 2.1 (API 7)
    • Google APIs (API 7)
    • samples (API 7)
    • documentation (only API 8 is available)
    • market licensing package (rev. 1)
  • restart eclipse

14-Mar-2011 - Android SDK Tools update

  • using Eclipse, Android SDK Tools revision 7 is updated to revision 10
  • close Eclipse,run android tool command: ./usr/local/bin/android-sdk-linux_x86/tools/android
  • install following packages:
    • Android SDK Platform-tools, revision 3
    • Documentation for Android SDK, API 11, revision 1
    • SDK Platform Android 2.2, API 8, revision 2
    • Samples for SDK API 8, revision 1
    • Google APIs by Google Inc., Android API 8, revision 2
  • check available Eclipse updates, and update Android DDMS and Android Developments Tools (logically, should have been performed before above steps...)

Getting acquainted

  • read Application Fundamentals
    • four types of components: activity, service, broadcast receiver, content provider
    • activities, services and broadcast receivers are activated by intents
    • an Android package (.pak file) contains: manifest, code, files, resources
    • intent filters, declared in the manifest, are used by Android to locate the best component to respond to a given intent
    • a task is a group of related activities, arranged in a task. For the user, task = application
    • affinity can be used to modify the default task grouping scheme for activities
    • four different launch modes can be assigned to an activity
    • Android starts a Linux process with a single thread to run the first component of an application. By default, other components are run in this process and thread
    • Android has a lightweight mechanism for remote procedure calls
    • an activity has essentially three states: active (or running), paused, stopped
    • there are three different lifetimes, in the lifecycle of an activity: entire lifetime, visible lifetime, foreground lifetime
    • Android tries to maintain an application process for as long as possible, but eventually it will need to remove old processes when memory runs low. Process importance levels: foreground process, visible process, service process, background process, empty process
  • complete the Hello World tutorial - warning: activation of the simulator is very long (several minutes on an Atom N270 1.6 GHz)
  • go through some of the Hello Views tutorials, to get an idea of available layouts and widgets
  • as explained in this page, transfer a test package to the Galaxy S and run it:
    • declare the application as being debuggable
    • turn on USB debugging on the Samsung
    • prepare linux to detect the phone, by creating the udev rule file /etc/udev/rules.d/51-android.rules, with contents: SUBSYSTEM=="usb", SYSFS{04e8}=="0bb4", MODE="0666".
    • in addition to what the Android guide explains, I had to restart adb daemon, from root:
      • adb kill-server
      • adb start-server
    • connect the Galaxy S to an USB port, check that it is recognized: adb devices.
    • under Eclipse, create a Run configuration with manual selection of target device
    • Run
    • that's it!

Upgrading the Galaxy S to Froyo

Official Froyo (2.2) was made available mid-december. I installed Samsung Kies on a laptop running Microsoft Windows. And I connected the I9000 to the laptop...

Everything went OK, as soon as I understood that I had to use a USB port able to deliver enough current to the I9000. On the laptop I used, I had to disconnect another equipment already connected to a USB port, to be able to get a stable connection to the I9000...

Then, on the I9000, I switched the USB port to "Kies mode". And the upgrade went smoothly...

Before the upgrade, various version information were:

  • firmware version: 2.1-update1
  • base band version: I9000BVJF3
  • kernel version: 2.6.29 root@SE-S603 #2
  • version number: ECLAIR.BVJG2

After the upgrade:

  • firmware version: 2.2
  • base band version: I9000BVJP3
  • kernel version: 2.6.32.9 root@SE-S611 #1
  • version number: FROYO.BVJP8

18-May-2011 - New SGS upgrade

  • firmware version: 2.2.1
  • base band version: I9000BVJP4
  • kernel version: 2.6.32.9 root@DELL104 #1
  • version number: FROYO.BVJS4 

16-Jun-2011 - Moving to Ubuntu 11.04

I had to upgrade to Ubuntu 11.04 one of the PCs I use for development tasks. Consequently, I had to re-install Android SDK:

  • using Synaptic, install Eclipse 3.5.2 (Galileo), sun-java6-jdk
  • switch to Sun Java : sudo update-alternatives --config java
  • download the SDK Starter Package (r11)
  • untar the file, and move resulting directory to /usr/lib/
  • install the ADT plugin
  • add platforms and components, starting Android SDK and AVD Manager from command line. If started from Eclipse, it's not possible to specify proxy to be used! But there is a stronger reason to start it from command line: as I installed the SDK into /usr/lib, the program needs root rights to install software...
    • Android SDK Platform Tools, revision 5
    • documentation for Android SDK, API 12, revision 1 (documentation can be accessed locally at file:///usr/lib/android-sdk-linux_x86/docs/index.html)
    • SDK Platform Android 2.2, API 8, revision 2
    • samples for API 8, revision 1
    • Google APIs, Android API 8, revision 2
  • install Subclipse 1.6 plugin 
  • configure Linux to detect the phone (see above)
  • download the Icon Templates Pack and extract the contents to some place. Note: existing drawables can be found in /usr/lib/android-sdk-linux_x86/platforms/android-8/data/res
  • install SDK Platform Android 3.0, API 11, revision 1, as well, because of this bug

20-Jul-2011 - New SGS upgrade

  • firmware version: 2.3.3
  • base band version: I9000BVJV2
  • kernel version: 2.6.35.7-I9000BVJV7-CL213736 root@DELL101 #2
  • version number: GINGERBREAD.BVJV7 

Important information about Android architecture

UI

See above section as well.

GPS

09-Nov-2011 - Upgrade to 2.3.5

Since the previous upgrade, my SGS was handling data connections in a strange way. Sometimes, it was not able to open a data connection. Sometimes, I had to enforce GSM mode (GPRS, in other words). And data connection status displayed in the status bar was no more in synch with real data connection state...

Some days ago, I checked whether a new version was available. Yes, it was. I installed it. My SGS in now in following configuration:

  • firmware version: 2.3.5
  • base band version: I9000BVJV3
  • kernel version: 2.6.35.7-I9000BVJVC-CL679241 root@DELL138 #2
  • version number: GINGERBREAD.BVJVC

It seems that data connections are now handled in the right way...

Android 4.2 and developer options

Starting with Android 4.2, developer options are hidden by default. To make them appear, follow those instructions.

12-Feb-2012 - My current Eclipse configuration

My current Eclipse configuration is now described in this article.

Next article

For Droid logo: Portions of this page are reproduced from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.