All Projects → Tencent → Tinker

Tencent / Tinker

Licence: other
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects

Projects that are alternatives of or similar to Tinker

Tinker app
Android热更新Tinker + 多渠道打包 + 加固的流程详解demo
Stars: ✭ 67 (-99.59%)
Mutual labels:  wechat, hotfix
Robust
Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without a reboot.
Stars: ✭ 4,125 (-74.46%)
Mutual labels:  hotfix, dynamic
Wechatvideoview
Android - 微信 - 朋友圈 - 小视频播放,wechat friend-circle,small video play
Stars: ✭ 260 (-98.39%)
Mutual labels:  wechat
Weapp Demo Breadtrip
基于面包旅行 API 制作的微信小程序示例
Stars: ✭ 282 (-98.25%)
Mutual labels:  wechat
Wx Tfjs Demo
微信小程序运行 TensorFlow 的 Demo
Stars: ✭ 274 (-98.3%)
Mutual labels:  wechat
Wechat tweak
♨️ iOS版功能最全的微信插件,支持最新版微信,具备自动抢红包,屏蔽消息和群消息,过滤特定的群聊,防止撤回消息,伪定位 (朋友圈和附近的人),修改微信运动步数和实时取景做聊天页的背景等功能。
Stars: ✭ 265 (-98.36%)
Mutual labels:  wechat
Stepchanger
步数修改器
Stars: ✭ 275 (-98.3%)
Mutual labels:  wechat
Tmux Powerline
A hackable statusbar for tmux consisting of dynamic & beautiful looking segments, inspired by vim-powerlline, written purely in bash.
Stars: ✭ 2,802 (-82.65%)
Mutual labels:  dynamic
Litemall
又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端 + Vue用户移动端
Stars: ✭ 16,629 (+2.96%)
Mutual labels:  wechat
Markdown Nice
支持主题设计的 Markdown 编辑器,让排版变 Nice
Stars: ✭ 3,291 (-79.62%)
Mutual labels:  wechat
Weixinresource
微信开发资源汇总 | WeChat Development Resources Summary
Stars: ✭ 279 (-98.27%)
Mutual labels:  wechat
Wechat jump tensorflow
Stars: ✭ 270 (-98.33%)
Mutual labels:  wechat
React Native Wechat
🚀 WeChat login, share, favorite and payment for React-Native on iOS and Android platforms (QQ: 336021910)
Stars: ✭ 2,842 (-82.4%)
Mutual labels:  wechat
React Native Puti Pay
基于 React Native 的微信支付,支付宝支付插件
Stars: ✭ 277 (-98.28%)
Mutual labels:  wechat
Wechatpy
WeChat SDK for Python
Stars: ✭ 3,016 (-81.33%)
Mutual labels:  wechat
Wechatassistant
(放弃维护)PC端微信小工具:撤回消息备份,关键词监听,公众号签到,截图,自定义内容的自动回复,今天吃什么(fun)
Stars: ✭ 285 (-98.24%)
Mutual labels:  wechat
Lin Ui
🌈 简洁、易用、灵活的微信小程序组件库
Stars: ✭ 3,264 (-79.79%)
Mutual labels:  wechat
Domain Tool
微信域名拦截检测、QQ域名拦截检测:http://eson.vip ,查询有缓存,如需实时查询请自行部署。
Stars: ✭ 270 (-98.33%)
Mutual labels:  wechat
Ffdynamic
Library with dynamic audio/video composition and runtime control
Stars: ✭ 274 (-98.3%)
Mutual labels:  dynamic
Rsshub
🍰 Everything is RSSible
Stars: ✭ 18,111 (+12.14%)
Mutual labels:  wechat

Tinker

license Release Version PRs Welcome WeChat Approved

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstalling apk.

tinker.png

Getting started

Add tinker-gradle-plugin as a dependency in your main build.gradle in the root of your project:

buildscript {
    dependencies {
        classpath ('com.tencent.tinker:tinker-patch-gradle-plugin:1.9.1')
    }
}

Then you need to "apply" the plugin and add dependencies by adding the following lines to your app/build.gradle.

dependencies {
    //optional, help to generate the final application
    provided('com.tencent.tinker:tinker-android-anno:1.9.1')
    //tinker's main Android lib
    compile('com.tencent.tinker:tinker-android-lib:1.9.1')
}
...
...
apply plugin: 'com.tencent.tinker.patch'

If your app has a class that subclasses android.app.Application, then you need to modify that class, and move all its implements to SampleApplicationLike rather than Application:

-public class YourApplication extends Application {
+public class SampleApplicationLike extends DefaultApplicationLike {

Now you should change your Application class, make it a subclass of TinkerApplication. As you can see from its API, it is an abstract class that does not have a default constructor, so you must define a no-arg constructor:

public class SampleApplication extends TinkerApplication {
    public SampleApplication() {
      super(
        //tinkerFlags, which types is supported
        //dex only, library only, all support
        ShareConstants.TINKER_ENABLE_ALL,
        // This is passed as a string so the shell application does not
        // have a binary dependency on your ApplicationLifeCycle class.
        "tinker.sample.android.app.SampleApplicationLike");
    }
}

Use tinker-android-anno to generate your Application is recommended, you just need to add an annotation for your SampleApplicationLike class

@DefaultLifeCycle(
application = "tinker.sample.android.app.SampleApplication",             //application name to generate
flags = ShareConstants.TINKER_ENABLE_ALL)                                //tinkerFlags above
public class SampleApplicationLike extends DefaultApplicationLike

How to install tinker? learn more at the sample SampleApplicationLike.

For proguard, we have already made the proguard config automatic, and tinker will also generate the multiDex keep proguard file for you.

For more tinker configurations, learn more at the sample app/build.gradle.

Ark Support

How to run tinker on the Ark?

building patch

Just use the following command:

bash build_patch_dexdiff.sh old=xxx new=xxx
  • old indicates the absolute path of android apk(not compiled by Ark) with bugs
  • new indicates the absolute path of android apk(not compiled by Ark) with fixing

The patch file is packaged in APK.

compiling in Ark

TODO

At present it's compiled by Ark compiler team. The output patch is still packaged in APK format without signature.

packaging the patch

For tinker-cli, add the following lines to your tinker_config.xml. Otherwise, the default configure will be used.

<issue id="arkHot">
   <path value="arkHot"/>         // path of patch
   <name value="patch.apk"/>      // name of patch
</issue>

For gradle, add the following lines to your app/build.gradle. Otherwise, the default configure will be used.

ark {
   path = "arkHot"         // path of patch
   name = "patch.apk"      // name of patch
}

The patch is compiled by Ark and placed on the above path. all subsequent operations are same as tinker-cli or gradle.

The ultimated patch APK consists of two patch files:

  • classes.dex for android
  • patch.apk with so for Ark.

Tinker Known Issues

There are some issues which Tinker can't dynamic update.

  1. Can't update AndroidManifest.xml, such as add Android Component.
  2. Do not support some Samsung models with os version android-21.
  3. Due to Google Play Developer Distribution Agreement, we can't dynamic update our apk.

Tinker Support

Any problem?

  1. Learn more from tinker-sample-android.
  2. Read the source code.
  3. Read the wiki or FAQ for help.
  4. Contact us for help.

Contributing

For more information about contributing issues or pull requests, see our Tinker Contributing Guide.

License

Tinker is under the BSD license. See the LICENSE file for details.

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].