I am working on one application that has some features can be only work in rooted devices.
Almost done and application also working in rooted devices. But some of devices are using SuperSU and in this case application is not working properly.
I also research and discussed with Custom ROM developer and they are saying that your app is not asking for SuperSU Permission but it should.
I did many research on the same topic didn't get any proper way to achieve that.
I found the solution for this.
There is three options in the
SuperSU
app underSettings Tab > Default Access
.http://prntscr.com/oyzeq8
So there is two case.
1. If
SuperSU
app will have "Grant" set by default inSettings Tab > Default Access
, then app will not ask forSuperSU
permission in application.2. If
SuperSU
app will have "Prompt" set by default inSettings Tab > Default Access
, then app will ask forSuperSU
permission whenever required.To ask
SuperSU
permission on app launch, i have used RootTools to check for SuperSU Access.So, I just checked for root access by a simple condition using RootTools.
So whenever
RootTools.isAccessGiven()
will execute, it will autometically open a popup to ask for SuperSU Permission for the app. Later you can change it from the SuperSU Application as well.This is what i found and implemented. Everything working fine now.
Thank you