AndResGuard alternatives and similar packages
Based on the "Tools" category.
Alternatively, view AndResGuard alternatives based on common mentions on social networks and blogs.
-
Freeline
A super fast build tool for Android, an alternative to Instant Run -
dex-method-counts
Command-line tool to count per-package methods in Android .dex files -
scalpel
A surgical debugging tool to uncover the layers under your app. -
maven-android-sdk-deployer
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools. -
ViewInspector
View Inspection Toolbar for Android Development -
AdaptiveTableLayout
Library that makes it possible to read, edit and write CSV files -
vectalign
Tool for create complex morphing animations using VectorDrawables (allows morphing between any pair of SVG images) -
Uber Apk Signer
A cli tool that helps signing and zip aligning single or multiple Android application packages (APKs) with either debug or provided release certificates. It supports v1, v2 and v3 Android signing scheme has an embedded debug keystore and auto verifies after signing. -
android-resource-remover
A simple utility to remove unused resources in your Android app to lower the size of the APK. It's based on the Android lint tool output. -
AndroidLocalizationer
This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically. -
Debug Bottle
🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language. -
scrollscreenshot
Make Android screenshots of scrollable screen content -
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model -
android-gradle-template
Combines tools for fast android app devlopment -
PDFCreatorAndroid
Simple library to generate and view PDF in Android -
density-converter
A multi platform image density converting tool converting single or batches of images to Android, iOS, Windows or CSS specific formats and density versions given the source scale factor or width/height in dp. It has a graphical and command line interface and supports many image types (svg, psd, 9-patch, etc.) aswell as some lossless compressors like pngcrush. -
USB-Device-Info
This application will provide information about almost all currently plugged-in USB devices. -
TaggerString
TaggerString is very light library which allows to build dynamic string resource in much more readable way. -
release-android-library
Remote script to create a maven compatible release of an android library (aar) -
Layout-to-Image
Android Layout (Relative Layout, Linear Layout etc) to Image -
Uber Adb Tools for Android
A tool that enables advanced features through adb installing and uninstalling apps like wildcards and multi device support. Useful if you want to clean your test device from all company apks or install a lot of apks in one go. Written in Java so it should run on your platform. -
PackageHunter
:inbox_tray: [Android Library] Hunt down all package information -
NotificationLog
Use an expanded notification as a makeshift Android log output console -
Java7-on-Android
Java 7 features backported to Android 2.2+ -
Android-Intent-Library
A library which will save you a lot of time from writing the same intent creation code. it consist of many intent creation codes like Share, Contacts, Email and etc, which you can easily use. -
Shutdown
An android library that handles the closing of your app interactively. -
AnUitor
AnUitor is a result of my rebranding experiences of one android app. -
IntroApp
This Android app adds splash screen slides to make a great intro for an app. -
open-weather-retriever-z
A wrapper that gets weather information from OpenWeatherMap -
change-scene
Switch between different layouts for different states, easily. -
gplay.ws
create a badge to promote your own Android application in a single step
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AndResGuard or a related project?
README
AndResGuard
Read this in other languages: [English](README.md), [简体中文](README.zh-cn.md).
AndResGuard
is a tooling for reducing your apk size, it works like the ProGuard
for Java source code, but only aim at the resource files. It changes res/drawable/wechat
to r/d/a
, and renames the resource file wechat.png
to a.png
. Finally, it repackages the apk with 7zip, which can reduce the package size obviously.
AndResGuard
is fast, and it does NOT need the source codes. Input an Android apk, then we can get a 'ResGuard' apk in a few seconds.
Some uses of AndResGuard
are:
Obfuscate android resources. It contains all the resource type(such as drawable、layout、string...). It can prevent your apk from being reversed by
Apktool
.Shrinking the apk size. It can reduce the
resources.arsc
and the package size obviously.Repackage with
7zip
. It supports repackage apk with7zip
, and we can specify the compression method for each file.
AndResGuard
is a command-line tool, it supports Windows, Linux and Mac. We suggest you to use 7zip in Linux or Mac platform for a higher compression ratio.
How to use
With Gradle
This has been released on Bintray
apply plugin: 'AndResGuard'
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.21'
}
}
andResGuard {
// mappingFile = file("./resource_mapping.txt")
mappingFile = null
use7zip = true
useSign = true
// It will keep the origin path of your resources when it's true
keepRoot = false
// If set, name column in arsc those need to proguard will be kept to this value
fixedResName = "arg"
// It will merge the duplicated resources, but don't rely on this feature too much.
// it's always better to remove duplicated resource from repo
mergeDuplicatedRes = true
whiteList = [
// your icon
"R.drawable.icon",
// for fabric
"R.string.com.crashlytics.*",
// for google-services
"R.string.google_app_id",
"R.string.gcm_defaultSenderId",
"R.string.default_web_client_id",
"R.string.ga_trackingId",
"R.string.firebase_database_url",
"R.string.google_api_key",
"R.string.google_crash_reporting_api_key",
"R.string.project_id",
]
compressFilePattern = [
"*.png",
"*.jpg",
"*.jpeg",
"*.gif",
]
sevenzip {
artifact = 'com.tencent.mm:SevenZip:1.2.21'
//path = "/usr/local/bin/7za"
}
/**
* Optional: if finalApkBackupPath is null, AndResGuard will overwrite final apk
* to the path which assemble[Task] write to
**/
// finalApkBackupPath = "${project.rootDir}/final.apk"
/**
* Optional: Specifies the name of the message digest algorithm to user when digesting the entries of JAR file
* Only works in V1signing, default value is "SHA-1"
**/
// digestalg = "SHA-256"
}
Wildcard
The whiteList and compressFilePattern support wildcard include ? * +.
? Zero or one character
* Zero or more of character
+ One or more of character
WhiteList
You need put all resource which access via getIdentifier
into whiteList.
You can find more whitsList configs of third-part SDK in [white_list.md](doc/white_list.md). Welcome PR your configs which is not included in white_list.md
The whiteList only works on the specsName of resources, it wouldn't keep the path of resource.
If you wanna keeping the path, please use mappingFile
to implement it.
For example, we wanna keeping the path of icon, we need add below into our mappingFile
.
res path mapping:
res/mipmap-hdpi-v4 -> res/mipmap-hdpi-v4
res/mipmap-mdpi-v4 -> res/mipmap-mdpi-v4
res/mipmap-xhdpi-v4 -> res/mipmap-xhdpi-v4
res/mipmap-xxhdpi-v4 -> res/mipmap-xxhdpi-v4
res/mipmap-xxxhdpi-v4 -> res/mipmap-xxxhdpi-v4
How to Launch
If you are using Android Studio
, you can find the generate task option in andresguard
group.
Or alternatively, you run ./gradlew resguard[BuildType | Flavor]
in your terminal. The format of task name is as same as assemble
.
Sevenzip
The sevenzip
in gradle file can be set by path
or artifact
. Multiple assignments are allowed, but the winner is always path
.
Result
If finalApkBackupPath is null, AndResGuard will overwrite final APK to the path which assemble[Task] write. Otherwise, it will store in the path you assigned.
Other
[Looking for more detail](doc/how_to_work.md)
Known Issue
- The first element of list which returned by
AssetManager#list(String path)
is empty string when you're using the APK which is compressed by 7zip. #162
Best Practise
- Do NOT add
resources.arsc
intocompressFilePattern
unless the app size is really matter to you.(#84 #233) - Do NOT enable 7zip compression(
use7zip
) when you distribute your APP on Google Play. It'll prevent the file-by-file patch when updating your APP. (#233)
Thanks
Apktool Connor Tumbleson
v2sig @jonyChina162