59 Star 292 Fork 70

GVPreplugin / RePlugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README_CN.md
Apache-2.0

RePlugin Logo

license

Release Version

通知

360开源又一力作——ArgusAPM移动性能监控平台

ArgusAPM是360手机卫士客户端团队继RePlugin之后开源的又一个重量级开源项目。ArgusAPM是360移动端产品使用的可视化性能监控平台,为移动端APP提供性能监控与管理,可以迅速发现和定位各类APP性能和使用问题,帮助APP不断的提升用户体验。

360移动技术最新活动通知:

2018年12月16日,360移动性能开放日邀您参加,届时将会有360、美团技术大牛为大家分享Android、iOS性能监控实践。 欢迎报名参加,戳戳戳!!!-->https://mp.weixin.qq.com/s/-7DCnXI_EBMBwYG_PUuUDg

RePlugin —— 历经三年多考验,数亿设备使用的,稳定占坑类插件化方案

RePlugin是一套完整的、稳定的、适合全面使用的,占坑类插件化方案,由360手机卫士的RePlugin Team研发,也是业内首个提出”全面插件化“(全面特性、全面兼容、全面使用)的方案。

其主要优势有:

  • 极其灵活:主程序无需升级(无需在Manifest中预埋组件),即可支持新增的四大组件,甚至全新的插件
  • 非常稳定:Hook点仅有一处(ClassLoader),无任何Binder Hook!如此可做到其崩溃率仅为“万分之一”,并完美兼容市面上近乎所有的Android ROM
  • 特性丰富:支持近乎所有在“单品”开发时的特性。包括静态Receiver、Task-Affinity坑位、自定义Theme、进程坑位、AppCompat、DataBinding等
  • 易于集成:无论插件还是主程序,只需“数行”就能完成接入
  • 管理成熟:拥有成熟稳定的“插件管理方案”,支持插件安装、升级、卸载、版本管理,甚至包括进程通讯、协议版本、安全校验等
  • 数亿支撑:有360手机卫士庞大的数亿用户做支撑,三年多的残酷验证,确保App用到的方案是最稳定、最适合使用的

截止2017年6月底,RePlugin的:

特性 描述
插件数 103(核心57个)
插件占应用比 高达83%
年发版次数 高达596次(工作日均2次)
崩溃率 万分之一(0.01%),极低
时间 2014年应用,3年验证

目前360公司几乎所有的亿级用户量的APP,以及多款主流第三方APP,都采用了RePlugin方案。

有关RePlugin的详细介绍,请点击这里阅读《RePlugin 官方 WiKi》

我们还支持以下特性

