Difference between revisions of "Modding:Installing SMAPI on Android"

From Stardew Valley Wiki
Jump to navigation Jump to search
(use {{github}} for GitHub links)
(remove obsolete XNB instructions)
Line 22: Line 22:
 
* [[Modding:Player Guide]] for general help
 
* [[Modding:Player Guide]] for general help
 
* {{github|MartyrPher/SMAPI-Android-Installer#readme|Android SMAPI installer readme}} (contains more info, and links to find help)
 
* {{github|MartyrPher/SMAPI-Android-Installer#readme|Android SMAPI installer readme}} (contains more info, and links to find help)
 
==XNB mods==
 
<div style="border: 1px solid red; background: #FCC; padding: 1em;">'''[[Modding:Using XNB mods|XNB mods aren't recommended]], are harder to install, and often break when the game updates.'''</div>
 
 
If you're sure you want to use them, here's how. {{collapse|content=&#32;
 
 
===Obtain the APK===
 
First you'll need the APK (''Android Package'') file for your game, which contains the game files. Downloading the APK from third-party websites isn't recommended, since it'll often be outdated or contain malware.
 
 
There are two ways to access the APK file:
 
 
* If you have [https://www.androidcentral.com/root root access], it's located at <tt>/data/app/com.chucklefish.stardewvalley-1/base.apk</tt>.
 
* Otherwise install [https://play.google.com/store/apps/details?id=com.ext.ui APK Extractor] and run it. The APK will be extracted to <tt>ExtractedApks/Stardew Valley_com.chucklefish.stardewvalley.apk</tt> on your device.
 
 
===Install an XNB mod===
 
; Option A&#58; MT Manager app on your phone
 
 
:# Copy the XNB files you want to install into a new folder on your device.
 
:# Install and open [https://play.google.com/store/apps/details?id=bin.mt.plus MT Manager] on your phone.
 
:# On the left side of the screen:
 
:## Find [[#Obtain the APK|the Stardew Valley APK]].
 
:## Tap it.
 
:## Select 'view'. This should open a folder containing the game's asset files.
 
:# On the right side of the screen:
 
:## Find the folder containing XNB mods (from step 1).
 
:## Make sure the corresponding folder is open on the left side of the screen (e.g. the <tt>Portraits</tt> folder if you're installing portrait mods).
 
:## Select the files to copy. (To select all, tap the '''<tt>⋮</tt>''' menu and choose 'select all'.)
 
:## Long tap the selected files, and choose the copy option.
 
:## A menu should appear. Change the 'level' option to Storage, and the 'update mode' to Replace All. Tap OK to copy the files.
 
:# On the left side of the screen:
 
:## Return to the folder containing the <tt>.apk</tt> file.
 
:## Tap on the Stardew Valley APK file, choose 'Function', then 'APK Sign'.
 
:## Tap the '''new''' APK file that generates and choose 'Install'.
 
 
; Option B&#58; Android Studio on your computer
 
 
:# Install an unzip program like [https://www.7-zip.org/download.html 7-zip].
 
:# Install JDK 8.
 
:# Install Android Studio (make sure to install build-tools).
 
:# Install APK Signer Tool (v2).
 
:# Unzip [[#Obtain the APK|the Stardew Valley APK]] to your computer.
 
:# Replace the vanilla XNBs (found in <tt>./assets/Content/</tt>) with the modded XNBs.
 
:# Re-zip the contents of the Stardew Valley APK. Make sure not to include the container folder.
 
:# Change the file extension from <tt>.zip</tt> to <tt>.apk</tt>.
 
:# Open APK Signer Tool (v2).
 
:# Fill out all fields on the Keyfile Generator page (doesn't matter what you enter).
 
:# On the Align & Sign tab, select the modded APK file.
 
:# Select key and fill out the appropriate fields.
 
:# Click Align and Sign.
 
:# Wait a few moments.
 
:# Move the APK to the device and install.
 
 
===Install an audio mod===
 
# Download {{github|mariodon/unxwb/releases|unxwb}} and {{github|Microsoft/DirectXTK/releases|XWBTool}}.
 
# Unzip both to your working directory.
 
# Copy the <tt>.obb</tt> file from your phone's internal storage (located at <tt>Internal Storage/Android/obb/main.2.com.chucklefish.stardewvalley.obb</tt>) to your working directory.
 
# Run this command to unpack the file: <pre>unxwb main.2.com.chucklefish.stardewvalley.obb</pre> That should output 87 files with names like <tt>00000000.wav</tt>.
 
# Move the unpacked <tt>.wav</tt> files to a separate folder to keep things organised.
 
# Replace any of the audio files as desired (but the names must remain the same).
 
# Run this command to repack the file (replacing <tt>folderPath</tt> with the full path to the folder containing the <tt>.wav</tt> files): <pre>XWBTool "folderPath/*.wav" -o Music.xwb</pre> Note that the output file ''must'' be called <tt>Music.xwb</tt> when repacking.
 
# Rename <tt>Music.xwb</tt> to <tt>main.2.com.chucklefish.stardewvalley.obb</tt>.
 
# Move the modified <tt>.obb</tt> file back to your phone's internal storage (at <tt>Internal Storage/Android/obb/main.2.com.chucklefish.stardewvalley.obb</tt>).
 
# Enjoy your modified music!
 
 
Here's [https://docs.google.com/spreadsheets/d/1K3S8YDS4Tfe_LPtyXA9LaVM8edxvDFkwfNl-ql1kFGM a spreadsheet of unpacked <tt>.wav</tt> file names].
 
}}
 
  
 
[[Category:Modding]]
 
[[Category:Modding]]

Revision as of 21:07, 7 October 2019

Modding:Index

This page explains how to use mods on Android. (For help with mods on Linux/Mac/Windows, see Modding:Player Guide.)

SMAPI mods & content packs

You can use MartyrPher's Android SMAPI Loader, an unofficial port of SMAPI to Android which supports most SMAPI mods and content packs (including Content Patcher).

Install SMAPI

See also unofficial video guide.
  1. Download the latest installer APK from the unofficial download page onto your phone. Make sure you get the download that looks like SMAPI-Android-Installer-<version>.apk.
  2. Install the APK.
  3. Run the new app to install SMAPI. This may take a while depending on your device (e.g. 21s on a Samsung Galaxy S10, and 1 minute 13s on a Samsung Galaxy S6).
  4. When it's done, you can safely uninstall the installer app.

Using mods

To install mods, just unzip them into the newly-created StardewValley/Mods folder. To launch the game with mod support, just run the SMAPI Stardew Valley icon.

Android SMAPI Loader supports most mods, including the major frameworks like Content Patcher, Farm Type Manager, Json Assets, and PyTK. Stardew Valley Expanded is partially supported.

See also