UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Cannot use adb because of unauthorized device [worked around]

    Scheduled Pinned Locked Moved Support
    18 Posts 5 Posters 7.8k Views 1 Watching
    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.
      • M Offline
        MotoFckr9k
        last edited by MotoFckr9k

        Hello

        I am trying to follow the anbox installation manual http://docs.ubports.com/en/latest/userguide/dailyuse/anbox.html#how-to-install
        But cannot run adb shell:

        motofckr9k@MotoFckr9k-Tessa:~$ adb shell
        error: device unauthorized.
        This adb server's $ADB_VENDOR_KEYS is not set
        Try 'adb kill-server' if that seems wrong.
        Otherwise check for a confirmation dialog on your device.
        motofckr9k@MotoFckr9k-Tessa:~$
        

        I tried:
        deleting the adbkey and adbkey.pub on my host computer.
        restarting my host computer.
        restarting my ubuntu tablet after enabling development mode.

        Anyone got any idea how to troubleshoot, or maybe even fix this?

        LakotaubpL 1 Reply Last reply Reply Quote 0
        • LakotaubpL Offline
          Lakotaubp @MotoFckr9k
          last edited by

          @MotoFckr9k Have you granted permission for adb on this device? Try
          adb devices
          and see if you get a pop up window asking you to grant permission or you can see your device in the list.

          M 1 Reply Last reply Reply Quote 0
          • U Offline
            UniSuperBox
            last edited by

            Yeah, a permission popup should appear depending on the device. The device will need to be unlocked for that to appear.

            M M 2 Replies Last reply Reply Quote 0
            • M Offline
              MotoFckr9k @Lakotaubp
              last edited by

              @Lakotaubp

              motofckr9k@MotoFckr9k-Tessa:~$ adb devices
              List of devices attached
              FC074240	unauthorized
              
              motofckr9k@MotoFckr9k-Tessa:~$ 
              

              I don't get a popup.

              M 1 Reply Last reply Reply Quote 0
              • M Offline
                MotoFckr9k @UniSuperBox
                last edited by

                @UniSuperBox When you say that the device needs to be unlocked: How do I do that?

                1 Reply Last reply Reply Quote 0
                • M Offline
                  maxinova2001 @MotoFckr9k
                  last edited by

                  @MotoFckr9k do you unlock your device by using a password? if you haven't already set a password to unlock the device from the security and privacy settings you could try and set a password, restart adb services and try again see what happens.

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    maxinova2001 @UniSuperBox
                    last edited by

                    @UniSuperBox before that it needs to locked, so a password is required otherwise it'll not work?

                    1 Reply Last reply Reply Quote 0
                    • U Offline
                      UniSuperBox
                      last edited by

                      @MotoFckr9k,

                      When you say that the device needs to be unlocked: How do I do that?

                      By unlocking the screen, so you're able to use apps.

                      @maxinova2001,

                      before that it needs to locked, so a password is required otherwise it'll not work?

                      Correct. You can't turn on developer mode if you don't have a screen lock.

                      M 1 Reply Last reply Reply Quote 1
                      • M Offline
                        MotoFckr9k @UniSuperBox
                        last edited by

                        @UniSuperBox I have tried that. Being on the apps screen and leaving the screen on.

                        LakotaubpL 1 Reply Last reply Reply Quote 0
                        • LakotaubpL Offline
                          Lakotaubp @MotoFckr9k
                          last edited by Lakotaubp

                          @MotoFckr9k Please check developer mode is switched on and you have a screen unlock password/pin set. Then try running in a terminal

                          Sudo fastboot oem unlock

                          Then try running adb devices again and keep an eye out for that popup thing.

                          Edit: You could install UT TweakTool and check that MTP is on (menu settings, system) mind you it's always useful to have UT Tweak Tool installed.

                          M 1 Reply Last reply Reply Quote 1
                          • M Offline
                            MotoFckr9k @Lakotaubp
                            last edited by MotoFckr9k

                            @Lakotaubp Development mode is on and you can only turn it on when there is a pin set. (When I turn development mode on while the tablet is connected to the computer, I can hear the device disconnected/connected sound)

                            I don't know how to run this fastboot command. The computer just says:

                            motofckr9k@MotoFckr9k-Tessa:~$ sudo fastboot oem unlock
                            < waiting for any device >
                            
                            

                            That happens while being in the system recovery and while just having the normal system running.
                            Running the command on the tablet itself does nothing since fastboot is not installed.

                            UT TweakTool reports that MTP is on. MTP is also working for transfering files.

                            EDIT: I also tried the remove USB-Troubleshooting privileges option.

                            LakotaubpL 1 Reply Last reply Reply Quote 0
                            • LakotaubpL Offline
                              Lakotaubp @MotoFckr9k
                              last edited by

                              @MotoFckr9k You have the M10 or nexus7 then? What pc/laptop do you have? Make sure you have adb and fastboot installed for whichever system it is( if window you need 15 second adb from xda developers)Then try again. Think I had an issue getting permission on an M10 using Ubuntu, needed to use Mint to get it to show.
                              Use the forum Search function for adb M10/nexus7 issues. Something is vaguely familiar, will look myself but it will have to be tomorrow now. I'm done for today good luck catch up tomorrow.

                              M 1 Reply Last reply Reply Quote 0
                              • M Offline
                                MotoFckr9k @Lakotaubp
                                last edited by MotoFckr9k

                                @Lakotaubp https://forums.ubports.com/topic/1385/bq-m10-hd-adb-does-not-work
                                After reading this thread, I tried reconnecting it a couple of times and tried different usb controllers.
                                Interestingly, the tablet only connects to the on-board controllers. Not to one of the two pci-e usb controllers which I have installed (and use regularly).

                                I am running Linux Mint 19.1 Cinnamon and a M10 HD.

                                EDIT: As you and some other people on the forums had luck with trying different computers, I got the idea to try to hook the tablet up to my homeserver. And vio la. I got a popup asking if I want to allow usb debugging. The server is an old machine that only has usb 2.0 and runs debian stable.

                                LakotaubpL 1 Reply Last reply Reply Quote 0
                                • LakotaubpL Offline
                                  Lakotaubp @MotoFckr9k
                                  last edited by

                                  @MotoFckr9k Ok it's late for me now so, all I can think of again is via the terminal update your system and install adb and fastboot (they are in the Ubuntu repositories, a web search will get you the exact commands you need I can never remember them). Then the

                                  Sudo fastboot OEM unlock

                                  Command should work then retry

                                  adb devices

                                  Your device should be listed. If it is adb is working and then you just need that permission box to grant permission. Trying different USB cables might also help (cables can be a right pain) and usb ports.
                                  That is it now. I am not checking again till tomorrow 😄honest🙃Good night will check in tomorrow.

                                  1 Reply Last reply Reply Quote 0
                                  • U Offline
                                    UniSuperBox
                                    last edited by

                                    Unlocking the bootloader is not necessary. No need to use fastboot oem unlock.

                                    The only thing I can think of with your Mint PC is to check what comes up in dmesg -w when you plug in the device. It's possible that it's complaining about the USB system.

                                    1 Reply Last reply Reply Quote 0
                                    • dobeyD Offline
                                      dobey
                                      last edited by

                                      Is indicator-display-service process running? It's what handles the request and should be popping up the notification to authorize the PC.

                                      1 Reply Last reply Reply Quote 1
                                      • dobeyD Offline
                                        dobey
                                        last edited by

                                        Also, the first two commands in that documentation should probably be changed to just adb reboot bootloader instead.

                                        If it's still not working, you can workaround the problem by manually rebooting the device and using the appropriate button combination for your device to get it to fastboot mode. Then you should be able to run the fastboot commands.

                                        For the rest, you can do it over ssh if you've enabled it, or directly on the device in terminal app. Just skip the adb parts, and run the commands that would be run within the adb shell session instead. Slightly easier if you have a bluetooth or USB OTG keyboard to type with, though.

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          MotoFckr9k
                                          last edited by MotoFckr9k

                                          Just a little update:
                                          dmesg -w output is:

                                          [ 5021.594797] usb 1-12: new high-speed USB device number 14 using xhci_hcd
                                          [ 5021.743209] usb 1-12: New USB device found, idVendor=2a47, idProduct=201d, bcdDevice=ff.ff
                                          [ 5021.743213] usb 1-12: New USB device strings: Mfr=2, Product=3, SerialNumber=4
                                          [ 5021.743216] usb 1-12: Product: Aquaris_M10_HD
                                          [ 5021.743219] usb 1-12: Manufacturer: Ubuntu
                                          [ 5021.743221] usb 1-12: SerialNumber: FC074240
                                          

                                          MTP works fine. I can transfer files no problem.
                                          On my old homeserver running debian buster, adb works (somewhat). I need to try plugging it in a couple of times sometimes. Similar to the installation trouble on the M10.

                                          Thought I'd leave this here for future reference. There is definetly something wrong with the M10 that causes these weird problems though. Thanksfully it has OTG, so I can hook my keyboard up to it.

                                          If a developer wants to maybe try finding out more about the issue, I am up for helping with testing/troubleshooting.

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