当前位置: 首页 > news >正文

网站开发前景好吗网页设计宣传推广方案

网站开发前景好吗,网页设计宣传推广方案,做二手车有哪些网站有哪些,网络架构七层作用背景 由于项目#xff08;MTK平台#xff09;上要实现userroot的版本#xff0c;供特殊用户使用。Android T上的方案无效#xff0c;经历了各种搜索查看资料#xff0c;和bsp大佬一起通宵奋战#xff0c;整出了方案。梳理记录下#xff0c;有需要的同学可以参考。 Root… 背景 由于项目MTK平台上要实现userroot的版本供特殊用户使用。Android T上的方案无效经历了各种搜索查看资料和bsp大佬一起通宵奋战整出了方案。梳理记录下有需要的同学可以参考。 Root代码实现原理 系统判断是否有root权限的地方在system/packages/modules/adb/daemon/main.cpp里面 should_drop_privileges()函数返回false表明可以root。 auth_required 是否需要adb鉴权adb弹框确认false时默认授权adb鉴权权限不需要弹框确认。 userdebug 版本可以root是因为ro.secure 0,代码路径build/core/main.mk 在should_drop_privileges()里面有判断 else # !user_variant# Turn on checkjni for non-user builds.ADDITIONAL_SYSTEM_PROPERTIES ro.kernel.android.checkjni1# Set device insecure for non-user builds.ADDITIONAL_SYSTEM_PROPERTIES ro.secure0 static bool should_drop_privileges() {// The properties that affect adb root and adb unroot are ro.secure and// ro.debuggable. In this context the names dont make the expected behavior// particularly obvious.//// ro.debuggable:// Allowed to become root, but not necessarily the default. Set to 1 on// eng and userdebug builds.//// ro.secure:// Drop privileges by default. Set to 1 on userdebug and user builds.bool ro_secure android::base::GetBoolProperty(ro.secure, true);bool ro_debuggable __android_log_is_debuggable();// Drop privileges if ro.secure is set...bool drop ro_secure;// ... except adb root lets you keep privileges in a debuggable build.std::string prop android::base::GetProperty(service.adb.root, );bool adb_root (prop 1);bool adb_unroot (prop 0);if (ro_debuggable adb_root) {drop false;}// ... and adb unroot lets you explicitly drop privileges.if (adb_unroot) {drop true;}return drop; } 实现中遇到的问题 1selinux问题主要解决问题 2缺少su 和remount执行的bin文件 具体实现方案和步骤 1特殊版本标识CUSTOM_ROOT_VERSIONyes编译版本时需要export下该环境变量 2添加flag路径build/core/soong_config.mk --- a/core/soong_config.mkb/core/soong_config.mk-58,6 58,9 $(call add_json_bool, Debuggable, $(filter userdebug eng,$(TARGET_BUILD_VARIANT)))$(call add_json_bool, Eng, $(filter eng,$(TARGET_BUILD_VARIANT))) $(call add_json_bool, ROOTVersion, $(filter yes,$(CUSTOM_ROOT_VERSION)))$(call add_json_str, DeviceName, $(TARGET_DEVICE)) 3),添加root版本的数据声明设置root相关的flag需要 --- a/android/variable.gob/android/variable.go-151,6 151,14 }} ROOTVersion struct {Cflags []stringCppflags []stringInit_rc []string}Pdk struct {Enabled *bool android:arch_variant} android:arch_variant-315,6 323,9 UseRBED8 *bool json:,omitemptyDebuggable *bool json:,omitemptyEng *bool json:,omitemptyROOTVersion *bool json:,omitemptyTreble_linker_namespaces *bool json:,omitempty 4),添加su 和 remount 模块在产品的mk文件中添加 PRODUCT_PACKAGES remount PRODUCT_PACKAGES su 5)在文件系统模块fs_mgr中添加ROOTVersion相应的flagproperty_service中设置ro.secure和ro.debuggable的值 --- a/fs_mgr/Android.bpb/fs_mgr/Android.bp-118,6 118,14 -DALLOW_ADBD_DISABLE_VERITY1,],},ROOTVersion: {cppflags: [-UALLOW_ADBD_DISABLE_VERITY,-DALLOW_ADBD_DISABLE_VERITY1,],},},header_libs: [libfiemap_headers,-248,6 256,17 clean_scratch_files.rc,],},ROOTVersion: {cppflags: [-UALLOW_ADBD_DISABLE_VERITY,-DALLOW_ADBD_DISABLE_VERITY1,],init_rc: [clean_scratch_files.rc,],},},symlinks: [clean_scratch_files,--- a/init/Android.bpb/init/Android.bp-149,6 149,13 -DSHUTDOWN_ZERO_TIMEOUT1,],},ROOTVersion: {cppflags: [-DROOT_VERSION,],},uml: {cppflags: [-DUSER_MODE_LINUX],},--- a/init/property_service.cppb/init/property_service.cpp-1328,6 1328,19 }} bool adbAuthorized false; #ifdef ROOT_VERSIONadbAuthorized true; #endifif (adbAuthorized) {InitPropertySet(ro.adb.secure, 0);InitPropertySet(ro.debuggable, 1);} for (const auto [name, value] : properties) { 6adb模块添加权限的判断和5中设置属性的值有重复此处是为了确保生效。有时间的同学可以验证下去掉这一步看是否生效。 should_drop_privileges()函数最后添加 #ifdef CUSTON_ROOT_VERSIONreturn false; #endif drop_privileges()函数最后添加 #ifdef CUSTON_ROOT_VERSIONauth_requiredfalse; #endif 7),最重要的一步更换sepolicy文件为debug版本的 (1)添加sepolicysrc文件是debug版本的修改路径system/sepolicy/android.bp --- a/Android.bpb/Android.bp},}se_policy_cil {name: userdebug_plat_sepolicy_debug.cil,src: :userdebug_plat_sepolicy.conf,additional_cil_files: [:sepolicy_technical_debt{.plat_private}],dist: {targets: [droidcore],}, } // A copy of the userdebug_plat_policy in GSI. (2),同路径下mk文件加入编译 --- a/Android.mkb/Android.mkLOCAL_REQUIRED_MODULES \userdebug_plat_sepolicy.cil \ifeq ($(strip $(CUSTOM_ROOT_VERSION)),yes) LOCAL_REQUIRED_MODULES \userdebug_plat_sepolicy_root.cil endif (3)代码中加载sepolicy地方GetUserdebugPlatformPolicyFile()也使用上面生成的sepolicy文件代码路径system/core/init/selinux.cpp std::optionalconst char* GetUserdebugPlatformPolicyFile() { #ifdef DF_VERSIONreturn /system/etc/selinux/userdebug_plat_sepolicy_root.cil; #endif 至此Android U版本userrootremount方案修改完成。
http://www.dnsts.com.cn/news/16690.html

