Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
383c16a
chore: remove Sora Card feature (versionCode=222)
WRRicht3r Mar 10, 2026
3c56406
fix: document 16kb compliance and bump room db
WRRicht3r Mar 11, 2026
9e02f83
fix: enforce ndk r28 for 16kb compliance
WRRicht3r Mar 12, 2026
4adcb25
chore: vendor utils natives for 16kb
WRRicht3r Mar 13, 2026
e480fe5
chore: align reown deps for 16kb
WRRicht3r Mar 13, 2026
ee42657
fix: add jcenter shim for utils composite
WRRicht3r Mar 14, 2026
3fb3a0c
chore: align local validation with sdk 36
WRRicht3r Mar 16, 2026
03d39ec
chore: make libsodium rebuild host-aware
WRRicht3r Mar 16, 2026
fb78ebf
fix: drop unused manifest replace directives
WRRicht3r Mar 16, 2026
53add1b
chore: add bebi easter egg
WRRicht3r Mar 16, 2026
8a330a7
fix: shim javaexec main for utils
WRRicht3r Mar 16, 2026
5c61518
fix: shim dependencyhandler.module for utils
WRRicht3r Mar 16, 2026
cd85596
fix: target default dependency handler for module shim
WRRicht3r Mar 16, 2026
01d1a56
fix: guard dependencyhandler shim class loading
WRRicht3r Mar 16, 2026
a0a199d
fix: point dependencyhandler shim to correct class
WRRicht3r Mar 16, 2026
033a658
fix: rewrite bcprov substitution for gradle 9
WRRicht3r Mar 16, 2026
1a71d49
fix: provide module shim for dependency substitutions
WRRicht3r Mar 16, 2026
4725b48
fix: rely on includeBuild for utils substitution
WRRicht3r Mar 16, 2026
3ab0193
fix: skip local utils include on gradle9
WRRicht3r Mar 16, 2026
8005bf0
fix: stub walletconnect pay to avoid crash
WRRicht3r Mar 16, 2026
f27755a
fix: rebuild sr25519 natives for shared utils
WRRicht3r Mar 16, 2026
c8a66e1
fix: rebuild sr25519 natives with aliases
WRRicht3r Mar 16, 2026
2166520
chore: install android 36 sdk on ci
WRRicht3r Mar 16, 2026
649c314
chore: restore lint failure behaviour
WRRicht3r Mar 16, 2026
8a16a04
fix: always include local utils
WRRicht3r Mar 16, 2026
fee7f65
fix: restore dependency substitution shim
WRRicht3r Mar 16, 2026
79036d2
fix: return selector from module shim
WRRicht3r Mar 16, 2026
19115de
fix: only include utils locally on gradle8
WRRicht3r Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
uses: android-actions/setup-android@v3
with:
packages: |
platforms;android-35
build-tools;35.0.0
platforms;android-36
build-tools;36.0.0
platform-tools
ndk;28.0.12674087
ndk;25.2.9519653
Expand Down
Empty file.
14 changes: 10 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
## Local Properties (private)
- Create a root-level `local.properties` with the required secrets and service credentials. Do NOT commit this file.
- See `docs/samples/local.properties.example` and create a private `local.properties` at the repo root; replace placeholders with your real values.
- Typical keys include: MoonPay, PayWings (Sora Card), X1 plugin, Google Web Client IDs, Ethereum providers (Blast, Etherscan/BscScan/PolygonScan/OKLink), WalletConnect, Alchemy, Dwellir, TON API.
- Typical keys include: MoonPay, X1 plugin, Google Web Client IDs, Ethereum providers (Blast, Etherscan/BscScan/PolygonScan/OKLink), WalletConnect, Alchemy, Dwellir, TON API.
- Formats: use `key=value` per line; avoid trailing spaces. Strings may be unquoted; if values contain special characters or spaces, wrap in double quotes. Set `sdk.dir=/absolute/path/to/Android/sdk` to avoid SDK lookup errors.
- Runtime overrides (mirrors recommended for first run):
- `TYPES_URL_OVERRIDE=https://cdn.jsdelivr.net/gh/soramitsu/shared-features-utils@master/chains/all_chains_types_android.json`
Expand All @@ -78,9 +78,15 @@
- Verify config: `./gradlew printPolkadotSdkAlignment` prints effective URLs and any shared_features pin before you run the app/tests.

