Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nebula-Modmakers/Nebula-Launcher/llms.txt

Use this file to discover all available pages before exploring further.

This reference covers the public Java classes that implement Nebula Launcher’s core functionality — profile management, package installation, mod catalog fetching, app self-update, game version compatibility checking, and the FusionCore runtime configuration object. All classes reside under the dev.tates.nebula package unless otherwise noted.

ProfileManager

dev.tates.nebula.ProfileManager ProfileManager is a utility class (non-instantiable) that manages named mod profiles stored in the application’s private files directory. Each profile owns a plugins/ subdirectory. Activating a profile stages its contents into the shared FusionCore plugin directory, which is the directory Among Us reads at launch.

Methods

public static File getProfilesRoot(Context context)
Returns the root File that contains all profile directories (<filesDir>/profiles). The directory may not exist yet if no profile has ever been created.
public static String getActiveName(Context context)
Returns the name of the currently active profile, read from shared preferences and sanitized. Names are limited to 40 characters and may only contain alphanumerics, spaces, underscores, hyphens, and periods. Falls back to "Default" if no profile has been set.
public static File getActivePlugins(Context context)
Convenience method. Returns the plugins/ directory for the active profile — equivalent to getPlugins(context, getActiveName(context)).
public static File getPlugins(Context context, String profileName)
Returns the plugins/ directory for the named profile. The directory is not guaranteed to exist; callers should check with isDirectory() before reading.
profileName
String
The profile name to look up. The value is sanitized before use.

public static List<String> list(Context context)
Returns the names of all existing profiles, sorted case-insensitively. Ensures the Default profile directory exists before listing. Returns an empty list if the profiles root does not yet contain any subdirectories.
public static boolean create(Context context, String requestedName)
Creates a new profile with the given name. Returns false if the sanitized name is empty or if a profile with that name already exists; returns true when the profile is successfully created.
requestedName
String
Desired profile name. Special characters are replaced during sanitization.

public static void activate(Context context, String profileName) throws IOException
Activates the named profile by writing it to shared preferences, then immediately calls stageActive to synchronize the shared FusionCore plugin directory. Throws IOException if the profile directory cannot be created or if staging fails.
profileName
String
Name of the profile to activate.

public static boolean delete(Context context, String profileName) throws IOException
Deletes the named profile and all of its files. Returns false without deleting anything if the sanitized name equals "Default" — the default profile cannot be removed. If the deleted profile was active, automatically switches to Default and re-stages it. Returns true when the directory was successfully removed.
profileName
String
Name of the profile to delete.

public static void stageActive(Context context) throws IOException
Copies all files from the active profile’s plugins/ directory into the shared FusionCore plugin directory, replacing whatever was staged previously. Also injects the NebulaCompat.dll compatibility plugin before copying. Throws IOException if the FusionCore plugin directory cannot be cleared or recreated, or if NebulaCompat.dll has not yet been downloaded for the account.

NpkgInstaller

dev.tates.nebula.NpkgInstaller NpkgInstaller downloads, verifies, and installs NPKG packages — ZIP archives with a manifest.json describing the files to place in the active profile. The installer performs full integrity verification (SHA-256, size, SPDX license consistency, platform compatibility) and supports transactional rollback on failure.

Constants

public static final long MAX_PACKAGE_BYTES = 512L * 1024L * 1024L; // 512 MiB
The maximum download size accepted for any single NPKG package. Both the catalog validator and the download loop enforce this limit. Packages whose declared size exceeds this value are rejected at catalog fetch time before any download begins.

Methods

public static void downloadAndInstall(
    Context context,
    ModCatalogClient.Mod mod,
    ModCatalogClient.Version version,
    Progress progress
) throws Exception
Downloads the NPKG file for version, verifies the SHA-256 digest and exact byte count against the catalog, validates the embedded manifest.json (format, identity, licenses, platform, GitHub repositories), extracts each declared payload file, backs up any existing files, and installs into the active profile. Calls ProfileManager.stageActive on success to push the new files into the shared FusionCore directory. Rolls back all written files if any step throws.
context
Context
Application or activity context used to locate the profile and cache directories.
mod
ModCatalogClient.Mod
The catalog Mod object supplying identity, license, and repository metadata for cross-validation.
version
ModCatalogClient.Version
The specific Version to install, supplying the download URL, expected size, and SHA-256 hash.
progress
Progress
Optional progress callback. May be null. Called with phases "Downloading", "Validating", and "Installing".

public static void uninstall(Context context, String packageId) throws Exception
Reads the installation record for packageId from the active profile, removes each installed file from both the profile directory and the shared FusionCore plugin directory (skipping files that are also owned by another installed package), removes empty parent directories, deletes the installation record, and calls FusionRuntimeManager.modsChanged. Throws IOException if the package is not recorded as installed in the active profile.
packageId
String
The package ID as recorded in the installation manifest (e.g. "dev.example.mymod").

public static String getInstalledVersion(Context context, String packageId)
Returns the version string recorded for packageId in the active profile’s installation records, or null if the package is not installed or its record cannot be read.
packageId
String
The package ID to look up.

