Extract code from .aar file Android

Sophia picture Sophia · Dec 12, 2015 · Viewed 66.4k times · Source

How do I extract code from aar file.[Accidentally my main project is on another system can't access only have aar file on my mail]

I need to extract the JNI code from aar file. I tried to change the extension to .jar but its extract .class only, Do anybody know how to extract that aar thing.

Answer

Srinivasan picture Srinivasan · Oct 4, 2016

Just follow the steps to extract code from .aar file Ex: libraryproject.aar

1.Rename the library file extension to ".jar" ex.libraryproject.jar

2.Extract the file in a folder.

3.Folder will have AndroidManifest,resources and library files used in the android library project.

4.Folder also have classes.jar file which will have all the classes in the library.

5.To open classes.jar file use jd-gui tool.

6.In jd-gui tool File ->Open File->browse and select classes.jar file.

Late, but will help new viewers.