## Utils Integration
- Gradle maps the GitHub repo `soramitsu/fearless-utils-Android` as a source dependency and builds `jp.co.soramitsu.fearless-utils:fearless-utils` from source (requires network).
- Building from source requires NDK and Rust toolchain installed (see README for versions).
- This enables rapid testing of utils updates needed for specific Polkadot SDK releases.
- Gradle now prefers a local checkout of `fearless-utils-Android` (defaults to `../fearless-utils-Android` or `FEARLESS_UTILS_PATH`). It uses a composite build to substitute `jp.co.soramitsu.fearless-utils:fearless-utils`.
- If no local checkout is found, set `USE_REMOTE_UTILS=true` (env or `-P`) to fetch the GitHub repo `soramitsu/fearless-utils-Android` as a source dependency (requires network).
- Building from source requires NDK r28 and a Rust toolchain installed (see README for versions).
- This enables rapid testing of utils updates needed for specific Polkadot SDK releases without waiting for published artifacts.

## Native Crypto (libsodium)
- `app/src/main/jniLibs/*/libsodium.so` is built from `third_party/libsodium` using `scripts/build-libsodium.sh`.
- The script enforces Google Play’s 16 KB page requirements via `-Wl,-z,common-page-size=4096 -Wl,-z,max-page-size=16384`.
- Run it after pulling upstream changes or bumping libsodium to refresh all ABIs (arm64-v8a, armeabi-v7a, x86, x86_64).

## Documentation
- Status: see `docs/status.md` for current health, coverage, and risks.
Expand Down
51 changes: 17 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,6 @@ MOONPAY_PRODUCTION_SECRET=stub

Note, that with stub keys buy via moonpay will not work correctly. However, other parts of the application will not be affected.

### Sora CARD SDK

For starting Sora CARD SDK initial data have to be provided via gradle properties due to security purpose.

````
// PayWings repo credentials properties for getting artifacts
PAY_WINGS_REPOSITORY_URL
PAY_WINGS_USERNAME
PAY_WINGS_PASSWORD

// Sora CARD API key
SORA_CARD_API_KEY_TEST
SORA_CARD_API_KEY_PROD
SORA_CARD_DOMAIN_TEST
SORA_CARD_DOMAIN_PROD

// Sora CARD KYC credentials
SORA_CARD_KYC_ENDPOINT_URL_TEST
SORA_CARD_KYC_ENDPOINT_URL_PROD
SORA_CARD_KYC_USERNAME_TEST
SORA_CARD_KYC_USERNAME_PROD
SORA_CARD_KYC_PASSWORD_TEST
SORA_CARD_KYC_PASSWORD_PROD

// Sora CARD backend
SORA_BACKEND_DEBUG
SORA_BACKEND_RELEASE
````

### X1 plugin

X1 is a plugin which is embedded into webView. It requires url and id for launching.
Expand Down Expand Up @@ -111,18 +82,30 @@ Manual equivalents if you prefer:

Prerequisites: JDK 21 (Temurin/Adoptium) and Android SDK with API 35 + build-tools 35.0.0. The script will try to locate `ANDROID_SDK_ROOT` and install missing packages if `sdkmanager` is available.

### Use fearless-utils-Android (remote source dependency)
### Use fearless-utils-Android (local or remote source dependency)

The build maps the GitHub repository as a source dependency and builds the module from source.
The build now prefers a local checkout of `fearless-utils-Android`. By default it looks for `../fearless-utils-Android`, or you can override it with `FEARLESS_UTILS_PATH`:

```
# Requires network access during Gradle configuration
export FEARLESS_UTILS_PATH=/absolute/path/to/fearless-utils-Android
./gradlew :app:assembleDebug
```

Gradle will fetch https://github.com/soramitsu/fearless-utils-Android and build module `jp.co.soramitsu.fearless-utils:fearless-utils` from source.
Gradle includes the local project via a composite build and substitutes `jp.co.soramitsu.fearless-utils:fearless-utils` automatically.
If no local checkout is found and you need to build from source, set `USE_REMOTE_UTILS=true` (env var or `-PUSE_REMOTE_UTILS=true`) and Gradle will fetch `https://github.com/soramitsu/fearless-utils-Android` instead.
Prereqs for building the utils from source: NDK r28 (android-ndk-r28 / 28.0.x) and a Rust toolchain on `PATH` (`rustup`, `cargo`).

### Rebuild libsodium with 16 KB alignment

We vendor libsodium sources under `third_party/libsodium` and ship aligned binaries under `app/src/main/jniLibs`.
If you need to refresh them (e.g., after pulling upstream changes), run:

```
ANDROID_NDK_HOME=/Users/<you>/Library/Android/sdk/ndk/28.0.12674087 \
./scripts/build-libsodium.sh
```

Prereqs for building the utils from source: NDK (25.2.9519653) and Rust toolchain available on PATH (`rustup`, `cargo`).
The script rebuilds `libsodium.so` for arm64-v8a, armeabi-v7a, x86, and x86_64 with the Google Play-required `-Wl,-z,common-page-size=4096 -Wl,-z,max-page-size=16384` flags and copies them into `app/src/main/jniLibs`.

## Contributing

