Remount the Android filesystem as read-write (rw) to edit the hosts file for localhost mobile development


You will need superuser permissions for this one!

Grab a SSH server from Google Play. I use SSHDroid on my tablet and phone.

If you need to make changes to the system files (like, for instance, if you need to edit /etc/hosts) you’ll need to remount the drive as read-write. Type this:

mount -o remount,rw /system

Add whatever lines you need…

192.168.1.15  somesite.com.localhost  www.somesite.com.localhost

And you should be able to connect your phone/tablet’s browser to your local development server.