Notifications, App Links & faults
Outcome: test the real-world edges where Android apps actually break—notifications, deep-link routing, split APKs, poor connectivity, process death, GPS changes, and folding screens.
Ask your agent
Section titled “Ask your agent”Trigger a chat notification, reply to it inline using Olef without echoing thereply text in logs, open the resulting deep link, and verify the conversationsurvives process death via `olef fault inject`.1. Inspect and act on notifications
Section titled “1. Inspect and act on notifications”Notifications are often the entry point to a user flow. Listing and waiting run from the host scoped to --app:
olef device notifications list --app com.example.appolef device notifications wait --app com.example.app --timeout-ms 10000To dismiss a notification or tap one of its actions—including RemoteInput inline replies with secret-safe environment variable input—Olef lazily enables its NotificationListenerService and revokes it automatically on olef disconnect:
export REPLY_TEXT="On my way!"olef device notifications action --app com.example.app \ --key "<notification-key>" --action "Reply" --reply-env REPLY_TEXT2. Inspect APKs, split installs, App Links & intents
Section titled “2. Inspect APKs, split installs, App Links & intents”Check the built artifact offline before installing it, stream split APKs, verify Android App Links domain state, and launch typed intents:
olef app inspect app/build/outputs/apk/debug/app-debug.apkolef app install base.apk config.arm64_v8a.apk --inherit-unchangedolef app applinks --app com.example.appolef app resolve-intent --action android.intent.action.VIEW --data "https://example.com/item/42"olef app open-intent --action android.intent.action.VIEW --data "https://example.com/item/42" --expect-frontUse --extra-str-env to pass sensitive string extras without writing them into command logs or JSON output.
3. Inject and clean up faults on purpose
Section titled “3. Inject and clean up faults on purpose”List all supported fault kinds (one-off actions vs. stateful faults undone by fault clear):
olef fault kindsExercise process death, airplane mode, GPS location changes (emulator), or foldable device posture transitions:
olef fault inject process-death --app com.example.appolef fault inject location --lat 37.7749 --lon -122.4194olef fault inject posture --state half-openedolef fault listolef fault clear --allFor multi-step chaos checks, olef fault run <scenario.json> executes commands, faults, waits, and assertions—and guarantees every injected fault is cleared when the run exits, pass or fail.
Limits
Section titled “Limits”fault inject locationis emulator-only;fault inject posturerequires a device or emulator advertising multiple hinge states.app inspectrequiresaapt2(part of Android SDK Build-Tools).
See olef device, olef app, and olef fault.