Android

My last post discussed updating the host file on Andriod. After doing a bit more tweaking I wrote a script which can be downloaded at the end of the article or created from the code below. The script will automatically download the latest hosts file from mvps.org and install it. It requires to be run as root and under the assumption that /sdcard exists as a storage location. Remember also to set the script permission to 700. The script can also be added to the crontab so you don’t have to worry about it again. (Next article will go over setting up crond and crontab on Android)

The Script:

#!/system/bin/sh

#Remount /system RW
mount -o remount,rw /system

#Make copy of current hosts file if backup does not exist
#Comment out this block if you have installed mvps.org hosts file before making backup
if [ ! -f /etc/.etchosts ]; then
cp /etc/hosts /etc/.etchosts
fi

#Check and create tmp dir if required
if [ ! -d /sdcard/tmp ]; then
mkdir /sdcard/tmp
fi

cd /sdcard/tmp
wget http://winhelp2002.mvps.org/hosts.txt
cat hosts.txt > /etc/hosts
rm hosts.txt

#If you need to add lines to host file
#make changes to /etc/.etchosts
#and uncomment next line to enable appending to hosts
#cat /etc/.etchosts >> /etc/hosts

#Remount /system RO
mount -o remount,ro /system

Download:

android_update_hosts.zip
sha256sum 95256b28deee2cbcd418f51ed6e358d42b7651bdbcc955521457dc370e5c537a android_update_hosts.sh

Do you use an Android device for office productivity or just copy and paste a lot of data? Perhaps you want to copy something on one device and paste it on another or just later on paste something you had previously copied.

A clipboard manager could prove to be a useful utility. Clipper Plus with Sync offers clipboard management features like history, ability to edit or clear the clipboard, save commonly pasted strings to snippets that can easily be copied onto the clipboard with a single tap. When the sync plugin is installed the clipboard syncs between devices and can also be accessed via ClipperSync website enabling copying over to computers.

Clipper Plus with Sync and the Sync Plugin can be downloaded from the Google Play Store for a small fee, or there is just Clipper,a limited free version that works without sync and has a max history of 20 clippings.