Important
This is a personal fork of steve1316/uma-android-automation. All original credit goes to steve1316 and the contributors of the upstream project. The core bot engine -- the screen reading, the training/racing/event logic, and the app itself -- is entirely their work.
I did not create the original bot. The core engine is steve1316's; this fork adds features and decision-logic on top of it (see the honest breakdown below). If you're looking for the original project, please visit the upstream repository linked above.
steve1316 built the bot engine. This fork is a substantial body of work on top of it -- roughly 300 commits past the v5.4.8 fork point -- turning that engine into a hands-off, meta-aligned distribution. Here is an honest split of what I added versus what is steve1316's.
Hands-off, multi-run grinding
- Multi-run queue -- queue 2-20 consecutive careers so the bot grinds unattended, with configurable run count, inter-run delay, and stop-on-error.
- Trainee rotation -- queue several different trainees and the bot cycles through them, each run under her own preset, switching automatically between careers (off by default). URA Finale, Unity Cup, and Trackblazer mix freely: the bot pages the Scenario Select carousel to each trainee's scenario between runs. Grand Concert is the exception and cannot be queued or rotated yet -- start those careers yourself.
- Between-run navigation -- the bot walks back through the post-career menus and launches the next run by itself, and stops with a clear message instead of looping when it hits a screen it can't handle.
- Verified preset launch -- Start waits until the preset you selected is confirmed saved before it launches, so the trainee shown on Home is always the trainee that runs. If the save can't be confirmed, the launch is blocked with a clear message and your selection is kept -- just press Start again.
- Overnight resilience -- the bot keeps the screen awake, restarts itself if it freezes, resumes the queue after a crash, gives up on a stuck run after a time limit you set, restores TP from whatever is available (Toughness, then Star Fruit, then a Carats refill), rides out brief connection outages and the daily reset's bounce back to the lobby without losing the career, and repairs its own Accessibility service when an emulator like MuMu silently kills it mid-run. Each of these came from a real overnight queue that died early.
- Fast trainee switching -- the bot remembers where each trainee sits in the roster grid, so a queue switching trainees jumps straight to her instead of scanning the whole roster (measured at roughly ten seconds once the grid is anchored, against about ninety for a full scan), and it always verifies the name on screen before advancing.
- Career-end spark reroll -- opt-in, off by default: spends 30 TP once to redraw a career's spark set when the set is weak. The decision is priced from measured spark odds: a 2-star or better stat spark is always kept, a 1-star one is redrawn unless a 3-star spark elsewhere in the set would be put at risk, and TP is refilled with items if it is short. After the spend, the bot reads both the original and the redrawn set on the game's selection screen and keeps the better one, verifying the named set on the final confirmation before committing; anything it cannot verify stops safely for you to finish by hand. The selection step is new and experimental -- supervise it.
Pick-and-go presets
- 231 hand-tuned character presets -- 72 characters and outfits across 4 scenarios (URA Finale / Unity Cup / Trackblazer / Grand Concert), each pre-filling stat priorities, race plan, skill plan, event picks, and training thresholds, plus dedicated parent-farming "Legacy Farm" builds that race generated G1-dense schedules for breeding careers. A searchable trainee picker shows per-scenario recommendations, a badge telling you whether a build is proven in real runs or still research-based, and starred favorites; applying a preset sets its scenario with it. Pick a trainee, hit Start -- no manual tuning required.
- Scenario advisories -- the Home page shows a green "good pick" or yellow "mismatch" banner (with the reason) for the selected trainee and scenario, the rotation editor flags each mismatched slot inline, and starting a known-mismatch run (single preset or any rotation slot) asks for confirmation first so a doomed pairing never launches by accident.
Decision-engine extensions (built on top of steve1316's scoring)
- Optimize Knapsack skill buying -- works out the best combination of skills your end-of-career points can buy, including how upgrade chains exclude each other, instead of just grabbing the best-looking skill first.
- Skill-spend timing control -- choose when the bot buys skills mid-career: preset thresholds (0 / 350 / 700 / 1200 SP), a typed value, or "Career end" to hold everything for the Pre-Finals and end-of-career buys the way the upstream project does. Your choice sticks across preset and rotation switches.
- Deck validation at career start -- warns immediately if the trainee's aptitudes are too low or her race predictions won't be visible to the bot, instead of letting a doomed run waste half an hour.
- Single-star prediction detection -- the bot can see single-star races on the race list (the original only sees double-star ones), and forces a fan-earning race when a Junior fan goal is about to fail.
- Unity Cup opponent selection -- reads the showdown prediction circles on the confirmation screen and picks the best-predicted matchup (double circles weighted over single) rather than always taking the middle card.
- July 2026 rebalance adaptation -- per-scenario stat caps (URA 1400 / Unity Cup 1300 with Wit 1800 / Trackblazer 1200 with Stamina 1900 and Wit 1500 / Grand Concert 1300 with Speed 1600 and Guts 1500) and a scenario-aware stat-reading ceiling, so a legitimate high stat past the old flat 1200 limit is no longer discarded as a misread. URA Finale's new Happy Meek duel screen is handled by contesting the trainee's strongest stat.
- Race and training refinements -- mandatory races retry toward 1st place when a free retry is available, and training anticipates rainbows from bars close to maximum friendship.
- Trackblazer tuning -- Akikawa-bonding training priority (a proxy for MotY points), climax energy-item reservation, an Alarm Clock retry policy, and an opt-in irregular-training gate. Trackblazer is the fork's most-tuned scenario.
- Mood-floor guard -- an optional stricter mood floor for trainees with single-option mood-trap events.
- Results history -- every career saves a record of how it ended (completed / force-ended / cut short) together with the settings it ran under, an estimated overall rank (the B+/A/S grade the game shows, computed from stats, skills, and aptitudes), whether a URA finale was actually won, and the full spark set the career produced. A bundled tool turns a batch of records into a per-trainee results table, so preset tuning can be measured across many runs instead of judged one at a time. Extra diagnostics for bug reports sit behind the Debug Mode setting.
- Support-card dating schedule -- off by default: with a Group support card in the deck, the bot takes its recreation outings on the right career turns to advance the card's outing chain and times the final outing for the Pure Passion training buff.
New modes -- Daily Races and Team Trials task modes (upstream is career-only), for burning the daily attempts without touching a career.
UI and quality of life -- a settings search across every page, a named-profile manager, queue progress with a skip-run button, and an icon overhaul that fixed a first-launch crash.
Distribution -- rebranded to "UMA Auto+" with a distinct dark-navy "U+" icon (white "U", orange "+") and its own applicationId so it installs alongside the original; a GitHub Actions pipeline that builds and publishes signed APKs on every release tag; and an in-app update checker.
The core engine -- the part that makes any of this possible -- is steve1316's, built on his android-cv-automation-library:
- The
Game/Campaignorchestration and the URA Finale / Unity Cup / Trackblazer scenario framework. - The screen-recognition system and its full image library.
- The text reading (Google ML Kit + Tesseract) and the optional YOLOv8 stat-gain detector.
- The base training, racing, and training-event scoring logic.
- The training-event recognizer that matches on-screen event names against the game database.
- The app itself -- its architecture and the whole Settings UI.
I also continuously merge steve1316's ongoing improvements (energy-item conservation, per-distance race strategies, megaphone stat thresholds, game-data updates, and more) -- those are his work that I cherry-pick in.
My work extends that engine's decisions and wraps it in a hands-off distribution; it does not replace it. For the full version-by-version list of changes, see the CHANGELOG.
| Original repo | steve1316/uma-android-automation |
| Original author | steve1316 |
| Discord | https://discord.gg/5Yv4kqjAbm |
| Fork base version | v5.4.8 |
Tip
For a detailed explanation of how the bot works -- including the decision engine, training scoring, racing system, item management, and scenario-specific logic -- see HOW_IT_WORKS.md. That document is from the original project.
A few common questions, answered plainly:
- Does the bot change my support deck? No. The queue reuses whatever deck you built, career after career, and never swaps a card you placed. The optional Auto-Fill Support Deck setting (on by default) only fills slots you left empty -- it never touches existing cards.
- Can I set everything up myself like in the original? Yes. Build your deck, pick your parents, start the career, and press Start once you're on the training screen -- the bot plays from there and never sees a setup screen, exactly like the upstream project.
- What about the borrowed friend card? That one the game itself forces: the borrow resets every career, and Start Career silently does nothing while the slot is empty. So on unattended queue runs the bot has to pick one -- Smart Borrow (on by default) scrolls down through the borrow list and takes the best card it finds from a curated list of great picks, skipping any card that would duplicate a character already in your deck and any card of the trainee you are about to run (the game refuses both kinds of deck), and falling back to your strong friend card or the first valid row. The formation is verified before Start Career is pressed, a conflicting borrow gets swapped for the next valid card, and the queue stops with a clear message when no valid borrowed support exists. Follow trainers with strong cards to give it good options, or turn Smart Borrow off to keep the plain top-row pick.
- Is there a racing plan? Yes -- the same Race Planner the upstream project has, plus more: every preset ships a hand-curated racing plan for its trainee, the smart-racing scheduler fills fan gaps dynamically, and the parent-farming presets run generated G1-dense schedules.
This project is purely for educational purposes to learn about Android automation and computer vision - basically a fun way to practice coding skills. Any usage is at your own risk. No one will be responsible for anything that happens to you or your own account except for yourself.
- Android Device or Emulator (Nougat 7.0+)
- Hard requirement for Android phones is 1080p and 240 DPI or 450 DPI (for Samsung phones). If your device do not meet these, you can try the
Basic Template Matching Testin the Settings under theDebug Testssection to determine the best scale to use in theSet the Custom Image Scale for Template Matchingsetting. If not, then you can also try the To set the phone's resolution to 1080p (faster and more accurate) section to forcibly set the display resolution and DPI of your Android phone. Note that may come with the side-effect of your device UI being scrunched in or zoomed out. - Tested emulators are Bluestacks 5 (Pie 64-bit, but other versions should work) and MuMu. The following setup is required:
- Portrait Mode needs to be forced on always.
- Bluestacks itself needs to be updated to the latest version to avoid Uma Musume crashing.
- In the Bluestacks Settings > Phone, the predefined profile needs to be set to a modern high-end phone like the Samsung Galaxy S22.
- Setup for both BlueStacks and MuMu:
- 4 CPU Cores
- 4GB Memory
- 1080 x 1920 (width x height)
- 240 DPI (This is important)
- Hard requirement for Android phones is 1080p and 240 DPI or 450 DPI (for Samsung phones). If your device do not meet these, you can try the
Warning
If you change the display resolution while the overlay button is still active, you will need to restart the app for the change to take effect.
Important
The in-game graphics need to be set to Standard instead of Basic.
- Completes a full run from start/midway to its conclusion.
- Supports multiple scenarios including URA Finale, Unity Cup, Trackblazer, Grand Concert, and those in the future to come.
- Recognizes the game's screens and buttons in real time.
- Reads training stat gains with an on-device vision model for improved accuracy.
- Reads on-screen text and matches it against the game's event database.
- Modern user interface built using React Native, Typescript and Expo for full configurability.
- Remote Log Viewer to watch the bot's progress live from a browser on your PC.
- Screen recording for debugging to easily capture and review issues.
- Import/export settings as JSON, alongside customizable skill point buying plans and training configurations.
- Smart racing plan that dynamically schedules extra races based on current stats and fan requirements.
- Training Event customization per event for fine-grained control over choices.
- Load and manage profiles for the Training Settings to easily swap between different builds.
- A multitude of settings to configure including setting preferred stat targets per distance.
- Download the latest
.apkfile from theReleasessection on the right of this page and install it on your Android device. - Open the application. Upon launching, navigate through the user-friendly frontend to select your desired scenario (URA Finale, Unity Cup, etc.) and configure your training priorities, races, and other settings.
- You can review your loaded settings and configurations directly on the Home page.
- Tap the
Startbutton. If this is the first time, you will be prompted to grantOverlaypermissions and enable theAccessibilityservice.
Note
On newer Android versions, you're required to enable Allow restricted settings in the app's App Info settings.
Tip
Emulator users (especially MuMu): grant this permission once so the bot can recover when the emulator silently kills the Accessibility service mid-run. Without it, unattended runs stop the first time that happens:
adb shell pm grant com.lhceist41.uma_auto_plus android.permission.WRITE_SECURE_SETTINGS
Run it from a PC with adb, or on-device with aShell You + Shizuku (the same tools as the resolution steps below).
- Once enabled, tapping
Startwill ask for screen-capture access (selectEntire screenif prompted). A floating overlay button will appear that you can drag around the screen. - Follow the guidance overlay when you drag the overlay button for the places on the screen to safely leave the button at to avoid covering important UI elements.
Caution
Placing the overlay button over important UI elements will interfere with the bot's ability to read the screen.
- Navigate to the main training menu in Uma Musume (where Rest, Train, Buy Skills, Races, etc. are visible).
- Tap the overlay button to start automation.
Tip
Use minimal or deactivated notifications so nothing covers the top of the screen while the bot reads it.
Tip
Hitting stops, stuck screens, or "trainee not found"? See TROUBLESHOOTING.md.
- Install
Android Studioand create any new project or open an existing one in order for theLogcatconsole to appear at the bottom. - Connect your Android device to your computer:
- USB Connection: Enable
Developer OptionsandUSB Debuggingon your device, then connect via USB cable. - Wireless Connection: In Developer Options, enable
Wireless debuggingand pair your device using the pairing code or QR code. - Bluestacks or other emulators: In the emulator settings, there is usually an option to allow ADB wireless connection on
127.0.0.1:5555. Enabling that option should be enough, but if Android Studio still does not see it, you can open up a terminal likecmdand typeadb connect 127.0.0.1:5555and it should sayconnected to 127.0.0.1:5555.
- USB Connection: Enable
Tip
You may need to type adb disconnect to disconnect all ADB connections beforehand for a fresh slate.
- In Android Studio's Logcat console at the bottom of the window, select your connected device from the device dropdown menu.
- Filter the logs by typing
package:com.lhceist41.uma_auto_plus [UAA]or just[UAA]in the search box to see only the logs from this app. - Run the app - you'll now see all of its logs appear in real-time as it runs.
Note
This only works when downscaling. If your device's official resolution is lower than 1080p it will most likely not work.
-
Install the aShell You app. This allows you to run adb commands locally on your Android device, but requires Shizuku.
-
Install Shizuku, then start it by following these instructions.
-
With Shizuku started, you can then use aShell You to send the following adb commands:
- Change resolution to 1080p:
wm size 1080x1920 && wm density 240 - Revert to original:
wm size reset && wm density reset
You can also bookmark the commands for your own convenience.
- Change resolution to 1080p:
Alternatively, you can do the same on a computer if you cannot get the above to work out.
- Install adb. You will also to add the file path to the folder to
PATHvia theEnvironment Variablesetting underView advanced system settingsso that the terminal will know what theadbcommand should do. You may need to restart your computer to have your terminal pick up the changes. - Open up a new terminal anywhere (cmd, Powershell, etc).
- Plug in your Android device via USB. If all goes well, then executing
adb deviceswill show your connected device whenSettings > Developer options > USB Debuggingis enabled. There may be a popup on your Android device beforehand asking you to give permission to connect to ADB. Wirelessly connecting to ADB is also available via the AndroidSettings > Developer options > Wireless debugging - Execute the following commands individually to forcibly set your display resolution to 1080p and DPI to 240:
- Change resolution to 1080p:
adb shell wm size 1080x1920andadb shell wm density 240 - Revert changes:
adb shell wm size resetandadb shell wm density reset
- Change resolution to 1080p:
Warning
If your home button disappears, reset the DPI back to default.
Tip
Use 1.0 scaling and an 80% confidence threshold for best results in 1080p natively.
This project is separated into a React Native frontend configured via Expo and an extensive Kotlin/OpenCV backend.
- Download and extract the repository.
- The project uses a YOLOv8 model for stat gain detection. Ensure the
best.onnxmodel file is present in theandroid/app/src/main/assets/directory.
Important
Without the ONNX model file, the YOLO stat detection feature will not work. Template matching will still function as a fallback.
- The project utilizes Expo. Run
yarn installfrom the root directory to install frontend dependencies. - The dev environment is ready. Run
yarn startornpx expo startto run the Metro HTTP server. - To ensure code consistency, developers should format and lint the codebase using the following commands:
yarn format: Runs both formatters below.yarn format:tsx: Formats.tsxfiles using Prettier. Note it globs**/*.tsxonly, so plain.tsfiles are not covered.yarn format:kt: Formats only Kotlin files using Ktlint (following settings in android/.editorconfig).
- To test Android builds, execute
yarn androidto compile and install the application directly on your device. Useyarn buildfor release APK generation.
Note
Do not run the React Native shell app directly from Android Studio. Always rely on the Expo Metro bundler for correct bridging.
- eng.traineddata from tessdata
- MediaProjection - Used to obtain full screenshots
- AccessibilityService - Used to dispatch gestures like tapping and scrolling
- OpenCV Android - Used to template match
- Tesseract4Android - For performing OCR on the screen
- string-similarity - For comparing string similarities during text detection
- React Native - Used as the frontend
- Expo - Modern modular frontend
- SQLite - Local database via expo-sqlite
- Ktor - For the Remote Log Viewer
- YOLOv8 - Object detection
- ONNX Runtime - Lightweight engine for executing the YOLOv8 model