相关文章:

  • 江苏外贸型网站制作c网站开发源代码
  • flash网站模板下载传智播客黑马程序员
  • 可以在哪些网站 APP做推广建站公司刚起步怎么接单
  • 做网站分什么公司注册资金实缴后多久可以取出
  • 成都公司注册地址wordpress对seo友好吗
  • 网站设计论文提纲大团企业网站制作
  • 南昌品牌网站建设天津网站的优化
  • 网站底部显示百度站点地图网站建设合同技术开发合同范本
  • 求网站资源懂的2021网站建设的目的及功能定位是啥
  • 襄阳网站seo诊断wordpress制作电商网站
  • 学生个人网站设计网站欣赏与创建网页
  • 如何选择网站开发公司做面食网站
  • iis不用dns解析还有什么办法也能一个ip对应多个网站吗国外室内设计网站排名
  • asp网站 会员注册重庆一般做一个网站需要多少钱
  • 重庆公司核名在哪个网站做网站网页文件
  • 网站建设的完整流程包括昆明岭蓝科技
  • 已注册域名怎么做网站呢wordpress python插件
  • 如何打开网站灯饰网站源码
  • 好的网站搭建公司网站对品牌的作用
  • 在婚恋网站上做红娘怎么样网站托管费用多少
  • 鄢陵县北京网站建设黑龙江省建设教育协会网站
  • 云虚拟主机做视频网站南山出名的互联网公司
  • 网站域名空间5个G的多少钱网站速成班有哪些专业
  • 网站优点介绍自己做本地视频网站
  • 百度推广登录手机版成都seo经理
  • 免费做自己的网站react网站开发
  • 做网站公司的出路汕头市企业网站建设品牌
  • 如何做国外外贸网站国外交互设计网站欣赏
  • 网站访客qq抓取原理温州快速网站推广公司
  • 开发网站怎样注册公司嘉兴网站制作费用