How to use Open Source Android application code - android

I want to build a new Android project based on another project that is available open source via Google Code. I already downloaded the code via svn and loaded tested it in Eclipse.
But now when I try to run the code on a phone where the original app is installed I get the "Re-installation failed due to different application signatures" error.
What do I have to change in the app preferences of my branch in order for it to be a new, independent app that is not associated with the source app so that both can be installed alongside?!

You need to uninstall the original version of the open source app.
Once you run it from your local eclipse it will use your debug key which is different than the original key - hence the signature error

Try rooting your phone then uninstalling the system app using adb then installing your custom one

Related

Will different machine installed Android app (via Android Studio) get a different signature?

I have an old app that I've written for personal use only, and never made as release to the Play Store. I installed it to my phone via Android Studio using run app command.
Many years later I want to modify the app, I try to pick up the app and run it again, this time using a different computer. I get the error saying:
"Installation failed since the device already has an application with the same package but a different signature. In order to proceed, you have to uninstall the existing application."
I definitely don't want to uninstall my app, this would cause me lost all the data I've entered to it. So I want to ask that isn't the debug keystore used by Android Studio to install app on device would create app of the same signature? Why it would be different? Is a different machine caused this issue? Thank you very much!
It sounds like you were using your debug certificate when you originally installed the app. This is unique to each machine when you install Android Studio.
You can copy the debug certificate from your old machine to your new one.
The file is located in your [userhome]\.android\debug.keystore

Replace current application with rebuilt version from new Android Studio Project

Information:
Currently, I have an application on the market that is actively used. Rather than refactor all my code to rebuild the application, I rebuilt the whole application from scratch in a new Android Studio Project with identical/updated information (applicationId/packageId/versions). I want to upload this apk to the google play store to have it update users normally.
Problem:
Testing this situation on my devices hasn't worked. I have a device with the 'old' application on it and I attempt to install the 'new' version and I receive this error during installation: "The package seems to be corrupt"
Question:
Is this process even possible? If so, why might I be getting this error? If not, what is the method by which I could do this?
Thanks!
It is possible as you say, however you need to keep three things in mind:
Package name must be the same
Signing key must be the same
Version number must be higher than last version
Other than that, there should be no problems
You are not going to be able to push the update to the play store with your new project, because the file that you sign the application with (signing key), is associated with your project old SHA 1 and without that file, you cannot push an update.
I suggest you create a new copy of your old project and work there

thread priority security exception make sure the apk is signed

I am trying to build my project in oculus gear vr using unity5 , but when I deploy my app I get the below error
thread priority security exception make sure the apk is signed
I have even created keystore
any suggestion why I might be facing this error in gear vr
I figure out the answer , to run apps in gear vr , you must have signature file for used device by get device id & use site below
https://developer.oculus.com/osig/
after you get the file , you should put inside your project in this directory
YourProjectName --- > assets --> Plugins ---> android ---> assets
(notice if you don't find this directory make sure your build platform
android , from build setting -- > switch platform)
then what you if you get this error
why this error happen ??
when I work in project I copy signature file with its meta file
so to fix error , just copy signature file without its meta file
UPDATED ANSWER
How you can get device id?
There many ways to approach that but best way to write in terminal
adb devices
You should see a list of attached devices like this:
List of devices attached
ce0551e7 device
or if you are lazy like me use this app its working very well it called
SideloadVR DeviceID
I solved this problem by following the steps as below,
Get the device ID using the adb.
For that, take the command prompt and type adb devices.
Ensure that adb path is added in the environment variables.
Also, you can use SideloadVR app to get the device ID.
Used the device ID to generate the oculus signature file using the service at https://developer.oculus.com/manage/tools/osig-generator/
Copy the signature file generated in step 2 at the following location in your unity project sub folder - Assets / Plugins / Android / assets (Create the folders if that do not exist).
Now build and Run the App on an Android Device.
For more: Oculus Signature File (osig) Generator
The above method didn't work for me, but I found that putting the signature file (osig) into "Project_Name/app/src/main/assets" does work. Within Android Studio you will see the file in your 'assets' folder too.
For example with the GearVRf Cockpit Demo, I put my osig file in:
GearVRf-Demos\gvr-cockpit\app\src\main\assets

android installing apk file manually error

I wondered what installing apk files into emulator or device means and tried to install manually with eclipse first. I opened file explorer tab in ddms section in eclipse and realized that all files with apk extension are in app folder. I selected app directory and clicked push a file onto device button on the top. With selecting apk file i want it was installed to the emulator. However, i am getting this error when try to run app ,
Is this error about my installation method or caused by something different ?
The only way to install an apk is with
adb install FileName.apk
I think that the installation procedure of an Android application would be more complex than simply putting the apk in the app directory. Various folders have to be created to store application local data, file permissions for the application has to be set, the package manager has to be updated about the new package, and many other scores.
You should really just use the default installer of Android to take care of the installation. And, if you are really curious to know the installation procedure, you can always check out the source code! You can find details in the Getting Started page on how to download the source.

why won't apk file update

I'm developing an android app using Eclipse. I export the app using the Export Android App function. I sign and align the resulting apk file. I then copy this apk to a webserver and try to install it on my phone. It goes though the installation steps, and when I test the app it does not contain my latest changes. It seems to install one of my previous builds.
Is the problem in:
- the way I create the apk?
- a cache on the phone that has not been cleared?
How do I get Eclispe to make a current apk, and how do I get my phone to install it?
How can I verify which version of my code is in a particular apk file?
Thanks,
Gerry
It could be that Eclipse isn't building the new .apk properly, though it sounds like you're exporting correctly. Are you giving the new .apk a different name from the old one? If not, then you could be downloading or installing the old one by accident.
You should be able to go into Settings -> Applications -> Manage Applications on your phone, then find your app and open its info page. The version string should be listed near the top, so you can verify that the latest version is installed.
Try running "adb logcat | tee logfile" (or adb logcat > logfile) before you begin the install attempt, then ctrl-C it and go over the file with a fine tooth comb - there's likely some hints of the problem buried within the noise.

Categories

Resources