Stealthcopter

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

Features

  • 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

device-2014-03-04-005315

device-2014-03-04-005228

device-2014-03-04-005701

device-2014-03-04-005021

device-2014-03-04-005151

device-2014-03-04-005900

Download

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 blockchain.info 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.

Blockchain.info stops all UK Deposits

Blockchain.info 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 localbitcoins.com. 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: (http://www.droidcon.co.uk)

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

Follow Droidcon London 2011 on Facebook: http://www.facebook.com/groups/droidconuk/

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)

qr

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)

qr

Full changelog (since last blog post at version 1.98.01)

1.98.14

  • 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

1.98.12

  • 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!)

1.98.10

  • 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.

1.98.09

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

1.98.08

  • 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

1.98.07

  • 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

1.98.05

  • 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
alphabet=range(0,26)

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):
		self.transformation=copy(alphabet)
		shuffle(self.transformation)
		return 
	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):
		self.transformation=a

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

	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):
			self.cogs[i].setcog(self.oCogs[i])
			
	def encode(self,text):
		ln=0
		ciphertext=""
		for l in text.lower():
			num=ord(l)%97
			if (num>25 or num<0):
				if (self.printspecialchars): # readability
					ciphertext+=l 
				else:
					pass # security
			else:
				ln+=1
				for i in range(0,self.nocogs): # Move thru cogs forward...
					num=self.cogs[i].passthrough(num)
					
				num=self.reflector[num] # Pass thru reflector
				
				for i in range(0,self.nocogs): # Move back thru cogs...
					num=self.cogs[self.nocogs-i-1].passthroughrev(num)
				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
						self.cogs[i].rotate()
		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"""

x=enigma(4,True)
#x.print_setup()

print "Plaintext:\n"+plaintext+"\n"
ciphertext=x.encode(plaintext)
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
x.reset()
plaintext=x.encode(ciphertext)
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:
https://market.android.com/details?id=com.stealthcopter.liveview.plugins.alarmclock

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(), "http://en.wikipedia.org/wiki/Hello_world_program");

Where:
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:

@Override
	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.setData(uri);
		browserIntent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
		browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		startActivity(browserIntent);
}

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:

    @Override
	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) {
            return;
        }
        
        Canvas canvas = new Canvas(bitmap);

        // Set the text properties in the canvas
        TextPaint textPaint = new TextPaint();
        textPaint.setTextSize(fontSize);
        textPaint.setColor(Color.WHITE);

        // Create the text layout and draw it to the canvas
        Layout textLayout = new StaticLayout(text, textPaint, bitmapSizeX, Layout.Alignment.ALIGN_CENTER, 1, 1, false);
        textLayout.draw(canvas);
        
        try
        { 
            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:

@Override
	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

Conc
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

Sony Ericsson LiveView Watch (Quick Review)

So about a week ago I decided to treat myself to a Sony Ericsson LiveView. It’s basically a watch with a 128×128 pixel screen that can display images/text sent from the phone. There are a few builtin apps that use this to send information to the phone (text messages etc.) and also an SDK is avaliable for developers to make further use of this device. Anyway here is a quick review of the device, I’ll post again soon with information about the SDK and developing a plugin.

Sony Ericsson LiveView Watch

Sony Ericsson LiveView Watch

Bluetooth connection
Well this is the major downfall of the device, it cannot hold a bluetooth connection very well with my phones (Nexus One and Desire HD) and constantly requires you to pull your phone out of your pocket to scan for bluetooth devices, pair with it, disconnect and reconnect in the LiveView program, restart your phone, or turn watch off and on in pairing mode.

LiveView lost connection

LiveView lost connection

This problem was significantly worse before installing the firmware update onto the LiveView (something which I strongly suggest as now it is only half as buggy). However the firmware update for this LiveView will only work on a Windows machine boo!!!

I’ve checked around a few forums and found that the bluetooth connection issues seem to be phone specific with the sony ericsson phones performing much better.

Builtin apps

  • Text messages – shows text messages you have received
  • Find phone – plays a sound on phone so you can find it… would be useful if I didn’t have to find my phone first to accept the pairing request!
  • RSS – not tested this, obvious what it does though
  • Missed calls – shows any missed calls you’ve had
  • Music control – volume control, next/prev, play/pause and sometimes displays current track name/artist

Plugins
There is a fairly complete list of plugins avaliable for liveview on the sony ericsson blog: blogs.sonyericsson.com. There aren’t too many apps available so it’s quite easy for devs to find something that hasn’t been done before with the liveview.

All the ones I’ve tried are quite good and function well but are perhaps not as ascetically pleasing as they could have been but I’m not going to complain about that.

Ones I’ve tried:

  • Gmail – Alerts you to new gmails and lets you read a snippet
  • Calendar plugin – Monthly view and agenda
  • Contact call – Browse contacts and intiate a call, I managed to accidentally call someone using this leading to much hilarity…
  • Binary clock – A binary clock, quite fun for geeks

Update issues
Most of the functions in the watch are for updates; tweets, text messages, emails etc… Unfortunatly many of these ‘plugins’ do not update properly, only showing updates that occurred whilst the watch was actively connected which means according to LiveView the last text I receive was 4 days ago… but I have had several since then… don’t think it would be very hard to fetch this information.

Lack of update for 4 days

Lack of update for 4 days

Just as a watch
So I decided I’d give this device a chance of working solely as a watch for a day.

The battery life quite good, still shows a full battery icon after 9 hours, which isn’t that shocking as the screen is only turned on when you want to know the time and it seldom requires to use bluetooth. I do wonder if it actually keeps track of the time onboard or if it keeps syncing (I suspect it doesn’t sync due to battery life and troubles syncing when using functions).

Conclusion
I’ve really tried hard to like this device but it really isn’t making it easy for me. I would recommend it if:

  • You’re a developer with a sony ericsson phone
  • Or the fun of writing an app will overwhelm the annoyance of constantly repairing

I wouldn’t recommend it if:

  • You’re an end user, looking for a cool watch
  • You’re need to rely on your watch to function
  • You want your watch to have all the standard functions
  • You don’t like re-pairing bluetooth devices repeatedly

Next
In my next post I’ll talk about the LiveView SDK and creating a LiveView plugin.

Read More

Received a box of 16 dead zebra android collectibles from funky peanut

As we end the first financial year for Stealthcopter Technologies the staff are treated (for tax purposes) to a box of 16 dead zebra collectibles.

Box of 16 dead zebra android collectibles

Box of 16 dead zebra android collectibles


16 dead zebra android collectibles unboxed

16 dead zebra android collectibles unboxed

The Cupcake one actually smells of cupcakes!!! amazing!

We actually ordered the last box (sorry!) of 16 from funkypeanut.co.uk for just over £100 including delivery, singles are still available though. There were actually some issues with paypal when checking out for this, but the admin of the store sent an email shortly afterwards to sort it out manually, great customer service!

Read More