I also encountered the same, what I did was export the list of packages to files and then automate the process of getting only all the uninstalled system packages using Python. Here is my Python script:
from pathlib import Path
downloads = Path("/storage/emulated/0/Download")
all_packages = downloads / "all_packages.txt"
debloated_system_packages = downloads / "debloated_system_packages.txt"
third_party_packages = downloads / "third_party_packages.txt"
bloatwares = downloads / "bloatwares.txt"9
def get_all_packages():
with open(all_packages, "r") as f:
all_packages_lines = f.readlines()
return {line.strip() for line in all_packages_lines}
def get_debloated_system_packages():
with open(debloated_system_packages, "r") as f:
debloated_system_packages_lines = f.readlines()
return {line.strip() for line in debloated_system_packages_lines}
def get_third_party_packages():
with open(third_party_packages, "r") as f:
third_party_packages_lines = f.readlines()
return {line.strip() for line in third_party_packages_lines}
def get_bloatwares():
with_bloatwares = get_all_packages() - get_third_party_packages()
return with_bloatwares - get_debloated_system_packages()
def write_bloatwares():
with open(bloatwares, "w") as f:
for i in sorted(list(get_bloatwares())):
f.write(i + "\n")
write_bloatwares()
Hint:
pm list packages -u > all_packages.txt
pm list packages -3 > third_party_packages.txt
pm list packages -s > debloated_system_packages.txt # as the name suggests this gives all the current packages without those bloatwares that I uninstalled.
I used the Pydroid app to run the code and all the text files are saved on my downloads folder.
Obviously, it needs a little bit of coding, but I hope this will give some idea in the future if anyone would need it.
Note: I used the Package Manager app from F-Droid to uninstall those bloatwares, aShell You app also from F-Droid to run adb commands which both require Shizuku app to run properly. You can search on how to set it up. You don't need a PC for Android 11 and up.