Skip to Content

Blog

Connecting Kindle Fire to ADB on Ubuntu

I recently got a kindle fire for testing, but had some issues connecting it to ADB.

  • Get the Vendor id by typing:
    lsusb 
    The line we are looking for is:
    Bus 003 Device 026: ID 1949:0006 Lab126
  • Add the vendor id (1949) to /etc/udev/rules.d/51-android.rules as per normal
    SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
    Usually a device would work here but it wasnt happening with the fire …
  • The solution is as per this link: StackOverflow
    You also need to add the vendor id to ~/.android/adb_usb.ini (you need to check the file doesn’t exist first).
    echo "0x1949" >>~/.android/adb_usb.ini
    echo "0x0006" >>~/.android/adb_usb.ini
  • Then we restart the ADB server and the device should be shown:
    adb kill-server
    adb start-server
    adb devices

Gnome 3: gnome-panel alt+right click not working

Not really Android related, but I just upgraded to ubuntu 11.10 and had the re-install gnome (I hate Unity). All was pretty good but I just couldn’t figure out how to get gnome-panel settings to show. Every report I found on the web says it was <alt>+<right click> but for me it is

<winkey>+<alt>+<right click>.

Anyways, just though I’d add that, as I said, everywhere else says its <alt>+<right click>. Possibly the key binding was in use and it selected another.

On an Android note, if you are on Ubuntu 11.04  and having issues with eclipse (mouse not working!!) then do an upgrade to 11.10. All is good here.

O2 Testing 4G network

In November O2 is switching on the UK capital’s first 4G mobile network, giving some users a glimpse into what the future may hold, with superfast mobile broadband.

With 22m users, O2 is the UK’s second largest mobile phone network, but this city trial will run initially with around a thousand people, businesses and venue owners, who will be kitted out with the latest 4G equipment and given access to the UK’s largest urban 4G network.

The trial will give 1000 Londoners the chance to use the fastest mobile broadband they’ve ever seen, capable of powering 20 high definition internet televisions from a table in Starbucks.

Notes from planet of the apps …

The planet of the apps conference was a nice event, quite small but a good line-up of speaker (including yours truly). Though the speakers were a bit iPhone centric mostly, most of them seem to worried about ‘fragmentation’. I still think there is a lot of misunderstanding about Android out there …

Some highlights for me were:

Mobile apps dragons den (day1): Nerad Marovac (DN Capital) and Frederic Court (Advent Ventures) represent angel investors and helped explain their investment strategies. It was interesting to see their perspective. Some like to go for early stage startups ( when they have have input on the product) and others go for growth stage (where the product is proven and the company needs to expand)

App longevity: This was a panel discussion on factors surrounding an apps lifetime. There was a lot of concensus that utility apps would be longer lived, but probably wont attract the sales levels in a short that games do. As well as strategies for keeping people interested (e.g. regular updates, the need for UX).

And of course:

Re-enabling the cloud: My presentation about considerations when choosing a cloud provider, mainly:

  • Make a decision early on the data you want to keep as storing it forever just leads to increasing costs.
  • Be careful of lock-in to a cloud API. Platform as a service (PAAS) providers (e.g. Azure, App-engine) generally have customised APIs, that will likely need significant recoding of you want to move. Though this is likely a function of their limited age and more are building support for standard APIs
  • Here are the slides PPT, ODP

Here are some notes I made in Vectoroid for anyone interested (they are a bit unstructured): Day 1 Day 2&3

Planet Of the Apps Presentation. R-enabling the cloud …

I will be presenting at the “Planet of the Apps” Confrence (website) on 6th October. The topic is “R-enabling the cloud, continuing the natural migration from PC application to mobile app” (programme).

