aboutsummaryrefslogtreecommitdiff
path: root/zh-cn/devices/tech/config/filesystem.html
diff options
context:
space:
mode:
Diffstat (limited to 'zh-cn/devices/tech/config/filesystem.html')
-rw-r--r--zh-cn/devices/tech/config/filesystem.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/zh-cn/devices/tech/config/filesystem.html b/zh-cn/devices/tech/config/filesystem.html
index da333bc6..4d8bfb7c 100644
--- a/zh-cn/devices/tech/config/filesystem.html
+++ b/zh-cn/devices/tech/config/filesystem.html
@@ -37,7 +37,7 @@
<aside class="note"><strong>注意</strong>:虽然您仍可以使用<a href="#older">旧版 Android 中的文件系统替换方法</a>,但不能同时再使用新的 AID 机制。建议您尽可能使用新的机制。</aside>
<h2 id="adding-android-ids-aids">添加 Android ID (AID)</h2>
-<p>Android 8.0 从 Android 开源项目 (AOSP) 中移除了 <code>android_ids[]</code> 数组。所有适合 AID 的名称都改为在生成 Bionic <code>android_ids[]</code> 数组时从 <code>system/core/include/private/android_filesystem_config.h</code> 标头文件生成。这种机制会提取与 <code>define</code> 匹配的所有 <code>AID_*</code>,且 <strong></strong> 会变为小写名称。</p>
+<p>Android 8.0 从 Android 开源项目 (AOSP) 中移除了 <code>android_ids[]</code> 数组。所有适合 AID 的名称都改为在生成 Bionic <code>android_ids[]</code> 数组时从 <code>system/core/include/private/android_filesystem_config.h</code> 标头文件生成。这种工具会提取与 <code>define</code> 匹配的所有 <code>AID_*</code>,且 <strong>*</strong> 会变为小写名称。</p>
<p>例如,在 <code>private/android_filesystem_config.h</code> 中:</p>
@@ -56,9 +56,9 @@
<p>
要启用新的 AID 机制,请在 <code>BoardConfig.mk</code> 文件中设置 <code>TARGET_FS_CONFIG_GEN</code>。此变量含有配置文件列表,使您可以根据需要附加文件。</p>
-<aside class="caution"><strong>注意</strong>:请勿通过旧版 Android 中早期的 <code>TARGET_FS_CONFIG_GEN</code> 方法使用 <code>TARGET_ANDROID_FILESYSTEM_CONFIG_H</code>!否则,您会收到错误提示。</aside>
+<aside class="caution"><strong>注意</strong>:请勿通过旧版 Android 中早期的 <code>TARGET_ANDROID_FILESYSTEM_CONFIG_H</code> 方法使用 <code>TARGET_FS_CONFIG_GEN</code>!否则,您会收到错误提示。</aside>
-<p>按照惯例,配置文件使用名称 <code>config.fs</code>,但在实践中,您可以使用任何名称。<code>config.fs</code> 文件采用 <a href="https://docs.python.org/2/library/configparser.html" class="external">Python ConfigParser ini 格式</a>,并包含 caps 部分(用于配置文件系统权能)和 AID 部分(用于配置 OEM 专属 AID)。
+<p>按照惯例,配置文件使用名称 <code>config.fs</code>,但在实际使用中,您可以使用任何名称。<code>config.fs</code> 文件采用 <a href="https://docs.python.org/2/library/configparser.html" class="external">Python ConfigParser ini 格式</a>,并包含 caps 部分(用于配置文件系统权能)和 AID 部分(用于配置 OEM 专属 AID)。
</p>
<h3 id="configuring-the-caps-section">配置 caps 部分</h3>
@@ -129,7 +129,7 @@
<td><code>value</code></td>
<td>&lt;number&gt;</td>
<td>有效的 C 样式的数字字符串(十六进制、八进制、二进制和十进制)。
- <br /><br />使用同一值选项指定多个部分<strong>或</strong>指定超出收录的 OEM 范围(在 <code>system/core/include/private/android_filesystem_config.h</code> 中指定)的值,都属于错误的做法:
+ <br /><br />使用同一值选项指定多个部分<strong>或</strong>指定超出收录的 OEM 范围(在 <code>system/core/include/private/android_filesystem_config.h</code> 中指定)的值的做法都是错误:
<ul>
<li>AID_OEM_RESERVED_START(2900) - AID_OEM_RESERVED_END(2999)</li>
<li>AID_OEM_RESERVED_2_START(5000) - AID_OEM_RESERVED_2_END(5999)</li>
@@ -211,7 +211,7 @@ caps: SYS_ADMIN | SYS_NICE
<p>您可以使用 <code>build/tools/fs_config</code> 中的 <code>fs_config_generate</code> 工具生成相应的二进制文件 <code>/system/etc/fs_config_dirs</code> 和 <code>/system/etc/fs_config_files</code>。该工具使用 <code>libcutils</code> 库函数 (<code>fs_config_generate()</code>) 管理放入缓冲区内的 DAC 需求,并为头文件定义规则来规定 DAC 规则的用法。</p>
-<p>要使用该工具,请在 <code>device/<em>vendor</em>/<em>device</em>/android_filesystem_config.h</code> 中创建头文件以用作替换文件。该文件必须使用 <code>system/core/include/private/android_filesystem_config.h</code> 中定义的 <code>structure fs_path_config</code> 格式,并对目录和文件符号进行以下结构初始化:</p>
+<p>要使用该工具,请在 <code>device/<em>vendor</em>/<em>device</em>/android_filesystem_config.h</code> 中创建头文件作为替换文件。该文件必须使用 <code>system/core/include/private/android_filesystem_config.h</code> 中定义的 <code>structure fs_path_config</code> 格式,并对目录和文件符号进行以下结构初始化:</p>
<ul>
<li>对于目录,请使用 <code>android<strong>_device</strong>_dirs[]</code>。</li>
<li>对于文件,请使用 <code>android<strong>_device</strong>_files[]</code>。</li>