# proguard

ProGuard is an open-source Java bytecode shrinker, optimizer, obfuscator, and preverifier that reduces application size and removes unused code.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Your Android APK Is Bigger Than It Needs to Be: 22 Smart Ways to Reduce Its Size

DevFeed: [Your Android APK Is Bigger Than It Needs to Be: 22 Smart Ways to Reduce Its Size](<https://devfeed.tech/articles/your-android-apk-is-bigger-than-it-needs-to-be-22-smart-ways-to-reduce-its-size-133647.md>)

Original publisher: [Read original article](<https://proandroiddev.com/your-android-apk-is-bigger-than-it-needs-to-be-22-smart-ways-to-reduce-its-size-d39f678e5b43?source=rss----c72404660798---4>)

Author: Swatiomar

Published: 2026-11-13T16:19:44Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [APK](<https://devfeed.tech/topics/apk.md>), [Android](<https://devfeed.tech/topics/android.md>), [R8](<https://devfeed.tech/topics/r8.md>), [proguard](<https://devfeed.tech/topics/proguard.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-apk](<https://devfeed.tech/tags/android-apk.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [apk](<https://devfeed.tech/tags/apk.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [fonts](<https://devfeed.tech/tags/fonts.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [native](<https://devfeed.tech/tags/native.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [r8](<https://devfeed.tech/tags/r8.md>), [reduce](<https://devfeed.tech/tags/reduce.md>), [resources](<https://devfeed.tech/tags/resources.md>), [size](<https://devfeed.tech/tags/size.md>)

### AI overview

An Android Studio APK Analyzer review found that the app package included libraries the author was not directly using, fonts with unnecessary characters, unsupported language translations, many unneeded dimension resources, and native libraries for multiple CPU architectures. The excerpt frames APK size optimization as examining what goes into the final build and removing unnecessary contents without removing useful features; it does not provide the specific optimization steps.

### Source excerpt

Discover 22 practical Android APK optimization tips, from R8 and unused dependencies to fonts, resources, and native libraries. Continue reading on ProAndroidDev "

## Obfuscation Deep Dive: Enhancing R8 and ProGuard for Robust Android Code Protection

DevFeed: [Obfuscation Deep Dive: Enhancing R8 and ProGuard for Robust Android Code Protection](<https://devfeed.tech/articles/obfuscation-deep-dive-enhancing-r8-and-proguard-for-robust-android-code-protection-25958.md>)

Original publisher: [Read original article](<https://kirillr.medium.com/proguard-r8-obfuscation-dictionary-b4541a898eb8?source=rss-7a0a233f88a2------2>)

Author: Kirill Rozov

Published: 2025-05-19T07:40:40Z

Content type: article

Language: en

Sources: [Kirill Rozov](<https://devfeed.tech/sources/stories-by-kirill-rozov-on-medium.md>)

Topics: [obfuscation](<https://devfeed.tech/topics/obfuscation.md>), [proguard](<https://devfeed.tech/topics/proguard.md>), [R8](<https://devfeed.tech/topics/r8.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [advanced](<https://devfeed.tech/tags/advanced.md>), [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [app-size](<https://devfeed.tech/tags/app-size.md>), [applications](<https://devfeed.tech/tags/applications.md>), [approach](<https://devfeed.tech/tags/approach.md>), [article](<https://devfeed.tech/tags/article.md>), [aspect](<https://devfeed.tech/tags/aspect.md>), [builds](<https://devfeed.tech/tags/builds.md>), [but](<https://devfeed.tech/tags/but.md>), [code](<https://devfeed.tech/tags/code.md>), [deep](<https://devfeed.tech/tags/deep.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [dive](<https://devfeed.tech/tags/dive.md>), [enhancing](<https://devfeed.tech/tags/enhancing.md>), [java](<https://devfeed.tech/tags/java.md>), [obfuscation](<https://devfeed.tech/tags/obfuscation.md>), [proguard](<https://devfeed.tech/tags/proguard.md>), [protection](<https://devfeed.tech/tags/protection.md>), [r8](<https://devfeed.tech/tags/r8.md>), [robust](<https://devfeed.tech/tags/robust.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

R8 and ProGuard's default short-letter naming can make obfuscated identifiers predictable across builds, which the excerpt says may aid reverse engineering. It recommends supplying custom class, package, and general obfuscation dictionaries, with a new randomized dictionary for each build to vary names. It also describes Java reserved keywords as bytecode names that can confuse decompilers, though the resulting code will not compile as Java, and warns that Windows-restricted names may cause reverse-engineering errors on Windows. The excerpt advises testing across environments; its final randomization-script description is cut off.

### Source excerpt

Obfuscation is a crucial aspect of securing Android applications. While tools like R8 and ProGuard are commonly used, their default configurations primarily aim to reduce app size rather than fortify code against reverse engineering. This article delves into advanced obfuscation techniques to make reverse engineering harder. Understanding Obfuscation Obfuscation transforms readable code into a form that's difficult to interpret. For instance, UserManager might become a, and getUser() could be renamed to b(). R8 and ProGuard perform obfuscation alongside code shrinking and optimization. # R8/ProGuard default dictionary a b c ... z These tools use dictionaries to generate new names, typically starting with single letters (a to z) and progressing to combinations like aa, ab, etc. While this approach minimizes file size, it has drawbacks: Predictable Naming: Limited name variations make it easier to deduce original identifiers. Consistent Builds: Repeated builds produce identical obfuscated names, aiding pattern recognition. Simplified Reverse Engineering: Tools can exploit naming patterns across builds. To counter these issues, customizing the obfuscation dictionary is essential. Implementing Custom Dictionaries R8 and ProGuard allow the use of custom dictionaries via configuration files: # proguard-rules.txt # Add to R8/ProGuard config file -obfuscationdictionary obfuscation-dictionary.tx -classobfuscationdictionary class-dictionary.txt -packageobfuscationdictionary package-dictionary.txt By providing unique dictionaries, you can generate diverse and unpredictable obfuscated names. Advanced Dictionary StrategiesJava Reserved Keywords Using Java's reserved keywords (e.g., if, for, class) as obfuscated names can confuse decompilers, as these are invalid identifiers in source code but acceptable in bytecode. # Java Reserved Keywords dictionary do if for int new ... instanceof synchronized Example of deobfucated Java code with java reserved keywords dictionary package cla

## How to break your Android App with proguard / R8

DevFeed: [How to break your Android App with proguard / R8](<https://devfeed.tech/articles/how-to-break-your-android-app-with-proguard-r8-24744.md>)

Original publisher: [Read original article](<https://medium.com/yazio-engineering/how-to-break-your-android-app-with-proguard-r8-6566bc387b63?source=rss----65bd178b00af---4>)

Author: Paul Woitaschek

Published: 2021-03-02T15:19:22Z

Content type: article

Language: en

Sources: [YAZIO](<https://devfeed.tech/sources/yazio-engineering-medium.md>)

Topics: [R8](<https://devfeed.tech/topics/r8.md>), [proguard](<https://devfeed.tech/topics/proguard.md>), [Android Testing](<https://devfeed.tech/topics/android-testing.md>), [Android](<https://devfeed.tech/topics/android.md>), [Android Gradle Plugin](<https://devfeed.tech/topics/android-gradle-plugin.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [app](<https://devfeed.tech/tags/app.md>), [proguard](<https://devfeed.tech/tags/proguard.md>), [r8](<https://devfeed.tech/tags/r8.md>)

### AI overview

A broad R8/ProGuard rule, `-assumenosideeffects class android.util.Log { public *; }`, can affect inherited public methods as well as logging calls. The article reports that this includes synchronization methods on `Object`, such as `notify`, potentially breaking app synchronization and causing hangs. It recommends avoiding `*` wildcards with `-assumenosideeffects` and specifying the logging signatures explicitly (`v`, `d`, `i`, `w`, `e`, and `println`) when removing production log calls. The author also warns that the issue can enter an app through a library's consumer ProGuard rules.

### Source excerpt

I recently updated the android gradle plugin to 4.0.0. While developing, everything went smoothly and at some point I was ready to cut a release. The very last manual testing of the release app bundle was also fine so no Proguard / R8 issues on the first sight either. Then I thought: Let me check the CI results again. Everything was fine, but: The instrumentation tests. Almost all of them were timing out. After inspecting the logs, they all hang at the end of the on-boarding. Strangely the loading spinner was loading for way longer than the timeout should be. So I tested it on my phone and faced the same results. At that time I had no idea it was caused by updating AGP, so I did a 2 hours long git bisect. Okay, now lets create a minimal self reproducible bug report because I found a huge bug in AGP, everyone should know about immediately. I created a Hello World project that was making a single network call and printed it results into a TextView. Strangely here it did not reproduce. After experimenting with the OkHttp configuration and testing if it was related to some gradle plugin, I finally had the idea that it might be related to R8. So I added my proguard configuration and now the network call hang! Let's locate the issue further. I was step by step removing lines from my proguard configuration until only a single line was left: -assumenosideeffects class android.util.Log { public * ; } Now what is this? How is that even slightly related to anything? It should remove the log spam of some third party libraries we're using. So I was asking Mads Ager. (he works on D8/R8) you have to be very careful with -assumenosideeffects The problem is that in order for -assumenosideeffects to have the effect of actually removing calls, it matches up the class hierarchy. Therefore, this rule says that anything public in android.util.Log and its superclasses has no side-effects. That include the synchronization methods defined on Object. So, please don't use * wildcards in conne

## How to break your Android App with proguard / R8

DevFeed: [How to break your Android App with proguard / R8](<https://devfeed.tech/articles/how-to-break-your-android-app-with-proguard-r8-26006.md>)

Original publisher: [Read original article](<https://medium.com/yazio-engineering/how-to-break-your-android-app-with-proguard-r8-6566bc387b63?source=rss-fbf9b6d94e65------2>)

Author: Paul Woitaschek

Published: 2020-06-08T05:52:07Z

Content type: article

Language: en

Sources: [Paul Woitaschek](<https://devfeed.tech/sources/stories-by-paul-woitaschek-on-medium.md>)

Topics: [R8](<https://devfeed.tech/topics/r8.md>), [proguard](<https://devfeed.tech/topics/proguard.md>), [Android](<https://devfeed.tech/topics/android.md>), [Android Testing](<https://devfeed.tech/topics/android-testing.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Android Gradle Plugin](<https://devfeed.tech/topics/android-gradle-plugin.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [proguard](<https://devfeed.tech/tags/proguard.md>), [r8](<https://devfeed.tech/tags/r8.md>)

### AI overview

After updating Android Gradle Plugin 4.0.0, the author traced hanging network calls and instrumentation-test timeouts to a ProGuard/R8 rule: `-assumenosideeffects class android.util.Log { public *; }`. The wildcard matched public methods through the class hierarchy, including synchronization methods inherited from `Object`; treating those as side-effect-free could remove essential synchronization. The proposed replacement lists logging signatures explicitly (`v`, `d`, `i`, `w`, `e`, and `println`) instead of using `public *`. The excerpt cautions that the rule can also arrive through a library's consumer ProGuard rules.

### Source excerpt

I recently updated the android gradle plugin to 4.0.0. While developing, everything went smoothly and at some point I was ready to cut a release. The very last manual testing of the release app bundle was also fine so no Proguard / R8 issues on the first sight either. Then I thought: Let me check the CI results again. Everything was fine, but: The instrumentation tests. Almost all of them were timing out. After inspecting the logs, they all hang at the end of the on-boarding. Strangely the loading spinner was loading for way longer than the timeout should be. So I tested it on my phone and faced the same results. At that time I had no idea it was caused by updating AGP, so I did a 2 hours long git bisect. Okay, now lets create a minimal self reproducible bug report because I found a huge bug in AGP, everyone should know about immediately. I created a Hello World project that was making a single network call and printed it results into a TextView. Strangely here it did not reproduce. After experimenting with the OkHttp configuration and testing if it was related to some gradle plugin, I finally had the idea that it might be related to R8. So I added my proguard configuration and now the network call hang! Let's locate the issue further. I was step by step removing lines from my proguard configuration until only a single line was left: -assumenosideeffects class android.util.Log { public * ; } Now what is this? How is that even slightly related to anything? It should remove the log spam of some third party libraries we're using. So I was asking Mads Ager. (he works on D8/R8) you have to be very careful with -assumenosideeffects The problem is that in order for -assumenosideeffects to have the effect of actually removing calls, it matches up the class hierarchy. Therefore, this rule says that anything public in android.util.Log and its superclasses has no side-effects. That include the synchronization methods defined on Object. So, please don't use * wildcards in conne

## Congratulations, you have a lot of code!"Congratulations, you have a lot of code!" Remedying Android's method limit - Part 1

DevFeed: [Congratulations, you have a lot of code!"Congratulations, you have a lot of code!" Remedying Android's method limit - Part 1](<https://devfeed.tech/articles/congratulations-you-have-a-lot-of-code-congratulations-you-have-a-lot-of-code-remedying-android-s-method-limit-part-1-2014.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//congratulations-you-have-a-lot-of-code-remedying-androids-method-limit-part-1>)

Published: 2015-09-21T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [proguard](<https://devfeed.tech/topics/proguard.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [build-tools](<https://devfeed.tech/tags/build-tools.md>), [code](<https://devfeed.tech/tags/code.md>), [dex](<https://devfeed.tech/tags/dex.md>), [java](<https://devfeed.tech/tags/java.md>), [limit](<https://devfeed.tech/tags/limit.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [size](<https://devfeed.tech/tags/size.md>), [tool](<https://devfeed.tech/tags/tool.md>)

### AI overview

A DEX file can reference at most 65,536 methods because its method index is 16 bits; the count includes framework, library, and app methods. The text distinguishes this from the string limit addressed by jumbo mode, which does not solve method overflow. SoundCloud describes trimming dependencies with ProGuard and repackaging surviving library classes into custom JARs, a method used for Guava, Jackson, and Facebook SDK. It proved difficult to maintain, could require repeated repacking, sometimes removed needed code, and did not help when the release build itself exceeded the limit. SoundCloud then spent two weeks removing Guava and moving frequently used utilities into a team-owned library, reducing unnecessary code and improving readability, testing, and understanding. Jackson remained difficult to replace because it was not sufficiently isolated behind owned APIs. The excerpt introduces MultiDex as the subject of part two but does not explain its use.

### Source excerpt

At SoundCloud we have been building for the Android platform since 2010. Much has changed since then: the team has grown, the list of features has grown, and our audience has grown. Today, eight engineers are working full time on the official SoundCloud app, across various areas, with contributions pouring in from other parts of the organization. Due to the growing complexity and number of contributions, the app's size has grown substantially. Currently the app consists of approximately 1200 Java source files, not counting tests, containing approximately 86000 lines of code. This doesn't include native code, such as our playback or recording stacks. We're not the first to run into Android's limits in terms of build tools. An internal limitation of Dalvik's byte code format (DEX), which I will explain in more detail, can leave you unable to build after your codebase reaches a certain size. If you fail to anticipate this, it might happen during the most inconvenient time, such as when you are preparing for a release. Part of our job in Core Engineering at SoundCloud is to make sure our developers are happy and productive; not being able to build our app anymore makes for neither happy nor productive developers. While there are a number of posts on this topic, I would like to describe in more detail what we have done to combat Android's method limit, what things worked well and what didn't work so well, what it actually means to use the tool's switch and what you can do to improve application health with regards to size.