Install Android SDK on Linux

Download Android SDK for linux at http://developer.android.com/sdk/index.html
Extract the package
[fazries@fazries.com ~]$ tar -xf android-sdk_r16-linux.tgz
[fazries@fazries.com ~]$ cd android-sdk-linux/
[fazries@fazries.com android-sdk-linux]$ ls
add-ons  platforms  platform-tools  SDK Readme.txt  temp  tools
run the SDK
[fazries@fazries.com android-sdk-linux]$ cd tools/
[fazries@fazries.com tools]$ ./android 
We need adb shell, because I want my galaxy mini set the application to SD card
after installation finish, you can find adb script at,platform-tools folder
[fazries@fazries.com android-sdk-linux]$ cd platform-tools/
[fazries@fazries.com platform-tools]$ ls
aapt  adb  aidl  dexdump  dx  fastboot  lib  llvm-rs-cc  NOTICE.txt  renderscript  source.properties
Ok, this is the fun part, Linux cannot read My devices, after read some reference at this page
http://forum.xda-developers.com/showthread.php?t=640158
and
http://yanzicjustnubie.wordpress.com/2011/04/22/cara-menjadikan-galaxy-mini-sebagai-modem-pada-ubuntu/

I cannot connecting My Device to my Linux box
you need generate udev files, and need root privilege for that
[root@fazries.com ~]# touch /etc/udev/rules.d/51-android.rules
[root@fazries.com ~]# vi /etc/udev/rules.d/51-android.rules
#fill with this
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct} =="689e", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct} =="685e", MODE="0666"

[root@fazries.com ~]# cat /etc/udev/rules.d/51-android.rules 
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct} =="689e", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct} =="685e", MODE="0666"

ATTRS{idVendor}=="04e8" are Id Vendor for Samsung
ATTRS{idProduct} =="689e" are Id Product for Galaxy Mini ATTRS{idProduct} =="689e" are Id Product for Galaxy Young


change files permission for 51-android.rules
[root@fazries.com ~]# chmod 644 51-android.rules
restart udev services, Im using Fedora 16.
[root@fazries.com ~]# service udev restart
Redirecting to /bin/systemctl  restart udev.service
Back to android-sdk-linux folder,
[fazries@fazries.com ~]# cd ~/android-sdk/android-sdk-linux/platform-tools
Start adb script, on yor devices dont forget to set Allow Mock Location, and USB Debugging
[fazries@fazries.com platform-tools]$ ./adb kill-server
[fazries@fazries.com platform-tools]$ ./adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[fazries@fazries.com platform-tools]$ ./adb devices
List of devices attached 

[fazries@fazries.com platform-tools]$ ./adb devices
List of devices attached 

[fazries@fazries.com platform-tools]$ ./adb devices
List of devices attached 

[fazries@A1008 platform-tools]$ ./adb devices
List of devices attached 

[fazries@fazries.com platform-tools]$ ./adb devices
List of devices attached 

[fazries@fazries.com platform-tools]$ ./adb devices
List of devices attached 

[fazries@fazries.com platform-tools]$ ./adb devices
List of devices attached 
S5570412ac34e device
adb devices need times for detecting My Devices, just repeat the commands several times.
Run the command to move Default Installation to SD Card."adb shell pm setInstallLocation 2"
[fazries@fazries.com platform-tools]$ ./adb shell pm setInstallLocation 2
Finish, Now My Galaxy Mini can move apps to SD :-), Horrey...

Comments

  1. Hi,

    I am also using Fedora 16, i followed the above steps for my HTC Desire S. But still i am getting same error:
    List of devices attached
    ???????????? no permissions

    Any idea to solve the problem?

    Thanks.

    ReplyDelete
    Replies
    1. Problem Solved. Just unplugged the usb cable and then plugged it. My Phone is detected.

      Thanks

      Delete
  2. this command can work for LG P500?

    ReplyDelete
    Replies
    1. just add the id vendor and id product in 51-android.rules for specific android smart phone.

      Delete
  3. is it possible to do this work without a phone? I don't have an Android phone.

    ReplyDelete
    Replies
    1. inside the sdk there is an android emulator also,
      so you can try to run the android system at your personal computer :).
      keep learning.

      Delete

Post a Comment

Popular posts from this blog

authentication failure using SSH pam_unix(sshd:auth): authentication failure;

Howto configure SPLUNK Universal Forwarder

openvpn howto make OCSP server using OpenSSL [Part2]