I had an issue with my Computer and had to format it. An app was completely erased because my version control was only locally. The app exists on the Google Play store and I have access to the Android App Bundle. Is there a way to recover the flutter code?
sadly, practically: no... you may try to "decompile" APK (every "type" of abi/density/lang etc. splits), but still this will give you some Android-specified code, probably still messy, even without minifying. and you are seeking full flutter code, thats impossible
note that: if you could do that, got full code from "compiled" APK/bundle then anyone could do that, steal your code, make clones etc. this "possibility" would be just very unsecure
Related
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!
This is my first questions on SO, but I would first like to thank the community for helping me along the way in creating a few Android apps. I am not a programmer by profession, and most of the stuff I make is just for fun, but one Android app is a real project that I created for a client, and I've run into some real trouble and need some help.
The app I made basically takes in some data, stores it into an SQL database, and when necessary, uses queries to pull various information from the DB, and displays it. If any adjustments need to be made, I make them and just send them another .apk. No problem, until now...
I recently upgraded to Windows 10, doubled my laptop's RAM and replaced my hard drive with an SSD, and did a refresh of the OS. Everything, including Android Studio, runs like a dream now!!! I had a request from my client to make a few adjustments, so I recopied my backed up source code to my projects folder, opened the code, made the modifications, and resent the .apk to my client. They are getting the following message:
"X App not installed.
An existing package by the same name with a conflicting signature is already installed."
The only changes I made to the app were adding a table to the database (and upgrading the DB version number, of course), and modified some layouts and a couple of methods and calculations, etc. Nothing more. I have searched up and down and have even replicated the same error on my tablet and can't find a way around it. My client currently has a few months worth of data input into the app, so they can't just uninstall it and do a new app installation. Is there anything I can do at this point? Also, I never made any custom key signature, just programmed, made .apk, and have sent numerous updates without issue. Any help would be greatly appreciated. (I have all my project folders and .apks backed up for all the different versions that I have sent)
Thank you!
Your best bet at this point, assuming you can't find/get the original key, is to use a backup program (or adb pull worst case) to backup his /data/data/ folder. Then you can uninstall the original app and reinstall the new version. Then you can restore/adb push the old folder's contents to the phone to restore the data files. This may require rooting it.
If possible I would test this on another phone first, to make sure it works, since you only get 1 shot at this. I would also save your key in your source control repo in the future.
my app is sideloaded which means it is not on google play store. when it comes to update, it requires users to manually download the apk and replace the previous.
is it possible that I can have majority of my code on my server and have app to pull then update itself? app would only have limited code in order to pull source code from server and all the necessary settings/permissions in manifest. this way I'll not need to send out a new apk too often.
i found similar example here and someone mentioned about dalvik, but I have no clue how those work...Can someone please tell me if this is doable? and with some examples.
Thanks
I know there are plenty of questions about this on here, but I've tried everything (but the correct 'thing', obviously!) and nothing seems to shine any light on the problem I'm having.
I've written an app (for a customer), which is designed to be hosted on their own server. The app references a simple text file with the latest version code in it and checks it against it's own version. If it's out of date it goes off and downloads the update. Everything is working as intended up to this point.
I use the:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(outputFile), "application/vnd.android.package-archive");
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(i);
...code to start the install process of the newly downloaded .apk file. And that all starts as I would expect.
I click on "Install" - when I'm prompted to confirm the overwriting of the current app, with the new. It starts, and then displays:
App not installed. And existing package by the same name with a conflicting signature is already installed.
Now I'm aware that Android can't have multiple applications sharing the same package name, which is fine, but nothing comes up in LogCat and I can only assume that the OS is annoyed at me attempting to 'update' my app, even though I'm going through all the correct channels and using the inbuilt package manager to do it for me!
Can anyone tell me what the OS is moaning about? I'm not attempting to install two apps side by side, I want it to update it, which it starts to do, and then gets really confused.
Is it something to do with me using the same keystore for signing the packages? I highly doubt it as I've used the same keystores previously to handle updates to games and the like, but I just can't figure out what it's complaining about.
Hopefully someone out there has had this issue and solved it, and can point me in the right direction. I'm flying a bit blind with the limited information it's giving me :(
Cheers.
You have built the new and old versions using different signing keys; likely you either built them on different machines, or one is a debug certificate and the other a release one. When this happens, you typically have to manually and explicitly remove the old version before installing a new one with a different certificate - it's basically a safety measure against inadvertently installing a trojanized imposter update.
Note that you can move certificates between build machines (and may have to if you turn the codebase over to the customer), though you will want to be careful when doing so.
For the next version of our application, I want to change the sharedUserId since we now use an internal control dashboard app which must write to the other app's settings files.
But since the app is already installed on many phones, will this be a problem? I ran a little test on the emulator, and I'm seeing exceptions in the device logs that *.bak versions of the preference files cannot be written. Not sure how critical that is. Curiously, safing settings still seems to work, even though the shared_prefs folder had been created using another Linux user ID.
Did anyone try this before?
And to answer my own question again:
No, it's not safe. Since updating an app via Android Market will not remove the database and preference files, the new version will not be able to read or write these files (since they were created under a different Linux user ID), and the app will crash after the update. You would have to ask your users to completely uninstall and reinstall the app, which is certainly not recommended.
As a general rule I conclude from this:
Whenever you start out developing a new app, make sure to set a manual android:process and android:sharedUserId attribute! It doesn't hurt in case you don't need it, but it gives you full control over which apps have access to this app's private resources.
No solution as of now, but starring at registered issues might get Google to fix this:
http://code.google.com/p/android/issues/detail?id=1227
http://code.google.com/p/android/issues/detail?id=14074