AdbCommandRejectedException: insufficient permissions for device: user in plugdev group; are your udev rules...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







18















Five days ago I installed Android Studio on a fully updated Ubuntu 2018.04, used the wizard to create an example app, pressed the "Run" button and it ran perfectly on my Android device connected via USB.



Today, on the same Ubuntu and with the same deviced plugged in, I opened the same project and pressed "Run" again. It now fails:



Launching Application
$ adb push /home/nico/src/ActionBarCompat-Basic/Application/build/outputs/apk/debug/Application-debug.apk /data/local/tmp/com.example.android.actionbarcompat.basic
com.android.ddmlib.AdbCommandRejectedException: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information
Error while Installing APK


I did not knowingly modify any Ubuntu configuration or even update the OS.



What could be the problem?

How to investigate further?










share|improve this question





























    18















    Five days ago I installed Android Studio on a fully updated Ubuntu 2018.04, used the wizard to create an example app, pressed the "Run" button and it ran perfectly on my Android device connected via USB.



    Today, on the same Ubuntu and with the same deviced plugged in, I opened the same project and pressed "Run" again. It now fails:



    Launching Application
    $ adb push /home/nico/src/ActionBarCompat-Basic/Application/build/outputs/apk/debug/Application-debug.apk /data/local/tmp/com.example.android.actionbarcompat.basic
    com.android.ddmlib.AdbCommandRejectedException: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
    See [http://developer.android.com/tools/device.html] for more information
    Error while Installing APK


    I did not knowingly modify any Ubuntu configuration or even update the OS.



    What could be the problem?

    How to investigate further?










    share|improve this question

























      18












      18








      18


      1






      Five days ago I installed Android Studio on a fully updated Ubuntu 2018.04, used the wizard to create an example app, pressed the "Run" button and it ran perfectly on my Android device connected via USB.



      Today, on the same Ubuntu and with the same deviced plugged in, I opened the same project and pressed "Run" again. It now fails:



      Launching Application
      $ adb push /home/nico/src/ActionBarCompat-Basic/Application/build/outputs/apk/debug/Application-debug.apk /data/local/tmp/com.example.android.actionbarcompat.basic
      com.android.ddmlib.AdbCommandRejectedException: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
      See [http://developer.android.com/tools/device.html] for more information
      Error while Installing APK


      I did not knowingly modify any Ubuntu configuration or even update the OS.



      What could be the problem?

      How to investigate further?










      share|improve this question














      Five days ago I installed Android Studio on a fully updated Ubuntu 2018.04, used the wizard to create an example app, pressed the "Run" button and it ran perfectly on my Android device connected via USB.



      Today, on the same Ubuntu and with the same deviced plugged in, I opened the same project and pressed "Run" again. It now fails:



      Launching Application
      $ adb push /home/nico/src/ActionBarCompat-Basic/Application/build/outputs/apk/debug/Application-debug.apk /data/local/tmp/com.example.android.actionbarcompat.basic
      com.android.ddmlib.AdbCommandRejectedException: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
      See [http://developer.android.com/tools/device.html] for more information
      Error while Installing APK


      I did not knowingly modify any Ubuntu configuration or even update the OS.



      What could be the problem?

      How to investigate further?







      android 18.04 udev android-studio adb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 7 '18 at 7:25









      Nicolas RaoulNicolas Raoul

      5,1672065115




      5,1672065115






















          4 Answers
          4






          active

          oldest

          votes


















          25














          This procedure solves the problem for me:




          • On the Android device, drag the top menu and select "USB for file transfer"

          • Press "Run" again


          It might be accidental, but it has always (about 50 times) worked so far.






          share|improve this answer


























          • Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

            – Pramod Gharu
            Nov 13 '18 at 10:02





















          11














          In short: The group of the USB device is root, not plugdev.



          Adding a file /etc/udev/rules.d/51-android.rules



          SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
          GROUP="plugdev", SYMLINK+="android%n"


          (lsusb18d1:d002)



          And plugging in and out did the work for me. Now, the device is in the plugdev group.



          (source)






          share|improve this answer


























          • This solves the issue for me

            – dmSherazi
            Jan 9 at 8:59



















          6














          I was receiving a similar error due to udev rules not being configured:



          kirk@laptop:~$ adb devices
          List of devices attached
          FA7240300631 device
          FA7240300631 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]


          I was able to work around this by running:



          adb kill-server && adb start-server


          but this was not at all ideal. I fixed it by installing:



          sudo apt install android-tools-adb


          Which is a community-maintained default set of udev rules.



          source






          share|improve this answer

































            0














            1.disconect and connect usb to your device



            2.accept request on device



            bingo=)






            share|improve this answer








            New contributor




            Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





















            • That does not work for me: no request appears on the device.

              – Nicolas Raoul
              1 hour ago












            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1033017%2fadbcommandrejectedexception-insufficient-permissions-for-device-user-in-plugde%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            25














            This procedure solves the problem for me:




            • On the Android device, drag the top menu and select "USB for file transfer"

            • Press "Run" again


            It might be accidental, but it has always (about 50 times) worked so far.






            share|improve this answer


























            • Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

              – Pramod Gharu
              Nov 13 '18 at 10:02


















            25














            This procedure solves the problem for me:




            • On the Android device, drag the top menu and select "USB for file transfer"

            • Press "Run" again


            It might be accidental, but it has always (about 50 times) worked so far.






            share|improve this answer


























            • Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

              – Pramod Gharu
              Nov 13 '18 at 10:02
















            25












            25








            25







            This procedure solves the problem for me:




            • On the Android device, drag the top menu and select "USB for file transfer"

            • Press "Run" again


            It might be accidental, but it has always (about 50 times) worked so far.






            share|improve this answer















            This procedure solves the problem for me:




            • On the Android device, drag the top menu and select "USB for file transfer"

            • Press "Run" again


            It might be accidental, but it has always (about 50 times) worked so far.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 24 '18 at 3:17

























            answered May 8 '18 at 8:48









            Nicolas RaoulNicolas Raoul

            5,1672065115




            5,1672065115













            • Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

              – Pramod Gharu
              Nov 13 '18 at 10:02





















            • Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

              – Pramod Gharu
              Nov 13 '18 at 10:02



















            Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

            – Pramod Gharu
            Nov 13 '18 at 10:02







            Thanks! It works for me. When i choose only USB debugging it not work, but when i choose USB file transfer, the app run instantly.

            – Pramod Gharu
            Nov 13 '18 at 10:02















            11














            In short: The group of the USB device is root, not plugdev.



            Adding a file /etc/udev/rules.d/51-android.rules



            SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
            GROUP="plugdev", SYMLINK+="android%n"


            (lsusb18d1:d002)



            And plugging in and out did the work for me. Now, the device is in the plugdev group.



            (source)






            share|improve this answer


























            • This solves the issue for me

              – dmSherazi
              Jan 9 at 8:59
















            11














            In short: The group of the USB device is root, not plugdev.



            Adding a file /etc/udev/rules.d/51-android.rules



            SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
            GROUP="plugdev", SYMLINK+="android%n"


            (lsusb18d1:d002)



            And plugging in and out did the work for me. Now, the device is in the plugdev group.



            (source)






            share|improve this answer


























            • This solves the issue for me

              – dmSherazi
              Jan 9 at 8:59














            11












            11








            11







            In short: The group of the USB device is root, not plugdev.



            Adding a file /etc/udev/rules.d/51-android.rules



            SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
            GROUP="plugdev", SYMLINK+="android%n"


            (lsusb18d1:d002)



            And plugging in and out did the work for me. Now, the device is in the plugdev group.



            (source)






            share|improve this answer















            In short: The group of the USB device is root, not plugdev.



            Adding a file /etc/udev/rules.d/51-android.rules



            SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
            GROUP="plugdev", SYMLINK+="android%n"


            (lsusb18d1:d002)



            And plugging in and out did the work for me. Now, the device is in the plugdev group.



            (source)







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 15 '18 at 15:33









            David Foerster

            28.6k1367113




            28.6k1367113










            answered Jun 21 '18 at 22:42









            UserUser

            22126




            22126













            • This solves the issue for me

              – dmSherazi
              Jan 9 at 8:59



















            • This solves the issue for me

              – dmSherazi
              Jan 9 at 8:59

















            This solves the issue for me

            – dmSherazi
            Jan 9 at 8:59





            This solves the issue for me

            – dmSherazi
            Jan 9 at 8:59











            6














            I was receiving a similar error due to udev rules not being configured:



            kirk@laptop:~$ adb devices
            List of devices attached
            FA7240300631 device
            FA7240300631 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]


            I was able to work around this by running:



            adb kill-server && adb start-server


            but this was not at all ideal. I fixed it by installing:



            sudo apt install android-tools-adb


            Which is a community-maintained default set of udev rules.



            source






            share|improve this answer






























              6














              I was receiving a similar error due to udev rules not being configured:



              kirk@laptop:~$ adb devices
              List of devices attached
              FA7240300631 device
              FA7240300631 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]


              I was able to work around this by running:



              adb kill-server && adb start-server


              but this was not at all ideal. I fixed it by installing:



              sudo apt install android-tools-adb


              Which is a community-maintained default set of udev rules.



              source






              share|improve this answer




























                6












                6








                6







                I was receiving a similar error due to udev rules not being configured:



                kirk@laptop:~$ adb devices
                List of devices attached
                FA7240300631 device
                FA7240300631 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]


                I was able to work around this by running:



                adb kill-server && adb start-server


                but this was not at all ideal. I fixed it by installing:



                sudo apt install android-tools-adb


                Which is a community-maintained default set of udev rules.



                source






                share|improve this answer















                I was receiving a similar error due to udev rules not being configured:



                kirk@laptop:~$ adb devices
                List of devices attached
                FA7240300631 device
                FA7240300631 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]


                I was able to work around this by running:



                adb kill-server && adb start-server


                but this was not at all ideal. I fixed it by installing:



                sudo apt install android-tools-adb


                Which is a community-maintained default set of udev rules.



                source







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Aug 15 '18 at 22:00









                Stephen Rauch

                1,1546716




                1,1546716










                answered Aug 15 '18 at 13:22









                kirkkirk

                6815




                6815























                    0














                    1.disconect and connect usb to your device



                    2.accept request on device



                    bingo=)






                    share|improve this answer








                    New contributor




                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.





















                    • That does not work for me: no request appears on the device.

                      – Nicolas Raoul
                      1 hour ago
















                    0














                    1.disconect and connect usb to your device



                    2.accept request on device



                    bingo=)






                    share|improve this answer








                    New contributor




                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.





















                    • That does not work for me: no request appears on the device.

                      – Nicolas Raoul
                      1 hour ago














                    0












                    0








                    0







                    1.disconect and connect usb to your device



                    2.accept request on device



                    bingo=)






                    share|improve this answer








                    New contributor




                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.










                    1.disconect and connect usb to your device



                    2.accept request on device



                    bingo=)







                    share|improve this answer








                    New contributor




                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.









                    share|improve this answer



                    share|improve this answer






                    New contributor




                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.









                    answered 16 hours ago









                    PestrnkoPestrnko

                    1012




                    1012




                    New contributor




                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.





                    New contributor





                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.






                    Pestrnko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                    Check out our Code of Conduct.













                    • That does not work for me: no request appears on the device.

                      – Nicolas Raoul
                      1 hour ago



















                    • That does not work for me: no request appears on the device.

                      – Nicolas Raoul
                      1 hour ago

















                    That does not work for me: no request appears on the device.

                    – Nicolas Raoul
                    1 hour ago





                    That does not work for me: no request appears on the device.

                    – Nicolas Raoul
                    1 hour ago


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1033017%2fadbcommandrejectedexception-insufficient-permissions-for-device-user-in-plugde%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    GameSpot

                    日野市

                    Tu-95轟炸機