How Apollo Performs Offline PS4 Account Activation: Fake ID Generation and Registry Writing

Apollo activates local PS4 users without contacting PlayStation Network by generating a deterministic fake Account-ID based on the internal user-id and writing it directly to the console registry via regMgr_SetAccountId().

Apollo is an open-source save-game manager for the PlayStation 4 developed by bucanero. One of its core features is offline account activation, which allows users to assign a valid Account-ID to a local PS4 user without an internet connection or PSN credentials. This process is essential for resigning save files and enabling remote play via Chiaki.

The Three-Step Offline Activation Process

Apollo’s activation flow is implemented across source/exec_cmd.c and source/offline_act.c, and consists of three distinct phases: generating the Account-ID, writing it to the system registry, and refreshing the application state.

Step 1: Generate or Input the Account-ID

When the user selects "Generate fake ID" from the activation menu, Apollo constructs a deterministic placeholder value. The formula combines a magic constant with the console’s internal user_id:

/* source/exec_cmd.c – activateAccount() */
uint64_t fake = 0x6F6C6C6F70610000ULL + (~apollo_config.user_id & 0xFFFF);

This value is converted to a 16-character hexadecimal string and displayed in an on-screen keyboard (OSK) dialog. Users can accept the fake ID, edit it, or replace it entirely with a real PSN Account-ID obtained from another console.

Step 2: Write to the PS4 Registry

Once the Account-ID is confirmed, Apollo calls regMgr_SetAccountId() defined in source/offline_act.c. This function writes three critical registry entries required for the PS4 system to recognize the account as valid:

/* source/offline_act.c – regMgr_SetAccountId() */
int regMgr_SetAccountId(int userNumber, uint64_t* psnAccountId)
{
    int errorCode = 0;
    /* ACCOUNT_ID: 8-byte binary value */
    errorCode |= sceRegMgrSetBin(KEY_account_id(userNumber), 
                                 psnAccountId, SIZE_account_id);
    /* NP_ENV: string "np" */
    errorCode |= sceRegMgrSetStr(KEY_NP_env(userNumber), "np", 3);
    /* LOGIN_FLAG: integer 6 (standard online-ready profile) */
    errorCode |= sceRegMgrSetInt(KEY_login_flag(userNumber), 6);
    return errorCode;
}

The macro KEY_account_id() computes the correct registry key index by calling Get_Entity_Number(), which implements a linear mapping that mirrors the official PS4 registry layout.

Step 3: Refresh Apollo's Runtime Configuration

After the registry write succeeds, Apollo updates its in-memory state. The next time the application reads the user profile via regMgr_GetAccountId(), it populates apollo_config.account_id with the newly written value. The UI immediately reflects the activated account, and all subsequent save-file operations (export, import, resign) use this Account-ID to determine ownership and compatibility.

How the Fake Account-ID Is Calculated

The fake ID generation is designed to produce a unique, deterministic value for each local user while remaining visually distinct from genuine PSN IDs.

  • Base constant: 0x6F6C6C6F70610000ULL (ASCII for "apollo" encoded in the high bytes)
  • User differentiation: ~apollo_config.user_id & 0xFFFF (bitwise NOT of the internal user ID, masked to 16 bits)

This ensures that user 0x0001 receives a different fake ID than user 0x0002, preventing collisions when multiple local users are activated offline.

Registry Key Structure and Activation Flags

Apollo manipulates three specific registry keys to simulate a legitimate PSN login:

Registry Key Type Value Purpose
ACCOUNT_ID Binary (8 bytes) User-supplied 64-bit ID Unique identifier for PSN account linking
NP_ENV String "np" Environment specifier (production network)
LOGIN_FLAG Integer 6 Authentication state flag indicating a valid, online-ready profile

The LOGIN_FLAG value of 6 is critical; it signals to the PS4 operating system that the user has completed authentication, enabling features like remote play and save-file synchronization that would otherwise require PSN connectivity.

Invoking Activation from the Apollo UI

The activation workflow is exposed through the User Tools → Activate PS4 Accounts menu. According to the implementation in source/exec_cmd.c at line 622, the UI presents two distinct options:

  1. Generate a fake ID – Executes the deterministic formula described above and opens the OSK dialog with the pre-filled value.
  2. Enter a real PSN Account-ID – Opens an empty OSK dialog allowing the user to input a 16-character hexadecimal ID obtained from another console or account management tool.

Both paths converge on the activateAccount(user) function, which validates the input and calls regMgr_SetAccountId(). Upon successful activation, Apollo displays a confirmation message and explicitly warns that a system reboot is required for the changes to take full effect across all applications.

Summary

  • Apollo enables offline account activation by writing a valid Account-ID directly to the PS4 registry without PSN authentication.
  • Fake Account-IDs are generated deterministically using the formula 0x6F6C6C6F70610000ULL + (~user_id & 0xFFFF), ensuring uniqueness per local user.
  • The activation routine in source/offline_act.c writes three registry keys: ACCOUNT_ID (binary), NP_ENV (string "np"), and LOGIN_FLAG (integer 6).
  • Users access this feature via User Tools → Activate PS4 Accounts, choose between a fake or real ID, and must reboot the console for the activation to persist system-wide.

Frequently Asked Questions

What is offline account activation in Apollo?

Offline account activation is a feature in Apollo that allows you to assign a valid Account-ID to a local PS4 user without connecting to PlayStation Network. This process writes the necessary registry entries to simulate a legitimate PSN login, enabling save-file resigning and remote play functionality on offline consoles.

How does Apollo generate the fake Account-ID?

Apollo generates a deterministic fake Account-ID using a formula that combines a magic constant with the console's internal user identifier. The calculation 0x6F6C6C6F70610000ULL + (~apollo_config.user_id & 0xFFFF) produces a unique 64-bit value for each local user, displayed as a 16-character hexadecimal string that can be edited or replaced with a real PSN ID.

What registry keys does Apollo modify during activation?

During activation, Apollo modifies three critical registry keys through the regMgr_SetAccountId() function in source/offline_act.c: ACCOUNT_ID (an 8-byte binary value containing the 64-bit ID), NP_ENV (a string set to "np" indicating the production network environment), and LOGIN_FLAG (an integer set to 6 that marks the profile as authenticated and online-ready).

Do I need to reboot my PS4 after activating an account with Apollo?

Yes, a system reboot is required after activating an account. While Apollo updates the registry immediately and refreshes its own in-memory configuration, the PS4 operating system requires a reboot to fully recognize the new ACCOUNT_ID and LOGIN_FLAG values across all applications and system functions.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →