1

I have a rooted device that runs our custom app in the system/priv-app folder. I would like to enable OTA updates, but would need to give SureMDM Nix app SU privileges. I am told the package name is com.nix. Does anyone know how to do this with ADB. I have root level privileges via ADB remount or SU commands.

  • 1
    You can't decide to give an app root privileges, if the app itself doesn't ask for them. – Death Mask Salesman May 16 '17 at 19:21
  • SureMDM wants me to give there app the ability to execute scripts as SU. SuperUser APK must be doing this. I don't want to install that app on the device. That is why I am asking. – Droid Chris May 16 '17 at 19:23
  • Do system apps ask for root access? – esQmo_ May 16 '17 at 20:03
  • I was thinking of moving it to the system/app folder – Droid Chris May 16 '17 at 21:20
2

Grant all required SuperSU Permissions on one of the device and then connect it to desktop through USB and execute below commands .

Note: This commands will work only if adb has root access . It will be good if you uncheck Re-authetication & check Trust System User option also at the time of intial configuration .

adb root
adb shell
chmod 777 /data/data/eu.chainfire.supersu/shared_prefs/eu.chainfire.supersu_preferences.xml;
cat data/data/eu.chainfire.supersu/shared_prefs/eu.chainfire.supersu_preferences.xml > /sdcard/eu.chainfire.supersu_preferences.xml ;
exit;
adb pull /sdcard/eu.chainfire.supersu_preferences.xml ;

For replicating above same SuperSU settings on other device, connect device to desktop through usb and execute below commands .

adb push  ../eu.chainfire.supersu_preferences.xml /sdcard/
adb root
adb shell
chmod 777 /data/data/eu.chainfire.supersu/shared_prefs/eu.chainfire.supersu_preferences.xml;
cat /sdcard/eu.chainfire.supersu_preferences.xml > data/data/eu.chainfire.supersu/shared_prefs/eu.chainfire.supersu_preferences.xml ;
am force-stop eu.chainfire.supersu;am start -a android.intent.action.MAIN -n eu.chainfire.supersu/.MainActivity ;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.