特性 描述
组件 四大组件(含静态Receiver)
升级无需改主程序Manifest 完美支持
Android特性 支持近乎所有(包括SO库等)
TaskAffinity & 多进程 支持(坑位方案
插件类型 支持自带插件(自识别)、外置插件
插件间耦合 支持Binder、Class Loader、资源等
进程间通讯 支持同步、异步、Binder、广播等
自定义Theme & AppComat 支持
DataBinding 支持
安全校验 支持
资源方案 独立资源 + Context传递(相对稳定)
Android 版本 API Level 9+ (2.3及以上)

愿景

让插件化能飞入寻常应用家,做到稳定、灵活、自由,大小项目兼用。

最新特性

解决了Android P(Android 9.0)相关适配问题,全面支持Android P(Android 9.0)正式版。

RePlugin 架构图

RePlugin Framework

以360手机卫士为例:

  • 系统层——Android:为Android Framework层。只有ClassLoader是Hook的,而AMS、Resources等都没有做Hook,确保了其稳定性。
  • 框架层——RePlugin框架:RePlugin框架层,只有RePlugin是对“上层完全公开”的,其余均为Internal,或“动态编译方案”生效后的调用,对开发者而言是“无需关心”的。
  • 插件层——各插件:“标蓝部分”是各插件,包括大部分的业务插件(如体检、清理、桌面插件等)。而其中“标黄部分”是支撑一个应用的各种基础插件,如WebView、Download、Share,甚至Protobuf都能成为基础插件。

使用方法

RePlugin的使用方法非常简单,大部分情况下和“单品”开发无异。

若您是第一次接触RePlugin,则请点击这里阅读《快速上手》,跟随我们的指引,了解更多的内容。

若您想了解更多有关RePlugin的玩法,则请点击这里阅读《详细教程》,了解更多好玩的玩法。

若您想看下RePlugin的Sample工程,进而了解框架的具体用法,则请点击这里查看Sample源代码

若您在接入RePlugin中遇到了任何问题,则请点击这里阅读《FAQ》,相信会有您想要的答案。

插件管理服务—与RePlugin配套的插件管理、下发、统计服务

至今为止有数不清的用户联系我们让做配套的插件管理功能,所以 RePlugin 团队联合 360 Web 平台部,合力推出 RePlugin 插件管理服务,再次大幅降低了用户使用RePlugin的门槛,插件管理服务功能介绍如下:

  • 插件版本管理:对APK插件包名、别名和版本号的交集限制,防止下发出错。

  • 打点统计:上报即显示下发量、下载量、安装量和错误量数据。

  • 升版管理:严格要求用户新建下发任务为面向虚拟用户或部分真实用户的“测试版”下发任务(适用于内测、AB和灰度),测试没问题以后才能切换到面对所有真实用户的“线上版”下发任务,防止出错。

  • 下发限速:开发者可自定义自己想要的插件下发速度。

  • 运营商和厂商限制:开发者可自定义自己想下发的运营商和目标终端厂商。

  • 灵活的下发条件设置:根据用户群体对下发条件的要求程度,我们提供了4种条件设置功能,对下发条件要求不高的用户可直接使用便捷条件下发(包括按人数和指定设备下发);对下发条件要求高的用户可使用自定义条件下发(包括文字条件编辑器和代码条件编辑器)。

PS:我们原创的文字版条件编辑器很有意思哦,它能将复杂繁琐的条件代码还原成有语法有逻辑的中国话,真的是能让非技术人员第一次使用就看得懂会操作的优秀功能,目前为止我们应该是第一个将体验做到如此细腻的产品。

使用地址:360移动开发者-RePlugin插件管理

已接入RePlugin的应用

我们诚挚期待您成为咱们RePlugin应用大家庭中的一员!

除了360集团旗下的亿级别应用以外,还有一些对稳定要求极其严苛的“金融类”产品,及第三方合作应用也接入了RePlugin(含SDK):

                                                                                                       
360 手机卫士360 手机助手360 手机浏览器花椒相机360 清理大师
360 影视大全J借钱吧海淘1号华润通借了吗
360OS 系统应用360 借条(即将发布) (即将发布) (即将发布)

这里衷心感谢 “360手机助手”,以及其它各App团队成员,帮助我们发现了很多需要改进的地方,并给予了非常积极的反馈。您们的鼓励与支持,让咱们的RePlugin能走的更远、更好!

已接入RePlugin的插件

目前已有的插件,可以分为以下几类,供各App开发者参考:

  • 展示插件:如卫士首页(是的,你没看错)、体检、信息流等
  • 业务插件:如清理、骚扰拦截、悬浮窗等
  • 合作插件:如程序锁、免费WiFi、安全桌面等
  • 后台插件:如Push、服务管理、Protobuf等
  • 基础插件:如安全WebView、分享、定位等

截止2017年6月底,这样的插件,我们有103个。衷心希望您能成为这个数字中的新的一员!

贡献自己的力量

我们欢迎任何形式的贡献,并致以诚挚的感谢!

你可以贡献代码、提出问题、编写文档等。有关“贡献”相关的内容,请点击这里阅读《贡献力量》

与我们联系

欢迎您加入到我们的RePlugin微信群、QQ群大家庭。

微信群已超过上限,请进入我们的QQ群

QQ群 1:653205923 QQ群 2:589652294

License

RePlugin is Apache v2.0 licensed.

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (C) 2005-2017 Qihoo 360 Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

RePlugin 是奇虎 360 正在开源的一套完整的、稳定的、适合全面使用的,占坑类插件化方案 展开 收起
Java 等 5 种语言
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/replugin/RePlugin.git
git@gitee.com:replugin/RePlugin.git
replugin
RePlugin
RePlugin
master

搜索帮助