2

Usecase

I normally always use the debug versions of my own apps on my own phone while developing them. Before releasing a new version, I want to test the release on my own phone. That's not very convenient, I currently have to do many steps:

  • backup the debug version of my app
  • deinstall the debug version
  • install the release version
  • restore the data of the debug version

Current solution

I do the above steps manually with the help of Titanium Backup on my phone...

What I want

Important: I want to use the data from my debug app in the release app, so that I can test the release build with all the data from my debug app

I want to automate that process. The best would be a batch file, I can use on my laptop while the phone is connected via usb. Currently all I found is following:

%adb% install -r app-release.apk

But of course this fails because of wrong signatures. So actually need to delete the apk from the phone without deleting the data and copying the new apk to the phone. Is that somehow possible?

Possible solutions

  1. Replace the apk on my phone without installing the app
  2. Copy all app data to the laptop, uninstall the debug version, install the release version and copy back the app data to the phone
  3. ???
prom85
  • 16,896
  • 17
  • 122
  • 242
  • I guess this [question](http://stackoverflow.com/questions/7335127/how-to-have-both-debug-and-release-apk-on-same-device) is relevant to what you are trying to accomplish. – Minato Sep 18 '15 at 09:17

1 Answers1

0

You wil always have the signature issue. But if you deploy your application with android studio (or eclipse) it will be faster : use debug or release to build your application and deploy it to your phone (local data will be lost).

You may want to try this method from another stack user Android – multiple custom versions of the same app. TL;DR: if you use your application as a library you can deploy a debug and a release version at the same time on your phone.

Community
  • 1
  • 1
Mualig
  • 1,444
  • 1
  • 19
  • 42
  • Actually, my intention is to use the data from debug version as well. It's much easier for testing... I would like to directly replace the apk... but I could not find a way to do that... Or to copy all data to the laptop, uninstall the app, install the new version and copy back the data... That's the idea behind it... – prom85 Sep 18 '15 at 10:02