diff --git a/.github/workflows/build_artifacts.yml b/.github/workflows/build_artifacts.yml index 203794c..6c9515e 100644 --- a/.github/workflows/build_artifacts.yml +++ b/.github/workflows/build_artifacts.yml @@ -51,15 +51,15 @@ jobs: run: mkdir -p bin - name: Renaming binaries [Windows] if: matrix.os == 'windows-latest' - run: mv target/release/uad_gui.exe bin/uad_gui-${{ matrix.build_target }}${{ matrix.renderer }}.exe + run: mv target/release/uad-ng.exe bin/uad-ng-${{ matrix.build_target }}${{ matrix.renderer }}.exe - name: Renaming binaries [Others] if: matrix.os != 'windows-latest' - run: mv target/release/uad_gui bin/uad_gui${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }} + run: mv target/release/uad-ng bin/uad-ng${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }} - name: Tarball Linux/MacOS binary if: matrix.os != 'windows-latest' - run: tar -czf bin/uad_gui${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }}{.tar.gz,} + run: tar -czf bin/uad-ng${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }}{.tar.gz,} - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: uad_gui${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }} - path: bin/uad_gui-* + name: uad-ng${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }} + path: bin/uad-ng-* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdec1aa..fead483 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,16 +2,16 @@ name: Continuous Integration on: push: paths: - - "**.rs" - - "Cargo.lock" - - "Cargo.toml" - - "**.json" + - Cargo.lock + - Cargo.toml + - resources/assets/*.ttf + - src/** pull_request: paths: - - "**.rs" - - "Cargo.lock" - - "Cargo.toml" - - "**.json" + - Cargo.lock + - Cargo.toml + - resources/assets/*.ttf + - src/** jobs: lint: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f65581e..2d5905b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,10 @@ on: branches: - main paths: - - "**.rs" - - "Cargo.lock" - - "Cargo.toml" + - Cargo.lock + - Cargo.toml + - resources/assets/*.ttf + - src/** tags-ignore: - dev-build @@ -18,6 +19,7 @@ jobs: build: uses: ./.github/workflows/build_artifacts.yml release: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest needs: build permissions: @@ -29,11 +31,10 @@ jobs: with: path: bin - name: Create pre-release - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 with: body_path: ${{ github.workspace }}/CHANGELOG.md - files: bin/*/uad_gui-* + files: bin/*/uad-ng-* prerelease: true # - name: Update dev-build tag # if: ${{ github.event_name == 'push' }} @@ -47,6 +48,6 @@ jobs: # uses: softprops/action-gh-release@v1 # with: # generate_release_notes: true - # files: bin/*/uad_gui-* + # files: bin/*/uad-ng-* # prerelease: true # tag_name: ${{ env.dev_tag }} diff --git a/LICENSE b/LICENSE index 09820ab..e041ef8 100644 --- a/LICENSE +++ b/LICENSE @@ -631,7 +631,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Universal Android Debloater Next Generation GUI + Universal Android Debloater Next Generation Copyright (C) 2023 Universal Debloater Alliance This program is free software: you can redistribute it and/or modify @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Universal Android Debloater Next Generation GUI Copyright (C) 2021 W1nst0n + Universal Android Debloater Next Generation Copyright (C) 2023 Universal Debloater Alliance This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index f778f81..5946f35 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Universal Android Debloater Next Generation GUI +# Universal Android Debloater Next Generation **DISCLAIMER**: Use at your own risk. I am not responsible for anything that could happen to your phone. @@ -12,19 +12,12 @@ could happen to your phone. ## Summary -This is a complete rewrite in Rust of the [UAD project](https://gitlab.com/W1nst0n/universal-android-debloater), -which aims to improve privacy and battery performance by removing unnecessary -and obscure system apps. +This is a detached fork of the [UAD project](https://github.com/0x192/universal-android-debloater), which aims to improve privacy and battery performance by removing unnecessary and obscure system apps. This can also contribute to improving security by reducing [the attack surface](https://en.wikipedia.org/wiki/Attack_surface). -Packages are as well documented as possible to provide a better understanding -of what you can delete or not. The worst issue that could happen is removing -an essential system package needed during boot causing then an unfortunate -bootloop. After about 5 failed system boots, the phone will automatically reboot -in recovery mode, and you'll have to perform a FACTORY RESET. Make a backup first! +Packages are as well documented as possible to provide a better understanding of what you can delete or not. The worst issue that could happen is removing an essential system package needed during boot causing then an unfortunate bootloop. After about 5 failed system boots, the phone will automatically reboot in recovery mode, and you'll have to perform a FACTORY RESET. Make a backup first! -In any case, you **CANNOT** brick your device with this software! -That's the main point, right? +In any case, you **CANNOT** brick your device with this software! That's the main point, right? ## Features @@ -185,7 +178,7 @@ NB : System apps cannot truly be uninstalled without root (see the [FAQ](https:/

-- Download the latest release of UAD-ng GUI for your Operating System [here](https://github.com/Universal-Debloater-Alliance/universal-android-debloater/releases). Take the `opengl` version only if the default version (with a Vulkan backend) doesn't launch. +- Download the latest release of UAD-ng for your Operating System [here](https://github.com/Universal-Debloater-Alliance/universal-android-debloater/releases). Take the `opengl` version only if the default version (with a Vulkan backend) doesn't launch. **NOTE:** Chinese phone users may need to use the AOSP list to remove some stock apps because those Chinese manufacturers (especially Xiaomi and Huawei) have been diff --git a/resources/assets/uad_lists.json b/resources/assets/uad_lists.json index 13a09f8..817febc 100644 --- a/resources/assets/uad_lists.json +++ b/resources/assets/uad_lists.json @@ -4151,7 +4151,7 @@ { "id": "com.samsung.android.app.omcagent", "list": "Oem", - "description": "Open Market Customization Agent (AKA 'Recommended Apps')\nBy default, the device prevents from being customized by a source other than Knox Configure.\nhttps://docs.samsungknox.com/admin/knox-configure/normal-mode.html\n", + "description": "Open Market Customization Agent (AKA 'Recommended Apps')\nInstalls more Samsung \"Recommended Apps\" after device setup.", "dependencies": [], "neededBy": [], "labels": [], @@ -9461,7 +9461,7 @@ { "id": "com.mediatek.dataprotection", "list": "Misc", - "description": "It have stuff about encrypt, decrypt user partition.\nMy device works flawlesly without it.", + "description": "Possibly related to user partition encryption/decryption.\nA device should works flawlessly without it.", "dependencies": [], "neededBy": [], "labels": [], @@ -9479,7 +9479,7 @@ { "id": "android.overlay.common", "list": "Aosp", - "description": "It have some important settings configurations to android.", + "description": "It has some important settings and configurations related to Android.", "dependencies": [], "neededBy": [], "labels": [], @@ -9488,7 +9488,7 @@ { "id": "android.overlay.target", "list": "Aosp", - "description": "It have some important settings configurations to android.", + "description": "It has some important settings and configurations related to Android.", "dependencies": [], "neededBy": [], "labels": [], @@ -9497,7 +9497,7 @@ { "id": "android.qvaoverlay.common", "list": "Aosp", - "description": "It have nothing. This app is without code and safe to remove.", + "description": "This app has no code and is safe to remove.", "dependencies": [], "neededBy": [], "labels": [], @@ -9506,7 +9506,7 @@ { "id": "com.android.nearby.halfsheet", "list": "Aosp", - "description": "Useless frameworks to wifi connection, usb tethering, auto, usage.\nevery version have random code and app not running in the background.\nlooks like a very useless.", + "description": "Useless frameworks to Wi-Fi connections, USB tethering, auto, usage.\nEvery version has random code and the app is not running in the background.", "dependencies": [], "neededBy": [], "labels": [], @@ -30837,7 +30837,7 @@ { "id": "com.google.android.nearby.halfsheet", "list": "Aosp", - "description": "Useless frameworks to wifi connection, usb tethering, auto, usage.\nevery version have random code and app not running in the background.\nlooks like a very useless.", + "description": "Useless frameworks to Wi-Fi connections, USB tethering, auto, usage.\nEvery version has random code and the app is not running in the background.", "dependencies": [], "neededBy": [], "labels": [], diff --git a/src/core/sync.rs b/src/core/sync.rs index 84419d6..0c6ff1f 100644 --- a/src/core/sync.rs +++ b/src/core/sync.rs @@ -240,11 +240,8 @@ pub fn apply_pkg_state_commands( }, PackageState::All => vec![], }; - if phone.android_sdk < 21 { - request_builder(&commands, &package.name, None) - } else { - request_builder(&commands, &package.name, Some(selected_user)) - } + let user = (phone.android_sdk < 21).then_some(selected_user); + request_builder(&commands, &package.name, user) } pub fn request_builder(commands: &[&str], package: &str, user: Option<&User>) -> Vec { diff --git a/src/core/update.rs b/src/core/update.rs index ad68b2a..0a33a03 100644 --- a/src/core/update.rs +++ b/src/core/update.rs @@ -229,17 +229,17 @@ pub fn extract_binary_from_tar(archive_path: &Path, temp_file: &Path) -> io::Res pub const fn bin_name() -> &'static str { #[cfg(target_os = "windows")] { - "uad_gui.exe" + "uad-ng.exe" } #[cfg(target_os = "macos")] { - "uad_gui-macos" + "uad-ng-macos" } #[cfg(not(any(target_os = "macos", target_os = "windows")))] { - "uad_gui-linux" + "uad-ng-linux" } } diff --git a/src/core/utils.rs b/src/core/utils.rs index fab2794..70a4dfd 100644 --- a/src/core/utils.rs +++ b/src/core/utils.rs @@ -28,13 +28,12 @@ pub fn fetch_packages( uad_list = UadList::Unlisted; removal = Removal::Unlisted; - if uad_lists.contains_key(p_name) { - description = &uad_lists.get(p_name).unwrap().description; - if description.is_empty() { - description = "[No description] : CONTRIBUTION WELCOMED"; - }; - uad_list = uad_lists.get(p_name).unwrap().list; - removal = uad_lists.get(p_name).unwrap().removal; + if let Some(package) = uad_lists.get(p_name) { + if !package.description.is_empty() { + description = &package.description + } + uad_list = package.list; + removal = package.removal; } if enabled_system_packages.contains(p_name) { @@ -61,7 +60,7 @@ pub fn string_to_theme(theme: &str) -> Theme { } pub fn setup_uad_dir(dir: Option) -> PathBuf { - let dir = dir.unwrap().join("uad-ng"); + let dir = dir.unwrap().join("uad"); fs::create_dir_all(&dir).expect("Can't create cache directory"); dir } diff --git a/src/main.rs b/src/main.rs index 8f2b3d6..fac4894 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,13 +57,15 @@ pub fn setup_logger() -> Result<(), fern::InitError> { let file_dispatcher = fern::Dispatch::new() .format(make_formatter(false)) .level(default_log_level) - .level_for("uad_gui", log::LevelFilter::Debug) + // Rust compiler makes module names use _ instead of - + .level_for("uad_ng", log::LevelFilter::Debug) .chain(log_file); let stdout_dispatcher = fern::Dispatch::new() .format(make_formatter(true)) .level(default_log_level) - .level_for("uad_gui", log::LevelFilter::Warn) + // Rust compiler makes module names use _ instead of - + .level_for("uad_ng", log::LevelFilter::Warn) .chain(std::io::stdout()); fern::Dispatch::new()