[Tips for Android developer] : Android SDK tools PATH setting

After you installed the Android SDK, it’s a good idea to add the tools directory to your search path, which includes a useful collection of command-line tools.

Windows:

Supposu you have download and install Android SDK, and extract it in another drive, except C:\. There are two methods to set PATH, such as :

  1. Use command prompt :
    set path=%path%;D:\android-sdk-windows\tools;
  2. Another is follow the inscructions :
    My Computer->Property->Advanced->Environment Variables->Edit Path Variable and add “D:\ android-sdk-windows\tools” into the Path Variables.

Linux and Mac:

Edit the ~/.bashrc or ~/.bash_profile file on that OS,

add “export PATH=$PATH:/tools”, such as:

1. Linux:export PATH=$PATH: /android-sdk-linux/tools

2. Mac:export PATH=$PATH: /android-sdk-Mac_x86/tools

After saved the file, excuting “source ./.bashrc ” to make the PATH setting become effective.

That’s it! 😀

[Tips for Android developer] Failed to copy file to system on AVD?

As Android Developer, if you use the following command like:

adb push [your_file] /system/..

and problem shown : “failed to copy file to /system/…”,

such as:

failed to copy ‘[your_file] ’ to ‘/system/…’: No space left on device
failed to copy ‘[your_file] ’ to ‘/system/…’: Out of memory

to resolve that problem, you can use this method :

Start your Emulator…not using Eclipse IDE or AVD Manager, but use the following command :

$emulator –avd [your_avd_name] –partition-size 128

Then you can try the command “adb push [your_file] /system/…”, and the problem solved. Now you can push your file to the system of android on Emulator 😀