---
name: solana-mobile
description: Scaffold, configure, and troubleshoot Solana Mobile apps for Android using the solana-mobile CLI, Expo, and React Native. Use when creating a new Solana mobile app, picking a template, adding Solana to an existing Expo app, checking the Android toolchain, managing Android emulators or connected devices, installing a wallet APK for testing, running a local validator the device can reach, or producing a development build.
---
# Solana Mobile projects
Set up and maintain Solana Mobile apps. The `solana-mobile` CLI does the scaffolding,
environment checks, and emulator management — prefer it over hand-rolled setup.
Run it without installing:
```bash
npx solana-mobile@latest --help
```
`pnpm dlx solana-mobile@latest` and `bunx solana-mobile@latest` are the equivalents. Match
whichever package manager the project already uses, and keep `@latest` so the runner does not
reuse an older cached version.
| Command | Use for |
| --- | --- |
| `create` | [Scaffolding a new project](#create-a-new-project) |
| `device` | [Installing APKs, opening URLs, preparing a device](#work-with-a-connected-device) |
| `doctor` | [Checking the toolchain](#check-the-environment) |
| `emulator` (`emu`) | [Creating and running emulators](#manage-android-emulators) |
| `localnet` | [A local validator the device can reach](#run-a-local-validator) |
| `playground` | [Testing a wallet without building an app](#test-a-wallet-without-an-app) |
| `templates` | Maintaining a template repository — template authors only |
| `webshell` | Wrapping an existing web app in an Android WebView shell |
Every flag of every command: [references/cli.md](references/cli.md). Do not guess at flags —
the CLI ships its own help, and `--help` on any command is authoritative.
## Non-negotiable constraint
**Mobile Wallet Adapter requires a development build. Expo Go will not work** — MWA depends
on native Android modules that Expo Go does not bundle. If someone reports wallet
connection failing in Expo Go, that is the cause; there is no workaround, they need
`expo run:android`.
Android is the only platform with wallet support. iOS builds run, but no MWA.
## First: work out which situation you are in
| Situation | Do this |
| --- | --- |
| No project yet | [Create a new project](#create-a-new-project) |
| Existing Expo app, no Solana | Read [references/add-to-existing-app.md](references/add-to-existing-app.md) |
| Project exists, build or toolchain broken | [Check the environment](#check-the-environment) |
| Project exists, needs wallet features | Use the `solana-mobile-wallet` skill |
| Wallet connect or signing needs testing | [Test a wallet without an app](#test-a-wallet-without-an-app) |
## Create a new project
```bash
npx solana-mobile@latest create
```
Interactive by default. To skip the prompts, name the project and template:
```bash
npx solana-mobile@latest create my-app --template expo-kit-wallet
```
Useful flags:
| Flag | Effect |
| --- | --- |
| `-t, --template <id>` | Pick a template non-interactively |
| `--pm <manager>` | Package manager to use |
| `--minimal` | Use the minimal template |
| `--list-templates` | Print the template catalog |
| `--list-template-ids` | Print template ids as a JSON array |
| `--skip-install` | Do not install dependencies |
| `--skip-git` | Do not initialise a git repo |
| `-d, --dry-run` | Show what would happen, write nothing |
### Choosing a template
Templates come in two families. **Pick an `expo-kit-*` template**, or
`sample-expo-kit-privy` for Privy auth. `@solana/kit` is the current Solana client library, and
these are the templates the CLI maintains most actively.
Reach for `expo-web3js-*` only when the user is deliberately continuing an existing
`@solana/web3.js` codebase, or asks for it by name. If they ask without a reason, say kit is the
better starting point before going along with it — a new app on web3.js starts life needing a
migration.
`expo-kit-minimal` is the clearest reference for how the kit pieces fit together, and worth
reading even when building on a different template.
| Template | Stack | Use for |
| --- | --- | --- |
| `expo-kit-wallet` | Kit + MWA + Uniwind | **Best default.** Wallet connect, sign, send already wired |
| `expo-kit-minimal` | Kit | Bare starting point, no UI kit |
| `expo-kit-uniwind` | Kit + Uniwind | Tailwind-style styling, no wallet yet |
| `sample-expo-kit-privy` | Kit + Privy + Uniwind | Privy auth instead of, or alongside, MWA |
| `expo-web3js-wallet` | web3.js + MWA | Legacy wallet app |
| `expo-web3js-paper` | web3.js + RN Paper | Legacy, Material UI |
| `expo-web3js-minimal` | web3.js | Legacy bare starting point |
Template ids are also accepted in full `gh:solana-mobile/templates/mobile/<name>` form.
Re-run `--list-templates` rather than trusting this table if a template seems missing — the
catalog ships with the CLI, not with this skill.
### After scaffolding
```bash
cd my-app && npm run android
```
That runs `expo run:android`, which builds and installs the development build. The first
Android build is slow (Gradle cold start); later builds reuse the cache.
## Check the environment
Before debugging a build failure, check the toolchain:
```bash
npx solana-mobile@latest doctor
```
It reports on the local Android and Node toolchain with recommendations for anything
missing. `--json` gives a stable report worth parsing when you need to branch on a specific
check; `--verbose` adds resolved paths and diagnostics.
Run `doctor` first whenever a build fails for reasons that are not obviously in app code.
## Manage Android emulators
```bash
npx solana-mobile@latest emu list
npx solana-mobile@latest emu status
npx solana-mobile@latest emu create
npx solana-mobile@latest emu start my_phone
npx solana-mobile@latest emu stop my_phone
```
`emu` is an alias for `emulator`. Subcommands: `create`, `delete`, `images`, `list`, `start`,
`status`, `stop`, `tune`. System images live under `emu images` (`install`, `list`, `delete`).
Create a named emulator on a specific device profile:
```bash
npx solana-mobile@latest emu create local_phone --device pixel_9
```
### Prepare a fresh emulator
A newly created AVD is not ready for wallet work: it is not running, its first-run dialogs are
still armed, and it has no wallet app. Boot it tuned, then install one — in that order, since
`device install` needs a booted device to install onto:
```bash
npx solana-mobile@latest emu start local_phone --tune
npx solana-mobile@latest device install fakewallet
```
`--tune` disables the animations, first-run dialogs, lock screen, and notifications that
otherwise sit on top of the app on a fresh AVD. Tuning is opt-in — `emu start` and
`emu create --start` apply it only when passed `--tune` — and in that form it is
non-interactive, which is what makes it the one to reach for in a script. `emu create` takes
`--start --tune` to do all of this at creation time.
`device install fakewallet` puts the Mobile Wallet Adapter test wallet on the running emulator.
Without a wallet app, MWA has nothing to hand off to and connect silently does nothing — the
most common cause of "connect does nothing on the emulator".
Anything gated on the Seeker Genesis Token still needs a real Seeker device; an emulator cannot
hold one. See the `seeker-genesis-token` skill.
## Work with a connected device
`device` covers everything that goes over adb, for emulators and physical phones alike.
```bash
npx solana-mobile@latest device list # serials, states, names
npx solana-mobile@latest device install fakewallet # catalog APK
npx solana-mobile@latest device install ./app-release.apk # local file
npx solana-mobile@latest device open http://localhost:3000 # opens on the device
npx solana-mobile@latest device tune --all -y # prepare for automation
```
`device open` creates the `adb reverse` for a localhost URL itself, so a dev server on this
machine is reachable from a USB-connected phone. Prefer it to hand-written `adb reverse` plus
`am start` incantations.
`device tune` and `emu tune` apply the same tweaks but differ in two ways, and the second one
bites in scripts. `device tune` accepts physical devices, takes `--device <serial>` or `--all`,
and falls back to the only connected device. `emu tune` refuses non-emulator serials, takes the
AVD name or serial as a positional argument, and opens a picker whenever it is given none — even
with exactly one emulator running, and even under `-y`, which skips the tweak prompt and not the
emulator one. Name the target in anything unattended: `emu tune local_phone -y`.
## Run a local validator
```bash
npx solana-mobile@latest localnet start
npx solana-mobile@latest localnet check
```
`localnet start` gets a validator serving on the host and forwards its ports to every connected
device, so the app reaches `localhost:8899` as if the validator ran on the device. It reuses a
localnet container it already started, attaches to a validator already answering on those ports
— a native one, needing no Docker at all — and starts a container only when neither is there.
`check`
verifies reachability from each device — which is the question to ask when an app cannot see a
validator that is plainly running on this machine.
`localnet forward` re-applies the forwards after plugging in a new device, and `logs`, `status`,
and `stop` do what they say.
## Test a wallet without an app
```bash
npx solana-mobile@latest playground
```
Serves a wallet testing page, opens it on the device, and streams every MWA interaction back to
the terminal: connect, sign in (SIWS), sign message, sign transaction, sign and send. It runs
against devnet by default; `--cluster localnet` points it at the `localnet` validator, and
mainnet needs your own `--url` because the public endpoint rejects browser-origin requests.
**Use this to split an app bug from a setup bug.** If the playground cannot sign either, the
problem is the wallet or the device, not the code being debugged. It needs an MWA wallet
installed — `device install fakewallet` if there is none.
## Reference material
- [references/cli.md](references/cli.md) — every `solana-mobile` command and flag, including
`templates` and `webshell`
- [references/add-to-existing-app.md](references/add-to-existing-app.md) — wiring Solana
into an Expo app that already exists: crypto polyfill, providers, dependencies
- [references/troubleshooting.md](references/troubleshooting.md) — build, polyfill, and
emulator failures with known causes
## Related skills
- `solana-mobile-wallet` — connecting wallets, signing, sending transactions
- `solana-mobile-publishing` — signing a release APK and shipping to the dApp Store
- `seeker-genesis-token` — verifying Seeker device ownership
- `seeker-domains` — `.skr` domain name resolution
For general non-mobile Solana work — Anchor or Pinocchio programs, Codama client generation,
testing, security review — use the Solana Foundation's `solana-dev` skill instead. `create`
installs it into `.agents/skills/solana-dev/`, so a scaffolded project already has it.
## Links
- CLI source: https://github.com/solana-mobile/solana-mobile-cli
- Templates: https://github.com/solana-mobile/templates
- Solana Mobile docs: https://docs.solanamobile.com
---
## License
solana-mobile/solana-mobile-skills is by solana-mobile, used under the Apache-2.0 license. The license file: https://github.com/solana-mobile/solana-mobile-skills/blob/main/LICENSE
```text
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2026 Solana Mobile Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```