The conference has a great line-up speakers, and no doubt will be very informative. Hope to see you there. Bit of a shame about the overlap with DroidCon, but hey its mobile week (http://londonmobileweek.com/), so there bound to be some crossover with other events. Perhaps it should have been “mobile month”.

DroidCon UK, 6-7 October 2011

Looking forward to the upcoming DroidCon UK (6-7 October 2011) (http://uk.droidcon.com). It promises to be a must see for Android developers with loads of presentations from Google, HTC, SONY Erricson, and loads of community members. Hope to see you there:

Droidcon London Oct 6-7

MyPOD reviews

There have been a couple of fair reviews of MyPOD recently and I just wanted to send a shout out to the authors, Thanks guys.

http://www.androidauthority.com/podcatcher-roundup-top-9-best-android-apps-for-playing-podcasts-16817/

http://rascallings.blogspot.com/2011/07/android-app-review-mypod.html

We all know that while being highly functional – there are some edges to smooth out in the MyPOD UI. Credit goes to these bloggers for taking the time to look at the functionality and give it a fair review.

Using VectorPaint For VJing

While re-writing the VectorPaint library I have also been experimenting with using the library in a VJing application. The save drawings are sent via OSC to a processing sketch and render on the screen. This is a snapshot at MixedMedia – a monthly event in Sydney for VJing.


shortcuts script for common debug tasks

I have been using this script for a while, it allows me to make shortcuts for common android debug tasks (e.g. logcat, shell, installing/overwriting/removing apks). There are probably better ways of doing it for the shell script experts out there, but it suits my purposes… and it’s pretty streamlined.

There are aliases for common devices and common apps so i can start stuff with a few characters

So the first parameter denotes the function.


l = logcat
r = replace app (keeping data)
s = shell
i = install
u = uninstall
o = overwrite (uninstall then install)
ks = kill-server
ss = start-server

The second parameter denots the device (which are configured in the first if statement):

a = all connected devices (from 'adb devices')
f = first device (in 'adb devices' list)
e1 = emulator-5554
(the others are my hardware devices)

Then there are app package name shortcuts … (the 3rd if statement)

To start logcat on ny nexus 1, I type:

ad l n1
And to overwrite an apk on all connected usb devices – it type (the 2nd ‘a’ param stands for ‘all connected devices’), really useful when testing before a release …
ad r a /path/to/apkfile.apk
Basically it’s nothing too high tech, it just makes things much quicker and easier when i am debugging. If you have any suggestions then i am keen to hear them…

So without further ado, here is the script:

#!/bin/bash

# toggle this to test command output without execution 0=no exec
EXEC=1;

DEVICES='f'

if [ $2 ] && [ $2 = 'g1' ] ; then
DEVICES=("HT848KV04600")
elif [ $2 ] && [ $2 = 'hero' ] ; then
DEVICES=("HT9BSL901147")
elif [ $2 ] && [ $2 = 'arch' ] ; then
DEVICES=("A10-4BE40002-9FF80000-015F2F44-0D01601E")
elif [ $2 ] && [ $2 = 'n1' ] ; then
DEVICES=("HT018P805702")
elif [ $2 ] && [ $2 = 'e1' ] ; then
DEVICES=("emulator-5554")
elif [ $2 ] && [ $2 = 's' ] ; then
DEVICES=("I5500b2e40b3c")
elif [ ! $2 ] || [ $2 = 'a' ] ; then
DEVLIST=`adb devices`
DEVICES=()
for D in $DEVLIST; do
if [ $D = "device" ] ; then
DEVICES=(${DEVICES[@]} $PREV)
fi
PREV=$D
done
# take the first device if not specified otherwise take all
if [ ! $2 ] ; then
DEVICES=${DEVICES[0]}
else
DEVICES=${DEVICES[@]}
fi
fi
echo "using devices:" $DEVICES

OP=''
if [ $1 ] ; then
if [ $1 = 'u' ] ; then
OP="uninstall"
elif [ $1 = 'i' ] ; then
OP="install"
elif [ $1 = 'r' ] ; then
OP="install -r"
elif [ $1 = 'l' ] ; then
OP="logcat"
elif [ $1 = 's' ] ; then
OP="shell"
elif [ $1 = 'ks' ] ; then
OP="kill-server"
elif [ $1 = 'ss' ] ; then
OP="start-server"
elif [ $1 = 'z' ] ; then
OP=""
elif [ $1 = 'o' ] ; then
OP=""
fi
fi
PRG=$3;
if [ $3 ] ; then
if [ $3 = 'mpp' ] ; then
PRG="package.name.1"
elif [ $3 = 'st' ] ; then
PRG="package.name.2"
elif [ $3 = 'stp' ] ; then
PRG="package.name.3"
elif [ $3 = 'mp' ] ; then
PRG="package.name.4"
fi
fi

if [ ! $1 ] ; then
echo "ad extra"
echo "CMD = o (overwrite) extra=apk | l (logcat) | r (reinstall) extra=apk | i (install) extra=apk | s (shell) | u (uninstall) | ks (kill-server) | ss (start-server)"
echo "CMD = z (zipalign )"
echo "DEV = g1 hero arch n1 s a(all)"
echo "PRG = mp mpp st stp"
echo "------devices---------"
CMD="adb devices"
echo $CMD
if [ $EXEC = 1 ] ; then
$CMD
fi
else
if [ $1 = 'z' ] ; then
NEWFILE=`echo $2 | sed "s/.apk/_z.apk/"`
rm -fr $NEWFILE
CMD="zipalign -v 4 $2 $NEWFILE"
echo $CMD
if [ $EXEC = 1 ] ; then
$CMD
fi
else
for DEV in $DEVICES ; do
echo $DEV
if [ $1 = 'o' ] ; then
CMD="adb -s $DEV uninstall $PRG"
echo $CMD
if [ $EXEC = 1 ] ; then
$CMD
fi
CMD="adb -s $DEV install $4"
echo $CMD
if [ $EXEC = 1 ] ; then
$CMD
fi
else
CMD="adb -s $DEV $OP $PRG $4"
echo $CMD
if [ $EXEC = 1 ] ; then
$CMD
fi
fi
done;
fi
fi

Silent mode timer UI changes – review & lessons learnt

I have posted about the silent mode timer before – it’s a small app to disable silent mode using a timer. It’s useful for situations like meetings and going to the cinema when you just want to have silent mode on for a short period of time and not mess around with schedules or flipping upside down, etc.

After releasing a UI update recently I discovered how difficult it can be to convince users of the benefits of a new (better) UI. When your users know your product there is generally going to be some resistance when it gets changed. Eventually I have realised that if there is going to be change, then you have to make sure that all the features your existing users like should be the highest priority.

The goals of the UI re-write were to reduce the amount of buttons on screen while still enabling the fastest way to set a timer and just get out (that’s all the app should do).

The features that were lost in this case were:
1. Some convenience buttons on the side of the time setting widget to increment/decrement the time by 15min. In the first version
2. 12 hour time.

These features have now been restored by popular demand …

There were many features people had requested to be added in the first version (automatic prompting, calendar integration, set a timer by end time). Some of these were easy to integrate in the new interface (all except the calendar integration).

But with all the (new and old) features, does it still live up to the basic goal of simplicity? Well the users will be the judge. Some have left but more new ones have also come.

The moral of the story? Well i guess it’s that no matter how well you try to make things better, the main thing you need to create is a sense of attachment to an application, and familiarity is key. Changes probably need to be made in transitional style, or if there is a complete overhaul, the option to revert to the old style while people get comfortable is highly important.

The new app can be found on the market here:
Free: https://market.android.com/details?id=co.uk.sentinelweb.silenttimer

Paid: https://market.android.com/details?id=co.uk.sentinelweb.silenttimerpaid

It would be great to know what YOU think too ;)