Wednesday, August 18, 2010

Problem connecting Android to ADB (Android Debug Bridge)

I use the free version of EasySMS a lot - simply because it feels good to write an SMS on the nice browser interface. This way I do not have to take my eyes of the computer screen.

Both the ADB and the EasySMS files was on my Xperia - and with a desktop shortcut in Windows and the Android USB driver installed, my expectation was that I did not need to install the full Android SDK on every PC I get in contact with.

With the USB driver installed, the EasySMS installation on my phone worked fine - for a while. I tested the setup on 3 computers and I thought it was a success.

Then suddenly my script would not open the webinterface - with a sad message that the webpage could not be found. It did not take long to figure out that the problem was the ADB - it could not locate the phone connected.

To make a long storry short:
  • Make sure AdbWinApi.dll is available for adb.exe
  • Make sure AdbWinUsbApi.dll is available for adb.exe
  • Make sure adb.exe is restarted
  • Make sure the phone has the USB Debug connection activated
Somehow the DLL's AdbWinApi.dll and AdbWinUsbApi.dll had disapeared from the directory on the phone where I had adb.exe. After putting the DLL's back, the adb.exe would happily recognize the Xperia attached to the USB port.
Another issue is that the adb deamon running in windows sometimes seems to get "stuck" on a previous connection and won't accept a reconnect. In this case the ADB need a restart. (I read somewhere that the Linux version also have this problem - and on top it needs to have the SUDO command added in front of the adb command to make sure it is performed with root rights):
  • adb kill-server
  • adb start-server
ADB should then return the messages
* daemon not running. starting it now *
* daemon started successfully *

After this, a call to adb devices should show the connected android device, like:
List of devices attached
CB511H16LQ       device

Thursday, June 3, 2010

(Secret) Service Menu in Xperia X10

All the mobile phones I have had from Sony Ericsson would have a service menu, where the basic hardware could be tested. The X10 is no different.

When the phone screen is locked (The "Lock Screen" - the one with the blue rainbow! ), you push the physical buttons in the following succession:


Menu, Back, Back, Menu, Back, Menu, Menu, Back
 
Nothing is shown on the screen until the service menu pop up. Here you can test most hardware, like GPS, Compass, WiFi, touchscreen etc.
 

Tuesday, June 1, 2010

Connecting X10 to PC via USB

Simple... When you know how... Like everything else in life:

1) Connect USB to your X10

2) Open the top status bar on the X10

3) Select the "USB Connected" on the list

4) Select "Mount"

5) The SD card is now disconnected from your X10 and mounted as a disk drive in Windows. (Here seen as drive "F:")

When disconnecting the X10 from your PC, please remember to "unmount" the connection on the phone - if this is not done, you could risk loosing all files on the SD memory card.

1) Like before, start with opening the statusbar at the top

2) Select the "Turn off USB storage"


3) Select "Turn off" in the dialog


That should cover the basics...

Monday, May 31, 2010

Extending battery time

Like so many other owners of smartphones, the Sony Ericsson Xperia X10 needs to be charged often. In my own case the battery will last a little more than 24 hours if I do not have GPS and BlueTooth activated at all times... If I play games or surf the net, the battery time goes down further. Added to that, I often have my X10 connected to my PC at work and thereby charge the phone during the day.

My old and trusty SE 902 would hold a charge for about 2 days and I never turned off the 3G - until I spend a week in Florida, where the 902 was able to hold the charge during the entire trip - because I would not let the 3G go roaming...

So how can a user extend the battery time on their X10?

On Sony Ericsson support page, they have this list of tips (Edited):

In order to maximise your battery performance, make sure you switch off functions you don't use, such as Bluetooth™, and lower the screen brightness.

Other useful tips to maximise battery performance:
- Only use location services when needed.
- Turn off push email and synchronise your mailboxes manually.
- Minimise the use of third-party applications.
- Charge your phone often. The battery lasts longer if you charge it frequently.
- If you are in an area with no coverage, your phone repeatedly scans for available networks. This consumes power. If you can't move to an area with better coverage, turn off your phone temporarily or use Flight mode.
- Turn off 3G, Bluetooth™ wireless technology and the Wi-Fi™ connection when you do not need these functions.
- Don't cover the phone antenna when you are engaged in a call or when transferring data. The antenna is located at the back of phone
- Browse the web with Wi-Fi™ rather than mobile data networks, and turn off Wi-Fi™ when not in use.
- Close running applications when not in use.

