Ayawindow On Screen Keymapper Database Backup & Restore
Reliable WAL/SHM backup and restore for Ayaneo Pocket‑series Android handhelds.
Overview Ayawindow stores its state in a SQLite database using WAL mode. Normal copy methods (cp, cat, tee) do not work reliably on these devices due to how the system exposes CE storage. This project provides a working method to back up and restore Ayawindow’s WAL/SHM files using dd through the handheld’s integrated root script environment.
No external rooting tools are required.
Supported Devices Tested on:
- Ayaneo Pocket DMG
- Ayaneo Pocket S2
- Ayaneo Pocket ACE
Database Location Ayawindow stores its database files here: /data_mirror/data_ce/null/0/com.ayaneo.gamewindow/databases/
Files involved:
- aya_window_db-shm
- aya_window_db-wal
Backup Script
export XSU_PREFIX=/product/bin/xsu
if [ "$(id -u)" -eq 0 ]; then unset XSU_PREFIX fi
$XSU_PREFIX sh -c ' set -e
dd if=/data_mirror/data_ce/null/0/com.ayaneo.gamewindow/databases/aya_window_db-shm of=/sdcard/aya_window_db-shm bs=4096 dd if=/data_mirror/data_ce/null/0/com.ayaneo.gamewindow/databases/aya_window_db-wal of=/sdcard/aya_window_db-wal bs=4096
chmod 644 /sdcard/aya_window_db-shm /sdcard/aya_window_db-wal '
Restore Script
xsu -c "dd if=/sdcard/aya_window_db-shm of=/data_mirror/data_ce/null/0/com.ayaneo.gamewindow/databases/aya_window_db-shm bs=4096" xsu -c "dd if=/sdcard/aya_window_db-wal of=/data_mirror/data_ce/null/0/com.ayaneo.gamewindow/databases/aya_window_db-wal bs=4096" xsu -c "chmod 600 /data_mirror/data_ce/null/0/com.ayaneo.gamewindow/databases/aya_window_db-*"
Notes
- Backup and restore work reliably when Ayawindow is not actively holding the WAL/SHM files open. It's recommended to turn off the key mapper function while backing up or restoring.
- dd is required because it performs a direct block‑level copy that bypasses the limitations of standard file operations on these devices.