All Projects → nukc → Apkmultichannelplugin

nukc / Apkmultichannelplugin

Licence: gpl-3.0
[Deprecated] 🚀 Android 多渠道打包的 Android Studio / IDEA 插件

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Apkmultichannelplugin

Fastdex
🚀 加快 apk 的编译速度 🚀
Stars: ✭ 1,457 (+313.92%)
Mutual labels:  apk, idea-plugin
Intellij Figlet
🔌A FIGlet-based ASCII Art generation plugin for IntelliJ based IDEs.
Stars: ✭ 27 (-92.33%)
Mutual labels:  idea-plugin, plugin
Grafana Diagram
A Grafana plugin to visualize metrics in a diagram using flow charts, gantt charts, sequence diagrams, or class diagrams
Stars: ✭ 310 (-11.93%)
Mutual labels:  plugin
Zoomove
🔍 🎆 Enlarges the image with the mouse hover and move
Stars: ✭ 339 (-3.69%)
Mutual labels:  plugin
Vancedmanager
Vanced Installer
Stars: ✭ 5,523 (+1469.03%)
Mutual labels:  apk
Mybatipse
Eclipse plugin adding support for MyBatis SQL Mapper Framework.
Stars: ✭ 312 (-11.36%)
Mutual labels:  plugin
Xd To Flutter
Xd to Flutter
Stars: ✭ 326 (-7.39%)
Mutual labels:  plugin
Firebasepushnotificationplugin
Firebase Push Notification Plugin for Xamarin iOS and Android
Stars: ✭ 307 (-12.78%)
Mutual labels:  plugin
Luffy
Android字节码插件,编译期间动态修改代码,改造添加全埋点日志采集功能模块,对常见控件进行监听处理
Stars: ✭ 347 (-1.42%)
Mutual labels:  plugin
Injuredandroid
A vulnerable Android application that shows simple examples of vulnerabilities in a ctf style.
Stars: ✭ 317 (-9.94%)
Mutual labels:  apk
Spectralizer
Audio visualizer plugin for obs-studio
Stars: ✭ 332 (-5.68%)
Mutual labels:  plugin
Hexo Generator Search
A plugin to generate search data for Hexo.
Stars: ✭ 318 (-9.66%)
Mutual labels:  plugin
Custom Field Suite
Custom fields UI for WordPress
Stars: ✭ 312 (-11.36%)
Mutual labels:  plugin
Klakspout
Spout plugin for Unity
Stars: ✭ 332 (-5.68%)
Mutual labels:  plugin
Chartjs Plugin Streaming
Chart.js plugin for live streaming data
Stars: ✭ 310 (-11.93%)
Mutual labels:  plugin
Findcrypt Ghidra
IDA Pro's FindCrypt ported to Ghidra, with an updated and customizable signature database
Stars: ✭ 340 (-3.41%)
Mutual labels:  plugin
Hackdroid
Android Apps, Roms and Platforms for Pentesting
Stars: ✭ 310 (-11.93%)
Mutual labels:  apk
Apkshellext
Show app icons in windows explorer
Stars: ✭ 316 (-10.23%)
Mutual labels:  apk
Highlightjs Line Numbers.js
Line numbering plugin for Highlight.js
Stars: ✭ 323 (-8.24%)
Mutual labels:  plugin
Chrome Vs Code
A web browser integrated in VS Code editor tabs. ☢️ experimental ☢️
Stars: ✭ 351 (-0.28%)
Mutual labels:  plugin

ApkMultiChannel Plugin

这是一个为了方便 Android 多渠道打包的 Android Studio / IDEA 插件:

  • 支持v2签名:jarsigner 和 apksigner
  • 支持2种渠道打包方式:
    • 修改 AndroidManifest.xml 的 meta-data (name 为 UMENG_CHANNEL) 的 value 值,没有则插入,然后重新打包签名
    • 美团的方式,直接往 apk 的 META-INF 目录里添加空文件(文件名为:c_渠道)
    • packer-ng-plugin的方式,往 apk 注释字段保存渠道号和验证标记字节

安装

  • 打开 Android Studio: 打开 Setting/Preferences -> Plugins -> Browse repositories 然后搜索 ApkMultiChannel 安装重启

或者

  • 下载 ApkMultiChannelPlugin.jar 然后 Setting/Preferences -> Plugins -> Install plugin from disk 选择 ApkMultiChannelPlugin.jar 安装重启

使用方式

1. 选择 apk

选择一个 apk 然后右键,点击 Build MultiChannel

2. 配置

配置签名信息,打包方式和渠道等

配置说明:

Key Store Path: 签名文件的路径
Key Store Password: 签名文件的密码
Key Alias: 密钥别名
Key Password: 密钥密码

Zipalign Path: zipalign 文件的路径(用于优化 apk;zipalign 可以确保所有未压缩的数据均是以相对于文件开始部分的特定字节对齐开始,这样可减少应用消耗的 RAM 量。)
Signer Version: 选择签名版本:apksigner 和 jarsigner
Build Type: 打包方式

Channels: 渠道列表,每行一个,最前面可加 > 或不加(保存信息的时候,程序会自行加上)

3. 开始打包

配置完成之后按 OK 就会开始进行渠道打包,文件会输出在选中的apk的当前目录下的channels目录中

说明

在开始打包前,配置信息先会保存在项目根目录的 channels.properties:

渠道可以直接在 channels.properties 添加(这里必须要在前面加 >,为了方便解析,只有加了 > 才会参与打包),也可以删除和注释(#)

配置完后,想改配置但是又不想直接修改 channels.properties 文件的话,可以在 Build > Channel Setting 打开配置界面, 在这里打开配置界面按 OK 按钮后不会自动开始打包,仅用于修改配置。

Build Type 说明

update AndroidManifest.xml

先解压提取 AndroidManifest.xml 文件到 temp 文件夹中,然后根据渠道列表配置修改 meta-data,复制1个 apk 到 channels 文件夹下(除了 META-INF 目录下的签名文件), 同时替换 AndroidManifest.xml,最后重新签名。

add channel file to META-INF

复制1个 apk,先检查签名版本,如果未签名则进行签名(配置选择 jarsigner 则在渠道打包前签名,apksigner 则是添加空文件到其 META-INF 目录后再签名)。 读取渠道:ChannelHelper

write zip comment

先判断选中的 apk 中 comment 是否含有 SIGN 字节,如果有则不进行渠道打包并提示;之后检查是否是 v2 签名,如果是 v2,则复制1个不带签名文件的 apk 到 temp 文件夹并重新签名为 v1, 最后开始渠道打包。( v2 签名之后不能修改 ZIP End of Central Directory 区块,而且如果先修改 ZIP End of Central Directory 区块再 v2 签名,comment 会被抹掉。) 读取渠道:ZipCommentHelper

以后要加的功能

  • 添加支持选择项目路径外的 apk 文件进行多渠道打包
  • buildType 添加支持美团新一代渠道包生成方式 Walle

有什么问题欢迎大家在 Issues 中提问

参考致谢

同时感谢 dim区长 的指点迷津。

License

GPL-3.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].