@
修改默认时区语言
文件路径
device/rockchip/rk356x/device.mk
在 PRODUCT_PROPERTY_OVERRIDES下增加以下内容
persist.sys.language=zh \
persist.sys.country=CN \
persist.sys.localevar= "" \
persist.sys.timezone=Asia/Shanghai \
ro.product.locale.language=zh \
ro.product.locale.region=CN
修改导航栏、状态栏
导航栏路径
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java
修改函数为 prepareNavigationBarView,在函数最后加上
volumeAddButton.setVisibility(View.GONE);
volumeSubButton.setVisibility(View.GONE);
screenshotButton.setVisibility(View.GONE);
poweroffButton.setVisibility(View.GONE);
rotationButton.setVisibility(View.GONE);
hideBarButton.setVisibility(View.GONE);
状态栏路径
frameworks/base/core/res/res/values/dimens.xml
修改status_bar_height_portrait的值为0dp
<dimen name="status_bar_height_portrait">0dp</dimen>
修改安装应用的权限
参考(89条消息) Android 10 默认授权app运行时权限(去掉运行时权限授权弹窗)_wq892373445的博客-CSDN博客_android权限弹窗
文件路径
frameworks/base/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
函数
private void restorePermissionState(@NonNull AndroidPackage pkg, boolean replace,
@Nullable String packageOfInterest, @Nullable PermissionCallback callback)
部分代码修改为:
if (bp.isNormal()) {
// For all apps normal permissions are install time ones.
grant = GRANT_INSTALL;
} else if (bp.isRuntime()) {
if (origPermissions.hasInstallPermission(bp.getName())
|| upgradedActivityRecognitionPermission != null) {
// Before Q we represented some runtime permissions as install permissions,
// in Q we cannot do this anymore. Hence upgrade them all.
grant = GRANT_UPGRADE;
} else {
// For modern apps keep runtime permissions unchanged.
// grant = GRANT_RUNTIME;
grant = GRANT_INSTALL;
}
} else if (bp.isSignature()) {
// For all apps signature permissions are install time ones.
allowedSig = grantSignaturePermission(perm, pkg, ps, bp, origPermissions);
if (allowedSig) {
grant = GRANT_INSTALL;
}
grant = GRANT_INSTALL;
}