This is a testing tool for simulating and triggering Wireless Emergency Alerts (WEA) and Earthquake & Tsunami Warning Systems (ETWS) on Android devices.
This application uses root privileges to call hidden APIs at the Android system level, directly sending fake cell broadcast messages to the system broadcast receiver. This is extremely useful for testing the phone's alarm reception capabilities, UI display, and for developing and debugging related applications.
Severe natural disasters can cause significant loss of life and property. Timely and accurate dissemination of emergency alerts to the public, ensuring that they receive the information as quickly as possible, can effectively reduce the damage caused by disasters and protect the safety of users' lives and property. To promote the application of cell broadcast and wireless alert technologies, we developed this tool to help developers and testers simulate various emergency alert scenarios on the client side, verifying the responsiveness of devices and applications.
-
JDK: Java 11 or later (project configured with
sourceCompatibility = JavaVersion.VERSION_11, developer's computer uses JDK 21). -
Android SDK:
-
compileSdk: 36 -
minSdk: 21 (Android 5.0) -
targetSdk: 36 -
Gradle: The project includes a Gradle Wrapper; it is recommended to use the
./gradlewcommand directly.
-
Clone the project to your local machine.
-
Open the project root directory using Android Studio.
-
Sync the Gradle project.
-
Connect your device or launch the emulator.
-
Run the following command to install the debug package:
./gradlew installDebug
Or build the release package:
./gradlew assembleRelease
For detailed test cases and troubleshooting, see the Testing Guide.
-
Your Android device must have root access (Magisk, KernelSU, APatch, etc.).
-
Grant the application root access (requested the first time you tap "TRIGGER ALERT").
-
If you want to run the full tests, you need to configure the scope in the Xposed manager to enable Google Play Services alert functionality.
-
Open the application.
-
Enter the alert message.
-
Select the alert level (e.g., "Presidential" or "ETWS: Earthquake").
-
(Optional) Set the delay time.
-
Click the "TRIGGER ALERT (ROOT)" button, or slide down and click "Full Simulation".
-
Observe whether the phone displays a system-level alert pop-up.
This app includes a specialized module to trigger Google's internal Earthquake Alert UI.
-
Prerequisites:
- LSPosed/EdXposed installed.
- Enable this app in the Xposed manager.
- Scope: Ensure "Google Play Services" (
com.google.android.gms) is selected in the scope. - Reboot your device.
-
Usage:
- Expand the "Google Play Services Alerts" section.
- Configure parameters:
- Region Name: The city/region shown in the alert title.
- Epicenter (Lat/Lng): The simulated location of the earthquake.
- Distance: Your simulated distance from the epicenter (affects the "Estimated Time of Arrival").
- Damage Radius: Controls the size of the red/yellow intensity polygons on the map.
- Alert Type:
1for "Take Action" (Strong),2for "Be Aware" (Weak).
- Check "Simulate Real Alert" to remove the "Test" prefix from the UI.
- Click "Trigger GMS Alert (Xposed)".
You can fine-tune the low-level CellBroadcast parameters:
- Serial Number: Unique ID for the message. Changing this allows the system to treat it as a new alert.
- Service Category: Override the 3GPP service category (e.g., 4352 for Earthquake).
- Priority: Message priority (0-3).
- Geo Scope: Geographical scope (Cell-wide, PLMN-wide, etc.).
- DCS: Data Coding Scheme for character encoding.
- Slot Index: Target SIM slot (0 for SIM1, 1 for SIM2).
If you cannot grant root via GUI (e.g., you only have adb root), use the following steps. For Windows compatibility, it is recommended to use variables:
-
Get APK path and store in variable:
# Windows (PowerShell) $APK_PATH = adb shell "pm path top.stevezmt.cellbroadcast.trigger | cut -d: -f2" # Linux / macOS APK_PATH=$(adb shell "pm path top.stevezmt.cellbroadcast.trigger | cut -d: -f2")
-
Execute trigger command:
# Format: adb shell "CLASSPATH=$APK_PATH app_process /system/bin top.stevezmt.cellbroadcast.trigger.RootMain <Base64> <type> <delay> <isEtws> <serial> <category> <priority> <scope> <dcs> <slot> <lang>" # Example: Earthquake alert with serial 1234 and priority 3 adb shell "CLASSPATH=$APK_PATH app_process /system/bin top.stevezmt.cellbroadcast.trigger.RootMain '5Zyw6ZyH6aKE6K2m' 0 0 true 1234 -1 3 3 0 0 'zh'"
Parameter Description (In order):
Base64 content: UTF-8 string encoded in Base64.Type Code: CMAS (0-4) or ETWS (0-4).Delay ms: 0 for immediate.isEtws:trueorfalse.Serial: 0-65535 (default 1234).Category: Override value (default -1).Priority: 0-3 (default 3).Geo Scope: 0-3 (default 3).DCS: Data Coding Scheme (default 0).Slot Index: 0 or 1.Language: e.g., 'zh' or 'en'.
If you don't need advanced options:
adb shell "CLASSPATH=$APK_PATH app_process /system/bin top.stevezmt.cellbroadcast.trigger.RootMain '<Base64>' <type> <delay> <isEtws>"Please use this tool responsibly.
-
This application is for development, testing, and research purposes only.
-
It is strictly forbidden to use this application to trigger alarms in public places or in situations that may cause misunderstanding or panic among others.
-
The simulated alarm sound and vibration are completely identical to a real alarm and may cause disturbance or fright to those around you.
-
The developer is not responsible for any consequences resulting from the misuse of this tool.