Android Dexguard: How to integrate? - android

I am trying to use Dexguard in order to obfuscate my simple Android Application.
I have followed the integration steps, I.e. adding the jar file into the libs folder in Eclipse.
However, Dexguard does not seem to be integrated into my application.
How do I know if Dexguard has been Integrated?
Is there any additional steps that I need to make?

You actually need to put the DexGuard plugin in the dropins directory in Eclipse. You can find all the necessary details in the DexGuard manual > Eclipse plugin.

Related

Get Android NDK crash reports with Unity 2019.3+

Since Unity 2019.3 the Android build process has changed and now the gradle project contains two modules - a unityLibrary module and launcher module.
I am having trouble uploading native symbols as I cannot apply the plugin to the unityLibrary module, and only works in the launcher. Is there a certain way I can achieve this?
When I run uploadCrashlyticsSymbolFileRelease task that is only present on the launcher module, I receive this error:
Could not find the file generated by Google Services. Please check your Firebase project configuration
The configuration file is in the unityLibrary module.
Is there any way to move the task to the unityLibrary module? If I move the crashlytics plugin to the unityLibray module the error changes into:
Crashlytics was applied to a project without an Android plugin. Please make sure the Crashlytics plugin is applied after the appropriate Android plugin for your project.
The tricky bit is that Firebase is still compatible with versions of Unity that do not support gradle integration. Because of this, the build pipeline in Unity re-implements the functionality of the google services plugin (namely generating the values.xml file).
I've personally put some effort into massaging the mainTemplate.gradle file to work with gradle plugin, but haven't gotten the NDK upload to work yet. Some notes that may help:
The External Dependency Manager for Unity (EDM4U) will both update the mainTemplate.gradle file if available but will also process google-services.json and drop the output into Assets/Plugins/Android. You'll likely want to run it once to generate the dependencies, delete the values.xml, and then disable EDM4U to prevent it from regenerating that file.
The Unity SDK is based on C++, and the aar archives that bind C#, C++, and Java are packaged into local maven repository in your Assets directory. This will make it hard to relocate your project after generating it (ie: try to do all your work Unity side if possible).
Because you'd be short-circuiting Firebase's processing of values.xml to use the plugin, you'll need to make sure google-services.json actually makes it into your Android sourcetree. Assets/StreamingAssets might do this automatically but you may have to write a build script to copy it over.
Finally, the team is aware of the desire to debug NDK code in the Unity Crashlytics plugin. There aren't any public timelines available, but in lieu of a good answer opening an issue on the quickstart or posting to the mailing list might could be a good way to try to work through the process.

Enable proguard automatically while creating new project in Android

Many times after building an app and uploading it to play store I realize that I haven't guarded the apk using proguard feature provided by android and anyone can decompile the app using various tools to get my app's source code. So is it possible that whenever i create a new project the proguard feature is automatically enabled and my app's source code can be secure?
For obfuscation just add to project.properties file in android project the following line:
proguard.config=proguard.cfg
see details in android's development page here
Probably you will have to right a custom ant build script which throws an error when proguard property is not set in properties.To write custom ant build script visit this link:
http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html

how to use android project library in eclipse?

I am new in android. I see a lot of android libraries out there like github.com but when I download them none of them are a *.jar file like this one:
NumberProgressBar
It seems that all these libraries are for android studio NOT eclipse (Am I correct? This is important).
My question is: How do I use these libraries in eclipse?
I tried to import the downloaded library as an android project and then mark it as "is library" and then add to my project, but that did not work.
That library is designed to be built with Gradle for Android (with or without Android Studio), producing an AAR.
Eclipse does not have native AAR support. I have published a recipe and a Ruby script to convert an AAR into a library project that Eclipse can use, though I have not tested it much.
Or, you can download the source code and attempt to reorganize it into an Eclipse-style library project.
I just downloaded it and add it as library project and everything looks fine. How do you do it, it's extremely simple. Let us know in which step you have a problem so we can figure out what is wrong.
You have to build the library first.
For your example, read the Readme file, section 'Build'.

How to use ProGuard with an android api 4 (android 1.6)?

First of all, i'm new on ProGuard, but i read some tutorials and i know that the best way to use it on android is the one described on android.developer guide.
im trying to obfuscate the code of my new Android app with ProGuard. For that i enter this website: http://developer.android.com/tools/help/proguard.html#enabling
But it tells: "hen you create an Android project, a proguard.cfg file is automatically generated in the root directory of the project."
That file does not exist on my project root directory, so i dont know how to continue. My Android app is for api level 4, 1.6, so, is it possible that this is a problem for using ProGuard?
How can i use proguard with an app for api 4 (android 1.6)
Thanks a lot
You need a proguard.cfg File. You can either create it by hand or use the proguard-GUI (> java -jar proguardgui.jar). Using the GUI makes some things easier, but a basic understandig of proguard and obfuscating is still required. It isn't very comfortable to use the gui for obfuscating your release apk, so proviging the config-file and using the SDKs Build tools is still the best way to go.
The ACRA Documentation features an Example for a proguard.cfg http://code.google.com/p/acra/wiki/ACRAProGuardHowTo most of the stuff is ACRA related and can be ommited if you don't use ACRA in your project.
I Don't know if the SDK is supposed to create an proguard.cfg. If never seen one which was created automaticaly, so i suggest you go with the file as supplied by the acra-guys for a starting point.
Make sure that you are using the latest Android SDK. You can check this with the standard android application from the SDK.
Then make sure that your project directory is up-to-date too, by typing
adb update project -p MyProjectDirectory
(from the command-line, with the proper path to the directory of your project). This should create a ProGuard configuration file, which is called proguard-project.txt in recent releases of the SDK.
You can then enable ProGuard by uncommenting the proper line in project.properties.

How to obfuscate my project using ProGuard tool?

I am wondering about how to obfuscate the Android application using ProGuard tool.
I've read info from http://android-sdk.appspot.com/guide/developing/tools/proguard.html.
But no luck still. I've set to enable configuration for ProGuard tool in default.properties file added following line:
proguard.config=proguard.cfg
Then build the project. And was looking to generate "mapping.txt". But not generated.
Can you suggest me where I am wrong ?
Thanks in advance.
ProGuard only runs when making external builds, not internal development builds. Use File->Export->Android->Export Android Application
ProGuard is only integrated in the Android build process as of the Android 2.2 SDK. You may have to update to the latest SDK and then update the project with "android update project".
Furthermore, ProGuard is only applied in release builds: "ant release".
Your doing nothing wrong. In addition to setting the config file as you indicated you might also need to set debuggable=false in the android manifest.

Categories

Resources