Add support to trigger Samsung Modes & Routines
<uses-permission android:name="com.samsung.android.app.routines.permission.READ_ROUTINE_INFO" />context.contentResolver.query(uri, null, null, null, null)- content://com.samsung.android.app.routines.externalprovider/routine_list?routine_type=normal&condition_type=manual
- condition_type can also be "auto," but this is not useful for Tasker because "auto" routines cannot be run manually
- Also accepts query param "only enabled=0" which will return disabled routines as well
- content://com.samsung.android.app.routines.routineinfoprovider/manual_enabled_routines
context.contentResolver.query(uri, null, null, null, null)- content://com.samsung.android.app.routines.domainmodel.routinetestprovider/routine_uuid_list
- Also returns automatic routines
use context.contentResolver.call(Uri uri, String flag, null, Bundle bundle)- content://com.samsung.android.app.routines.externalprovider
- Flag should be one of {"start_manual_routine", "toggle_manual_routine", "end_manual_routine"}
- Bundle should have one long of key "uuid" and value should be UUID of routine to be started/toggled/stopped
- content://com.samsung.android.app.routines.domainmodel.routinetestprovider
- Flag should be one of {"run_routine", "stop_routine"}
- Bundle should have one long of key "_uuid" and value should be UUID of routine to be started/toggled/stopped
- adb shell pm path com.samsung.android.app.routines
- adb pull <path from step 1>
Then I decompiled the APK with JADK. I looked in the manifest for services, receivers, and providers. Most of them require permissions that are locked to signature/system access only, the ones I found that are externally accessible were listed above.