[Q] Editing apps with apktool - Android Q&A, Help & Troubleshooting

Hello everyone, I have been reading this forum for some time and decided to register. It's a great resource site with amazing info.
I have been playing with apktool to learn how apps are made. Decompiled following the guide from this forum.
However I can't find what I'm looking for in the apps. For example, it's easy to edit the drawable folders of the apps and change the images.
I took some apps that gather feeds from news sites and I tried to find where are the feeds URLs coded or embedded inside the apps files, and could not find any info at all. No URLs at all. I opened the XMLs, and other files inside res, lib or smali folders, opened a lot of the files with Notepad++ and I can't find any information about it, or any place where the app connects to the website.
Is it possible to access that info when we decompile with apktool?
I also watched a lot of videos in YouTube, on how to edit apps with apktool, and all of them explain how to change the images, but nothing else.
Is it only possible to edit the theme/design of an app, when we decompile with apktool? Or can we go further and change something else?
Any help appreciated.

Ok, after further research, and some trial and error, it seems apktool only does a very superficial decompile of the apk. It won't give you the actual source code of the app. So you can only do some very basic changes to the app, like images and such. However it is a very good first step to decompile the app.
I realized we need to use other tools to create and decompile the .jar files. I will keep experimenting.

Apktool can also be used in reverse engineering apps. But not intended for piracy use
Sent From My Samsung Galaxy Y s5360

Related

Problem modifying apk

Hi, i am trying to modify the classes.dex file in an apk but it is giving me problems.
if i decompile the apk and recompile it after modifying the app installs but crashes after one minute. also some functionality in the app is also lost.but when i binary edited the classes.dex file and replaced it in the apk ( i have used different methods for replacing the .dex such as direct replacing in archive and replacing in the decompiled archive) the app doesn't install and the phone or emulator reboots. i have done this with other apps and they are working fine after editing so i couldn't understand what's going wrong. please help
You should use a decompiler and achive to the java code. Than you can easily modify and recompile the app. You will need an Linux virtual machine to do this.
In linux, after you found you .apk file use this to decompile it to a .jar file. http://siis.cse.psu.edu/ded/installation.html. After that, you can use http://java.decompiler.free.fr/?q=jdgui to browse the code. With this method you will need a Linux machine and would give you the best result.
If you want to use windows, follow this tutorial http://androidorigin.blogspot.com/2011/02/dex-format-to-jar-format.html but I warn you, its likely to be faulty.
Hope this will help you.
thanks for replying
i used apktool to decompile and modify the smali code. i had even tried converting the smali code to java but no help.the problem is that the recompiled app runs only for one minute and then crashes without any error message even logcat log is not of help it just says that the process xxx has died but no err msg or exception is logged. if i replace the classes.dex with the patched one and then re-sign it it does not install and crashes the emulator but when i again decompile and then recompile the modified file it return to the same old problem of crashing. do you know how apktool packages the compiled files?
You should follow one of the tutorials posted in my last post. I did not used apktool and I don't know how it works.c the method with that decompiler will work. If you want your application signed just sign it as a normal one.
this particular apk loses about 20-30 kb in filesize on decompiling and then recompiling with apktool while this is not seen in any other apk. maybe this means that this file has some overlay data that goes missing on modifying and creats problems.7-zip is unable to show any extra data in the file.does anyone know how to add and extract overlay data on/from an apk?

[Q] Editing XML files

Does anyone know of a Xml editor to use for modifying the xmls on the VZW Note 2? I have used several including a couple of Hex editors but the format is still the same. I cannot see the values.
See attachment for format:
You didn't decompile the .apk where you got that from that's why you can't read it. Use APK Manager and decompile the .apk and it'll be read-able.
Android XML is compiled. You must decompile it. Alternately, you can view it on your device.
Thanks guys. I was just reading the SDK training kit online which outlined creating and editing. Now I know that the apk must be decompiled.
Again, thanks!

[Q] Unable to re-compile (using autoapktool / apktool)

** I dont have enough posts yet so cannot start thread in the correct section, so posted it below here in general **
I have all the content ready to add to an app and been searching for the right template and came across an app that has the look and feel I want.
I used autoapktool2.0.0 and it dissasembles the app fine so you can access the xml and other files. I am also able to edit a test apk and recompile and sign it with the above software fine. It creates 2 different folders one build which has a created classes file and one called dist that has the completed recompiled apk
however, when i try one specific apk I am able to decompile it fine, but when it comes to recompiling it after making a tiny test edit it will not do it.
I creates the classes file fine but it does not recompile the whole source files into an apk, so the dist folder is not created.
Why will it not recompile the whole thing?, is there something I am doing wrong or is the thing protected?
can someone test it for me using same methods I done and see what their result is?
(no errors were given when recompiling, it acted as if it was complete but it was not, as no apk created)

[Q] How to edit graphics in a Non-System Android App?

I wanted to change the graphics of a certain app to my liking. But I guess it can't be achieved in the non-system apps at least not by me. I tried the apktool to decompress it and then edit the the files I needed to, but it won't compile back?! Can anyone tell me what is going wrong. I have attached the whole screenshot of what error my apktool is showing me.
Also in the build folder I'm only getting classes.dex file and nothing more.

[Q] Why people use smali instead of java decompiler to reverse apk files ?

Hi,
I spent 1 month coding an android app, and then I lost the source code in an hdd crash. Well, those things sux, but hopefully I managed to find an old apk build of this app. I was able to recover part of the source code by extracting the classes.dex file, decrypting it with dex2jar, and then opening the decrypted file with java decompiler (jd-gui.exe)... I remained amazed when I saw that my source code was so easy to found...
Now I wonder, why people use smali to reverse apk files instead of dex2jar+jd-gui ??
No one ??

Categories

Resources