App Manager
用户手册
v4.0.2
17 四月 2025
Copyright © 2020–2025 Muntashir Al-Islam
睿智而缓慢。跑得快的人会跌倒。 —劳伦斯修士,罗密欧与朱丽叶
App Manager 是一个高级的 Android 包管理器。
它提供了许多功能,因此需要用户手册来帮助用户。本文档作为 App Manager
的用户手册,旨在描述 App Manager 提供的每一个功能。 本文档也可以被认为是
App Manager 的“官方”指南, 并代表了 App Manager
的预期行为。翻译对文档理解可能有误(原文是用英语写的)。
因此,有能力的用户应该阅读英文文档,以充分发挥文档 的作用。
可能还有其他非官方或第三方资源,如博客文章、视频、论坛、聊天、群组等。
虽然这些资源可能对很多人有用,但它们的内容可能跟不上最新的 App Manager
版本。 如果在 App Manager 中发现任何偏离本文档的情况,应在 App Manager
问题追踪进行报告。 AM — App Manager 应用 Block/Unblock — 用于拦截组件或解除组件拦截。
如何拦截取决于 用户选项。 IFW — Intent Firewall (意图防火墙) Ops — operations (操作), e.g. app ops, batch
ops, 1-click ops SAF — 存储访问框架(SAF)的缩写形式,Android
系统所用的抽象概念,允许应用无需担忧底层文件系统便能
使用或提供文件。 SSAID — Tracker — 在文档和 App Manager
中均表示跟踪器组件, scanner page
是个例外。
跟踪器包括用于报告崩溃、数据分析、用户画像、身份识别、广告和定位等目的的库文件。因此,这些库的功能并不相同。推广跟踪的
开源和闭源库之间不存在区别或偏向。 当前,支持的版本是 v4.0.1。 先前版本的 AppManager
可能包含安全漏洞,不应继续使用。 App Manager 通过以下渠道发布。 非官方来源可能分发 App Manager
的修改版本,使用这样版本的后果由你自己单独承担。 F-Droid 1 GitHub repository. Telegram. 除了GitHub外其他都是镜像链接。tags 应当始终是最新的,但 master
分支也许不是。 如果计划克隆 master 分支,请使用 GitHub
链接而不是其他链接。 App Manager 不接受通过 pull/merge 请求进行的翻译。 翻译通过 Hosted
Weblate 管理。 要翻译App Manager,请访问 https://hosted.weblate.org/engage/app-manager/。开始前请阅读
信息 部分。 用户可有通过多种方式作贡献,如创建有用 issues 、参加讨论、
改进文档和翻译、报告未知的库或跟踪器、 审查源代码以及报告安全漏洞。 在位于源码根目录下的BUILDING文件中可以获得编译教程。 除GitHub之外的仓库目前被视为镜像,在这些网站提交的 PR/MR 将不被接受.
2 相反,patches ( 注意. 至于通过电子邮件提交补丁,完整邮件对话在将来可能可以公开访问.
所以,请不要包含除了您的姓名和电子邮件地址之外的任何个人身份信息(PII). 截至2024年9月, 在另行通知前 App Manager 不接受经济支持。
但你仍可以向开发者赠送礼物(例如礼品卡、订阅、食物和饮料、鲜花甚至是现金)。
请用 §1.6
中给出的选项联系维护者以获得进一步帮助。 App Manager 社区1.1 术语
Settings.Secure.ANDROID_ID
- 分配给每个应用的设备标识符 (Android Oreo以上版本),
由应用签名与包android
的SSAID组合生成。
因此,除非用户选择格式化设备,否则它保证对每个应用来说都是独一无二的。
它被普遍用于跟踪用户。1.2 受支持的版本
1.3 官方来源
1.3.1
二进制(可执行)分发来源
Link: https://f-droid.org/packages/io.github.muntashirakon.AppManager
Normal releases: https://github.com/MuntashirAkon/AppManager/releases
Debug releases: https://github.com/MuntashirAkon/AppManager/actions
Normal releases: https://t.me/AppManagerChannel
Debug releases: https://t.me/AppManagerDebug1.3.2
源码链接
1.3.3
翻译
1.4 贡献
1.4.1
构建说明
1.4.2
提交补丁
.patch
文件)
可以通过电子邮件附件提交。请务必对Commits签名(Signing-off)
更多信息请参见位于源码根目录下的CONTRIBUTING文件.1.5 捐赠 & 资助
1.6 联系我们
邮箱: am4android [at] riseup
[dot] net
GitHub 账户: https://github.com/AMCommunity
Twitter/X 账户: https://x.com/AppManagerNews
Mastodon 账户: @appmanager@floss.social
Muntashir Al-Islam3
邮箱: muntashirakon [at]
riseup [dot] net
密钥指纹: 7bad37c2981e41f8f6abea7f58f0b4f26c346fce
GitHub 账户: https://github.com/MuntashirAkon
Twitter 账户: https://twitter.com/Muntashir
主页面列出所有已安装、已卸载和已备份的应用。
单独点击任何已安装的应用项目可打开相应的 应用详情页。
对于未安装的系统应用,会显示一个对话框提示,可以用来重新安装该应用。
使用列表选项中的 排序
,可以选择应用列表的排序方式,退出应用后仍会保留排序方式。
使用列表选项中的 过滤,可以过滤列表选项。
筛选也可以通过搜索栏进行过滤,并支持正则表达式。 批处理或者多应用处理也可以在这个页面内进行。
多选模式可以由点击任何应用图标或长按列表中的任意一项进入。
进入多选模式后,仅需单击列表中的任意一项便可选中,而不是打开应用程序详情页。
该模式下,批处理操作位于页面底部的多选菜单。操作包括: 将选中应用添加到 配置 备份、恢复或删除应用程序 阻止应用中的追踪器 清除应用数据或缓存 导出App Manager中的屏蔽规则 以MarkDown,CSV,JSON或XML格式导出应用列表 启用/停用/强制停止/卸载应用程序 对应用执行运行时优化 (Android 7 及更高版本) 阻止应用的后台操作 (Android 7 及更高版本) 导出APK文件到 设置联网规则 无障碍. 进入多选模式后, 可以使用键盘或遥控器的左右键呼出多选菜单。 红色 (日间模式下) / 深红色 (夜间模式下)
–已卸载的应用程序 浅红色 (日间模式下) / 暗红色 (夜间模式下) –
已停用的应用程序 暗青色 –
已强行停止的应用程序 黄色星标 – 可调试的应用程序 橙色 日期 –
可读取日志的应用程序 橙色 UID –
UID在多个应用程序中被共享 橙色 SDK –
使用明文网络通信(即 HTTP) 亮橙色 包名 –
有一个或多个跟踪器的应用程序 红色 应用标签 –
不允许清空数据的应用程序 暗青色 版本 –
未运行的应用程序 紫红色 –
常驻应用(即一直运行的应用程序) 红色 备份标识 –
已卸载的应用程序存在一个或多个备份 在App Manager中 橙色 备份标识 –
存在的备份已过期, 即基本备份中包含已安装应用程序的旧版本 暗青色 备份标识 –
存在的备份已更新,
即基本备份中包含已安装应用程序的相同版本或更高版本 一个应用程序可以是 用户 或 系统
应用,同时存在以下后缀: 版本名称有以下前缀:2.1.1
批处理
AppManager/apks
2.1.2
颜色代码含义
2.1.3
应用类型
X
– 支持多种架构0
– 应用程序中不存在dex文件°
– 已暂停的应用程序#
–
应用程序请求系统分配一个大堆,即大运行时内存?
– 应用程序请求虚拟机处于安全模式。2.1.4
版本信息
_
–
无硬件加速(减缓应用程序中的过渡动画或透明效果)~
– 仅用于测试的应用程序debug
– 可调试的应用程序
应用详情 页面由 11
个标签页组成。它描述了一个应用程序持有的几乎所有信息,
包括其清单中的所有属性、应用操作(App
Ops)、签名 信息、库等等。 本页中使用的颜色列表,以及对应的含义: 红色 (日间模式) / 深红色 (夜间模式) –
表示任何应用操作(App ops)或权限存在危险的标志(flag),或者任何组件在 App
Manager 中被阻止, 又或者是任何需要却又不受支持的功能特性。 亮红色 (日间模式) / 暗红色 (夜间模式) – 表示组件在 App
Manager 外被禁用,或任何不受支持的 可选功能特性。 注意. 标记为禁用(停用/阻止)的组件并不意味着它被用户禁用,它也可能被系统禁用,
或者在其清单(Android-Manifest.xml)中被标记为禁用(停用/阻止)。
被禁用(停用/阻止)的应用程序也会被系统(和App
Manager)视为禁用(停用/阻止)。 鲜橙色 (日间模式) / 暗橙色 (夜间模式) –
表示存在跟踪器组件 紫色 (日间模式) / 深紫色 (夜间模式) –
表示存在正在运行的服务。 绿色 – 表示当前应用程序中的所有跟踪器
已在 跟踪器指示器 标签页内被阻止。 应用信息 选项卡包含关于一个应用程序的基本信息,
许多操作可以在此标签中执行. 以下的列表与“应用信息”选项卡中列出的顺序相同。 应用图标:
应用程序的图标,若该应用程序没有图标,则显示系统默认图标。
可以轻轻点击图标,通过对比剪贴板中存储的 SHA 或 MD5 总和的方式进行 APK
签名验证。 应用标签: 应用程序的标签或名称。 包名:
应用程序包名,点击该包名可将其复制到剪切板。 版本: 版本分为两部分: 第一部分称
版本名(Version Name)。
格式各不相同,但常由多个以点分隔的整数组成。 第二部分称
版本代号。
其被第一个括号括起来。版本代号是一个整数,用于区分应用程序版本
(因为机器可能无法正确读取版本名)。简言之,新版本的应用程序具有比旧版本更高的版本代号。
例如,如果 标签:(也称作标签云)
标签包含应用程序最基本、最简洁、有用的信息。参阅 §2.2.2.2标签
内的完整标签列表。 水平操作面板
一个操作面板,由可以对应用程序执行的各种操作组成,参阅 §2.2.2.3水平操作面板
内的完整可用操作列表。 对于可用的其它操作列表,参阅 选项菜单。 路径与目录: 包含应用程序相关路径的各种信息,包括
应用目录 (存储 APK 文件的路径), 数据目录 (内部存储,
设备保护区以及外部存储) 和 JNI 库目录 (如果有). JNI (Java
Native Interface,Java本机接口) 库用于调用通常用 C/C++
编写的本机原生代码。使用本机原生库可以使应用程序运行得更快,或帮助应用程序使用非
Java 语言编写的第三方库,同大多数游戏中所做的一样。
通过单击每个目录项右侧的启动按钮,可以通过文件管理器打开目录,前提是它们提供相应的支持并被授予必要的权限。 数据使用: 操作系统报告的应用程序使用的数据量。
取决于 Android 版本,该项可能需要广泛的权限,包括 使用情况访问
权限和 电话 权限。 存储与缓存: 显示有关应用程序的大小(APK
文件、优化文件、数据和缓存)。
在旧设备中,还会显示外部数据、缓存、媒体和 OBB
文件夹的大小。如果在较新的设备中未授予 使用情况访问
权限,此部分将被隐藏。 更多信息 显示其他信息,例如– SDK 显示与 Android SDK 相关的信息: Max
表示目标SDK 而 Min 表示最小SDK(后者在 Android
5及更低版本中不可用)
如果目标SDK的值低于平台SDK的值(即当前操作系统支持的最大SDK的值),该应用程序会在兼容模式下运行。
这意味着应用程序可能有权访问某些不可用或者被较新版本的 Android
限制的功能, 这将导致安全和隐私问题。 SDK也被称作 API 级别 (API
Level), 另见: Android
版本历史 标志位(Flags):
构建应用程序时使用的应用标志,关于完整的标志列表及其作用,参阅官方文档。 安装日期: 首次安装应用程序的日期。 更新日期: 上次更新应用程序的日期。
如果应用程序尚未更新,该项与 安装日期 相同。 进程名 如果与包名不同的情况下,进程的名称。
进程名在应用程序被系统启动时被设置,而通常情况下
进程名与包名相同。 安装器应用 安装该应用程序的应用程序。
当安装该应用时,每次的安装器应用不总是会保持相同。 因为 Android
允许对此字段设置任意值。 在 Android
11及更高版本中,实际安装器应用会存储在系统,并可以通过点击
项目右侧的“信息”按钮访问。即使系统并未报告安装器应用(比如说,安装器应用被卸载或隐藏),
该字段也不会不可见。安装器应用可被系统授予额外的特殊权限
以控制它安装的应用程序的某种行为。 User ID: Android系统给应用设置的唯一用户ID.
对于共享应用,相同的用户 ID 被分配给具有相同 Shared User ID
的多个应用程序. User ID 系统设置的唯一的用户ID(User
ID,也被称作UID)并赋予应用程序。 对于共享的应用程序,多个持有相同的
Shared User ID 的应用程序 会被赋予同样的用户ID。 . Shared User ID
适用于共享同一个ID的应用程序们(它们之间的数据也是共享的)。
共享的应用程序们必须持有同样的 签名。 首选ABI:
此平台为此应用程序提供支持的架构。 Zygote 预加载名称: 负责预加载应用程序代码
和在所有使用应用 zygote 的隔离服务之间共享的数据。 隐藏 API 执行策略: 从 Android 9
开始,第三方应用程序无法通过隐藏 API 执行策略访问 Android
框架中的许多方法和类。 存在以下选项: 默认: 基于应用程序的类型。
对于系统应用程序,隐藏API执行策略应该被禁用;而对于其他应用,则应该被强制执行。 无或已禁用: 该应用可以像在 Android 9
之前一样完全访问隐藏的 API。 警告: 同上,只是每次应用程序访问隐藏 API
时都会记录警告。绝大多数情况下不使用。 强制执行:
无论是深灰名单还是黑名单,或者两者都是的应用程序无法访问隐藏的 API。
这是 Android 9 及更高版本中第三方应用程序的默认选项,除非该应用程序被
OEM 或供应商列入白名单。 警告. 隐藏 API 执行策略在 Android 中并没有被正确实现,
应用程序可以绕过它。因此,不应该信任此值。 SELinux: 操作系统通过 SELinux 设置的强制访问控制
(MAC) 策略。 主活动: 应用的主要入口点。 仅在应用程序具有 活动
并且其中任何一个都可以从启动器中打开时显示。
右侧也有一个启动按钮,可用于启动此活动。 如上节所述,水平滚动操作面板由各种与应用程序相关的操作组成,比如
– 启动: 启动该应用程序。
前提是要有一个可启动(打开)的 活动。 冻结: 冻结/禁用该应用程序。
若应用程序已被冻结/禁用或用户没有足够的权限,则不会显示该按钮。
冻结/禁用该应用程序后,其图标可能会从(启动器的)应用抽屉中被隐藏,这取决于其配置,该应用程序创建的快捷方式也可能被删除。
该应用程序可能只能通过 App Manager 、 卸载 根据提示卸载该应用程序。
在对话框提示中可以卸载系统应用程序的更新, 或者当 App Manager
被授予足够高的权限,抑或操作系统支持,
也可以选择仅卸载应用程序而不清除其数据和签名。
对于后者,如果再度安装该应用程序,安装的应用程序必须与之前已安装的应用程序的签名匹配。 提示. 对于重新安装具有不同签名的应用程序, 更好的方法是使用 App Manager
备份该应用程序的数据,然后在安装该应用程序后再还原数据,
而不是在卸载该应用程序的过程中选择保留该应用程序的数据和签名,
因为该操作在将来可能会导致未定义的行为的问题。 解冻 解除冻结/重新启用该应用程序。
若应用程序已被解冻/启用或用户没有足够的权限,则不会显示该按钮。 与
冻结
按钮类似,长按该按钮以打开一个可创建用于快速冻结/禁用或解冻/重新启用该应用程序的快捷方式的对话框。 强行停止: 强行停止该应用程序。 清除数据:
清除应用程序的数据,清除包括存储在应用内部和(仅 Android 10
以上)外部目录中的任何应用数据,包括帐户(如果由应用设置)、缓存等。
例如,清除 App Manager 的数据将会删除所有保存在 App Manager
内的规则(但不会清除或重置在 App Manager
内设置的已阻止组件的状态),因此你需要随时备份你在 App Manager
内设置的规则。若用户没有足够的权限,则不会显示该按钮。 清除缓存:
清除应用程序的缓存。若该应用程序在操作过程中处于正在运行的状态,则缓存可能无法如预期般被清除。 安装:
安装该应用程序。此按钮仅在该应用程序尚未安装时显示。 新版变化 (What’s New):
若当前已安装的是该外部应用程序的旧版本,则会显示该按钮。
点击该按钮以打开一个包含该版本和已安装版本在版本控制行为上的变化(差异)对比的对话框。
变化包括:版本,跟踪器, 权限, 组件,
签名 (当校验值改变时显示), 功能特性, 共享库
与 SDK。 更新:
若该应用程序的版本代号高于已安装的应用程序,则会显示该按钮。 重装:
若该应用程序与已安装的应用程序具有相同的版本代号,则会显示该按钮。 降级:
若该应用程序的版本代号低于已安装的应用程序,则会显示该按钮。 应用清单(Manifest):
点击该按钮以在单独的页面中显示该应用程序的清单文件。
若该应用程序存在一个或多个拆分,则会显示拆分的 APK 文件列表。
点击其中任意一项以打开相应的清单文件。 扫描器: 扫描该应用程序以列出潜在的跟踪器和库。
若已配置并处于可用状态,它还会使用VirusTotal扫描文件,并从Pithus中获得结果, 另见: 扫描器页面 。 共享首选项:
显示该应用程序使用的共享首选项(Shared-Preferences)列表。
点击列表中的首选项将打开共享首选项编辑器。该按钮仅在用户拥有足够的权限时才会显示。 数据库: 显示该应用程序使用的数据库列表。
点击其中任意一项将打开可用于打开数据库的活动列表。
该按钮仅在用户拥有足够的权限时才会显示。 F-Droid: 在你常用的F-Droid
客户端中打开该应用程序。 Store: 在 Aurora
Store打开该应用程序。该按钮仅在已安装 Aurora Store
时显示。 默认情况下,Termux
不允许运行来自第三方应用的命令。要使用此选项,请使用 Termux v0.96
以上版本,并且必须在 Info. 启用此选项不会削弱Termux的安全性。
第三方应用仍然需要取得用户允许才能在Termux中运行任意命令。 活动(Activities)、服务(Services)、接收器
(即广播接收器) 和 提供者 (例如内容提供者)
统称为应用程序组件, 因为它们提供类似的功能并共享类似的属性,
例如它们都有一个 名称、 标签、 图标、
可被启用或禁用、并且通过 意图(Intent) 执行。
应用程序组件是应用的组成部分, 必须在应用程序清单中声明
(也有一些例外情况)。 应用程序清单是存储应用程序特定元数据的文件,Android
通过读取元数据来处理应用。 这些选项卡中使用的颜色在 §2.2.1应用详情颜色代码
中进行了解释。 也可以通过位于三点菜单的 排序
选项,对组件列表进行排序,
以在列表顶部显示已阻止组件或者跟踪器组件。 活动 (Activity) 是可被 Android
系统唯一标识的窗口或页面 (如主页 和 应用详情页
是两个活动)。 每个活动可以有多个 UI 组件,称为 部件(widgets) 或
碎片(fragments), 每个组件都可以嵌套或放置在彼此之上。
开发者还可以选择使用名为意图过滤器(intent filters) 的方法在活动
(Activity)中打开外部文件、链接等。 例如,当你使用文件管理器打开文件时,
文件管理器或操作系统通过应用包管理器 (PackageManager) 扫描意图过滤器
以查找能够打开文件的活动,并列出它们,你可以选择打开该文件的方式
(活动)。 标记为 exportable (可导出)
的活动通常可被任意第三方应用程序打开。
然而,有些活动可能需要权限,只有拥有这些权限的应用程序才能打开这些活动。
在 活动 选项卡中,可通过 启动
按钮启动某些活动。 若有必要可提供诸如意图 (Intent)的附加功能
(extras)、数据 (data)或 Action (动作)等额外信息 (参数), 则可通过长按
启动 按钮以打开提供该功能的 活动拦截器 页面。 提示. 无 Root 用户可通过 ADB 授予
注意. 若启动活动时抛出错误 (异常),很可能是它具有某些未满足的依赖项目
(例如无法通过启动按钮打开 App Manager 的 应用详情页 ,
因为该活动需要提供一个包名 (在缺少包名的情况下打开 App Manager
的应用详情页没有意义)。
由于无法有章法的推断这些依赖关系,默认情况下可能无法通过 App Manager
打开这些活动。 也可通过 创建快捷方式 按钮创建活动的快捷方式。
如果你需要提供额外信息 (参数),
那么可通过活动拦截器页面创建快捷方式。 警告. 如果你卸载了 App Manager,那么所有由 App Manager
创建的快捷方式都将被移除。 不同于用户能看见的 活动,服务
处理后台任务。 比如当你正在使用手机 Internet 浏览器从 Internet
下载视频时, 该Internet 浏览器会使用 前台服务 下载内容。 当一个活动被关闭或从 最近任务
页面被移除,它可能会被立刻销毁。
这取决于手机可用的内存、电池统计或者该活动的配置情况。
但是如果你想,服务可以一直运行下去。
如果有多个在后台运行的服务,由于内存减少或者处理能力下降,
手机会变得很卡很慢, 与此同时手机电量会被消耗得更快。较新版本的 Android
推出了电池优化功能,并对所有应用默认开启。
当该功能被启用时,系统能够根据系统拥有的资源量或服务请求,随机终止任意服务。
但是,前台服务(即发送固定通知的服务,比如说音乐播放器、下载器)在通常情况下不会被终止,
除非系统资源(内存,电量等)严重不足。
某些原厂系统能提供更为强势激进的优化, 比如说MIUI
有一个非常有名又强势的优化功能,即 MIUI 优化。 活动和服务都运行在同一套 looper
,称之为主looper,
意味着服务并非真正在后台运行,而是需要开发者确认的任务。
至于应用程序是如何通过服务进行交流的? 是通过 广播接收器 或者 Binder
进行通信的。 接收器 (也被称作 广播接收器)
可以用于在某些事件发生时触发某些任务的执行。
由于这些组件在接收到广播信息时被执行,故被称作广播接收器。
这些广播消息通过名为 意图 (Intent) 的方法发送。 意图 (Intent)
是 Android
的特殊功能,可用于打开应用程序(即活动)、运行服务和发送广播消息。
因此,像 活动和广播接收器会使用
意图过滤器 接收需要的广播消息。
广播消息可以被系统或应用程序自身发送。当广播消息被发送时,
相应的接收器会被系统激活,这样它们就能执行任务。
举个例子,如果你的手机资源不足,在你启用数据流量或连接至Wi-Fi时,
手机可能会有片刻无响应或变得很卡。
这是因为一旦数据连接被启用,可以接收 接收器也可被用于 IPC (Inter-Process Communication,进程间通信),即
用于多个应用程序间交流(通信),甚至用于同一应用程序下不同组件的通信。 提供者主要用于数据管理。 比如,当你使用 App Manager
保存 APK 文件或导出规则时会使用名为 与在这些标签面前只能当个看客的无 Root 用户不同,Root
用户可以执行各种操作。 在每个组件项目的最右侧,都有一个开关,可用于切换该组件的阻止状态。 若
即时组件阻止 未启用
或者之前从未对此应用程序应用阻止规则, 则需要通过三点菜单中的
应用规则 选项应用这些更改。 也可通过同样的选项
(这次会显示为 移除规则 )移除已经应用的规则。 也可长按按钮,以阻止使用一个或多个方法的组件。 另见: FAQ:
应用组件 可通过使用三点菜单中的 阻止跟踪器
选项,对跟踪器组件进行阻止。
无论当前你在哪个标签页中,所有的跟踪器组件都会被阻止。 Info. 跟踪器组件是应用组件的一个子集。
因此,阻止跟踪器组件与阻止其他任意组件使用的方法相同。 App Ops, 使用权限 and
权限 选项卡与权限相关。 安卓中,在不具有相同身份(称为
shared
ID)的应用或进程之间进行通信常常需要权限,其由权限控制器管理。
一些被视为普通
的权限,若它们出现在应用程序清单中,则会自动授予,但危险权限 和
开发 权限需要用户确认。 选项卡中使用的颜色在 §[subsec:app-details-color-codes]
中有解释。 App Ops 代表"应用操作 (Application
Operations) "。 自 Android 4.3 起,Android 通过使用 App
Ops 控制诸多系统权限, 每个 App Op
都有一个与之关联的唯一编号,该编号与其私有名称一同显示在“App
Ops”选项卡中, 一些 App Ops 也有一个公共名称。 许多 App Ops 与
权限 相关。 在此选项卡中,若 App Ops 相关的权限被视为危险,则该
App Ops 会被标记为危险。 其他信息如 标志位 (flags) 、
权限名称 、 权限描述 、 包名 、 群组
也取自相关的 权限。
其他信息可能包含以下内容: 模式(Mode):描述了当前授权状态,可以是“允许
(allow)”、“拒绝 (deny)” (实际为错误)、 “忽略
(ignore)” (实际为拒绝) 、 “默认 (default)” (从手机供应商或
AOSP 内部设置的默认列表推断) 、 “前台 (foreground)” (在较新的
Android 版本中,应用只能在前台运行时才能使用该 App Op) ,
以及一些由供应商设定的模式 (例如 MIUI 使用 询问
(ask))。 时长 (Duration):该 App Op 现已使用的时间
(可能为负,原因未知)。 允许时刻 (Accept Time): 上一次该 App Op
被允许的时刻。 拒绝时刻 (Reject Time): 上一次该 App Op
被拒绝的时刻。 提示. 若 每个 App Op 项都有切换按钮,可用于允许或拒绝 (忽略) 该App Op。
其他受支持的模式也可以通过长按切换按钮进行设置。 若选项卡中未列出所需的
App Op,则可使用菜单中的 设置自定义 App Op。
菜单中的重置为默认 选项可用于重置对 App Ops 的更改,
或使用菜单中相关选项拒绝所有危险的 App Ops。 受限于 App Ops
的工作方式,系统可能需要一段时间应用它们 (让这些更改生效)。 注意. 拒绝某些 App Ops 可能会导致应用程序行为异常。
若所有方式都失败,万不得已时可尝试使用 重置为默认 选项。 可以以升序方式按 App Ops 名称和其相关编号 (或值)对列表排序,
也可通过相应的排序选项优先显示拒绝的 App Ops。 另见: 附录: App
Ops 预定义权限(Uses Permissions)
是应用(申请)所使用的权限。 这些权限在应用程序清单中通过使用
特权用户可通过点击每个权限右侧的切换按钮授予或撤销 危险
(dangerous) 和 开发 (development) 权限,
也可以使用菜单中的相应选项撤销危险权限。 因为 Android 不允许修改 普通
(normal)
权限(其中大多数是该类权限),只能撤销以上两种类别的权限。 也可尝试编辑
提示. 由于系统默认撤销危险权限,
因此撤销所有危险权限与重置所有权限一致。 可以以升序方式按权限名称对列表进行排序,
也可通过菜单中相应的选项优先显示拒绝的权限。 (自定义)权限
通常是应用自身定义的自定义权限,包括该应用声明的、标记为"内部(
Internal)" 权限,其他应用声明、标记为"外部(
External)"的权限。外部权限在应用程序组件中指定为依赖项,即应用只有在拥有指定的权限时才能调用该组件: 名称 每个权限都有的唯一的名称,如
图标
每个权限都可以有一个自定义图标,其他权限选项卡没有任何图标,因为它们在应用程序清单中不包含任何图标。 描述
描述权限的可选字段,若没有与权限关联的任何描述,则不会显示该字段。 标志位(Flags) 使用标志符号或
保护名称(Protection Level) 名称描述权限, 诸如 普通
normal、开发 development、危险
dangerous,、即时 instant, 已授权
granted、已撤销 revoked、签名 signature、特权
privileged 等。 包名
表示与权限关联的包名,即定义权限的包名。 群组(Group)
与权限关联的群组(如果有),几个相关的权限通常可以组合在一起。 签名 实际上被称作签名信息。
一个应用程序在发布前,会被开发者用一个或多个签名密钥对该应用程序进行签名。
一个应用程序的完整性,即该应用程序是否来自实际开发者且未被其他人改动,
可通过使用内置在 APK 文件中的签名证书进行校验。
这是因为当一个应用程序被未经授权的实体改动时,由于签名密钥对该实体而言是未知的,
该应用程序就已经无法使用源签名密钥进行签名了。
一种验证应用程序完整性的方式就是验证证书生成的检验和 (checksums)。
若开发者提供签名证书的检验和,则它们可以 通过 签名
标签页生成的检验和进行比较的方式校验该应用程序。 举个例子,如果你从
GitHub 或 Telegram 频道中下载了 App Manager, 你可以通过简单匹配
SHA256 检验和与显示在此标签的这一个作比较,
以验证该应用程序是否真是由我发布: 在此标签页中,使用了几种哈希算法以生成校验和, 包括 MD5 、
SHA1 、 SHA256 和 SHA512。 小心. 签名信息应当通过可靠的散列算法进行验证,例如 SHA256。
请勿依靠 MD5 或 SHA1 校验和,因为它们可以为多个证书
生成相同的校验和。 使用功能
该标签页列出了由该应用程序声称的功能列表,比如 OpenGL ES、电话和
leanback。
应用程序可能需要某些功能,而有些功能对应用程序而言则是可选的。
所需功能必须与所需版本一起存在于系统中。
否则,任何安装应用程序的尝试会被系统拒绝。 用于此标签的颜色在 §2.2.1
有详细解释。 配置 标签页列出了应用程序需要的配置, 比如输入法类型
(qwerty、12键),触屏方式 (手指、触摸笔等等),以及导航方式
(拨号盘、跟踪球、滚轮)
对绝大多数应用程序而言,该标签页将会是空页面。2.2.1
颜色代码含义
2.2.2
应用信息
2.2.2.1 基本信息
123
和 125
是同一个应用程序的两个版本代号,我们可以说后者比前者更新(后者的版本代号更高)。
当为同一版本的应用程序提供不同的 APK
文件,并在不同平台(移动端、平板、桌面等)或架构(32/64 位、ARM 或
Intel)上运行时,版本号可能会产生误导,因为通常应用程序提供商会为每个平台添加前缀以作区分。2.2.2.3 水平操作面板
pm
命令或其他任意提供此功能的工具解冻/重新启用。
长按该按钮以打开一个可创建用于快速冻结/禁用或解冻/重新启用该应用程序的快捷方式的对话框。2.2.2.5 配置 Termux
~/.termux/termux.properties
中添加
allow-external-apps=true
。2.2.3
组件选项卡
2.2.3.1 活动 (Activity)
android.permission.WRITE_SECURE_SETTINGS
权限 以打开
不可导出的 活动。2.2.3.2 服务 (Services)
2.2.3.3 (广播)接收器
((Broadcast)Receiver)
android.net.conn.CONNECTIVITY_CHANGE
的广播接收器将被系统激活。
由于很多应用程序通常情况下都会使用该意图过滤器,这些应用几乎都会立刻被系统激活,这就导致了手机的无响应或卡顿。2.2.3.4 (内容)提供者
((Content)Providers)
.fm.FmProvider
的内容提供者以保存 APK 或导出规则。 Android
中存在很多的提供者,包括这个由系统提供的
可被用于管理多个内容相关的任务,比如说数据库管理、跟踪、搜索等。
每个提供者有一个名为 Authority (授权) 的字段, 该字段对于整个
Android 生态系统中的应用程序来说是唯一的,就像包名一样。2.2.3.5
针对已root的手机的额外功能
2.2.3.5.1 拦截组件。
2.2.3.5.2 拦截跟踪器。
2.2.4
权限选项卡
2.2.4.1 App Ops
android.permission.GET_APP_OPS_STATS
由
ADB授予,则该选项卡的内容对非 Root 用户可见。2.2.4.2 使用权限
uses-permission
标签声明。 诸如 "标志位
(flags)"、"权限名 (permission name)"、"权限描述
(permission description)"、 "包名 ( package
name)"、"群组 (group)" 此类的信息也取自其相关权限。runtime-permissions.xml
以撤销这些权限,
但是否可行尚不明确。2.2.4.3 权限
android.permission.INTERNET
,但多个应用可以请求同一个权限。2.2.5
签名选项卡
320c0c0fe8cef873f2b554cb88c837f1512589dcced50c5b25c43c04596760ab
2.2.6
使用特性选项卡
2.2.7
配置选项卡
该页面在选择 主菜单 中的
一键操作选项 时显示。 该选项可被用于阻止或解除阻止已安装应用程序的广告/跟踪器组件。
选择此项时,App Manager
会询问是否需要列出所有应用程序的跟踪器,或者仅列出用户应用程序的跟踪器。
新手用户应避免阻止系统应用程序的跟踪器以避免产生不良后果。
之后会弹出多选对话框,以将排除一个或多个应用程序从该操作中排除。 当按下
阻止 或 解除阻止 按钮时,这些变更会立刻生效。 注意. 某些应用程序在禁用它们的跟踪器以后,可能无法如预期般运行。
若出现这种情况, 请移除所有阻止规则, 或者打开对应应用的 应用详情页
,将组件标签页中被阻止的规则逐个移除。 另见: 应用详情页:阻止跟踪器 该选项用于阻止某些应用程序的组件,而判断依据是它们的签名。
一个组件的签名是组件的全称或部分名称。
安全起见,推荐在每一部分的签名结尾添加 小心. 如果你并不知道通过签名阻止应用程序组件的后果是什么,你应当避免使用该功能。
因为该功能使用不当可能会导致手机 bootloop
(引导循环,具体现象就是手机不断重启并卡在开机第一屏或开机动画,但就是无法进入系统)
或者变砖
(除了通过特殊按键组合进入某些特殊模式外,手机保持黑屏状态),最终你可能要执行恢复出厂设置。 该选项用于对所有或者已选中的应用程序配置某些 应用操作 (App Ops)。
存在两个字段,第一个字段用于插入多个被空格隔开的应用操作常量
(名称或值)。
由于可用的应用操作因设备和操作系统而异,并非所有的应用操作常量都能被事先了解。.
需要的应用操作常量可在位于 应用详情页 中的 App Ops
标签页内查阅。 第二个字段可用于插入或根据特定的应用操作选择 模式。 小心. 除非你熟悉 App Ops (应用操作)
和阻止它们的后果,你应该避免使用该选项。 一键备份操作。以防万一,在执行任何操作前会列出所有受影响的备份。 备份所有的已安装的应用程序。 重新备份所有已安装且之前备份过的应用程序。 备份所有已安装但尚未备份的应用程序。 验证已安装的应用程序的近期备份,并在必要时重新备份。 若某应用在上次备份后有所变化,则重新备份该应用。
通过检查一系列指标判断该应用是否发生变化,包括应用程序版本、最后更新日期、最后启动日期、完整性和文件哈希值。
目录哈希值会在备份过程中被计算并存储在数据库中。
在执行此操作时,会计算新的哈希值,并比较存储在数据库中的该项。 一键还原。以防万一,在执行任何操作前会列出所有受影响的备份。 还原 基本备份 中所有已备份的应用程序。 还原 基本备份
中所有已备份的应用程序中尚未安装的应用程序。 还原 基本备份
中版本代号比已安装应用程序的版本代号高的应用程序。 清除所有应用程序的缓存,包括 Android 系统。在执行此操作期间,
所有正在运行的应用程序的缓存可能不会如预期般被清除。2.3.1
阻止/取消阻止跟踪器
2.3.2
阻止组件…
.
(点),
因为底层算法以贪婪的方式搜索和匹配组件。
也可以插入多个签名,在这种情况下,所有签名都要被空格隔开。
类似于上面的选项,此处也会提供对系统应用程序应用阻止的选项。2.3.3
设置 App Ops 模式
…
2.3.4
备份
2.3.4.0.1 备份所有应用
2.3.4.0.2 重新备份现有备份
2.3.4.0.3 备份无备份应用
2.3.4.0.4 验证和重新备份
2.3.4.0.5 备份发生变化的应用
2.3.5
恢复
2.3.5.0.1 还原所有应用
2.3.5.0.2 还原未安装应用
2.3.5.0.3 还原最新备份
2.3.6
清理所有应用的缓存
配置文件页面可通过主菜单的 选项菜单 访问。 页面主要展示了已配置的文件列表以及对其进行操作的常规选项。 新配置文件也可通过位于底部右下角的 加号 按钮进行添加。 配置文件可以被导入、复制或删除。 单击配置文件项目以打开其 配置文件页面。
配置文件页面显示配置文件的配置信息。也提供相应的选项以编辑它们。 应用标签页会列出所有为该配置文件配置的包。
包可以通过位于屏幕底部附近的 添加 按钮添加或移除。
一个包可以通过长按该按钮的方式移除 (以防万一,会弹出一个仅显示
删除 选项的对话框)。 配置标签可用于配置选中的包。 该配置文件的唯一ID,目前是基于配置文件名设置。
该配置文件ID可被第三方应用程序用于 触发配置文件 。 这是会显示在 配置文件页面 的文本。
若并未设置,则会显示当前配置信息。 表示默认情况下某些配置文件选项的行为方式。 例如,若 禁用
选项被打开,则状态为 开 的应用程序会被禁用,状态为 关
的会被启用。 目前此项仅支持取值 开 和 关 。 选择需要应用配置文件的用户。默认情况下会选择所有用户。 该行为与位于一键操作页面中的 阻止组件… 选项的行为相同。
然而,此处的阻止操作仅对选中的包生效。 若 状态 为
开,则组件会被阻止。 若其状态为
关,则组件会被解除阻止。 该选项可通过单击输入对话框中的
禁用 按钮禁用 (无论被插入何值)。 另见: 什么是应用组件? 该行为与位于一键操作页面中的 设置 App Ops(应用操作)
模式… 选项的行为相同。 然而,此处的操作仅对选中的包生效。 若 状态 为 开,则应用操作(App
Ops)会被拒绝 (即忽略)。 若其状态为 关,则应用操作(App
Ops)会被允许。 该选项可通过单击输入对话框中的 禁用 按钮禁用
(无论被插入何值)。 该选项用于对被选中的包授予或撤销某些权限。与其他选项类似,权限必须用空格隔开。
若 状态 为
开,则权限会被撤销。 若其状态为 关,则权限会被允许。
该选项可通过单击输入对话框中的 禁用 按钮禁用
(无论被插入何值)。 该选项用于对被选中的应用程序和其数据进行备份或还原。 提供两个选项:
备份选项 和 备份名称 。 备份选项 与备份/还原功能中的 备份选项 相同。
若没有设置,则使用默认选项。 备份名称
为备份设置自定义名称。若已经设置了备份名称,则每次备份都会沿用该名称。
每个备份名称后都会被赋予唯一的名称作为后缀。该行为将在未来的正式版被修复。
对于通常的“基本”备份,此区域会留空 (也请确保不要在备份选项中开启
多个备份 )。 若 状态 为
开,则包会被备份。 若其状态为 关,则包会被还原。
该选项可通过单击输入对话框中的 禁用 按钮禁用
(无论被插入何值)。 危险. 此选项尚未实现。 允许根据 状态
的值冻结或解冻选中的包。 若状态为 开,则包会被冻结。若状态为
关,则包会被解冻。 允许被选中的包被强行停止。 为被选中的包启用清除缓存。 为选中的包启用清除数据。 根据 状态
的值对选中的包的跟踪器组件启用阻止或解除阻止。 若状态为 开
,则跟踪器会被阻止;若状态为 关 ,则跟踪器会被解除阻止。 对在 2.5.2
应用程序选项卡
2.5.3
配置选项卡
2.5.3.1 配置文件ID
2.5.3.2 备注
2.5.3.3 状态
2.5.3.4 用户
2.5.3.5 组件
2.5.3.6 AppOps 权限
2.5.3.7 权限
2.5.3.8 备份/恢复
2.5.3.9 导出屏蔽规则
2.5.3.10 冻结
2.5.3.11 强制停止
2.5.3.12 清除缓存
2.5.3.13 清除数据
2.5.3.14 阻止跟踪器
2.5.3.15 保存APK
AppManager/apks
(或在设置页面中被选中的目录)
中被选中的包启用导出 APK 文件。
设置页面可被用于个性化 App Manager 的行为。 配置应用内语言。App Manager 目前支持 22 种语言。 配置应用内主题。 使用纯黑色的背景,而不是Material 主题背景。 更改布局方向,从左到右或者从右到左。
通常情况下由选择的语言决定,但不是每个人都有相同的方向习惯。 启用或禁用 App Manager 中的某些功能,如 拦截器 Manifest 查看器 扫描器 包安装器 使用情况. 如关闭此功能,App Manager 永远不会请求
使用情况 权限. 日志查看器 App Explorer. “探索” 选项在尝试打开 APK
文件时不可用。 App info. 尝试打开 APK 文件时会显示
“应用信息”选项 代码编辑器 VirusTotal 当设置了屏幕锁定时,使用 Android 屏幕锁定的设置锁定 App Manager。 警告. 若启用该设置后,屏幕锁定在 Android
中被禁用/移除,则直到再度启用屏幕锁定前 App Manager 将无法被打开。 App Manager 在后台运行时会减少初始化延迟。 对缓解某些设备频繁断开
ADB连接的问题而言,这也很有用。 在 App Manager 中激活网络功能。 目前包括在 扫描器页面中进行扫描的 VirusTotal 和
Pithus。 该设置允许第三方应用程序获得某些功能的访问权限,比如说配置文件。 操作模式定义了 App Manager 整体的工作模式,其有以下选项: 自动 让 App Manager 决定最佳选项。
尽管这是默认选项,对于无 Root 用户而言应该使用 无 Root
模式。 Root 以 Root 模式运行 App Manager。若未检测到
Root 权限,App Manager 会回退至 无 Root
模式。在极少数个例中,当通过 Root 发起的 Binder 通信被禁用时 (例如 Phh
SuperUser),App Manager 也会回退至 无 Root 模式。 TCP 启动 ADB 通过 TCP 启动 ADB 的方式,在 ADB 模式下运行 App
Manager。 若未通过 TCP 启动 ADB ,App Manager 会回退至 无 Root
模式。 无线调试 通过无线调试启用 ADB
。首先会自动尝试连接之前配置的端口,
如失败会提示用户手动配对,或者手动连接到 ADB daemon。
若通过该方式无法成功连接到 ADB daemon,App Manager会回退至 无
Root 模式。 信息. 由于无线调试在 Android 11 才被引入,该选项仅在运行 Android 11
及更高版本的设备上显示。 无 Root 以无 Root 模式运行 App Manager。虽然 App
Manager 在此模式中表现更佳, 但所有 Root 或 ADB
相关的功能会被禁用。 也会在顶部显示实际操作模式。 实际操作模式是指
Root、ADB 和 无 Root 。 注意. 只有两种情况 "远程服务“才是必需的。一是 ADB
用户,二是使用自定义命令。 配置签名方案
以用于启用 APK 签名的情况。 默认启用 v1 和 v2 签名方案,但应该也启用 v3
以确保在 Android 9 及更高版本的安全性。 为签名 APK 文件配置签名密钥。 已存在密钥库中的密钥可以被导入到 App
Manager,或者可以生成新的密钥。 提示. 如果你需要在将来使用密钥,推荐你自行创建密钥库并在此处导入密钥。
在没有正确备份的情况下,在 App Manager 生成的密钥有被删除的风险。 在 App Manager 对一个 APK 文件签名时执行 ZIP 对齐。 ZIP对齐在 APK
文件 (实际也是一种 ZIP 文件) 中 ZIP
文件浏览器可通过随机访问非常轻易地访问文件而不是将整个 APK
文件加载到内存, 进而导致 Android 可用内存的减少。
记住一点:该步骤需要该应用程序的清单 (manifest) 中 存在
配置安装器的默认行为。在应用程序安装时, 你也可以通过点击
齿轮 图标并找到绝大多数设置。 定义 APK 安装位置,可以是 自动、仅内部存储
和偏好外部存储。 在较新的 Android 版本中,选择最后一个选项
并不保证应用将被安装在外部存储中。 在安装应用程序后立刻阻止跟踪器组件。 在安装应用程序前,若该应用程序已经被安装,
则会在版本控制样式中显示版本、跟踪器、组件、权限、签名、SDK等信息的变更。 选择安装程序。这对于明确检查安装程序以验证应用程序是否合法安装的应用程序很有用。
这只适用于 root 或 ADB 用户。 Notice. 对于应用来说,检查安装包似乎并无不妥, 但 Android
框架已经在安装过程中处理了这个问题。因此,
通过检查安装包是证明应用来源合法性是错误的。 安装应用前是否对 APK 文件进行签名。可用 APK 签名 页面 来配置签名。 在安装应用程序后立即执行DEX优化。
对于大型应用程序(比如说游戏类应用程序)而言,这很有用。 总是在后台安装应用程序。当安装完成时,会发出一条通知。 与 备份恢复 相关的设置. 设置在备份时使用的压缩方式。 App Manager 支持 GZip、BZip2 和
Zstandard 压缩方式,且默认的压缩方式为 GZip。
这不会影响到已有备份的还原。 自定义备份时 备份/还原对话框 的显示。 另见: 备份选项 允许备份在 Android 密钥库中有条目的应用程序。 由于一些应用 (比如说
Signal 和 Element ) 在还原后会崩溃闪退,该选项会默认显示。 为备份设置加密方式。App Manager 当前支持 OpenPGP (源自 OpenKeyChain
)、 AES、RSA和ECC。与 APK
签名类似,AES、RSA和ECC密钥被存储在
密钥库中,可从其它密钥库中导入。 危险. 为了确保自身安全,推荐在 App Manager 内部生成 RSA 和 ECC 密钥。
或者应该从存储在安全地方的密钥库中导入。 选择存放备份的存储路径。这也将存放日志以及导出的 APK 文件。 注意. 备份卷仅可指定存储空间而不是路径。一般情况下备份会被存放在位于存储路径内部的
从旧版本和已停止更新的项目(比如说钛备份、OAndBackup 和 Swift Backup
(从3.0到3.2的版本) 中导入备份。
备份在导入后不会被删除,以防止在无法正确还原导入的备份时丢失数据。 默认情况下,阻止规则不会生效,直到它们在任意应用程序的 应用详情页 中被显式应用。
在启用该选项后,所有应用程序的所有规则 (无论新旧)
即刻生效,无需显式启用应用程序的阻止。 另见: FAQ:
什么是即时阻止组件? 可以在 App Manager
内为所有应用程序导入或导出阻止规则。可选择应被导入或导出的规则类型
(组件、应用操作或权限)。 也可从 Blocker 和 Watt 导入阻止规则。
若要为单个应用程序导出阻止规则,则可使用相应的 应用详情页
导出规则。若要为多个应用程序导出规则,则可使用 批处理操作 。 另见: 规则说明 为所有应用程序导出在 App Manager 配置的阻止规则。 可包含 应用组件 、应用操作 (App
Ops) 和权限,基于多选操作中选择的选项导出规则。 导入之前从 App Manager 导出的阻止规则。 类似于导出,可包含 应用组件、应用操作 (App
Ops) 和权限,基于多选操作中选择的选项导入规则。 将被其他应用程序阻止的组件添加到 App Manager 中。App Manager 仅跟踪被
App Manager 禁用的组件。
若应用程序的组件时被其他工具或应用程序阻止,则该选项可被用于导入它们。
点击该选项, App Manager
会查找潜在的被其他应用程序或工具阻止的组件,并仅列出应用程序的名称以及匹配的组件数量。
安全起见,所有的应用程序默认情况下不会被选中。它们需要被手动选择,并在
App Manager 中重新应用阻止规则。 小心. 谨慎使用可能存在错误结果的工具。 仅选择你十分确信的应用程序。 从 Watt
中导入配置文件, 每个文件包含单个包的规则,文件名为包的名称跟着
提示. Watt 的配置文件存放位置为:
从 Blocker
中导入阻止规则,每个文件包含单个包的规则。 这些文件的扩展名为
点击选项以移除App Manager 内配置的所有规则。
这将启用所有已被阻止的组件,应用操作会被设置为默认值以及权限会被授予。 该选项允许你控制 App Manager 应作用的用户。默认情况下,在 Root 模式或
ADB 模式下 App Manager 对所有用户起作用。 定义用于批处理操作或通过配置文件导出的 APK 格式的文件名。 App Manager
提供一些特殊的关键词,这些关键词包含在 导入或导出用于 App Manager 的密钥库。该密钥库是 Bouncy Castle
KeyStore 并以 显示 Android
版本、安全、CPU、GPU、电池、内存、屏幕、语言、用户信息等。2.6.1
界面语言
2.6.2
外观
2.6.2.1 应用主题
2.6.2.2 纯黑色主题
2.6.2.3 布局方向
2.6.2.4 启用/禁用功能
2.6.3
隐私
2.6.3.1 屏幕锁定
2.6.3.2 在后台运行 App Manager
2.6.3.3 使用网络
2.6.3.4 授权管理器
2.6.4
操作模式
2.6.5
APK 签名
2.6.5.1 签名方案
2.6.5.2 签名密钥
2.6.5.3 对齐 APK 文件
解压本地库 (extractNativeLibs)
并被设定为
真 (true)
。2.6.6
安装器
2.6.6.1 安装位置
2.6.6.2 阻止跟踪器
2.6.6.3 显示变化
2.6.6.4 安装来源
2.6.6.5 签名 APK
2.6.6.6 立即执行DEX优化
2.6.6.7 后台安装
2.6.7
备份/恢复
2.6.7.1 压缩方法
2.6.7.2 备份选项
2.6.7.3 备份带 Android
密钥库的应用程序
2.6.7.4 加密
在 AES 的情况下,生成的密钥应存储在安全的地方,例如密码管理器中。2.6.7.5 备份位置
AppManager
文件夹内。 但当通过存储访问框架 (Storage Access
Framework,即 SAF ) 选择路径时,会直接选择路径或目录。2.6.7.6 导入备份
2.6.8
规则
2.6.8.1 即时组件拦截
2.6.8.2 导入/导出拦截规则
2.6.8.2.1 导出
2.6.8.2.2 导入
2.6.8.2.3 导入已有规则
2.6.8.2.4 从 Watt 中导入
.xml
的扩展名。/sdcard/Android/data/com.tuyafeng.watt/files/ifw
2.6.8.2.5 从 Blocker 中导入
.json
。2.6.8.3 删除所有规则
2.6.9
高级
2.6.9.1 选中的用户
2.6.9.2 保存的 APK 名称格式
%
(百分号)
符号内,并在输入框下方可用。 这些关键词为:标签
。
表示该应用程序的名称或标签。可根据该应用程序设置的语言进行本地化。包名
。
表示包名称或该应用程序ID,是每个应用程序拥有的唯一标识符。版本
。
表示从该应用程序清单里提取出的当前版本。版本代号
。
表示该应用程序的当前版本代号,可用于区分同一个应用程序的两个版本。最小SDK
。
表示该应用程序可运行的最小的SDK (即 Android 框架版本)。该数据仅在
Android 7 (Nougat) 及更高版本可用。目标SDK
。
表示该应用程序的目标SDK。该应用程序可在更高的 SDK
版本以兼容模式运行。日期时间
。 表示 APK
导出的时间和日期。2.6.9.3 导入/导出密钥库
bks
作为扩展名。 因此不支持其他诸如 Java
KeyStore (JKS) 或 PKCS #12 的密钥库。
若要从这类密钥库中导入密钥,则应使用如上所述的相关选项。2.6.10 关于设备
在 应用详情页 中点击 扫描器 按钮后,会出现 扫描器页面 。 外部 APK 文件也可从文件管理器、网页浏览器等用 App Manager 的扫描器打开以扫描 APK 文件。
扫描器会扫描跟踪器和库,显示跟踪器和库的总数。 它也会显示 APK 文件的检验和并进行签名验证。 若设置里配置了 VirusTotal ,则也可尝试从 VirusTotal 中检索报告, 若该 APK 文件不在数据库时,则可以选择上传该 APK 文件。 当启用网络功能时,还会显示前往 Pithus的链接,并提供报告功能。
免责声明.
App Manager 仅静态扫描应用程序,并不带任何偏见。应用程序可能会提供退出跟踪的选项。 在某些情况下,某些跟踪器的功能并不会被应用程序使用 (比如 F-Droid)。 某些应用程序可能只是单纯将它们当作占位符使用, 以防止某些功能被破坏 (比如Fennec F-Droid)。 扫描器的目的是让你知道该 APK 可能包含的内容。 应该把扫描结果当作进一步调查之前的第一步。
点击第一项 (即类的数量) 以打开一个新页面,该页面包含该应用程序的跟踪器类的列表。 所有类可以通过点击 切换类列表 目录查阅。 只需点击其中任意一项即可查看该类的 SMALI 或 Java 版本。
注意.
由于诸多限制,不可能扫描一个 APK 文件里的所有组件。 若一个 APK 文件被高度混淆或包装则更是如此。 扫描器也不会检查字符串 (或网站签名)。
第二项列出了跟踪器数量以及它们的名称。 点击其中一项以显示包含跟踪器名称、匹配签名和每个签名对应的类的数量的对话框。 某些跟踪器名称可能包含 2 前缀, 表示这些跟踪器在 ETIP 备选列表内, 即它们是否确实是跟踪器还在调查中。
第三项列出了库的数量以及它们的名称。 这些信息大多叔来自 IzzyOnDroid repo。
另见: FAQ: 跟踪器类与跟踪器组件
拦截器可被用于拦截应用间通过 意图 (Intent)
进行的通信。
作为源应用程序与目标应用程序之间的中间人工作。 并提供编辑
意图
的界面给功能完整的用户。
警告.
拦截器仅作用于未被指定 应用组件 的 隐式 意图。
应用程序使用意图过滤器来指定它们能够执行的任务或者它们将使用其他应用程序执行的任务。
举个例子,当你使用文件管理器打开一个 PDF
文件时,文件管理器会尝试寻找能够打开 PDF 的应用程序。
为了找到正确的应用程序,文件管理器会创建一个带有MIME类型等过滤器的意图
(Intent),并要求系统检索能够打开该过滤器的应用程序。
系统会通过检索已安装应用程序的清单
(Manifest)匹配过滤器,并列出能够打开该过滤器
(该例子中是PDF)的应用程序组件。
此时,文件管理器将自行打开所需的应用程序组件或者使用系统提供的选项打开它。
若多个应用程序组件能打开它并且没有设置默认的打开方式,则你可能会看到一个选择正确的应用程序组件打开的提示。 动作 (Action) 指定要执行的通用动作,例如
数据最初被称为 URI(Uniform Resource Identifier,统一资源标识符),在
RFC 2396 中被定义。
它可以是网络链接、文件位置,或者名为 内容 (content)
的特殊功能。内容是由 内容提供者
管理的一个 Android 功能。 数据经常被一种 MIME 类型 关联。 例如: 数据 的 MIME类型。
举个例子,若数据字段被设定为
类别 (Category) 与 动作 (Action)
类似。某种意义上来说,它也被系统用于过滤应用程序组件。
它并没有更多优势。不同于 动作
(Action),可以拥有多个类别。点击标题旁边的 添加
按钮以允许添加更多类别。 标志 (Flags) 有助于确定活动 (Activity) 启动期间或活动 (Activity)
启动后的系统行为。 因为它需要一些技术背景,不应该被随意触及。标题旁边的
添加 按钮可用于添加一或多个标志 (Flags)。 额外数据 (Extras)
是用于向目标组件提供附加信息的键值对。可以使用标题旁边的 添加
按钮添加更多额外数据 (Extras)。 将整个意图表示为 URI (例如 2.8.1.1 动作(Action)
android.intent.action.VIEW
。
应用程序通常在清单文件中声明相关的动作以抓取所需的意图。
该动作对广播意图非常有用,起到了至关重要的作用。在其他情况下,其作为过滤相关应用程序组件的初始方法。
诸如 android.intent.action.VIEW
和
android.intent.action.SEND
的通用动作被应用程序广泛使用。
因此,单独设置它可能会匹配到很多应用程序组件。2.8.1.2 数据(Data)
http://search.disroot.org/?q=URI%20in%20Android%20scheme&categories=general&language=en-US
https://developer.android.com/reference/android/net/Uri
file:///sdcard/AppManager.apk
mailto:email@example.com
content://io.github.muntashirakon.AppManager.provider/23485af89b08d87e898a90c7e/AppManager.apk
2.8.1.3 MIME 类型
file:///sdcard/AppManager.apk
, 则相关联的MIME类型为
application/vnd.android.package-archive
。2.8.1.4 类别(Categories)
2.8.1.5 标志位(Flags)
2.8.1.6 附加数据(Extras)
2.8.1.7 URI
intent://…
)。
一些数据无法被转换为字符串,结果可能无法在此显示。
列出匹配意图的所有活动组件。这是由系统内部决定的 (而不是 App Manager) 。 每个组件旁边的启动按钮可用于从 App Manager 直接启动它们。
重置意图至其初始化状态。
将编辑过的意图重新发送到目标应用程序。这可能会打开需要选择所需应用程序的应用程序列表。 从目标应用程序接收的结果会被发送到源应用程序。因此,源应用程序将不会知道是否存在中间人。
许多仅 Root 功能在通过 TCP 启动的 ADB 下依然可用。为此需要一台已安装 Android 平台工具的 PC 或者 Mac 设备, 以及一部启用开发者选项和 USB 调试的 Android 手机。
Root 用户.
若 App Manager 已被授予超级用户权限,则已经能够毫无问题地执行特权代码。 因此,Root 用户无需启用通过 TCP 启用的 ADB。 如果你仍想使用通过 TCP 启动的 ADB, 你必须撤销对 App Manager 的超级用户权限的授予
开发者选项 位于 Android 设置,要么直接 靠近设置页底部 (多数ROMs),要么在其他一些设置下面,比如 系统 (Google Pixel、 Lineage OS、 Asus Zenfone 8.0+), 附加设置 (Xiaomi MIUI、Oppo ColorOS), 更多设置 (Vivo FuntouchOS), 更多 (ZTE Nubia)。 不像其他设置,开发者选项 在用户明确启用前不可见。如果已经启用开发者选项,你也可以使用 Android 设置 中的搜索框来定位它。
该选项在 Android 设置 也可用,但是类似于开发者选项的位置,其位置也因设备而异。 但总体来说,你需要找到 Build number (内部版本号) (或者 MIUI ROM的 MIUI 版本 、 Vivo FuntouchOS的 软件版本 、OPPO ColorOS 的 版本 for ) 然后连续点击至少7次, 直到你最终看到一条写着 你已经启用了开发者选项!的消息。 (这一步你可能会看到需要输入PIN/密码/解锁图案或验证码的提示。) 对绝大多数设备而言,其位于设置页面底部的 关于手机 内。不过找到它的最佳方法是使用搜索框。
在 定位开发者选项 后,
启用 开发者选项 (如果尚未启用)。然后一点点往下划,
直到你看见 USB 调试 选项。点击右侧的切换按钮启用它。
此时你可能会看见一个需要点击 OK 按钮才能实际启用 USB
调试的警示信息。
基于设备供应商和ROM,你可能还需要启用一些其他的选项。以下是一些例子: 同时启用 USB 调试 (安全设置) 。 也启用 允许在仅充电模式下进行 ADB 调试 。
当连接到你的 PC 或 Mac 设备时,你可能会看到
是否允许访问设备数据? 的提示。 无论哪种情况,请点击
是,允许访问。 注意. USB 调试
模式经常会被系统自动禁止。遇到此情况时,请重复上述步骤。 基于设备和操作系统版本,你需要启用 禁用权限监视 或
USB 调试 (安全设置) 以及 从 USB 安装
选项。 基于设备和操作系统版本,你需要启用
禁用权限监视。 确认你已启用 USB 网络共享。 当 USB 调试 为灰色时,你可以执行以下步骤: 在通过 USB 数据线连接你的手机到 PC 或者 Mac 前,确认你已开启 USB
调试; 在通过 USB 数据线连接到 PC 或 Mac 后启用 USB 网络共享; (对三星设备而言)
若你的设备正在运行KNOX,你可能需要执行一些额外步骤。
参考官方文档或咨询官方客服以获得更多支持。3.1.2.1 小米 (MIUI)
3.1.2.2 华为 (EMUI)
3.1.2.3 真我 (Realme)
3.1.2.4 一加 (Oxygen OS)
3.1.2.5 LG
3.1.2.6 故障排除
为了使用通过 TCP 启动 ADB 功能,你需要在你的 PC 或 Mac
设备上安装并设置 ADB。 Lineage OS 用户可参考 §3.1.4.1。 下载最新的 Android
SDK 平台工具 的 Windows 版本。 解压 ZIP 文件的内容到任意目录 (例如
在此目录中打开 命令提示符、
PowerShell 或 终端。
你可以手动从开始菜单打开, 或者按住 Tip. 如果你已经安装了 WinGet
,你可以使用以下命令安装 ADB: 完毕后,你只需输入 下载最新版本的 Android
SDK 平台工具 的 macOS 版本。 点击它以解压 ZIP 文件的内容到目录。然后用 Finder
导航到该目录并定位 使用 Launchpad 或 Spotlight 打开
终端, 然后将 Tip. 如果你已经安装了 Homebrew,你可以用下列命令安装 ADB: 完毕后,你只需在任意 终端 窗口中输入 在你喜欢的终端模拟器中,运行如下命令 若成功,你只需在 同一个 终端模拟器窗口内输入
3.1.3.1 Windows
C:\
adb
),然后用
文件资源管理器 导航到 (转到/打开) 该目录。Shift
键,打开目录,在目录内用 文件资源管理器 右键单击,然后单击
在此处打开命令窗口 或者 在此处打开 PowerShell 窗口
(取决于你安装的软件)。 现在你可以通过输入 adb
(在命令提示符中) 或者是 ./adb
(在PowerShell中) 的方式访问
ADB。 请不要关闭此窗口。winget install --id Google.PlatformTools
adb
就可访问 ADB。3.1.3.2 macOS
adb
。adb
从 Finder
窗口拖到 adb
到 终端 窗口并松开。 请不要关闭
终端 窗口。brew install --cask android-platform-tools
adb
即可访问 access ADB。3.1.3.3 Linux
cd ~/Downloads && curl -o platform-tools.zip -L \
&& \
https://dl.google.com/android/repository/platform-tools-latest-linux.zip unzip platform-tools.zip && rm platform-tools.zip && cd platform-tools
./adb
或者在任意的模拟器输入
~/Downloads/platform-tools/adb
就可以访问 ADB。
Lineage OS (或其衍生ROM) 用户可直接通过开发者选项启用通过 TCP 启动 ADB 功能。 若要启用,请前往 开发者选项,下划,直到你找到 通过网络启动 ADB。 现在,点击右侧的切换按钮以启用它并跳转至 §3.1.4.3在 App Manager 内的 ADB 模式。
Warning.
你可以在开发者选项中关闭 ADB over Network,但关闭该选项也会停止 App Manager 的服务器。因此,请只在你不打算在 ADB over TCP 模式下使用 App Manager 时关闭它。
对于其他ROM,你可以通过在前面章节中的步骤3打开的命令提示符/PowerShell/终端模拟器进行操作。
在此节中,我将使用 adb
表示 ./adb
,
adb
或其他你需要使用的任何命令基于前面的章节中你使用的平台和软件。
使用数据线连接你的设备到你的 PC 或 Mac。For some devices, it is necessary to turn on 对某些设备而言,有必要同时启用 文件传输模式 (MTP)。
确认一切都按预期运行,在你的终端输入 adb devices
。
若你的设备已成功连接,则你会看到像这样的内容:
List of devices attached
xxxxxxxx device
注意.
在某些 Android 手机中,会出现这样的提示信息:允许 USB 调试吗? 无论什么情况,勾选 始终允许此计算机进行调试 然后点击 允许。
最终,运行下面的命令以启用通过 TCP 启用 ADB 功能。:
adb tcpip 5555
危险.
在启用通过 TCP 启用 ADB 功能后,你不能禁用开发者选项或者 USB 调试。
在启用通过 TCP 启动 ADB后,重新启动 App Manager。App Manager 应该会自动检测到 ADB 模式。 若不能,你可以在 设置页面 更换操作模式为通过 TCP 启动 ADB 模式。 你也可以在此处验证 App Manager 是否与 推断模式 显示的一样正确检测到 ADB。
注意.
在某些 Android 设备中,在连接到 App Manager 前,可能需要将 USB 数据线从 PC 断开。
警告.
通过 TCP 启动 ADB 在重启时会被禁用。对于这种情况,你需要按照 §3.1.4.2在 PC 或 Mac 上启用通过 TCP 启动 ADB 模式 的步骤再度操作。
若你的设备运行 Android 11 及更高版本,或稍后能够连接到 Wi-Fi 网络至少几分钟, 则推荐使用无线调试方法,因为比起 提供 TCP 启动 ADB 它提供更多保护。 它需要两个步骤:
ADB 匹配 对新手用户而言有一点复杂的初始步骤 幸运的是,该步骤并不总是每次都需要进行。
.连接到 ADB 每次你重启手机后都需要进行该操作。App Manager 在多数设备上也可以自动完成此步骤。
在 开发者选项 页面,找到 无线调试 并单击以打开它。 在新打开的页面中,打开 使用无线调试 。取决于你的操作系统,你可能会看到一个提示对话框,要求你验证你的决定。 若遇到此情况,请单击 允许 。
提示.
为了更便于访问,你可能想将 无线调试 添加到通知块部件 (快速设置磁贴)。 要做到这一点,请找到 开发者选项 页面的 快速设置开发者磁贴 ,单击以打开它。 在新窗口中,启用 无线调试。然而该选项在大多数操作系统中不可用。 如果你没看到这个设置,你可以在磁贴自定义面板中找到 无线调试 磁贴。
在 App Manager 中,转到 设置 > 操作模式 ,接着开启 无线调试。启用后,App Manager 会试着自动建立 无线调试连接,如果先前未配对,那么该尝试会失败。尝试失败后, 应用会请你连接或配对 ADB。选择配对 会出现新的对话框。 对话框会让你转到 无线调试 页面。
注.
截至 v4.0.0 版, App Manger 使用通知提示进行配对。因而,如果你停用了 App Manager 的通知权限,你必须先启用它。.
在无线调试 页面, 选择 用配对码配对设备. 之后会展示 一个包含配对码的对话框。一个请求配对码的通知也会几乎立马变得可见。 将配对码输入通知中的输入框, 单击 配对。如配对成功,App Manager 会显示 “已配对” 的消息通知, 无线调试 页中的对话框将被自动 忽略。你也可以在相同页面中看到 App Manager 被列为 ADB 客户端。
注意.
如果你有一段时间不在 ADB 模式下使用 App Manager,那么 App Manager 可能会从 Adb 客户端列表中被删除。如果出现这种情况,你必须重复以上步骤。
若运行模式设置为 自动, 通过 TCP 启动的 ADB 或 无线调试, App Manager 应该能够自动连接到 ADB。 若并非如此,则在设置 > 操作模式 中选择 无线调试 。 若 App Manager 无法检测或连接到 ADB , 则会显示一个提示对话框以用于连接或配对 ADB 。 选择 连接 。
现在,从 Android 设置中转到 无线调试 页面,记下页面显示的端口号。 在 App Manager 的提示对话框中, 用你记下的端口号替换当前端口号,然后点击 连接 。
一旦成功建立连接,你就能够禁用 Android 设置的 无线调试。
小心.
不要禁用 USB 调试 或 §3.2.1启用开发者选项和 USB 调试 提及的任何附加选项。 一旦禁用,App Manager 使用的远程服务器会被终止,你可能不得不重新开始。
App Manager 具有从零开始的现代、高级和易于使用的备份/还原系统实现。 可能仅本应用有能力 同时还原应用程序和数据以及你在 App Manager 内配置的权限和规则。 你还可以选择多次备份应用程序 (使用自定义名称) 或为所有用户进行备份。
备份/还原是 批处理操作
的一部分。 它也位于 应用信息标签页 的
选项菜单 中。 Clicking on
Backup/Restore opens the Backup
Options. 默认情况下,备份存放在
/storage/emulated/0/AppManager
。 你可以在 设置页面 配置自定义的备份位置。
无论如何配置,备份都会存放在所选卷的 AppManager
文件夹。
注意.
若一个或多个应用程序并没有任何备份, 则不会显示 还原 和 删除备份 选项。
你可以通过备份选项 (内部称为备份标志) 自定义云端备份。 然而,在将来的备份中不会记得这些自定义设置。 如果你想定制此对话框,在 设置页面 中使用 备份选项。
下面给出了备份选项的完整描述:
APK 文件 是否备份 APK 文件。 这包括 Base
APK 文件以及 APK 分包
文件 (如果有)。
内部数据 是否备份内部数据目录。 这些目录位于
/data/user/<用户ID>
以及 (对 Android 7 及更高版本)
/data/user_de/<用户ID>
.
外部数据 是否备份位于内部存储和SD 卡 (如果有) 的数据目录。 外部数据目录通常包括非必要的应用数据或媒体文件 (而不是使用专用的媒体文件夹),若选择备份则可能增加备份文件的大小。 然而,对一些应用来说可能是有必要的。 尽管默认情况下不会选中该项 (因为它可能会显著增加备份文件的大小),你可能需要检查此项以确保能够顺利还原你的备份。
小心.
若你要备份外部数据文件夹,则应该总是备份内部数据文件夹。 然而,如果所讨论的应用会从网络下载大量资源,那么仅备份外部文件夹也会很有用。
OBB 和媒体 是否备份或还原 OBB 和位于 外部存储或 SD 卡的媒体。 这对实际使用这些文件夹的游戏和图形软件而言很有用。
缓存 Android 应用在每个数据目录 (内部和外部) 中都有多个缓存目录。 有两种类型的缓存: 缓存 (Cache) 和 代码缓存 (Code Cache)。 禁用此选项会将这两个缓存目录从所有数据目录中排除。 一般情况下建议排除缓存目录,因为大多数应用程序并不会定期清除缓存,缓存通常是由操作系统自身处理。 像 Telegram 之类的应用可能会使用非常大的缓存(由存储空间决定),这显著增加了备份文件大小。 当该项被禁用时,App Manager 也会忽略 no_backup (无备份)目录。
额外信息 备份/还原应用权限、网络规则、电池优化、SSAID,等等,默认启用。 注意:阻止规则在还原应用的额外信息 后 应用。 所以,如果某个条目在两个地方(阻止规则和额外信息备份)同时存在,那么它将会被覆盖。(即会使用源自阻止规则的条目)。
规则 你可以通过该选项备份在 App Manager 内配置的阻止规则。 若你通过 App Manager 配置了权限或阻止了一些组件,则当你启用该选项时, 这些规则也会被备份或还原。
多重备份 这是否为多重备份。 默认情况下,备份使用其用户 ID 保存。 启用该选项将允许你创建多个备份。 这些备份使用当前的时间日期作为默认备份名称,但你也可以指定自定义备份名称。 当你点击 备份 按钮时,使用输入框以自定义备份名称。
自定义用户 为所选的用户进行备份或还原,而不仅仅是当前用户。 该选项仅在系统有多个用户的情况下显示。
跳过签名检查
当进行备份时,会生成每个文件的检验和 (以及基础 APK 文件的签名证书)
并保存在 checksums.txt
文件中。
当你还原备份时,会再度生成检验和,并用于匹配保存在先前提及的文件内的检验和。
启用此选项以禁用签名检查。 该选项仅在你恢复备份时被应用
(即启用该选项仅禁用恢复时的签名检查)。
无论此处如何设置,备份时始终会生成用于签名检查的检验和。
小心.
你应该总是禁用此选项,以确保你的备份不被任何第三方应用程序修改。 然而仅在你启用了加密才起作用。
另见: 设置:加密
备份功能会遵守除了 跳过签名检查 以外的所有备份选项。 若基本备份 (即并未选择多重备份 选项) 已存在,由于备份会被覆盖,你会看到一条警告信息。 若设置了 多重备份 ,你需要在选项中输入(指定)备份名称,或者你也可以留空以使用当前日期时间作为备份名称。
还原会遵守全部备份选项,并在出现以下情况时失败:若设置了 APK 文件 选项, 备份内容却不包括 APK 文件选项设定的内容,或者其他情况下,未安装该应用程序。 当为多个应用还原备份时,你只能选择还原基础备份 (参阅 备份 章节以了解更多)。 然而,当为单个应用程序还原备份时,你需要通过选项选择还原哪个备份。 若设定了 所有用户 选项,则 App Manager 将在后一种情况为所有用户还原所选备份。但是在前一种情况中,将会为各个用户还原基础备份。
注意.
使用存储访问框架 (Storage Access Framework 即 SAF)、SSAID 或 Android 密钥库只有在还原并立即重新启动后正常工作。
删除备份仅遵守 所有用户 选项。当被选中时,仅会提示后删除所有用户的基础备份。 当为单个应用删除备份时,会显示另外一个可供你选择要删除的备份的对话框。
可以通过诸如 Automation 或 Tasker
之类的第三方应用程序触发在 App Manager 设置的配置文件。 通常情况下用
活动
所有条件都需要两种主要的附加功能:密钥名称和数据类型。如下所示: 目前 App Manager 支持的一个功能,即 为了触发配置文件, 意图
触发这类操作。3.4.2
配置任务
io.github.muntashirakon.AppManager.crypto.auth.AuthFeatureDemultiplexer
负责处理所有的自动化意图。 发送意图到该活动,让 App Manager 通过重定向
意图
到指定活动或服务的方式执行指定操作。3.4.2.1 需求的附加选项
auth
. (字符串值)
前一节所述的授权密钥。feature
. (字符串值)
功能名称。下一节将介绍受支持的功能。3.4.3
功能特性
配置文件
。3.4.4
触发配置文件
feature
(功能) 字段必须具有
profile
(配置文件) 值。 此外,接下来的 extras (额外选项)
可包括:prof
. (字符串值 – 必须) 显示在 配置页面 的配置名称。state
. (字符串值 – 可选)
配置文件的状态 – 目前 on
(启用) 或者 off
(禁用) – 如文档所述。. 若此时未设置额外选项,则 App Manager
会提示需要选择的状态。 因此,为了完全自动化,应该设置该选项。
网络策略 (Network policies),简写 Network policy。 网络策略通常位于 Android 设置的应用详情页面中的 移动数据和 WLAN 这一节的下面。 该页面中并非所有策略会被授权使用 (比如三星),以及由于缺少文档,并非所有设置都能被很好地理解。 App Manager 可以显示所有在 网络策略管理器 声明的网络策略。 对 App Manager 而言位置的策略会被加上 Unknown 前缀以及十六进制格式的策略常量名称和编号。 未知策略应报告给 App Manager 以供纳入。
网络策略允许用户配置应用的某些网络行为,而不是直接修改 IP 地址表和/或者使用防火墙应用。 然而,其提供的功能很大程度上依赖于 Android 版本和 ROM。已知网络规则列表如下所示:
无 或 POLICY_NONE
:
(AOSP) 并未设置特定的网络策略。
系统仍可通过应用程序的性质分配规则。
禁止在后台使用移动数据 (流量计费的网络) 或
POLICY_REJECT_METERED_BACKGROUND
: (AOSP)
当应用在后台运行时,禁止使用移动数据 (流量计费的网络)。
允许后台使用移动数据
(流量计费的网络),甚至在流量节省程序开启时 或
POLICY_ALLOW_METERED_BACKGROUND
: (AOSP)
允许后台使用移动数据
(流量计费的网络),甚至是启用流量节省模式的情况下。
禁止移动数据 (蜂窝数据) 或
POLICY_REJECT_CELLULAR
(Android 11+) 或
POLICY_REJECT_ON_DATA
(直到 Android 10):
(Lineage OS) 禁止使用移动/蜂窝数据。
向配置的应用程序发出网络不可用的信号,就像未激活移动数据
(蜂窝数据)一样。
禁止 VPN 数据 或
POLICY_REJECT_VPN
(Android 11+) 或
POLICY_REJECT_ON_VPN
(直到 Android 10):
(Lineage OS) 禁止使用 VPN 数据。
向配置的应用程序发出网络不可用的信号,就像未激活 VPN 一样。
禁止 Wi-Fi 数据 或
POLICY_REJECT_WIFI
(Android 11+) 或
POLICY_REJECT_ON_WLAN
(直到 Android 10):
(Lineage OS) 禁止使用 Wi-Fi 数据。
向配置的应用程序发出网络不可用的信号,就像该设备未连接到 Wi-Fi
网络一样。
禁用网络访问 或
POLICY_REJECT_ALL
(Android 11+) 或
POLICY_NETWORK_ISOLATED
(直到 Android 10):
(Lineage OS) 禁止所有情况下的网络访问。
这与执行上述其他三项策略不同,推荐对可疑/狡诈的应用而言使用该策略。.
若该策略被执行,则没有必要执行其他策略。
POLICY_ALLOW_METERED_IN_ROAMING
:
(三星) 可能是在漫游时允许使用移动数据 (流量计费的网络)。
目前不知道其确切含义。
POLICY_ALLOW_WHITELIST_IN_ROAMING
:
(三星) 可能是在漫游时允许使用网络。 目前不知道其确切含义。
禁止使用移动数据 (流量计费的网络) 或
POLICY_REJECT_METERED
: (摩托罗拉)
若是移动数据 (流量计费的网络) 则禁止使用网络。
禁止使用后台数据 或
POLICY_REJECT_BACKGROUND
: (摩托罗拉)
禁止后台使用数据。
禁用网络访问 or
POLICY_REJECT_ALL
: (摩托罗拉)
禁止所有的网络访问。 与 Lineage OS 类似,会通过 iptables (防火墙)
阻止网络连接。但不知道它是否向配置的应用程序发出网络不可用的信号。
注释.
相应的 Lineage OS 补丁如下:
活动、服务、广播接收器 (或者仅接收器) 和内容提供者 (或仅提供者) 统称为应用程序组件。 技术上来说,它们都继承了 ComponentInfo 类 并可以通过意图被启动。
App Manager 通常使用一个称作 Intent Firewall (IFW),意图防火墙 的方法阻止应用程序组件 (或跟踪器组件), 它比其他诸如 pm (PackageManager,包管理器)、 Shizuku 或其他任何使用包管理器启用或禁用组件的办法更优秀。 若组件被后者的办法禁用,应用程序自身可以检测到组件被阻止并能重新启用,因为应用程序有自身组件的完整访问权限。 (许多欺骗性应用程序这样做,实际上是为了让跟踪器组件保持不被阻止的状态。) 另一方面,意图防火墙 (IFW) 是一个真正的防火墙,应用程序无法检测自身组件是否被阻止。 这也是 App Manager 使用术语 阻止 而非 禁用 的原因。
就算是意图防火墙也有一些局限性,主要适用于系统应用程序:
相关应用程序被系统加入白名单。 即没有这些应用程序,系统将无法正常运行,并可能导致随机崩溃。 这些应用程序包括但不限于 Android 系统、系统界面、电话服务。 即使禁用或阻止,它们仍然会运行。
另外一部分系统应用程序或系统进程通过进程间通信 (Interprocess Communication,IPC) 激活了被加入白名单的系统应用程序的应用程序组件。 此情况下组件会被激活,并无视组件的阻止状态甚至是整个应用程序被禁用。 若有不需要的系统应用程序,阻止其运行的唯一办法就是摆脱 (卸载/移除)它。
不。 但是被系统或任何其他工具阻止的应用程序组件会在组件标签页 显示。 这些规则可从 设置 导入。 然而,App Manager 无法区分组件是被第三方工具阻止还是被系统阻止。 因此,在导入页面中显示的应用程序列表应谨慎选择。
如果请求,App Manager 会再次阻止组件。 解除阻止的情况下,它们将恢复到应用程序清单中指定的默认状态。 但是如果组件是被 MyAndroidTools (MAT) 使用意图防火墙 (IFW) 阻止, 由于 MAT 使用不同的格式,它们不会被 App Manager 解除阻止。 为了修复这个问题,首先需要从 设置 导入规则 这种情况下,MAT 的配置文件会被永久移除。
当你在 应用详情页 中阻止组件时,默认情况下阻止规则不会立刻生效。 仅在你使用顶部右侧菜单的 应用规则 选项时,阻止规则才会生效。 若你启用 即时阻止组件 选项,则当你阻止组件时,阻止规则会立刻生效。 若你选择阻止跟踪器组件,阻止规则会自动生效,该选项设置会被忽略。 你也可以通过在应用详情页内同一菜单简单点击 移除规则 为该应用程序移除阻止规则。 由于默认行为使你更好地控制应用程序,保持选项 即时阻止组件 选项为禁用状态更好。
所有应用程序组件都是类,但并非所有类都是组件。事实上,只有少数类是组件。 话虽如此, 扫描页面 展示的是跟踪器列表以及类的数量,而并非只是组件数。 在所有其他页面,跟踪器和跟踪器组件是同一个意思,都用于表示跟踪器。 即:阻止 tracker 是指阻止跟踪器组件,而不是跟踪器类。
信息.
无法阻止并非组件的跟踪器类。它们仅能在编辑应用程序自身时被移除。
很不幸的是,是的。这是因为响应 ADB 连接的 ADB daemon (ADB 守护进程) 也会在重新启动后重新开始。 而这并不会重新启用通过 TCP运行的 ADB。
ADB 具有数量限制 权限 而并非它们其中一个控制应用程序组件。 然而,仅用于测试 的应用程序的组件可以通过 ADB进行控制。 若 App Manager 检测到此类应用程序,则会自动启用阻止选项。
在 ADB 模式下,受支持的功能会自动启用。 受支持的功能包括禁用、强制停止、清除应用程序数据、授予或撤销应用操作 (App Ops) 和权限等。 也可在无系统提示的情况下安装或卸载应用程序。
是的,App Manager 不能在无 Root 或 ADB时修改任何系统设置。
在新版本发布前,会手动更新跟踪器和库。
不会,在安装后,APK 不会被 App Manager 删除。
现在 App Manager 使用隐藏 API 和执行特权代码变得更加复杂, 无法和 Shizuku 之类的其他第三方应用程序集成。 不考虑在 App Manager 中集成 Shizuku (现在具有 Apache 2.0 协议) 的理由如下:
最初 Shizuku 是不自由软件,这也导致我 在 App Manager 中使用了类似的方法来支持 Root 和 ADB。
App Manager 已经支持 Root 和 ADB,并且在某些情况下比 Shizuku 更优秀。
主要功能依赖于第三方应用并不是一个好的设计理念选择。
集成 Shizuku 会增加 App Manager 的复杂性。
臃肿软件(Bloatware)为不必要的预装应用,通常是系统应用。 一些臃肿软件通常用来跟踪用户并收集它们可能为了获利而出售的用户数据。 许多系统应用无需请求任何权限便可访问设备信息、联系人和消息数据,以及其他使用信息, 比如手机使用习惯和存储在共享存储空间中的一切。
臃肿软件同样包括 Google 地图、Meta 出品的应用,以及Twitter/X, 这些应用也可以在没有用户同意情况下跟踪和/或收集用户数据。 你可以在 Andeoid 系统设置那里禁用这些应用的一些权限, 但请知晓,系统设置藏有很多权限被安全研究者认为具潜在危险性 (比如联网、传感器等)。
如果臃肿软件是用户应用,可以轻易从系统设置或AM进行卸载。 而属于系统应用的臃肿应用没有特权是不可能卸载的。 即使有特权也无法完全卸载 这样的系统应用, 因为它们位于 system 分区,这是一个只读分区。 如果你有 root 权限,你可以重新挂载这个分区来手动 清除 这些应用,但这样做会破化系统的 OTA 更新, 因为系统分区中的数据已经被修改。 有两种更新,一种是 delta 更新(仅由两个系统版本间的差异构成,下载东西少)和完整更新。 你仍能使用完整更新,但更新后臃肿软件又会出现,你不得不再次彻底清理它们。
另一个解决方案是通过系统设置或 AM 停用这些应用, 但某些服务仍能在后台运行, 因为它们可以被其他系统应用使用进程间通信(IPC)方式启动。 一个可能的解决方案是停用所有臃肿软件,直到服务最终停止(在重启后)。 不过,由于厂商对 ANdroid 框架所做的巨大改动, 删除或停用某些臃肿软件可能导致系统 UI 崩溃甚至造成启动循环。 从 v4.0.0 版本起,AM 有了一个新功能,叫做 Debloater, 可以用作从专有权利的 Android 操作系统中监控、停用,及删除臃肿软件的基础。
注意.
多数情况下,你无法完全 debloat 设备。 因此,建议你使用没有臃肿软件的定制 ROM,如 Graphene OS、Lineage OS 或它们的衍生品。
App Manager 目前支持阻止活动、广播接收器、内容提供者、服务、应用操作 (App Ops) 和权限, 并且在将来可能会添加更多阻止选项。 为了增加更多便携性,导入/导出所有的这些数据是有必要的。
由于数据库专门用于存储数据,维护数据库是最佳选择。 目前为止有多个
tsv
文件,每个文件都有包名和 .tsv
扩展名。
RulesStorageManager
(规则存储管理器)
类负责查询/处理相应的文件/数据库。
由于这种抽象概念,将来在不更改整个项目设计的情况下切换到数据库或加密数据库系统会更加容易。
目前所有的配置文件存储在
/data/data/io.github.muntashirakon.AppManager/Files/conf
。
下述格式在 App Manager 内部使用,且 与外部格式不兼容。
<name> <type> <mode>|<component_status>|<is_granted>
此处:
<name>
– 组件/权限/应用操作 (App Ops) 名 (对于
App Ops,值可能为字符串或整数)
<type>
– ACTIVITY
、
RECEIVER
、 PROVIDER
、 SERVICE
、
APP_OP
、 PERMISSION
的其中一个
<mode>
– (用于App Ops) 相关的 模式常量
<component_status>
– (用于组件) 组件状态
true
– 已应用组件 (true
值因为兼容性被保留)
false
– 尚未应用组件,但将来会生效
(false
值因为兼容性被保留)
unblocked
– 计划解除阻止的组件
<is_granted>
– (用于权限)
是否授予或撤销权限
外部格式用于 App Manager 导入或导出规则。
<package_name> <component_name> <type> <mode>|<component_status>|<is_granted>
除了第一项是包的名称外,其格式与上述 (内部格式) 基本相同。
小心.
导出的规则具有与内部格式不同的格式, 不应该被直接复制到 conf 文件夹。
Updated bloatware
Fixed fetching applications in multi-user environment in no-root mode
Fixed opening app-manager
URLs from the web
browsers
Fixed updating SSAID
Prevented a crash in Android < 9.0 that occurs due to invalid app ops.
In the App Details page, a new tab “Overlays” is added where per-app
overlays are displayed. They can also be enabled or disabled using the
toggle button. In addition, if the App Details page of an overlay
package is opened, a “Overlay” tag will be displayed in the App Info
tab. Clicking on the tag opens a dialog containing additional info along
with a button that allows navigating to the App Details page of the
overlay target package if it is installed. At present, it only works for root/ADB users in Android 8 (Oreo) and
later.6.2.1.0.1 Known limitation
If the application corresponding to the shortcut being launched is
frozen, App Manager will now offer you to unfreeze the app temporarily
so that the shortcut can be launched. The app will be frozen again once
the screen is locked. This may not work on devices without a screen lock or if the screen
is locked some time after the display goes off.6.2.2.0.1 Known limitation
market
-like URL
supportThird-party applications can now open the App Details page of any installed package by invoking an Intent with an URL with the following format:
app-manager://details?id=<pkg>&user=<user_id>
where <pkg>
stands for package name, and
<user_id>
stands for the user ID which is
optional.
In order to improve accessibility, certain color codes have been improved. Visit Settings > About > Version/Changelog for details.
Avoided waiting for the remote server to respond when no-root mode is set
Fixed downgrading apps in Android 10 onwards
Fixed installer issues in the Huawei stock operating systems
Improved text formatting in the “What’s New” dialog
In the UI tracker window, fixed clicking on the icon after it is iconified
Updated bloatware and suggestions
App Manager v4.0.0 comes with a lot of new features and improvements.
Visit Settings > About
> Version/Changelog for details. The new logo is just a cursive “A”. The design is based on the Tengwar Telcontar font
which was created to bring the Tengwar script, originally created by J.
R. R. Tolkien, to the digital world. The letter has the classic App
Manager color (i.e., #dcaf74) and uses a pure black background instead
of a shade of grey. App Manager now targets Android 14 and fully supports Android 15. KeyStore backup/restore is not working in Android 12 and later. Debloating profiles were available as “Presets” in the Profiles page
which has now been replaced with the Debloater page and can be accessed
from the three-dots menu in the Main page. ADL is
a new project that focuses on maintaining a list of bloatware as well as
potential open source alternatives. Contributions are welcome! App Manager offers an (almost) fully-featured file manager with basic
file operations, such as copy, cut, rename, and delete along with the
batch operations. It also offers an extensive “Open with…” dialog to
open a file with another app, and a comprehensive file properties
viewer. Folders can also be added to the list of favorites for quick
access. And many more. Manifest and code viewers have been replaced with this new editor.
Among other regular features, it includes proper syntax highlighting and
advanced searching options. In addition, files from third-party apps can
also be opened for editing. All 1-click operations, batch operations, and profile invocations are
now stored as history. The history items can also be executed from the
History page. To ensure consistency, the profile state, configurations,
package list are also stored, and this stored version is executed
instead of the actual profile. As a result, this works even if the
profile is deleted. Freeze/unfreeze feature now supports setting per-app freezing method
which is beneficial in certain scenarios, such as when a user want to
suspend some apps while using the disable method as the default. In
addition, an “Advanced suspend” option is added which force-stops an
application before suspending it, thus, prevent it’s services from
running in the background. Log viewer now supports enhanced searching and filtering options,
such as keyword- and regular expression-based searching and filtering.
Please read the in-app changelog for details. Support for batch
operations has also been added. App Manager now supports launching non-exported activities in no-root
and ADB mode. However, in no-root mode,
It is not possible to modify installer options during the
installation by clicking on the “settings” button in the installation
dialog. The installer options will be applied to all the applications
installed in the same session (i.e., the installer queue). App Manager now supports running its remote server (which is used as
a proxy for running privileged operations) as any supported user (UID).
This includes root (0), system (1000), and shell/ADB (2000) through the
custom commands. This is also useful for Fire TVs which have disabled
connecting to ADB from localhost through socket connection. In addition,
ADB pairing is now done using notifications rather than split screen.
ADB connection speed can also be improved by choosing to run App Manager
in the background which can be configured in the settings. Data usage widget display the total data usage for the day, similar
to the screen time widget which displays the total screen time for the
day. In addition, existing widgets have been improved. Replaced log viewer, sys config, Terminal, etc. with Labs
page Added an option to disable sensors for each app in the App Info
tab Added an option to perform runtime optimization of applications
in the 1-click Ops page and in the App Info tab Added support for Zstandard compression for
backup/restore Enabling APK signing now automatically enables zip align
feature Support exporting application list as CSV or JSON in the batch
operations Added pure black theme support Display current activity name (when possible) in the UI Tracker
window Added an option to filter apps by user in the Main page Display a link to Pithus report in the scanner page if
available.6.3.1
New logo!
6.3.2
Android 14 and 15 support
6.3.2.0.1 Known issue
6.3.3
Revamped debloater
6.3.4
Introducing file manager
6.3.5
Integrated code editor
6.3.6
History of operations
6.3.7
Per-app freezing, and
more
6.3.8
Log viewer enhancements
6.3.9
Launching non-exported
activities
android.permission.WRITE_SECURE_SETTINGS
permission is
required.6.3.11 Per-session installer
options
6.3.12 Advanced mode
of operations, ADB enhancements, …
6.3.13 Data usage widget, and more
6.3.14 Others
App Manager v3.1.0 comes with a few new features and a lot of
improvements. Visit Settings > About >
Version/Changelog for details. App Manager now targets Android 13 which means most issues in Android
12 and 13 has been addressed, including SSAID and SAF issues as well as
monochrome icons and other theming issues. KeyStore backup/restore not working in Android 12 and later. Enable/disable is replaced with freeze/unfreeze to allow greater
control on the behaviours of an app. It supports suspend, disable and
hide functionalities which can be controlled at Settings >
Rules > Default freezing method. In order to make it easy to
freeze or unfreeze an app, shortcuts can also be created from the App
Info tab by long clicking on the freeze or unfreeze button. In the Main page, it is now possible to export the list of apps in
either XML or Markdown format using batch operations. In the future, the
XML file may also be imported to App Manager. App Manager now fully supports encrypting backups using ECC in
addition to offering AES, RSA and OpenPGP. Two new languages are added: Korean and Romanian. In the main page, more sorting and filtering options are added.
Sorting options include sorting the apps by total size, total data
usage, launch count, screen time and last usage time. Filtering options
include filtering the apps having at least one item in the Android
KeyStore, filtering apps with URIs granted via SAF, and filtering apps
with SSAID. Fixed various issues with ADB pairing, handled incomplete USB
debugging. Some rooting methods cannot allow interprocess communication
via Binder. In those cases, ADB mode is used as a fallback method by
enabling it automatically if possible. When possible, App Manager will be able to display apps from work
profile in no-root mode in addition to allowing basic operations such as
launching the app or navigating to the system settings. For backups, it
is now possible to restore backups for other users, but for work
profile, some apps may only work properly after re-enabling the work
profile. In the installer page, selecting All users will now
install the app for all users instead of only the current user. Finally,
in the app info tab, current app can be installed in another profile
using the Install for… option available in the three-dots menu.
This is analogous to the Explorer can now open DEX and JAR files in addition to APK files.
Several sorting options as well as folder options are also added as the
list options. In app info tab, a new tag called WX is added. It is displayed in
Android 10 and later if the application targets Android 9 or earlier. It
indicates W^X
violation which allows the app to execute arbitrary executable files
either by the modification of executables embedded within the app or by
downloading them from the Internet. App ops are now managed automatically to avoid various app ops
related crashes in various platforms. This will also lessen the amount
of crashes in an unsupported operating system. In the Main page, enabled batch uninstallation in no-root mode. Enabled advanced searching. Searching now matches not only app labels
but also package names. Copy the intercepted Intent as am command which can be run from
either an ADB shell or a terminal using root with the same
effectiveness. Explicitly handle the Internet permission which is a runtime
permission in the OS. Fixed permission denied issues in the installer due to a framework
issue introduced in MIUI 12.5. Fixed crashes in the Interceptor page due to a framework issue
introduced in Android 11. Improved Java-Smali conversion by including all the subclasses
during conversion Improved scanning performance in the Scanner page Improved updating the list of apps in the Main page Scan all the available paths to detect systemless-ly installed
system apps6.4.1
Android 13 support
6.4.1.0.1 Known issue
6.4.2
Introducing
freeze/unfreeze
6.4.3
Export app list
6.4.4
Elliptic Curve Crypography
(ECC)
6.4.5
New languages
6.4.6
More list options
6.4.7
Improved handling
of mode of operation
6.4.8
Handling multiple users
pm install-existing
command,
thereby, making the installation process a lot faster.6.4.9
Explorer enhancements
6.4.10 New tag: WX
6.4.11 App ops management
6.4.12 Batch uninstallation
6.4.13 Running apps
6.4.14 Interceptor
6.4.15 Device-specific changes
6.4.15.0.1 Graphene OS
6.4.15.0.2 MIUI
6.4.15.0.3 Motorola
6.4.16 Others
vacuum
SQLite database before opening it for viewing
or editing.
App Manager v3.0.0 comes with a lot of features and improvements. See
Settings > About >
Version/Changelog to see a more detailed changelog. Material 3, somewhat similar to Material You, is a
significant improvement over Material Design 2 with support for dynamic
colours in Android 12 and later. In addition, many design changes have
been made in App Manager without any significant changes in the overall
user experience. Switches are still based on Material Design 2 which will be fixed in
a future release. Wireless debugging support has been fully implemented. Head over to
§3.2 for instructions on how
to configure wireless debugging. No-root users. Due to auto-detection feature, startup time might be large for
no-root users when the mode of operation is set to auto.
Instead, no-root users should select no-root instead of
auto. App Manager is fully translated into Indonesian and Italian languages
and can be enabled in settings. Bengali is removed due to lack of
translators. App Explorer can be used to browse the contents of an application.
This includes binary XML files, DEX contents or any other media files.
DEX contents can only be explored in Android Oreo (Android 8) and later.
It’s also possible to convert an It is possible to import backups from discontinued or obsolete
applications such as Titanium Backup, OAndBackup and Swift Backup
(version 3.0 to 3.2). Go to Setting > Backup/restore to find this
option. VirusTotal is a widely used tool to scan files and URLs for viruses.
In the scanner page and in the running apps page, an option to scan
files with VirusTotal has been added. But the option is hidden by
default. To enable the option, it is necessary to obtain an API key from
VirusTotal. Go to Settings > VirusTotal API Key for more
information. Internet feature. This is currently the only feature which require an Internet
connection. If you wish to use any Internet feature that might also be
added in the future, enable Use the Internet in Settings >
Enable/disable features. As the implementation of routine operations is being delayed, an
option to trigger profiles from the external automation software is
added. See §3.4 for instructions on how to
configure profile automation. Application installer includes several improvements including the
ability to downgrade applications in no-root mode, installing multiple
applications at once and blocking trackers after installation. In
Android 12 and later, no-root users can update applications without any
user interactions. It is now possible to configure how App Manager should block a
component. Visit Settings > Rules > Default blocking method for
more information. In the components tab, long clicking the block/unblock
button opens a context menu which allows per-component blocking in a
similar manner. ADB users can also block the components of a Test
only app. In some pages, the search bar supports additional searching which
includes searching via prefix, suffix or even regular expressions. In
the main page, it is also possible to search for applications using the
first letters of each word, e.g. App Manager can be listed by
searching for am. Activity interceptor can be opened directly from the activities tab
by long clicking on the launch button, and similarly, activities can be
launched from the activity interceptor page with or without root, for
any users. Notice. Currently, activities opened via root cannot send the results back to
the original applications. Screen time widget is quite similar to Digital Wellbeing’s widget by
the same name. It displays the total screen time for the day along with
the top three apps from all users. Clear cache widget can be to clear cache from all the applications
directly from the home screen.6.5.1
Material 3 and More
6.5.1.0.1 Known issue
6.5.2
Wireless Debugging
6.5.3
Languages
6.5.4
Introducing App Explorer
.smali
file into
.java
for a better understanding of the reversed code. This
feature, if not needed, can be disabled in Settings > Enable/disable
features.6.5.5
Import Backups
from Other Applications
6.5.6
VirusTotal
6.5.7
Trigger
Profiles from the Automation Software
6.5.8
Improved Application
Installer
6.5.9
Component Blocking
6.5.10 Advanced Searching
6.5.12 Make the Best Use of
Interceptor
6.5.13 Widget: Screen Time
6.5.14 Widget: Clear Cache
Back up/restore feature is now finally out of beta! Read the corresponding guide to understand how it works.
Log viewer is essentially a
front-end for logcat
. It can be used to filter logs by
tag or pid (process ID), or even by custom filters.
Log levels AKA verbosity can also be configured. You can also save,
share and manage logs.
Lock App Manager with the screen lock configured for your device.
You can set any mode for any app ops that your device supports, either from the 1-click ops page or from the app ops tab.
You can now easily add selected apps to an existing profile using the batch operations.
App info tab now has many options, including the ability to change SSAID, network policy (i.e. background network usage), battery optimization, etc. Most of the tags used in this tab are also clickable, and if you click on them, you will be able to look at the current state or configure them right away.
Sort and filter options are now replaced by List Options which is highly configurable, including the ability to filter using profiles.
Interested in knowing about your device in just one page? Go to the bottom of the settings page.
Not interested in all the features that AM offers? You can disable some features in settings.
AM now has more than 19 languages! New languages include Farsi, Japanese and Traditional Chinese.
You can now import external signing keys in AM! For security, App Manager has its own encrypted KeyStore which can also be imported or exported.
Since APKMirror has removed encryption from their APKM files, it’s no longer necessary to decrypt them. As a result, the option to decrypt APKM files has been removed. Instead, this option is now provided by the UnAPKM extension which you can grab from F-Droid. So, if you have an encrypted APKM file and have this extension installed, you can open the file directly in AM.
Profiles finally closes the related
issue. Profiles can be used to execute certain tasks repeatedly
without doing everything manually. A profile can be applied (or invoked)
either from the Profiles page or from
the home screen by creating shortcuts. There are also some presets which
consist of debloating profiles taken from Universal
Android Debloater. Exporting rules and applying permissions are not currently
working. Profiles are applied for all users.6.7.1.0.1 Known limitations
Intent
Intercept works as a man-in-the-middle between source and
destination, that is, when you open a file or URL with another app, you
can see what is being shared by opening it with Interceptor first. You
can also add or modify the intents before sending them to the
destination. Additionally, you can double-click on any exportable
activities in the Activities tab in the App Details page to open them in
the Interceptor to add more configurations. Editing extras is not currently possible.6.7.2.0.1 Known limitation
When I released a small tool called UnAPKM, I promised that similar feature will be available in App Manager. I am proud to announce that you can open APKM files directly in the App Info page or convert them to APKS or install them directly.
App manager now supports multiple users! For now, this requires root or ADB. But no-root support is also being considered. If you have multiple users enabled and click on an app installed in multiple profiles, an alert prompt will be displayed where you can select the user.
Thanks to the contributors, we have one more addition to the language club: French. You can add more languages or improve existing translations at Weblate.
If App Manager crashes, you can now easily report the crash from the notifications which opens the share options. Crashes are not reported by App Manager, it only redirects you to your favourite Email client.
Added support for Android 11. Not everything may work as expected though.
In settings page, you can set install locations such as auto (default), internal only and prefer external.
In settings page, you can also set default APK installer (root/ADB only) instead of App Manager.
In settings page, you can allow App Manager to display multiple users during APK installation.
In settings page, you can choose to sign APK files before installing
them. You can also select which signature scheme to use in the APK
signing option in settings. Currently, only a generic key is used to sign APK files6.7.8.4.1 Known limitation
As promised, it is now possible to select splits. AM also provides
recommendations based on device configurations. If the app is already
installed, recommendations are provided based on the installed app. It
is also possible to downgrade to a lower version without data loss if
the device has root or ADB. But it should be noted that not all app can
be downgraded. Installer is also improved to speed up the installation
process, especially, for root users. If the app has already been
installed and the new (x)apk(s) is newer or older or the same version
with a different signature, AM will display a list of changes similar to
What’s New before prompting the user to install the
app. This is useful if the app has introduced tracker components, new
permissions, etc. Large app can take a long time to fetch app info, and therefore,
it may take a long time display the installation prompt. If the apk is not located in the internal storage, the app has to
be cached first which might also take a long time depending on the size
of the apk.6.8.1.0.1 Known Limitations
Exodus page is now replaced with scanner page. Scanner page contains not only a list of trackers but also a list of used libraries. This is just a start. In the future, this page will contain more in depth analysis of the app.
System Config lists various system configurations and whitelists/blacklists included in Android by either OEM/vendor, AOSP or even some Magisk modules. Root users can access this option from the overflow menu in the main page. There isn’t any official documentation for these options therefore it’s difficult to write a complete documentation for this page. I will gradually add documentations using my own knowledge. However, some functions should be understandable by their name.
Thanks to the contributors, AM now has more than 12 languages. New languages include Bengali, Hindi, Norwegian, Polish, Russian, Simplified Chinese, Turkish and Ukrainian.
More tags are added in the app info tab such as KeyStore (apps with KeyStore items), Systemless app (apps installed via Magisk), Running (apps that are running). For external apk, two more options are added namely Reinstall and Downgrade. Now it is possible to share an apk via Bluetooth. For system apps, it is possible to uninstall updates for root/ADB users. But like the similar option in the system settings, this operation will clear all app data. As stated above, exodus has been replaced with scanner.
It is now possible to sort and filter processes in this tab. Also, the three big buttons are replaced with an easy-to-use three dot menu. Previously the memory usage was wrong which is fixed in this version.
Toybox (an alternative to busybox) is bundled with AM. Although Android has this utility built-in from API 23, toybox is bundled in order to prevent buggy implementations and to support API < 23.
Component blocker seemed to be problematic in the previous version, especially when global component blocking is enabled. The issues are mostly fixed now.
Caution.
The component blocking mechanism is no longer compatible with v2.5.6 due to various security issues. If you have this version, upgrade to v2.5.13 or earlier versions first. After that, enable global component blocking and disable it again.
Value of various app ops depend on their parent app ops. Therefore, when you allow/deny an app op, the parent of the app op gets modified. This fixes the issues some users have been complaining regarding some app ops that couldn’t be changed.
If an app has the target API 23 or less, its permissions cannot be
modified using the pm grant …
command. Therefore, for such
apps, option to toggle permission has been disabled.
The signature tab is improved to support localization. It also displays multiple checksums for a signature.
Manifest no longer crashes if the size of the manifest is too long. Generated manifest are now more accurate than before.
Bundled app formats such as apks and
xapk are now supported. You can install these apps
using the regular installation buttons. For root and adb users, apps are
installed using shell, and for non-root users, the platform default
method is used. Currently all splits apks are installed. But this
behaviour is going to change in the next release. If you only need a few
splits instead of all, extract the APKS or
XAPK file, and then, create a new zip file with your
desired split apks and replace the ZIP extension with
APKS. Now, open it with AM. There is no progress dialog to display the installation
progress.6.9.1.0.1 Known Limitations
You can now install APK, APKS or
XAPK directly from your favourite browser or file
manager. For apps that need updates, a What’s New
dialog is displayed showing the changes in the new version. Downgrade is not yet possible. There is no progress dialog to display the installation progress.
If you cannot interact with the current page, wait until the
installation is finished.6.9.2.0.1 Known Limitations
In the Settings page, a new option is added which can be used to remove all blocking rules configured within App Manager.
App Ops are now generated using a technique similar to AppOpsX. This should decrease the loading time significantly in the App Ops tab.
In the App Ops tab, a menu item is added which can be used to list only active app ops without including the default app ops. The preference is saved in the shared preferences.
Often the App Ops tab may not be responsive. If that’s the case, restart App Manager.
ADB shell commands are now executed using a technique similar to
AppOpsX (This is the free alternative of AppOps by Rikka.).
This should dramatically increase the execution time. AM can often crash or become not responsive. If that’s the case,
restart App Manager.6.9.5.0.1 Known Limitation
Add an option to filter apps that has at least one activity.
Apk files are now saved as app name_version.extension
instead of package.name.extension
.
Added a foreground service to run batch operations. The result of the operation is displayed in a notification. If an operation has failed for some packages, clicking on the notification will open a dialog box listing the failed packages. There is also a Try Again button on the bottom which can be used to perform the operation again for the failed packages.
Replaced Linux kill with force-stop.
Added German and Portuguese (Brazilian) translations. Not all translations are verified yet.6.9.9.0.1 Known Limitation
Install app only for the current user at the time of restoring backups. Support for split apks is also added.
Data backup feature is now considered unstable. If you encounter any problem, please report to me without hesitation.
App Ops (short hand for Application
Operations) are used by Android system (since Android 4.3) to
control application permissions. The user can control some
permissions, but only the permissions that are considered dangerous (and
Google thinks knowing your phone number isn’t a dangerous thing). So,
app ops seems to be the one we need if we want to install apps like
Facebook and it’s Messenger (the latter literary records everything if
you live outside the EU) and still want some privacy and/or
security. Although certain features of app ops were available in
Settings and later in hidden settings in older version of Android, it’s
completely hidden in newer versions of Android and is continued to be
kept hidden. Now, any app with
android.Manifest.permission.GET_APP_OPS_STATS
permission can get the app ops information for other applications but
this permission is hidden from users and can only be enabled using ADB
or root. Still, the app with this permission cannot grant or revoke
permissions (actually mode of operation) for apps other than itself
(with limited capacity, of course). To modify the ops of other app, the
app needs
android.Manifest.permission.UPDATE_APP_OPS_STATS
permissions which isn’t accessible via pm
command. So, you
cannot grant it via root or ADB, the permission is only granted to the
system apps. There are very few apps who support disabling permissions
via app ops. The best one to my knowledge is AppOpsX. The main (visible)
difference between my app (AppManager) and this app is that the latter
also provides you the ability to revoke internet permissions (by writing
ip tables). One crucial problem that I faced during the development of
the app ops API is the lack of documentation in English language.
Figure 1 describes the process of changing
and processing permission. AppOpsManager can be used to manage
permissions in Settings app. AppOpsManager is also
useful in determining if a certain permission (or operation) is granted
to the application. Most of the methods of
AppOpsManager are accessible to the user app but unlike
a system app, it can only be used to check permissions for any app or
for the app itself and start or terminating certain operations.
Moreover, not all operations are actually accessible from this Java
class. AppOpsManager holds all the necessary constants
such as OP_*
,
OPSTR_*
, MODE_*
which describes
operation code, operation string and mode of operations respectively. It
also holds necessary data structures such as PackageOps and OpEntry.
PackageOps holds OpEntry for a
package, and OpEntry, as the name suggests, describes
each operation.
AppOpService
is completely hidden from a user
application but accessible to the system applications. As it can be seen
in Figure 1, this is the class that does the
actual management stuff. It contains data structures such as
Ops to store basic package info and Op
which is similar to OpEntry of
AppOpsManager. It also has Shell which
is actually the source code of the appops command line tool. It writes
configurations to or read configurations from /data/system/appops.xml
. System
services calls AppOpsService to find out what an
application is allowed and what is not allowed to perform, and
AppOpsService determines these permissions by parsing
/data/system/appops.xml
. If no custom values are present in
appops.xml, it returns the default mode available in
AppOpsManager.
AppOpsManager stands for application operations manager. It consists of various constants and classes to modify app operations.
OP_*
ConstantsOP_*
are the integer constants starting from
0
. OP_NONE
implies that no operations are
specified whereas _NUM_OP
denotes the number of operations
defined in OP_*
prefix. While they denote each operation,
the operations are not necessarily unique. In fact, there are many
operations that are actually a single operation denoted by multiple
OP_*
constant (possibly for future use). Vendors may define
their own op based on their requirements. MIUI is one of the vendors who
are known to do that.
public static final int OP_NONE = -1;
public static final int OP_COARSE_LOCATION = 0;
public static final int OP_FINE_LOCATION = 1;
public static final int OP_GPS = 2;
public static final int OP_VIBRATE = 3;
...
public static final int OP_READ_DEVICE_IDENTIFIERS = 89;
public static final int OP_ACCESS_MEDIA_LOCATION = 90;
public static final int OP_ACTIVATE_PLATFORM_VPN = 91;
public static final int _NUM_OP = 92;
Whether an operation is unique is defined by
sOpToSwitch
. It maps each operation to another operation or
to itself (if it’s a unique operation). For instance,
OP_FINE_LOCATION
and OP_GPS
are mapped to
OP_COARSE_LOCATION
.
Each operation has a private name which are described by
sOpNames
. These names are usually the same names as the
constants without the OP_
prefix. Some operations have
public names as well which are described by sOpToString
.
For instance, OP_COARSE_LOCATION
has the public name
android:coarse_location.
As a gradual process of moving permissions to app ops, there are
already many permissions that are defined under some operations. These
permissions are mapped in sOpPerms
. For example, the
permission
android.Manifest.permission.ACCESS_COARSE_LOCATION is
mapped to OP_COARSE_LOCATION
. Some operations may not have
any associated permissions which have null
values.
As described in the previous section, operations that are configured
for an app are stored at /data/system/appops.xml
. If an
operation is not configured, then whether system will allow that
operation is determined from sOpDefaultMode
. It lists the
default mode for each operation.
MODE_*
ConstantsMODE_*
constants also integer constants starting from
0
. These constants are assigned to each operation
describing whether an app is authorised to perform that operation. These
modes usually have associated names such as allow for
MODE_ALLOWED
, ignore for
MODE_IGNORED
, deny for
MODE_ERRORED
(a rather misnomer), default
for MODE_DEFAULT
and foreground for
MODE_FOREGROUND
.
MODE_ALLOWED
. The app is allowed to
perform the given operation
MODE_IGNORED
. The app is not
allowed to perform the given operation, and any attempt to perform the
operation should silently fail, i.e. it should not cause the
app to crash
MODE_ERRORED
. The app is not
allowed to perform the given operation, and this attempt should cause it
to have a fatal error, typically a
SecurityException
MODE_DEFAULT
. The app should use
its default security check, specified in
AppOpsManager
MODE_FOREGROUND
. Special mode that
means “allow only when app is in foreground.” This mode was added in
Android 10
MODE_ASK
. This is a custom mode
used by MIUI whose uses are unknown.
AppOpsManager.PackageOps is a data structure to store all the OpEntry for a package. In simple terms, it stores all the customised operations for a package.
public static class PackageOps implements Parcelable {
private final String mPackageName;
private final int mUid;
private final List<OpEntry> mEntries;
...
}
As can be seen in Listing 2, it stores all OpEntry for a package as well as the corresponding package name and its kernel user ID.
AppOpsManager.OpEntry is a data structure that stores a single operation for any package.
public static final class OpEntry implements Parcelable {
private final int mOp;
private final boolean mRunning;
private final @Mode int mMode;
private final @Nullable LongSparseLongArray mAccessTimes;
private final @Nullable LongSparseLongArray mRejectTimes;
private final @Nullable LongSparseLongArray mDurations;
private final @Nullable LongSparseLongArray mProxyUids;
private final @Nullable LongSparseArray<String> mProxyPackageNames;
...
}
Here:
mOp
: Denotes one of the OP_*
constants
mRunning
: Whether the operation is in progress
(i.e. the operation has started but not finished yet). Not all
operations can be started or finished this way
mMOde
: One of the MODE_*
constants
mAccessTimes
: Stores all the available access
times
mRejectTimes
: Stores all the available reject
times
mDurations
: All available access durations, checking
this with mRunning
will tell you for how long the app is
performing a certain app operation
mProxyUids
: No documentation found
mProxyPackageNames:
No documentation found
TODO
TODO
Latest appops.xml
has the following format: (This DTD is
made by me and by no means perfect, has compatibility issues.)
<!DOCTYPE app-ops [
<!ELEMENT app-ops (uid|pkg)*>
<!ATTLIST app-ops v CDATA #IMPLIED>
<!ELEMENT uid (op)*>
<!ATTLIST uid n CDATA #REQUIRED>
<!ELEMENT pkg (uid)*>
<!ATTLIST pkg n CDATA #REQUIRED>
<!ELEMENT uid (op)*>
<!ATTLIST uid
n CDATA #REQUIRED
p CDATA #IMPLIED>
<!ELEMENT op (st)*>
<!ATTLIST op
n CDATA #REQUIRED
m CDATA #REQUIRED>
<!ELEMENT st EMPTY>
<!ATTLIST st
n CDATA #REQUIRED
t CDATA #IMPLIED
r CDATA #IMPLIED
d CDATA #IMPLIED
pp CDATA #IMPLIED
pu CDATA #IMPLIED>
]>
The instruction below follows the exact order given above:
app-ops
: The root element. It can contain any number
of pkg
or package uid
v
: (optional, integer) The version number (default:
NO_VERSION
or -1
)
pkg
: Stores package info. It can contain any number
of uid
n
: (required, string) Name of the package
Package uid
: Stores package or packages info
n
: (required, integer) The user ID
uid
: The package user ID. It can contain any number
of op
n
: (required, integer) The user ID
p
: (optional, boolean) Is the app is a
private/system app
op
: The operation, can contain st
or
nothing at all
n
: (required, integer) The op name in integer,
i.e. AppOpsManager.OP_*
m
: (required, integer) The op mode,
i.e. AppOpsManager.MODE_*
st
: State of operation: whether the operation is
accessed, rejected or running (not available on old versions)
n
: (required, long) Key containing flags and
uid
t
: (optional, long) Access time (default:
0
)
r
: (optional, long) Reject time (default:
0
)
d
: (optional, long) Access duration (default:
0
)
pp
: (optional, string) Proxy package name
pu
: (optional, integer) Proxy package uid
This definition can be found at AppOpsService.
appops
or cmd appops
(on latest versions)
can be accessible via ADB or root. This is an easier method to get or
update any operation for a package (provided the package name is known).
The help page of this command is self-explanatory:
AppOps service (appops) commands:
help
Print this help text.
start [--user <USER_ID>] <PACKAGE | UID> <OP>
Starts a given operation for a particular application.
stop [--user <USER_ID>] <PACKAGE | UID> <OP>
Stops a given operation for a particular application.
set [--user <USER_ID>] <[--uid] PACKAGE | UID> <OP> <MODE>
Set the mode for a particular application and operation.
get [--user <USER_ID>] <PACKAGE | UID> [<OP>]
Return the mode for a particular application and optional operation.
query-op [--user <USER_ID>] <OP> [<MODE>]
Print all packages that currently have the given op in the given mode.
reset [--user <USER_ID>] [<PACKAGE>]
Reset the given application or all applications to default modes.
write-settings
Immediately write pending changes to storage.
read-settings
Read the last written settings, replacing current state in RAM.
options:
<PACKAGE> an Android package name or its UID if prefixed by --uid
<OP> an AppOps operation.
<MODE> one of allow, ignore, deny, or default
<USER_ID> the user id under which the package is installed. If --user is not
specified, the current user is assumed.