├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── bin.yaml │ ├── build.yaml │ ├── lint.yaml │ └── release-please.yml ├── .gitmodules ├── CHANGELOG.md ├── LICENSE ├── README.md ├── build └── build_bin.sh ├── dex ├── .gitignore ├── README.md ├── app │ ├── .gitignore │ ├── build.gradle.kts │ ├── proguard-rules.pro │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ ├── android │ │ │ │ ├── os │ │ │ │ │ └── SystemProperties.java │ │ │ │ └── util │ │ │ │ │ ├── TypedXmlPullParser.java │ │ │ │ │ ├── TypedXmlSerializer.java │ │ │ │ │ └── XmlApi30.java │ │ │ ├── com │ │ │ │ ├── android │ │ │ │ │ ├── internal │ │ │ │ │ │ └── util │ │ │ │ │ │ │ ├── BinaryXmlPullParser.java │ │ │ │ │ │ │ ├── BinaryXmlSerializer.java │ │ │ │ │ │ │ ├── FastDataInput.java │ │ │ │ │ │ │ ├── FastDataOutput.java │ │ │ │ │ │ │ ├── FastXmlSerializer.java │ │ │ │ │ │ │ ├── HexDump.java │ │ │ │ │ │ │ ├── ModifiedUtf8.java │ │ │ │ │ │ │ ├── XmlPullParserWrapper.java │ │ │ │ │ │ │ ├── XmlSerializerWrapper.java │ │ │ │ │ │ │ └── XmlUtils.java │ │ │ │ │ ├── org │ │ │ │ │ │ └── kxml2 │ │ │ │ │ │ │ └── io │ │ │ │ │ │ │ ├── KXmlParser.java │ │ │ │ │ │ │ └── KXmlSerializer.java │ │ │ │ │ ├── providers │ │ │ │ │ │ └── settings │ │ │ │ │ │ │ ├── SettingsState.java │ │ │ │ │ │ │ ├── SettingsStateApi26.java │ │ │ │ │ │ │ └── SettingsStateApi31.java │ │ │ │ │ └── server │ │ │ │ │ │ └── display │ │ │ │ │ │ └── DisplayControlHidden.java │ │ │ │ └── xayah │ │ │ │ │ └── dex │ │ │ │ │ ├── BaseUtil.java │ │ │ │ │ ├── CCHelper.java │ │ │ │ │ ├── CCUtil.java │ │ │ │ │ ├── FakeContext.java │ │ │ │ │ ├── HiddenApiHelper.java │ │ │ │ │ ├── HiddenApiUtil.java │ │ │ │ │ ├── HttpUtil.java │ │ │ │ │ ├── NotificationUtil.java │ │ │ │ │ └── SsaidUtil.java │ │ │ └── libcore │ │ │ │ ├── internal │ │ │ │ └── StringPool.java │ │ │ │ ├── io │ │ │ │ └── IoUtils.java │ │ │ │ └── util │ │ │ │ ├── HexEncoding.java │ │ │ │ └── XmlObjectFactory.java │ │ └── res │ │ │ ├── drawable │ │ │ ├── ic_launcher_background.xml │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── values-night │ │ │ └── themes.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ │ └── xml │ │ │ ├── backup_rules.xml │ │ │ └── data_extraction_rules.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── xayah │ │ └── dex │ │ └── ExampleUnitTest.java ├── build.gradle.kts ├── gradle.properties ├── gradle │ ├── libs.versions.toml │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hiddenapi │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── android │ │ │ ├── app │ │ │ └── INotificationManager.aidl │ │ │ └── content │ │ │ └── pm │ │ │ └── ParceledListSlice.aidl │ │ └── java │ │ └── android │ │ ├── app │ │ └── AppOpsManagerHidden.java │ │ ├── content │ │ ├── IContentProvider.java │ │ └── pm │ │ │ ├── BaseParceledListSlice.java │ │ │ ├── PackageManagerHidden.java │ │ │ └── ParceledListSlice.java │ │ ├── os │ │ ├── ServiceManager.java │ │ └── UserHandleHidden.java │ │ └── view │ │ └── SurfaceControlHidden.java └── settings.gradle.kts ├── docs └── static │ └── img │ ├── afdian.svg │ ├── bmc-button.svg │ └── pp_h_rgb.svg ├── fastlane └── metadata │ └── android │ └── en-US │ ├── full_description.txt │ ├── images │ ├── icon.png │ └── phoneScreenshots │ │ ├── 01.jpg │ │ ├── 02.jpg │ │ ├── 03.jpg │ │ ├── 04.jpg │ │ ├── 05.jpg │ │ └── 06.jpg │ └── short_description.txt ├── source-next ├── .gitignore ├── app │ ├── .gitignore │ ├── build.gradle.kts │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── xayah │ │ │ └── databackup │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── databackup │ │ │ │ └── rootservice │ │ │ │ └── IRemoteRootService.aidl │ │ ├── java │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── databackup │ │ │ │ ├── App.kt │ │ │ │ ├── database │ │ │ │ ├── AppDataBase.kt │ │ │ │ ├── dao │ │ │ │ │ └── AppDao.kt │ │ │ │ └── entity │ │ │ │ │ └── App.kt │ │ │ │ ├── feature │ │ │ │ ├── MainActivity.kt │ │ │ │ ├── MainViewModel.kt │ │ │ │ ├── backup │ │ │ │ │ ├── BackupPreviewScreen.kt │ │ │ │ │ └── apps │ │ │ │ │ │ ├── AppsViewModel.kt │ │ │ │ │ │ └── BackupAppsScreen.kt │ │ │ │ ├── dashboard │ │ │ │ │ └── DashboardScreen.kt │ │ │ │ └── setup │ │ │ │ │ ├── PermissionsViewModel.kt │ │ │ │ │ ├── SetupActivity.kt │ │ │ │ │ └── SetupScreens.kt │ │ │ │ ├── rootservice │ │ │ │ └── RemoteRootService.kt │ │ │ │ ├── ui │ │ │ │ ├── component │ │ │ │ │ ├── ActionButton.kt │ │ │ │ │ ├── Chip.kt │ │ │ │ │ ├── Effect.kt │ │ │ │ │ ├── FilterButton.kt │ │ │ │ │ ├── ListItem.kt │ │ │ │ │ ├── Modifier.kt │ │ │ │ │ ├── PermissionCard.kt │ │ │ │ │ ├── SegmentProgressIndicator.kt │ │ │ │ │ ├── StorageCard.kt │ │ │ │ │ └── TransitionSpec.kt │ │ │ │ └── theme │ │ │ │ │ ├── Color.kt │ │ │ │ │ ├── Theme.kt │ │ │ │ │ └── Type.kt │ │ │ │ ├── util │ │ │ │ ├── BaseViewModel.kt │ │ │ │ ├── DataStoreHelper.kt │ │ │ │ ├── DatabaseHelper.kt │ │ │ │ ├── FlowHelper.kt │ │ │ │ ├── LogHelper.kt │ │ │ │ ├── NavHelper.kt │ │ │ │ ├── NotificationHelper.kt │ │ │ │ ├── PathHelper.kt │ │ │ │ ├── ProcessHelper.kt │ │ │ │ ├── ShellHelper.kt │ │ │ │ ├── SortsAndFiltersHelper.kt │ │ │ │ ├── StorageHelper.kt │ │ │ │ └── WorkManagerHelper.kt │ │ │ │ └── workers │ │ │ │ └── AppsUpdateWorker.kt │ │ └── res │ │ │ ├── anim │ │ │ └── fast_out_extra_slow_in.xml │ │ │ ├── drawable │ │ │ ├── ic_animated_check.xml │ │ │ ├── ic_animated_chevron_right_to_down.xml │ │ │ ├── ic_animated_database.xml │ │ │ ├── ic_animated_gamepad_2.xml │ │ │ ├── ic_animated_resource_package.xml │ │ │ ├── ic_animated_user.xml │ │ │ ├── ic_animted_arrow_up_down_a_z.xml │ │ │ ├── ic_archive.xml │ │ │ ├── ic_archive_restore.xml │ │ │ ├── ic_arrow_down_a_z.xml │ │ │ ├── ic_arrow_left.xml │ │ │ ├── ic_arrow_up_a_z.xml │ │ │ ├── ic_badge_info.xml │ │ │ ├── ic_bell.xml │ │ │ ├── ic_book_a.xml │ │ │ ├── ic_book_down.xml │ │ │ ├── ic_book_text.xml │ │ │ ├── ic_book_up.xml │ │ │ ├── ic_book_user.xml │ │ │ ├── ic_calendar_check.xml │ │ │ ├── ic_check.xml │ │ │ ├── ic_chevron_down.xml │ │ │ ├── ic_chevron_right.xml │ │ │ ├── ic_circle_x.xml │ │ │ ├── ic_clock.xml │ │ │ ├── ic_cloud_upload.xml │ │ │ ├── ic_database.xml │ │ │ ├── ic_folder.xml │ │ │ ├── ic_funnel.xml │ │ │ ├── ic_gamepad_2.xml │ │ │ ├── ic_hash.xml │ │ │ ├── ic_launcher_foreground.xml │ │ │ ├── ic_layout_grid.xml │ │ │ ├── ic_message_circle.xml │ │ │ ├── ic_package_2.xml │ │ │ ├── ic_phone.xml │ │ │ ├── ic_resource_package.xml │ │ │ ├── ic_search.xml │ │ │ ├── ic_settings.xml │ │ │ ├── ic_user.xml │ │ │ ├── ic_user_round.xml │ │ │ ├── ic_wifi.xml │ │ │ ├── img_empty.xml │ │ │ └── img_setup.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.webp │ │ │ └── ic_launcher_round.webp │ │ │ ├── values-ar │ │ │ └── strings.xml │ │ │ ├── values-bn │ │ │ └── strings.xml │ │ │ ├── values-bs │ │ │ └── strings.xml │ │ │ ├── values-ca │ │ │ └── strings.xml │ │ │ ├── values-cs │ │ │ └── strings.xml │ │ │ ├── values-de │ │ │ └── strings.xml │ │ │ ├── values-es │ │ │ └── strings.xml │ │ │ ├── values-fa │ │ │ └── strings.xml │ │ │ ├── values-fi │ │ │ └── strings.xml │ │ │ ├── values-fil │ │ │ └── strings.xml │ │ │ ├── values-fr │ │ │ └── strings.xml │ │ │ ├── values-hr │ │ │ └── strings.xml │ │ │ ├── values-hu │ │ │ └── strings.xml │ │ │ ├── values-in │ │ │ └── strings.xml │ │ │ ├── values-it │ │ │ └── strings.xml │ │ │ ├── values-ko │ │ │ └── strings.xml │ │ │ ├── values-ml │ │ │ └── strings.xml │ │ │ ├── values-nb-rNO │ │ │ └── strings.xml │ │ │ ├── values-night-v31 │ │ │ └── colors.xml │ │ │ ├── values-night │ │ │ └── colors.xml │ │ │ ├── values-pl │ │ │ └── strings.xml │ │ │ ├── values-pt-rBR │ │ │ └── strings.xml │ │ │ ├── values-ro │ │ │ └── strings.xml │ │ │ ├── values-ru │ │ │ └── strings.xml │ │ │ ├── values-sr │ │ │ └── strings.xml │ │ │ ├── values-sv │ │ │ └── strings.xml │ │ │ ├── values-ta │ │ │ └── strings.xml │ │ │ ├── values-tr │ │ │ └── strings.xml │ │ │ ├── values-uk │ │ │ └── strings.xml │ │ │ ├── values-uz │ │ │ └── strings.xml │ │ │ ├── values-v31 │ │ │ └── colors.xml │ │ │ ├── values-vi │ │ │ └── strings.xml │ │ │ ├── values-zh-rCN │ │ │ └── strings.xml │ │ │ ├── values-zh-rHK │ │ │ └── strings.xml │ │ │ ├── values-zh-rTW │ │ │ └── strings.xml │ │ │ ├── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── themes.xml │ │ │ └── xml │ │ │ ├── backup_rules.xml │ │ │ └── data_extraction_rules.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── xayah │ │ └── databackup │ │ └── ExampleUnitTest.kt ├── build.gradle.kts ├── gradle.properties ├── gradle │ ├── libs.versions.toml │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── hiddenapi │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── xayah │ │ │ └── hiddenapi │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── android │ │ │ │ ├── app │ │ │ │ ├── ActivityThread.java │ │ │ │ └── ContextImpl.java │ │ │ │ ├── content │ │ │ │ └── pm │ │ │ │ │ ├── PackageManagerHidden.java │ │ │ │ │ └── UserInfo.java │ │ │ │ └── os │ │ │ │ ├── UserHandleHidden.java │ │ │ │ └── UserManagerHidden.java │ │ └── kotlin │ │ │ └── com │ │ │ └── xayah │ │ │ └── hiddenapi │ │ │ └── Refine.kt │ │ └── test │ │ └── java │ │ └── com │ │ └── xayah │ │ └── hiddenapi │ │ └── ExampleUnitTest.kt ├── native │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── xayah │ │ │ └── libnative │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── jni │ │ │ ├── CMakeLists.txt │ │ │ └── nativelib │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── nativelib.cpp │ │ └── kotlin │ │ │ └── com │ │ │ └── xayah │ │ │ └── libnative │ │ │ └── NativeLib.kt │ │ └── test │ │ └── java │ │ └── com │ │ └── xayah │ │ └── libnative │ │ └── ExampleUnitTest.kt └── settings.gradle.kts └── source ├── .gitignore ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro └── src │ ├── arm64-v8a │ └── assets │ │ └── bin.zip │ ├── armeabi-v7a │ └── assets │ │ └── bin.zip │ ├── main │ ├── AndroidManifest.xml │ ├── ic_launcher-playstore.png │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── databackup │ │ │ ├── DataBackupApplication.kt │ │ │ ├── MainActivity.kt │ │ │ └── SplashActivity.kt │ └── res │ │ ├── drawable │ │ ├── ic_launcher_foreground.xml │ │ ├── ic_launcher_foreground_tonal.xml │ │ ├── ic_rounded_acute.xml │ │ ├── ic_rounded_adjust_circle.xml │ │ ├── ic_rounded_android.xml │ │ ├── ic_rounded_android_circle.xml │ │ ├── ic_rounded_apps.xml │ │ ├── ic_rounded_arrow_circle_down.xml │ │ ├── ic_rounded_arrow_circle_up.xml │ │ ├── ic_rounded_badge.xml │ │ ├── ic_rounded_cancel.xml │ │ ├── ic_rounded_cancel_circle.xml │ │ ├── ic_rounded_check_circle.xml │ │ ├── ic_rounded_database.xml │ │ ├── ic_rounded_database_circle.xml │ │ ├── ic_rounded_deployed_code.xml │ │ ├── ic_rounded_emoticon.xml │ │ ├── ic_rounded_folder_open.xml │ │ ├── ic_rounded_history.xml │ │ ├── ic_rounded_image.xml │ │ ├── ic_rounded_key.xml │ │ ├── ic_rounded_lan.xml │ │ ├── ic_rounded_link.xml │ │ ├── ic_rounded_manage_accounts.xml │ │ ├── ic_rounded_not_started.xml │ │ ├── ic_rounded_not_started_circle.xml │ │ ├── ic_rounded_package_2.xml │ │ ├── ic_rounded_package_2_circle.xml │ │ ├── ic_rounded_pending_circle.xml │ │ ├── ic_rounded_person.xml │ │ └── ic_rounded_stadia_controller.xml │ │ ├── font │ │ └── jetbrains_mono_regular.ttf │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── raw │ │ └── keep.xml │ │ ├── values-ar │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-bn │ │ └── strings.xml │ │ ├── values-bs │ │ └── strings.xml │ │ ├── values-ca │ │ └── strings.xml │ │ ├── values-cs │ │ └── strings.xml │ │ ├── values-de │ │ └── strings.xml │ │ ├── values-es │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-fa │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-fi │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-fil │ │ └── strings.xml │ │ ├── values-fr │ │ └── strings.xml │ │ ├── values-hr │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-hu │ │ └── strings.xml │ │ ├── values-in │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-it │ │ └── strings.xml │ │ ├── values-ko │ │ └── strings.xml │ │ ├── values-ml │ │ └── strings.xml │ │ ├── values-nb-rNO │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-night-v31 │ │ └── colors.xml │ │ ├── values-night │ │ └── colors.xml │ │ ├── values-pl │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-pt-rBR │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-ro │ │ └── strings.xml │ │ ├── values-ru │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-sr │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-sv │ │ └── strings.xml │ │ ├── values-ta │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-tr │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-uk │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-uz │ │ └── strings.xml │ │ ├── values-v31 │ │ └── colors.xml │ │ ├── values-vi │ │ └── strings.xml │ │ ├── values-zh-rCN │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-zh-rHK │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values-zh-rTW │ │ ├── plurals.xml │ │ └── strings.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── plurals.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ ├── backup_rules.xml │ │ └── data_extraction_rules.xml │ ├── x86 │ └── assets │ │ └── bin.zip │ └── x86_64 │ └── assets │ └── bin.zip ├── build-logic ├── .gitignore ├── convention │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ ├── ApplicationCommonConventionPlugin.kt │ │ ├── ApplicationComposeConventionPlugin.kt │ │ ├── ApplicationHiltConventionPlugin.kt │ │ ├── ApplicationHiltWorkConventionPlugin.kt │ │ ├── LibraryAndroidTestConventionPlugin.kt │ │ ├── LibraryCommonConventionPlugin.kt │ │ ├── LibraryComposeConventionPlugin.kt │ │ ├── LibraryFirebaseConventionPlugin.kt │ │ ├── LibraryHiltConventionPlugin.kt │ │ ├── LibraryHiltWorkConventionPlugin.kt │ │ ├── LibraryProtobufConventionPlugin.kt │ │ ├── LibraryRoomConventionPlugin.kt │ │ └── LibraryTestConventionPlugin.kt ├── gradle.properties └── settings.gradle.kts ├── build.gradle.kts ├── core ├── common │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── xayah │ │ └── core │ │ └── common │ │ └── util │ │ ├── BuildConfigUtil.kt │ │ └── ListUtil.kt ├── data │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ ├── androidTest │ │ └── kotlin │ │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── data │ │ │ └── repository │ │ │ └── UnitTest.kt │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── data │ │ │ ├── module │ │ │ └── RemoteRootServiceModule.kt │ │ │ ├── repository │ │ │ ├── AppsRepo.kt │ │ │ ├── CloudRepository.kt │ │ │ ├── DirectoryRepository.kt │ │ │ ├── FilesRepo.kt │ │ │ ├── LabelsRepo.kt │ │ │ ├── ListDataRepo.kt │ │ │ ├── MediaRepository.kt │ │ │ ├── PackageRepository.kt │ │ │ ├── SettingsDataRepo.kt │ │ │ ├── TaskRepository.kt │ │ │ ├── UsersRepo.kt │ │ │ └── WorkRepo.kt │ │ │ └── util │ │ │ └── DataTypeUtil.kt │ │ └── res │ │ └── values │ │ └── ids.xml ├── database │ ├── .gitignore │ ├── build.gradle.kts │ ├── schemas │ │ └── com.xayah.core.database.AppDatabase │ │ │ ├── 1.json │ │ │ ├── 2.json │ │ │ ├── 3.json │ │ │ ├── 4.json │ │ │ ├── 5.json │ │ │ ├── 6.json │ │ │ └── 7.json │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── xayah │ │ └── core │ │ └── database │ │ ├── AppDatabase.kt │ │ ├── DatabaseMigration.kt │ │ ├── DatabaseModule.kt │ │ ├── dao │ │ ├── CloudDao.kt │ │ ├── DirectoryDao.kt │ │ ├── LabelDao.kt │ │ ├── MediaDao.kt │ │ ├── PackageDao.kt │ │ └── TaskDao.kt │ │ └── util │ │ └── Converters.kt ├── datastore │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── xayah │ │ └── core │ │ └── datastore │ │ ├── Boolean.kt │ │ ├── ConstantUtil.kt │ │ ├── DbPreferencesDataSource.kt │ │ ├── Int.kt │ │ ├── Long.kt │ │ ├── String.kt │ │ ├── Util.kt │ │ └── di │ │ ├── CoroutineScopesModule.kt │ │ ├── DataStoreModule.kt │ │ └── DispatchersModule.kt ├── hiddenapi │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── android │ │ │ └── content │ │ │ └── pm │ │ │ └── IPackageManager.aidl │ │ ├── java │ │ └── android │ │ │ ├── app │ │ │ ├── ActivityManagerHidden.java │ │ │ ├── ActivityThread.java │ │ │ ├── AppOpsManagerHidden.java │ │ │ └── ContextImpl.java │ │ │ ├── content │ │ │ └── pm │ │ │ │ ├── PackageManagerHidden.java │ │ │ │ └── UserInfo.java │ │ │ ├── os │ │ │ ├── MemoryFileHidden.java │ │ │ ├── ServiceManager.java │ │ │ ├── UserHandleHidden.java │ │ │ └── UserManagerHidden.java │ │ │ └── view │ │ │ └── SurfaceControlHidden.java │ │ └── kotlin │ │ └── com │ │ └── xayah │ │ └── core │ │ └── hiddenapi │ │ └── HiddenApiUtil.kt ├── model │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── core │ │ │ │ └── model │ │ │ │ └── database │ │ │ │ └── PackagePermission.aidl │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── core │ │ │ │ └── model │ │ │ │ ├── App.kt │ │ │ │ ├── Data.kt │ │ │ │ ├── Enum.kt │ │ │ │ ├── File.kt │ │ │ │ ├── SettingsData.kt │ │ │ │ ├── Target.kt │ │ │ │ ├── Typealias.kt │ │ │ │ ├── database │ │ │ │ ├── CloundEntity.kt │ │ │ │ ├── DirectoryEntity.kt │ │ │ │ ├── LabelEntity.kt │ │ │ │ ├── MediaEntity.kt │ │ │ │ ├── PackageEntity.kt │ │ │ │ ├── TaskDetailEntity.kt │ │ │ │ └── TaskEntity.kt │ │ │ │ └── util │ │ │ │ └── ModelUtil.kt │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ │ └── test │ │ └── kotlin │ │ └── com │ │ └── xayah │ │ └── core │ │ └── model │ │ └── UnitTest.kt ├── network │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── network │ │ │ ├── client │ │ │ ├── CloudClient.kt │ │ │ ├── FTPClientImpl.kt │ │ │ ├── SFTPClientImpl.kt │ │ │ ├── SMBClientImpl.kt │ │ │ └── WebDAVClientImpl.kt │ │ │ ├── io │ │ │ ├── CountingInputStreamImpl.kt │ │ │ └── CountingOutputStreamImpl.kt │ │ │ ├── model │ │ │ └── GitHub.kt │ │ │ ├── retrofit │ │ │ └── GitHubRepository.kt │ │ │ └── util │ │ │ └── ModelUtil.kt │ │ └── res │ │ └── values │ │ └── ids.xml ├── provider │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── provider │ │ │ ├── CrashProvider.kt │ │ │ └── FileProvider.kt │ │ └── res │ │ └── xml │ │ └── file_paths.xml ├── rootservice │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── rootservice │ │ │ ├── IRemoteRootService.aidl │ │ │ └── parcelables │ │ │ ├── PathParcelable.aidl │ │ │ ├── StatFsParcelable.aidl │ │ │ └── StorageStatsParcelable.aidl │ │ └── kotlin │ │ └── com │ │ └── xayah │ │ └── core │ │ └── rootservice │ │ ├── impl │ │ └── RemoteRootServiceImpl.kt │ │ ├── parcelables │ │ ├── PathParcelable.kt │ │ ├── StatFsParcelable.kt │ │ └── StorageStatsParcelable.kt │ │ ├── service │ │ └── RemoteRootService.kt │ │ └── util │ │ ├── CoroutineUtil.kt │ │ ├── ExceptionUtil.kt │ │ └── SsaidUtil.kt ├── service │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── service │ │ │ ├── AbstractProcessingService.kt │ │ │ ├── AbstractProcessingServiceProxy.kt │ │ │ ├── medium │ │ │ ├── AbstractMediumService.kt │ │ │ ├── backup │ │ │ │ ├── AbstractBackupService.kt │ │ │ │ ├── BackupServiceCloudImpl.kt │ │ │ │ ├── BackupServiceLocalImpl.kt │ │ │ │ ├── ProcessingServiceProxyCloudImpl.kt │ │ │ │ └── ProcessingServiceProxyLocalImpl.kt │ │ │ └── restore │ │ │ │ ├── AbstractRestoreService.kt │ │ │ │ ├── ProcessingServiceProxyCloudImpl.kt │ │ │ │ ├── ProcessingServiceProxyLocalImpl.kt │ │ │ │ ├── RestoreServiceCloudImpl.kt │ │ │ │ └── RestoreServiceLocalImpl.kt │ │ │ ├── model │ │ │ └── Preprocessing.kt │ │ │ ├── packages │ │ │ ├── AbstractPackagesService.kt │ │ │ ├── backup │ │ │ │ ├── AbstractBackupService.kt │ │ │ │ ├── BackupServiceCloudImpl.kt │ │ │ │ ├── BackupServiceLocalImpl.kt │ │ │ │ ├── ProcessingServiceProxyCloudImpl.kt │ │ │ │ └── ProcessingServiceProxyLocalImpl.kt │ │ │ └── restore │ │ │ │ ├── AbstractRestoreService.kt │ │ │ │ ├── ProcessingServiceProxyCloudImpl.kt │ │ │ │ ├── ProcessingServiceProxyLocalImpl.kt │ │ │ │ ├── RestoreServiceCloudImpl.kt │ │ │ │ └── RestoreServiceLocalImpl.kt │ │ │ └── util │ │ │ ├── CommonBackupUtil.kt │ │ │ ├── MediumBackupUtil.kt │ │ │ ├── MediumRestoreUtil.kt │ │ │ ├── PackagesBackupUtil.kt │ │ │ └── PackagesRestoreUtil.kt │ │ └── res │ │ └── values │ │ └── ids.xml ├── systemapi │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ ├── android │ │ ├── os │ │ │ └── SystemProperties.java │ │ └── util │ │ │ ├── TypedXmlPullParser.java │ │ │ ├── TypedXmlSerializer.java │ │ │ └── XmlApi30.java │ │ ├── com │ │ └── android │ │ │ ├── internal │ │ │ └── util │ │ │ │ ├── BinaryXmlPullParser.java │ │ │ │ ├── BinaryXmlSerializer.java │ │ │ │ ├── FastDataInput.java │ │ │ │ ├── FastDataOutput.java │ │ │ │ ├── FastXmlSerializer.java │ │ │ │ ├── HexDump.java │ │ │ │ ├── ModifiedUtf8.java │ │ │ │ ├── XmlPullParserWrapper.java │ │ │ │ ├── XmlSerializerWrapper.java │ │ │ │ └── XmlUtils.java │ │ │ ├── org │ │ │ └── kxml2 │ │ │ │ └── io │ │ │ │ ├── KXmlParser.java │ │ │ │ └── KXmlSerializer.java │ │ │ ├── providers │ │ │ └── settings │ │ │ │ ├── SettingsState.java │ │ │ │ ├── SettingsStateApi26.java │ │ │ │ └── SettingsStateApi31.java │ │ │ └── server │ │ │ └── display │ │ │ └── DisplayControl.java │ │ └── libcore │ │ ├── internal │ │ └── StringPool.java │ │ ├── io │ │ └── IoUtils.java │ │ └── util │ │ ├── HexEncoding.java │ │ └── XmlObjectFactory.java ├── ui │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── bear.lottie │ │ ├── loading.lottie │ │ └── squirrel.lottie │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── ui │ │ │ ├── component │ │ │ ├── Animation.kt │ │ │ ├── Button.kt │ │ │ ├── Card.kt │ │ │ ├── Chip.kt │ │ │ ├── Common.kt │ │ │ ├── Dialog.kt │ │ │ ├── Divider.kt │ │ │ ├── Effects.kt │ │ │ ├── Image.kt │ │ │ ├── ModalBottomSheet.kt │ │ │ ├── ModalMenu.kt │ │ │ ├── ModalPopup.kt │ │ │ ├── Modifier.kt │ │ │ ├── ProgressIndicator.kt │ │ │ ├── Scaffold.kt │ │ │ ├── ScrollBar.kt │ │ │ ├── SegmentedButton.kt │ │ │ ├── Settings.kt │ │ │ ├── Shape.kt │ │ │ ├── Slot.kt │ │ │ ├── Spacer.kt │ │ │ ├── Surface.kt │ │ │ ├── Text.kt │ │ │ ├── TextField.kt │ │ │ └── TopBar.kt │ │ │ ├── material3 │ │ │ ├── AlertDialog.kt │ │ │ ├── AndroidAlertDialog.kt │ │ │ ├── Card.kt │ │ │ ├── Divider.kt │ │ │ ├── DynamicTonalPalette.kt │ │ │ ├── Elevation.kt │ │ │ ├── Menu.kt │ │ │ ├── ProgressIndicator.kt │ │ │ ├── SegmentedButton.kt │ │ │ ├── Shapes.kt │ │ │ ├── Snackbar.kt │ │ │ ├── SnackbarHostState.kt │ │ │ ├── Surface.kt │ │ │ ├── TonalPalette.kt │ │ │ ├── Typography.kt │ │ │ ├── pullrefresh │ │ │ │ ├── PullRefresh.kt │ │ │ │ ├── PullRefreshIndicator.kt │ │ │ │ ├── PullRefreshIndicatorTransform.kt │ │ │ │ └── PullRefreshState.kt │ │ │ ├── tokens │ │ │ │ ├── CircularProgressIndicatorTokens.kt │ │ │ │ ├── DividerTokens.kt │ │ │ │ ├── ElevatedCardTokens.kt │ │ │ │ ├── ElevationTokens.kt │ │ │ │ ├── FilledCardTokens.kt │ │ │ │ ├── LinearProgressIndicatorTokens.kt │ │ │ │ ├── MenuTokens.kt │ │ │ │ ├── MotionTokens.kt │ │ │ │ ├── OutlinedCardTokens.kt │ │ │ │ ├── OutlinedSegmentedButtonTokens.kt │ │ │ │ ├── PaletteTokens.kt │ │ │ │ ├── ShapeKeyTokens.kt │ │ │ │ ├── ShapeTokens.kt │ │ │ │ └── TypographyKeyTokens.kt │ │ │ ├── util │ │ │ │ ├── InlineClassHelper.kt │ │ │ │ ├── ListUtils.kt │ │ │ │ └── MathHelpers.kt │ │ │ └── window │ │ │ │ ├── Popup.kt │ │ │ │ └── SecureFlagPolicy.kt │ │ │ ├── model │ │ │ ├── Card.kt │ │ │ ├── Dialog.kt │ │ │ ├── ModalMenu.kt │ │ │ ├── ProgressIndicator.kt │ │ │ └── TopBar.kt │ │ │ ├── route │ │ │ └── Routes.kt │ │ │ ├── theme │ │ │ ├── Color.kt │ │ │ ├── Theme.kt │ │ │ ├── ThemedColorDarkTokens.kt │ │ │ ├── ThemedColorLightTokens.kt │ │ │ ├── ThemedColorScheme.kt │ │ │ ├── ThemedColorSchemeKeyTokens.kt │ │ │ ├── ThemedDynamicTonalPalette.kt │ │ │ └── Type.kt │ │ │ ├── token │ │ │ ├── AnimationTokens.kt │ │ │ ├── ChipTokens.kt │ │ │ ├── DialogTokens.kt │ │ │ ├── ModalMenuTokens.kt │ │ │ ├── ScrollBarTokens.kt │ │ │ ├── SizeTokens.kt │ │ │ ├── SnackbarTokens.kt │ │ │ └── TextFieldTokens.kt │ │ │ ├── util │ │ │ ├── Card.kt │ │ │ ├── ModelUtil.kt │ │ │ ├── NavHostController.kt │ │ │ ├── OperationState.kt │ │ │ └── StringResource.kt │ │ │ └── viewmodel │ │ │ └── BaseViewModel.kt │ │ └── res │ │ ├── anim │ │ └── fast_out_extra_slow_in.xml │ │ ├── drawable │ │ ├── ic_animated_tick.xml │ │ ├── ic_rounded_counter_1.xml │ │ ├── ic_rounded_counter_2.xml │ │ ├── ic_rounded_counter_3.xml │ │ └── ic_rounded_hourglass_empty.xml │ │ └── values │ │ └── ids.xml ├── util │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── core │ │ │ └── util │ │ │ ├── ActivityUtil.kt │ │ │ ├── CodingUtil.kt │ │ │ ├── ContextUtil.kt │ │ │ ├── CoroutineUtil.kt │ │ │ ├── DateUtil.kt │ │ │ ├── FileUtil.kt │ │ │ ├── GsonUtil.kt │ │ │ ├── HashUtil.kt │ │ │ ├── LanguageUtil.kt │ │ │ ├── LogUtil.kt │ │ │ ├── NavControllerUtil.kt │ │ │ ├── NotificationUtil.kt │ │ │ ├── PathUtil.kt │ │ │ ├── StringUtil.kt │ │ │ ├── SymbolUtil.kt │ │ │ ├── command │ │ │ ├── AppopsUtil.kt │ │ │ ├── BaseUtil.kt │ │ │ ├── PackageUtil.kt │ │ │ ├── PmUtil.kt │ │ │ ├── PreparationUtil.kt │ │ │ ├── SELinuxUtil.kt │ │ │ ├── TarUtil.kt │ │ │ └── TreeUtil.kt │ │ │ ├── model │ │ │ └── Command.kt │ │ │ └── module │ │ │ ├── FlowUtil.kt │ │ │ ├── GsonModule.kt │ │ │ └── Qualifier.kt │ │ └── res │ │ ├── values │ │ └── ids.xml │ │ └── xml │ │ └── file_paths.xml └── work │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── kotlin │ └── com │ │ └── xayah │ │ └── core │ │ └── work │ │ ├── WorkManagerInitializer.kt │ │ └── workers │ │ ├── AppsFastInitWorker.kt │ │ ├── AppsFastUpdateWorker.kt │ │ ├── AppsInitWorker.kt │ │ ├── AppsLoadWorker.kt │ │ ├── AppsUpdateWorker.kt │ │ ├── FilesLoadWorker.kt │ │ └── FilesUpdateWorker.kt │ └── res │ └── values │ └── ids.xml ├── feature ├── crash │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── feature │ │ │ └── crash │ │ │ ├── CrashHandler.kt │ │ │ ├── MainActivity.kt │ │ │ └── MainViewModel.kt │ │ └── res │ │ └── values │ │ └── ids.xml ├── flavor │ ├── alpha │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── strings.xml │ ├── foss │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ └── premium │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ ├── google-services.json │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── res │ │ └── values │ │ ├── ids.xml │ │ └── strings.xml ├── main │ ├── cloud │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── cloud │ │ │ │ ├── Component.kt │ │ │ │ ├── Index.kt │ │ │ │ ├── IndexViewModel.kt │ │ │ │ └── add │ │ │ │ ├── FTPSetup.kt │ │ │ │ ├── Index.kt │ │ │ │ ├── IndexViewModel.kt │ │ │ │ ├── SFTPSetup.kt │ │ │ │ ├── SMBSetup.kt │ │ │ │ └── WebDAVSetup.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── configurations │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── configurations │ │ │ │ ├── Component.kt │ │ │ │ ├── Index.kt │ │ │ │ └── IndexViewModel.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── dashboard │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── dashboard │ │ │ │ ├── Component.kt │ │ │ │ ├── Index.kt │ │ │ │ ├── IndexViewModel.kt │ │ │ │ └── Model.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── details │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── details │ │ │ │ ├── AppDetails.kt │ │ │ │ ├── DetailsScreen.kt │ │ │ │ ├── DetailsViewModel.kt │ │ │ │ └── FileDetails.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── directory │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── directory │ │ │ │ ├── Component.kt │ │ │ │ ├── Index.kt │ │ │ │ ├── IndexViewModel.kt │ │ │ │ └── Model.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── history │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── history │ │ │ │ ├── HistoryScreen.kt │ │ │ │ ├── HistoryViewModel.kt │ │ │ │ ├── TaskDetailsScreen.kt │ │ │ │ └── TaskDetailsViewModel.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── list │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── list │ │ │ │ ├── ListActions.kt │ │ │ │ ├── ListActionsViewModel.kt │ │ │ │ ├── ListBottomSheet.kt │ │ │ │ ├── ListBottomSheetViewModel.kt │ │ │ │ ├── ListItems.kt │ │ │ │ ├── ListItemsViewModel.kt │ │ │ │ ├── ListScreen.kt │ │ │ │ ├── ListTopBar.kt │ │ │ │ ├── ListTopBarViewModel.kt │ │ │ │ └── ListViewModel.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── processing │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── processing │ │ │ │ ├── AbstractMediumProcessingViewModel.kt │ │ │ │ ├── AbstractPackagesProcessingViewModel.kt │ │ │ │ ├── AbstractProcessingViewModel.kt │ │ │ │ ├── Component.kt │ │ │ │ ├── Index.kt │ │ │ │ ├── medium │ │ │ │ ├── backup │ │ │ │ │ ├── BackupViewModelImpl.kt │ │ │ │ │ ├── NavHost.kt │ │ │ │ │ └── Setup.kt │ │ │ │ └── restore │ │ │ │ │ ├── NavHost.kt │ │ │ │ │ ├── RestoreViewModelImpl.kt │ │ │ │ │ └── Setup.kt │ │ │ │ └── packages │ │ │ │ ├── backup │ │ │ │ ├── BackupViewModelImpl.kt │ │ │ │ ├── NavHost.kt │ │ │ │ └── Setup.kt │ │ │ │ └── restore │ │ │ │ ├── NavHost.kt │ │ │ │ ├── RestoreViewModelImpl.kt │ │ │ │ └── Setup.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ ├── restore │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── xayah │ │ │ │ └── feature │ │ │ │ └── main │ │ │ │ └── restore │ │ │ │ ├── Component.kt │ │ │ │ ├── Index.kt │ │ │ │ ├── IndexViewModel.kt │ │ │ │ └── reload │ │ │ │ ├── Index.kt │ │ │ │ └── IndexViewModel.kt │ │ │ └── res │ │ │ └── values │ │ │ └── ids.xml │ └── settings │ │ ├── .gitignore │ │ ├── build.gradle.kts │ │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── xayah │ │ │ └── feature │ │ │ └── main │ │ │ └── settings │ │ │ ├── Component.kt │ │ │ ├── Index.kt │ │ │ ├── IndexViewModel.kt │ │ │ ├── Item.kt │ │ │ ├── about │ │ │ ├── Index.kt │ │ │ ├── IndexViewModel.kt │ │ │ └── Translators.kt │ │ │ ├── backup │ │ │ └── Index.kt │ │ │ ├── blacklist │ │ │ ├── Index.kt │ │ │ └── IndexViewModel.kt │ │ │ ├── language │ │ │ ├── Index.kt │ │ │ └── IndexViewModel.kt │ │ │ └── restore │ │ │ └── Index.kt │ │ └── res │ │ ├── drawable │ │ └── logo_weblate.xml │ │ ├── raw │ │ ├── contributors.json │ │ ├── translators.json │ │ └── translators_revision.json │ │ └── values │ │ └── ids.xml └── setup │ ├── .gitignore │ ├── build.gradle.kts │ └── src │ └── main │ ├── AndroidManifest.xml │ ├── kotlin │ └── com │ │ └── xayah │ │ └── feature │ │ └── setup │ │ ├── Component.kt │ │ ├── MainActivity.kt │ │ ├── Model.kt │ │ ├── NavHost.kt │ │ ├── Routes.kt │ │ └── page │ │ ├── one │ │ ├── Index.kt │ │ └── IndexViewModel.kt │ │ └── two │ │ ├── Index.kt │ │ └── IndexViewModel.kt │ └── res │ └── values │ └── ids.xml ├── gradle.properties ├── gradle ├── libs.versions.toml └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── native ├── .gitignore ├── build.gradle.kts └── src │ └── main │ ├── AndroidManifest.xml │ ├── jni │ ├── CMakeLists.txt │ ├── external │ │ ├── CMakeLists.txt │ │ └── tar │ │ │ ├── CMakeLists.txt │ │ │ ├── tar-config │ │ │ └── config.h │ │ │ ├── tar-gnu-embedded │ │ │ ├── alloca.h │ │ │ ├── assert.h │ │ │ ├── configmake.h │ │ │ ├── ctype.h │ │ │ ├── dirent.h │ │ │ ├── error.h │ │ │ ├── fcntl.h │ │ │ ├── fnmatch.h │ │ │ ├── getopt-cdefs.h │ │ │ ├── getopt.h │ │ │ ├── inttypes.h │ │ │ ├── langinfo.h │ │ │ ├── limits.h │ │ │ ├── locale.h │ │ │ ├── malloc │ │ │ │ ├── dynarray-skeleton.gl.h │ │ │ │ ├── dynarray.gl.h │ │ │ │ └── scratch_buffer.gl.h │ │ │ ├── selinux │ │ │ │ ├── context.h │ │ │ │ ├── label.h │ │ │ │ └── selinux.h │ │ │ ├── signal.h │ │ │ ├── stdckdint.h │ │ │ ├── stddef.h │ │ │ ├── stdint.h │ │ │ ├── stdio.h │ │ │ ├── stdlib.h │ │ │ ├── string.h │ │ │ ├── strings.h │ │ │ ├── sys │ │ │ │ ├── random.h │ │ │ │ ├── stat.h │ │ │ │ ├── time.h │ │ │ │ └── types.h │ │ │ ├── time.h │ │ │ ├── uchar.h │ │ │ ├── unicase.h │ │ │ ├── unictype.h │ │ │ ├── uninorm.h │ │ │ ├── unistd.h │ │ │ ├── unitypes.h │ │ │ ├── uniwidth.h │ │ │ ├── utime.h │ │ │ ├── wchar.h │ │ │ └── wctype.h │ │ │ └── tar-lib-embedded │ │ │ └── rmt-command.h │ └── nativelib │ │ ├── CMakeLists.txt │ │ └── nativelib.cpp │ └── kotlin │ └── com │ └── xayah │ └── libnative │ └── NativeLib.kt └── settings.gradle.kts /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # custom: ['https://www.buymeacoffee.com/XayahSuSuSu', 'https://afdian.net/a/XayahSuSuSu'] 2 | custom: ['https://paypal.me/XayahSuSuSu', 'https://afdian.net/a/XayahSuSuSu'] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[Bug] " 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Smartphone (please complete the following information):** 27 | - Device: [e.g. Xiaomi 10 Ultra] 28 | - OS: [e.g. MIUI14, Android13] 29 | - Version [e.g. Beta-4.3.7] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[Feature] " 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the feature** 11 | A clear and concise description. 12 | -------------------------------------------------------------------------------- /.github/workflows/bin.yaml: -------------------------------------------------------------------------------- 1 | name: Bin 2 | 3 | on: 4 | push: 5 | paths: 6 | - build/** 7 | pull_request: 8 | paths: 9 | - build/** 10 | workflow_dispatch: 11 | inputs: 12 | 13 | jobs: 14 | build: 15 | name: "Build bin" 16 | runs-on: ubuntu-latest 17 | container: registry.gitlab.com/fdroid/fdroidserver:buildserver-bookworm 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | submodules: 'recursive' 23 | 24 | - name: Build 25 | run: bash -e -x build/build_bin.sh all all 1> /dev/null 26 | 27 | - name: Upload 28 | uses: actions/upload-artifact@v4 29 | with: 30 | name: Bin 31 | path: '**/build_bin/built_in/**/bin.zip' -------------------------------------------------------------------------------- /.github/workflows/release-please.yml: -------------------------------------------------------------------------------- 1 | on: 2 | workflow_dispatch: 3 | inputs: 4 | 5 | permissions: 6 | contents: write 7 | pull-requests: write 8 | 9 | name: Release notes 10 | 11 | jobs: 12 | release-please: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: googleapis/release-please-action@v4 16 | with: 17 | token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} 18 | release-type: simple 19 | skip-github-release: true -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "source/native/src/main/jni/external/tar/tar"] 2 | path = source/native/src/main/jni/external/tar/tar 3 | url = https://github.com/XayahSuSuSu/tar 4 | -------------------------------------------------------------------------------- /dex/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | local.properties 11 | -------------------------------------------------------------------------------- /dex/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /release 3 | -------------------------------------------------------------------------------- /dex/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /dex/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 14 | 15 | -------------------------------------------------------------------------------- /dex/app/src/main/java/com/android/providers/settings/SettingsState.java: -------------------------------------------------------------------------------- 1 | package com.android.providers.settings; 2 | 3 | public interface SettingsState { 4 | static final String SYSTEM_PACKAGE_NAME = "android"; 5 | static final int MAX_BYTES_PER_APP_PACKAGE_UNLIMITED = -1; 6 | 7 | static final int SETTINGS_TYPE_GLOBAL = 0; 8 | static final int SETTINGS_TYPE_SYSTEM = 1; 9 | static final int SETTINGS_TYPE_SECURE = 2; 10 | static final int SETTINGS_TYPE_SSAID = 3; 11 | static final int SETTINGS_TYPE_CONFIG = 4; 12 | 13 | static final int SETTINGS_TYPE_MASK = 0xF0000000; 14 | static final int SETTINGS_TYPE_SHIFT = 28; 15 | 16 | static int makeKey(int type, int userId) { 17 | return (type << SETTINGS_TYPE_SHIFT) | userId; 18 | } 19 | 20 | Setting getSettingLocked(String name); 21 | 22 | boolean insertSettingLocked(String name, String value, String tag, boolean makeDefault, String packageName); 23 | 24 | interface Setting { 25 | String getValue(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /dex/app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dex/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /dex/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Script Dex 3 | -------------------------------------------------------------------------------- /dex/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dex/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /dex/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /dex/app/src/test/java/com/xayah/dex/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.xayah.dex; 2 | 3 | import org.junit.Test; 4 | 5 | public class ExampleUnitTest { 6 | @Test 7 | public void test_CCHelper() { 8 | System.out.println(new CCHelper().s2t("You Only live once! 生如长河,渡船千艘,唯自渡方是真渡。开启, 台湾, 香港, 时钟, 尽力, 日志")); 9 | System.out.println(new CCHelper().t2s("You Only live once! 生如長河,渡船千艘,唯自渡方是真渡。開啟, 台灣, 香港, 時鐘, 儘力, 日誌")); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /dex/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | @Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed 3 | plugins { 4 | alias(libs.plugins.androidApplication) apply false 5 | alias(libs.plugins.androidLibrary) apply false 6 | } 7 | true // Needed to make the Suppress annotation work for the plugins block -------------------------------------------------------------------------------- /dex/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/dex/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /dex/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Feb 20 22:27:22 CST 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /dex/hiddenapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /dex/hiddenapi/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.androidLibrary) 3 | } 4 | 5 | android { 6 | namespace = "com.xayah.hiddenapi" 7 | compileSdk = 34 8 | 9 | buildTypes { 10 | release { 11 | isMinifyEnabled = false 12 | } 13 | } 14 | 15 | buildFeatures { 16 | aidl = true 17 | } 18 | 19 | compileOptions { 20 | sourceCompatibility = JavaVersion.VERSION_17 21 | targetCompatibility = JavaVersion.VERSION_17 22 | } 23 | } 24 | 25 | dependencies { 26 | annotationProcessor(libs.refine.annotation.processor) 27 | compileOnly(libs.refine.annotation) 28 | } -------------------------------------------------------------------------------- /dex/hiddenapi/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /dex/hiddenapi/src/main/aidl/android/content/pm/ParceledListSlice.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011, The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package android.content.pm; 18 | 19 | parcelable ParceledListSlice; 20 | 21 | // https://cs.android.com/android/platform/superproject/+/android-8.0.0_r51:frameworks/base/core/java/android/content/pm/ParceledListSlice.aidl -------------------------------------------------------------------------------- /dex/hiddenapi/src/main/java/android/content/IContentProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package android.content; 18 | 19 | import android.os.IInterface; 20 | 21 | /** 22 | * The ipc interface to talk to a content provider. 23 | * 24 | * @hide 25 | */ 26 | public interface IContentProvider extends IInterface { 27 | } 28 | 29 | // https://cs.android.com/android/platform/superproject/+/android-8.0.0_r51:frameworks/base/core/java/android/content/IContentProvider.java -------------------------------------------------------------------------------- /dex/hiddenapi/src/main/java/android/os/ServiceManager.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | /** 4 | * @see ServiceManager.java 5 | */ 6 | public final class ServiceManager { 7 | public static IBinder getService(String name) { 8 | throw new RuntimeException("Stub!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /dex/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | gradlePluginPortal() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | 16 | rootProject.name = "Script Dex" 17 | include(":app") 18 | include(":hiddenapi") 19 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/full_description.txt: -------------------------------------------------------------------------------- 1 | DataBackup is based on speed-backup. It was born with the consent of the author. 2 | 3 | DataBackup is intended to back up and restore the data of your apps. 4 | 5 | Root access is needed. 6 | 7 | It works on arm64-v8a(4 as suffix), armeabi-v7a(3 as suffix), x86_64(2 as suffix) and x86(1 as suffix) devices with Android 9 or higher. 8 | 9 |
Features include: 10 | * Multi-user Support 11 | * 100% Data Integrity 12 | * Fast 13 | * Easy 14 | * ... 15 | -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/icon.png -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/phoneScreenshots/01.jpg -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/phoneScreenshots/02.jpg -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/phoneScreenshots/03.jpg -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/phoneScreenshots/04.jpg -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/phoneScreenshots/05.jpg -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/images/phoneScreenshots/06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/fastlane/metadata/android/en-US/images/phoneScreenshots/06.jpg -------------------------------------------------------------------------------- /fastlane/metadata/android/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | Back up/Restore your data. -------------------------------------------------------------------------------- /source-next/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | local.properties 11 | -------------------------------------------------------------------------------- /source-next/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source-next/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /source-next/app/src/androidTest/java/com/xayah/databackup/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.xayah.databackup", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /source-next/app/src/main/aidl/com/xayah/databackup/rootservice/IRemoteRootService.aidl: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.rootservice; 2 | 3 | interface IRemoteRootService { 4 | ParcelFileDescriptor getInstalledAppInfos(); 5 | ParcelFileDescriptor getInstalledAppStorages(); 6 | List getUsers(); 7 | } 8 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/App.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup 2 | 3 | import android.app.Application 4 | 5 | class App : Application() { 6 | companion object { 7 | lateinit var application: Application 8 | } 9 | 10 | override fun onCreate() { 11 | super.onCreate() 12 | application = this 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/database/AppDataBase.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.database 2 | 3 | import androidx.room.Database 4 | import androidx.room.RoomDatabase 5 | import com.xayah.databackup.database.dao.AppDao 6 | import com.xayah.databackup.database.entity.App 7 | 8 | @Database( 9 | entities = [App::class], 10 | version = 1 11 | ) 12 | abstract class AppDatabase : RoomDatabase() { 13 | abstract fun appDao(): AppDao 14 | } 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/ui/component/Effect.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.ui.component 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.runtime.DisposableEffect 5 | import androidx.lifecycle.Lifecycle 6 | import androidx.lifecycle.LifecycleEventObserver 7 | import androidx.lifecycle.compose.LocalLifecycleOwner 8 | 9 | @Composable 10 | inline fun OnResume(crossinline block: () -> Unit) { 11 | val owner = LocalLifecycleOwner.current 12 | DisposableEffect(owner) { 13 | val observer = LifecycleEventObserver { _, event -> 14 | if (event == Lifecycle.Event.ON_RESUME) { 15 | block() 16 | } 17 | } 18 | owner.lifecycle.addObserver(observer) 19 | onDispose { 20 | owner.lifecycle.removeObserver(observer) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/ui/component/TransitionSpec.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.ui.component 2 | 3 | import androidx.compose.animation.AnimatedContentTransitionScope 4 | import androidx.compose.animation.ContentTransform 5 | import androidx.compose.animation.SizeTransform 6 | import androidx.compose.animation.fadeIn 7 | import androidx.compose.animation.fadeOut 8 | import androidx.compose.animation.slideInVertically 9 | import androidx.compose.animation.slideOutVertically 10 | import androidx.compose.animation.togetherWith 11 | 12 | fun textTransitionSpec(): AnimatedContentTransitionScope.() -> ContentTransform = { 13 | if (targetState > initialState) { 14 | slideInVertically { height -> height } + fadeIn() togetherWith 15 | slideOutVertically { height -> -height } + fadeOut() 16 | } else { 17 | slideInVertically { height -> -height } + fadeIn() togetherWith 18 | slideOutVertically { height -> height } + fadeOut() 19 | }.using( 20 | SizeTransform(clip = false) 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/ui/theme/Color.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.ui.theme 2 | 3 | import androidx.compose.ui.graphics.Color 4 | 5 | val Purple80 = Color(0xFFD0BCFF) 6 | val PurpleGrey80 = Color(0xFFCCC2DC) 7 | val Pink80 = Color(0xFFEFB8C8) 8 | 9 | val Purple40 = Color(0xFF6650a4) 10 | val PurpleGrey40 = Color(0xFF625b71) 11 | val Pink40 = Color(0xFF7D5260) 12 | 13 | val GreenPrimaryDark = Color(0xFF91D5AD) 14 | val GreenOnPrimaryDark = Color(0xFF003822) 15 | val GreenPrimaryContainerDark = Color(0xFF025233) 16 | val GreenOnPrimaryContainerDark = Color(0xFFACF2C8) 17 | val GreenSurfaceContainerDark = Color(0xFF1B211D) 18 | 19 | val GreenPrimaryLight = Color(0xFF266A4A) 20 | val GreenOnPrimaryLight = Color(0xFFFFFFFF) 21 | val GreenPrimaryContainerLight = Color(0xFFACF2C8) 22 | val GreenOnPrimaryContainerLight = Color(0xFF002112) 23 | val GreenSurfaceContainerLight = Color(0xFFEAEFE9) -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/BaseViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import androidx.lifecycle.ViewModel 4 | import androidx.lifecycle.viewModelScope 5 | import kotlinx.coroutines.launch 6 | import kotlinx.coroutines.sync.Mutex 7 | import kotlinx.coroutines.sync.withLock 8 | import kotlinx.coroutines.withContext 9 | import kotlin.coroutines.CoroutineContext 10 | 11 | abstract class BaseViewModel : ViewModel() { 12 | private val mMutex = Mutex() 13 | 14 | fun withLock(context: CoroutineContext, block: suspend () -> Unit) { 15 | viewModelScope.launch { 16 | withContext(context) { 17 | mMutex.withLock { 18 | block.invoke() 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/DatabaseHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import androidx.room.Room 4 | import com.xayah.databackup.App 5 | import com.xayah.databackup.database.AppDatabase 6 | 7 | object DatabaseHelper { 8 | private val database = Room.databaseBuilder( 9 | App.application, 10 | AppDatabase::class.java, 11 | "database-databackup" 12 | ).build() 13 | 14 | val appDao = database.appDao() 15 | } 16 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/FlowHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import kotlinx.coroutines.flow.Flow 4 | import kotlinx.coroutines.flow.combine 5 | 6 | fun combine( 7 | flow: Flow, 8 | flow2: Flow, 9 | flow3: Flow, 10 | flow4: Flow, 11 | flow5: Flow, 12 | flow6: Flow, 13 | transform: suspend (T1, T2, T3, T4, T5, T6) -> R 14 | ): Flow = combine( 15 | combine(flow, flow2, flow3, ::Triple), 16 | combine(flow4, flow5, flow6, ::Triple), 17 | ) { t1, t2 -> 18 | transform( 19 | t1.first, 20 | t1.second, 21 | t1.third, 22 | t2.first, 23 | t2.second, 24 | t2.third, 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/LogHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import android.util.Log 4 | 5 | object LogHelper { 6 | fun d(tag: String, msg: String) { 7 | Log.d(tag, msg) 8 | } 9 | 10 | fun i(tag: String, msg: String) { 11 | Log.i(tag, msg) 12 | } 13 | 14 | fun w(tag: String, msg: String) { 15 | Log.w(tag, msg) 16 | } 17 | 18 | fun e(tag: String, msg: String) { 19 | Log.e(tag, msg) 20 | } 21 | 22 | fun e(tag: String, msg: String, tr: Throwable) { 23 | Log.e(tag, msg, tr) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/NavHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import androidx.navigation.NavDestination.Companion.hasRoute 4 | import androidx.navigation.NavHostController 5 | 6 | /** 7 | * Navigate to target route with debounce handled. 8 | */ 9 | inline fun NavHostController.navigateSafely(route: T) { 10 | if (currentDestination?.hasRoute() != true) { 11 | navigate(route) { launchSingleTop = true } 12 | } 13 | } 14 | 15 | /** 16 | * Pop back stack safely. 17 | */ 18 | fun NavHostController.popBackStackSafely() { 19 | navigateUp() 20 | } 21 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/PathHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import android.annotation.SuppressLint 4 | 5 | @SuppressLint("SdCardPath") 6 | object PathHelper { 7 | fun getAppUserDir(userId: Int, packageName: String): String = "/data/user/$userId/$packageName" 8 | fun getAppUserDeDir(userId: Int, packageName: String): String = "/data/user_de/$userId/$packageName" 9 | fun getAppDataDir(userId: Int, packageName: String): String = "/data/media/${userId}/Android/data/$packageName" 10 | fun getAppObbDir(userId: Int, packageName: String): String = "/data/media/${userId}/Android/obb/$packageName" 11 | fun getAppMediaDir(userId: Int, packageName: String): String = "/data/media/${userId}/Android/media/$packageName" 12 | } 13 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/ProcessHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import android.app.Activity 4 | import android.os.Process 5 | import kotlin.system.exitProcess 6 | 7 | object ProcessHelper { 8 | fun killSelf(context: Activity) { 9 | context.finishAffinity() 10 | Process.killProcess(Process.myPid()) 11 | exitProcess(0) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/StorageHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import java.text.DecimalFormat 4 | import kotlin.math.pow 5 | 6 | private const val UNIT = 1024F 7 | 8 | val Long.formatToStorageSize: String 9 | get() { 10 | var unit = "Bytes" 11 | var size = this.toFloat() 12 | val gb = UNIT.pow(3) 13 | val mb = UNIT.pow(2) 14 | val kb = UNIT 15 | if (this > gb) { 16 | size = this / gb 17 | unit = "GB" 18 | } else if (this > mb) { 19 | size = this / mb 20 | unit = "MB" 21 | } else if (this > kb) { 22 | size = this / kb 23 | unit = "KB" 24 | } 25 | return if (size == 0F) "0.00 $unit" else "${DecimalFormat("#.00").format(size)} $unit" 26 | } 27 | -------------------------------------------------------------------------------- /source-next/app/src/main/java/com/xayah/databackup/util/WorkManagerHelper.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup.util 2 | 3 | import androidx.work.ExistingWorkPolicy 4 | import androidx.work.WorkManager 5 | import com.xayah.databackup.App 6 | import com.xayah.databackup.workers.AppsUpdateWorker 7 | 8 | object WorkManagerHelper { 9 | private const val APPS_UPDATE_WORK_NAME = "apps_update_work" 10 | 11 | fun enqueueAppsUpdateWork() { 12 | WorkManager.getInstance(App.application) 13 | .enqueueUniqueWork(APPS_UPDATE_WORK_NAME, ExistingWorkPolicy.KEEP, AppsUpdateWorker.buildRequest()) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/anim/fast_out_extra_slow_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_arrow_left.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_bell.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_check.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_chevron_down.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_chevron_right.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_clock.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_folder.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_funnel.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_message_circle.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_phone.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_search.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_user.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/drawable/ic_user_round.xml: -------------------------------------------------------------------------------- 1 | 7 | 14 | 21 | 22 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source-next/app/src/main/res/values-cs/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Vítejte v aplikaci DataBackup 4 | DataBackup 5 | Aktualizovat záznamy 6 | Detekce prostředí 7 | Start 8 | 9 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/values-night-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @android:color/system_accent1_200 4 | @android:color/system_accent1_800 5 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #76D1FF 4 | #003549 5 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/values-sv/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Start 4 | Välkommen till DataBackup 5 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/values-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @android:color/system_accent1_100 4 | @android:color/system_accent1_400 5 | @color/colorPrimary 6 | @android:color/system_accent1_600 7 | @android:color/system_accent1_0 8 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | #C1E8FF 12 | #219BCC 13 | @color/colorPrimary 14 | #00668B 15 | #ffffff 16 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /source-next/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /source-next/app/src/test/java/com/xayah/databackup/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.databackup 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /source-next/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | plugins { 3 | alias(libs.plugins.android.application) apply false 4 | alias(libs.plugins.android.library) apply false 5 | alias(libs.plugins.kotlin.android) apply false 6 | alias(libs.plugins.kotlin.compose) apply false 7 | alias(libs.plugins.kotlin.jvm) apply false 8 | alias(libs.plugins.kotlin.ksp) apply false 9 | alias(libs.plugins.kotlin.serialization) apply false 10 | alias(libs.plugins.refine) apply false 11 | } -------------------------------------------------------------------------------- /source-next/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source-next/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /source-next/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Jan 12 15:54:47 CST 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /source-next/hiddenapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source-next/hiddenapi/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.android.library) 3 | alias(libs.plugins.kotlin.android) 4 | } 5 | 6 | android { 7 | namespace = "com.xayah.hiddenapi" 8 | compileSdk = libs.versions.compileSdk.get().toInt() 9 | 10 | defaultConfig { 11 | minSdk = libs.versions.minSdk.get().toInt() 12 | 13 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 14 | } 15 | 16 | compileOptions { 17 | sourceCompatibility = JavaVersion.VERSION_11 18 | targetCompatibility = JavaVersion.VERSION_11 19 | } 20 | kotlinOptions { 21 | jvmTarget = "11" 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation(libs.androidx.core.ktx) 27 | implementation(libs.androidx.appcompat) 28 | testImplementation(libs.junit) 29 | androidTestImplementation(libs.androidx.junit) 30 | androidTestImplementation(libs.androidx.espresso.core) 31 | 32 | // Refine 33 | annotationProcessor(libs.refine.annotation.processor) 34 | compileOnly(libs.refine.annotation) 35 | } -------------------------------------------------------------------------------- /source-next/hiddenapi/src/androidTest/java/com/xayah/hiddenapi/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.hiddenapi 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.xayah.hiddenapi.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /source-next/hiddenapi/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source-next/hiddenapi/src/main/kotlin/com/xayah/hiddenapi/Refine.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.hiddenapi 2 | 3 | inline fun Any.castTo(): T { 4 | return this as T 5 | } 6 | -------------------------------------------------------------------------------- /source-next/hiddenapi/src/test/java/com/xayah/hiddenapi/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.hiddenapi 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /source-next/native/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source-next/native/src/androidTest/java/com/xayah/libnative/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.libnative 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.xayah.libnative.test", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /source-next/native/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source-next/native/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.22.1) 2 | 3 | project("native") 4 | 5 | add_subdirectory(nativelib) 6 | -------------------------------------------------------------------------------- /source-next/native/src/main/jni/nativelib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_compile_options( 2 | -O3 3 | -fPIC 4 | -ffunction-sections 5 | -fdata-sections 6 | -D_FORTIFY_SOURCE=0 7 | -ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=/src 8 | ) 9 | 10 | add_link_options( 11 | -s 12 | -flto 13 | -Wl,--gc-sections 14 | -Wl,--build-id=none 15 | -Wl,--hash-style=both 16 | ) 17 | 18 | add_library(nativelib SHARED 19 | nativelib.cpp 20 | ) 21 | 22 | target_link_libraries(nativelib 23 | android 24 | log 25 | ) 26 | -------------------------------------------------------------------------------- /source-next/native/src/main/kotlin/com/xayah/libnative/NativeLib.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.libnative 2 | 3 | object NativeLib { 4 | external fun calculateTreeSize(path: String): Long 5 | external fun getUidGid(path: String): IntArray 6 | } 7 | -------------------------------------------------------------------------------- /source-next/native/src/test/java/com/xayah/libnative/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.libnative 2 | 3 | import org.junit.Test 4 | 5 | import org.junit.Assert.* 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * See [testing documentation](http://d.android.com/tools/testing). 11 | */ 12 | class ExampleUnitTest { 13 | @Test 14 | fun addition_isCorrect() { 15 | assertEquals(4, 2 + 2) 16 | } 17 | } -------------------------------------------------------------------------------- /source-next/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | dependencyResolutionManagement { 15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 16 | repositories { 17 | google() 18 | mavenCentral() 19 | maven("https://jitpack.io") 20 | } 21 | } 22 | 23 | rootProject.name = "DataBackup" 24 | include(":app") 25 | include(":hiddenapi") 26 | include(":native") 27 | -------------------------------------------------------------------------------- /source/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | .cxx 10 | local.properties 11 | -------------------------------------------------------------------------------- /source/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /arm64-v8aFoss 3 | /arm64-v8aPremium 4 | /arm64-v8aAlpha 5 | /armeabi-v7aFoss 6 | /armeabi-v7aPremium 7 | /armeabi-v7aAlpha 8 | /x86Foss 9 | /x86Premium 10 | /x86Alpha 11 | /x86_64Foss 12 | /x86_64Premium 13 | /x86_64Alpha 14 | -------------------------------------------------------------------------------- /source/app/src/arm64-v8a/assets/bin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/arm64-v8a/assets/bin.zip -------------------------------------------------------------------------------- /source/app/src/armeabi-v7a/assets/bin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/armeabi-v7a/assets/bin.zip -------------------------------------------------------------------------------- /source/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_adjust_circle.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_android.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_arrow_circle_down.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_arrow_circle_up.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_cancel.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_cancel_circle.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_check_circle.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_deployed_code.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_emoticon.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_folder_open.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_image.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_not_started.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_not_started_circle.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_package_2.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/drawable/ic_rounded_pending_circle.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/app/src/main/res/font/jetbrains_mono_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/font/jetbrains_mono_regular.ttf -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /source/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /source/app/src/main/res/raw/keep.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-cs/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Vítejte v aplikaci DataBackup 4 | DataBackup 5 | Aktualizovat záznamy 6 | Detekce prostředí 7 | Start 8 | 9 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-fa/plurals.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-in/plurals.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-night-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @android:color/system_accent1_200 4 | @android:color/system_accent1_800 5 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #76D1FF 4 | #003549 5 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-sv/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Start 4 | Välkommen till DataBackup 5 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-ta/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-uk/plurals.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-v31/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | @android:color/system_accent1_100 4 | @android:color/system_accent1_400 5 | @color/colorPrimary 6 | @android:color/system_accent1_600 7 | @android:color/system_accent1_0 8 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-zh-rCN/plurals.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %d 4 | 5 | 6 | %d 分钟 7 | 8 | 9 | %d 小时 10 | 11 | 12 | %d 13 | 14 | 15 | %d 16 | 17 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-zh-rHK/plurals.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %d 4 | 5 | 6 | %d 分鐘 7 | 8 | 9 | %d 小時 10 | 11 | 12 | %d 13 | 14 | 15 | %d 16 | 17 | -------------------------------------------------------------------------------- /source/app/src/main/res/values-zh-rTW/plurals.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | %d 4 | 5 | 6 | %d 分鐘 7 | 8 | 9 | %d 小時 10 | 11 | 12 | %d 13 | 14 | 15 | %d 16 | 17 | -------------------------------------------------------------------------------- /source/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #C1E8FF 4 | #219BCC 5 | @color/colorPrimary 6 | #00668B 7 | #ffffff 8 | -------------------------------------------------------------------------------- /source/app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /source/app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /source/app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /source/app/src/x86/assets/bin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/x86/assets/bin.zip -------------------------------------------------------------------------------- /source/app/src/x86_64/assets/bin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/app/src/x86_64/assets/bin.zip -------------------------------------------------------------------------------- /source/build-logic/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/build-logic/convention/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/ApplicationHiltWorkConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.api.dsl.ApplicationExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.dependencies 5 | import org.gradle.kotlin.dsl.getByType 6 | 7 | class ApplicationHiltWorkConventionPlugin : Plugin { 8 | override fun apply(target: Project) { 9 | with(target) { 10 | extensions.getByType().apply { 11 | dependencies { 12 | add("implementation", catalogLibs.findLibrary("hilt.work").get()) 13 | add("kapt", catalogLibs.findLibrary("hilt.work.compiler").get()) 14 | } 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/LibraryAndroidTestConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.LibraryExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.dependencies 5 | import org.gradle.kotlin.dsl.getByType 6 | 7 | class LibraryAndroidTestConventionPlugin : Plugin { 8 | override fun apply(target: Project) { 9 | with(target) { 10 | extensions.getByType().apply { 11 | defaultConfig { 12 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 13 | } 14 | dependencies { 15 | add("androidTestImplementation", catalogLibs.findLibrary("androidx.test.ext.junit").get()) 16 | add("androidTestImplementation", catalogLibs.findLibrary("espresso.core").get()) 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/LibraryFirebaseConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.LibraryExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.dependencies 5 | import org.gradle.kotlin.dsl.getByType 6 | 7 | class LibraryFirebaseConventionPlugin : Plugin { 8 | override fun apply(target: Project) { 9 | with(target) { 10 | pluginManager.apply("com.google.gms.google-services") 11 | pluginManager.apply("com.google.firebase.crashlytics") 12 | 13 | extensions.getByType().apply { 14 | dependencies { 15 | // Firebase 16 | add("implementation", platform(catalogLibs.findLibrary("firebase-bom").get())) 17 | add("implementation", catalogLibs.findLibrary("firebase.crashlytics").get()) 18 | add("implementation", catalogLibs.findLibrary("firebase.analytics").get()) 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/LibraryHiltConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.LibraryExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.configure 5 | import org.gradle.kotlin.dsl.dependencies 6 | import org.gradle.kotlin.dsl.getByType 7 | import org.jetbrains.kotlin.gradle.plugin.KaptExtension 8 | 9 | class LibraryHiltConventionPlugin : Plugin { 10 | override fun apply(target: Project) { 11 | with(target) { 12 | pluginManager.apply("org.jetbrains.kotlin.kapt") 13 | pluginManager.apply("com.google.dagger.hilt.android") 14 | 15 | extensions.getByType().apply { 16 | dependencies { 17 | add("implementation", catalogLibs.findLibrary("hilt.android").get()) 18 | add("kapt", catalogLibs.findLibrary("hilt.android.compiler").get()) 19 | } 20 | } 21 | 22 | extensions.configure { 23 | correctErrorTypes = true 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/LibraryHiltWorkConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.LibraryExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.dependencies 5 | import org.gradle.kotlin.dsl.getByType 6 | 7 | class LibraryHiltWorkConventionPlugin : Plugin { 8 | override fun apply(target: Project) { 9 | with(target) { 10 | extensions.getByType().apply { 11 | dependencies { 12 | add("implementation", catalogLibs.findLibrary("hilt.work").get()) 13 | add("kapt", catalogLibs.findLibrary("hilt.work.compiler").get()) 14 | } 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/LibraryProtobufConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.LibraryExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.dependencies 5 | import org.gradle.kotlin.dsl.getByType 6 | 7 | class LibraryProtobufConventionPlugin : Plugin { 8 | override fun apply(target: Project) { 9 | with(target) { 10 | pluginManager.apply("org.jetbrains.kotlin.plugin.serialization") 11 | 12 | extensions.getByType().apply { 13 | dependencies { 14 | add("implementation", catalogLibs.findLibrary("serialization.protobuf").get()) 15 | } 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /source/build-logic/convention/src/main/kotlin/LibraryTestConventionPlugin.kt: -------------------------------------------------------------------------------- 1 | import com.android.build.gradle.LibraryExtension 2 | import org.gradle.api.Plugin 3 | import org.gradle.api.Project 4 | import org.gradle.kotlin.dsl.dependencies 5 | import org.gradle.kotlin.dsl.getByType 6 | 7 | class LibraryTestConventionPlugin : Plugin { 8 | override fun apply(target: Project) { 9 | with(target) { 10 | extensions.getByType().apply { 11 | dependencies { 12 | add("testImplementation", catalogLibs.findLibrary("junit").get()) 13 | } 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /source/build-logic/gradle.properties: -------------------------------------------------------------------------------- 1 | # Gradle properties are not passed to included builds https://github.com/gradle/gradle/issues/2534 2 | org.gradle.parallel=true 3 | org.gradle.caching=true 4 | org.gradle.configureondemand=true 5 | -------------------------------------------------------------------------------- /source/build-logic/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | dependencyResolutionManagement { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | versionCatalogs { 7 | create("libs") { 8 | from(files("../gradle/libs.versions.toml")) 9 | } 10 | } 11 | } 12 | 13 | rootProject.name = "build-logic" 14 | include(":convention") 15 | -------------------------------------------------------------------------------- /source/build.gradle.kts: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | plugins { 4 | alias(libs.plugins.android.application) apply false 5 | alias(libs.plugins.kotlin.android) apply false 6 | alias(libs.plugins.kapt) apply false 7 | alias(libs.plugins.hilt.android) apply false 8 | alias(libs.plugins.com.android.library) apply false 9 | alias(libs.plugins.ksp) apply false 10 | alias(libs.plugins.gms.google.services) apply false 11 | alias(libs.plugins.firebase.crashlytics) apply false 12 | alias(libs.plugins.serialization) apply false 13 | alias(libs.plugins.compose.compiler) apply false 14 | } 15 | -------------------------------------------------------------------------------- /source/core/common/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/common/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.compose) 4 | } 5 | 6 | android { 7 | namespace = "com.xayah.core.common" 8 | } 9 | 10 | dependencies { 11 | implementation(libs.androidx.activity.compose) 12 | } -------------------------------------------------------------------------------- /source/core/common/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/common/src/main/kotlin/com/xayah/core/common/util/ListUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.common.util 2 | 3 | fun List.toLineString() = joinToString(separator = "\n") 4 | fun List.trim() = filter { it.isNotEmpty() } 5 | fun List.toPathString() = joinToString(separator = "/") 6 | fun List.toSpaceString() = joinToString(separator = " ") 7 | fun List.toPureString() = joinToString(separator = "") -------------------------------------------------------------------------------- /source/core/data/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/data/src/androidTest/kotlin/com/xayah/core/data/repository/UnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.data.repository; 2 | 3 | import androidx.test.ext.junit.runners.AndroidJUnit4 4 | import com.topjohnwu.superuser.Shell 5 | import com.xayah.core.util.command.PackageUtil 6 | import kotlinx.coroutines.runBlocking 7 | import org.junit.Test 8 | import org.junit.runner.RunWith 9 | 10 | @RunWith(AndroidJUnit4::class) 11 | class UnitTest { 12 | /** 13 | * @see MuntashirAkon/AppManager#82 14 | */ 15 | @Test 16 | fun testKeyStoreDetection() { 17 | val uid = 10481 18 | Shell.cmd("su $uid -c keystore_cli_v2 list").exec().apply { 19 | println(out) 20 | } 21 | println(runBlocking { PackageUtil.hasKeystore("su", uid) }) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source/core/data/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/data/src/main/kotlin/com/xayah/core/data/module/RemoteRootServiceModule.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.data.module 2 | 3 | import android.content.Context 4 | import com.xayah.core.rootservice.service.RemoteRootService 5 | import dagger.Module 6 | import dagger.Provides 7 | import dagger.hilt.InstallIn 8 | import dagger.hilt.android.qualifiers.ApplicationContext 9 | import dagger.hilt.components.SingletonComponent 10 | import javax.inject.Singleton 11 | 12 | @Module 13 | @InstallIn(SingletonComponent::class) 14 | object RemoteRootServiceModule { 15 | @Provides 16 | @Singleton 17 | fun provideService(@ApplicationContext context: Context): RemoteRootService = RemoteRootService(context) 18 | } 19 | -------------------------------------------------------------------------------- /source/core/data/src/main/kotlin/com/xayah/core/data/repository/SettingsDataRepo.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.data.repository 2 | 3 | import com.xayah.core.datastore.DbPreferencesDataSource 4 | import com.xayah.core.datastore.KeyAppsUpdateTime 5 | import com.xayah.core.datastore.KeyCompressionType 6 | import com.xayah.core.model.CompressionType 7 | import com.xayah.core.model.SettingsData 8 | import kotlinx.coroutines.flow.Flow 9 | import javax.inject.Inject 10 | 11 | class SettingsDataRepo @Inject constructor( 12 | private val dbPreferencesDataSource: DbPreferencesDataSource, 13 | ) { 14 | val settingsData: Flow = dbPreferencesDataSource.settingsData 15 | 16 | suspend fun setCompressionType(value: CompressionType) { 17 | dbPreferencesDataSource.edit(KeyCompressionType, value.name) 18 | } 19 | 20 | suspend fun setAppsUpdateTime(value: Long) { 21 | dbPreferencesDataSource.edit(KeyAppsUpdateTime, value) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source/core/data/src/main/kotlin/com/xayah/core/data/util/DataTypeUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.data.util 2 | 3 | import com.xayah.core.model.DataType 4 | import com.xayah.core.util.PathUtil 5 | 6 | fun DataType.srcDir(userId: Int): String = when (this) { 7 | DataType.PACKAGE_USER -> PathUtil.getPackageUserDir(userId) 8 | DataType.PACKAGE_USER_DE -> PathUtil.getPackageUserDeDir(userId) 9 | DataType.PACKAGE_DATA -> PathUtil.getPackageDataDir(userId) 10 | DataType.PACKAGE_OBB -> PathUtil.getPackageObbDir(userId) 11 | DataType.PACKAGE_MEDIA -> PathUtil.getPackageMediaDir(userId) 12 | else -> "" 13 | } 14 | -------------------------------------------------------------------------------- /source/core/database/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/database/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.room) 5 | alias(libs.plugins.library.protobuf) 6 | } 7 | 8 | android { 9 | namespace = "com.xayah.core.database" 10 | } 11 | 12 | dependencies { 13 | implementation(libs.androidx.activity.compose) 14 | 15 | // Core 16 | implementation(project(":core:model")) 17 | implementation(project(":core:util")) 18 | 19 | // Gson 20 | implementation(libs.gson) 21 | } 22 | -------------------------------------------------------------------------------- /source/core/database/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/database/src/main/kotlin/com/xayah/core/database/dao/CloudDao.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.database.dao 2 | 3 | import androidx.room.Dao 4 | import androidx.room.Delete 5 | import androidx.room.Query 6 | import androidx.room.Upsert 7 | import com.xayah.core.model.database.CloudEntity 8 | import kotlinx.coroutines.flow.Flow 9 | 10 | @Dao 11 | interface CloudDao { 12 | @Upsert(entity = CloudEntity::class) 13 | suspend fun upsert(item: CloudEntity) 14 | 15 | @Upsert(entity = CloudEntity::class) 16 | suspend fun upsert(items: List) 17 | 18 | @Query("SELECT * FROM CloudEntity WHERE name = :name LIMIT 1") 19 | suspend fun queryByName(name: String): CloudEntity? 20 | 21 | @Query("SELECT * FROM CloudEntity WHERE activated = 1") 22 | suspend fun queryActivated(): List 23 | 24 | @Query("SELECT * FROM CloudEntity") 25 | fun queryFlow(): Flow> 26 | 27 | @Query("SELECT * FROM CloudEntity") 28 | suspend fun query(): List 29 | 30 | @Delete(entity = CloudEntity::class) 31 | suspend fun delete(item: CloudEntity) 32 | } 33 | -------------------------------------------------------------------------------- /source/core/database/src/main/kotlin/com/xayah/core/database/util/Converters.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.database.util 2 | 3 | import androidx.room.TypeConverter 4 | import com.google.gson.reflect.TypeToken 5 | import com.xayah.core.model.database.PackagePermission 6 | import com.xayah.core.util.GsonUtil 7 | 8 | class StringListConverters { 9 | @TypeConverter 10 | fun fromStringListJson(json: String): List = 11 | GsonUtil().fromJson(json, object : TypeToken>() {}.type) 12 | 13 | @TypeConverter 14 | fun toStringListJson(list: List): String = 15 | GsonUtil().toJson(list) 16 | 17 | @TypeConverter 18 | fun fromPermissionListJson(json: String): List = 19 | GsonUtil().fromJson(json, object : TypeToken>() {}.type) 20 | 21 | @TypeConverter 22 | fun toPermissionListJson(list: List): String = 23 | GsonUtil().toJson(list) 24 | } 25 | -------------------------------------------------------------------------------- /source/core/datastore/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/datastore/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | } 5 | 6 | android { 7 | namespace = "com.xayah.core.datastore" 8 | } 9 | 10 | dependencies { 11 | // Core 12 | implementation(project(":core:model")) 13 | implementation(project(":core:common")) 14 | 15 | // Preferences DataStore 16 | implementation(libs.androidx.datastore.preferences) 17 | 18 | // Gson 19 | implementation(libs.gson) 20 | } 21 | -------------------------------------------------------------------------------- /source/core/datastore/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/datastore/src/main/kotlin/com/xayah/core/datastore/di/CoroutineScopesModule.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.datastore.di 2 | 3 | import com.xayah.core.datastore.di.DbDispatchers.Default 4 | import dagger.Module 5 | import dagger.Provides 6 | import dagger.hilt.InstallIn 7 | import dagger.hilt.components.SingletonComponent 8 | import kotlinx.coroutines.CoroutineDispatcher 9 | import kotlinx.coroutines.CoroutineScope 10 | import kotlinx.coroutines.SupervisorJob 11 | import javax.inject.Qualifier 12 | import javax.inject.Singleton 13 | 14 | @Retention(AnnotationRetention.RUNTIME) 15 | @Qualifier 16 | annotation class ApplicationScope 17 | 18 | @Module 19 | @InstallIn(SingletonComponent::class) 20 | internal object CoroutineScopesModule { 21 | @Provides 22 | @Singleton 23 | @ApplicationScope 24 | fun providesCoroutineScope( 25 | @Dispatcher(Default) dispatcher: CoroutineDispatcher, 26 | ): CoroutineScope = CoroutineScope(SupervisorJob() + dispatcher) 27 | } 28 | -------------------------------------------------------------------------------- /source/core/datastore/src/main/kotlin/com/xayah/core/datastore/di/DispatchersModule.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.datastore.di 2 | 3 | import com.xayah.core.datastore.di.DbDispatchers.Default 4 | import com.xayah.core.datastore.di.DbDispatchers.IO 5 | import dagger.Module 6 | import dagger.Provides 7 | import dagger.hilt.InstallIn 8 | import dagger.hilt.components.SingletonComponent 9 | import kotlinx.coroutines.CoroutineDispatcher 10 | import kotlinx.coroutines.Dispatchers 11 | import javax.inject.Qualifier 12 | import kotlin.annotation.AnnotationRetention.RUNTIME 13 | 14 | @Qualifier 15 | @Retention(RUNTIME) 16 | annotation class Dispatcher(val dbDispatchers: DbDispatchers) 17 | 18 | enum class DbDispatchers { 19 | Default, 20 | IO, 21 | } 22 | 23 | @Module 24 | @InstallIn(SingletonComponent::class) 25 | object DispatchersModule { 26 | @Provides 27 | @Dispatcher(IO) 28 | fun providesIODispatcher(): CoroutineDispatcher = Dispatchers.IO 29 | 30 | @Provides 31 | @Dispatcher(Default) 32 | fun providesDefaultDispatcher(): CoroutineDispatcher = Dispatchers.Default 33 | } 34 | -------------------------------------------------------------------------------- /source/core/hiddenapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/hiddenapi/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | } 4 | 5 | android { 6 | namespace = "com.xayah.core.hiddenapi" 7 | 8 | buildTypes { 9 | release { 10 | isMinifyEnabled = false 11 | } 12 | } 13 | 14 | buildFeatures { 15 | aidl = true 16 | } 17 | } 18 | 19 | dependencies { 20 | implementation(libs.androidx.core.ktx) 21 | implementation(libs.androidx.appcompat) 22 | annotationProcessor(libs.refine.annotation.processor) 23 | compileOnly(libs.refine.annotation) 24 | 25 | // Core 26 | implementation(project(":core:common")) 27 | } -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/app/ActivityManagerHidden.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import dev.rikka.tools.refine.RefineAs; 4 | 5 | /** 6 | * @see ActivityManager.java 7 | */ 8 | @RefineAs(ActivityManager.class) 9 | public class ActivityManagerHidden { 10 | public void forceStopPackageAsUser(String packageName, int userId) { 11 | throw new RuntimeException("Stub!"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/app/ActivityThread.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | /** 4 | * @see ActivityThread.java 5 | */ 6 | public class ActivityThread { 7 | public static ActivityThread systemMain() { 8 | throw new RuntimeException("Stub!"); 9 | } 10 | 11 | public ContextImpl getSystemContext() { 12 | throw new RuntimeException("Stub!"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/app/ContextImpl.java: -------------------------------------------------------------------------------- 1 | package android.app; 2 | 3 | import android.content.Context; 4 | 5 | public abstract class ContextImpl extends Context { 6 | } 7 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/os/MemoryFileHidden.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | import java.io.FileDescriptor; 4 | 5 | import dev.rikka.tools.refine.RefineAs; 6 | 7 | /** 8 | * @see MemoryFile.java 9 | */ 10 | @RefineAs(MemoryFile.class) 11 | public class MemoryFileHidden { 12 | public FileDescriptor getFileDescriptor() { 13 | throw new RuntimeException("Stub!"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/os/ServiceManager.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | /** 4 | * @see ServiceManager.java 5 | */ 6 | public final class ServiceManager { 7 | public static IBinder getService(String name) { 8 | throw new RuntimeException("Stub!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/os/UserHandleHidden.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | import dev.rikka.tools.refine.RefineAs; 4 | 5 | /** 6 | * @see UserHandle.java 7 | */ 8 | @RefineAs(UserHandle.class) 9 | public class UserHandleHidden { 10 | public static UserHandle of(int userId) { 11 | throw new RuntimeException("Stub!"); 12 | } 13 | 14 | public int getIdentifier() { 15 | throw new RuntimeException("Stub!"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/java/android/os/UserManagerHidden.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | import android.content.Context; 4 | import android.content.pm.UserInfo; 5 | 6 | import java.util.List; 7 | 8 | import dev.rikka.tools.refine.RefineAs; 9 | 10 | /** 11 | * @see UserManager.java 12 | */ 13 | @RefineAs(UserManager.class) 14 | public class UserManagerHidden { 15 | public static UserManager get(Context context) { 16 | throw new RuntimeException("Stub!"); 17 | } 18 | 19 | public List getUsers() { 20 | throw new RuntimeException("Stub!"); 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /source/core/hiddenapi/src/main/kotlin/com/xayah/core/hiddenapi/HiddenApiUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.hiddenapi 2 | 3 | inline fun Any.castTo(): T { 4 | return this as T 5 | } 6 | -------------------------------------------------------------------------------- /source/core/model/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/model/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.room) 4 | alias(libs.plugins.library.test) 5 | alias(libs.plugins.library.protobuf) 6 | } 7 | 8 | android { 9 | namespace = "com.xayah.core.model" 10 | 11 | buildFeatures { 12 | aidl = true 13 | } 14 | } 15 | 16 | dependencies { 17 | // Core 18 | implementation(project(":core:common")) 19 | compileOnly(project(":core:hiddenapi")) 20 | 21 | // Gson 22 | implementation(libs.gson) 23 | } 24 | -------------------------------------------------------------------------------- /source/core/model/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/model/src/main/aidl/com/xayah/core/model/database/PackagePermission.aidl: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model.database; 2 | parcelable PackagePermission; -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/App.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model 2 | 3 | data class App( 4 | val id: Long, 5 | val packageName: String, 6 | val label: String, 7 | val preserveId: Long, 8 | val isSystemApp: Boolean, 9 | val selectionFlag: Int, 10 | val selected: Boolean, 11 | ) 12 | -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/File.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model 2 | 3 | data class File( 4 | val id: Long, 5 | val name: String, 6 | val path: String, 7 | val preserveId: Long, 8 | val selected: Boolean, 9 | ) 10 | -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/SettingsData.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model 2 | 3 | val DEFAULT_COMPRESSION_TYPE = CompressionType.ZSTD 4 | const val DEFAULT_APPS_UPDATE_TIME = 0L 5 | 6 | data class SettingsData( 7 | val compressionType: CompressionType = DEFAULT_COMPRESSION_TYPE, 8 | val appsUpdateTime: Long = DEFAULT_APPS_UPDATE_TIME, 9 | ) 10 | -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/Target.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model 2 | 3 | enum class Target { 4 | Apps, 5 | Files 6 | } -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/Typealias.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model 2 | 3 | typealias WeblateSrcItems = List>> 4 | typealias WeblateItems = List>>> 5 | typealias MutableWeblateItems = MutableList>>> -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/database/CloundEntity.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model.database 2 | 3 | import androidx.room.Entity 4 | import androidx.room.PrimaryKey 5 | import com.xayah.core.model.CloudType 6 | import com.xayah.core.model.SFTPAuthMode 7 | import com.xayah.core.model.SmbAuthMode 8 | import com.xayah.core.model.SmbVersion 9 | 10 | data class FTPExtra( 11 | val port: Int, 12 | ) 13 | 14 | data class SMBExtra( 15 | val share: String, 16 | val port: Int, 17 | val domain: String, 18 | val version: List, 19 | val mode: SmbAuthMode = SmbAuthMode.PASSWORD, 20 | ) 21 | 22 | data class SFTPExtra( 23 | val port: Int, 24 | val privateKey: String, 25 | val mode: SFTPAuthMode = SFTPAuthMode.PASSWORD, 26 | ) 27 | 28 | data class WebDAVExtra( 29 | val insecure: Boolean, 30 | ) 31 | 32 | @Entity 33 | data class CloudEntity( 34 | @PrimaryKey var name: String, 35 | val type: CloudType, 36 | val host: String, 37 | val user: String, 38 | val pass: String, 39 | val remote: String, 40 | val extra: String, 41 | val activated: Boolean, 42 | ) 43 | -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/database/LabelEntity.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model.database 2 | 3 | import androidx.room.Entity 4 | import androidx.room.Index 5 | import androidx.room.PrimaryKey 6 | 7 | @Entity(indices = [Index(value = ["label"], unique = true)]) 8 | data class LabelEntity( 9 | @PrimaryKey var label: String, 10 | ) 11 | 12 | @Entity( 13 | indices = [Index(value = ["label", "packageName", "userId", "preserveId"], unique = true)], 14 | primaryKeys = ["label", "packageName", "userId", "preserveId"], 15 | ) 16 | data class LabelAppCrossRefEntity( 17 | var label: String, 18 | var packageName: String, 19 | var userId: Int, 20 | var preserveId: Long, 21 | ) 22 | 23 | @Entity( 24 | indices = [Index(value = ["label", "path", "preserveId"], unique = true)], 25 | primaryKeys = ["label", "path", "preserveId"], 26 | ) 27 | data class LabelFileCrossRefEntity( 28 | var label: String, 29 | var path: String, 30 | var preserveId: Long, 31 | ) 32 | -------------------------------------------------------------------------------- /source/core/model/src/main/kotlin/com/xayah/core/model/database/TaskEntity.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model.database 2 | 3 | import androidx.room.ColumnInfo 4 | import androidx.room.Entity 5 | import androidx.room.PrimaryKey 6 | import com.xayah.core.model.OpType 7 | import com.xayah.core.model.TaskType 8 | 9 | @Entity 10 | data class TaskEntity( 11 | @PrimaryKey(autoGenerate = true) var id: Long, 12 | var opType: OpType, 13 | var taskType: TaskType, 14 | var startTimestamp: Long, 15 | var endTimestamp: Long, 16 | var rawBytes: Double = 0.toDouble(), 17 | var availableBytes: Double = 0.toDouble(), 18 | var totalBytes: Double = 0.toDouble(), 19 | var totalCount: Int = 0, 20 | var successCount: Int = 0, 21 | var failureCount: Int = 0, 22 | @ColumnInfo(defaultValue = "0") var preprocessingIndex: Int = 0, 23 | var processingIndex: Int = 0, 24 | @ColumnInfo(defaultValue = "0") var postProcessingIndex: Int = 0, 25 | var isProcessing: Boolean, 26 | var cloud: String = "", 27 | var backupDir: String, 28 | ) 29 | -------------------------------------------------------------------------------- /source/core/model/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /source/core/model/src/test/kotlin/com/xayah/core/model/UnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.model 2 | 3 | import com.xayah.core.model.util.formatSize 4 | import org.junit.Test 5 | 6 | class UnitTest { 7 | @Test 8 | fun testFormatSize() { 9 | val sizeBytes = 102400.0 10 | println(sizeBytes.formatSize()) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/core/network/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/network/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /source/core/network/src/main/kotlin/com/xayah/core/network/io/CountingInputStreamImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.network.io 2 | 3 | import org.apache.commons.io.input.CountingInputStream 4 | import java.io.InputStream 5 | import java.util.Timer 6 | import java.util.TimerTask 7 | 8 | class CountingInputStreamImpl( 9 | `in`: InputStream, 10 | private val fileSize: Long, 11 | inline val onProgress: (read: Long, total: Long) -> Unit 12 | ) : CountingInputStream(`in`) { 13 | private var totalRead: Long = 0 14 | private val timer = Timer() 15 | private val task = object : TimerTask() { 16 | override fun run() { 17 | onProgress(totalRead, fileSize) 18 | } 19 | } 20 | 21 | init { 22 | timer.schedule(task, 0, 1000) 23 | } 24 | 25 | override fun beforeRead(n: Int) { 26 | super.beforeRead(n) 27 | totalRead += n 28 | } 29 | 30 | override fun close() { 31 | super.close() 32 | timer.cancel() 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /source/core/network/src/main/kotlin/com/xayah/core/network/io/CountingOutputStreamImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.network.io 2 | 3 | import org.apache.commons.io.output.CountingOutputStream 4 | import java.io.OutputStream 5 | import java.util.Timer 6 | import java.util.TimerTask 7 | 8 | class CountingOutputStreamImpl( 9 | `out`: OutputStream, 10 | private val fileSize: Long, 11 | inline val onProgress: (written: Long, total: Long) -> Unit 12 | ) : CountingOutputStream(`out`) { 13 | private var totalWrite: Long = 0 14 | private val timer = Timer() 15 | private val task = object : TimerTask() { 16 | override fun run() { 17 | onProgress(totalWrite, fileSize) 18 | } 19 | } 20 | 21 | init { 22 | timer.schedule(task, 0, 1000) 23 | } 24 | 25 | override fun beforeWrite(n: Int) { 26 | super.beforeWrite(n) 27 | totalWrite += n 28 | } 29 | 30 | override fun close() { 31 | super.close() 32 | timer.cancel() 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /source/core/network/src/main/kotlin/com/xayah/core/network/model/GitHub.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.network.model 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | /** 6 | * GitHub Api Release Entity 7 | */ 8 | data class Release( 9 | @SerializedName("html_url") val url: String = "", 10 | @SerializedName("name") val name: String = "", 11 | @SerializedName("assets") val assets: List = listOf(), 12 | @SerializedName("body") val body: String = "", 13 | ) { 14 | val content get() = body.replace(Regex("[*`]"), "") 15 | } 16 | 17 | /** 18 | * GitHub Api Asset Entity 19 | */ 20 | data class Asset( 21 | @SerializedName("browser_download_url") val url: String = "", 22 | ) -------------------------------------------------------------------------------- /source/core/network/src/main/kotlin/com/xayah/core/network/retrofit/GitHubRepository.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.network.retrofit 2 | 3 | import com.xayah.core.network.model.Release 4 | import retrofit2.Retrofit 5 | import retrofit2.converter.gson.GsonConverterFactory 6 | import retrofit2.http.GET 7 | import javax.inject.Inject 8 | import javax.inject.Singleton 9 | 10 | private const val BASE_URL = "https://api.github.com/repos/XayahSuSuSu/Android-DataBackup/" 11 | 12 | private interface Api { 13 | @GET(value = "releases") 14 | suspend fun getReleases(): List 15 | 16 | @GET(value = "releases/latest") 17 | suspend fun getLatestRelease(): Release 18 | } 19 | 20 | @Singleton 21 | class GitHubRepository @Inject constructor() { 22 | private val service = Retrofit.Builder() 23 | .baseUrl(BASE_URL) 24 | .addConverterFactory(GsonConverterFactory.create()) 25 | .build() 26 | .create(Api::class.java) 27 | 28 | suspend fun getReleases(): List = service.getReleases() 29 | suspend fun getLatestRelease(): Release = service.getLatestRelease() 30 | } -------------------------------------------------------------------------------- /source/core/network/src/main/kotlin/com/xayah/core/network/util/ModelUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.network.util 2 | 3 | import com.google.gson.reflect.TypeToken 4 | import com.xayah.core.model.database.CloudEntity 5 | import com.xayah.core.util.GsonUtil 6 | 7 | inline fun CloudEntity.getExtraEntity() = runCatching { GsonUtil().fromJson(extra, object : TypeToken() {}.type) }.getOrNull() 8 | -------------------------------------------------------------------------------- /source/core/network/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /source/core/provider/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/provider/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.compose) 4 | } 5 | 6 | android { 7 | namespace = "com.xayah.core.provider" 8 | } 9 | 10 | dependencies { 11 | // Feature 12 | implementation(project(":feature:crash")) 13 | } 14 | -------------------------------------------------------------------------------- /source/core/provider/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/provider/src/main/kotlin/com/xayah/core/provider/FileProvider.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.provider 2 | 3 | import androidx.core.content.FileProvider 4 | 5 | class FileSharingProvider : FileProvider(R.xml.file_paths) 6 | -------------------------------------------------------------------------------- /source/core/provider/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /source/core/rootservice/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/rootservice/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.protobuf) 4 | alias(libs.plugins.refine) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.core.rootservice" 9 | 10 | buildTypes { 11 | release { 12 | isMinifyEnabled = false 13 | } 14 | } 15 | 16 | buildFeatures { 17 | aidl = true 18 | } 19 | } 20 | 21 | dependencies { 22 | compileOnly(project(":core:hiddenapi")) 23 | implementation(project(":core:systemapi")) 24 | implementation(project(":core:util")) 25 | implementation(project(":core:common")) 26 | implementation(project(":core:datastore")) 27 | implementation(project(":core:model")) 28 | implementation(project(":native")) 29 | 30 | // AndroidX 31 | implementation(libs.androidx.core.ktx) 32 | 33 | // Coroutines 34 | implementation(libs.kotlinx.coroutines.core.jvm) 35 | 36 | // libsu 37 | implementation(libs.libsu.service) 38 | 39 | // Gson 40 | implementation(libs.gson) 41 | } -------------------------------------------------------------------------------- /source/core/rootservice/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/rootservice/src/main/aidl/com/xayah/core/rootservice/parcelables/PathParcelable.aidl: -------------------------------------------------------------------------------- 1 | package com.xayah.core.rootservice.parcelables; 2 | parcelable PathParcelable; -------------------------------------------------------------------------------- /source/core/rootservice/src/main/aidl/com/xayah/core/rootservice/parcelables/StatFsParcelable.aidl: -------------------------------------------------------------------------------- 1 | package com.xayah.core.rootservice.parcelables; 2 | parcelable StatFsParcelable; -------------------------------------------------------------------------------- /source/core/rootservice/src/main/aidl/com/xayah/core/rootservice/parcelables/StorageStatsParcelable.aidl: -------------------------------------------------------------------------------- 1 | package com.xayah.core.rootservice.parcelables; 2 | parcelable StorageStatsParcelable; -------------------------------------------------------------------------------- /source/core/rootservice/src/main/kotlin/com/xayah/core/rootservice/util/CoroutineUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.rootservice.util 2 | 3 | import kotlinx.coroutines.CoroutineScope 4 | import kotlinx.coroutines.Dispatchers 5 | import kotlinx.coroutines.withContext 6 | 7 | suspend fun withMainContext(block: suspend CoroutineScope.() -> T): T = withContext(Dispatchers.Main, block) 8 | 9 | suspend fun withIOContext(block: suspend CoroutineScope.() -> T): T = withContext(Dispatchers.IO, block) 10 | -------------------------------------------------------------------------------- /source/core/service/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/service/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.protobuf) 5 | alias(libs.plugins.refine) 6 | } 7 | 8 | android { 9 | namespace = "com.xayah.core.service" 10 | } 11 | 12 | dependencies { 13 | // Core 14 | implementation(project(":core:common")) 15 | implementation(project(":core:model")) 16 | implementation(project(":core:util")) 17 | implementation(project(":core:database")) 18 | implementation(project(":core:datastore")) 19 | implementation(project(":core:rootservice")) 20 | implementation(project(":core:data")) 21 | implementation(project(":core:network")) 22 | compileOnly(project(":core:hiddenapi")) 23 | 24 | // Gson 25 | implementation(libs.gson) 26 | 27 | // Preferences DataStore 28 | implementation(libs.androidx.datastore.preferences) 29 | } -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/medium/backup/ProcessingServiceProxyCloudImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.medium.backup 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyCloudImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, BackupServiceCloudImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/medium/backup/ProcessingServiceProxyLocalImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.medium.backup 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyLocalImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, BackupServiceLocalImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/medium/restore/ProcessingServiceProxyCloudImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.medium.restore 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyCloudImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, RestoreServiceCloudImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/medium/restore/ProcessingServiceProxyLocalImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.medium.restore 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyLocalImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, RestoreServiceLocalImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/model/Preprocessing.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.model 2 | 3 | data class NecessaryInfo( 4 | var inputMethods: String, 5 | var accessibilityServices: String, 6 | ) 7 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/packages/backup/ProcessingServiceProxyCloudImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.packages.backup 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyCloudImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, BackupServiceCloudImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/packages/backup/ProcessingServiceProxyLocalImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.packages.backup 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyLocalImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, BackupServiceLocalImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/packages/restore/ProcessingServiceProxyCloudImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.packages.restore 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyCloudImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, RestoreServiceCloudImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/kotlin/com/xayah/core/service/packages/restore/ProcessingServiceProxyLocalImpl.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.service.packages.restore 2 | 3 | import android.content.Context 4 | import android.content.Intent 5 | import com.xayah.core.service.AbstractProcessingServiceProxy 6 | import dagger.hilt.android.qualifiers.ApplicationContext 7 | import javax.inject.Inject 8 | 9 | class ProcessingServiceProxyLocalImpl @Inject constructor() : AbstractProcessingServiceProxy() { 10 | @Inject 11 | @ApplicationContext 12 | override lateinit var context: Context 13 | 14 | override val intent by lazy { Intent(context, RestoreServiceLocalImpl::class.java) } 15 | } 16 | -------------------------------------------------------------------------------- /source/core/service/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /source/core/systemapi/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/systemapi/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | } 4 | 5 | android { 6 | namespace = "com.xayah.core.systemapi" 7 | 8 | buildTypes { 9 | release { 10 | isMinifyEnabled = false 11 | } 12 | } 13 | } 14 | 15 | dependencies { 16 | implementation(libs.androidx.appcompat) 17 | 18 | // Core 19 | implementation(project(":core:common")) 20 | } -------------------------------------------------------------------------------- /source/core/systemapi/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/systemapi/src/main/java/com/android/providers/settings/SettingsState.java: -------------------------------------------------------------------------------- 1 | package com.android.providers.settings; 2 | 3 | public interface SettingsState { 4 | static final String SYSTEM_PACKAGE_NAME = "android"; 5 | static final int MAX_BYTES_PER_APP_PACKAGE_UNLIMITED = -1; 6 | 7 | static final int SETTINGS_TYPE_GLOBAL = 0; 8 | static final int SETTINGS_TYPE_SYSTEM = 1; 9 | static final int SETTINGS_TYPE_SECURE = 2; 10 | static final int SETTINGS_TYPE_SSAID = 3; 11 | static final int SETTINGS_TYPE_CONFIG = 4; 12 | 13 | static final int SETTINGS_TYPE_MASK = 0xF0000000; 14 | static final int SETTINGS_TYPE_SHIFT = 28; 15 | 16 | static int makeKey(int type, int userId) { 17 | return (type << SETTINGS_TYPE_SHIFT) | userId; 18 | } 19 | 20 | Setting getSettingLocked(String name); 21 | 22 | boolean insertSettingLocked(String name, String value, String tag, boolean makeDefault, String packageName); 23 | 24 | interface Setting { 25 | String getValue(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /source/core/ui/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/ui/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.compose) 4 | alias(libs.plugins.library.hilt) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.core.ui" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:model")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:datastore")) 17 | 18 | // Compose Navigation 19 | implementation(libs.androidx.navigation.compose) 20 | implementation(libs.androidx.hilt.navigation.compose) 21 | 22 | // Accompanist 23 | implementation(libs.accompanist.systemuicontroller) 24 | implementation(libs.accompanist.drawablepainter) 25 | implementation(libs.accompanist.placeholder) 26 | 27 | // Coil 28 | implementation(libs.coil.compose) 29 | 30 | // Preferences DataStore 31 | implementation(libs.androidx.datastore.preferences) 32 | } 33 | -------------------------------------------------------------------------------- /source/core/ui/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/ui/src/main/assets/bear.lottie: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/core/ui/src/main/assets/bear.lottie -------------------------------------------------------------------------------- /source/core/ui/src/main/assets/loading.lottie: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/core/ui/src/main/assets/loading.lottie -------------------------------------------------------------------------------- /source/core/ui/src/main/assets/squirrel.lottie: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/core/ui/src/main/assets/squirrel.lottie -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/component/Divider.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.component 2 | 3 | import androidx.compose.material3.HorizontalDivider 4 | import androidx.compose.runtime.Composable 5 | import androidx.compose.ui.Modifier 6 | import androidx.compose.ui.graphics.Color 7 | import com.xayah.core.ui.theme.ThemedColorSchemeKeyTokens 8 | import com.xayah.core.ui.theme.value 9 | 10 | @Composable 11 | fun Divider(modifier: Modifier = Modifier, color: Color = ThemedColorSchemeKeyTokens.OutlineVariant.value.copy(alpha = 0.3f)) = 12 | HorizontalDivider(modifier = modifier, color = color) 13 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/component/Effects.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.component 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.runtime.DisposableEffect 5 | import androidx.compose.ui.platform.LocalLifecycleOwner 6 | import androidx.lifecycle.Lifecycle 7 | import androidx.lifecycle.LifecycleEventObserver 8 | 9 | @Composable 10 | inline fun SetOnResume(crossinline onResume: () -> Unit) { 11 | val owner = LocalLifecycleOwner.current 12 | DisposableEffect(owner) { 13 | val observer = LifecycleEventObserver { _, event -> 14 | if (event == Lifecycle.Event.ON_RESUME) { 15 | onResume() 16 | } 17 | } 18 | owner.lifecycle.addObserver(observer) 19 | onDispose { 20 | owner.lifecycle.removeObserver(observer) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/component/Slot.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.component 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.runtime.ProvidableCompositionLocal 5 | import androidx.compose.runtime.remember 6 | import androidx.compose.runtime.staticCompositionLocalOf 7 | 8 | /** 9 | * Creates a [SlotScope]. Call it at top-level composable functions, 10 | * it's just something like a global slot scope for easier usage. 11 | */ 12 | @Composable 13 | fun rememberSlotScope(): SlotScope { 14 | val dialogState = rememberDialogState() 15 | return remember { SlotScope(dialogSlot = dialogState) } 16 | } 17 | 18 | data class SlotScope( 19 | val dialogSlot: DialogState, 20 | ) 21 | 22 | /** 23 | * Provide this [androidx.compose.runtime.CompositionLocal] at top-level composable for passing [SlotScope] down through the Composition implicitly. 24 | */ 25 | val LocalSlotScope: ProvidableCompositionLocal = staticCompositionLocalOf { null } 26 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/component/Spacer.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.component 2 | 3 | import androidx.compose.foundation.layout.PaddingValues 4 | import androidx.compose.foundation.layout.Spacer 5 | import androidx.compose.foundation.layout.fillMaxWidth 6 | import androidx.compose.foundation.layout.height 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | 10 | @Composable 11 | fun InnerTopSpacer(innerPadding: PaddingValues) { 12 | Spacer( 13 | modifier = Modifier 14 | .fillMaxWidth() 15 | .height(innerPadding.calculateTopPadding()) 16 | ) 17 | } 18 | 19 | @Composable 20 | fun InnerBottomSpacer(innerPadding: PaddingValues) { 21 | Spacer( 22 | modifier = Modifier 23 | .fillMaxWidth() 24 | .height(innerPadding.calculateBottomPadding()) 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/material3/tokens/DividerTokens.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | // VERSION: v0_117 17 | // GENERATED CODE - DO NOT MODIFY BY HAND 18 | 19 | package com.xayah.core.ui.material3.tokens 20 | 21 | import androidx.compose.ui.unit.dp 22 | import com.xayah.core.ui.theme.ThemedColorSchemeKeyTokens 23 | 24 | internal object DividerTokens { 25 | val Color = ThemedColorSchemeKeyTokens.OutlineVariant 26 | val Thickness = 1.0.dp 27 | } -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/model/Dialog.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.model 2 | 3 | data class DialogRadioItem( 4 | val enum: T? = null, 5 | val title: String, 6 | val desc: String? = null, 7 | ) 8 | 9 | data class DialogCheckBoxItem( 10 | val enum: T? = null, 11 | val title: String, 12 | val desc: String? = null, 13 | ) 14 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/model/ProgressIndicator.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.model 2 | 3 | import androidx.compose.ui.graphics.Color 4 | import com.xayah.core.model.util.formatSize 5 | import com.xayah.core.ui.theme.ThemedColorSchemeKeyTokens 6 | 7 | data class MultiColorProgress( 8 | val progress: Float, 9 | val color: Color, 10 | ) 11 | 12 | data class SegmentProgress( 13 | val used: Long, 14 | val total: Long, 15 | ) { 16 | val progress: Float 17 | get() = used.toFloat() / total 18 | 19 | val usedFormat: String 20 | get() = used.toDouble().formatSize() 21 | 22 | val totalFormat: String 23 | get() = total.toDouble().formatSize() 24 | } 25 | 26 | data class SegmentCircleProgress( 27 | val color: ThemedColorSchemeKeyTokens = ThemedColorSchemeKeyTokens.PrimaryContainer, 28 | val trackColor: ThemedColorSchemeKeyTokens = ThemedColorSchemeKeyTokens.Primary, 29 | ) 30 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/model/TopBar.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.model 2 | 3 | data class TopBarState( 4 | val progress: Float = 1f, 5 | val title: String = "", 6 | val indeterminate: Boolean = false 7 | ) 8 | 9 | data class RefreshState( 10 | val progress: Float = 0f, 11 | val user: String = "", 12 | val pkg: String = "", 13 | ) 14 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/theme/Type.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.theme 2 | 3 | import androidx.compose.material3.Typography 4 | import androidx.compose.ui.text.TextStyle 5 | import androidx.compose.ui.text.font.Font 6 | import androidx.compose.ui.text.font.FontFamily 7 | import androidx.compose.ui.text.font.FontWeight 8 | import androidx.compose.ui.unit.sp 9 | import com.xayah.core.ui.R 10 | 11 | // Set of Material typography styles to start with 12 | val Typography = Typography( 13 | bodyLarge = TextStyle( 14 | fontFamily = FontFamily.Default, 15 | fontWeight = FontWeight.Normal, 16 | fontSize = 16.sp, 17 | lineHeight = 24.sp, 18 | letterSpacing = 0.5.sp 19 | ) 20 | ) 21 | 22 | val JetbrainsMonoFamily = FontFamily( 23 | Font(R.font.jetbrains_mono_regular, FontWeight.Normal), 24 | ) 25 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/AnimationTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | object AnimationTokens { 4 | const val AnimatedTextLabel = "AnimatedText" 5 | const val AnimatedContentLabel = "AnimatedContent" 6 | const val EmphasizedOffsetLabel = "EmphasizedOffset" 7 | const val AnimatedProgressLabel = "AnimatedProgress" 8 | const val AnimatedOffsetYLabel = "AnimatedOffsetY" 9 | } 10 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/ChipTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | object ChipTokens { 4 | val DefaultHeight = PaddingTokens.Level5 5 | val DefaultPadding = PaddingTokens.Level4 6 | } 7 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/ModalMenuTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | object ModalMenuTokens { 4 | const val DefaultMaxDisplay = 6 5 | } -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/ScrollBarTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | object ScrollBarTokens { 4 | const val AnimationLabel = "ScrollBarLabel" 5 | const val BackgroundAlpha = 0.1f 6 | val Width = PaddingTokens.Level2 7 | val TouchWidth = PaddingTokens.Level6 8 | val BarHeight = PaddingTokens.Level7 9 | } -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/SizeTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | import androidx.compose.ui.unit.dp 4 | 5 | object PaddingTokens { 6 | val Level0 = 0.dp 7 | val Level1 = 4.dp 8 | val Level2 = 8.dp 9 | val Level3 = 12.dp 10 | val Level4 = 16.dp 11 | val Level5 = 24.dp 12 | val Level6 = 32.dp 13 | val Level7 = 48.dp 14 | val Level8 = 56.dp 15 | } 16 | 17 | object SizeTokens { 18 | val Level0 = 0.dp 19 | val Level1 = 1.dp 20 | val Level2 = 2.dp 21 | val Level3 = 3.dp 22 | val Level4 = 4.dp 23 | val Level6 = 6.dp 24 | val Level8 = 8.dp 25 | val Level10 = 10.dp 26 | val Level12 = 12.dp 27 | val Level16 = 16.dp 28 | val Level18 = 18.dp 29 | val Level20 = 20.dp 30 | val Level24 = 24.dp 31 | val Level32 = 32.dp 32 | val Level36 = 36.dp 33 | val Level48 = 48.dp 34 | val Level52 = 52.dp 35 | val Level56 = 56.dp 36 | val Level64 = 64.dp 37 | val Level68 = 68.dp 38 | val Level80 = 80.dp 39 | val Level100 = 100.dp 40 | val Level128 = 128.dp 41 | val Level152 = 152.dp 42 | } 43 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/SnackbarTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | import androidx.compose.ui.unit.dp 4 | import com.xayah.core.ui.material3.tokens.ElevationTokens 5 | import com.xayah.core.ui.material3.tokens.ShapeKeyTokens 6 | import com.xayah.core.ui.material3.tokens.TypographyKeyTokens 7 | import com.xayah.core.ui.theme.ThemedColorSchemeKeyTokens 8 | 9 | internal object SnackbarTokens { 10 | val ActionLabelTextColor = ThemedColorSchemeKeyTokens.Primary 11 | val ActionLabelTextFont = TypographyKeyTokens.LabelLarge 12 | val ContainerColor = ThemedColorSchemeKeyTokens.SurfaceContainerHighestBaselineFixed 13 | val ContainerElevation = ElevationTokens.Level0 14 | val ContainerShape = ShapeKeyTokens.CornerExtraSmall 15 | val IconColor = ThemedColorSchemeKeyTokens.OnSurface 16 | val IconSize = 24.0.dp 17 | val SupportingTextColor = ThemedColorSchemeKeyTokens.OnSurface 18 | val SupportingTextFont = TypographyKeyTokens.BodyMedium 19 | val SingleLineContainerHeight = 48.0.dp 20 | val TwoLinesContainerHeight = 68.0.dp 21 | } 22 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/token/TextFieldTokens.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.token 2 | 3 | import androidx.compose.ui.unit.dp 4 | 5 | object TextFieldTokens { 6 | val LeadingIconPaddingStart = PaddingTokens.Level4 7 | val TrailingIconPaddingEnd = PaddingTokens.Level2 8 | val IconSize = 24.dp 9 | } 10 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/util/NavHostController.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.util 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.runtime.ProvidableCompositionLocal 5 | import androidx.compose.runtime.staticCompositionLocalOf 6 | import androidx.navigation.NavHostController 7 | import androidx.navigation.compose.currentBackStackEntryAsState 8 | 9 | val LocalNavController: ProvidableCompositionLocal = staticCompositionLocalOf { null } 10 | 11 | fun NavHostController.navigateAndPopBackStack(route: String) = navigate(route) { popBackStack() } 12 | 13 | @Composable 14 | fun NavHostController.currentRoute() = currentBackStackEntryAsState().value?.destination?.route 15 | -------------------------------------------------------------------------------- /source/core/ui/src/main/kotlin/com/xayah/core/ui/util/StringResource.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.ui.util 2 | 3 | fun joinOf(vararg elements: CharSequence): String = elements.joinToString(separator = "") 4 | -------------------------------------------------------------------------------- /source/core/ui/src/main/res/anim/fast_out_extra_slow_in.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | -------------------------------------------------------------------------------- /source/core/ui/src/main/res/drawable/ic_rounded_counter_1.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/core/ui/src/main/res/drawable/ic_rounded_hourglass_empty.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /source/core/util/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/util/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | } 5 | 6 | android { 7 | namespace = "com.xayah.core.util" 8 | } 9 | 10 | dependencies { 11 | // Core 12 | implementation(project(":core:common")) 13 | implementation(project(":core:datastore")) 14 | implementation(project(":core:model")) 15 | 16 | // Compose Navigation 17 | implementation(libs.androidx.navigation.compose) 18 | 19 | // Gson 20 | implementation(libs.gson) 21 | 22 | // libsu 23 | implementation(libs.libsu.core) 24 | 25 | // zip4j 26 | implementation(libs.zip4j) 27 | 28 | // Apache commons codec 29 | implementation(libs.apache.commons.codec) 30 | 31 | // Work manager 32 | implementation(libs.androidx.work.runtime.ktx) 33 | } 34 | -------------------------------------------------------------------------------- /source/core/util/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/ActivityUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | object ActivityUtil { 4 | val classMainActivity: Class<*> = Class.forName("com.xayah.databackup.MainActivity") 5 | } 6 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/CodingUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import java.net.URLDecoder 4 | import java.net.URLEncoder 5 | import java.nio.charset.Charset 6 | import java.nio.charset.StandardCharsets 7 | 8 | fun String.encodeURL(charset: Charset = StandardCharsets.UTF_8): String = URLEncoder.encode(this, charset.toString()) 9 | fun String.decodeURL(charset: Charset = StandardCharsets.UTF_8): String = URLDecoder.decode(this, charset.toString()) 10 | 11 | val encodedURLWithSpace = " ".encodeURL() 12 | fun String.ifEmptyEncodeURLWithSpace() = ifEmpty { " " }.encodeURL() 13 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/ContextUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import android.app.Activity 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.net.Uri 7 | 8 | fun Context.toBrowser(url: String) = startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) 9 | fun Context.getActivity(): Activity = this as Activity 10 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/CoroutineUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import kotlinx.coroutines.CoroutineScope 4 | import kotlinx.coroutines.Dispatchers 5 | import kotlinx.coroutines.launch 6 | import kotlinx.coroutines.withContext 7 | 8 | suspend fun withMainContext(block: suspend CoroutineScope.() -> T): T = withContext(Dispatchers.Main, block) 9 | 10 | suspend fun withIOContext(block: suspend CoroutineScope.() -> T): T = withContext(Dispatchers.IO, block) 11 | 12 | fun CoroutineScope.launchOnDefault(block: suspend CoroutineScope.() -> Unit) = launch(context = Dispatchers.Default, block = block) 13 | 14 | fun CoroutineScope.launchOnMain(block: suspend CoroutineScope.() -> Unit) = launch(context = Dispatchers.Main, block = block) 15 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/GsonUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import com.google.gson.GsonBuilder 4 | import java.lang.reflect.Type 5 | import javax.inject.Inject 6 | import javax.inject.Singleton 7 | 8 | 9 | @Singleton 10 | class GsonUtil @Inject constructor() { 11 | private val gson = GsonBuilder().setPrettyPrinting().create() 12 | 13 | fun toJson(src: Any): String = gson.toJson(src) 14 | 15 | fun fromJson(json: String, type: Type): T = run { 16 | gson.fromJson(json, type) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/HashUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import android.annotation.TargetApi 4 | import android.os.Build 5 | import org.apache.commons.codec.digest.DigestUtils 6 | import java.io.FileInputStream 7 | import java.nio.file.Files 8 | import java.nio.file.Paths 9 | 10 | object HashUtil { 11 | fun calculateMD5(src: String): String = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 12 | calculateMD5Api26(src) 13 | } else { 14 | calculateMD5Api24(src) 15 | } 16 | 17 | private fun calculateMD5Api24(src: String) = DigestUtils.md5Hex(FileInputStream(src)) 18 | 19 | @TargetApi(Build.VERSION_CODES.O) 20 | private fun calculateMD5Api26(src: String) = DigestUtils.md5Hex(Files.newInputStream(Paths.get(src))) 21 | } 22 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/LanguageUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import android.content.Context 4 | import androidx.core.app.LocaleManagerCompat 5 | import com.xayah.core.datastore.ConstantUtil 6 | import java.util.Locale 7 | 8 | object LanguageUtil { 9 | fun getSystemLocale(context: Context) = LocaleManagerCompat.getSystemLocales(context).get(0)!! 10 | 11 | fun String.toLocale(context: Context): Locale = if (this == ConstantUtil.LANGUAGE_SYSTEM) { 12 | getSystemLocale(context) 13 | } else { 14 | Locale.forLanguageTag(this) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/NavControllerUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import androidx.navigation.NavController 4 | import androidx.navigation.NavHostController 5 | 6 | fun NavHostController.maybePopBackStack() = if (previousBackStackEntry != null) popBackStack() else false 7 | fun NavHostController.navigateSingle(route: String) = navigate(route) { popUpTo(route) { inclusive = true } } 8 | 9 | fun NavController.maybePopBackStack() = if (previousBackStackEntry != null) popBackStack() else false 10 | fun NavController.navigateSingle(route: String) = navigate(route) { popUpTo(route) { inclusive = true } } 11 | fun NavController.maybePopBackAndNavigateSingle(route: String) { 12 | maybePopBackStack() 13 | navigateSingle(route) 14 | } -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/StringUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | import java.util.Locale 4 | 5 | fun String.toPathList() = split("/") 6 | 7 | /** 8 | * Return [ifSameValue] if [value] is equal to [this], else [value] 9 | */ 10 | fun String.ifNotTheSame(value: String, ifSameValue: String) = if (this == value) ifSameValue else value 11 | 12 | fun String.capitalizeString() = replaceFirstChar { 13 | if (it.isLowerCase()) it.titlecase( 14 | Locale.ROOT 15 | ) else it.toString() 16 | } -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/SymbolUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util 2 | 3 | object SymbolUtil { 4 | const val USD = '$' 5 | const val BACKSLASH = '\\' 6 | const val QUOTE = '"' 7 | const val LF = '\n' 8 | const val DOT = '•' 9 | } 10 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/command/AppopsUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util.command 2 | 3 | import com.xayah.core.util.model.ShellResult 4 | 5 | object Appops { 6 | private suspend fun execute(vararg args: String): ShellResult = BaseUtil.execute("appops", *args) 7 | suspend fun reset(userId: Int, packageName: String): ShellResult = run { 8 | // appops reset --user $userId $packageName 9 | execute( 10 | "reset", 11 | "--user", 12 | "$userId", 13 | packageName, 14 | ) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/command/PackageUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util.command 2 | 3 | object PackageUtil { 4 | suspend fun hasKeystore(su: String, uid: Int): Boolean = 5 | // su $uid -c keystore_cli_v2 list 6 | BaseUtil.execute( 7 | su, 8 | uid.toString(), 9 | "-c", 10 | "keystore_cli_v2", 11 | "list", 12 | log = false 13 | ).out.size > 1 14 | } 15 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/command/TreeUtil.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util.command 2 | 3 | import com.xayah.core.common.util.toSpaceString 4 | import com.xayah.core.common.util.trim 5 | import com.xayah.core.util.SymbolUtil.QUOTE 6 | import com.xayah.core.util.model.ShellResult 7 | 8 | object Tree { 9 | private suspend fun execute(vararg args: String): ShellResult = BaseUtil.execute("tree", *args) 10 | suspend fun tree(src: String, exclusionList: List): ShellResult = run { 11 | val exclusion = exclusionList.trim().map { "-I $it" }.toSpaceString() 12 | // tree -N "$src" '$exclusion' 13 | execute( 14 | "-N", 15 | "$QUOTE$src$QUOTE", 16 | exclusion, 17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/model/Command.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util.model 2 | 3 | import com.xayah.core.common.util.toLineString 4 | import com.xayah.core.common.util.toSpaceString 5 | 6 | data class ShellResult( 7 | var code: Int, 8 | var input: List, 9 | var out: List, 10 | ) { 11 | val isSuccess: Boolean 12 | get() = code == 0 13 | 14 | val inputString: String 15 | get() = input.toSpaceString() 16 | 17 | val outString: String 18 | get() = out.toLineString() 19 | } 20 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/module/GsonModule.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util.module 2 | 3 | import com.google.gson.Gson 4 | import dagger.Module 5 | import dagger.Provides 6 | import dagger.hilt.InstallIn 7 | import dagger.hilt.android.components.ViewModelComponent 8 | 9 | @Module 10 | @InstallIn(ViewModelComponent::class) 11 | object GsonModule { 12 | @Provides 13 | @GitHub 14 | fun provideGson(): Gson = Gson() 15 | } 16 | -------------------------------------------------------------------------------- /source/core/util/src/main/kotlin/com/xayah/core/util/module/Qualifier.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.core.util.module 2 | 3 | import javax.inject.Qualifier 4 | 5 | /** 6 | * GitHub relatives 7 | */ 8 | @Retention(AnnotationRetention.BINARY) 9 | @Qualifier 10 | annotation class GitHub 11 | -------------------------------------------------------------------------------- /source/core/util/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /source/core/util/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /source/core/work/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/core/work/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.hilt.work) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.core.work" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:datastore")) 14 | implementation(project(":core:data")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:model")) 17 | 18 | // Work manager 19 | implementation(libs.androidx.work.runtime.ktx) 20 | } 21 | -------------------------------------------------------------------------------- /source/core/work/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/core/work/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /source/feature/crash/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/crash/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.crash" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:data")) 16 | implementation(project(":core:util")) 17 | 18 | // Compose Navigation 19 | implementation(libs.androidx.navigation.compose) 20 | implementation(libs.androidx.hilt.navigation.compose) 21 | } -------------------------------------------------------------------------------- /source/feature/crash/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /source/feature/crash/src/main/kotlin/com/xayah/feature/crash/MainViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.feature.crash 2 | 3 | import androidx.compose.material3.ExperimentalMaterial3Api 4 | import com.xayah.core.ui.viewmodel.BaseViewModel 5 | import com.xayah.core.ui.viewmodel.IndexUiEffect 6 | import com.xayah.core.ui.viewmodel.UiIntent 7 | import com.xayah.core.ui.viewmodel.UiState 8 | import dagger.hilt.android.lifecycle.HiltViewModel 9 | import javax.inject.Inject 10 | 11 | data class IndexUiState( 12 | val text: String = "", 13 | ) : UiState 14 | 15 | @ExperimentalMaterial3Api 16 | @HiltViewModel 17 | class IndexViewModel @Inject constructor() : BaseViewModel(IndexUiState()) { 18 | override suspend fun onEvent(state: IndexUiState, intent: UiIntent) {} 19 | } 20 | -------------------------------------------------------------------------------- /source/feature/crash/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /source/feature/flavor/alpha/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/flavor/alpha/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | } 4 | 5 | android { 6 | namespace = "com.xayah.feature.flavor.alpha" 7 | } 8 | 9 | dependencies { 10 | // Core 11 | implementation(project(":core:provider")) 12 | } 13 | -------------------------------------------------------------------------------- /source/feature/flavor/alpha/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | DataBackup alpha 3 | -------------------------------------------------------------------------------- /source/feature/flavor/foss/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/flavor/foss/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | } 4 | 5 | android { 6 | namespace = "com.xayah.feature.flavor.foss" 7 | } 8 | 9 | dependencies { 10 | // Core 11 | implementation(project(":core:provider")) 12 | } 13 | -------------------------------------------------------------------------------- /source/feature/flavor/foss/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /source/feature/flavor/foss/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/feature/flavor/premium/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/flavor/premium/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.firebase) 4 | } 5 | 6 | android { 7 | namespace = "com.xayah.feature.flavor.premium" 8 | } 9 | 10 | dependencies { 11 | // Core 12 | implementation(project(":core:provider")) 13 | } 14 | -------------------------------------------------------------------------------- /source/feature/flavor/premium/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /source/feature/flavor/premium/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /source/feature/flavor/premium/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | -------------------------------------------------------------------------------- /source/feature/main/cloud/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/cloud/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.cloud" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:datastore")) 16 | implementation(project(":core:data")) 17 | implementation(project(":core:network")) 18 | implementation(project(":core:model")) 19 | implementation(project(":core:util")) 20 | 21 | // Compose Navigation 22 | implementation(libs.androidx.navigation.compose) 23 | implementation(libs.androidx.hilt.navigation.compose) 24 | 25 | // Preferences DataStore 26 | implementation(libs.androidx.datastore.preferences) 27 | } -------------------------------------------------------------------------------- /source/feature/main/cloud/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/configurations/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/configurations/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.configurations" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:datastore")) 17 | implementation(project(":core:database")) 18 | implementation(project(":core:data")) 19 | implementation(project(":core:model")) 20 | implementation(project(":core:rootservice")) 21 | implementation(project(":core:service")) 22 | 23 | // Compose Navigation 24 | implementation(libs.androidx.navigation.compose) 25 | implementation(libs.androidx.hilt.navigation.compose) 26 | 27 | // Preferences DataStore 28 | implementation(libs.androidx.datastore.preferences) 29 | 30 | // PickYou 31 | implementation(libs.pickyou) 32 | } -------------------------------------------------------------------------------- /source/feature/main/configurations/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/configurations/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /source/feature/main/dashboard/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/dashboard/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.dashboard" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:datastore")) 16 | implementation(project(":core:model")) 17 | implementation(project(":core:data")) 18 | implementation(project(":core:util")) 19 | implementation(project(":core:network")) 20 | 21 | // Compose Navigation 22 | implementation(libs.androidx.navigation.compose) 23 | implementation(libs.androidx.hilt.navigation.compose) 24 | 25 | // Preferences DataStore 26 | implementation(libs.androidx.datastore.preferences) 27 | } -------------------------------------------------------------------------------- /source/feature/main/dashboard/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/dashboard/src/main/kotlin/com/xayah/feature/main/dashboard/Model.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.feature.main.dashboard 2 | -------------------------------------------------------------------------------- /source/feature/main/details/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/details/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.details" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:model")) 17 | implementation(project(":core:data")) 18 | compileOnly(project(":core:hiddenapi")) 19 | implementation(project(":core:rootservice")) 20 | 21 | // Hilt navigation 22 | implementation(libs.androidx.hilt.navigation.compose) 23 | } 24 | -------------------------------------------------------------------------------- /source/feature/main/details/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/directory/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/directory/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.directory" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:datastore")) 17 | implementation(project(":core:database")) 18 | implementation(project(":core:data")) 19 | implementation(project(":core:model")) 20 | implementation(project(":core:rootservice")) 21 | 22 | // Compose Navigation 23 | implementation(libs.androidx.navigation.compose) 24 | implementation(libs.androidx.hilt.navigation.compose) 25 | 26 | // Preferences DataStore 27 | implementation(libs.androidx.datastore.preferences) 28 | 29 | // PickYou 30 | implementation(libs.pickyou) 31 | } -------------------------------------------------------------------------------- /source/feature/main/directory/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/directory/src/main/kotlin/com/xayah/feature/main/directory/Model.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.feature.main.directory 2 | 3 | import androidx.compose.material.icons.Icons 4 | import androidx.compose.material.icons.rounded.Palette 5 | import androidx.compose.material.icons.rounded.PhoneAndroid 6 | import androidx.compose.material.icons.rounded.SdCard 7 | import com.xayah.core.model.StorageType 8 | import com.xayah.core.model.database.DirectoryEntity 9 | 10 | fun DirectoryEntity.icon() = when (storageType) { 11 | StorageType.INTERNAL -> Icons.Rounded.PhoneAndroid 12 | StorageType.EXTERNAL -> Icons.Rounded.SdCard 13 | StorageType.CUSTOM -> Icons.Rounded.Palette 14 | } 15 | 16 | fun DirectoryEntity.pathDisplay() = when (storageType) { 17 | StorageType.EXTERNAL -> if (type.isEmpty()) path else "$path ($type)" 18 | else -> path 19 | } 20 | -------------------------------------------------------------------------------- /source/feature/main/directory/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /source/feature/main/history/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/history/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.history" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:model")) 17 | implementation(project(":core:data")) 18 | compileOnly(project(":core:hiddenapi")) 19 | implementation(project(":core:rootservice")) 20 | 21 | // Hilt navigation 22 | implementation(libs.androidx.hilt.navigation.compose) 23 | } 24 | -------------------------------------------------------------------------------- /source/feature/main/history/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/history/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /source/feature/main/list/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/list/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/processing/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/processing/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/restore/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/restore/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.main.restore" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:datastore")) 16 | implementation(project(":core:model")) 17 | implementation(project(":core:data")) 18 | implementation(project(":core:util")) 19 | 20 | // Compose Navigation 21 | implementation(libs.androidx.navigation.compose) 22 | implementation(libs.androidx.hilt.navigation.compose) 23 | 24 | // Preferences DataStore 25 | implementation(libs.androidx.datastore.preferences) 26 | 27 | // Coil 28 | implementation(libs.coil.compose) 29 | 30 | // dotLottie 31 | implementation(libs.dotlottie.android) 32 | } -------------------------------------------------------------------------------- /source/feature/main/restore/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/settings/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/main/settings/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/feature/main/settings/src/main/res/raw/contributors.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "XayahSuSuSu", 4 | "avatar": "https://avatars.githubusercontent.com/xayahsususu", 5 | "desc": "Lead Developer", 6 | "link": "https://github.com/XayahSuSuSu" 7 | }, 8 | { 9 | "name": "Palm", 10 | "avatar": "https://palmdevs.me/assets/og/image.webp", 11 | "desc": "Lead Designer", 12 | "link": "https://palmdevs.me" 13 | }, 14 | { 15 | "name": "Ömer Süsin", 16 | "avatar": "https://avatars.githubusercontent.com/omersusin", 17 | "desc": "Project Manager", 18 | "link": "https://github.com/omersusin" 19 | }, 20 | { 21 | "name": "Furkan Karcıoğlu", 22 | "avatar": "https://avatars.githubusercontent.com/frknkrc44", 23 | "desc": "Developer", 24 | "link": "https://github.com/frknkrc44" 25 | } 26 | ] -------------------------------------------------------------------------------- /source/feature/setup/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/feature/setup/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | alias(libs.plugins.library.hilt) 4 | alias(libs.plugins.library.compose) 5 | } 6 | 7 | android { 8 | namespace = "com.xayah.feature.setup" 9 | } 10 | 11 | dependencies { 12 | // Core 13 | implementation(project(":core:common")) 14 | implementation(project(":core:ui")) 15 | implementation(project(":core:util")) 16 | implementation(project(":core:datastore")) 17 | implementation(project(":core:data")) 18 | implementation(project(":core:work")) 19 | implementation(project(":feature:main:directory")) 20 | implementation(project(":feature:main:configurations")) 21 | 22 | // Compose Navigation 23 | implementation(libs.androidx.navigation.compose) 24 | implementation(libs.androidx.hilt.navigation.compose) 25 | 26 | // Preferences DataStore 27 | implementation(libs.androidx.datastore.preferences) 28 | 29 | // libsu 30 | implementation(libs.libsu.core) 31 | 32 | // PickYou 33 | implementation(libs.pickyou) 34 | } -------------------------------------------------------------------------------- /source/feature/setup/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /source/feature/setup/src/main/kotlin/com/xayah/feature/setup/Routes.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.feature.setup 2 | 3 | sealed class SetupRoutes(val route: String) { 4 | data object One : SetupRoutes(route = "setup_one") 5 | data object Two : SetupRoutes(route = "setup_two") 6 | data object Directory : SetupRoutes(route = "setup_directory") 7 | data object Configurations : SetupRoutes(route = "setup_configurations") 8 | } 9 | -------------------------------------------------------------------------------- /source/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/XayahSuSuSu/Android-DataBackup/c27c51f1044d12757ea0e3bc84768ea9c8330034/source/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /source/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Oct 27 01:10:57 CST 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /source/native/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /source/native/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(libs.plugins.library.common) 3 | } 4 | 5 | android { 6 | namespace = "com.xayah.libnative" 7 | ndkVersion = "25.2.9519653" 8 | 9 | buildTypes { 10 | release { 11 | isMinifyEnabled = false 12 | } 13 | } 14 | externalNativeBuild { 15 | cmake { 16 | path("src/main/jni/CMakeLists.txt") 17 | version = "3.22.1" 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | // AndroidX 24 | implementation(libs.androidx.core.ktx) 25 | } -------------------------------------------------------------------------------- /source/native/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /source/native/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.22.1) 2 | 3 | project("native") 4 | 5 | add_subdirectory(nativelib) 6 | # add_subdirectory(external) 7 | -------------------------------------------------------------------------------- /source/native/src/main/jni/external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(tar) 2 | -------------------------------------------------------------------------------- /source/native/src/main/jni/external/tar/tar-lib-embedded/rmt-command.h: -------------------------------------------------------------------------------- 1 | #ifndef DEFAULT_RMT_COMMAND 2 | # define DEFAULT_RMT_COMMAND "/usr/local/libexec/rmt" 3 | #endif 4 | -------------------------------------------------------------------------------- /source/native/src/main/jni/nativelib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_compile_options( 2 | -O3 3 | -fPIC 4 | -ffunction-sections 5 | -fdata-sections 6 | -D_FORTIFY_SOURCE=0 7 | -ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=/src 8 | ) 9 | 10 | add_link_options( 11 | -s 12 | -flto 13 | -Wl,--gc-sections 14 | -Wl,--build-id=none 15 | -Wl,--hash-style=both 16 | ) 17 | 18 | add_library(nativelib SHARED 19 | nativelib.cpp 20 | ) 21 | 22 | target_link_libraries(nativelib 23 | android 24 | log 25 | ) 26 | -------------------------------------------------------------------------------- /source/native/src/main/kotlin/com/xayah/libnative/NativeLib.kt: -------------------------------------------------------------------------------- 1 | package com.xayah.libnative 2 | 3 | object NativeLib { 4 | external fun calculateSize(path: String): Long 5 | external fun getUidGid(path: String): IntArray 6 | } --------------------------------------------------------------------------------