2019-02-18 10:45:01

Hello

I was trying to decompile an APK file, when I searched google on how to do that, i've got plenty of sites to upload my APK file and they will do it for me.
Unfortunately few sites were not accessible and one was decompiling my file for more than an hour so I canceled it.
I am trying to decompile 10 mb huge CC Cleaner pro, so more than an hour would be a bit of too much.
Do you have any tipp what is the easiest way to decompile and again compail an APK file?

Thanks in advance!
Best Regards
Vojvoda

Stella rossa di Belgrado
We Love you Red Star, we do

2019-02-18 10:47:51

As far as I know, apk files are just zip archives, so unzipping them using windows explorer or similar tools like 7zip or others on linux or mac os will do the trick here.
best regards.
hijacker

2019-02-18 20:11:52

just use something like 7 Z. that should do the job

Have a lovely day.

2019-02-20 22:50:53

I think you're looking for this:
https://ibotpeaches.github.io/Apktool/

Just unzipping apk doesn't help much, code and resources are still in binary format and need to be decompiled before editing.

Best regards

Rastislav

2019-02-21 13:30:12

Well, if the code is in binary format its probably not legal to try and reverse engineer it anyway, so why add resources to do so here? I'm pretty sure that no apk tool can do that for you anyway, since its totally up to the language used to build the app how the disassembly needs to be done, or, if its java code, its probably easier to get the information out of it, but still, its not entirely legal.
Best Regards.
Hijacker

2019-02-21 13:49:47 (edited by Rastislav Kish 2019-02-21 13:51:27)

Hi,
@Hijacker: yes and no. Apks are bit different from Windows .exe files. They are mostly build entirely in bytecode, sometimes with several parts in native format.
Thus a decompiler (not disassembler) can give you entire Java code of application. in case it isn't in Java you can at least get a hint what program was used to compile app and search for according decompiler. Because even if the app is in C# for example, it must contain a java based launcher.

if reverseengineering is legal or not, well, that's another question. It depends primaryly on your goal and licences you have accepted.
For example, if you use C-cleaner, have accepted its licence and then you try to decompile it, you will probably do illegal, because licences normally prohibit you from doing so.
But if you download the apk from a site like apkmirror and don't use it, while your goal is not to crack it or go somehow against law of your country, then you should imo be okay with decompiling. how otherwise antivirus labs were supposed to work?

Best regards

Rastislav

2019-02-21 19:42:47

Nope, thats definitely not how its supposed to work big_smile. Wether you accepted the license or not doesn't change anything about it being in place, just because you say no to the license doesn't mean that you may crack the code or resell the program under your own name or something else. Cracking code is forbidden in almost any case, even open source programs, but those opened up their code to the public so you can check that one out publically on the net.
Antivirus programs also don't reverse engine software. Didn't you get confused about analysis platforms like virustotal manage to reverse engineer a program you upload in just a few seconds, if reverse engineering a program is ment to be very time consuming and hard to do? Yeah, because they simply don't do it. Antivirus programs work by analyzing bytecode or binary code within programs, finding malicious code, creating patterns out of it and checking existing and new programs for the existance of this pattern, and if this pattern applies to the program, its most likely to contain a virus as well. Modern antivirus software tends to apply artificial intelligence to learn such patterns automatically with the help of the antivirus software users instead of getting all the input from human researchers and developers, but thats how most of the modern software does its thing.
Best Regards.
Hijacker

2019-02-21 23:30:52

Of course, that are those cases when you're going against law. But as I understand it, illegal is just cracking software, because you grabbed a paid service without paying, what can be considered as stealing it. Does law contain direct prohibition of reverseengineering? I don't know, but it makes no sense to me to have such a rule, because re is just transforming the file to different form. I mean, if you buy a hoe, noone really cares if you use it to hoe a field or if you break it in two parts and use its metal part to dig some artistic picture later sold for thousands of dollars.
Even if it contained some special features like an undestroyable grip, which is patented by its manufacturer and hold as a secret, you are allowed to check it under electron microscope or check it by fractal derivation or whatever you are able to think out to reveal its secret. As soon as you don't use your knowledge to your own business, you should be fine. If you actually do, you are going against law because of stealing manufacturer's secret, and not because of revealing it.
That's how i see it. But I'm not a lawyer, so I'm not definitely sure.

With antiviruses, yes, they don't use reverseenginering, because they don't need to do so. Source code in C#, Java, or C++ is just a way for humans to better understand code, the same goes for assembler. Bytecode and machine instructions are just their more or less direct representation, hardly readable for us, but good for a program.
but take for example antivirus labs, if they catch a malicious file, they must at least disassemble it to see, how it works, doesn't they?

Best regards

Rastislav