I am able to extract my application apk file from PC. I am using the steps are
1. Add .zip after myapp.apk.zip
The APK file has been extracted successfully. But I am not able to see the XML file content.
The XML file has been incorrect format. This is my application. Learning Purpose Only.
Thanks.
Decompiling Android APPs using APKTool
Open command prompt and run below command.
apktool d apkfile ./FolderName
Look Here for More Information.Video Tutorial.
I guess that the content has maybe been obfuscatted. So the XML is not human-readable.
Related
I have written code for an android application using ApacheCordova. Now i want to generate apk file from that source code inside an android smartphone. Is it possible ?
You can use Shareit. When you share your app through ShareIt, the shareit would generate .apk file and send to other user. Thus you get your .apk file.
Install this app and you can extract an apk file from an android application, click here
I'm building phonegap app using phonegap-build.
I need to make some changes to the manifest of the android apk.
After i download the apk of my phonegap build, i rename it to .zip file to see the contents of the file.
When i open it, there i see the xml file there, and when i open that one, it has encoding problem.
This is what i see:
I understand it's a binary, but i need to see the content in plain english, if possible.
1) How can i encode it to see what is the content of this file properly?
2) After a change that i do on it, can i "decode" it back to binary?
So from what you wrote you wrote, you want to edit the AndroidManifest.xml from an APK file AFTER you built it, which is quite complicated. I suggest you editing the source AndroidManifest.xml and then re-building the APK. If you can't do this then please do the following.
(1) First, download and install Apktool. It is a free Android tool for decompiling and recompiling apps quickly. It provides access to .class files, resources and XML's. Here's a tutorial on how to install Apktool.
(2) Then you want to decompile your APK file (tutorial).
(3) Edit the AndroidManifest.xml file.
(4) Re-build the application (tutorial).
(5) Finally, you will have your APK file but it will be mostly useless as it is un-signed. You can't install un-signed apps as you will get an error (it may be possible to force-install it using root or adb tho) and you can't publish them. To sign it you can check out this link.
IMPORTANT INFORMATION: Your app will have to be signed with the same certificate with which it was signed the first time, otherwise it will be considered a different app. Not completely tho, you will have to un-install previous versions in order to install this one.
And yes, I know it's a very long and time-taking process but it is supposed to be, only if you have the source you should be able to edit the app.
As mentioned above, the tool you are looking for is Apktool.
You need to use --force-manifest flag when you decompile to decode AndroidmManifest.xml.
Some time ago i uploaded to google play an app for my family restaurant which was something like showing the menu, timetable, prices..all that stuff. It's still in the google play and i have access to it by google developers but the problem is that i lost all the code.
Is there any way of recovering the data to add some new info and then update my app?
Thank you a lot.
You'll need a rooted device for this:
Install the app to your device, and then take the apk off of the device using:
Plug your “Rooted” Android device into your computer via the included USB cable.
From your adb command line (usually C:\android-sdk-windows\tools\) type adb shell and press enter
Switch to root user, type su and press enter
type “cd data/app“ and press enter
List all the installed apk files, type ls and press enter (find the one you want to extract)
In another command window, pull one of the files on to your computer by typing:
adb pull /data/app/application.apk name.apk and press enter
Once you have the apk, rename it to whatever.zip and extract it as a zip file. You will now see a bunch of folders. Anything in your assets folder can be recovered now right away. For the java code, you must use dex2jar to convert classes.dex to a .jar file. After that, you can use JD-GUI to read the code from the .jar file.
To extract AndroidManifest.xml and everything in res folder(layout xml files, images etc.) you must use APKTool
Run the following command :
apktool.bat d sampleApp.apk
It also extracts the .smali file of all .class files, but these are difficult to read, and you should use the code from dex2jar instead.
If you Obfusticate your code using progaurd while generating the APK file, then its not possible.
If not, you can decompile the classes some extent and making some changes to the decompiled class and you can get it working... There are few tools to decompile the APJK file
Thanks,
How can i convert an apk into a zip flashable in clockWorkMod?
I tried using ApkInstaller. It didn't work. Keep getting the error; "installation aborted".
You can just change the .apk extension of your app to .zip Then put the .zip in your SD card and see if you can flashed with CWM.
I don't know exactly what you want to do, so if you can specify more info that would be great.
If what you want is to simply install an app (.apk) into your phone then you can follow this tutorial.
Hi i'm new to android my client want to run the app in their on Android Device i go through the many answers through Stack overflow like this:-
How to make .apk file
How to build an APK file in Eclipse?
but i'm unable to make build.
I want to make a build of app in which is usually .apk extension and how i'm able to install this .apk file in my clients android device it doesn't have any eclipse or IDE.
Please suggest me the way or some links regarding this process to build and install the app in clients android device without using eclipse or any IDE.
Thanks in advance.
Eclipse create .apk file of your project by itself and save it in bin folder copy that apk file and send that to client and tell him to save apk on SD card and run directly from SD card. It will work.
the moment you run the app on the emulator or a device, the .apk file is created and put in /%YOUR PROJECT%/bin/app.apk
you can send that to your client...