PortDroid – Portscanner networking tool for android relased

I’ve always enjoyed playing about with network security tools, so I decided to write an android application that merges a few of the most useful network security tools.

PortDroid on Google Play


  • Local Network – Find devices on the same network
  • Port Scanner – Search for open ports on a device
  • Ping – Check the response time from a device local or remote
  • Traceroute – Trace a route between your device and a given host
  • Settings – tonnes of settings for all the tools
  • Advanced browsing of /proc and /proc/net for device network information








PortDroid on Google Play

PortDroid on Amazon

Read More

Nexus Dreams (Added daydream support in Nexus Live Wallpaper)

To celebrate getting over 3 million downloads, I pushed another update to my livewallpaper. This update adds supports for “dreams”. A dream in android is similar to a screensaver that is optionally display while a device is either charging, docked or both. It looks like the image below:

Nexus Dreams

Nexus Dreams

To turn on dreams on your device go to settings, display, daydreams.

Nexus Dreams

Nexus Dreams

You can download Nexus Revamped from the Google play store below:

Free Version

Android app on Google Play

Pro Version

Android app on Google Play

Read More

Getting bitcoins in the UK

So getting bitcoins in the UK has been quite difficult ever since stopped allowing Barclays ping-it transfers. This was a really convenient method of obtaining bitcoins and the alternatives are going through multiple websites and or countries and therefore losing additional money in the transfer. stops all UK Deposits stops all UK Deposits

However I’ve found a website that hooks up local people looking to buy with those looking to sell for a small transaction free You can meetup face-to-face or do bank transfers etc online and use their escrow system to avoid getting conned.

Read More

I’ll be attending droidcon again this year ^_^

Droidcon was awesome last year, so naturally I will be attending again this year. It was a great oppertunity to “network” and meet lots of like minded android developers, it also gave me the chance to meet lots of interesting companies (start-up software companies, app/game studios, phone providers, hardware specialists) which I may be even more interested in this year as I will be looking for employment soon.

Along with all of this come the additional benefits of: pizza, beer, competitions (there were an insane amount of competitions last year), freebies, and more free beer!

For those of you unfamiliar with droidcon here is an excerpt from their website:

Droidcon London 2011 is Europe’s largest conference that exclusively covers Android development and applications. The conference will take place in London on 6th-7th October 2011.

Droidcon London 2011 has grown tremendously since last year, in line with the exponential interest in the Android platform. This year, upward of 600 Android enthusiasts will rub shoulders with the premier experts in the field to dig into every aspect of Android and its ever-growing ecosystem. High on the agenda this time around are Android for the Tablet, Android in the Enterprise, Android for Games, Android for business, Augmented Reality, multi-mobile and a whole lot more.

The first day will be community led with a full-day Barcamp and Democamp. The second day will be conference day, with presentations from some of the world’s foremost Android experts, including two Google Developer Advocates Richard Hyndman and Nick Butcher, Mark Murphy (CommonsWare), Al Sutton, and Kieran Gutteridge (I’ve not had the pleasure of meeting the other speakers yet). A full list of presenters is available here.

