我们想要去定制Supersu 让其,过滤掉我们自己的应用,不显示权限提醒。我们可以来看看这个su调用系统发送广播。然后我们的Supersu.apk会收到弹窗的广播。我们可以在这里进行拦截过滤。
public class SuReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, Intent intent) {
if (intent == null)
return;
String command = intent.getStringExtra("command");
if (command == null)
return;
int uid = intent.getIntExtra("uid", -1);
if (uid == -1)
return;
int desiredUid = intent.getIntExtra("desired_uid", -1);
if (desiredUid == -1)
return;
String action = intent.getStringExtra("action");
if (action == null)
return;
String fromName = intent.getStringExtra("from_name");
String desiredName =