APK Downloader
·14 min read

Sideloaded Alarm and Reminder APKs Don't Fire on Time: SCHEDULE_EXACT_ALARM and Doze, Diagnosed Step by Step

You installed a third-party alarm, calendar, to-do or medication-reminder APK. Everything looks right, permissions are granted, but the 07:30 alarm never fires - or fires minutes late, or stops working after the phone sleeps, or all reminders vanish after a reboot. This is rarely a broken app. Since Android 12 (API 31), exact alarms require the special SCHEDULE_EXACT_ALARM permission for apps with targetSdk >= 31, and Doze, App Standby buckets and OEM background freezing add further throttling. A full mechanism table, runnable adb / curl commands, a nine-step diagnostic path, a status reference, version differences, an FAQ, and verified internal links.

exact alarmsSCHEDULE_EXACT_ALARMDozeadbtroubleshooting

There is a class of failure that gets written off as "this APK just isn't compatible with my phone". You install a third-party alarm, calendar, to-do list, medication reminder, pomodoro timer or habit tracker. The UI is polished, every setting saves, permissions are granted - and the 07:30 alarm simply never fires. Sometimes it fires three or four minutes late, sometimes not until you unlock the screen, sometimes a whole night of reminders is missed at once. Worst of all, after a reboot the previously configured alarms are simply gone.

So people reinstall repeatedly, clear data, switch builds, disable battery optimisation, tick every autostart switch they can find. Some of that helps briefly, some does nothing, because nobody has separated the layers. The fact that you can *set* an alarm proves the app's UI and local storage are fine. Failing to fire means that "wake me at an exact moment" stopped being a free capability: since Android 12 (API 31) it is a system capability that needs its own grant and is throttled from several directions at once.

At least four gates sit on that path: whether the SCHEDULE_EXACT_ALARM special permission is granted, whether the app uses setExact() or a throttled inexact API, whether Doze and the App Standby bucket pushed it into a maintenance window, and whether an OEM ROM froze its background or blocked autostart. They are independent, any one of them produces "didn't fire", and each has a different fix. It is especially confusing when one APK behaves perfectly on Android 11 and then loses every reminder on Android 13 or 14 - which is exactly where the permission model changed.

This article takes the chain apart: four distinct failure shapes, a mechanism table identifying which gate is blocking, copy-paste adb / curl commands, a nine-step diagnostic path, a status reference, version differences, an FAQ and verified internal links. Two actions do the heavy lifting: `dumpsys alarm` to see whether the alarm was actually scheduled and as what type, and `appops` to read the real state of the exact-alarm permission.

1. Separate the four kinds of "didn't fire" before reinstalling

Exact-alarm problems vary on the surface, but the cause lands in one of four buckets:

  • Never fires at all. The time passes with no notification, sound or vibration. dumpsys alarm either has no such entry or shows it as inexact. Usually a missing grant or an app that failed to re-register.
  • Fires minutes to tens of minutes late. The classic Doze fingerprint: the system releases deferred alarms in a maintenance window, so a 07:30 reminder arrives at 07:52.
  • Works while the screen is on, fails after the phone sleeps. Awake and in the background it fires fine; once deep idle begins, inexact alarms get deferred to the next maintenance window. Strongly tied to battery-optimisation allowlists and App Standby buckets.
  • Everything is lost after a reboot. Android alarms do not persist across reboot; the app must listen for BOOT_COMPLETED and re-register. If a sideloaded build is blocked from receiving that broadcast, all alarms are empty after restart.

