Is there a way to give root privileges to an app through the ADB?
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
add a comment |
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
add a comment |
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
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
applications adb root-access
asked Nov 14 '18 at 10:41
StormtrooperStormtrooper
182
182
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
1
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
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
Nov 14 '18 at 12:45
Does that mean that grantingSUPERUSER
withpm grant
effectively does nothing?
– Raimund Krämer
Nov 14 '18 at 15:48
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
|
show 3 more comments
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',
autoActivateHeartbeat: false,
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
1
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
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
Nov 14 '18 at 12:45
Does that mean that grantingSUPERUSER
withpm grant
effectively does nothing?
– Raimund Krämer
Nov 14 '18 at 15:48
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
|
show 3 more comments
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.
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
1
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
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
Nov 14 '18 at 12:45
Does that mean that grantingSUPERUSER
withpm grant
effectively does nothing?
– Raimund Krämer
Nov 14 '18 at 15:48
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
|
show 3 more comments
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.
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.
answered Nov 14 '18 at 11:21
Izzy♦Izzy
76.6k49249756
76.6k49249756
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
1
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
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
Nov 14 '18 at 12:45
Does that mean that grantingSUPERUSER
withpm grant
effectively does nothing?
– Raimund Krämer
Nov 14 '18 at 15:48
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
|
show 3 more comments
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
1
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
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
Nov 14 '18 at 12:45
Does that mean that grantingSUPERUSER
withpm grant
effectively does nothing?
– Raimund Krämer
Nov 14 '18 at 15:48
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
Ah, I had hoped it could be done without a superuser app. Too bad but thanks for your time.
– Stormtrooper
Nov 14 '18 at 11:32
1
1
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
If it could be done without a superuser app, it would be too bad – for security :)
– Izzy♦
Nov 14 '18 at 12:38
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
Nov 14 '18 at 12:45
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
Nov 14 '18 at 12:45
Does that mean that granting
SUPERUSER
with pm grant
effectively does nothing?– Raimund Krämer
Nov 14 '18 at 15:48
Does that mean that granting
SUPERUSER
with pm grant
effectively does nothing?– Raimund Krämer
Nov 14 '18 at 15:48
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
Granting anything an app has not in its manifest does nothing AFAIK, @RaimundKrämer.
– Izzy♦
Nov 14 '18 at 15:56
|
show 3 more comments
Thanks for contributing an answer to Android Enthusiasts Stack Exchange!
- 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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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