[Q] Changing SuperSU config through ADB (root recovery)

Search This thread

wonderbars

Member
Aug 18, 2014
15
3
Simply put:
SGS2 i727 Skyrocket broken screen and digitizer
Pattern lock
adb shell can't get root unless in recovery
need adb root access to remote control through AndroidScreenCast so I can unlock my screen (or manually/script enter a series of touch event inputs)
need to know how to edit SuperSU config (and where to find it) so it will auto-grant root to adb (and possibly all apps for now) by default at startup
i am able to mount /system, /data, /cache and /storage/sdcar0 through cwm recovery
and have root access through recovery

am I able to change SuperSU config under recovery root environment?
not asking to be spoonfed but hints are welcome
 

wonderbars

Member
Aug 18, 2014
15
3
Thanks, will do, any chance you could clarify how they may help? I know my way around shell just not android's. Do you knownwhere SuperSu holds its config?
 
Last edited:

wonderbars

Member
Aug 18, 2014
15
3
Okay then could anyone tell me if there's a better place in the forum to inquire about this or maybe another forum that would have more experience with SuperSU?

Update:
btw I just realized android isn't that far from linux.
/data/data/eu.chainfire.supersu/shared_prefs/
or
/data/user/0/eu.chainfire.supersu/shared_prefs/
Now to figure out what string grants adb root rw permissions at startup.

The drop dead sexy update:
Adding this string to eu.chainfire.supersu_preferences.xml will grant root access to all apps that request it.
<string name="config_default_access">grant</string>

I'm not sure whether this is all it takes but this seems like the only change that happened once I changed the setting in SuperSU. Will try it as soon as I get home.


Follow-up:
So this is what I added, along with the above and got su granted through ADB. Now the phone is able to get root while it's running stock 4.1.2 UXUMA7
<int name="config_ADB shell_forceuser" value="-1" />
<string name="config_ADB shell_wait">-1</string>
<string name="config_ADB shell_access">grant</string>
<int name="config_ADB shell_expireselect" value="-1" />
<string name="config_ADB shell_forceshell"></string>
<long name="config_ADB shell_expire" value="0" />
<string name="config_ADB shell_notify">parent</string>
<string name="config_ADB shell_log">parent</string>
<string name="config_ADB shell_forcegroups"></string>
<null name="config_ADB shell_pin" />

One problem remaining, AndroidScreenCast doesn't seem to want to request root for touch input or browsing the filesystem. What do?
 
Last edited:
  • Like
Reactions: alecxs

vkamenen

Member
Sep 13, 2013
6
0
One problem remaining, AndroidScreenCast doesn't seem to want to request root for touch input or browsing the filesystem. What do?

Sent from my Nexus 7 using XDA Free mobile app

Indeed, what to do? I was in the same situation (I even use N7 mob app to post this) and I just got su thanks to your findings! Cool but what's next?
Any help will be appreciated!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Okay then could anyone tell me if there's a better place in the forum to inquire about this or maybe another forum that would have more experience with SuperSU?

    Update:
    btw I just realized android isn't that far from linux.
    /data/data/eu.chainfire.supersu/shared_prefs/
    or
    /data/user/0/eu.chainfire.supersu/shared_prefs/
    Now to figure out what string grants adb root rw permissions at startup.

    The drop dead sexy update:
    Adding this string to eu.chainfire.supersu_preferences.xml will grant root access to all apps that request it.
    <string name="config_default_access">grant</string>

    I'm not sure whether this is all it takes but this seems like the only change that happened once I changed the setting in SuperSU. Will try it as soon as I get home.


    Follow-up:
    So this is what I added, along with the above and got su granted through ADB. Now the phone is able to get root while it's running stock 4.1.2 UXUMA7
    <int name="config_ADB shell_forceuser" value="-1" />
    <string name="config_ADB shell_wait">-1</string>
    <string name="config_ADB shell_access">grant</string>
    <int name="config_ADB shell_expireselect" value="-1" />
    <string name="config_ADB shell_forceshell"></string>
    <long name="config_ADB shell_expire" value="0" />
    <string name="config_ADB shell_notify">parent</string>
    <string name="config_ADB shell_log">parent</string>
    <string name="config_ADB shell_forcegroups"></string>
    <null name="config_ADB shell_pin" />

    One problem remaining, AndroidScreenCast doesn't seem to want to request root for touch input or browsing the filesystem. What do?