public static boolean isManagedSharedFile(Context context, File sharedFile)
Returns true if the file at sharedFile is owned by any NPKG package installed in the active profile. Delegates to getManagedPackageId.
sharedFile
File
A file inside the shared FusionCore plugin directory to check.

public static String getManagedPackageId(Context context, File sharedFile)
Searches all installation records in the active profile for one that claims a plugins/-prefixed destination whose top-level entry name matches sharedFile.getName(). Returns the owning packageId, or null if no record claims the file.
sharedFile
File
The shared file whose ownership should be determined.

Progress Interface

public interface Progress {
    void update(String phase, long completed, long total);
}
Callback interface for reporting download and installation progress. phase is a human-readable stage label (e.g. "Downloading", "Validating", "Installing"). completed and total are byte counts during download, or item counts during validation and installation.

ModCatalogClient

dev.tates.nebula.ModCatalogClient ModCatalogClient is a stateless HTTP client (non-instantiable) that fetches and validates the Nebula mod catalog. The catalog lists all mods available for installation. Every entry is rigorously validated — URLs are restricted to api.nebulaau.space over HTTPS, hashes must be 64-character lowercase hex strings, sizes must be positive and within MAX_PACKAGE_BYTES, and SPDX license identifiers must match the allowed character set.

Constants

public static final String API_BASE = "https://api.nebulaau.space";
The base URL for all Nebula API calls. Used by ModCatalogClient, AppUpdateClient, and NpkgInstaller to construct request URLs.

Methods

public static List<Mod> fetchCatalog() throws Exception
Issues GET https://api.nebulaau.space/mods with Accept: application/json and a Nebula-Android/1 user agent. Parses the response JSON, verifies success: true and formatVersion: 1, filters out any entries whose platforms.android field is false, and constructs a validated, unmodifiable List<Mod>. Throws IOException on any HTTP error, oversized response (>2 MiB), validation failure, or missing required field.

Mod

public static final class Mod {
    public final String id;
    public final String packageId;
    public final String name;
    public final String badge;
    public final String imageUrl;
    public final String author;
    public final String category;
    public final String description;
    public final String gameVersion;
    public final String latestVersion;
    public final List<String> licenses;
    public final Map<String, List<String>> licenseComponents;
    public final Map<String, String> githubRepos;
    public final List<Version> versions;
}
Immutable value object representing a single mod listing from the catalog.
FieldDescription
idCatalog-assigned mod identifier.
packageIdJava-style package ID (e.g. "dev.example.mymod"). Matched against the NPKG manifest during install.
nameDisplay name shown in the mod store UI.
badgeSingle-character badge label displayed on the mod card. Defaults to "M".
imageUrlHTTPS image URL, restricted to avatars.githubusercontent.com or camo.githubusercontent.com.
authorAuthor display name. Defaults to "Unknown author".
categoryMod category label. Defaults to "Mod".
descriptionFreeform description text.
gameVersionHuman-readable Among Us version string the mod targets (top-level field on the mod object).
latestVersionVersion string that identifies the recommended Version entry in versions.
licensesUnmodifiable list of SPDX license identifiers declared for this mod.
licenseComponentsUnmodifiable map from SPDX identifier to the list of component names covered by that license.
githubReposUnmodifiable ordered map from repository display name to validated https://github.com/… URL.
versionsUnmodifiable list of all available Version entries.
public Version latest()
Returns the Version object whose version string equals latestVersion. If no exact match is found, returns the first entry in versions.

Version

public static final class Version {
    public final String version;
    public final String gameVersion;
    public final long gameVersionCode;
    public final String downloadUrl;
    public final long size;
    public final String sha256;
}
Immutable value object representing a single installable release of a mod.
FieldDescription
versionVersion string for this release (e.g. "1.0.0").
gameVersionAmong Us version name this release was built for.
gameVersionCodeAmong Us version code this release requires. Must be ≥ 1.
downloadUrlHTTPS download URL, validated to point to api.nebulaau.space.
sizeExact byte size of the NPKG file. Validated to be > 0 and ≤ MAX_PACKAGE_BYTES.
sha256Lowercase 64-character hex SHA-256 digest of the NPKG file.

AppUpdateClient

dev.tates.nebula.AppUpdateClient AppUpdateClient is a package-private utility class that checks for newer Nebula Launcher releases and downloads verified update APKs. Before returning the downloaded file, it validates the package name, version code, and APK signing certificate against the currently installed application.

Methods

static Release check(Context context) throws Exception
Issues GET https://api.nebulaau.space/updates/app and parses the JSON response (up to 64 KiB). Validates success: true and formatVersion: 1. If app.available is true and the response’s versionCode is strictly greater than the currently installed version code, returns a populated Release object. Returns null if the installed version is already current or if app.available is false.
context
Context
Used to retrieve the currently installed version code for comparison.

