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

网站建设内容方法国内网站做得好的公司

网站建设内容方法,国内网站做得好的公司,石大远程网页设计与网站建设答案,用c语言怎么做网站需求描述#xff1a; user版本默认是不会开启root权限的#xff0c;但是一般性能版本需要设置CPU GPU DDR performance或者监听节点信息等debug手段去验证当前问题是否与CPU GPU DDR有关系。 基线代码判断逻辑#xff1a; 1.adb代码会检测相关属性 ro.secure ro.debugga…需求描述  user版本默认是不会开启root权限的但是一般性能版本需要设置CPU GPU DDR performance或者监听节点信息等debug手段去验证当前问题是否与CPU GPU DDR有关系。 基线代码判断逻辑 1.adb代码会检测相关属性 ro.secure ro.debuggable (通过调用__android_log_is_debuggable()获取返回值) 2.代码path 2.1 adbd启动时检查属性决定是否进行权限降级到AID_SHELL pathsystem/adb/core/daemon/main.cpp line:121 if (should_drop_privileges()){ … … 2.2 system/adb/core/下搜索__android_log_is_debuggable() 3.修改思路 3.1 should_drop_privileges() 修改强制返回false保持adb root用户级别 3.2 __android_log_is_debuggable() 返回true   packages/modules/adb/daemon/main.cpp 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;std::string build_prop android::base::GetProperty(ro.build.type, );bool adb_build_root (build_prop userdebug);if (adb_build_root) {return false;}// ... 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; } 具体实现 1.关闭ro.secure、ro.adb.secure打开ro.debuggable 文件路径qssi/build/make/core/main.mk 详细修改 diff --git a/core/main.mk b/core/main.mk index 1579294..f223432 100644 --- a/core/main.mkb/core/main.mk-365,11 365,11 tags_to_install :ifneq (,$(user_variant))# Target is secure in user builds. - ADDITIONAL_SYSTEM_PROPERTIES ro.secure1ADDITIONAL_SYSTEM_PROPERTIES ro.secure0ADDITIONAL_SYSTEM_PROPERTIES security.perf_harden1ifeq ($(user_variant),user) - ADDITIONAL_SYSTEM_PROPERTIES ro.adb.secure1ADDITIONAL_SYSTEM_PROPERTIES ro.adb.secure0endififeq ($(user_variant),userdebug)-377,7 377,7 tags_to_install debugelse# Disable debugging in plain user builds. - enable_target_debugging :enable_target_debugging : trueendif# Disallow mock locations by default for user builds-399,7 399,7 ADDITIONAL_SYSTEM_PROPERTIES dalvik.vm.lockprof.threshold500else # !enable_target_debugging# Target is less debuggable and adbd is off by default - ADDITIONAL_SYSTEM_PROPERTIES ro.debuggable0ADDITIONAL_SYSTEM_PROPERTIES ro.debuggable1endif # !enable_target_debugging## eng ## 2.should_drop_privileges return false,allow adb root 文件路径qssi/packages/modules/adb/daemon/main.cpp 详细修改 diff --git a/daemon/main.cpp b/daemon/main.cpp index 1d4e626..6c9792f 100644 --- a/daemon/main.cppb/daemon/main.cpp-74,6 74,7 //// ro.secure:// Drop privileges by default. Set to 1 on userdebug and user builds.return false;bool ro_secure android::base::GetBoolProperty(ro.secure, true);bool ro_debuggable __android_log_is_debuggable(); 3.ALLOW_ADBD_DISABLE_VERITY1 文件路径qssi/system/core/fs_mgr/Android.bp 详细修改 diff --git a/fs_mgr/Android.bp b/fs_mgr/Android.bp index 49761ac..ac1c31d 100644 --- a/fs_mgr/Android.bpb/fs_mgr/Android.bp-109,7 109,8 libfstab,],cppflags: [ - -DALLOW_ADBD_DISABLE_VERITY0,-UALLOW_ADBD_DISABLE_VERITY,-DALLOW_ADBD_DISABLE_VERITY1,],product_variables: {debuggable: {-237,7 238,8 fs_mgr_remount.cpp,],cppflags: [ - -DALLOW_ADBD_DISABLE_VERITY0,-UALLOW_ADBD_DISABLE_VERITY,-DALLOW_ADBD_DISABLE_VERITY1,],product_variables: {debuggable: { 4.close selinux    enforcePermissive 文件路径qssi/system/core/init/selinux.cpp 详细修改 diff --git a/init/selinux.cpp b/init/selinux.cpp index 6ae4bc0..4d50cb6 100644 --- a/init/selinux.cppb/init/selinux.cpp-124,6 124,7 bool IsEnforcing() {// close selinux for user version with rootreturn false;#if defined(LCT_BUILD_TYPE_FACTORY)return false;#endif 5.sepolicy 文件路径qssi/system/sepolicy/Android.mk 详细修改 diff --git a/Android.mk b/Android.mk index a2793af..da5cebf 100644 --- a/Android.mkb/Android.mk-613,7 613,7 ifneq ($(filter address,$(SANITIZE_TARGET)),)local_fc_files $(wildcard $(addsuffix /file_contexts_asan, $(PLAT_PRIVATE_POLICY)))endif -ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) ifneq (,$(filter user userdebug eng,$(TARGET_BUILD_VARIANT)))local_fc_files $(wildcard $(addsuffix /file_contexts_overlayfs, $(PLAT_PRIVATE_POLICY)))endif
http://www.pierceye.com/news/850646/

相关文章:

  • 蒙icp备 网站建设学校网站建设管理
  • 做免费外贸网站册域名网站大全免黄
  • 祈网网站建设制作网站如何赚钱
  • 最讨厌网站门户类网站的主页设计
  • 国家建设环保局网站网站做的好赚钱吗
  • 如何设置网站服务器做标签的网站
  • 网站建设高端培训学校做网站交易平台
  • 公司网站建设收费优化网站排名解析推广
  • 昆明快速建站模板汽车网站建设多少钱
  • 网站注销主体注销广州联享网站建设公司怎么样
  • 中山seo建站新手建站教程报价单
  • 台州制作网站软件陈坤做直播在哪个网站
  • 北湖区网站建设公司企业主题wordpress 含演示数据
  • 网站建设简历自我评价做招聘信息的网站有哪些内容
  • 怎么和其它网站做友情链接网络营销师证怎么考
  • 百度推广要自己做网站吗做的视频传到哪个网站好
  • 个人建设门户网站 如何备案网站推广服务报价表
  • 广州企业网站建设哪家服务好西安家政公司网站建设
  • 住房与城乡建设部网站 黑龙江wordpress 采集系统
  • 阜阳网站建设云平台玉溪建设局门户网站
  • 网站建设什么原因最主要怎么制作网站首页
  • 网站建设深圳赶集网网页设计工程师工资
  • 哪家企业网站建设好闵行区网站制作
  • 重庆行业网站建设陕西省建设监理协会查询官方网站
  • 手机网站 尺寸网站规划的认识
  • 永川网站制作联系电话wordpress 参数 传递
  • 西宁市网站建设高端网站开发人员要求
  • 前端做商城网站需要多久yum wordpress
  • 便宜网站建设成都免费建网站视频教程
  • 班级网站自助建设功能没有充值入口的传奇