0

There is an old question about it (Toggle gps on root devices on Android)....

I really need enable GPS using a su command without any notification ... My code is above:

public static void turnOnGPS(){

    try {
        String mCommand = "adb shell settings put secure location_providers_allowed gps,network,wifi ";
        Shell.runAsRoot(mCommand);
        Utilities.log("GPS Actioned.");

    }catch (Exception o){
        Utilities.log(o.toString());
    }
}
Community
  • 1
  • 1
Fábio Filho
  • 111
  • 1
  • 10

2 Answers2

1

Uncheck show notifications from su Settings tab

Dayvon
  • 87
  • 2
  • 11
0

I found the solution..... I did the following:

  1. I rooted my device
  2. I installed my app as system app, it's simple, just copy your apk into /system/priv-app/myApk.apk and set chmod 644 permissions. If you have a doubt, check this post (If i set my android app to a system app, after a factory reset, will it be removed from the phone?).
  3. I just removed the /system/app/SuperSU folder
  4. I did a factory reset on device, and that is it ..... =D
Community
  • 1
  • 1
Fábio Filho
  • 111
  • 1
  • 10