Repository navigation
v1.1.2 Add Ota & Make Some Changes
WuWaConfig v1.1.2
Changelog for everything landed after v1.1.1 (commits
b836cbf,3348469,6d98cd4,4b61c81).
Backend hardening
AdbClientkeepalive/command race — serialized keepalive pings and command dispatch behindtxMutexso heartbeats no longer corrupt in-flight commands.ShizukuBackend.pushFile— each chunk is now pushed withexecOrThrow, surfacing failures instead of silently swallowing them.LogRepository— disk writes moved toDispatchers.IO(no longer block the main/UI thread).- ADB
Client.logcopy fix (3348469) — the ADB shell runs as a different UID andcpinto the app's private directory failed silently, becauseAdbClient.executeShellCommandignored the shell exit code (a failed copy looked like success and skipped the fallback).AdbBackend.copyFilenow verifies withtest -f; if the file didn't land, it stages via the world-writable/data/local/tmp,chmod 644(so the app UID can read it), then copies in-process into the private target. Fixes "Failed to copy log file" on the ADB backend.
Config & optimization
AccessBackend.deleteFileadded to the interface + all four backends (ADB/Shizuku/Root/SAF);ConfigManager.deleteConfigFilesnow uses it.CvarDatabase.optimizeIniText/optimizeIniTextImpl— comments out redundant/unknown CVars; covered by newCvarDatabaseOptimizeTest.UpdateManager.verifySignatureMatchesInstalled— SHA-256 certificate comparison against the installed package (signingCertshelper) for OTA/signature integrity checks.CvarDatabase.ensureLoaded— made non-blocking so the DB no longer stalls startup.ConfigManager.deleteConfigFiles/cleanConfigFiles— returnResult.success(no-op) instead of erroring on non-existent files.GachaViewModel.onReceive— wrapped inviewModelScope.launch(Dispatchers.IO)so the gacha broadcast receiver no longer does work on the main thread.ShizukuBackend— now takes aContext(passed fromWuWaConfigApp) for correct lifecycle/scoping.
pushFile refactor
- Extracted
buildPushFilePlan/PushFilePlanintoShellUtils.kt;AdbBackend.pushFileandShizukuBackend.pushFilenow share the same planning logic. - Fixed an off-by-one in
maxPushChunkSize— the overhead now correctly counts the two quote characters around each chunk (PRINTF_PREFIX(12) + CHUNK_QUOTE(2) + REDIRECT(4) + quoted-path length), preventing overly-large chunks that exceededMAX_ARG_STRLEN.
Unit tests added
ShellUtilsTest,HashMonitorTest,ConfigManagerTest(usesmockStatic(Environment)),UpdateManagerTest(Mockito — mocksSignature.toByteArray(), which the Android stub throws on),PushFilePlanTest,CvarDatabaseOptimizeTest.- Mockito added to
gradle/libs.versions.toml(mockito = "5.11.0") andapp/build.gradle.ktstestImplementation(libs.mockito.core). - Full suite (~90 tests) green through
testDebugUnitTest.
Pity Tracker changes
- Version bump →
versionName 1.1.2(versionCode 13). - Removed the background Pity Tracker service (
GachaPollService):- Deleted
app/src/main/java/com/wuwaconfig/app/service/GachaPollService.kt. - Removed its
<service>declaration fromAndroidManifest.xml. - Removed the supporting
GachaViewModelplumbing:isPollingstate,pollStoppedReceiver,startBackgroundPoll(),stopGachaPoll(), and theGachaPollServiceimport. - The Pity Tracker screen no longer runs a foreground service that polls
Client.login the background.
- Deleted
- Added a Stop Reading button to the Pity Tracker screen:
Fetch Gacha Historynow runs a cancellable coroutine (readJobinGachaViewModel).- New
GachaViewModel.stopReading()cancels the in-progress read and clears loading flags. - A red Stop Reading button appears while reading
Client.log/ fetching from Kuro's API, and stops it on tap.