Expand Down
2 changes: 0 additions & 2 deletions app/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Configs & Secrets (see README for details)
- WalletConnect: `WALLET_CONNECT_PROJECT_ID` in `BuildConfig`.
- Moonpay: `MOONPAY_TEST_SECRET`, `MOONPAY_PRODUCTION_SECRET`.
- EVM/API keys: `FL_BLAST_API_*`, `FL_ANDROID_*SCAN_API_KEY`.
- SoraCard & X1: multiple Gradle properties required (test/prod creds).

Common Tasks
- Add a new feature screen:
Expand All @@ -37,4 +36,3 @@ Troubleshooting
- WalletConnect init errors: verify `WALLET_CONNECT_PROJECT_ID` and network reachability.
- Missing features at runtime: ensure `matchingFallbacks` and proper build type are used.
- Local utils: set `FEARLESS_UTILS_PATH` to include local `fearless-utils-Android` in the composite build.

19 changes: 13 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ android {
versionCode computeVersionCode()
versionName computeVersionName()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
signingConfigs {
ci {
Expand Down Expand Up @@ -175,6 +178,8 @@ android {
}
lint {
disable 'Instantiatable'
checkReleaseBuilds true
abortOnError true
}
namespace = 'jp.co.soramitsu.app'

Expand All @@ -184,8 +189,12 @@ android {
resources.excludes.add("META-INF/services/org.w3c.dom.DOMImplementationSourceList")
resources.excludes.add("META-INF/services/org.xml.sax.driver")

// Force native libs to be extracted at install time so 4 KB-aligned binaries run on 16 KB page devices.
jniLibs.useLegacyPackaging true
jniLibs {
// Force native libs to be extracted at install time so 4 KB-aligned binaries run on 16 KB page devices.
useLegacyPackaging true
excludes += ["**/armeabi/**"]
pickFirsts += ["**/libsr25519java.so", "**/libtoolChecker.so", "**/libsodium.so"]
}
}
}

Expand Down Expand Up @@ -224,8 +233,6 @@ dependencies {
implementation project(':feature-success-api')
implementation project(':feature-success-impl')

implementation project(':feature-soracard-api')
implementation project(':feature-soracard-impl')

implementation project(':feature-walletconnect-api')
implementation project(':feature-walletconnect-impl')
Expand Down Expand Up @@ -287,9 +294,9 @@ dependencies {
implementation(libs.soramitsu.android.foundation)

implementation platform(libs.reownBomDep)
// Exclude JNA from Reown libraries to prevent class duplication - using direct JNA dependency above
// Exclude JNA (and WalletConnect Pay) to prevent duplicate natives and page-size incompatible libs
implementation libs.reownCoreDep, withoutJna
implementation libs.reownWalletKitDep, withoutJna
implementation libs.reownWalletKitDep, withoutJnaAndPay

androidTestImplementation libs.runner
androidTestImplementation libs.rules
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
<uses-permission android:name="android.permission.INTERNET" />

<queries>
<package android:name="com.soracard.wallet.iban"/>
<package android:name="com.soracard.wallet.iban.test"/>
</queries>

<application
Expand All @@ -23,8 +21,7 @@
android:networkSecurityConfig="@xml/network_security_config"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"
android:largeHeap="true"
tools:replace="android:allowBackup">
android:largeHeap="true">

<activity android:name="jp.co.soramitsu.common.qrScanner.QrScannerActivity" />

Expand Down Expand Up @@ -81,10 +78,9 @@
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"
tools:replace="android:resource" />
android:resource="@xml/provider_paths" />
</provider>

</application>

</manifest>
</manifest>
2 changes: 2 additions & 0 deletions app/src/main/java/jp/co/soramitsu/app/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import jp.co.soramitsu.common.resources.LanguagesHolder
open class App : Application() {

private val languagesHolder: LanguagesHolder = LanguagesHolder()
@Suppress("unused")
private val bebiEasterEgg = "B.E.B.I </3"

override fun attachBaseContext(base: Context) {
val contextManager = ContextManager.getInstanceOrInit(base, languagesHolder)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import jp.co.soramitsu.liquiditypools.navigation.LiquidityPoolsRouter
import jp.co.soramitsu.nft.navigation.NFTRouter
import jp.co.soramitsu.onboarding.impl.OnboardingRouter
import jp.co.soramitsu.polkaswap.api.presentation.PolkaswapRouter
import jp.co.soramitsu.soracard.api.presentation.SoraCardRouter
import jp.co.soramitsu.splash.SplashRouter
import jp.co.soramitsu.staking.impl.presentation.StakingRouter
import jp.co.soramitsu.success.api.presentation.SuccessRouter
Expand Down Expand Up @@ -64,10 +63,6 @@ class NavigationModule {
@Provides
fun provideWalletConnectRouter(navigator: Navigator): WalletConnectRouter = navigator

@Singleton
@Provides
fun provideSoraCardRouter(navigator: Navigator): SoraCardRouter = navigator

@Singleton
@Provides
fun provideTonConnectRouter(navigator: Navigator): TonConnectRouter = navigator
Expand Down
14 changes: 0 additions & 14 deletions app/src/main/java/jp/co/soramitsu/app/root/navigation/Navigator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ import jp.co.soramitsu.polkaswap.impl.presentation.swap_tokens.SwapTokensFragmen
import jp.co.soramitsu.polkaswap.impl.presentation.transaction_settings.TransactionSettingsFragment
import jp.co.soramitsu.runtime.multiNetwork.chain.model.Chain
import jp.co.soramitsu.runtime.multiNetwork.chain.model.ChainId
import jp.co.soramitsu.soracard.api.presentation.SoraCardRouter
import jp.co.soramitsu.splash.SplashRouter
import jp.co.soramitsu.staking.api.domain.model.PoolInfo
import jp.co.soramitsu.staking.impl.presentation.StakingRouter
Expand Down Expand Up @@ -217,7 +216,6 @@ class Navigator :
CrowdloanRouter,
PolkaswapRouter,
SuccessRouter,
SoraCardRouter,
WalletConnectRouter,
TonConnectRouter,
NFTRouter,
Expand Down Expand Up @@ -887,10 +885,6 @@ class Navigator :
navController?.navigate(R.id.polkaswapDisclaimerFragment, bundle)
}

override fun showBuyCrypto() {
navController?.navigate(R.id.buyCryptoFragment)
}

override fun openSelectChain(
assetId: String,
chainId: ChainId?,
Expand Down Expand Up @@ -1455,14 +1449,6 @@ class Navigator :
navController?.navigate(R.id.editPoolConfirmFragment)
}

override fun openGetSoraCard() {
navController?.navigate(R.id.getSoraCardFragment)
}

override fun openSoraCardDetails() {
navController?.navigate(R.id.soraCardDetailsFragment)
}

override val walletSelectorPayloadFlow: Flow<WalletSelectorPayload?>
get() = navController?.currentBackStackEntry?.savedStateHandle
?.getLiveData<WalletSelectorPayload?>(WalletSelectorPayload::class.java.name)
Expand Down
Binary file added app/src/main/jniLibs/arm64-v8a/libsodium.so
Binary file not shown.
Binary file added app/src/main/jniLibs/arm64-v8a/libsr25519java.so
Binary file not shown.
Binary file added app/src/main/jniLibs/armeabi-v7a/libsodium.so
Binary file not shown.
Binary file not shown.
Binary file added app/src/main/jniLibs/x86/libsodium.so
Binary file not shown.
Binary file added app/src/main/jniLibs/x86/libsr25519java.so
Binary file not shown.
Binary file added app/src/main/jniLibs/x86_64/libsodium.so
Binary file not shown.
Binary file added app/src/main/jniLibs/x86_64/libsr25519java.so
Binary file not shown.
16 changes: 1 addition & 15 deletions app/src/main/res/navigation/main_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,6 @@
android:name="jp.co.soramitsu.wallet.impl.presentation.transaction.filter.TransactionHistoryFilterFragment"
android:label="TransactionHistoryFilterFragment" />

<fragment
android:id="@+id/getSoraCardFragment"
android:name="jp.co.soramitsu.soracard.impl.presentation.get.GetSoraCardFragment"
android:label="GetSoraCardFragment" />
<fragment
android:id="@+id/soraCardDetailsFragment"
android:name="jp.co.soramitsu.soracard.impl.presentation.details.SoraCardDetailsFragment"
android:label="SoraCardDetailsFragment" />

<fragment
android:id="@+id/exportMnemonicFragment"
android:name="jp.co.soramitsu.account.impl.presentation.exporting.mnemonic.ExportMnemonicFragment"
Expand Down Expand Up @@ -407,11 +398,6 @@
android:name="jp.co.soramitsu.wallet.impl.presentation.balance.searchAssets.SearchAssetsFragment"
android:label="searchAssetsFragment" />

<fragment
android:id="@+id/buyCryptoFragment"
android:name="jp.co.soramitsu.soracard.impl.presentation.buycrypto.BuyCryptoFragment"
android:label="buyCryptoFragment" />

<fragment
android:id="@+id/importAccountFragment"
android:name="jp.co.soramitsu.account.impl.presentation.importing.ImportAccountFragment"
Expand Down Expand Up @@ -1393,4 +1379,4 @@
android:name="jp.co.soramitsu.crowdloan.impl.presentation.main.CrowdloanFragment"
android:label="CrowdloanFragment" />

</navigation>
</navigation>
Loading