Android - compiled APK version change - android

I have a an updated APK that another developer (hired 3rd party) compiled and sent my way to upload to my Google Play Developers Console to update the previous version. The issue is that he didn't change the version code before sending it to me and leaving the country for several months (without contact). I'm not able to change the manifest (as far as I know) and I get this error when I attempt to upload:
Upload failed
You need to use a different version code for your APK because you already have one with version code 1.
Any thoughts or suggestions as to the best way around this issue? I can't wait for the developer to get back in a few months as the app is only half usable at this point. I'm WAY out of my element - hence the hiring of a third party developer.
Thanks in advance!

There is a tool called apktool located here
http://ibotpeaches.github.io/Apktool/
that may be able to help you. Essentially what it does, is it decompiles the APK file, allowing you to see the files that are inside. Once you decompile the APK, you will see a file called
apktool.yml
where you can change the version code / version name. The tricky part will now be recompiling the APK back to the original state. Apktool can help with that, as long as you have the keystore file and credentials the original developer used to sign the APK with. If you need any help with the specifics of Apktool, let me know!

Related

How to get the xml files of an apk file back to how it was?

About 1.5 years ago I uploaded my app (made in Android Studio) to the Google Play Store. During the period between then and now, I've been trying to make some other apps and during the development of one of those apps I did something to my Android Studio which made it crash or something. I've lost my code but got the APK file, so I decompiled it using decompiler.com. This gives me the Java code back nicely, but there are an incredible amount of XML files seperated over different folders. Is there any possibility to merge these together to get the original XML code back again?
Thanks in advance,
Koen
try this app, for decompile apk
https://sourceforge.net/projects/jadx.mirror/
Usually if your apk is not signed apk, then issues get resolved. If it is signed one, then you need to identify the xml and then extract it.

Which one is my main app file installation?

I'm pretty much newbie to android and I've built a .apk file of my app based on some researches. There is two files:
app-debug.apk
app-debug-unaligned.apk
My question is kinda duplicate of this and this. But honestly still I don't get the idea. All I want to know, should I install which one on my mobile? Or should I buy which one as an application? Also what's the difference of them? You know, this is not very clear:
It is a two step process. The unaligned apk is just an intermediate product.
Can please someone makes me clear about them? Also why the name of them contains debug word? Aren't they final output?
Can please someone makes me clear about them? Also why the name of them contains debug word? Aren't they final output?
No, the debug version contains extra code that allows Android studio to attach itself your app's running process on the phone for debugging purposes e.g. setting breakpoints, inspecting variables. Making this public can potentially allow others to reverse-engineer your app.
If you want to put an apk on the Google Play Store, you'll need to build the signed Release version. This is done from Android studio: Build -> Generate Signed APK... and selecting Release as your build type after accessing your keystore.
As for unaligned, as per the questions linked, it's an intermediate file and should be ignored. The answers in the posts you've linked explain it better than I could.
you will find your output apk in C:\Users\username\Desktop\new\projectname\app\build\outputs\apk
this will be your final apk and ignore all other apk.

How does one verify that the app store version of an open source app is running the same code?

There are many "open source" apps like K-9 mail on the android app store. If I compile and build the source code myself, I can be sure that the resulting apk, will indeed do what the source code says it will do.
But how can I verify, that the apk submitted to the store is actually the result of compiling the same source ? What is to stop the makers of k9 of inserting malicious code in the version submitted to the app store ? I don't see any hash, or other way of verifying the source.
(K-9 is just an example).
Compare the contents of the APKs: the one you pull off the device (that you got from the Play Store or wherever) and the one that you compiled yourself. If the compiled classes differ, then there may be cause for deeper investigation. It's possible the differences come from differences in compilers, bytecode converters, or obfuscator settings. Or, it's possible that the differences are indicative of "malicious code". That work is up to you.
Or, use a store like F-Droid that compiles from source itself.
Or, just use the version that you compiled from source yourself.

How to retrieve my app's source codes

I've run into an issue and not sure how to solve. I worked with a developer to create an IOS and Android app. It's a paid app and I decided after about 6 months to create the same app and offer for free with ads. This should go smoothly, but the developer says his computer crashed and he no longer has my source files. I have a version, but not "the" version cause I was working with him through Elance and reached the upload limit to send files. Can I retrieve the files from Apple or Google Play somehow? Any other ideas? Any help is appreciated.
I'm afraid you are going to have troubles either way. From what I know of Google Play, you need to have the unique signature (private key) compiled in to the APK when you upload it. Since there is no way you'll get that again, you won't be able to duplicate it.
On the other hand, you would have to compile a NEW version anyway, since it is not a paid version. So, assuming you have access to the source code at all, none of the first paragraph really applies.
Having said all that, what you need is an app decompiler. I wish you luck with that. But that's never as simple as it seems. I'm afraid you may have to start from scratch. Although, having done it once, you shouldn't have such a hard time with it...
What you need to do is this:
A. Pray that your developer had neglected to obfuscate your app's code
B. Download the APK from Google Play and use dex2jar to convert it into a standard Java jar.
C. Download jd java decompiler from here to convert the binary .class files inside the jar into text
D. Use ApkTool to convert the binary encoded XML files within your APK into textual XMLs.
E. Get into the habit of using source control
Good luck.
Unfortunately it's not possible to decompile a iOS- or Androidapp.

phonegap build android signing

I have used HTML files to build an application for Android on PhoneGap's website. I want to release it as a free App and signed up with the Play Store and all that. However when I upload it, it says I need to sign my application and such because it is in Debug Mode. I have searched on here and the web for help but I cannot figure out how to sign the App or add Keystore files and such in the PhoneGap Build website.
I checked the documentation for it on there website. I would post the link but I can only post 2 for my reputation. It is quite vague and it says there is more information on the Google Play documentation:
While there was more information it directed me to use something called "Keytool utility" and that seems to be my disconnect. Where would I find this utility so I may use it?
I also checked this question and its answers but it again left me in the dark:
Error signing android app on phonegap build
Here are other questions I have searched in for clues or anything I could use --
I tried this one but I do not know where they are finding this command line. I do not see it on the phonegap build website and they said I didn't have to install anything.
How to generate a signing keystore file for PhoneGap Build within Mac OSX?
Someone suggested to another user on here to follow a tutorial on mobiletutsplus and i am familiar with Eclipse for HTML/CSS but I do not understand their signing section. Am I missing a program here or something?
Download and install the Android SDK, be sure to update it, open a dos command line, and launch the script/exe called keytool which will be located in your Android SDK inside the tools/ folder or the platform-tools/ folder.
When asked how long the certificate should last, select something long like 99 years or 120 years. Be sure to note down all the identifiers you use to generate your key, and be sure to back up your key in a secure location after signing your apk.
If you ever lose that key, there is no way to replace it and you won't be able to update your existing app without losing its current users, its current reviews, its current ratings, and its current ranking it may have garnered over time.
When signing your app, you will be able to do it from the dos command line as well, however, you may prefer to install Eclise and use the IDE itself to help you to import your application, to do the packaging and the signing. Eclipse just uses the same command line tools in the background to package the app and sign it, but it gives you a visual interface to do with, so you may prefer to do it that way. And basically, the way you'd package and sign an Android Cordova/Phone Gap app is exactly the same way you would package and sign a standard Java Android app.
Whoever gave you the idea of viewing a video tutorial, that's probably a good idea. That video is only 3 minutes and 43 seconds long, so it's a good investment of your time. It's not complicated, but there are a bunch of little steps to follow and it's easy to miss one if you're just following what's written on the documentation.

Categories

Resources