Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Superuser activity not found

Superuser app is installed on my phone, but my app falls when trying to make a superuser request with the following error:

18820-18820/com.anth.res E/AndroidRuntime: FATAL EXCEPTION: main
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=act=android.intent.action.superuser (has extras) }
    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
    ...

here's request making cide from my activity:

command = "su -c \""+command+"\"";
Intent intent = new Intent("android.intent.action.superuser"); // superuser request
intent.putExtra("name", getResources().getString(R.string.app_name)); // tell Superuser the name of the requesting app
intent.putExtra("packagename", "com.anth.res"); // tel Superuser the name of the requesting package
startActivityForResult(intent, SU_REQUEST); // make the request!
like image 549
A. K. Avatar asked Nov 13 '22 00:11

A. K.


1 Answers

Please check your manifest file.Have you declared your activity properly like this:

<activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
like image 86
Lips_coder Avatar answered Nov 15 '22 02:11

Lips_coder