Two distractors to rule out immediately: notifications are disabled (Android 13's POST_NOTIFICATIONS runtime permission and notification channels), where the alarm *did* fire but nothing was shown; and silent/DND mode, media volume, or a channel downgraded to silent. Both get misremembered as "the alarm didn't ring", yet dumpsys alarm shows a trigger and dumpsys notification shows a suppressed notification. Section 5 has a dedicated check for each.

2. Mechanism table: what each of the four gates blocks

The table below lists every rule between "set a reminder" and "notification appears at that time". Match the symptom column against your logs.

Gate / triggerSystem behaviourApp-side resultTypical symptom
targetSdk <= 30Legacy exact-alarm behaviour, no special permissionEverything worksOlder APK builds "just work"
targetSdk >= 31, no SCHEDULE_EXACT_ALARMsetExact() throws SecurityException or downgradesAlarm not scheduled / becomes inexactNever fires, or large delays
User revoked "Alarms & reminders"canScheduleExactAlarms() returns falseExact APIs unavailableWorked before, broke after a Settings change
USE_EXACT_ALARM declared (API 33+)Auto-granted, user cannot revokeExact alarms availableCorrect approach for alarm/calendar apps; Play category review applies
set() / setWindow() instead of setExact*System may batch and defer freelyTrigger falls into a maintenance windowFine awake, late asleep
setExactAndAllowWhileIdle()Fires during Doze, but per-app rate limitedFires in deep sleep, throttledOnly the first of several reminders fires
Deep Doze (IDLE)Ordinary alarms deferred to maintenance windowsMinutes to tens of minutes lateA whole night of catch-up deliveries
App Standby bucket (active/working/rare/restricted)Tightens Job/Alarm/network quota by bucketRarely-used apps throttled hardestWorks for two days after install, then fails
Battery optimisation allowlistNot exempt from Doze without itBackground frozenRecovers after disabling optimisation
OEM autostart / background freezeExtra limits on autostart, related launches, lock-screen cleanupProcess killed, BOOT_COMPLETED never receivedAll alarms empty after reboot
Android 13 POST_NOTIFICATIONS not grantedAlarm fires but notification blockedSilent, no visible tracedumpsys alarm has the trigger
Channel importance / DNDNotification downgraded or silencedVisible but inaudibleCheck notification state
Manual system time / timezone changeTrigger baseline shiftsEverything early or lateCheck date and auto_time

The most overlooked point: "the alarm didn't fire" and "the notification didn't show" are different problems. dumpsys alarm records whether the system woke the app as scheduled; dumpsys notification records whether the user saw anything. Classify with the first one before spending half an hour fixing notification permissions for an alarm-permission problem.

3. A special permission is not a normal permission

SCHEDULE_EXACT_ALARM is a special app access introduced in Android 12, not a runtime dialog permission:

  • It does not live under "Permissions" but under Settings -> Apps -> Special app access -> Alarms & reminders; the user has to flip it manually, and the app can send them there with ACTION_REQUEST_SCHEDULE_EXACT_ALARM.
  • For targetSdk >= 31 the system grants it by default, but the user can revoke it at any time, and some ROMs or enterprise policies default it off. Apps should call AlarmManager.canScheduleExactAlarms() before every alarm, not assume the grant.
  • Without the grant, setExact() / setExactAndAllowWhileIdle() throw SecurityException. Uncaught, that crashes the alarm-setting screen; swallowed, it looks like "saved but never scheduled".
  • Android 13 added USE_EXACT_ALARM: auto-granted and non-revocable, but only for apps whose core function is an alarm or calendar (store category review applies). You can check whether a sideloaded build declares it with aapt dump permissions.

The second layer is Doze. After the phone sits still, screen off and unplugged, it enters deep IDLE and the system defers network, JobScheduler and ordinary alarms into batched maintenance windows. Only setExactAndAllowWhileIdle() can fire an exact alarm during deep sleep, and the system caps its frequency per app (roughly once per minute), so "five reminders in a row" may only deliver the first. That also explains why disabling battery optimisation so often appears to fix things - it lifts the app out of Doze constraints, but does nothing about the permission. Verify the two separately.

4. Runnable command list

All commands below run from a computer over adb, or directly against the APK file; none require root. Replace <pkg> with the target package (e.g. com.example.alarm).

# 1. Confirm the device and exact package name
adb devices
adb shell pm list packages | grep -i alarm
adb shell pm path com.example.alarm

# 2. Read targetSdk and declared permissions
aapt dump badging app.apk | grep -E "package:|targetSdkVersion:|uses-permission:"
aapt dump permissions app.apk | grep -i -E "SCHEDULE_EXACT_ALARM|USE_EXACT_ALARM|POST_NOTIFICATIONS|RECEIVE_BOOT_COMPLETED"

# 3. The single most important step: what alarms are actually scheduled, and of what type
adb shell dumpsys alarm | grep -i -A12 -B2 "com.example.alarm"
adb shell dumpsys alarm | grep -i -E "ELAPSED_WAKEUP|RTC_WAKEUP|EXACT|WHILE_IDLE|ALLOW_WHILE_IDLE|window|maxWhen"

# 4. Read the real special-permission state (appops is more reliable than the Settings page)
adb shell appops get com.example.alarm SCHEDULE_EXACT_ALARM
adb shell appops get com.example.alarm USE_EXACT_ALARM 2>/dev/null || true
adb shell cmd appops get com.example.alarm 2>/dev/null | grep -i -E "SCHEDULE_EXACT|USE_EXACT|RUN_ANY_IN_BACKGROUND"

# 5. Open the "Alarms & reminders" page for a manual grant (no root needed)
adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM -d "package:com.example.alarm"
# Fallback if the ROM does not support that action
adb shell am start -a android.settings.MANAGE_SPECIAL_APP_ACCESSES

# 6. Inspect Doze state, allowlist and App Standby bucket
adb shell dumpsys deviceidle | grep -i -E "mState|mDeepEnabled|mLightEnabled|mScreenOn|mCharging"
adb shell dumpsys deviceidle whitelist | grep -i com.example.alarm
adb shell am get-standby-bucket com.example.alarm
adb shell dumpsys usagestats | grep -i -A3 com.example.alarm

# 7. Check whether the notification - not the alarm - is being suppressed
adb shell dumpsys notification --noredact | grep -i -A15 com.example.alarm
adb shell appops get com.example.alarm POST_NOTIFICATIONS
adb shell cmd notification get-notification-policy 2>/dev/null || true
adb shell settings get global zen_mode

# 8. Verify system time, timezone and automatic time (a shifted baseline moves every trigger)
adb shell date
adb shell settings get global auto_time
adb shell settings get global auto_time_zone
adb shell getprop persist.sys.timezone

# 9. Capture trigger / failure logs
adb logcat -c && adb logcat -s AlarmManager DeviceIdleController NotificationService AndroidRuntime | grep -i -E "exact|alarm|idle|SecurityException|denied|suppressed"

# 10. Diagnose post-reboot loss: BOOT_COMPLETED receiver and autostart
adb shell dumpsys package com.example.alarm | grep -i -A10 "BOOT_COMPLETED\|Receiver"
adb shell cmd package query-receivers --brief -a android.intent.action.BOOT_COMPLETED -p com.example.alarm
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -p com.example.alarm

# 11. From the PC, confirm a server-driven push / time-sync endpoint is reachable
curl -sSI "https://www.example.com/api/health" | head -20
curl -sS -o /dev/null -w "http_code=%{http_code} time_total=%{time_total}\n" "https://www.example.com/api/health"

Usage notes. dumpsys alarm output is long; grep -A12 pulls the entries for that package along with their type fields. Seeing RTC_WAKEUP / ELAPSED_WAKEUP with an exact marker means the alarm really is scheduled; entries with only a window or maxWhen range are inexact. appops get in step 4 returns No operations on some ROMs - fall back to full cmd appops get output and filter. am get-standby-bucket returns 10/20/30/40/45 for active / working set / frequent / rare / restricted; the higher the value, the harder the throttling. The curl in step 11 matters because some "alarms" are actually server-scheduled push notifications with no local exact alarm at all - in that case the problem is network and push tokens, not permissions.

5. Nine-step diagnostic path

Work in order and stop as soon as one step identifies the cause.

  1. Separate "didn't fire" from "didn't show": is there a trigger record in dumpsys alarm for that time? Yes -> jump to step 6 for notifications; no -> continue.
  2. Read targetSdkVersion with aapt dump badging. <= 30 largely rules out exact-alarm permission as the primary cause - move to Doze and OEM freezing; >= 31 continue.
  3. Check permission declarations with aapt dump permissions for SCHEDULE_EXACT_ALARM, USE_EXACT_ALARM and RECEIVE_BOOT_COMPLETED - grant, grant-free, and reboot rebuild respectively.
  4. Read the actual permission state: appops get <pkg> SCHEDULE_EXACT_ALARM. If it is ignore / default and canScheduleExactAlarms() is false, use the Settings action in step 5 to let the user grant it.
  5. Check the alarm type in dumpsys alarm. If it is setWindow / range-based, that is the app's own implementation choice - switch to a build that uses exact alarms or accept the delay.
  6. Rule out the notification layer: dumpsys notification --noredact, appops get POST_NOTIFICATIONS, settings get global zen_mode - confirm it is not a silent channel or DND.
  7. Check Doze and Standby: dumpsys deviceidle for current state, whitelist for exemption, am get-standby-bucket for the bucket. Late only in deep sleep without an allowlist is close to a diagnosis.
  8. Check time and reboot: date, auto_time, timezone; then whether query-receivers lists a BOOT_COMPLETED receiver and whether autostart is blocked by the ROM.
  9. Do a version comparison: run the same APK on Android 11 and Android 13/14 devices to confirm the problem tracks the OS level; then decide between switching to a build adapted with USE_EXACT_ALARM and granting permission / allowlist / autostart one by one.

6. Status and error reference

Symptom / command outputLayerMeaningNext step
SecurityException: ... SCHEDULE_EXACT_ALARMSpecial permissionExact API deniedSteps 4, 5
appops SCHEDULE_EXACT_ALARM: ignoreSpecial permissionUser revoked the grantOpen Settings and grant
No package entry in dumpsys alarmRegistrationAlarm never scheduledSteps 3, 4
Entry is window / maxWhen rangeAlarm typeInexact, batchableStep 5
RTC_WAKEUP + exact, still nothingPost-triggerAlarm fired, notification blockedStep 6
POST_NOTIFICATIONS: ignoreNotification permissionAndroid 13 grant missingGrant notifications
zen_mode = 1 / 2Do Not DisturbNotification silencedDisable DND or add exception
mState=IDLE, not allowlistedDozeDeep-sleep throttlingStep 7 allowlist
get-standby-bucket = 40/45App StandbyRare/restricted bucket, tight quotaRaise usage or allowlist
No BOOT_COMPLETED receiverReboot rebuildAlarms never recreatedStep 8
auto_time=0 with clock driftSystem timeTrigger baseline shiftedEnable automatic time
Reproduces only on Android 12+Version gatetargetSdk >= 31 permission modelSection 7 comparison

7. Version differences

Android versionKey changePractical effect on sideloaded reminder apps
Android 11 (API 30) and belowExact alarms need no special permissionBaseline for older APKs
Android 12 (API 31)SCHEDULE_EXACT_ALARM introduced; targetSdk >= 31 must check canScheduleExactAlarms()The watershed where failures start
Android 13 (API 33)USE_EXACT_ALARM added (auto-granted, alarm/calendar only); POST_NOTIFICATIONS runtime permissionNew cause of "fired but not shown"
Android 14 (API 34)Exact-alarm grant tightened for newly installed apps; stricter background startsSideloaded builds fail more often by default
Android 15 / 16Same permission model; stricter Doze and Standby policyDepends more on correct declarations and allowlists

8. FAQ

Q1: Does disabling battery optimisation solve it completely?

Only the Doze layer. If the cause is a missing SCHEDULE_EXACT_ALARM grant (targetSdk >= 31), exact alarms still cannot be scheduled; you must grant it separately under "Alarms & reminders".

Q2: Why is it on time with the screen on but late after the phone sleeps?

Once deep Doze starts, ordinary and inexact alarms are deferred into batched maintenance windows. setExactAndAllowWhileIdle() or a battery-optimisation allowlist helps, but the system rate-limits exact alarms during deep sleep.

Q3: What is the difference between `USE_EXACT_ALARM` and `SCHEDULE_EXACT_ALARM`?

The former is Android 13+, auto-granted and non-revocable, but restricted to apps whose core function is an alarm or calendar (store category review). The latter is the Android 12 special permission, granted by default but revocable. aapt dump permissions shows which one the build declares.

Q4: All alarms are gone after a reboot - is the app broken?

Android alarms do not survive reboot; the app must listen for BOOT_COMPLETED and re-register. If OEM background freezing or autostart limits block that broadcast, nothing gets rebuilt. query-receivers and the autostart setting are the places to look.

Q5: Are notification permission and alarm permission the same thing?

No. Alarm permission decides whether the system can wake the app at an exact moment; notification permission (Android 13 POST_NOTIFICATIONS) decides whether anything can be shown afterwards. A trigger in dumpsys alarm with no matching notification in dumpsys notification is the latter.

Q6: I set five reminders in a row and only the first fired - why?

setExactAndAllowWhileIdle() is rate limited per app during deep sleep (roughly once per minute), and OEM background freezing can merge or drop dense reminders. Space them out, add the allowlist, or use a foreground-service based reminder design.

Q7: Is downgrading to an older APK the easiest workaround?

If the older build has targetSdk <= 30, it does bypass exact-alarm permission and is a valid short-term option. But old targetSdk faces install blocking on Android 14+ and tighter background limits, so the durable fix is a build declaring USE_EXACT_ALARM.

Q8: How do I tell this "alarm" is actually a server push?

Use the curl check in step 11 and inspect aapt dump permissions for RECEIVE_BOOT_COMPLETED and SCHEDULE_EXACT_ALARM. If the app declares no local alarm permission at all, reminders are almost certainly server-delivered and the problem belongs to network, push tokens and GMS dependency.

Q9: Can a work-managed device block this permission?

Yes. A device policy can apply background restrictions to specific apps or users, and special access may be locked by policy. If appops shows a policy denial, the ordinary Settings page will not change it - contact the device administrator.

Q10: When should I leave this chain and look elsewhere?

When dumpsys alarm shows exact alarms firing normally and notification permissions and channels are all fine, but there is still no sound - then the problem is audio focus, media volume, a missing ringtone resource or channel configuration, outside permissions and throttling.

9. Further reading

These in-site articles sit adjacent to this diagnostic chain:

Bottom line

"Alarm doesn't fire on time" is not a broken app - since Android 12, exact alarms are a capability that needs its own grant and is throttled by Doze and OEM background policy. Two actions do the heavy lifting: `dumpsys alarm` to confirm whether the alarm was scheduled and as exact or window-based, and `appops get <pkg> SCHEDULE_EXACT_ALARM` to read the real permission state. The first separates "didn't fire" from "didn't show"; the second separates permission from throttling. Once a missing grant is confirmed, stop reinstalling - allow it under Settings -> Special app access -> Alarms & reminders, or switch to a build that declares USE_EXACT_ALARM.