[Xperia Arc Themes and Apps] emwno:
Configuring sdk and adb

HOW TO: SDK / ADB ​

The Android SDK, provides the necessary tools for building apks, as well as providing API's. And the ADB! Is a mean of connect to the device via root stoarge, thus modifying system files, this is a must for devs, who would like to test out their new frameworks etc.

Now, pick your operating system and let's get started.​

Before we continue, you will require ADB drivers for your device, use this to download them.

Then extract it's components to your main drive, for example C:\android-sdk

After extracting, open the folder, then navigate to platform-tools. There open the command prompt, by holding shift key, then right clicking, then hit 'Open command window here'.

Type 'adb' in command prompt. If adb executes means u have successfully setup adb.

If not already, open up the Android SDK, CHECK

Android SDK Tools

and

Android SDK Platform-Tools

and download them.

Download the Android SDKTools for Linux, keeping in mind which bit you have, for example 32bit or a 64bit system.

Next extract the folder in your home directory (/home/username).

Now to be able to run the SDK you need to make it executable. First of all go to home/username/android-sdk-linux/tools/ (Where's it's your username and android-sdk-Linux is the extracted folder. Right click on a file called 'android' then hit properties! Then in the new window, goto the permissions tab. CHECK 'Allow executing file as program'. Once done, close it and double click the android file. And select 'Run in Terminal'.

Once done, check

Android SDK Tools

and

Android SDK Platform-Tools

and download them.

Now that you have the SDK, let's configure ADB for ease of access. Open up Terminal and type the following:

sudo gedit ~/.bashrc

Next in the newly opened window, paste this to the very bottom of the file, save and close.

# Android tools
export PATH=~/android-sdk-linux/platform-tools:~/android-sdk-linux/tools:$PATH

Now just simply reload your bashrc, by entering this in Terminal.

source ~/.bashrc

Download the Android SDKTools for Mac.

Next extract the folder in your home directory (/home/username).

Now to be able to run the SDK you need to make it executable. First of all go to home/username/android-sdk-linux/tools/ (Where's it's your username and android-sdk-Linux is the extracted folder. Right click on a file called 'android' then hit properties! Then in the new window, goto the permissions tab. CHECK 'Allow executing file as program'. Once done, close it and double click the android file. And select 'Run in Terminal'.

Once done, check

Android SDK Tools

and

Android SDK Platform-Tools

and download them.

Now that you have the SDK, let's configure ADB for ease of access. Open up Terminal and type the following:

nano ~/.bash_profile

The above command will open a file in a text editor, now add the following line in the end of that file.

export PATH=${PATH}:~/android-sdk-linux/platform-tools:~/android-sdk-linux/tools

Save the file and close it. Now run this in the Terminal window:

source ~/.bash_profile

Congrats, you have successfully set up SDK and ADB on your Mac!.

Enable 'USB Debugging' on your phone. Now to check if your phone is connected, run the following command in Terminal or CMD.

adb devices

Then you should see something like: (Where abc is your devices number)

list of attached devices
abc device

Next, to pull things from your device, you need to run the following command

adb pull (Directory of the file you want on phone)

-----For Example-----

adb pull /system/app/systemui.apk

To push things to your phone, you will need to run the following command:

adb push (Directory of file on your PC) ( Directory to where you want to push the file on phone)

-----For Example-----

adb push C:\users\emwno\flymeos.zip /sdcard/roms

You can also install APK's form your PC directly to phone by using these commands:

adb install (Directory of the apk on your PC)

-----For Example-----

adb install C:\users\emwno\apk\mms.apk