[HowTo] Change the name of your device for Bluetooth pairing

  • Infrastructure

    If you are using Bluetooth you might have noticed that there is something odd about the device name. It is set statically to "XY Ubuntu Edition" or "FP2" or whatever. On the Oneplus, its currently even wrong, indicating "FP2".

    So if you for example share a family car, and there are more UT users. how can they distinguish their phones in the carkit? And so on...

    We are aware of this problem and will try to fix it in upcoming releases. Meanwhile you can apply the following fix. So, lets once more hack the system...

    This time its really simple. You need to type those commands on your PC in a shell window, not on the phone itself:

    1. Open an adb shell into your phone: adb shell
    2. Gain root privileges by typing sudo -i and entering your unlock PIN or password
    3. Remount the root file system writable: mount -o remount,rw /
    4. edit the config file that is responsible: nano /etc/machine-info
    5. Change the PRETTY_HOSTNAME field to whatever you like. I recommend though to not use special characters. Spaces are OK!
    6. Reboot the phone

    Note: After rebooting the phone is set to readonly again, so in case you want to change the name later you need to follow the whole procedure again.

    This should be all that is necessary to give you a rocking unique Bluetooth name!

  • @flohack good guide as always.

    I have two suggestions (if you don't mind the insolence :-D) :

    • Advanced users will want to use vi but for newbies is better nano
    • It is not clear that after rebooting the phone, the system will be read-only again

  • Infrastructure

    @advocatux Ok done ;)

Log in to reply

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.