How do you use the ApkTool.jar?

Ask general questions here.
tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

How do you use the ApkTool.jar?

Post by tvu » Thu Jul 02, 2015 7:18 pm

I use the Deploy Android App / Deploy iOS App action in my test suite. I run this test suite on multiple devices and it takes a couple of minutes to instrument the app each time. Is there an action where I can instrument the app and save the file to a specific location? That way I can set the Instrument option to False in the Deploy App action. I just have to instrument the app once and then have the rest of the test refer to the instrumented app.

If there is no such action then can I get some info on how to use the ApkTool.jar file? What are the parameters we need to pass in when calling it?

Thanks for the help,
Tung

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

Re: How do you use the ApkTool.jar?

Post by Support Team » Fri Jul 03, 2015 1:49 pm

Hi Tung,

When using the Ranorex Instrumentation Wizard, you can select 'Instrument the App under test' without deploying the app. The default location for instrumented applications is C:\Users\USERNAME\Documents\Ranorex\InstrumentedApk
InstrumentationWizard_Instrument.png
InstrumentationWizard_Instrument.png (34.59 KiB) Viewed 1042 times
Then you can choose this file in the DeployApplication action and set the 'Instrument APK' setting to false.
This setting can be found in the properties tab of the Deploy action
Properties_DeployApp.png
Properties_DeployApp.png (10.04 KiB) Viewed 1042 times
Regards,

Markus (S)
.
Image

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: How do you use the ApkTool.jar?

Post by tvu » Mon Jul 06, 2015 4:55 pm

Hi Markus,

Thanks for the advice, but I would like to automate this process and include it in our CI process. Using the Ranorex Instrumentation Wizard requires me to manually instrument the APK file. I've notice that the Instrumentation Wizard calls the ApkTool.jar file, but all the parameters can't be seen in the display.

Can you provide some info on how Ranorex directly call the ApkTool? Basically, I would like to instrument the app via command line.

Thanks,
Tung

tvu
Posts: 195
Joined: Tue Apr 07, 2015 10:47 pm

Re: How do you use the ApkTool.jar?

Post by tvu » Mon Jul 06, 2015 5:50 pm

I found what I was looking for here:
http://www.ranorex.com/support/user-gui ... izard.html

Thanks for the help Markus!