Why can`t see apk files? - android

I can open apk, but can`t see files . Why ?
Normally, would be seen xml files, manifest file and so on , but all can i see are question marks and bars.
Text Wrangler is code editor used for mac.

Although Java is normally an interpreted language, the architecture of android is set up to compile the code you write when generating the .apk. Basically, the .apk does not contain your source code, only your compiled code.

Related

Decompile flutter release apk. Where to find source code?

I have built a flutter apk in release mode and I would like to test if my app is really obfuscated and my code cannot be read. So I tried to decompile the apk using the APK Decompiler.
I had many files after decompiling. The question now is: What is the file that contains the source code and how do I know if it can be read or not?
I have some doubt on libapp.so, is it?
I confirmed my doubt when I was to able to open the libapp.so (shared object) file using Ghex and I have found some words of my code (like text and some style proprieties) but the source code is really obfuscated and it cannot be simply read.

How to edit a compiled Android app class from APK

I have seen that there are decompilers that works pretty well to show on fly code and resources of compiled APK.
I'm wondering if there is a way to edit and rebuild APK classes without export all sources and resources recreating a new project manually adding all libraries resources code etc. Since the APK already contains all the needed dependencies and resources configured to work together should be possible.
Often there are apps that have small bugs that would be easy to fix if only was possible edit and rebuild APK on fly
You can use Virtuous Ten Studio that allows you to import an APK edit smali code and resources and rebuild the edited version of the APK.
(You can also configure it to show Java code but since uses a "smali to Java" approach the generated code is imperfect.)
https://ibotpeaches.github.io/Apktool/
You can use Apktools to extract and compress APK-files
It is possible to manage/edit Smali files. They are similar to Java-files.

Android: Why is the size of apk file smaller than the entire project

I am definitely a noob at understanding this as of now, I noticed usually that the apk file is much smaller than my Android Projects. How is that happening? Is it always like this? I got this doubt while I was compressing an entire project to zip file, it was showing that the disk size is 128MB...(noticed it then the first time) whereas the actual apk is only 22.4 MB. why is this difference?
An APK is an Android application package file. Each Android application is compiled and packaged in a single file that includes all of the application’s code (.dex files), resources, assets, and manifest file. The APK file is basically a .zip file
Your project contains all of your source files and files used only by the IDE. The apk only contains compiled files which are smaller.
Also, images/resources etc are compressed in the apk.
Android projects (in general) contain source code, which gets compiled to class files that end up in the APK.
Compiled files are smaller than the source code - for example they strip all the comments out of the file (you do include comments in your source files don't you!)
In addition to the other answers, you're probably using something called ProGuard which further compresses your project by shortening field names, removing dead (unused) code, merging classes, and dozens of other tricks.
Check out the FAQ for more about ProGuard.
It has to do with how Android compiles your project. It basically dumps the bulk, compresses the resources, and compiles everything into a simple binary. It will happen with almost every type of programming, your final build will usually be smaller than your total project (unless you include outside sources in your build). There is a lot of bulk in code that get's stripped during compilation.

How to input .apk file and read classes and xml file from the input apk file in eclipse?

Program should be like input the apk file then it should extract all the java and xml document and from that i need to read the required content from the java and xml document.
It's called "Decompile".
You can try google searching "Android apk decompile."
One popular tool to do this is APKTool.
You can see the code for any android app.
But decompiled code wont be the same as the code before. It will be harder to understand.
You can check this video tutorial..

Decompress Rar file in Android

I want to learn how to decompress a .rar file in android. Zip files can be easily decompressed using ZipStream. Is there any similar way for rar files.
I just realized this with jUnrar from here
https://github.com/edmund-wagner/junrar
Create a new package within your Android src directory called
com.github.junrar
You should delete com.github.junrar.vfs2 because it has some dependencies and you probably won't use it anyway.
You will probably get some errors about the logger class. You can either remove the few logging lines or like i did write a tiny wrapper which communicates with android.util.Log. I did that and changed the includes.
If you finished importing the code take a look at jUnrars testutils.
I used this and it worked out of the box:
https://github.com/edmund-wagner/junrar/blob/master/testutil/src/main/java/com/github/junrar/testutil/ExtractArchive.java
Hope it helps
RAR isn't very commonly used (except in certain niches), so you won't find support for it built into the Android libraries. Probably the easiest thing to do is to get a Java library that handles RAR files, as covered in this question:
RAR archives with java

Categories

Resources