Android编译ota包移除compatibility.zip

简介

Android有个Treble项目,详细的情况感兴趣的自行百度,简单的来说就是编译一个系统镜像能够在很多手机上运行。也就涉及到了兼容性问题,compatibility.zip里面有四个文件,分别说明,设备提供了什么,设备需要什么,框架提供了什么,框架需要什么。如果ota包,也就是卡刷包里面有这个压缩包,那么recovery会去校验,如果不匹配的话无法安装。相关链接:谷歌文档.

操作

顺着make otapackage 这个命令找,最后定位到了build/make/tools/releasetools/ota_from_target_files.py这个文件,里面有个AddCompatibilityArchiveIfTrebleEnabled方法,顾名思义。往下看有一处代码

  if not HasTrebleEnabled(target_zip, target_info):
    return

然后

def HasTrebleEnabled(target_files_zip, target_info):
  return (HasVendorPartition(target_files_zip) and
          target_info.GetBuildProp("ro.treble.enabled") == "true")

将HasTrebleEnabled方法改成返回False就行了

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. Introduction 1.1 Document Structure 1.1.1. Requirements by Device Type 1.1.2. Requirement ID 1.1.3. Requirement ID in Section 2 2. Device Types 2.1 Device Configurations 2.2. Handheld Requirements 2.2.1. Hardware 2.2.2. Multimedia 2.2.3. Software 2.2.4. Performance and Power 2.2.5. Security Model 2.3. Television Requirements 2.3.1. Hardware 2.3.2. Multimedia 2.3.3. Software 2.3.4. Performance and Power 2.4. Watch Requirements 2.4.1. Hardware 2.4.2. Multimedia 2.4.3. Software 2.4.4. Performance and Power 2.5. Automotive Requirements 2.5.1. Hardware 2.5.2. Multimedia 2.5.3. Software 2.5.4. Performance and Power 2.5.5. Security Model 2.6. Tablet Requirements 2.4.1. Hardware 3. Software 3.1. Managed API Compatibility 3.1.1. Android Extensions 3.1.2. Android Library 3.2. Soft API Compatibility 3.2.1. Permissions 3.2.2. Build Parameters 3.2.3. Intent Compatibility 3.2.3.1. Core Application Intents 3.2.3.2. Intent Resolution 3.2.3.3. Intent Namespaces 3.2.3.4. Broadcast Intents 3.2.3.5. Default App Settings 3.2.4. Activities on secondary displays 3.3. Native API Compatibility 3.3.1. Application Binary Interfaces 3.3.2. 32-bit ARM Native Code Compatibility 3.4. Web Compatibility 3.4.1. WebView Compatibility 3.4.2. Browser Compatibility 3.5. API Behavioral Compatibility 3.5.1. Background Restriction 3.6. API Namespaces 3.7. Runtime Compatibility 3.8. User Interface Compatibility 3.8.1. Launcher (Home Screen) 3.8.2. Widgets 3.8.3. Notifications 3.8.3.1. Presentation of Notifications 3.8.3.2. Notification Listener Service 3.8.3.3. DND (Do not Disturb) 3.8.4. Search 3.8.5. Alerts and Toasts 3.8.6. Themes 3.8.7. Live Wallpapers 3.8.8. Activity Switching 3.8.9. Input Management 3.8.10. Lock Screen Media Control 3.8.11. Screen savers (previously Dreams) 3.8.12. Location 3.8.13. Unicode and Font 3.8.14. Multi-windows 3.8.15. Display Cutout 3.9. Device Administration 3.9.1 Device Provisioning 3.9.1.1 Device owner provisioning 3.9.1.2 Managed profile provisioning 3.9.2 Managed Profile Support 3.9.3 Managed User Support 3.10. Accessibility 3.11. Text-to-Speech 3.12. TV Input Framework 3.13. Quick Settings 3.14. Media UI 3.15. Instant Apps 3.16. Companion Device Pairing 3.17. Heavyweight Apps 4. Application Packaging Compatibility 5. Multimedia Compatibility 5.1. Media Codecs 5.1.1. Audio Encoding 5.1.2. Audio Decoding 5.1.3. Audio Codecs Details 5.1.4. Image Encoding 5.1.5. Image Decoding 5.1.6. Image Codecs Details 5.1.7. Video Codecs 5.1.8. Video Codecs List 5.2. Video Encoding 5.2.1. H.263 5.2.2. H-264 5.2.3. VP8 5.2.4. VP9 5.3. Video Decoding 5.3.1. MPEG-2 5.3.2. H.263 5.3.3. MPEG-4 5.3.4. H.264 5.3.5. H.265 (HEVC) 5.3.6. VP8 5.3.7. VP9 5.4. Audio Recording 5.4.1. Raw Audio Capture 5.4.2. Capture for Voice Recognition 5.4.3. Capture for Rerouting of Playback 5.5. Audio Playback 5.5.1. Raw Audio Playback 5.5.2. Audio Effects 5.5.3. Audio Output Volume 5.6. Audio Latency 5.7. Network Protocols 5.8. Secure Media 5.9. Musical Instrument Digital Interface (MIDI) 5.10. Professional Audio 5.11. Capture for Unprocessed 6. Developer Tools and Options Compatibility 6.1. Developer Tools 6.2. Developer Options 7. Hardware Compatibility 7.1. Display and Graphics 7.1.1. Screen Configuration 7.1.1.1. Screen Size and Shape 7.1.1.2. Screen Aspect Ratio 7.1.1.3. Screen Density 7.1.2. Display Metrics

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值