static File downloadAndVerify(
    Context context,
    Release release,
    Progress progress
) throws Exception
Downloads the update APK from release.downloadUrl into the app’s cache directory, verifies the SHA-256 digest and byte count, and then calls PackageManager.getPackageArchiveInfo on the downloaded file to confirm:
  • The packageName matches the running application’s package name.
  • The APK’s versionCode matches release.versionCode and is newer than the installed version.
  • The APK’s signing certificates match the signing certificates of the installed application.
Returns the verified File on success. Deletes the partial file and re-throws on any failure.
context
Context
Used to locate the cache directory and to read the installed application’s package info.
release
Release
The Release object returned by check, carrying the URL, expected size, and expected SHA-256 hash.
progress
Progress
Optional progress callback. May be null. Called with phases "Downloading", "Verifying download", and "Ready to install".

Release

static final class Release {
    final long versionCode;
    final String versionName;
    final String notes;
    final String downloadUrl;
    final long size;
    final String sha256;
}
Immutable value object carrying metadata for an available Nebula Launcher update.
FieldDescription
versionCodeAndroid version code of the available release.
versionNameHuman-readable version string (e.g. "1.4.0").
notesRelease notes or changelog text. May be empty.
downloadUrlHTTPS URL pointing to the APK, restricted to api.nebulaau.space.
sizeDeclared byte size of the APK. Must be > 0 and ≤ 256 MiB.
sha256Lowercase 64-character hex SHA-256 digest of the APK.

GameCompatibility

dev.tates.nebula.GameCompatibility GameCompatibility is a utility class (non-instantiable) that encodes the Among Us version this build of Nebula supports and provides helpers for checking a device’s installed game version. Both the version name and the version code must match exactly; a correct name with an incorrect code is not accepted.

Constants

public static final String AMONG_US_PACKAGE = "com.innersloth.spacemafia";
The package name of Among Us on Android. Used throughout the launcher to query PackageManager and to validate NPKG manifests.
public static final String REQUIRED_VERSION = "2026.6.5";
The Android package version name of the supported Among Us build. Among Us brands this release as 17.4a in-game; Android exposes 2026.6.5 as the package version name for the same build.
public static final long REQUIRED_VERSION_CODE = 7045L;
The Android version code that must accompany REQUIRED_VERSION. A package whose version name matches but whose version code differs is rejected.

Methods

public static boolean isSupported(PackageInfo packageInfo)
Returns true if and only if both getVersionName(packageInfo).equals(REQUIRED_VERSION) and getVersionCode(packageInfo) == REQUIRED_VERSION_CODE. Any mismatch returns false.
packageInfo
PackageInfo
PackageInfo for the installed Among Us application, obtained via getPackageInfo.

public static String requiredAction(String installedVersion)
Compares installedVersion against REQUIRED_VERSION using dot-separated numeric segment comparison and returns a verb phrase for use in user-facing messages:
Comparison resultReturn value
Installed version is newer than required"downgrade"
Installed version is older than required"upgrade"
Version names are equal (but code differs)"install the supported build of"
installedVersion
String
The version name string from the installed Among Us PackageInfo.

public static PackageInfo getPackageInfo(Context context, String packageName)
    throws PackageManager.NameNotFoundException
Retrieves the PackageInfo for packageName. Uses PackageInfoFlags on Android 13 (TIRAMISU) and higher; falls back to the integer-flag overload on older versions. Throws NameNotFoundException if the package is not installed.
context
Context
Used to obtain a PackageManager instance.
packageName
String
The package name to query (typically AMONG_US_PACKAGE).

public static String getVersionName(PackageInfo packageInfo)
Returns packageInfo.versionName trimmed of surrounding whitespace. Returns an empty string if versionName is null.
public static long getVersionCode(PackageInfo packageInfo)
Returns the version code as a long. Uses getLongVersionCode() on Android 9 (Pie, API 28) and above; casts the int versionCode field on older versions.

FusionConfig

dev.allofus.fusioncore.FusionConfig FusionConfig is a plain data object that Nebula constructs and passes to the FusionCore native runtime when launching Among Us. It tells the runtime where to find game libraries, the .NET runtime, BepInEx, Unity data, and the application’s own library directory.
public class FusionConfig {
    public FusionConfig(
        String gameLibDir,
        String appLibDir,
        String appDataDir,
        String bepInExDir,
        String dotnetDir,
        String unityDataDir,
        String unityVersion,
        boolean useOriginalLibUnity
    )
}

Fields

public String gameLibraryDirectory;
The directory where the game’s native libraries (.so files) are located.
public String appLibraryDirectory;
The directory where FusionCore’s own native libraries are located.
public String appDataDirectory;
The directory where FusionCore’s data files are located.
public String bepInExDirectory;
The directory where BepInEx should be installed and read from.
public String dotnetDirectory;
The directory where the .NET (CoreCLR) runtime is installed.
public String unityDataDirectory;
The directory containing the game’s Unity data files.
public String unityVersion;
The Unity engine version string detected for the installed game build.
public boolean useOriginalLibUnity;
When true, FusionCore uses the libunity.so bundled with the game rather than its own replacement. Set based on the detected Unity version and runtime compatibility.

Build docs developers (and LLMs) love