How zyren-lab/kswitch works
KSwitch is a desktop Android backup and restore application. A user connects an Android device over ADB, scans and selects device content, then backs it up to a local folder with a manifest; restore reads a backup and sends selected content back to the device. The graph includes the UI, discovery and categorization, transfer and manifest handling, and ADB access. Some connections reflect the SOURCE INDEX or README because those source excerpts are incomplete; unsampled implementation details are not inferred.
Main entry points: ScreenContent.kt Workflow coordinator · AdbClient.kt ADB command client · BackupTab.kt Backup tab · RestoreTab.kt Restore tab
Components 18
Desktop interface
- App entry
src/main/kotlin/Main.kt - Main screen
src/main/kotlin/MainScreen.kt - Workflow coordinator
src/main/kotlin/ScreenContent.kt - Backup tab
src/main/kotlin/ui/BackupTab.kt - Restore tab
src/main/kotlin/ui/RestoreTab.kt - App selection
src/main/kotlin/ui/components/AppSelectionDialog.kt - Dashboard
src/main/kotlin/ui/components/Dashboard.kt - Dashboard card
src/main/kotlin/ui/components/MagicCard.kt
Device discovery
- Media scanner
src/main/kotlin/FileScanner.kt - App discovery
src/main/kotlin/AppEngine.kt - Category catalog
src/main/kotlin/CategoryManager.kt - Contacts and calls
src/main/kotlin/DataEngine.kt
Backup and restore
- File transfer
src/main/kotlin/BackupEngine.kt - Backup manifest
src/main/kotlin/ManifestManager.kt - Local backup folder
Device access
- ADB command client
src/main/kotlin/AdbClient.kt
Other components
- Desktop user
- Android device
Connections 26
- Desktop user → App entry: opens
README.md - App entry → Main screen: launches
src/main/kotlin/Main.kt - Main screen → Workflow coordinator: renders
src/main/kotlin/MainScreen.kt - Desktop user → Backup tab: selects backup
- Desktop user → Restore tab: selects restore
- Workflow coordinator → Backup tab: renders
src/main/kotlin/ScreenContent.kt - Workflow coordinator → Restore tab: renders
src/main/kotlin/ScreenContent.kt - Backup tab → App selection: opens
src/main/kotlin/ui/BackupTab.kt - Backup tab → Category catalog: formats counts
src/main/kotlin/ui/BackupTab.kt - Dashboard → Dashboard card: renders
src/main/kotlin/ui/components/Dashboard.kt - Workflow coordinator → Media scanner: scans files
src/main/kotlin/ScreenContent.kt - Workflow coordinator → App discovery: scans apps
src/main/kotlin/ScreenContent.kt - Workflow coordinator → Category catalog: builds categories
src/main/kotlin/ScreenContent.kt - Workflow coordinator → Contacts and calls: backs up data
src/main/kotlin/ScreenContent.kt - Workflow coordinator → File transfer: transfers files
src/main/kotlin/ScreenContent.kt - Workflow coordinator → Backup manifest: writes manifest
src/main/kotlin/ScreenContent.kt - Restore tab → Backup manifest: reads manifest
src/main/kotlin/ui/RestoreTab.kt - Workflow coordinator → ADB command client: runs device commands
src/main/kotlin/ScreenContent.kt - Media scanner → ADB command client: queries media
src/main/kotlin/FileScanner.kt - App discovery → ADB command client: queries and transfers apps
src/main/kotlin/AppEngine.kt - Contacts and calls → ADB command client: queries device data
src/main/kotlin/DataEngine.kt - File transfer → ADB command client: pulls and pushes files
src/main/kotlin/BackupEngine.kt - ADB command client → Android device: executes ADB
README.md - File transfer → Local backup folder: writes files
src/main/kotlin/BackupEngine.kt - Backup manifest → Local backup folder: records backup
README.md - Restore tab → Local backup folder: scans backup
src/main/kotlin/ui/RestoreTab.kt