History log of /system/iot/attestation/at-factory-tool/atftman_unittest.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cbfd415593d4fb9161dd1b932dbf912064c482a5 13-Dec-2017 Yu Shan <shanyu@google.com> [AT-Factory-Tool] Fix USB Location bug.

Fix the bug that USB location would show None on Windows. This is
because the serial number we get from device manager is in capital
letter while the real serial number might not. Now we get the
location from the serial map case insensitive.

Bug: b/70531170
Test: Manual test and unit tests.
Change-Id: I7a41d11c2d2c9b9ea8980261874fafe7d2822c9d
/system/iot/attestation/at-factory-tool/atftman_unittest.py
54bbf240d08c4dcf22a5dd02d56095645f519fa5 06-Dec-2017 Yu Shan <shanyu@google.com> [AT-Factory-Tool] Support compatible vboot-state.

Now more compaitable format for the result of at-vboot-state is
supported.

Bug: b/70243138
Test: Unit tests and manual tests.
Change-Id: Iaa99743acc2290f5309baf646e27b923cfa594de
/system/iot/attestation/at-factory-tool/atftman_unittest.py
e4bf80b0227e0cd7f0047ecbeb4cdb9ea1237e7f 23-Nov-2017 Yu Shan <shanyu@google.com> [AT-Factory-Tool] Support configuration file.

The tool now read configurations from a configuration file. The
configuration change would also be saved to the file so that it
would not be lost if you close the tool. For example, if you
change low key alert threshold, the tool would remember it in the
configuration file.
The configuration includes:
ATFA_REBOOT_TIMEOUT: The reboot timeout for an ATFA device. User should
not change.
ATFT_VERSION: The version for the Android Things Factory Tool. User
should not change.
COMPATIBLE_ATFA_VERSION: The compatible ATFA version for this tool.
User should not change.
DEFAULT_KEY_THRESHOLD: The default low key alert threshold. If the
remaining key is lower than this value, an alert would be given. This
setting would be overwritten by the in-tool settings.
LANGUAGE: The language for the tool. Possible values are 'cn' (Chinese)
and 'eng' (English).
LOG_DIR: The log directory.
LOG_FILE_NUMBER: The limitation for log file number.
LOG_SIZE: The limitation for log size.
PRODUCT_ATTRIBUTE_FILE_EXTENSION: The file extension for product
attribute file, user should not change.
REBOOT_TIMEOUT: The reboot timeout for target device. If the target
device takes a long time to reboot into fastboot mode, user should
increase this value.

Test: Manual test and unit tests.
Bug: b/68662667, b/65837743
Change-Id: I09b0160ca777baedd9da3edbf192d51fa5887fc8
/system/iot/attestation/at-factory-tool/atftman_unittest.py
166852ef554d2533608baaf5b87731252e6f27bb 21-Nov-2017 Yu Shan <shanyu@google.com> [AT-Factory-Tool] Support logging and small fixes.

Logs are now output to log files. Logs would be created under LOG_DIR
with the time stamp when the log is created as file name. There would at
most LOG_FILE_NUMBER log files. Each log file size would be less than
log_size/log_file_number. If the total size is larger than LOG_SIZE, the
oldest log file would be deleted.
Log entry format would be as following:
'[<date> <time>] <log_level>/<tag>: <message>'
Valid values for <log_level> are I (INFO), W (WARNING), E (ERROR) and
D (DEBUG).
Valid values for <tag> are
OpStart: Operation start message.
OpSucceed: OPeration succeed message.
OpException: Operation failed message.
Program: Program start/end message.
Autoprov: Auto provision mode start/end message.
For example:
'[2017-11-11 11:11:11] I/Opstart: {TEST_SERIAL at location: 1} Operation
Start'
Also change the reboot logic so that the rebooting device would not
disappear from the device list, instead it would have a status
rebooting.
The product attribute file extension is changed to '*.atpa' to fit the
file extension from development console. After this commit, all old
test product attribute file WOULD NOT BE COMPATIBLE without changing
extension.
Better handle situation when there's no more keys left in the ATFA.

Change-Id: I4dd0d1d03befd9ba1566c87a884bd3a379c3d4ba

Test: Unit tests and manual test.

