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

一个空间多个php网站做网站切片

一个空间多个php网站,做网站切片,枣强网站建设价格,老域名全部失效请拿笔记好Apex的由来,我们都知道普通的apk我们可以通过应用商店playstore等进行更新,apex的引入是google希望也能通过playstore更新bin文件.so etc配置文件等类型文件. 这些文件的安装实际通过apexd来进行,现在我们来解析一下apexd, apexd的启动分为两个阶段,bootstrap和普通apexd启…

Apex的由来,我们都知道普通的apk我们可以通过应用商店playstore等进行更新,apex的引入是google希望也能通过playstore更新bin文件.so etc配置文件等类型文件. 这些文件的安装实际通过apexd来进行,现在我们来解析一下apexd, apexd的启动分为两个阶段,bootstrap和普通apexd启动,下面分析apexd bootstrap

1. rc文件启动
/system/core/rootdir/init.rc#80

 本阶段启动三个bootstrap apex,分别为com.android.i18n,com.android.runtime com.android.tzdata,在bootstrap 阶段主要就是提供 critical shared libraries


77     # Run apexd-bootstrap so that APEXes that provide critical libraries
78     # become available. Note that this is executed as exec_start to ensure that
79     # the libraries are available to the processes started after this statement.
80     exec_start apexd-bootstrap    
2. main函数
/system/apex/apexd/apexd_main.cpp#118
int main(int /*argc*/, char** argv) {
...
118    android::apex::SetConfig(android::apex::kDefaultConfig); → 全局config
...
151    if (has_subcommand) {
152      return HandleSubcommand(argv);    →  这里走 apexd --bootstrap
153    }

全局config 就是这些常量:

61  static const ApexdConfig kDefaultConfig = {
62      kApexStatusSysprop,       →    kApexStatusSysprop = "apexd.status" apex的状态
63      kApexPackageBuiltinDirs,   →  所有apex文件所在的目录data、product、system、system_ext、vendor
64      kActiveApexPackagesDataDir,   →  kActiveApexPackagesDataDir = "/data/apex/active"
65      kApexDecompressedDir,         →    kApexDecompressedDir = "/data/apex/decompressed";
66      kOtaReservedDir,             →        kOtaReservedDir = "/data/apex/ota_reserved";
67      kApexHashTreeDir,           →   kApexHashTreeDir = "/data/apex/hashtree";
68      kStagedSessionsDir,        →   StagedSessionsDir = "/data/app-staging"
69      kMetadataSepolicyStagedDir,  →  kMetadataSepolicyStagedDir = "/metadata/sepolicy/staged";
70      kVmPayloadMetadataPartitionProp,  →  kVmPayloadMetadataPartitionProp = "apexd.payload_metadata.path"
71      "u:object_r:staging_data_file",  → staging_data_file的 file contexts
72  };
3. OnBootstrap()
 
/system/apex/apexd/apexd_main.cpp#38
36  int HandleSubcommand(char** argv) {
37    if (strcmp("--bootstrap", argv[1]) == 0) {
38      SetDefaultTag("apexd-bootstrap");
39      LOG(INFO) << "Bootstrap subcommand detected";
40      return android::apex::OnBootstrap();
41    }/system/apex/apexd/apexd.cpp#2566
2566  int OnBootstrap() {
2567    ATRACE_NAME("OnBootstrap");
2568    auto time_started = boot_clock::now();
2569  
2570    ApexFileRepository& instance = ApexFileRepository::GetInstance(); → 创建个实例 啥也没做
2571    Result<void> status =
2572        instance.AddPreInstalledApex(gConfig->apex_built_in_dirs);  →  3.1 scan kApexPackageBuiltinDirs下的所有apex, 详见3.1.1
2573    if (!status.ok()) {
2574      LOG(ERROR) << "Failed to collect APEX keys : " << status.error();
2575      return 1;
2576    }
2577  
2578    const auto& pre_installed_apexes = instance.GetPreInstalledApexFiles(); → 从全局变量中得到 pre_installed_store_
2579    int loop_device_cnt = pre_installed_apexes.size();
2580    // Find all bootstrap apexes
2581    std::vector<ApexFileRef> bootstrap_apexes;
2582    for (const auto& apex : pre_installed_apexes) {      →  遍历 所有apexfile
2583      if (IsBootstrapApex(apex.get())) {      →    判断是否是bootstrap apex,有三个com.android.i18n com.android.runtime com.android.tzdata
2584        LOG(INFO) << "Found bootstrap APEX " << apex.get().GetPath();
2585        bootstrap_apexes.push_back(apex);
2586        loop_device_cnt++;
2587      }
2588      if (apex.get().GetManifest().providesharedapexlibs()) {
2589        LOG(INFO) << "Found sharedlibs APEX " << apex.get().GetPath();
2590        // Sharedlis APEX might be mounted 2 times:
2591        //   * Pre-installed sharedlibs APEX will be mounted in OnStart
2592        //   * Updated sharedlibs APEX (if it exists) will be mounted in OnStart
2593        //
2594        // We already counted a loop device for one of these 2 mounts, need to add
2595        // 1 more.
2596        loop_device_cnt++;
2597      }
259
http://www.yayakq.cn/news/793097/

相关文章:

  • 谁有做开档棉裤的网站啊网站建设和优
  • 常州网站建设市场网站商业授权
  • 网站开发的成本怎么做网站卖保险
  • 国际大型门户网站石家庄专业网站制
  • 与女鬼做的网站做网站付款会有凭证吗
  • wordpress 4.9.2seo内部优化具体做什么
  • 苏州诗华洛网站建设成都百度快照优化排名
  • 网站建设分为几个阶段北京朝阳区居家办公
  • 网站建设立项申请书微信公众平台开发微网站
  • 网站建设mingxinsh做民宿上几家网站好
  • 昆明公司网站制作xp怎么建设网站
  • 长沙竞价网站建设价格摄影学习网站
  • 精品资源共享课网站建设怎样在网站上做推广
  • 国际网站建设招标做网站字体格式用锐利吗
  • 网站建设费专票会计分录站长素材网站官网
  • 清迈城市建设网站wix做的网站
  • 龙岩建设局网站罗小波找个会做网站的 一起做网站
  • 福田园岭网站建设国家免费技能培训平台
  • 重庆建网站派臣公司平面设计提升培训机构
  • 门户网站开发需求分析报告百度为什么不收录网站的某个版块
  • 外贸网站怎么注册企业网站seo服务
  • 网站访问大小 计算流量昆山网站建设书生商友
  • 淘宝客做的好的几个网站福安做网站
  • 做网站卖产品怎么开展网页版微信登录提示二维码已失效
  • 特色美食网站建设个人网站制作教程
  • 盾思途旅游网站建设网页建站工具
  • 音乐网站是否可以做浅度链接装修设计公司起名
  • 扬州建设信用网站修改网站主目录的位置
  • 如今做啥网站能致富建网站报价 优帮云
  • 网站给部分文字做遮挡代码常州微信网站建设平台