|
2 | 2 |
|
3 | 3 | This Magisk/KernelSU/APatch module patches the `packages.xml` and cleans the `packages-warnings.xml` files to address DroidGuard's `UNKNOWN_INSTALLED` status. This helps resolve issues related to app installation and verification on devices with Play Services. |
4 | 4 |
|
| 5 | +--- |
| 6 | + |
5 | 7 | ## Description |
6 | 8 |
|
7 | 9 | DroidGuard uses several attributes within the `packages.xml` file to track app installations. This module modifies these attributes to ensure that apps are recognized as properly installed, preventing the `UNKNOWN_INSTALLED` status and related problems. Specifically, it: |
8 | 10 |
|
9 | | -* Sets the `installer`, `installInitiator`, and `installerUid` attributes within each `<package>` tag in `packages.xml` to `com.android.vending` (the Google Play Store's package name identifier) and the corresponding user ID. This helps DroidGuard recognize the installation source as legitimate. |
10 | | -* Removes the `installOriginator` attribute, as it can sometimes cause conflicts. |
| 11 | +* Sets the **`installer`**, **`installInitiator`**, and **`installerUid`** attributes within each `<package>` tag in `packages.xml` to `com.android.vending` (the Google Play Store's package name identifier) and the corresponding user ID. This helps DroidGuard recognize the installation source as legitimate. |
| 12 | +* Removes the **`installOriginator`** attribute, as it can sometimes cause conflicts. |
| 13 | +* Removes the **`isOrphaned`** and **`installInitiatorUninstalled`** attributes if their values are set to `true`, as these can flag an app as incorrectly installed. |
| 14 | +* Changes the **`packageSource`** attribute to the constant value `2` (which represents **`PACKAGE_SOURCE_STORE`**). |
11 | 15 | * Cleans the `packages-warnings.xml` file by setting its content to an empty `<packages />` tag. This file can sometimes contain warnings that contribute to the `playProtectVerdict` issues. |
12 | 16 |
|
13 | 17 | This module uses `abx2xml` and `xml2abx` binaries if not in your system by default (provided by [rhythmcache/android-xml-converter](https://github.com/rhythmcache/android-xml-converter)) to convert between binary and text XML formats, as `packages.xml` is typically in binary XML format. The module includes architecture-specific binaries for `aarch64`, `armv7aeabi`, `i686`, and `x86_64`. |
14 | 18 |
|
15 | 19 | **Important Warning:** The environment check verdict modification implemented by this module is a relatively new technique. Google's implementation of this check is not yet robust enough to guarantee that all your packages will be correctly identified. It's possible that some apps might still trigger Play Protect warnings or behave unexpectedly, even after using this module. This is due to limitations and potential inconsistencies in how Google verifies app installations. Use this module with caution and be aware of the potential for these issues. |
16 | 20 |
|
| 21 | +--- |
| 22 | + |
17 | 23 | ## Installation |
18 | 24 |
|
19 | | -1. Install this module through Magisk Manager, KernelSU, or APatch. |
20 | | -2. Reboot your device for the changes to take effect. |
| 25 | +1. Install this module through Magisk Manager, KernelSU, or APatch. |
| 26 | +2. Reboot your device for the changes to take effect. |
21 | 27 |
|
22 | | -**Important:** Installation from recovery is *not* supported. You *must* install this module from within a running Android environment (Magisk/KernelSU/APatch). |
| 28 | +**Important:** Installation from recovery is **not** supported. You **must** install this module from within a running Android environment (Magisk/KernelSU/APatch). |
| 29 | + |
| 30 | +--- |
23 | 31 |
|
24 | 32 | ## Usage |
25 | 33 |
|
26 | 34 | This module works automatically upon installation and reboot. No further user interaction is required. It modifies the necessary XML files during the boot process. |
27 | 35 |
|
| 36 | +--- |
| 37 | + |
28 | 38 | ## Backups |
29 | 39 |
|
30 | 40 | The module creates backups of the original `packages.xml` and `packages-warnings.xml` files in `/data/adb/modules/BetterKnownInstalled/backup/` before making any changes. Up to five backups of each file type are kept, including the latest one. The backups are timestamped for easy identification. |
31 | 41 |
|
| 42 | +--- |
| 43 | + |
32 | 44 | ## Logging |
33 | 45 |
|
34 | 46 | The module logs its activity to `/data/adb/modules/BetterKnownInstalled/BetterKnownInstalled.log`. This log file can be helpful for troubleshooting. |
35 | 47 |
|
| 48 | +--- |
| 49 | + |
36 | 50 | ## Credits |
37 | 51 |
|
38 | 52 | * [rhythmcache aka winter](https://github.com/rhythmcache/android-xml-converter) for the `abx2xml` and `xml2abx` binaries. |
| 53 | +* [@gavdoc38](https://github.com/gavdoc38) for the PR updating problematic attributes. |
39 | 54 | * [@T3SL4](https://t.me/T3SL4) (Me) for creating this module. |
40 | 55 |
|
| 56 | +--- |
| 57 | + |
41 | 58 | ## License |
42 | 59 |
|
43 | 60 | This project is licensed under the terms of the GNU General Public License v3.0. See the [LICENSE](./LICENSE) file for details. |
0 commit comments