docs: cite RetroArch v1.22.2 for Android detection

This commit is contained in:
Abdessamad Derraz committed 2026-10-22 03:34:39 +02:00
1 parent 8dd463933e
commit 05d8f944a9
5 files changed
+27 -10

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@
$ErrorActionPreference = "Stop"
$defaultInstallUrl = "https://raw.githubusercontent.com/Abdess/retrobios/main/install.py"
$defaultInstallSha256 = "b37588b71f2a6273cedf31ee05fc7b7053b5489f074349fef9cfae0dcf2555ff"
$defaultInstallSha256 = "956eba5f9d01138abda5550973810ccdc1138daa54c9065bf3f04cc0ba051468"
$maximumInstallerBytes = 2MB
$installerExit = 0
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
+8 -5
View File
@@ -1171,11 +1171,14 @@ def _android_storage_root() -> Path:
def _detect_android() -> list[tuple[str, Path]]:
"""Find the RetroArch system directory on Android.
The config is read from the app external files directory first, then from
the internal one (platform_unix.c:1327-1395). A system_directory left at
default resolves against <shared storage>/RetroArch, which is also where
the directory sits when no config has been written yet
(platform_unix.c:2836-2851).
RetroArch v1.22.2: the launcher picks retroarch.cfg in the app external
files directory, else in the internal one
(pkg/android/phoenix-common/src/com/retroarch/browser/preferences/util/
UserPreferences.java:36-89), and passes it as CONFIGFILE
(MainMenuActivity.java:178, read at frontend/drivers/platform_unix.c:
1428-1444). A system_directory left at default resolves against
<shared storage>/RetroArch/system (platform_unix.c:1670-1697), which is
also where the directory sits when no config has been written yet.
"""
found: list[tuple[str, Path]] = []
storage = _android_storage_root()
+1 -1
View File
@@ -18,7 +18,7 @@ esac
TEMP_INSTALLER=""
TEMP_DIRECTORY=""
DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/install.py"
DEFAULT_INSTALL_SHA256="b37588b71f2a6273cedf31ee05fc7b7053b5489f074349fef9cfae0dcf2555ff"
DEFAULT_INSTALL_SHA256="956eba5f9d01138abda5550973810ccdc1138daa54c9065bf3f04cc0ba051468"
MAX_INSTALLER_BYTES=2097152
cleanup() {
+13
View File
@@ -2711,6 +2711,19 @@ class RetroDeckFoldersMovedOneByOne(unittest.TestCase):
self.assertNotIn("bios/ at", label)
class AndroidCitationsNameTheRelease(unittest.TestCase):
"""The Android detection cited platform_unix.c lines of a RetroArch
revision nobody named, which no longer held the code they described."""
def test_the_lines_are_those_of_v1_22_2(self):
page = (REPO_ROOT / "wiki" / "installer.md").read_text(encoding="utf-8")
for text in (install._detect_android.__doc__, page):
self.assertIn("v1.22.2", text)
self.assertIn("platform_unix.c:1670-1697", text.replace("\n ", ""))
self.assertNotIn("1327-1395", text)
self.assertNotIn("2836-2851", text)
class TheBoardTheSystemNamesIsTheTarget(unittest.TestCase):
"""Batocera, Recalbox and ROCKNIX each write the board they were built
for, but the installer read none of them, so a Batocera RPi4 installed
+4 -3
View File
@@ -499,9 +499,10 @@ with `/system/build.prop` covering a shell started without them.
Detection then looks for RetroArch, the only Android frontend keeping a shared
BIOS directory. `retroarch.cfg` is read from the app external files directory
and then from the internal one, the order the frontend itself follows
(`platform_unix.c:1327-1395`), and a `system_directory` left at `default`
resolves against `<shared storage>/RetroArch`, where the directory also sits
when no config has been written yet (`platform_unix.c:2836-2851`).
(RetroArch v1.22.2, `UserPreferences.java:36-89`), and a `system_directory`
left at `default` resolves against `<shared storage>/RetroArch`, where the
directory also sits when no config has been written yet
(`platform_unix.c:1670-1697`).
Under scoped storage those two config paths are unreadable from Termux on
Android 11 and later, so on current devices the shared directory is what