Deploying apk failed on Android Device

Ask general questions here.
rastek
Posts: 157
Joined: Wed Aug 06, 2014 12:00 pm

Deploying apk failed on Android Device

Post by rastek » Fri Oct 28, 2016 8:03 pm

When I try to instrument my apk, it failed in deploying step, I unstalled application from mobile and tried again but get same error. Do I need some special (debug mode) apk ?

System.Exception: Failed to deploy the application via USB. pkg: /data/local/tmp/myapp-1.0.0.106-instrumented.apk

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]


5524 KB/s (49869591 bytes in 8.815s)

at Ranorex.Plugin.Mobile.Tools.Android.AndroidUsbDeploymentService.CheckForErrorsThatDoNotResultInErrorCode(ProcessRunner runner)
at Ranorex.Controls.Instrumentation.Workers.AndroidWorker.Deploy(String packageName, String toDeploy)
at Ranorex.Controls.Instrumentation.Workers.AndroidWorker.Run()
at Ranorex.Controls.AndroidInstrumentProgressPage.bgw_DoWork(Object sender, DoWorkEventArgs e)

OS -> Windows 8.1
Ranorex -> 5.3
Android Device -> 5.2
Last edited by rastek on Sat Oct 29, 2016 4:03 pm, edited 1 time in total.

rastek
Posts: 157
Joined: Wed Aug 06, 2014 12:00 pm

Re: Deploying apk failed on Android Device

Post by rastek » Fri Oct 28, 2016 9:41 pm

I manually removed application application from phone and restart, it worked.

Than I added a Deploy step into my recording and get this error after few minutes

Should I only use deploy step for already instrumented apks ? Then how ? Please help me.

Another question, do I need to uninstall the application everytime I deploy?

Instrumentation failed. Error:
Process did not finish within the specified timeout of '00:02:00'.

Info: Exec: C:\Program Files\Java\jre1.8.0_73\bin\java.exe -jar "C:\Program Files (x86)\Ranorex 5.3\Bin\RxEnv\Android\tools\apkTool\apktool.jar" d "D:\Users\ravci\AppData\Local\RanorexStudio5\RxEnv\Android\temp\smartoffice-1.0.0.106.apk" -f -o "D:\Users\ravci\AppData\Local\RanorexStudio5\RxEnv\Android\temp\decomp"
Info: Decompiling APK File.
Info: Processing file 'CrashReportDialog.smali' (Pass2).
Info: Processing file 'AppPreferencesActivity.smali' (Pass2).
Info: Processing file 'ClickActivity.smali' (Pass2).
Info: Processing file 'MainActivity.smali' (Pass2).
Info: Recompiling APK File.

Ranorex.Instrumentation.exe /help -- Display general help.
Ranorex.Instrumentation.exe /pagename:n /help -- display specific help.

d, device The name of the device to that the APK file shall be
deployed. This parameter is not required if deploymode is set
to 'NoDeploy'.

a, apkfile Required. The path where the APK file resides.

s, skip Default is False. Set this switch to skip APK file
instrumentation prior to deploying.

dm, deploymode Possible Values: WiFi, Usb, NoDeploy, Auto. Default is Auto.
Specifies how the apk file shall be deployed. Set to nodeploy
if the file shall not be deployed to the device. Auto means
the connection mechanism used to configure the device will be
used.

o, outfile Sets a custom output location for the instrumented file. This
can be a directory or a file path. Read/Write permission is
required for this path. If a directory was specified, (to
specify a directory add a trailing '\') the process will
place the APK file in it with the -instrumented suffix added
to the source file name. If the file already exists it will
be overwritten. This option only has a effect if an APK is
instrumented (no skip).

p, pagename Default is UserSelect. Set this option to directly navigate
to a specific page. Is also required for automated command
line based instrumentation. Pages are: android, chrome,
firefox, flex, ios, java, safari. Note: The default 'Select'
is not supported in the command line.

?, help Default is False. Displays command line arguments help.
Last edited by rastek on Tue Nov 01, 2016 10:24 am, edited 1 time in total.

rastek
Posts: 157
Joined: Wed Aug 06, 2014 12:00 pm

Re: Deploying apk failed on Android Device

Post by rastek » Tue Nov 01, 2016 8:59 am

I see that uninstall and reboot is not enough, I start to see instrument & deploy problem again.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Deploying apk failed on Android Device

Post by asdf » Tue Nov 08, 2016 4:20 pm

Hi Rastek,

Unfortunately, I'm not exactly sure if your error still persists.
Therefore, may I ask you to let me know your current situation?

Sincerely,
asdf