|
| 1 | +import os |
| 2 | +import sys |
| 3 | + |
| 4 | +sys.path.append(os.path.join(os.path.dirname(__file__), '..')) |
| 5 | + |
| 6 | +from core.bloatware_remover import BloatwareRemover |
| 7 | + |
| 8 | + |
| 9 | +class AsusRemover(BloatwareRemover): |
| 10 | + """Asus-specific bloatware remover""" |
| 11 | + |
| 12 | + def __init__(self, test_mode: bool = False): |
| 13 | + super().__init__('Asus', 'Asus/asus_config.json', test_mode) |
| 14 | + |
| 15 | + def _get_default_packages(self): |
| 16 | + return { |
| 17 | + "categories": { |
| 18 | + "zen_ui": [ |
| 19 | + {"name": "com.asus.launcher", "description": "ZenUI launcher", "risk": "caution"}, |
| 20 | + {"name": "com.asus.mobilemanager", "description": "Mobile Manager optimizer", "risk": "caution"}, |
| 21 | + {"name": "com.asus.filemanager", "description": "Asus File Manager", "risk": "safe"}, |
| 22 | + {"name": "com.asus.weather", "description": "Asus Weather widgets", "risk": "safe"}, |
| 23 | + ], |
| 24 | + "gaming": [ |
| 25 | + {"name": "com.asus.gamecenter", "description": "ROG Game Center hub", "risk": "safe"}, |
| 26 | + {"name": "com.asus.gamingfan", "description": "ROG gaming fan control", "risk": "dangerous"}, |
| 27 | + {"name": "com.asus.rogtheme", "description": "ROG theming pack", "risk": "safe"}, |
| 28 | + ], |
| 29 | + "preloads": [ |
| 30 | + {"name": "com.facebook.katana", "description": "Facebook client", "risk": "safe"}, |
| 31 | + {"name": "com.instagram.android", "description": "Instagram client", "risk": "safe"}, |
| 32 | + {"name": "com.netflix.partner.activation", "description": "Netflix activation", "risk": "caution"}, |
| 33 | + ], |
| 34 | + } |
| 35 | + } |
| 36 | + |
| 37 | + |
| 38 | +def main(): |
| 39 | + remover = AsusRemover() |
| 40 | + |
| 41 | + print("Asus Bloatware Removal Tool") |
| 42 | + print("1. Interactive removal (recommended)") |
| 43 | + print("2. List all apps and select what to remove") |
| 44 | + print("3. Manually remove by package or app name") |
| 45 | + print("4. Remove all configured packages") |
| 46 | + print("5. Exit") |
| 47 | + |
| 48 | + choice = input("Select option (1-5): ").strip() |
| 49 | + |
| 50 | + if choice == '1': |
| 51 | + remover.interactive_removal() |
| 52 | + elif choice == '2': |
| 53 | + print("This will list all installed applications on your device.") |
| 54 | + if input("Continue? (y/n): ").lower() == 'y': |
| 55 | + remover.list_all_apps_removal() |
| 56 | + elif choice == '3': |
| 57 | + remover.manual_package_removal() |
| 58 | + elif choice == '4': |
| 59 | + if input("This will remove ALL configured packages. Continue? (y/n): ").lower() == 'y': |
| 60 | + remover.remove_packages() |
| 61 | + elif choice == '5': |
| 62 | + print("Exiting...") |
| 63 | + else: |
| 64 | + print("Invalid choice") |
| 65 | + |
| 66 | + |
| 67 | +if __name__ == "__main__": |
| 68 | + main() |
0 commit comments