As a test I disabled 3G, GPS, WiFi and Blootooth and rebooted the X10 saturday morning this weekend and the battery was charged to 100% at 10:00. Please understand that the phone was not in "Flight mode", I would still be able to send/recieve SMS and call the outside world and "the world" could call me back if needed.
Sunday evening at 22:00 the batttery charge had only dropped to 74% and after 48 hours since saturday morning the charge had dropped to 66% charge...

What does it mean?

If you only use your X10 as an SMS device and once in a while use the phone as... well... a phone - it is possible to extend the battery time a lot - but then all of the fun in having a X10 (or any other smartphone for that matter) would be gone.

Applications like JuiceDefencer should give a better battey time than the default, but I'll have to look into that at another time.

The Android 2.1 upgrade should also improve battery time a lot so we just have to be patient.

Other than that, use your X10 wisely :-)

Monday, May 10, 2010

Trouble with the Wndows XP driver for Android?

For normal file transfer to and from my Xperia X10, Windows XP does not need any specific drivers - just:
1) Connect the X10 to the USB port
2) Go into the phone, open the top menu and find the 'USB Connected' and select it.

3) Chose 'Mount' in the textbox that appears on the phone

4) et voilĂ  - the contents of the SD memory card on the X10 is visible as a drive in Windows XP.



For those people who need more - like access to the file system on the X10 it self or need the ability to grab screenshots from the X10 or do some development work for Android, a driver is needed...

When in Windows...

On my laptop the revision 3 USB driver for android (located in the Android SDK package .\android-sdk-windows\usb_driver) works fine, but on my 'real' developer PC, I got the sad message that the driver package did not contain anything usefull for my Xperia X10...

Why...? Ooooh.... Whyyyy....?

Based on the information found here (thank you mlohbihler) and here (thank you Jonas Petersson), it was posible to work around the problem.
1) Activate the 'USB Debugging' option on the phone (found under settings -> Applications -> Development -> USB debugging)
2) Connect the X10 to Windows (Yes, using the USB cable...)
3) Use the installation files found here or here.
4) Tadaaah.... (At least it worked for me)

Saturday, May 8, 2010

The case of the flipped login screen

A mystery...

The trusty login screen of my X10 had suddenly become ... reverse...

I did not ask for that...

But luckily the answer was easy - when you know how...

On the login screen put your finger at the top of the "rainbow" and drag it to the other side of the screen - and the top of the rainbow will follow..




Of course this is also usefull information for people who want to unlock their X10 with their left hand.

Tuesday, May 4, 2010

Custom music playlist in Mediascape

A rewrite of the posting by user Baggyb found here:

It's seems that as good as MediaScape is, it doesn't offer the basic ability to create playlists.

The help page on the subject at Sony Ericsson:

Mediascape has automatically generated playlists in the music home screen. You can also create your own playlists. Use the Media Go™ application to maintain your music library and to create playlists. Playlists that you create yourself have to be in the m3u format and have to be stored on the memory card in the phone. When you connect the phone to your computer using the USB cable, the memory card appears in the Media Go™ application.

To copy playlists to your memory card:

a) On the computer: Start the Media Go™ application.
b) Connect the phone to the computer using the USB cable.
c) Locate the memory card in the Media Go™ application.
d) Copy existing playlists from your computer to the memory card by dragging and dropping the playlists.


Now there are workarounds for creating playlists on the x10 itself which MediaScape will recognise.

1. Install Astro file Manager from the market (free)

- Navigate to your Music folder on SD card
- Locate a track and long press, you should get a "Music Options" button.
- Within Music options you can either set as "ringtone" or "Add to a Playlist". (Please note this only seems to work with certain files i.e MP3)

2. Install Astro file Manager from the market (free)

- Navigate to /System/app
- Locate the sndroid Music player called "Music"
- Long press and select open as
- Select Audio

This will bring you into androids bult-in media player that SE have carefully hidden.

It loads your media library and allows you to create playlists easily, which will be instantly picked up by MediaScape.

You can always create shortcuts to the music app.

I suggest that Sony Ericsson upgrade the MediaScape functionality when they send out the Android upgrade to our Xperia X10 phones...