Here’s a quick tip that is invaluable when debugging your communications with a web service from a device (in my case and Android phone) that is on you network. This of course requires that you have root access on your routing device…I use a WRT54G running DD-WRT.
Here it is:
iptables -t mangle -A POSTROUTING -d 192.168.0.50 -j ROUTE –tee –gw 192.168.0.100
iptables -t mangle -A PREROUTING -s 192.168.0.50 -j ROUTE –tee –gw 192.168.0.100
…where 192.168.0.50 is the address of my Android device and 192.168.0.100 is the address of the computer I want the traffic mirrored to. On my computer I’m running Wireshark which will now receive any traffic to or from my Android device. Everything will work as normal except that now the gateway computer can sniff all the Android’s traffic!
Thanks to the original poster for a great tip! (http://www.question-defense.com/2010/02/04/use-wireshark-and-dd-wrt-router-firmware-to-imitate-port-monitoring-on-a-router-switch-port)
I’ve had a couple of people recently asking me if it was necessary to pay for an Android app twice. Meaning if they buy an app on their Android phone, do they have to pay again in order to download the same app onto one (or all) of their other Android devices. The answer is, it depends. It is possible to only pay once and install on multiple devices, but it requires that you use the same Gmail account on both devices. This, of course, is no problem unless you want to keep the data (emails, contacts, etc) in that account private.
Solution? Create a separate Gmail account just for use with the Google Play store and keep your personal Gmail account private. Here are the steps…
I was just trying to create a web server application and ran into this, so I thought I’d share it. I wanted to run my Android web server on port 80 (since that’s where web servers usually run), but I kept getting a BindException saying “Permission denied”. Note that ServerSocket, of course, requires android.permission.INTERNET in your manifest. After a little digging, I’ve learned that ports 1-1024 are protected and only accessible by root (pretty much eliminating them for any app that you want to make widely available, since most people don’t have rooted phones. To get around this, of course, all you have to do is use a port greater than 1024…I was just hoping to cut down on the amount of typing when connecting to my web server from a browser…oh well.
I just recently upgraded to the new Samsung Galaxy S II (or Epic 4G in Sprint speak), and today I’m posting my first video about the phone. I’m really liking the Galaxy S II, mostly because of it’s beautiful, large AMOLED screen—it truely is very pretty!
It’s not something you need to do everyday, but when you’re locked out of your phone, knowing how to do a hard reset is crucial. So with that, here are the steps to perform a factory reset on the Samsung Galaxy S II Android phone.
Note: Remove your SD card. I know some people say this is optional and in my experience it is technically optional. But here’s the thing, I’m not interested in taking any chances when it comes to my data. I keep my contacts backed up on my SD card as well as store pictures, documents, etc, and I’m not going to take a chance on loosing them.
If any of that is unclear, hopefully this video will help clear things up…