Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract code from .aar file Android

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.

like image 580
Sophia Avatar asked Dec 12 '15 15:12

Sophia


People also ask

What is an .AAR file?

An AAR file contains a software library used for developing Android apps. It is structurally similar to an . APK file (Android Package), but it allows a developer to store a reusable component that can be used across multiple different apps.


1 Answers

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.

like image 131
Srinivasan Avatar answered Oct 26 '22 05:10

Srinivasan