Is it possible to export the source code of an Android Studio project? How?

Asked

Viewed 2,405 times

4

I developed an application in Android Studio that is now available in Google Play.

As it was a project that I used as my TCC theme, the university needs the PDF source code. How I extract the code in a single file?

My project has several classes and performing the entire code merge manually is virtually unviable. I searched and it seems that you can export if the application is already on Google Play and I install the APK version on my device, but I do not have Android phone.

Is it possible to do this by computer with my code without being compiled? How?

  • even the activitys codes are required ?

  • 1

    If you have the project, just copy the codes play in the world and have it saved as PDF. I didn’t quite understand what you asked. ... If what you want is to document the code, then I’ll tell you straight away, there is no magic way to document things, this is a manual process and done by people and teams.

3 answers

1

Rafaela Android Studio, does not have a function to "export" all the code, what I would recommend is to put your entire project in Github or something similar and leave public as I did in my TCC theme. So your teachers will be able to download and analyze your project or just look at your codes on the Github website itself.

Another thing you could do that I don’t think is feasible, would be to copy your codes and separate into just one folder.

  • So, it’s already on github, but I have to register the patent in the technology sector and they ask for the source code in pdf.

  • So @Rafaelalopes, the way you do this is by copying the same hehe codes

1

I believe this will solve:

Install the Oracle virtualbox: https://www.virtualbox.org/

Download some android ISO: http://www.android-x86.org/download

Install this iso in virtualbox: https://www.segredosgeek.com/2013/06/tutorial-como-instalar-o-android-no-virtual-box.html

Authorize root: Here you will have to search because it will depend on the version you choose, although it is almost the same in all.

After root, you will download titaniumBackup, after installing click 'Backup/Restore' and choose your application, then connect your mobile phone on PC, and you will get the folder of the Titanium backup, copy it to your PC and you will see that inside it will be your APK.

Change the format to ZIP or RAR and unzip, then use Dex2jar to do the reversal.

Convert this . JAR generated to . ZIP, now you will need to convert . class to . JAVA, for this use the Java Decompiler -> JD-GUI tool.

Now you will have the complete source code, but to group everything, I can’t say if you can with Android Studio, but in netbeans you can install it with the JAVA version, and try to combine the . JAR, but also not sure if it will be complete, not working with android dev, the most I’ll know how to help is this.

  • And the worst thing is that it doesn’t make much sense to group all the hehe code, such the teacher tell you saw... kk

  • It really is a differentiated stop, but maybe it is to analyze the consistence of the number of lines, or blocks, but it is strange kk

  • I need to group the code all p/ patent application, rs

  • @Rafaelalopes if it is a patent application and you have access to the source just copy one by one and put it in the World and then have it printed for PDF.

  • I did it, William! Thank you! D

0

Browser other questions tagged

You are not signed in. Login or sign up in order to post.