Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Improvement AndRoid

Instrumentation Tool

(version 1.0)
Table of Contents

1. Re-sign APK with User Signature to Android Agent and AUT..................................................................................1


1.1 Configure User Signature.................................................................................................................................1
1.2 Improvement dialog “Android – Instrumentation Applications”.....................................................................3
1.3 Improvement dialog “Manage Applications Under Test”................................................................................4
Revision History
Name Date Reason For Changes Version

Nghi Bui 27-Nov-2013 - Add function to allow user re-sign their 1.0
signature to Android Agent and AUT
1. Re-sign APK with User Signature to Android Agent and AUT

The function helps users can use their signature to re-sign Android Agent and AUT.

1.1 Configure User Signature

Users can configure their signature by click on “Android – Instrumentation Applications” toolbar

The dialog will be shown as below

GUI Description:

- Title: Settings
- Radio button “Use LogiGear signature”:
o Default option.
o If this radio button is checked:
 All controls in “Use custom signature” panel will be disabled
 When users install or re-sign an APK file, TA will automatically sign the APK file with LogiGear
signature.
- Radio button “Use custom signature”:
o If this radio button is checked:
 All controls in “Use custom signature” panel will be enabled
 When users install or re-sign an APK file, TA will automatically sign the APK file with user’s
signature.

Android Automation Support | Re-sign APK with User Signature to Android Agent and AUT 1
- Text box “Select a keystore file location”:
o Require field
o Read only text box.
o Display full path and file name of keystore file.
- Button “…”: Open the dialog “Open” to help users select a keystore file and display full path and file name of
keystore file on text box “Select a keystore file location”
- Text box “Keystore alias name”:
o Help users to specify an alias name of keystore
o Require field
o Type: text box
o Only letters, numbers, underscore, and hyphen characters are allowed
o Must be at least 8 characters and fewer than 255 characters.
- Text box “Keystore password”
o Help users to specify the password which is required to access the keystore
o Require field
o Type: password
o Password char: *
o Must be at least 6 characters and fewer than 255 characters.
- Text box “Private key password”
o Help users to specify the password which is required to access the keystore
o Require field
o Type: password
o Password char: *
o Must be at least 6 characters and fewer than 255 characters.
o Must be the same value with “Keystore password” field
- Combo box “Name of digest algorithm”:
o Help users to specify the name of the message digest algorithm to use when digesting the entries of
a jar file
o Require field
o Support users select one of the algorithms as below:
 SHA-1 (default value)
 SHA-256
 SHA-384
 SHA-512
 MD2
 MD5
- Combo box “Name of signature algorithm”:
o Help users to specify the name of the signature algorithm to use to sign the JAR file.
o Require field
o Support users select one of the algorithms as below:
 MD5withRSA (default value)
 MD2withRSA
 SHA1withRSA
 SHA256withRSA
 SHA384withRSA
 SHA512withRSA

Android Automation Support | Re-sign APK with User Signature to Android Agent and AUT 2
 NONEwithRSA
 NONEwithDSA
 SHA1withDSA
 NONEwithECDSA
 SHA1withECDSA
 SHA256withECDSA
 SHA384withECDSA
 SHA512withECDSA
- Text box “Extended options”:
o Help users input more jarsigner options. It will be combined with require option when users re-sign
or install APK file.
o Optional field
o Type: text box single line.
- Checkbox “Do not show conflicting signature warning”:
o Un-checked is default value.
o If checkbox is un-checked, TA has will show a warning box when has the conflict between TA agent
signature and setting signature. Otherwise, TA won’t show a warning box.
- Button “OK”:
o Help users save all their configurations into their local machine
o When users click button “OK”:
 TA will automatically validate all field values. If one or more field values is invalid rules, TA
will show a warning box “Please fill out all required fields.”
 Otherwise, TA will automatically save all users’ configurations to their local machine. These
values will be used when users re-sign or install an APK file.
- Button “Cancel”:
o Help users close this dialog box and don’t save any value of this dialog to their local machine

Notes:

- All configuration values will be only stored at users’ local machine. When users go to another machine, all
their configurations won’t be moved to new machine.
- When users open dialog “Settings”, TA will automatically fill in all values that are stored on their local
machine to all fields.

1.2 Improvement dialog “Android – Instrumentation Applications”

- Toolbar: add a button to help users open the dialog “Settings”


- Button “Install TestArchitect Automation Agent on selected device”:
o When users click button “Install TestArchitect Automation Agent on selected device” on toolbar:
 If the radio button “Use LogiGear Signature” on dialog “Settings” is checked, TA will
automatically install TA agent with default signature (LogiGear Signature) into selected
device.
 Otherwise, TA will install TA agent with user signature into selected device.
o When users are installing TA agent, if users meet any errors, TA will show a warning box as below

Priority Error Warning Box Content


1 Cannot find keystore file location on dialog The keystore file is not found. Please, re-specify
“Settings” the keystore file via the “Select a keystore file

Android Automation Support | Re-sign APK with User Signature to Android Agent and AUT 3
location” text box on the “Settings” dialog box.
2 Unknown Error Unexpected error has occurred.
Error Detail: get returned exception from
jarsigner.exe

- When users select a device or refresh device list, but the TA agent installed in the selected device that has a
conflict between its signature and configured signature on dialog “Settings”. TA will show a warning box as
below

o Button “Yes”:
 Install overwrite TA agent on selected device with setting signature.
o Button “No”: close this warning box
o Check box “Do not display this dialog again”:
 Checked: don’t show this dialog on the next time and update status of check box “Do not
show conflicting signature warning” on dialog “Settings”
 Un-checked: show this dialog on the next time and update status of check box “Do not show
conflicting signature warning” on dialog “Settings”

1.3 Improvement dialog “Manage Applications Under Test”


- The list “Application”:
o Keep all current behavior and effect
o Only show a list of all android applications that have the same signature with current TestArchitect
Automation Agent that is already installed into selected device.
- Button “Re-sign more…”
o Keep all current behavior and effect
o If the radio button “Use LogiGear Signature” on dialog “Settings” is checked, TA will automatically re-
sign the selected APK file with default signature (LogiGear Signature).
o Otherwise, TA will automatically re-sign the selected APK file with user signature.
o When users are re-signing APK file, if users meet any errors, TA will show a warning box as below

Priority Error Warning Box Content


1 Cannot find keystore file location on dialog The keystore file is not found. Please, re-specify
“Settings” the keystore file via the “Select a keystore file
location” text box on the “Settings” dialog box.
2 Unknown Error Unexpected error has occurred.
Error Detail: get returned exception from
jarsigner.exe

Android Automation Support | Re-sign APK with User Signature to Android Agent and AUT 4
Android Automation Support | Re-sign APK with User Signature to Android Agent and AUT 5

You might also like