Workflows¶
Fresh device baseline (planned)¶
- Connect device over USB.
- Validate ADB communication.
- Pull baseline config and metadata to
backups/Stock/. - Record state marker in
.rhc-state/.
Managed customization apply¶
Prep once:
- Run
just import-audio-assetsto copy source audio intomanaged/<profile>/media/audio. - Optionally run
just download-apksto cache latest Obtainium outside the repo (~/.cache/rhc/apksby default).
Use just customize-device (or rhc customize-device) to apply these ADB steps:
- Confirm SD reformat and partition removable card as public storage.
- Download/install latest Obtainium and allow install-other-apps permissions.
- Pre-Obtainium sideloads:
Pixel Guide Androidis installed from its GitHub releases source.
- Pre-Obtainium sideloads:
- Apply managed Obtainium settings from
managed/<profile>/obtainium/settings-only.json.age(orsettings-only.jsonwhen unencrypted):github-creds,gitlab-creds, anduseFGService.- Token precedence:
RHC_OBTAINIUM_GITHUB_TOKEN/RHC_OBTAINIUM_GITLAB_TOKEN, then Bitwarden itemsRHC_BW_OBTAINIUM_GITHUB_ITEM/RHC_BW_OBTAINIUM_GITLAB_ITEM(requires unlockedBW_SESSION), then file values.
- Token precedence:
- Download latest single-device Obtainium Emulation Pack JSON, copy it to
/sdcard/Download, and automate Obtainium import.- Bootstrap
Aurora Storefrom Obtainium first.
- Bootstrap
- Install required apps from Aurora Store (
Firefox,CX File Explorer,Daijishō, and profile-specific apps such asYabaSanshiro 2 Pro). - Install remaining required Obtainium apps (
RetroArch AArch64,Argosy, andGameNative) through Obtainium automation.- Obtanium foreground service is disabled (
flutter.useFGService=false) to hide the persistent foreground notification.
- Obtanium foreground service is disabled (
- Remove preloaded ROM files from
/storage/emulated/0/ROMswhile preservingsysteminfo.txt. - Push
managed/<profile>/media/audioto/storage/emulated/0/media/audio. - Configure sounds:
go_straight→ alarmlightning_shield→ chargingsonic_ring→ notificationstar_light_zone→ ringtone- set system/ring/notification/alarm to a handheld-default level (about 30% with minimum level 2 fallback)
- Set timezone to
America/New_York. - Disable the lock screen.
- Disable/uninstall Browser, Calendar, Camera, Clock, Files app, Gallery, MIX Explorer, Music, and Sim Toolkit.
- Record completion timestamp in
.rhc-state/.
Targeted runs are supported with --target (repeatable), for example:
- SD format only:
just format-sd yes_format_sd=true - APK setup only:
just configure-apks - Obtainium import only:
just import-obtainium-pack cleanup_rpc=true - CLI direct:
rhc customize-device --target timezone --target lockscreen
Use --cleanup-rpc on rhc customize-device (or cleanup_rpc=true in just wrappers)
to stop the uiautomator2 RPC service after import automation completes.
Machine-readable output is available on all commands:
--output jsonfor JSONL events on stdout/stderr--log-file /path/to/rhc.log.jsonlfor persisted JSON event logs
Optional root-adbd helper:
just adb-rootattempts to enable root over ADB on the connected device.- This succeeds only when the device/build supports root adbd; otherwise it exits with a clear failure.
Encrypted Aurora backup + restore¶
Use these workflows to keep Aurora Store backups encrypted at rest in-repo.
Before running backup/restore, unlock Bitwarden in your current shell and export BW_SESSION:
export BW_SESSION="$(bw unlock --raw)"
Bootstrap local untracked identity file from Bitwarden:
just bootstrap-age-key-
Optional overrides:
just bootstrap-age-key bw_item="<item-id-or-name>" out_file=".rhc-secrets/age-identity.txt" -
Run
just backup-aurora-secureto capture current Aurora app state.- Uses local identity file first (
RHC_AGE_IDENTITY_FILE/--identity-file) when present. - Otherwise reads
agesecret key from Bitwarden (bw get notes <item>), derives the public recipient, and encrypts files. - Set the Bitwarden item via
RHC_BW_AGE_ITEMor pass--bw-item. - Optional
justpassthrough:just backup-aurora-secure bw_item="<item-id-or-name>". - Optional local identity passthrough:
just backup-aurora-secure identity_file=".rhc-secrets/age-identity.txt". - Writes encrypted files to
backups/Android/aurora-store/current/encrypted/. - Uses a single backup version (
current) and replaces it on each run. - Does not keep tarballs/archives in the repository.
- Uses local identity file first (
- Run
just restore-aurora-secureto restore from encrypted snapshot.- Uses local identity file first (
RHC_AGE_IDENTITY_FILE/--identity-file) when present. - Otherwise reads the same Bitwarden
agesecret key for decryption. - Uses
RHC_BW_AGE_ITEM,--bw-item, or backup metadata (bitwarden_item) to locate the key source. - Optional
justpassthrough:just restore-aurora-secure bw_item="<item-id-or-name>". - Optional local identity passthrough:
just restore-aurora-secure identity_file=".rhc-secrets/age-identity.txt". - Restores from
backups/Android/aurora-store/current/. - Force-stops Aurora Store before restore operations.
- Uses local identity file first (