Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to keep the device restarting? #8

Open
FloatingGuy opened this issue Jun 28, 2021 · 0 comments
Open

Is it possible to keep the device restarting? #8

FloatingGuy opened this issue Jun 28, 2021 · 0 comments

Comments

@FloatingGuy
Copy link

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);
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant