From db1a1a5fc8069e9b65d7c0ee117e1ed350e226fa Mon Sep 17 00:00:00 2001 From: Anonymoussaurus <50231698+AnonymousWP@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:30:58 +0100 Subject: [PATCH 1/6] docs: remove explicit mention of 'GUI' It's unnecessary as everyone is already familiar with the name. Barely anyone uses the CLI-version now. --- LICENSE | 4 ++-- README.md | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) 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 From 53d852099873302cfbacc5c8c6b103474209cdd8 Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee Date: Thu, 4 Jan 2024 16:23:41 +0530 Subject: [PATCH 2/6] fix: grammar and repetitive descriptions --- resources/assets/uad_lists.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/assets/uad_lists.json b/resources/assets/uad_lists.json index 13a09f8..08c9f4c 100644 --- a/resources/assets/uad_lists.json +++ b/resources/assets/uad_lists.json @@ -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 flawlesly 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 related to wifi connection, usb tethering, auto and usage.\nEvery version has random code and app not running in the background.", "dependencies": [], "neededBy": [], "labels": [], From 69f35faa7ecf040d549f2ef3ef7d8e3714c6e845 Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee Date: Fri, 5 Jan 2024 09:21:00 +0530 Subject: [PATCH 3/6] fix: apply suggested changes --- resources/assets/uad_lists.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/assets/uad_lists.json b/resources/assets/uad_lists.json index 08c9f4c..39ee47e 100644 --- a/resources/assets/uad_lists.json +++ b/resources/assets/uad_lists.json @@ -9461,7 +9461,7 @@ { "id": "com.mediatek.dataprotection", "list": "Misc", - "description": "Possibly related to user partition encryption / decryption.\nA device should 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 has some important settings and configurations related 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 has some important settings and configurations related to android.", + "description": "It has some important settings and configurations related to Android.", "dependencies": [], "neededBy": [], "labels": [], @@ -9506,7 +9506,7 @@ { "id": "com.android.nearby.halfsheet", "list": "Aosp", - "description": "Useless frameworks related to wifi connection, usb tethering, auto and usage.\nEvery version has random code and app not running in the background.", + "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": [], From 8f66647ad2ea66b0eaa47f9d48ecbd0e8aa77414 Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee Date: Fri, 5 Jan 2024 10:23:36 +0530 Subject: [PATCH 4/6] refactor: use if-let binding for getting package attributes --- src/core/utils.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/utils.rs b/src/core/utils.rs index 5d94734..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) { From a1387edb42f3941861082486593269882450499d Mon Sep 17 00:00:00 2001 From: nain-F49FF806 <126972030+nain-F49FF806@users.noreply.github.com> Date: Sat, 6 Jan 2024 09:46:19 +0100 Subject: [PATCH 5/6] Update description of omcagent Remove confusing information, and add better description. --- resources/assets/uad_lists.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/uad_lists.json b/resources/assets/uad_lists.json index 39ee47e..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": [], From 6ffba9d40efad82c8129904ef38385c9ae30f288 Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee Date: Sat, 6 Jan 2024 14:35:02 +0530 Subject: [PATCH 6/6] refactor: select optional user based on sdk, then build request use the boolean .then_some method to create an `Option`al user based on the Android SDK, then build a request --- src/core/sync.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 {