What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Droid 4 Wifi Hostname

K.ZIMM

New Member
Found a method for a different phone that also works for the Droid 4. Original post is here [SCRIPT] Change Hostname - xda-developers.

This is handy if you have multiple android devices connected to your router. Instead of cryptic names, you can change them to something more easily identifiable.

This does require root.

Using Script Manager, add the following code to run as SU and on start-up.

Code:
#!/system/bin/sh#change devName to whatever you want.
devName=Droid4


if [ "$(/system/xbin/hostname)" = "$devName" ] && [ "$(getprop net.hostname)" = "$devName" ]
then
    echo "Device hostname does not need to be changed."
else
    echo "Device hostname is being changed to $devName."
    /system/xbin/hostname $devName
    setprop net.hostname $devName
    if [ "$(/system/xbin/hostname)" != "$devName" ] && [ "$(getprop net.hostname)" != "$devName" ]
    then
        echo "Device hostname has not been changed."
    else
        echo "Device hostname has been successfully changed."
    fi
fi

QR Code for Script Manager

http://qrcode.kaywa.com/img.php?s=8&d=http://pastebin.com/raw.php?i=C76ZjxdQ
 
Back
Top