tcpdump on Android

September 11, 2011 2 comments

I’m interested in intercepting the data my Android device is sending – I use Wireshark under windows, using winPcap to capture packets.

WinPcap consists of a driver, that extends the operating system to provide low-level network access, and a library that is used to easily access the low-level network layers.

http://www.winpcap.org

WinPcap is based on libpcap, a linux tool that’s been ported to Windows.

porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed

http://en.wikipedia.org/wiki/Porting

Linux Kernel, Linux tools?

Android has a linux kernel, so surely there must be a libpcab based tool out there to capture packets?

tcpdump is a command line tool for linux that can capture and analyse packets from the console, or write them to a file. Luckily, the files generated are compatible with Wireshark, being based on the same packet capture software.
The only issue now is to find a version made for Android.. I know some basic shell command like cat, grep, ls, but not enough to do my own Android cross compile..

Strazzere.com

So I was searching around for a tool and came across Strazzere.com – A site about Android and software engineering, and very kindly they host an Android version of tcpdump. It’s based on

tcpdump version 3.9.8 libpcap version 0.9.8

and the latest versions are 4.1.1 and 1.1.1 respectively, so it’s a little out of date, but fully functional.

Installation

So this probably only works if you have root – I have root, and I’m afraid I’m not going back to stock to test it. I have VillainRom 2.4.2 and these instructions are based on the steps I’ve taken to get packet capture working.

You need the Terminal Emulator installed, or you can run the same commands from the ADB shell on your computer, but this post is specifically about the terminal.

Download the file from your phone, so now the tcpdump file is on the handset. In this example, the file is stored in /sdcard/data/

The commands, file and directory names are all case sensitive, so tcpdump is NOT the same as TCPdump.

Terminal

Just cp file to bin and chmod

Now, in the terminal type;

  1. su
  2. mount -o remount,rw /system
  3. cp /sdcard/data/tcpdump system/bin
  4. cd system/bin
  5. chmod 777 tcpdump
  6. mount -o remount,ro /system

To explain the commands; you need to request root, set /system as read-write, copy tcpdump to /system, give it read/write/exec permissions and finally remount /system as read-only.

Packet Capture

Finally, you’re ready to capture some packets. In terminal window, type;

tcpdump -vv -s 0 -w /sdcard/tcp.cap

-vv puts tcpdump into verbose mode – to give us some extra information
-s 0 sets the size of sender to look for to zero, telling the program to grab all packets
-w /sdcard/output.cap will let us set the packets grabbed to be written to the sdcard for analysis later.

http://strazzere.com/blog/?p=286

and all packets will be logged to tcp.cap – Ctrl+C ends capture. This can be done with volume down and C in the emulator.

tcpdump in the Terminal window

Categories: Android, Software Tags: , ,

Quidco App for Android is out of Beta!

September 8, 2011 Leave a comment

The Quidco App for Android has finally lost it’s Beta status, and version 1.1.0 is now available from the Android Market or visit Quidco.com/app.
If you’re not already a Quidco member, read my post and sign up!

v1.1.0

Quidco app for Android is released!

So the Quidco app moves from this early Beta, to full release version, and quickly to v1.0.2 – although the Whats New tab on the web based android market says nothing has changed, the Recently Changed section on the mobile version of the market shows crash fixes.

Using The Quidco App

Sign Up Or Sign In

Load the app, and you will be asked to sign-in with your Quidco details, or to join the Quidco service.
The first time you sign-in, you will be asked to enable Location Sources –  both Network and GPS are required for full functionality.

Location

If you choose not to enable your location, you can still choose from a general list of places.

Device Association

Again, the very first time you run the app you will be asked to associate your device with your Quidco account.
You have to enter the code exactly – if you enter it incorrectly, you will be given several more attempts. If you appear to be stuck, make sure your keyboard doesn’t automatically capitalise the first letter.

If you sign out, it will not ask you to associate again when you sign-in.

Nearby Deals

Click Nearby to be shown a list of deals and in-store cashback offers ordered by distance from location.

At the top, select Map to be taken to a fully interactive Google map with each deal a pin in the map. Click one of the deals to be given it’s name, and again to view the full details.

The Pizza Hut deal for example is a discount voucher, which gives clear instructions for use, and T&C in the details tab.

Account Settings

Under the central option in the bottom bar, My Quidco allows you to view your most recent activity and change your account settings.

You can choose to hide Gambling offers, Hide 18+ offers, and modify your in-store cashback settings, and even register a card if you’re not yet set up.

 

Smart Shopping

With digital vouchers, and  in-store cashback, the Quidco mobile app is a convenient way to earn and to save money in the real world.
Download the app, try it out today!

 

Quidco App for Android Updated – v1.0.8

September 3, 2011 Leave a comment

A new version of the Quidco App for Android has been released to the Android market.

v1.0.8

Quidco App Updated

This update resolves the following issues.

  1. fixed crash when map location shown on Motorola devices
  2. fixed category icons not displaying on some devices
  3. fixed gender toggle style on settings page
  4. fixed gambling/adult style on settings page
  5. fixed error feedback messages on settings page
  6. fixed filters not retaining previously set state
  7. potential fix for crash when loading maps on some devices
  8. potential fix for crash when viewing vouchers on some devices
  9. added greyed out checkbox to filter page to make filters more clear
