Skip to content

Is it possible to keep the device restarting? #8

Description

@FloatingGuy

Is there a way to automatically pull up the StartFlagExploit APP after the system_server restarts, so that the phone will continue to be restarted?
I tried to register the system startup broadcast, but my receiver did not receive any system startup broadcast. I think it is because my APP has not started yet, so I can't receive the broadcast. And the system did not send the android.intent.action.BOOT_COMPLETED broadcast.

My test code:
test devices: pixel 4XL android10

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<receiver
            android:name=".BootCompletedReceiver"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.intent.action.BATTERY_CHANGED" />
                <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED"/>

            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.BATTERY_CHANGED" />
                <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
                <action android:name="android.intent.action.DOCK_EVENT" />
                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
                <action android:name="com.android.intent.action.timezone.TRIGGER_RULES_UPDATE_CHECK" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_REGISTERED" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_LOCAL" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_REMOTE" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_ALL" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_REPEAT" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_MULTI" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_ABORT" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_STICKY1" />
                <action android:name="com.android.frameworks.coretests.activity.BROADCAST_STICKY2" />
            </intent-filter>
            <intent-filter>

                <action android:name="android.intent.action.ACTION_SHUTDOWN" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.USER_PRESENT" />
            </intent-filter>

        </receiver>

public class BootCompletedReceiver extends BroadcastReceiver {
    private static final String TAG = "systemcrash";
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent in = null;
        switch (intent.getAction()) {     
     				case ACTION_USER_PRESENT:
                Log.e(TAG,"手机解锁");
                in = new Intent();
                in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                in.setClassName("com.facat.systemcrash", "MainActivity");
                context.startActivity(in);
            case ...
            
            default:
                Log.e(TAG,"default: " + intent.getAction());
                in = new Intent();
                in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                in.setClassName("com.facat.systemcrash", "MainActivity");
                context.startActivity(in);
        }
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions