How to Change Wifi Host Name of Your Android Device

Most of the ROMs (except CM) whether it be stock or any, don’t have a setting to change the host name of your Android device. Read on to know how to change it.

When you have a common wifi network between your desktop and mobile, it rather makes sense to have a proper host name for your phone instead of accessing it every time by the IP address. This is typically useful if you want to control your phone from your control using AirDroid for example. Chat using Texts. While most routers have an option to set host name for a specific MAC ID, but on some networks you might not have control, for example your office network.

The process is very simple, but you need a rooted device. If you have not rooted it yet, check XDA forums. I can’t help you in that. Also, you would need the Android SDK (mainly adb and the device drivers for your phone).

    • Turn on USB Debugging in developer options.

    android_usb_debugging

      • Connect it to your computer
      • Open terminal
      • Run adb pull /system/build.prop
      • Now edit build.prop (saved in the directory you executed the command) and add the following line:

        • Run adb push build.prop /sdcard (or /mnt/sdcard, if it fails).
        • Run adb shell and type the following commands:

        • Run adb reboot.
        • Enjoy

        24 thoughts on “How to Change Wifi Host Name of Your Android Device”

        1. Worked on XPERIA Z1 , CHINA TABLET A13 (rom MAXPAN 713) (used totalcommander with root privileges to copy/edit buildprop file without adb)

        2. Alternatively, you can use this once you’ve edited the build.prop file
          adb root (this restarts adbd as root)
          adb remount (this makes reading/writing from the /system area possible)
          adb push build.prop /system/build.prop

        3. Thank you for this. I knew it had to be in a config somewhere. My Nexus 4 was already rooted so i just downloaded a terminal app, granted it sudo rights with SuperSu, mounted as writable, made a backup copy of the file, added that line to the end (without the angle brackets) in vi, then saved and re-mounted and rebooted my phone and it worked perfect. Thanks a ton for the writeup! Although i might not suggest this to newbies to programming. If your phone “won’t boot” then you must likely made a simple mistake. But if you didn’t backup the file and you don’t know how to restore it from a terminal in fast-boot mode, then you could be toast.

        4. This fucked up my phone. It wouldn’t be able to get past the company branding of my carrier. >.> Thanks a lot. replacing the original build.prop won’t fix shit either.

          1. Ouch. The simplest solution for you now would be to get your phone’s ftf from xda and flash it. You would need titanium backup for backup and restore your data.

            But the funniest part is how it didn’t work for you. I did this on two phones of mine and it worked for me.

            If you have CWMR (or any other recovery), try wiping dalvik cache and reboot. It should solve the problem.

          2. Perhaps this had to do with the end line character? I’m just brainstorming here but if this is done on a Windows machine perhaps this^ build.prop had incompatible characters?
            EDIT: Looks like someone mentioned this further down in the comments

          3. I had the same problem as you. The issue turned out to be caused by the permissions on the file I pushed. it should be -rw-r–r– not -rw-rw-r–

        Leave a Reply