I recently created an app on the apple app store, and I want to convert it to android. However, I have absolutely no experience with using terminal, so please forgive me for the "noob" question i am about to ask....
I was able to build a release version of the xcode project, and it's in this directory:
/Users/chrisgonzalez/.apportable/SDK/Build/android-armeabi-release/SuperPowerUP!/SuperPowerUP!-release.apk
How do I find this apk file? I tried looking through finder but couldnt find it....
You can just go into that directory in the terminal(cd ) and do a open .(dot) It should open up finder in the current directory and you should be able to copy the .apk file to any place you want to.
From the Terminal, type:
open '/Users/chrisgonzalez/.apportable/SDK/Build/android-armeabi-release/SuperPowerUP!'
The single quotes around that directory path will prevent the shell from interpreting the ! character. Also single-quoting will help in cases where you have whitespace or non-alphanumeric characters in your path name.
(And as JohnUopini wrote in the comment to your original question, you should probably avoid using non-alphanumeric characters in file/path names).
Related
I was developing an Android app for more than a month, but my computer crashed and I lost all the code from it. I have a compiled app installed on a test phone and tablet. Is there any way to extract source code from it?
I followed some guide for game modders (they are probably doing something similar), and I have extracted .apk with an app called Total Commander. Now the guide states that I should extract it with the apktool. But all files are still in binary (when I opened them I got random chars). Now, is there any tool (for Linux) that can decompile .apk back to source code, or maybe some feature of apktool I miss?
Note: I also tried this answer from 10 but also without success.
EDIT: javadecompileonline also did not decompile binaries correctly,
so this should be .json file:
<m*/��%kي%jTƴ���69/�t��
č �Cx���Q�đš?������i�
ć���/��i�JRᙱg�.�s
First you go to Android studio's welcome page there is a option to extract source code from APKs.
Another way is to install this apk extractor application from play store then you can extract source code from APKs Link : https://play.google.com/store/apps/details?id=com.ext.ui
I'm trying to modify the Androidmanifest.xml for the browser on my device so that I can execute an app by loading a URI in the browser.
I've been running around the file system in ADB SHELL all day, but can't seem to find it. Plus there is no FIND, nor LOCATE command on the system.
You can theoretically find the Androidmanifest.xml file in the APK.
Every APK contains the compiled source code of the application. There is no useable decompiler for APKs at the moment so it is not possible to change the content of one.
In addition to the compiled code and the other resources of the application, an APK also contains a signature from the developer, which will become invalid when the content is changed to verify the source of an APK. An Android system won't install an APK with an invalid signature, so even if you could change the content of the APK, you still couldn't use it.
The conclusion: You cannot do what you are trying to do.
Android Studio on Windows 10/11, it’s in: app/src/main.
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,
I'm creating a software that will guide the user through a few steps, to publish an android application (APK file).
The way I am doing this, is that the APK file is already compiled, and all I need to do is replace an XML file in the package, and that will change the behaviour of the application. My big problem now, is that unpacking the apk file, and doing any tiny text edit, and then packing it again, breaks the signature and prevents the application from running on any device, giving a message that the signature is incorrect.
How can I solve this? I want to safely open the APK, write something in a text file, and close it again. Note that this operation will be done on the user's computer (after he purchases our application) so we're look for a command-line tool with no special requirements like JDK.
Any help?
Ok I reached the best "tested" solution - I'm posting it here to save other developers hours of googling. The only downside is that I will require the customer to install JDK on his machine, unfortunately. The reason is because I did not find any apk-signing tool that works purely on windows, without relying on JDK.
I have my android application created using Air, so this makes things easy for me - all of the air files are treated as resource assets. So have your APK archive file ready.
Once you have your modifications ready, put them inside a temporary folder named "assets". You will use the 7-zip command line tool (free: http://sourceforge.net/projects/sevenzip/) to update the contents of your apk. To have it working with your apk you will have to rename your apk's extension to zip - don't worry, you'll change it back later.
Now from a .bat file (or directly in the command prompt) from the location containing both your apk file (zip extensioned) and your assets folder, you'll call: 7za u APK-file.zip assets
Now your apk file is updated. Rename it back to .apk extension
Now you'll use the signAPK tool from here https://code.google.com/p/signapk/ and note that this is the only step requiring JDK installed. It also assumes that you have your key files ready (replace the dummy ones included in the package). Extract the file contents and call: java -jar signapk.jar key.x509.pem key.pk8 [android_app].apk [signed_android_app].apk
At the very end, you may find your signed apk file size drammatically increased. So you need to use the android's zipAlign tool: (darn, can't post the link since new users can only post a maximum of two hyperlinks)
you will be calling the command: zipAlign -c 4 [signed_android_app].apk
And voila! That's the route I'm taking.
If someone finds a way to do the signing process without relying on JDK (assuming the key files are ready) please share.
How can I solve this?
You don't. If you modify an APK file, by any means, it must be re-signed.
Android apk files must be signed. That signature proves that the contents of the apk have NOT BEEN MODIFIED from what was initially published. (Which is exactly what you are doing.) The signature at the same time, also proves who the author is.
So in a normal signed apk file:
You know who the author is. (Even if it's not something you as a human can understand.)
You know the contents were put there by the author, and not modified since.
This is a key security measure built into Android, is there for very good reason, and cannot be overcome. It prevents things like viruses from being embedded inside innocent apk files.
I compiled and ran a project on my phone through eclipse which is still install there currently. While doing some directory cleaning I accidentally deleted the source code so the only remaining version of the code is in the apk installed on my phone. Is there anyway to export the app back to my computer?? It isn't signed or anything either.
Thanks!
You can set up to be able to copy files on/off your phone via the USB connection - heres where you can look to find it:
Does Android keep the .apk files? if so where?
Then after you get the .apk off look at these questions for decompiling:
Is it possible to decompile an Android .apk file?
decompiling DEX into Java sourcecode
You CAN pull the APK off of the phone, but it's going to be Java Bytecode, not your source code (regardless of whether or not it's signed). You would have to reverse-engineer the classes to retrieve your code. If it's not a VERY large app, I'd say your time would best be spent simply re-creating it.