Unable to access apktool.jar (Instrumentation Wizard)

Mobile Testing, Android App Testing.
Mario
Posts: 1
Joined: Thu Oct 12, 2017 11:46 am

Unable to access apktool.jar (Instrumentation Wizard)

Post by Mario » Tue Nov 07, 2017 11:11 am

Hi everyone,
since an automatic update of our Windows 10 machine, where Ranorex is running, I experienced some problems with Ranorex.
First the endpoints weren´t available anymore which could be fixed easily by adding them new and adapting the running script.

Then, after 2 runs, where the script stopped in the middle of nowhere, the instrumented app disappeared from the android device. :shock:
So I tried to instrument it again but ran into the mentioned Error stated in the subject of this post.

Here ist the full error message from the detail window:
System.Exception: Failed to decompile the APK file. See details for more information: Error: Unable to access jarfile C:\WINDOWS\assembly\GAC_MSIL\Ranorex.Core.Injection\7.2.0.0__b798506b574ebc9a\RxEnv\Android\tools\apkTool\apktool.jar

at Ranorex.Plugin.Mobile.Tools.Android.Instrumentation.ApkFileInstrumenter.DecompileApkFile(String apkFilePath, Boolean showProcessWindows, IPathService pathService, InstrumentApkOptions deployOptions)
at Ranorex.Plugin.Mobile.Tools.Android.Instrumentation.ApkFileInstrumenter.Instrument(String apkFilePath, Int32 port, InstrumentApkOptions deployOptions, BackgroundWorker bgw)
at Ranorex.Controls.Instrumentation.Workers.AndroidWorker.Run()
at Ranorex.Controls.AndroidInstrumentProgressPage.bgw_DoWork(Object sender, DoWorkEventArgs e)
So I looked up the path and couldn´t find it. I went back the path till
C:\WINDOWS\assembly\GAC_MSIL\Ranorex.Core.Injection\7.2.0.0__b798506b574ebc9a
where I found only one dll (Ranorex.Core.Injection.dll)

Has anyone else experienced this problem ?

I have searched Windwos for "apktool.jar" and found it in several other places:
* C:\Program Files (x86)\Ranorex 7.2\Bin\RxEnv\Android\tools\apkTool
* C:\Program Files (x86)\Ranorex 7.2\Bin\RxEnv\AndroidBckp\tools\apkTool
* C:\Program Files (x86)\Ranorex 6.2\RanorexStudio\bin\RxEnv\Android\tools\apkTool

Any ideas ? Is there a way to change the search path to the .jar ?
I´m using:
Ranorex version: 7.2.0+git.ffdcf8e6
.NET Runtime Version: 4.0.30319.42000

Thanks for your help :)

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unable to access apktool.jar (Instrumentation Wizard)

Post by Support Team » Fri Nov 10, 2017 2:37 am

Hi Mario.

Unfortunately I've never seen this issue before, but it seems that the Windows Update somehow broke the Ranorex Installation.
May I ask you if you could perform a clean re-installation of the latest Ranorex Version (7.2.1).
  • To do so, please uninstall the current version
    Reboot your machine
    and install Ranorex 7.2.1 (You can find the download link in the Ranorex Start page)
Please let me know if the problem exists after those steps.

Best regards,
Markus (S)
.
Image