All Projects → eleme → Amigo

eleme / Amigo

Licence: other
A hotfix library for Android platform, and not just this...

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Amigo

Tinkerpatch Sdk
TinkerPatch SDK
Stars: ✭ 290 (-78.52%)
Mutual labels:  hotfix
Sdkhotfix
在用户规模千万级别的app中验证过,稳定无兼容问题,5分钟让你的SDK拥有热修复能力。A SDK hotfix library with stable verified in tens of millions of users can be accessed in only five minutes.
Stars: ✭ 585 (-56.67%)
Mutual labels:  hotfix
Tinker app
Android热更新Tinker + 多渠道打包 + 加固的流程详解demo
Stars: ✭ 67 (-95.04%)
Mutual labels:  hotfix
Knight
Knight is a game framework based on Unity3D engine. It includes a complete assetbundle manager, a c# hotfix module based on ILRuntime, and a UI module based on MVVM, and other basic functions support.
Stars: ✭ 302 (-77.63%)
Mutual labels:  hotfix
Small
A small framework to split app into small parts
Stars: ✭ 5,012 (+271.26%)
Mutual labels:  hotfix
Aceso
A hotfix library for Android
Stars: ✭ 790 (-41.48%)
Mutual labels:  hotfix
CSwift
C Module for Swift, Swift Script and Dynamic Library Call;Swift中直接调用C语言源程序的展示程序
Stars: ✭ 46 (-96.59%)
Mutual labels:  hotfix
Injectfix
InjectFix is a hot-fix solution library for Unity
Stars: ✭ 1,198 (-11.26%)
Mutual labels:  hotfix
Jengine
JEngine是针对Unity开发者设计的开箱即用的框架,封装了强大的功能,小白也能快速上手,轻松制作可以热更新的游戏 | JEngine is a streamlined and easy-to-use framework designed for Unity Programmers which contains powerful features, beginners can start up quickly and making hot update-able games easily
Stars: ✭ 564 (-58.22%)
Mutual labels:  hotfix
Tinkerpatch Sample
已经改造完自身App的Application的应用的参考Sample
Stars: ✭ 63 (-95.33%)
Mutual labels:  hotfix
Ocrunner
Execute Objective-C patch file generated by ORPatchGenerator. iOS hotfix SDK.
Stars: ✭ 314 (-76.74%)
Mutual labels:  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 (+205.56%)
Mutual labels:  hotfix
Mango
MangoFix is a DSL which syntax is very similar to Objective-C,MangoFix is also an iOS App hotfix SDK. You can use MangoFix method replace any Objective-C method.
Stars: ✭ 847 (-37.26%)
Mutual labels:  hotfix
Ilruntime hotgames
基于ILRuntime的热更新能力实现的可以直接使用的框架,友情赠送C# WebService + WebSocketServer服务器端。
Stars: ✭ 293 (-78.3%)
Mutual labels:  hotfix
Bdframework.core
[中]Simple! Easy! Powerful Unity3d game workflow! Unity3d framework:c# hotfix(ILRuntime)、asset manager、ui workflow、network debug... and so on
Stars: ✭ 1,196 (-11.41%)
Mutual labels:  hotfix
Tinker
Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Stars: ✭ 16,151 (+1096.37%)
Mutual labels:  hotfix
Tinker Manager
微信tinker补丁管理,后端代码+客户端sdk
Stars: ✭ 670 (-50.37%)
Mutual labels:  hotfix
Speed tools
敏捷开发工具包
Stars: ✭ 85 (-93.7%)
Mutual labels:  hotfix
Dynamicoc
深入理解 iOS 热修复原理
Stars: ✭ 76 (-94.37%)
Mutual labels:  hotfix
Andfix
AndFix is a library that offer hot-fix for Android App.
Stars: ✭ 6,925 (+412.96%)
Mutual labels:  hotfix

中文版

wiki (deprecated)

changelog

Amigo Service Platform (Amigo backend service is no longer supported)

amigo.png

Amigo is a hotfix library which can fix everything for your Android app

How to use

Download

In your project's build.gradle

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'me.ele:amigo:0.6.8'
    }
}

In your module's build.gradle

apply plugin: 'me.ele.amigo'

android {
...
}

dependencies {
    ...
    compile 'me.ele:amigo-lib:0.6.7'
}

//if you don't want use amigo in dev, set this value to true
//you can define this extension in your mybuild.gradle as to distinguish debug & release build
amigo {
    disable false //default false
    autoDisableInInstantRunMode true // default false
}

Compatibility

  • Supports All Devices From ECLAIR 2.1 to Nougat 7.1
  • Even support next Android version, no matter small or big change. So Cool, Aha ✌️
  • Android 3.0 isn't supported

Customize loading page(optional)

Some time-consuming tasks are handled in a separate process to avoid ANR, you can customize the loading activity by add the follow code into your AndroidManifest.xml:

<meta-data
    android:name="amigo_layout"
    android:value="{your-layout-name}" />

<meta-data
    android:name="amigo_theme"
    android:value="{your-theme-name}" />

<meta-data
    android:name="amigo_orientation"
    android:value="{your-custom-orientation}"/>

Note:

  • These three meta-data is defined in your personal AndroidManifest.xml of app module if necessary
  • orientation's value must be in screenOrientation

Make hotfix work

There are two ways to make hotfix work.

  • if you don't need hotfix work immediately

    you just need to download new apk file, hotfix apk will be loaded as fresh as new when app restarts next time

     Amigo.workLater(context, patchApkFile, callback);
    
  • work immediately, App will restart immediately

     Amigo.work(context, patchApkFile);
    

Remove patch

Amigo.clear(context);

note:All patch files would be deleted on the next start up.

Demo

And there is an Demo page in the app demonstrating how to apply patch apk. Run the task ./gradlew runHost preparePatch, and navigate to the demo page.

Development

Amigo gradle plugin

The plugin was put into buildSrc directory, which means the plugin code change will work immediately each time you build.

Amigo lib

The amigo plugin will select the right amigo lib automatically.

Run tests

There are two gradle tasks provided in the app/build.gradle, :app:runHost, :app:preparePatch, which can accelerate development.

  • ./gradlew runHost, launch the host app
  • ./gradlew preparePatch, build and push the patch apk to the device
  • apply the patch apk in the Demo page

Limits

  • have to change the way using a content provider

    • declare a new provider: the authorities string must start with "${youPackageName}.provider"

      <provider
          android:name="me.ele.demo.provider.StudentProvider"
          android:authorities="${youPackageName}.provider.student" />
      
    • change the uri used to do the query, insert, delete operations:

      // 1. inside your app process, no modifications need:
      Cursor cursor = getContentResolver().query(Uri.parse("content://" + getPackageName() + ".provider.student?id=0"), null, null, null, null);
      // 2. in another process, have to change the authorities uri like the following :
      Cursor cursor = getContentResolver().query(Uri.parse("content://" + targetPackageName + ".provider/student?id=0"), null, null, null, null);
      
  • Instant Run conflicts with Amigo, so disable Instant Run when used with amigo(Or use autoDisableInInstantRunMode to auto disable amigo in instant run mode)

  • Amigo doesn't support Honeycomb 3.0

    • Android 3.0 is a version with full of bugs, & Google has closed Android 3.0 Honeycomb.
  • RemoteViews's layout change in notification & widgetis not support

    • any resource id in here should be used with java RCompat.getHostIdentifier(Context context, int id)

Retrieve hotfix file

  • make it simple, you just need a fully new apk

  • to save the internet traffic, you may just want to download a diff file bspatch (support whole apk diff & fine-grained diff in apk)is an option for you

Inspired by

Android Patch 方案与持续交付

DroidPlugin

License

  Copyright 2016 ELEME 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.
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].