You can register via the Droidcon London 2011 site: (

Follow Droidcon London 2011 on Twitter: @DroidconUK tags: #droidconUK #droidcon

Follow Droidcon London 2011 on Facebook:

Read More

Nexus Revamped updates (1.98.14)

Wallpaper has now past 600,000 downloads ^_^ and thought I should blog about the recent changes.

I made a promo image for the wallpapers that should be visible on the market place any time now. I have limited art skills so this is the best I could come up with:

Nexus Revamped promo image

Nexus Revamped promo image

Jazz-hands (multi-touch)

I managed to fix a bug with multi-touch in my code, thanks to this question on stackoverflow. This now means that my wallpaper will work with up to 10 fingers or “jazz-hands”. This also fixes some of the crashes that were occurring on devices with 3.1 and up.

Save / load themes

I’ve also added the option for users to save their own themes so that if you have a few you like you don’t have to keep changing all the settings back and forth. This is also a step towards the next update I have planned whereby users can upload/download themes with a rating system and all the junk.

Save custom themes

Save custom themes

Better tablet / honeycomb support
I’ve added several improvements for large screen devices / tablets, the whole wallpaper is scaled effectively so that it no longer is just a giant zoomed in version of the phone wallpaper, and multiple more graphical changes to improve usability.

Nexus Revamped on a xoom

Nexus Revamped on a xoom

Android Market Links
Either click the following android market links (in android phone) or search the market for nexus revamped.
Pro Version
Nexus Revamped Pro Live Wallpaper (com.stealthcopter.nexusrevampedpro)


Free Version

The free version is the same as the pro version but with some of the fancier features are missing, and some non-intrusive adverts. Both versions are fully supported.

Nexus Revamped Live Wallpaper (com.stealthcopter.nexusrevamped)


Full changelog (since last blog post at version 1.98.01)


  • Bug Fix: Multi-touch force close bug fixed
  • Improved: Due to above bug fix, multi-touch now supports more fingers. This is great for tablets with ‘jazz hands’ support (more than 5 fingers!)
  • Added: Ability to save custom themes (Preset > User)
  • Added: Red Grid theme
  • Improved: Thumbnail images in preset menu scaled to screensize


  • Added: New & exciting Color changer dialog!
  • Added: Loads of new textures, try adding a background tint to make these more personal!
  • Added: German translation (thanks Steven!)
  • Added: Danish translation (thanks Johan!)
  • Added: Russian translation (thanks Dmitry!)
  • Added: Licence information
  • Improved: Transparent theme consistent throughout all settings now
  • Improved: Wallpaper changes scale based on screensize to better suit tablets etc.
  • Improved: Honeycomb background was a bit shoddy, fixed!
  • Improved: Icons/gfx more suitable for range of screensizes
  • Improved: Background tints are applied once on bitmaps rather than every frame, saving cpu time 🙂
  • Removed: Some unused functions and boring code
  • Bug Fix: Appearance bug in changelog fixed (doh!)


  • Added: Spanish translation (thanks Hector!)
  • Added: Swedish translation (thanks Joar!)
  • Added: Preset option for quick setting of common themes
  • Help me: if you want to add translations please email me!
  • Added: Added a cool carbon fibre background option!
  • Added: Differentiation between market places
  • Bug Fix: When configuring livewallpaper via launcher pro or similar some settings were not automatically updated
  • Bug Fix: Email in the about section will actually fill in my email address, surprise nobody spotted this sooner! Also added some information into each email to help me with issues.


  • Bug Fix: Minor bug in revert to default settings
  • Bug Fix: Minor bug in open application from market or settings


  • Added: Power saver in the reactions menu, can make the wallpaper static when battery reaches a certain percentage.
  • Added: Norwegian translation added (thanks Dan!)
  • Added: Obfuscation for improved efficiency and to help decrease piracy
  • Bug Fix: Glow size was forgotten on screen power off


  • Added: Particle scaling, like the Nexus S live wallpaper
  • Improved: Got sexy transparent menus working again, enjoy!
  • Improved: Dialogs look better on small screens and with different orientations; some screens are now scrollable in the next version this will be replaced with a better solution 🙂
  • Moved: Disable analytics is now in advanced menu
  • Bug Fix: Fixed a FC bug
  • Bug Fix: Using a custom background then renaming the file will no longer cause a FC


  • Added: Option to display FPS on screen (Advanced > FPS)
  • Added: Rotation on battery level
  • Bug fix: Memory leak from using custom backgrounds fixed (hopefully)
  • Bug fix: When Multi-touch option was disabled normal touch would not function
  • Improved: Code backend made more efficient by combining some classes
  • Added: Cool new background called “The Grid”
Read More

Recreating the enigma in python

Whilst on holiday I was challenged by a friend (mikemeat) to create an enigma in python. Here is what I wrote:

# -*- coding: utf-8 -*-  
from random import shuffle,randint,choice
from copy import copy

def shift(l, n): # Method to rotate arrays/cogs
	return l[n:] + l[:n]
class cog: # Simple substitution cipher for each cog
	def create(self):
	def passthrough(self,i):
		return self.transformation[i]
	def passthroughrev(self,i):
		return self.transformation.index(i)
	def rotate(self):
		self.transformation=shift(self.transformation, 1)
	def setcog(self,a):

class enigma: # Enigma class	
	def __init__(self, nocogs,printspecialchars):
		self.oCogs=[] # Create backup of original cog positions for reset
		for i in range(0,self.nocogs): # Create cogs
		# Create reflector
		while len(refabet)>0:

	def print_setup(self): # To print the enigma setup for debugging/replication
		print "Enigma Setup:\nCogs: ",self.nocogs,"\nCog arrangement:"
		for i in range(0,self.nocogs):
			print self.cogs[i].transformation
		print "Reflector arrangement:\n",self.reflector,"\n"
	def reset(self):
		for i in range(0,self.nocogs):
	def encode(self,text):
		for l in text.lower():
			if (num>25 or num<0):
				if (self.printspecialchars): # readability
					pass # security
				for i in range(0,self.nocogs): # Move thru cogs forward...
				num=self.reflector[num] # Pass thru reflector
				for i in range(0,self.nocogs): # Move back thru cogs...
				ciphertext+=""+chr(97+num) # add encrypted letter to ciphertext
				for i in range(0,self.nocogs): # Rotate cogs...
					if ( ln % ((i*6)+1) == 0 ): # in a ticker clock style
		return ciphertext

plaintext="""The most common arrangement used a ratchet and pawl mechanism. 
Each rotor had a ratchet with 26 teeth and, every time a key was pressed, each 
of the pawls corresponding to a particular rotor would move forward in unison, 
trying to engage with a ratchet, thus stepping the attached rotor once. A thin 
metal ring attached to each rotor upon which the pawl rode normally prevented 
this. As this ring rotated with its rotor, a notch machined into it would 
eventually align itself with the pawl, allowing it to drop into position, engage 
with the ratchet, and advance the rotor. The first rotor, having no previous 
rotor (and therefore no notched ring controlling a pawl), stepped with every 
key press. The five basic rotors (I–V) had one notch each, while the additional 
naval rotors VI, VII and VIII had two notches. The position of the notch on each 
rotor was determined by the letter ring which could be adjusted in relation to 
the core containing the interconnections. The points on the rings at which they 
caused the next wheel to move were as follows"""


print "Plaintext:\n"+plaintext+"\n"
print "Ciphertext:\n"+ciphertext+"\n"

# To proove that encoding and decoding are symmetrical
# we reset the enigma to starting conditions and enter
# the ciphertext, and get out the plaintext
print "Plaintext:\n"+plaintext+"\n"

Feel free to tear it apart and show me how much better/easier it could have been!

Read More

Alarm Clock Plugin for Sony Ericsson LiveView uploaded to market

Following my previous two posts about Sony Ericssons LiveView (Quick Review and SDK & development) I have released my Alarm Clock Plugin for Sony Ericsson LiveView!

Find it on the android market:

Would love some feedback from anyone with a LiveView, there must be someone else out there who has one right?

Sony Ericsson LiveView Alarm Clock Plugin

Sony Ericsson LiveView Alarm Clock Plugin

Read More

Sony Ericsson LiveView SDK and my Alarm Clock Plugin

So as I mentioned in a previous post I recently got a Sony Ericson LiveView watch, I decided to download the SDK and have a go at writing a plugin for use with the watch. The SDK is easy to use (developer world) and the examples and documentation (available here) is very clear and easy to understand. Unfortunately there is no emulator so you will have to go to the trouble of owning one of these devices if you want to test your app on it.

There are two types of plugins.
1. Announce plug-in

Announce plug-ins can send announcements to the LiveView™ device. This is done in
the same way as the predefined announce features, like Facebook and Twitter.

Gmail Plugin Emails

Gmail Plugin Emails

The SDK Announce plugin (helloWorldPlugin) example is very simple and and mostly contains code scheduling a timer to send events to the phone along. This is a single class which is supported by a small number of helper classes and the plugin only contains a few things foreign to a typical android application:

Just extend the class provided by the SDK for plugins:

public class HelloWorldService extends AbstractPluginService {

Send updates to the phone using the following function:

mLiveViewAdapter.sendAnnounce(mPluginId, mMenuIcon, header, body, System.currentTimeMillis(), "");

mPluginId – identifies which app send the update
mMenuIcon – the icon the update will appear with
header – the title (IE: email subject)
body – the main text (IE: email text)
timestamp – timestamp of the announcement
link – action to perform when user clicks at end of message (event to occur on phone). This is interpreted by overriding the function below:

	protected void openInPhone(String openInPhoneAction) {
		Log.d(PluginConstants.LOG_TAG, "openInPhone: " + openInPhoneAction);
		// Open in browser.
		final Uri uri = Uri.parse(openInPhoneAction);
		final Intent browserIntent = new Intent();
		browserIntent.setClassName("", "");

2. Sandbox

The sandbox plug-in can take complete control of the LiveView™ device by sending
images to it and control its ability to vibrate and display different colors on the LED. All
user activities are propagated to the plug-in, so that it can take appropriate actions.

Contact Call Plugin

Contact Call Plugin

We extend the same class however this time we say yes when we are asked if we are a sandbox plugin:

	protected boolean isSandboxPlugin() {
        return true;

So now rather than using sendAnnounce to send text to the liveview we directly send images. Below is a function used that draws some text to a bitmap and then sends it to be displayed.

    public static void sendTextBitmap(LiveViewAdapter liveView, int pluginId, String text, int bitmapSizeX, int fontSize) {
        // Empty bitmap and link the canvas to it
        Bitmap bitmap = null;
        try {
            bitmap = Bitmap.createBitmap(bitmapSizeX, fontSize, Bitmap.Config.RGB_565);
        catch(IllegalArgumentException  e) {
        Canvas canvas = new Canvas(bitmap);

        // Set the text properties in the canvas
        TextPaint textPaint = new TextPaint();

        // Create the text layout and draw it to the canvas
        Layout textLayout = new StaticLayout(text, textPaint, bitmapSizeX, Layout.Alignment.ALIGN_CENTER, 1, 1, false);
            liveView.sendImageAsBitmap(pluginId, centerX(bitmap), centerY(bitmap), bitmap);
        } catch(Exception e) {
            Log.d(PluginConstants.LOG_TAG, "Failed to send bitmap", e);

So we can create a similar function drawing whatever we want to a bitmap and then passing it onto the screen.

Only one thing left (I think). Intercepting button presses:

	protected void button(String buttonType, boolean doublepress, boolean longpress) {

Where the the following buttons are defined:

  • PluginConstants.BUTTON_UP
  • PluginConstants.BUTTON_DOWN
  • PluginConstants.BUTTON_LEFT
  • PluginConstants.BUTTON_RIGHT
  • PluginConstants.BUTTON_SELECT

and we can see if the were tapped or held down with the boolean longpress. Note that we cannot detect longpresses of select as that will exit your plugin and the power button at all as that controls the screen.

My Attempt at a plugin: Alarm Clock
So I thought given that this thing is pretty much a watch, it would be useful to be able to set an alarm with it.

Plugin Icon

Plugin Icon

12hr clock (select sets alarm)

12hr clock (select sets alarm)

24hr clock

24hr clock

Unfortunately I don’t think it is possible to set the alarm programatically in android in versions prior to gingerbread (posted a stackoverflow question about it). So the user base is very limited, only users with gingerbread and higher with a LiveView will be able to use it so I don’t expect a massive response. Also I have no idea if this will work with non-stock alarm clock apps as I’m not aware of any manufacturers modification of gingerbread as of yet.

The LiveView application on the phone handles links to all the shared preferences for the plugins (they’re mandatory just for the enable/disable option) but an example is included in all the examples and it is very simple to just add more options to the preferences.xml and grab them in the code.

LiveView plugin settings

LiveView plugin settings

Alarm set via plugin

Alarm set via plugin

If you want more info please read the documentation linked at the start of this post. I will probably release the liveview alarm clock plugin onto the market soon, but I don’t expect the reception to be that good as it will only work on a few phones / tablets. Anyway I had fun programming for mine, enjoy!

Read More