OK, it turns out that the service call
did work, as far as I can tell. I just needed to tweak the command a little.
Most important thing was to correctly determine the ID of the alarm. Using the link here, one can find the ID. Note that the ID is in a specific section of the dumpsys alarm
command. The format of the output for that command is confusing at first, but essentially you're looking for something like:
where ###
in this is a number representing the number of alarm (not ###
literally)
### pending alarms:
...
...
...
RTC_WAKEUP #88: Alarm{5d74fad type 0 origWhen 1677671101000 whenElapsed 1028621179 com.sec.android.app.clockpackage}
tag=*walarm*:com.samsung.sec.android.clockpackage.alarm.UPCOMING_ALERT
type=RTC_WAKEUP origWhen=2023-03-01 04:45:01.000 window=0 exactAllowReason=permission repeatInterval=0 count=0 flags=0x5
policyWhenElapsed: requester=+7h4m50s571ms app_standby=-1m20s270ms device_idle=-- battery_saver=-55s468ms tare=-2m1s488ms gms_manager=--
whenElapsed=+7h4m50s571ms maxWhenElapsed=+7h4m50s571ms
operation=PendingIntent{493d673: PendingIntentRecord{4efa417 com.sec.android.app.clockpackage broadcastIntent}}
idle-options=Bundle[{android.pendingIntent.backgroundActivityAllowed=false, android:broadcast.temporaryAppAllowlistReasonCode=302, android:broadcast.temporaryAppAllowlistDuration=10000, android:broadcast.temporaryAppAllowlistReason=, android:broadcast.temporaryAppAllowlistType=0}]
RTC_WAKEUP #89: Alarm{e3b8930 type 0 origWhen 1677671507448 whenElapsed 1029027627 com.samsung.android.rubin.app}
tag=*walarm*:com.samsung.android.rubin.alarm.ACTION_PENDING_INTENT
type=RTC_WAKEUP origWhen=2023-03-01 04:51:47.448 window=+2h0m0s0ms repeatInterval=0 count=0 flags=0x0
policyWhenElapsed: requester=+7h11m37s19ms app_standby=-1m20s270ms device_idle=-- battery_saver=-55s352ms tare=-1h17m15s404ms gms_manager=--
whenElapsed=+7h11m37s19ms maxWhenElapsed=+9h11m37s19ms
operation=PendingIntent{e4639a9: PendingIntentRecord{84e3864 com.samsung.android.rubin.app broadcastIntent}}
...
...
...
In this example, RTC_WAKEUP #88
is the pending alarm. In that string, the output Alarm{5d74fad type
shows the alarm ID, which is 5d74fad
.
Now, executing:
service call alarm 3 s16 5d74fad
deleted my alarm. Whether this works for others or not, I cannot say. It worked for me. The output from the command is nebulous at best. I basically just had to wait for the next day. One thing I noticed, though, was when I ran this command, my phone switched to GMT (rather than localtime). Simply going in to settings for date time and toggling on/off the automatic daylight time and automatic date time fixed that.
dumpsys alarm
also show the package name of the originating app?