{"id":15032243,"url":"https://github.com/aistra0528/hail","last_synced_at":"2025-05-13T21:09:03.496Z","repository":{"id":38038030,"uuid":"395236152","full_name":"aistra0528/Hail","owner":"aistra0528","description":"Disable / Hide / Suspend / Uninstall Android apps without root.","archived":false,"fork":false,"pushed_at":"2025-03-01T02:37:23.000Z","size":3721,"stargazers_count":3548,"open_issues_count":109,"forks_count":123,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-28T14:14:10.742Z","etag":null,"topics":["android","android-application","debloat","non-root","privacy","root","shizuku"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aistra0528.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"aistra0528","issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":"https://www.paypal.me/aistra0528"}},"created_at":"2021-08-12T07:39:40.000Z","updated_at":"2025-04-28T13:27:48.000Z","dependencies_parsed_at":"2023-12-23T05:19:45.338Z","dependency_job_id":"e08d1e2e-499b-42ea-9fd5-8fba9480f5fe","html_url":"https://github.com/aistra0528/Hail","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aistra0528%2FHail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aistra0528%2FHail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aistra0528%2FHail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aistra0528%2FHail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aistra0528","download_url":"https://codeload.github.com/aistra0528/Hail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326851,"owners_count":21571636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-application","debloat","non-root","privacy","root","shizuku"],"created_at":"2024-09-24T20:17:48.966Z","updated_at":"2025-04-28T14:14:17.122Z","avatar_url":"https://github.com/aistra0528.png","language":"Kotlin","funding_links":["https://liberapay.com/aistra0528","https://www.paypal.me/aistra0528"],"categories":[],"sub_categories":[],"readme":"简体中文 | [English](README_EN.md) | [日本語](README_JP.md)\n\n# 雹 Hail\n\n[![Android CI status](https://github.com/aistra0528/Hail/workflows/Android%20CI/badge.svg)](https://github.com/aistra0528/Hail/actions)\n[![翻译状态](https://hosted.weblate.org/widgets/hail/-/svg-badge.svg)](https://hosted.weblate.org/engage/hail/)\n[![Downloads](https://img.shields.io/github/downloads/aistra0528/Hail/total.svg)](https://github.com/aistra0528/Hail/releases)\n[![License](https://img.shields.io/github/license/aistra0528/Hail)](LICENSE)\n\n雹是一款用于冻结 Android 应用的自由软件。[GitHub Releases](https://github.com/aistra0528/Hail/releases)\n\n[\u003cimg src=\"https://fdroid.gitlab.io/artwork/badge/get-it-on.png\" alt=\"Get it on F-Droid\" height=\"80\"\u003e](https://f-droid.org/packages/com.aistra.hail/)\n\n\u003cimg src=\"fastlane/metadata/android/zh-CN/images/phoneScreenshots/1.png\" width=\"32%\" /\u003e \u003cimg src=\"fastlane/metadata/android/zh-CN/images/phoneScreenshots/2.png\" width=\"32%\" /\u003e \u003cimg src=\"fastlane/metadata/android/zh-CN/images/phoneScreenshots/3.png\" width=\"32%\" /\u003e\n\n## 冻结\n\n冻结`freeze`是一个营销用语，用于描述使**应用在用户不需要时不可运行**\n的行为，以此控制设备使用、减少内存占用和节省电量。用户可在需要时解冻`unfreeze`应用。\n\n在一般情况下，“冻结”是指停用，此外雹也可以通过隐藏和暂停来“冻结”应用。\n\n### 停用\n\n被停用`disable`的应用不会出现在启动器中。在已安装应用列表中会显示已停用`disabled`状态。启用`enable`应用即可恢复。\n\n### 隐藏\n\n被隐藏`hide`的应用不会出现在启动器和已安装应用列表中。取消隐藏`unhide`应用即可恢复。\n\n\u003e 在这种状态下，软件包几乎处于卸载状态，无法使用，但并没有删除数据或实际的软件包文件。\n\n### 暂停 (Android 7.0+)\n\n被暂停`suspend`的应用在启动器中会显示为灰度图标。取消暂停`unsuspend`应用即可恢复。\n\n\u003e 在这种状态下，应用程序的通知将被隐藏，任何启动活动将被停止，不能弹出提示、对话框或播放音频。\n\u003e 当用户试图启动一个暂停的应用程序时，系统将向用户显示一个对话框，告知他们在暂停状态下不能使用这个应用程序。\n\n暂停只会阻止用户与应用交互，而**不会**阻止应用在后台运行。\n\n## 工作模式\n\n**冻结的应用需要通过相同工作模式解冻。**\n\n1. 如果您的设备支持无线调试 (Android 11+) 或已 root，推荐选择`Shizuku`。\n\n2. 如果您的设备已 root，可选择`Root`。**此模式速度相对较慢。**\n\n| 授权方式                                                                                           | 强行停止 | 停用 | 隐藏 | 暂停 | 卸载/重新安装（系统应用） |\n|------------------------------------------------------------------------------------------------|------|----|----|----|---------------|\n| Root                                                                                           | ✓    | ✓  | ✓  | ✓  | ✓             |\n| 设备所有者                                                                                          | ✗    | ✗  | ✓  | ✓  | ✗             |\n| 特权系统应用                                                                                         | ✓    | ✓  | ✗  | ✗  | ✗             |\n| [Shizuku](https://github.com/RikkaApps/Shizuku) (root)/[Sui](https://github.com/RikkaApps/Sui) | ✓    | ✓  | ✓  | ✓  | ✓             |\n| [Shizuku](https://github.com/RikkaApps/Shizuku) (adb)                                          | ✓    | ✓  | ✗  | ✓  | ✓             |\n| [Dhizuku](https://github.com/iamr0s/Dhizuku)                                                   | ✗    | ✗  | ✓  | ✓  | ✗             |\n| [炼妖壶](https://github.com/oasisfeng/island)/[Insular](https://gitlab.com/secure-system/Insular) | ✗    | ✗  | ✓  | ✓  | ✗             |\n\n### 设备所有者\n\n**设置为设备所有者的应用需要移除设备所有者后方可卸载。**\n\n#### 通过 adb 将雹设置为设备所有者\n\n[Android 调试桥 (adb) 指南](https://developer.android.google.cn/studio/command-line/adb)\n\n[下载 Android SDK 平台工具](https://developer.android.google.cn/studio/releases/platform-tools)\n\n通过 adb 发出命令：\n\n```shell\nadb shell dpm set-device-owner com.aistra.hail/.receiver.DeviceAdminReceiver\n```\n\n设置成功后会输出以下信息：\n\n```\nSuccess: Device owner set to package com.aistra.hail\nActive admin set to component {com.aistra.hail/com.aistra.hail.receiver.DeviceAdminReceiver}\n```\n\n如输出其他信息，请使用搜索引擎自行查阅与解决。\n\n#### 移除雹的设备所有者\n\n设置 \u003e 移除设备所有者\n\n### 特权系统应用\n\n需要设置特许权限许可名单：\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cpermissions\u003e\n    \u003cprivapp-permissions package=\"com.aistra.hail\"\u003e\n        \u003cpermission name=\"android.permission.PACKAGE_USAGE_STATS\"/\u003e\n        \u003cpermission name=\"android.permission.FORCE_STOP_PACKAGES\"/\u003e\n        \u003cpermission name=\"android.permission.CHANGE_COMPONENT_ENABLED_STATE\"/\u003e\n        \u003cpermission name=\"android.permission.MANAGE_APP_OPS_MODES\"/\u003e\n    \u003c/privapp-permissions\u003e\n\u003c/permissions\u003e\n```\n\n并将雹安装为特权系统应用。\n\n推荐方法是在构建 ROM 时导入雹，`Android.bp`配置示例：\n\n```bp\nandroid_app_import {\n    name: \"Hail\",\n    apk: \"Hail.apk\",\n    privileged: true,\n\n    dex_preopt: {\n        enabled: false,\n    },\n    presigned: true,\n    preprocessed: true,\n\n    required: [\"privapp-permissions_com.aistra.hail.xml\"]\n}\n\nprebuilt_etc {\n    name: \"privapp-permissions_com.aistra.hail.xml\",\n    src: \"privapp-permissions.xml\",\n    sub_dir: \"permissions\",\n}\n```\n\n## 恢复\n\n### 通过 adb\n\n替换 com.package.name 为目标应用的包名。\n\n```shell\n# 启用应用\nadb shell pm enable com.package.name\n# 取消隐藏应用 (需要 root)\nadb shell su -c pm unhide com.package.name\n# 取消暂停应用\nadb shell pm unsuspend com.package.name\n```\n\n### 修改文件\n\n访问`/data/system/users/0/package-restrictions.xml`，此文件存储了应用限制相关信息。您可修改、重命名或直接删除此文件。\n\n- 启用应用：修改`enabled`属性为 2 (DISABLED) 或 3 (DISABLED_USER) 的值为 1 (ENABLED)\n\n- 取消隐藏应用：修改`hidden`属性为 true 的值为 false\n\n- 取消暂停应用：修改`suspended`属性为 true 的值为 false\n\n### 通过恢复模式清除数据 (wipe data)\n\n**希望您能谨慎地选择冻结应用，以免陷入此窘境。**\n\n## API\n\n```shell\nadb shell am start -a action -e key value\n```\n\n`action`可为：\n\n- `com.aistra.hail.action.LAUNCH`：解冻并启动目标应用。应用未冻结时会直接启动。`key=\"package\"` `value=\"com.package.name\"`\n\n- `com.aistra.hail.action.FREEZE`：冻结目标应用。应用需处于首页。`key=\"package\"` `value=\"com.package.name\"`\n\n- `com.aistra.hail.action.UNFREEZE`：解冻目标应用。`key=\"package\"` `value=\"com.package.name\"`\n\n- `com.aistra.hail.action.FREEZE_TAG`：冻结目标标签中的全部非白名单应用。`key=\"tag\"` `value=\"标签名\"`\n\n- `com.aistra.hail.action.UNFREEZE_TAG`：解冻目标标签中的全部应用。`key=\"tag\"` `value=\"标签名\"`\n\n- `com.aistra.hail.action.FREEZE_ALL`：冻结首页全部应用。无需`extra`。\n\n- `com.aistra.hail.action.UNFREEZE_ALL`：解冻首页全部应用。无需`extra`。\n\n- `com.aistra.hail.action.FREEZE_NON_WHITELISTED`：冻结首页全部非白名单应用。无需`extra`。\n\n- `com.aistra.hail.action.FREEZE_AUTO`：自动冻结首页应用。无需`extra`。\n\n- `com.aistra.hail.action.LOCK`：锁定屏幕。无需`extra`。\n\n- `com.aistra.hail.action.LOCK_FREEZE`：冻结首页全部应用并锁定屏幕。无需`extra`。\n\n## 协助翻译\n\n要将雹翻译成您的语言，或完善现有的翻译，请使用 [Weblate](https://hosted.weblate.org/engage/hail/)。\n\n[![翻译状态](https://hosted.weblate.org/widgets/hail/-/multi-auto.svg)](https://hosted.weblate.org/engage/hail/)\n\n## 许可证\n\n    Hail - Freeze Android apps\n    Copyright (C) 2021-2024 Aistra\n    Copyright (C) 2022-2024 Hail contributors\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faistra0528%2Fhail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faistra0528%2Fhail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faistra0528%2Fhail/lists"}