Samsung Galaxy with Android SDK on Ubuntu

When new Ubuntu Karmic came out I decided to install it from scratch instead of upgrading from Jaunty. Id didn’t take much time to migrate all my data and necessary software. However Android SDK made me some troubles as I forgot all the tricks I had to do to make it working and since I had to follow the same path again I decided to write it down in case me or anyone alse need it again.
Let’s start from the beginning:



  • download Linux version of SDK from developer.android.com
  • unpack it to a folder of your choice
  • launch android program from android-sdk-linux_86/tools subdirectory; make sure you’re using Sun Java virtual machine, if not then I suggest to:
    • install Sun JDK if you don’t have one yet:

      sudo apt-get install java-6-sun

    • setup command line environment and run android tool:

      export JAVA_HOME=/usr/lib/jvm/java-6-sun
      export PATH=$JAVA_HOME/jre/bin:$PATH
      /tools/android

  • you may need to select Force https://… sources to be fetched using http://…” option on the Settings page in case of errors when downloading packages list or packages
  • on the Available Packages page select and install packages you need
  • because of the bug in adb affecting Samsung Galaxy users, replace /tools/adb program with patched one
  • create /etc/udev/rules.d/51-samsung-galaxy.rule file with the following content:

    SUBSYSTEM==”usb”, SYSFS{idVendor}==”04e8″, MODE=”0666″

  • reload udev rules:

    sudo /etc/init.d/udev reload

After all that you should be able to connect to your Samsung Galaxy with adb:

~/dev/android-sdk-linux_86/tools$ ./adb devices
List of devices attached
I7500fIf0cVtIYi device

or with ddms (Dalvik Debug Monitor, it also may not work with non-Sun Java) :


0 comments:

Post a Comment