Is there a way to give root privileges to an app through the ADB?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












The Android Debug Bridge (ADB) itself has root access (after executing the adb root command). Can that be used to give the same privileges to apps on the device? Is there a file somewhere in the system that keeps track of which user (app) has root access and can it be modified? If it helps I've already put the app in the system folder so it's regarded as a system app now.










share|improve this question



























    up vote
    2
    down vote

    favorite












    The Android Debug Bridge (ADB) itself has root access (after executing the adb root command). Can that be used to give the same privileges to apps on the device? Is there a file somewhere in the system that keeps track of which user (app) has root access and can it be modified? If it helps I've already put the app in the system folder so it's regarded as a system app now.










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      The Android Debug Bridge (ADB) itself has root access (after executing the adb root command). Can that be used to give the same privileges to apps on the device? Is there a file somewhere in the system that keeps track of which user (app) has root access and can it be modified? If it helps I've already put the app in the system folder so it's regarded as a system app now.










      share|improve this question













      The Android Debug Bridge (ADB) itself has root access (after executing the adb root command). Can that be used to give the same privileges to apps on the device? Is there a file somewhere in the system that keeps track of which user (app) has root access and can it be modified? If it helps I've already put the app in the system folder so it's regarded as a system app now.







      applications adb root-access






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked yesterday









      Stormtrooper

      182




      182




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Nope. Though you could use e.g. pm grant and grant it SUPERUSER, but that would have no effect if the app hadn't declared that in its manifest. And if it had, it wouldn't be necessary to grant it manually.



          An app must actively request superuser privileges in order to gain it – and even then it only works with a superuser app in place (acting as "gate keeper") that then pops up a message for the user to confirm.






          share|improve this answer




















          • Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
            – Stormtrooper
            yesterday






          • 1




            If it could be done without a superuser app, it would be too bad – for security :)
            – Izzy
            yesterday










          • True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
            – Stormtrooper
            yesterday











          • Does that mean that granting SUPERUSER with pm grant effectively does nothing?
            – Raimund Krämer
            yesterday











          • Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
            – Izzy
            yesterday










          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "139"
          ;
          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',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          ,
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fandroid.stackexchange.com%2fquestions%2f203850%2fis-there-a-way-to-give-root-privileges-to-an-app-through-the-adb%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          Nope. Though you could use e.g. pm grant and grant it SUPERUSER, but that would have no effect if the app hadn't declared that in its manifest. And if it had, it wouldn't be necessary to grant it manually.



          An app must actively request superuser privileges in order to gain it – and even then it only works with a superuser app in place (acting as "gate keeper") that then pops up a message for the user to confirm.






          share|improve this answer




















          • Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
            – Stormtrooper
            yesterday






          • 1




            If it could be done without a superuser app, it would be too bad – for security :)
            – Izzy
            yesterday










          • True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
            – Stormtrooper
            yesterday











          • Does that mean that granting SUPERUSER with pm grant effectively does nothing?
            – Raimund Krämer
            yesterday











          • Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
            – Izzy
            yesterday














          up vote
          3
          down vote



          accepted










          Nope. Though you could use e.g. pm grant and grant it SUPERUSER, but that would have no effect if the app hadn't declared that in its manifest. And if it had, it wouldn't be necessary to grant it manually.



          An app must actively request superuser privileges in order to gain it – and even then it only works with a superuser app in place (acting as "gate keeper") that then pops up a message for the user to confirm.






          share|improve this answer




















          • Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
            – Stormtrooper
            yesterday






          • 1




            If it could be done without a superuser app, it would be too bad – for security :)
            – Izzy
            yesterday










          • True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
            – Stormtrooper
            yesterday











          • Does that mean that granting SUPERUSER with pm grant effectively does nothing?
            – Raimund Krämer
            yesterday











          • Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
            – Izzy
            yesterday












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Nope. Though you could use e.g. pm grant and grant it SUPERUSER, but that would have no effect if the app hadn't declared that in its manifest. And if it had, it wouldn't be necessary to grant it manually.



          An app must actively request superuser privileges in order to gain it – and even then it only works with a superuser app in place (acting as "gate keeper") that then pops up a message for the user to confirm.






          share|improve this answer












          Nope. Though you could use e.g. pm grant and grant it SUPERUSER, but that would have no effect if the app hadn't declared that in its manifest. And if it had, it wouldn't be necessary to grant it manually.



          An app must actively request superuser privileges in order to gain it – and even then it only works with a superuser app in place (acting as "gate keeper") that then pops up a message for the user to confirm.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Izzy

          75.5k49237738




          75.5k49237738











          • Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
            – Stormtrooper
            yesterday






          • 1




            If it could be done without a superuser app, it would be too bad – for security :)
            – Izzy
            yesterday










          • True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
            – Stormtrooper
            yesterday











          • Does that mean that granting SUPERUSER with pm grant effectively does nothing?
            – Raimund Krämer
            yesterday











          • Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
            – Izzy
            yesterday
















          • Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
            – Stormtrooper
            yesterday






          • 1




            If it could be done without a superuser app, it would be too bad – for security :)
            – Izzy
            yesterday










          • True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
            – Stormtrooper
            yesterday











          • Does that mean that granting SUPERUSER with pm grant effectively does nothing?
            – Raimund Krämer
            yesterday











          • Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
            – Izzy
            yesterday















          Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
          – Stormtrooper
          yesterday




          Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
          – Stormtrooper
          yesterday




          1




          1




          If it could be done without a superuser app, it would be too bad – for security :)
          – Izzy
          yesterday




          If it could be done without a superuser app, it would be too bad – for security :)
          – Izzy
          yesterday












          True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
          – Stormtrooper
          yesterday





          True but after the ADB is allowed you can already compromise security in many ways. I've tried making my app a system one on two different devices. On one making the app a system one automatically gave it root privileges but in the seconds case it does not... Better security I guess.
          – Stormtrooper
          yesterday













          Does that mean that granting SUPERUSER with pm grant effectively does nothing?
          – Raimund Krämer
          yesterday





          Does that mean that granting SUPERUSER with pm grant effectively does nothing?
          – Raimund Krämer
          yesterday













          Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
          – Izzy
          yesterday




          Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
          – Izzy
          yesterday

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fandroid.stackexchange.com%2fquestions%2f203850%2fis-there-a-way-to-give-root-privileges-to-an-app-through-the-adb%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

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay