Posts

How I brute-forced my own keystore password

How I brute-forced my own keystore password If, like me, you've been in the unfortunate siutation where you have forgotten your own keystore (or certificate key) password then help may be at hand. After some fruitless searching I decide to write my own piece of software to brute force my keystore certificate.  As I am/have been a Java programmer I decided to write it in the language I knew best, and this is how I did it. I have made the  source code  available for anyone who wants it Loading the keystore The Java API already has code for loading a keystore, java.security.KeyStore.  The keystore needs to be placed on the classpath (I just stuck it in the root on my Eclipse project) // Load the keystore in the user's home directory File file = new File(keystoreName); is = new FileInputStream(file); KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); keystore.load(is, keystorePassword.toCharArray()); return keystore; The above code sim...

Installing and using mobilize.js to transform a desktop site to a mobile site

Image
Installing and using mobilize.js to transform a desktop site to a mobile site mobilize.js offers a neat and simple method of creating a mobile optimised website with very little change to the main desktop site. With a few lines of javascript and some css you can create a mobile optimised site without having to maintain 2 different sets of content. However the instructions on the official site aren't the best. So with some digging I managed to transform - From this (Firefox on my laptop): To this (Android browser on my Samsung Galaxy Nexus): with no html changes other than adding some <script> tags to the <head> element.  Plus automatic browser detection to display either site depending on the browser used - mobile, or desktop Here are some step-by-step instructions on getting it working. Why would you want to? So going back to the beginning, these were my requirements:  I wanted to create a mobile optimised site but, as I already ...

How to add AdWhirl to an Android app (part 2)

After my earlier post, I found another way of doing this which relies on setting the ad placement in a layout.  This also is pretty easy As I was getting poor results from AdMob I decided to add AddWhirl to my android app so I could use multiple ad providers.  Little did I know that the documentation for AdWhirl was going to be so bad!  A google search didn't help much, just lots of other people wanting to do the same and getting stuck or confused.  The official instructions didn't help much (https://www.adwhirl.com/doc/android/AdWhirlAndroidSDKSetup.html) - as soon as I had started I got a compile error because of something ommitted from the instructions. So I set out to solve the problem on my own. 1. Set your app up on your chosen Ad provider website (or multiple, but for this explanation I'll go with Admob).  You'll need the ID 2. Set your app up on the AdWhirl website.  Add the ad provider (in this case AdMob) and enter the ID.  Switch it ...

How to add AdWhirl to an Android app (with decent instructions!)

As I was getting poor results from AdMob I decided to add AddWhirl to my android app so I could use multiple ad providers.  Little did I know that the documentation for AdWhirl was going to be so bad! A google search didn't help much, just lots of other people wanting to do the same and getting stuck or confused.  The official instructions didn't help much ( https://www.adwhirl.com/doc/android/AdWhirlAndroidSDKSetup.html ) - as soon as I had started I got a compile error because of something ommitted from the instructions. So I set out to solve the problem on my own.  In the end the solution was pretty easy: 1. Set your app up on your chosen Ad provider website (or multiple, but for this explanation I'll go with Admob).  You'll need the ID 2. Set your app up on the AdWhirl website.  Add the ad provider (in this case AdMob) and enter the ID.  Switch it on!  You'll need the AdWhirl ID later, but not the AdMob one as AdWhirl handles that for you ...

Removing default apps from a rooted android phone

I recently needed to remove some of those rubbish default apps you get on android phones. You know the ones, the ones that come with the phone but you can't uninstall.  It is especially annoying if you don't ever want to use them and they are taking up loads of space on your phone because you have an Android version prior to Froyo (2.2) so apps can't be installed to the SD card One of my phones (a Sony Ericsson Xperia X8) is on Android 2.1 and I want it stay on that OS, but it was running out of memory.  I already rooted it some time back, and a quick google search came up with this great guide: http://androidadvices.com/remove-default-applications-rooted-android-phones/ I have one thing to add though, which is why I am writing this.  Once I'd uninstalled FourSquare, Facebook, Stopwatch, Planet3 and loads of other stuff I didn't want, I was surprised that they still showed as installed.  So I checked again with the article above, nope, definitely gone. ...

Using RoboGuice with BlackBerry Android Runtime

I have recently been porting Android application to run on the new BlackBerry Tablet OS 2.0 which includes an Android 2.3 runtime.  However, one of my apps kept failing the BlackBerry packager checks because: 3 uses-package com.google.android.maps However my app wasn't using it, and a search of my code didn't reveal any uses of it either. It turns out that, because I was using RoboGuice, which has a MapActivity, the BlackBerry packager was picking that up, even though I wasn't using it. The only solution I could think of was to unpack the roboguice jar, delete the MapActivity class, then repackage it.  Then the BlackBerry packager was happy! Hope this helps someone