Pergunta

I am currently developing an android application and every now and then I am checking my application if it runs smoothly on my android phone. Now, my problem is my desktop computer crashes and all the files on my computer were deleted including the source code of my application. I am wondering if I have a chance in accessing my source code just only by using my .apk file installed on my android phone?

Foi útil?

Solução

Bummer about the computer crash. I'll mostly skip the lecture on always committing your code to source control somewhere, or backing up with something like Google Docs or DropBox, something.

Anyway, an APK file might be able to save your source code, yes. An APK is just a modified JAR file that includes the DEX bytecode (classes.dex). If you use something that can decompile the dex back to java bytecode, and then decompile that, you'll be back at Java source -- theoretically (I haven't tried to do this).

For more information about getting started see this question: decompiling DEX into Java sourcecode

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top