Bug: b/69630963, b/68662614, b/65997445
/system/iot/attestation/at-factory-tool/atftman_unittest.py
cf15dba13db88ed20bb78e2dae1eafe64ef5646f 10-Oct-2017 Yu Shan <shanyu@google.com> Android Things Factory Tool bug fixes.

Fixes the bug when refresh the device list during the reboot. The device
serial list may change during the reboot process so we need a lock to
synchronize them. We also print the reboot timeout message to log.

Change-Id: I54ab248998f1c5410a5d9fcd04c592c09bc59ce9
/system/iot/attestation/at-factory-tool/atftman_unittest.py
765bee384462e4f64740c5aadfccbf52348b68da 09-Oct-2017 Yu Shan <shanyu@google.com> Add license information for Android Things Factory Tool.

License is Apache 2.0.

Change-Id: I68c70d74c6ca25b3ae042a217f55b5ab0ba7e8af
/system/iot/attestation/at-factory-tool/atftman_unittest.py
2b6004bccb8a19681387f3ac415b481e7fe27acc 23-Aug-2017 Yu Shan <shanyu@google.com> at-factory-tool: support multiple new operations.

Fastboot binaries are from
https://android-build.googleplex.com/builds/submitted/4374538/sdk/latest
android-sdk_4374538_linux-x86.zip and android-sdk_4374538_windows.zip

Support parsing product attribute file.
User is required to select a product attribute file when the program
starts up. The program would show the product name for the selected
product.

Support fusing bootloader vboot key and permanent attributes. User can
manually fuse bootloader vboot key or fuse permanent attributes. These
two steps are also included in the auto provisioning mode.

Support low key alert.
When doing manual/automatic attestation key provisioning, if the keys
left in the ATFA device is lower than the theshold set by the user, an
alert box would appear to warn user about this situation.

Support showing how many keys left in the ATFA device in real time.

Support setting os version variable on ATFA device.

Test: Unit-tests atft.py over 50% code coverage, atftman.py over 90%
code coverage.

Bug: b/65210752, b/65631751, b/66217175

Change-Id: I14c8089998f4e037a6bd3e9dfaa3de779ea6a2b7
/system/iot/attestation/at-factory-tool/atftman_unittest.py
e3823a75b7569794662fe2fbc9e3ca2ac2f60cce 23-Aug-2017 Yu Shan <shanyu@google.com> Support automatic and manual key provisioning.

Bug: b/65115496

Test: Unit tests passed. Manual testing on Linux and Windows machine.
Change-Id: If8471df95825549955ab499246608ae3f36384f0
/system/iot/attestation/at-factory-tool/atftman_unittest.py
8236d428dcf59cca3c2426e8d6d9bf70895f427b 23-Aug-2017 Yu Shan <shanyu@google.com> Support storing key bundle to ATFA device.

Support storing key bundle to ATFA device. Support button to process key bundle
stored in ATFA device. Support checking ATFA device for how many keys left in
the ATFA device.

Test: Unit tests passed. Manual test on Windows and Linux machine.

Bug: b/65115871
Change-Id: I5116d3e6efdfb3ddbfa747a125b33a21f849f0e1
/system/iot/attestation/at-factory-tool/atftman_unittest.py
7ec8f25d62856d44690270f32119b60d8be9fd39 23-Aug-2017 Yu Shan <shanyu@google.com> At-factory-tool support multiple target devices.

Enable user to select multiple target devices. Devices would refresh
automatically. To enable stability, a device would only be listed if it's
seen twice consecutively. Provision status would be checked once new device
is found. Support Async Fastboot Operation. Clarity error message.

Bug: b/64448627

Test: Unit tests pass, manual test on Linux and Windows.
Change-Id: Ibe3f2b72aa990097f149ecc6248539ad8c2aa739
/system/iot/attestation/at-factory-tool/atftman_unittest.py
884aca232aa2066a0348928fedf2b0cc2f2b85bd 14-Aug-2017 Yu Shan <shanyu@google.com> Initial commit for AT-Factory-Tool

Bug: b/64690987

Test: Unit tests pass, manual test on Linux and Windows.

Change-Id: I1aaf924bbc454b062dbaea12f72f5a7ca14abb99
/system/iot/attestation/at-factory-tool/atftman_unittest.py