Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharing the same target device across multiple Android Development environments

We have more than one programmer here working on Android code in Android Studio 2.2.2. We're working in debug mode because the code is still in development but we periodically load our latest work on various other employees' devices for them to test with, from the menu bar using Run > Debug 'app'

If I load code onto a device that another developer had previously put code on, Android Studio won't let me, saying there's an incompatibility ([UNINSTALL_FAILED_UPDATE_INCOMPATIBLE] and that I have to uninstall the old code first. I don't want to because I want to retain the old data since we collect debugging and performance data during test runs. (we're developing an industrial process-control app)

Looking on Stack Overflow I find two solutions to this but they are both from the Eclipse era: Using the same debug keystore on multiple computers and Share debug.keystore The files referenced in the solutions seem unique to Eclipse - specifically there seems to be no file called "debug.keystore" anywhere on my development PC.

How do I do a debug 'app' onto a device containing code from another Android Studio without having to erase the previous installations storage?

like image 370
user316117 Avatar asked Dec 04 '17 15:12

user316117


People also ask

Can an app read data from another app?

There are three ways your app can receive data sent by another app: An Activity with a matching intent-filter tag in the manifest. One or more ChooserTarget objects returned by your ChooserTargetService.


1 Answers

To avoid the uninstall-install cycles, share the same debug.keystore across the devices.

The location of debug.keystore depends on the value of environment variable $ANDROID_SDK_HOME. debug.keystore can be found in the subfolder .android at the location specified by the environment variable.

However, in case of variable not being defined :

By default, it is stored in the same directory as your Android Virtual Device (AVD) files:

macOS and Linux : ~/.android/
Windows Vista and Windows 7 : C:\Users\your_user_name\.android\

as stated here .

like image 171
Amit Singh Avatar answered Oct 17 '22 13:10

Amit Singh