Home > Android 2.2, Android SDK > Android SDK tips and tricks.

Android SDK tips and tricks.

The Android SDK is meant to be a set of developer tools to create Andorid apps, but that doesn’t mean it can’t be useful to Android users. In fact, there are plenty of interesting and useful ways you can use the SDK. It allows you to make changes to the phone’s settings, do things not usually allowed on stock devices, and it can even get around some nasty carrier restrictions. All of this without ever having to root your phone. All you need is the Android SDK, an Android phone, and basic knowledge of you computers command prompt or terminal.

Preparation.

Of course, you’ll need to install the Android SDK first. You can go here for a guide and other useful references. Once you have the SDK installed properly you should be able to follow any of these guides.

Before you begin go to Settings—>Applications—>Development on your phone and enable USB debugging if it’s not on already. Now connect the phone to the computer through USB, but don’t turn on USB storage mode.

This guide was made using Windows, but everything should also work on OS X and Linux with only a few negligible differences (file structure differences, use terminal instead of command prompt, etc.)

Take Screenshots.

I’m still a little shocked that Google hasn’t enabled the ability to capture screenshots from the phone itself. While rooting allows apps like drocap2 and ShootMe to take screenshots from the phone, most people would rather not risk losing their warranty just to take the occasional screenshot. Here’s how you can do it with the SDK.

Once the phone is connected go to your android sdk directory, open the tools folder, and open the file called ddms.bat.

Select the DDMS tool

After the Dalvik Debug Monitor has started, you should see your device in the name list. Click on your device’s name one time to select it.

Select Your Device

Turn your device’s screen on and make sure the screen is showing what you want to be captured. Now, either go to the Device menu and select Screen Capture, or simply press Control-S on you computer to take the screenshot. If the capture didn’t come out the way you wanted, rearrange your screen and select refresh to try again, otherwise you can select save. Click done to close the preview window or select refresh to take another screenshot. The options are pretty self-explanatory.

Screen Capture Options

Sideload Apps.

For some crazy reason, AT&T decided it would be a good idea to block sideloading from their Android phones. As far as I know, they are the only ones doing this. No sideloading means you can’t install apps that are not available in the Android Market, for example most EA games. Here’s how you can get around the ridiculous restriction using the Android SDK:

First copy the .apk file you want to sideload to the tools folder of you android SDK. In this example the folder is located in C:\android-sdk-windows\tools.

The apk is located is the tools folderNow, open you command prompt and navigate to the tools folder. In this example I would type: cd C:\android-sdk-windows\tools:

To install the app you simply enter the command adb install appname.apk (of course, replace “appname” with the actual name of the apk) and press enter.

You can also use a similar method to push files to your device without mounting your SD card. Very useful if you need to transfer a file to your sd card while using the SDK, since you can’t enable USB storage mode. Put the file into the tools folder and run the command adb push filename /sdcard/somefolder/filename (notice the directories in Android use “/” while in the Windows file directory it’s “\”). As an example I’m going to send the file 2149.gif to a folder on the SD card called Pictures:

Force apps to move to the SD card on phones running Android 2.2.

Android 2.2 has been out for a few months already, but there are still many apps which don’t support the “move to SD card” option. By running 2 very simple commands, you can enable this feature on most apps.

Navigate to the tools folder from a command prompt and run these two commands:

adb devices

adb shell pm setInstallLocation 2

Now reboot your phone and you’ll notice the “move to sd card” option will now be enabled for most apps.

It doesn’t work on every single app. System apps and copy protected apps can’t be moved. Widgets won’t work very well (if at all)  if they’re moved to the SD card, and some apps that run background services will have problems as well. Based on my experience, the vast majority of apps have run just fine. If not, you can easily move any apps back to internal storage. If you decide to undo this you can set the phone’s install location back to default by running these commands:

adb devices

adb shell pm setInstallLocation 0

Thanks to the Android SDK, users can get around many restrictions set up by Google and certain evil cell phone carriers. There are still many more fun and interesting things you can do with the SDK (besides developing apps). From something as simple as running an Android emulator on your computer, to something a little more dangerous like rooting your phone and removing unneeded system files. If you’re interested in going a little further, try out these simple guides from some awesome Android sites:

http://androidandme.com/2009/10/news/how-to-install-android-sdk-and-play-with-android-2-0-in-the-emulator/

http://www.androidcentral.com/sdk-driver-root-oh-my

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: