Top Related Projects
A powerful Android Dynamic Component Framework.
A hotfix library for Android platform, and not just this...
Android Signature V2 Scheme签名下的新一代渠道包打包神器
A powerful and lightweight plugin framework for Android
🔥🔥Qigsaw ['tʃɪɡsɔ] is a dynamic modularization library which is based on Android App Bundles(Do not need Google Play Service). It supports dynamic delivery for split APKs without reinstalling the base one.
Quick Overview
VasDolly is an Android channel packaging tool developed by Tencent. It allows for fast, efficient, and secure channel packaging of Android APKs without the need for recompilation or re-signing. VasDolly supports both V1 and V2 signing schemes and is compatible with various channel identification methods.
Pros
- Fast and efficient channel packaging without recompilation
- Supports both V1 and V2 signing schemes
- Compatible with various channel identification methods
- Provides both command-line tools and Gradle plugin for integration
Cons
- Limited to Android APK packaging
- May require additional setup for complex channel configurations
- Documentation is primarily in Chinese, which may be challenging for non-Chinese speakers
- Potential learning curve for developers unfamiliar with channel packaging concepts
Code Examples
- Using VasDolly in a Gradle build script:
apply plugin: 'com.tencent.vasdolly'
vasdolly {
enable true
channelFile = file("channel.txt")
apkPath = 'app-release.apk'
outputDir = file("${project.buildDir}/outputs/channels")
channelVerify = true
}
- Reading channel information from an APK:
String channel = ChannelReader.getChannel(context);
if (channel != null) {
Log.d("VasDolly", "Channel: " + channel);
} else {
Log.e("VasDolly", "No channel info found");
}
- Writing channel information to an APK using the command-line tool:
java -jar VasDolly.jar put -c channel.txt /path/to/your.apk
Getting Started
- Add VasDolly to your project's
build.gradle
:
buildscript {
dependencies {
classpath 'com.tencent.vasdolly:plugin:3.0.4'
}
}
apply plugin: 'com.tencent.vasdolly'
- Configure VasDolly in your app's
build.gradle
:
vasdolly {
enable true
channelFile = file("channel.txt")
apkPath = 'app-release.apk'
outputDir = file("${project.buildDir}/outputs/channels")
}
-
Create a
channel.txt
file with your channel names, one per line. -
Run the Gradle task to generate channel APKs:
./gradlew channelPackage
Competitor Comparisons
A powerful Android Dynamic Component Framework.
Pros of Atlas
- Comprehensive dynamic component framework for Android apps
- Supports hot-fixing and dynamic deployment of components
- Provides a complete set of tools for building, packaging, and deploying
Cons of Atlas
- More complex setup and learning curve compared to VasDolly
- Requires deeper integration into the app architecture
- May introduce overhead for smaller projects
Code Comparison
Atlas (Component declaration):
@AtlasBundle(coverageRate = 0.9f)
public class SampleBundle {
// Bundle implementation
}
VasDolly (Channel writing):
ChannelWriter.put(apkFile, channelFile, channel)
Key Differences
- Atlas focuses on modularization and dynamic component management
- VasDolly specializes in APK channel packaging and signature protection
- Atlas offers a more comprehensive solution for large-scale app development
- VasDolly provides a simpler, targeted approach for channel management
Use Cases
- Atlas: Large-scale Android apps requiring modular architecture and dynamic updates
- VasDolly: Apps needing efficient channel packaging and distribution management
Both projects serve different purposes in the Android development ecosystem, with Atlas offering a more extensive framework for app architecture and VasDolly providing a focused solution for channel packaging.
A hotfix library for Android platform, and not just this...
Pros of Amigo
- Supports hot-fixing and incremental updates, allowing for more flexible app maintenance
- Provides a comprehensive solution for Android app updates and patching
- Offers a wider range of features beyond channel packaging
Cons of Amigo
- More complex setup and integration process
- Requires deeper understanding of Android development for effective use
- May have a steeper learning curve for beginners
Code Comparison
VasDolly (Channel packaging):
ChannelWriter.put(apkFile, channelFile, channel)
Amigo (Hot-fix application):
Amigo.work(this);
Amigo.workLater(this, hours);
Amigo.setWorkLater(false);
Key Differences
- VasDolly focuses primarily on channel packaging for Android apps
- Amigo offers a broader set of features for app updates and maintenance
- VasDolly is generally simpler to use for its specific purpose
- Amigo provides more advanced capabilities but may require more setup
Use Cases
- Choose VasDolly for straightforward channel packaging needs
- Opt for Amigo when requiring comprehensive app update and patching solutions
Community and Support
- Both projects are open-source and maintained by reputable organizations
- VasDolly may have more focused support for channel-related issues
- Amigo's broader feature set may attract a more diverse community
Android Signature V2 Scheme签名下的新一代渠道包打包神器
Pros of walle
- More comprehensive documentation and usage examples
- Supports multiple channels and custom channel configurations
- Provides a Gradle plugin for easier integration
Cons of walle
- Limited to Android platform only
- Requires more setup and configuration compared to VasDolly
- Less frequent updates and maintenance
Code Comparison
walle:
apply plugin: 'walle'
walle {
apkOutputFolder = new File("${project.buildDir}/outputs/channels")
apkFileNameFormat = '${appName}-${packageName}-${channel}-${buildType}-v${versionName}-${versionCode}'
channelFile = new File("${project.getProjectDir()}/channel")
}
VasDolly:
ChannelWriter.put(apkFile, channelName, extraInfo);
List<String> channelList = ChannelReader.getChannelList(apkFile);
String channel = ChannelReader.get(apkFile);
Both tools aim to solve the problem of channel packaging for Android apps, but they differ in their approach and features. walle offers more flexibility and customization options, while VasDolly provides a simpler, more straightforward implementation. The choice between the two depends on the specific requirements of your project and the level of control you need over the channel packaging process.
A powerful and lightweight plugin framework for Android
Pros of VirtualAPK
- Supports dynamic loading of complete APK files, allowing for more complex plugin architectures
- Provides a more comprehensive solution for app virtualization and dynamic loading
- Offers better isolation between host app and plugins
Cons of VirtualAPK
- More complex setup and integration process
- Potentially higher performance overhead due to its comprehensive nature
- May require more frequent updates to maintain compatibility with Android OS changes
Code Comparison
VirtualAPK:
PluginManager pluginManager = PluginManager.getInstance(context);
pluginManager.loadPlugin(new File(apkPath));
Intent intent = new Intent();
intent.setClassName(packageName, activityName);
startActivity(intent);
VasDolly:
File channelApkFile = ChannelReaderUtil.getChannelApkFile(baseApk, channel);
if (channelApkFile != null) {
installApk(context, channelApkFile);
}
VirtualAPK focuses on loading and running entire APKs as plugins, while VasDolly is primarily used for channel packaging and management. VirtualAPK's code demonstrates plugin loading and activity launching, whereas VasDolly's code shows channel-specific APK file handling.
🔥🔥Qigsaw ['tʃɪɡsɔ] is a dynamic modularization library which is based on Android App Bundles(Do not need Google Play Service). It supports dynamic delivery for split APKs without reinstalling the base one.
Pros of Qigsaw
- Supports dynamic loading of features, allowing for more flexible app modularization
- Provides a gradle plugin for easier integration and configuration
- Offers runtime component replacement without app restart
Cons of Qigsaw
- More complex setup and configuration compared to VasDolly
- Requires deeper understanding of Android app architecture
- May introduce additional overhead due to dynamic loading
Code Comparison
Qigsaw (Feature loading):
Qigsaw.installSplits(context, splitInfos) { success, exception ->
if (success) {
// Load feature
}
}
VasDolly (Channel writing):
ChannelWriter.put(apkFile, channelFile, channel)
While both projects aim to improve Android app development, they serve different purposes. Qigsaw focuses on app modularization and dynamic feature loading, offering more flexibility but with increased complexity. VasDolly, on the other hand, specializes in multi-channel packaging and is simpler to use for that specific task. The choice between them depends on the project's requirements and the development team's expertise.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ç®ä»
VasDollyæ¯ä¸ç§å¿«éå¤æ¸ éæå å·¥å ·ï¼åæ¶æ¯æåºäºV1ç¾ååV2,V3ç¾åè¿è¡å¤æ¸ éæå ãæ件æ¬èº«ä¼èªå¨æ£æµApk使ç¨çç¾åç±»å«ï¼å¹¶éæ©åéçå¤æ¸ éæå æ¹å¼ï¼å¯¹ä½¿ç¨è æ¥è¯´å®å ¨éæã
ç®åGradle Plugin 2.2以ä¸é»è®¤å¼å¯V2ç¾åï¼æ以å¦ææ³å ³éV2ç¾åï¼å¯å°ä¸é¢çv2SigningEnabled设置为falseã å ³äºåºç¨ç¾å说æï¼è§å®æ¹ææ¡£
signingConfigs {
release {
...
v1SigningEnabled true
v2SigningEnabled false
}
debug {
...
v1SigningEnabled true
v2SigningEnabled false
}
}
æ¥å ¥æµç¨
æ·»å 对VasDolly Pluginçä¾èµ
å¨æ ¹å·¥ç¨çbuild.gradle
ä¸ï¼æ·»å 对æå
Pluginçä¾èµï¼
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.tencent.vasdolly:plugin:3.0.6'
}
å¼ç¨VasDolly Plugin
å¨ä¸»Appå·¥ç¨çbuild.gradle
ä¸ï¼æ·»å 对VasDolly Pluginçå¼ç¨ï¼
apply plugin: 'com.tencent.vasdolly'
æ·»å 对VasDolly helperç±»åºçä¾èµ
å¨ä¸»Appå·¥ç¨çbuild.gradle
ä¸ï¼æ·»å 读åæ¸ éä¿¡æ¯çhelperç±»åºä¾èµï¼
dependencies {
  api 'com.tencent.vasdolly:helper:3.0.6'
}
é ç½®æ¸ éå表
ç®åæ两ç§æ¹å¼é ç½®æ¸ éå表ï¼æç»çæ¸ éå表æ¯ä¸¤è çç´¯å ä¹åï¼
- å¨
gradle.properties
æ件æå®æ¸ éæ件å称ï¼è¯¥æ¸ éæä»¶å¿ é¡»ä½äºæ ¹å·¥ç¨ç®å½ä¸ï¼ä¸è¡ä¸ä¸ªæ¸ éä¿¡æ¯ã
channel_file=channel.txt
- å¨
channel
æèrebuildChannel
å±æ§ä¸éè¿channelFile
å±æ§æå®æ¸ éæ件ï¼ä¸è¡ä¸ä¸ªæ¸ éä¿¡æ¯ã
channel{
  //æå®æ¸ éæ件
  channelFile = file("/Users/leon/Downloads/testChannel.txt")
}
rebuildChannel{
  //æå®æ¸ éæ件
  channelFile = file("/Users/leon/Downloads/testReChannel.txt")
}
éè¿Gradleçæå¤æ¸ éå
ç´æ¥ç¼è¯çæå¤æ¸ éå
è¥æ¯ç´æ¥ç¼è¯çæå¤æ¸ éå ï¼é¦å è¦é ç½®æ¸ éæ件ãæ¸ éå çè¾åºç®å½åæ¸ éå çå½åè§åï¼
channel{
  //æå®æ¸ éæ件
  channelFile = file("/Users/leon/Downloads/testChannel.txt")
//å¤æ¸ éå
çè¾åºç®å½ï¼é»è®¤ä¸ºnew File(project.buildDir,"channel")
outputDir = new File(project.buildDir,"xxx")
//å¤æ¸ éå
çå½åè§åï¼é»è®¤ä¸ºï¼${appName}-${versionName}-${versionCode}-${flavorName}-${buildType}-${buildTime}
apkNameFormat ='${appName}-${versionName}-${versionCode}-${flavorName}-${buildType}'
//å¿«é模å¼ï¼çææ¸ éå
æ¶ä¸è¿è¡æ ¡éªï¼é度å¯ä»¥æå10å以ä¸ï¼é»è®¤ä¸ºfalseï¼
fastMode = false
//buildTimeçæ¶é´æ ¼å¼ï¼é»è®¤æ ¼å¼ï¼yyyyMMdd-HHmmss
buildTimeDateFormat = 'yyyyMMdd-HH:mm:ss'
//ä½å
å模å¼ï¼ä»
é对V2ç¾åï¼é»è®¤ä¸ºfalseï¼ï¼åªæç¾ååãä¸å¤®ç®å½åEOCD读åå°å
åï¼ä¸ææ大头çå
容å读åå°å
åï¼å¨ææºä¸åæAPKæ¶ï¼å¯ä»¥ä½¿ç¨è¯¥æ¨¡å¼
lowMemory = false
}
å ¶ä¸ï¼å¤æ¸ éå çå½åè§åä¸ï¼å¯ä½¿ç¨ä»¥ä¸å段ï¼
- appName ï¼ å½åprojectçname
- versionName ï¼ å½åVariantçversionName
- versionCode ï¼ å½åVariantçversionCode
- buildType ï¼ å½åVariantçbuildTypeï¼å³debug or release
- flavorName ï¼ å½åçæ¸ éå称
- appId ï¼ å½åVariantçapplicationId
- buildTime ï¼ å½åç¼è¯æ建æ¥ææ¶é´ï¼æ¶é´æ ¼å¼å¯ä»¥èªå®ä¹ï¼é»è®¤æ ¼å¼ï¼yyyyMMdd-HHmmss
ç¶åï¼éè¿gradle channelDebug
ãgradle channelRelease
å½ä»¤åå«çæDebugåReleaseçå¤æ¸ éå
ã
为äºæ¹ä¾¿ä¸´æ¶çææ¸ éå
è¿è¡æµè¯ï¼æ们ä»v2.0.0
å¼å§æ¯ææ·»å æ¸ éåæ°ï¼gradle channelDebug(channelRelease) -Pchannels=yingyongbao,gamecenter
ï¼è¿ééè¿å±æ§channels
æå®çæ¸ éå表æ¥ææ´é«çä¼å
级ï¼ä¸ååå§çæ件æ¹å¼æ¯äºæ¥çã
æ ¹æ®å·²æåºç¡å éæ°çæå¤æ¸ éå
è¥æ¯æ ¹æ®å·²æåºç¡å éæ°çæå¤æ¸ éå ï¼é¦å è¦é ç½®æ¸ éæ件ãåºç¡å çè·¯å¾åæ¸ éå çè¾åºç®å½ï¼
rebuildChannel {
//æå®æ¸ éæ件
 channelFile = file("/Users/leon/Downloads/testReChannel.txt")
// å·²æAPKæ件å°åï¼å¿
å¡«ï¼,å¦new File(project.rootDir, "/baseApk/app_base.apk"),æ件åä¸çbaseå°è¢«æ¿æ¢ä¸ºæ¸ éå
baseApk = å·²æAPKæ件å°åï¼å¿
å¡«ï¼
//é»è®¤ä¸ºnew File(project.buildDir, "rebuildChannel")
outputDir = æ¸ éå
è¾åºç®å½
//å¿«é模å¼ï¼çææ¸ éå
æ¶ä¸è¿è¡æ ¡éªï¼é度å¯ä»¥æå10å以ä¸ï¼é»è®¤ä¸ºfalseï¼
fastMode = false
//ä½å
å模å¼ï¼ä»
é对V2ç¾åï¼é»è®¤ä¸ºfalseï¼ï¼åªæç¾ååãä¸å¤®ç®å½åEOCD读åå°å
åï¼ä¸ææ大头çå
容å读åå°å
åï¼å¨ææºä¸åæAPKæ¶ï¼å¯ä»¥ä½¿ç¨è¯¥æ¨¡å¼
lowMemory = false
}
ç¶åï¼éè¿gradle rebuildChannel
å½ä»¤çæå¤æ¸ éå
ã
为äºæ¹ä¾¿ä¸´æ¶çææ¸ éå
è¿è¡æµè¯ï¼æ们ä»v2.0.0
å¼å§æ¯ææ·»å æ¸ éåæ°ï¼gradle rebuildChannel -Pchannels=yingyongbao,gamecenter
ï¼è¿ééè¿å±æ§channels
æå®çæ¸ éå表æ¥ææ´é«çä¼å
级ï¼ä¸ååå§çæ件æ¹å¼æ¯äºæ¥çã
éè¿å½ä»¤è¡çææ¸ éå ã读åæ¸ éä¿¡æ¯
ä»V1.0.5
çæ¬å¼å§æ¯æå½ä»¤è¡ï¼å
·ä½ä½¿ç¨ææ¡£å¯åècommand
ç®å½ä¸çREADMEã
读åæ¸ éä¿¡æ¯
éè¿helperç±»åºä¸çChannelReaderUtil
类读åæ¸ éä¿¡æ¯ã
String channel = ChannelReaderUtil.getChannel(getApplicationContext());
å¦æ没ææ¸ éä¿¡æ¯ï¼é£ä¹è¿éè¿ånull
ï¼å¼åè
éè¦èªå·±å¤æã
Demoåè
详ç»çæ¥å ¥èå¼ï¼å¯åèDemo
å®ç°åç
å ·ä½åçå¯åèVasDollyå®ç°åç
é®é¢åé¦
éå°ä»»ä½é®é¢æè æ好ç建议ï¼æ¬¢è¿æissues
TODO
- å¢å åå æµè¯
- é²æ¸ éä¿¡æ¯ç¯¡æ¹
- æä¾Pythonèæ¬
License
VasDolly is under the BSD license. See the LICENSE file for details.
Top Related Projects
A powerful Android Dynamic Component Framework.
A hotfix library for Android platform, and not just this...
Android Signature V2 Scheme签名下的新一代渠道包打包神器
A powerful and lightweight plugin framework for Android
🔥🔥Qigsaw ['tʃɪɡsɔ] is a dynamic modularization library which is based on Android App Bundles(Do not need Google Play Service). It supports dynamic delivery for split APKs without reinstalling the base one.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot