Skip to content

Add RetroAchievements host-override broadcast receiver#1

Open
misantronic wants to merge 1 commit into
JoeysRetroHandhelds:retroachievementsfrom
misantronic:raofflineproxy-host-override
Open

Add RetroAchievements host-override broadcast receiver#1
misantronic wants to merge 1 commit into
JoeysRetroHandhelds:retroachievementsfrom
misantronic:raofflineproxy-host-override

Conversation

@misantronic

@misantronic misantronic commented Jul 8, 2026

Copy link
Copy Markdown

What is RAOfflineProxy

RAOfflineProxy is an Android app that runs a local HTTP proxy between an emulator's RetroAchievements client and retroachievements.org. It caches game and achievement data for offline play and queues casual (softcore) unlocks while offline, flushing them once connectivity returns. It runs on the same device, listening on 127.0.0.1. More at https://raofflineproxy.com/

Why this is needed

To route an emulator's RA traffic through the proxy, RAOfflineProxy needs to redirect the rcheevos API host to 127.0.0.1 at runtime. This fork keeps the host hardcoded to retroachievements.org natively, so there is no config value to patch, and editing files is fragile. A small broadcast receiver is the clean mechanism already adopted by other rcheevos-based Android emulators (ARMSX2, PPSSPP, Flycast).

What this PR does

  • Adds an exported RetroAchievementsHostOverrideReceiver handling {applicationId}.action.SET_/CLEAR_RETROACHIEVEMENTS_HOST_OVERRIDE (SET carries a host extra, scheme://host[:port]).
  • Persists the override and applies it via a new native rcheevosSetHost() wrapping rc_client_set_host(). Applied before login in rcheevosInit (so the login request routes through the override too) and live when a client already exists.
  • Reapplies the persisted override on RA init.
  • Permits cleartext HTTP to 127.0.0.1/localhost in the network security config, since the proxy is a local plain-HTTP endpoint.

Clearing the override (or an empty host) restores the default retroachievements.org host. Hardcore stays disabled, so this remains softcore-only.

Verified end to end on a physical device: with the proxy running, an N64 game caches while online, then logs in and loads achievements while offline.

Related host-override work across emulators

Same integration pattern, tracked in misantronic/RAOfflineProxy#33:

Merged: ARMSX2/ARMSX2#164 · hrydgard/ppsspp#21760 · flyinghead/flycast#2371
Open: dolphin-emu/dolphin#14671 · libretro/RetroArch#19093
Closed: rafaelvcaetano/melonDS-android#1633 (declined upstream; covered by the melonDualDS fork)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant