Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Support
    flo hacks
    6
    10
    2043
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Flohack
      Flohack last edited by UniSuperBox

      Motivation
      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...

      How
      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!

      My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

      advocatux Keneda 2 Replies Last reply Reply Quote 3
      • advocatux
        advocatux @Flohack last edited by

        @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
        Flohack 1 Reply Last reply Reply Quote 0
        • Flohack
          Flohack @advocatux last edited by

          @advocatux Ok done πŸ˜‰

          My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

          1 Reply Last reply Reply Quote 0
          • mihael
            mihael last edited by

            I believe this changes also the name displayed when connecting to a wifi TV...

            1 Reply Last reply Reply Quote 0
            • advocatux
              advocatux last edited by advocatux

              @Flohack helping a user in the Welcome & Install group today, after a fresh UT install, he said the content of /etc/machine-info was only CHASSIS=handset

              I told him to add the PRETTY_HOSTNAME line before that other line but I want to know if this is normal or not (to add it to this HowTo). Has anyone encountered the same issue?

              Edit to add that this user tells me now:

              After installation i run the normal setup (language, location, wlan, name), setup a security code, enabled the developer mode, testet adb-onnection and have try to mount (MTP) the device for ssh-key transfer. After solving the usb-problem i follow your bluetooth howto.

              So maybe one of those steps changed the machine-info file.

              1 Reply Last reply Reply Quote 0
              • N
                nutzernam last edited by

                @advocatux i tried it today on my OPO with (15.04 r3)

                My machine-info has the PRETTY_HOSTNAME field

                advocatux 1 Reply Last reply Reply Quote 0
                • advocatux
                  advocatux @nutzernam last edited by

                  @nutzernam thank you for confirming it.

                  1 Reply Last reply Reply Quote 0
                  • K
                    kugiigi last edited by

                    Is rebooting necessary for this to take effect?

                    Flohack 1 Reply Last reply Reply Quote 0
                    • Flohack
                      Flohack @kugiigi last edited by

                      @kugiigi yes I think

                      My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                      1 Reply Last reply Reply Quote 1
                      • Keneda
                        Keneda @Flohack last edited by Keneda

                        @flohack said in [HowTo] Change the name of your device for Bluetooth pairing:

                        We are aware of this problem and will try to fix it in upcoming releases.

                        @kugiigi said in [HowTo] Change the name of your device for Bluetooth pairing:

                        Is rebooting necessary for this to take effect?

                        @flohack said in [HowTo] Change the name of your device for Bluetooth pairing:

                        @kugiigi yes I think

                        So i guess it's not fixed yet ^^

                        One question though :

                        @flohack said in [HowTo] Change the name of your device for Bluetooth pairing:

                        You need to type those commands on your PC in a shell window, not on the phone itself:

                        Why can't it be done directly from the device using terminal?

                        2015-Now : Meizu MX4 (ubp OTA-23) for daily use
                        Spare : Nexus 5

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post