I am using apktool to decompile the apk to get the res file. I downloaded the apktool and used command (apktool –d myapp.apk), it is extracting the res file but in value folder some xml files are missing.Please let me know the solution.Thanks..
Just open APK with Winrar and you'll find the stuff there.
The error "Public symbol string/xyz declared here is not defined" is telling you that the edit you made is not defined in the string.xml. You will have to edit the string.xml also.
Could be related to the issue tracked here!
A more interesting point about this problem is explained by owner of apktool2.0 beta release here!
I get a feeling that the problem you are facing is because of the apk being built using older aapt and you are building using newer aapt. Try getting the aapt version using which the apk was built and see if apktool helps your case.
Related
I have opened .apk archive file which shows me the following file:
Androidmanifest.xml
resource.ars
META-INF folder
RES folder
I am not able to get classes.dex. It shows me in zip folder but when I extract it classes.dex disappear after extraction.
No idea how that happened to you, but you can decompile the apk directly into Java source code using a tool called JADX. Just search it for your platform in Google.
I got the solution of my question and posting answer so may be helpful to someone.
Android .apk file which I was using was malware sample. My Antivirus was not allowing extraction of classes.dex, so it was removed by Antivirus automatically after few seconds.
In android how to get which compiled version((compiled with)(library file version)) They used in the project By using .apk file
I decompiled the apk and check it. But i can,t able know that.
In AndroidManifest.xml They didn't mentioned like "android:minSdkVersion" and "android:targetSdkVersion".That's Why i am asked this question
Thanks In advance
.apk is just a simple archive file. You can open it with WinRar for example and find the AndroidManifest.xml file inside that archive and you should have a line that starts with android:minSdkVersion and android:targetSdkVersion. The former is what's the oldest version of Android that the application supports and the latter is the target devices i.e. the version of SDK that compiled the code.
When I use ant tool for build an android project, I do not know how to add custom folders to the apk file, such as a a folder named "running" under the project root, when I use the eclipse can be directly add to apk. I hope you can give me some help, thanks!
During the build process, your Android projects are compiled and packaged into an .apk file, the container for your application binary. It contains all of the information necessary to run your application on a device or emulator, such as compiled .dex files (.class files converted to Dalvik byte code), a binary version of the AndroidManifest.xml file, compiled resources (resources.arsc) and uncompiled resource files for your application.
I can't figure out why you need to add the folder to apk, well if you are asking about adding it in the project and later to be accessed in the apk then yes you can place it inside the "assets" folder of your project
I tried extracting apk file using apktool. I followed steps mentioned below.
Is there a way to get the source code from an APK file?
but i am not able to get it completely.I am not sure about where to put the apktool and how to decompile apk file.
i got following error while running apktool command
C:\Windows\System32>apktool.bat
Unable to access jarfile C:\Windows\System32\apktool.jar
Please help me to sort this out.
Thanks in advance
I faced the same problem. I my case i discovered that the jar file is present in a separate package and i had to download apktool1.5.2.tar.bz2 in addition to apktool-install-windows-r05-ibot.tar.bz2 .
Then i extracted the jar file and placed it in the same directory as apktool.
Hope it helps.
I also had this problem, then i noticed this in apktool.After done that,apktool gone well.
Rename downloaded jar to apktool.jar
I would create a folder called "apktool" somewhere where it won't be deleted ( a safe spot ).
Download the wrapper file & the apktool file itself via the Google code page (linked below). This is 2 files. One is a wrapper, OS specific, along with aapt ( which is needed for rebuild), and the other is simply apktool.jar which is the main application.
Once that is done, go into Environment Variables (PATH) for Windows, and add that current directory to it. So you can access apktool / aapt anywhere via command prompt.
http://code.google.com/p/android-apktool/
ApkTool + Dex2Jar + any java decompiler? Comon! This is old style :0)
Try NEW open-source APK and DEX decompiler called Jadx: https://sourceforge.net/projects/jadx/files/
It has also online version here: http://www.javadecompilers.com/apk/
I have followed https://ibotpeaches.github.io/Apktool/install/ link for windows and renamed jar file as "apktool.jar" with extra jar extension (ie.apktool.jar.jar) so I was getting "Error: Unable to access jarfile C:\APKtool\apktool.jar".
After renaming properly (removing extra .jar extension) , I am able to use "apktool.jar" properly.
I know it is silly mistake, but some time it happens :)
Those who are still facing same issue, follow below steps:
Download "https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/windows/apktool.bat"
download latest apktool from https://bitbucket.org/iBotPeaches/apktool/downloads/
Rename apktool_version.jar to apktool.jar
Put .bat and .jar in same folder.
Run apktool.bar d "path of apkfile/example.apk"
Using DDMS I took a downloaded APK off my phone and unzipped it.
The PNGs look great, but when I try to read the XMLs their encoding is such that none of my text editors can read it (Word, Notepad, Visual Studio etc)
Is there something done to the XMLs in a APK that prevents us from reading them?
You can decode them using a Java program - AXMLPrinter2.jar.
http://forum.xda-developers.com/showthread.php?t=514412
http://code.google.com/p/android4me/downloads/detail?name=AXMLPrinter2.jar&can=2&q=
I'm sure there are better details out there, but that should set you on the right path.
Take a look at android-apktool, as detailed here.
The XML files are stored in a compiled format. From android docs:
When you compile your application,
each XML layout file is compiled into
a View resource.
I'm not aware of a decompiler, its probably possible though.
You can see some implementation through aapt tool.
Navigate to "platform-tools" in your sdk folder.
copy and paste the apk to this folder.
Execute the command:
" aapt l -a apk_name.apk "
Where the "apk_name.apk" is your apk's name.