Categories: Android, Beta, Patch, Quidco, Software Tags: , , ,

Java Runtime Environment 7 – JRE 1.7 – Updated

August 31, 2011 Leave a comment

A new version of the Java platform is out, 1.6 update 27 has been superceded by a minor version increment to 1.7
These Release Notes detail why you need Java.

The Java SE Runtime Environment contains the Java virtual machine,
runtime class libraries, and Java application launcher that are
necessary to run programs written in the Java programming language.

However, if you check your current Java version, you will not see the option to install this latest update.

Java 7

Incorrect Java Version

A notice on the site informs you why.

Why is Java SE 7 not yet available on java.com?

The new release of Java is first made available to the developers to ensure no major problems are found before we make it available on the java.com website for end users to download the latest version. If you are interested in trying Java SE 7 it can be downloaded from Oracle.com

Keep an eye out for the general release and update as soon as you can.

Quidco App for Android Updated – v1.0.7

August 31, 2011 Leave a comment

A new version of the Quidco App for Android has been released to the Android  market.

v1.0.7

Quidoco App for Android Updated - v1.0.7

This update resolves the following issues.

  1. fixed crashes on devices with no location services enabled
  2. potential fix for crashes on settings tab on some devices

Want To Know More About Quidco?

Read my post on Quidco – how it works and why you should sign up.

Busbi Bolt 16GB USB 3 Flash Drive Review

August 31, 2011 4 comments

Busbi Bolt USB 3 / USB 2 16GB Review

The Busbi Bolt is a USB 3.0 and USB 2.0 compatible flash drive.
Today I’m reviewing the 16GB version and testing the speed in USB 2 and USB 3 mode.

Busbi Bolt 16GB USB3

First Impressions

I can’t tell you much about the Busbi brand, but it’s probably just a repackaged OEM device, which isn’t necessarily a bad thing. If the memory chips and the controller are good enough, why should it matter who fabricates them?

The Bolt feels robust and light when first released from it’s blister pack. The surface on which the Busbi logo is printed has a different feel from the plastic outer, it’s almost rubberised, and tactile enough to provide grip when inserting and removing.
There is a brilliant blue LED that also illuminates the transparent base. The base houses a metal loop for a lanyard, although one is not supplied.

Gallery

#1 – Retail Front

Retail Package Front

#2 – Retail Rear

Retail Packaging Rear

#3 – Blue Illumination

Blue Illumination When In-Use

Free Space

Windows detected the drive without requiring drivers, my system runs windows 7.

Windows shows the drive as a 14.9GB capacity.

16GB is 14.9GB Free Space

This is the same for every device, it is not a fault with your drive.

A device advertised at 16GB is actually 16 billion bytes or 16,000,000,000 bytes.
On your packaging somewhere is should say 1KB equals 1000 Bytes.

In reality, 1KB is 1024 Bytes, so your real capacity is less. To calculate what size you should get, take your 16 billion Bytes, divide this by 1024 to get the number of Kilobytes.
Divide again for Megabytes, and again for a Gigabytes.. 14.9011..

Speed Test

On the back of the packaging, Busbi claim this drive will operate at of 20MB/sec read and 10MB/sec write through USB 2 and they claim 50MB/sec read speed and 20MB/sec write speed through USB 3.

USB2 - 20MB/10MB sec USB 3 - 50MB/20MB sec

The Software

The software I’m using to test the Busbi Bolt has changed in version only, from previous flash drive tests.
The physical way in which the drives are tested is relatively unchanged – a file is written to the drive and verified, and the read and write speeds are calculated.

You can download the test software yourself, from the following locations.

CheckFlash by Misha Cherkes version 1.16.2
Barts Stuff Test version 5.1.4
Crystal Disk Mark version 3.0.1b – available in 32 bit and 64 bit versions.

The test system is a custom-built i7 930 with 6GB ram, running windows 7 x64.
The flash drive is formatted to NTFS to allow a full drive read write test.
FAT32 has a file size limit of 4GB
.

Check Flash – USB 2

Check Flash is set to complete 3 passes of the Small Pattern Set read write test.

#1 – Nearing end of 2nd cycle

Check Flash coming to end of 2nd cycle.

#2 – Check Flash finished 3rd cycle

Check Flash Finished Testing

Our final values for USB 2 testing with Check Flash are 32.94 MB/sec read and 17.94 MB/sec write.

Check Flash – USB 3

Check Flash is set to complete 3 passes of the Small Pattern Set read write test.

#1 -Check Flash 1st cycle

Testing USB 3 In-Progress

#2 – Final Check Flash results

USB3 - 52.76MB/sec read 18.02MB/sec write

Our final values for USB 3 testing with Check Flash are 52.76 MB/sec read and 18.02 MB/sec write.

Where To Buy?

Shop through Quidco for cashback at Play.com. Right now, the Busbi Bolt is only £15 from Play.com with free delivery.

or use code DSTORE10 at Currys (UK) for 10% off and free delivery.

£13.49 with 10% off and free delivery

Seen a better offer? Post a comment!