Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Several minor issues in corellium scope #1900

Merged
merged 2 commits into from
May 8, 2021
Merged

Conversation

jan-goral
Copy link
Contributor

@jan-goral jan-goral commented May 7, 2021

Related to #1802

This is a bunch of several minor changes cherry-picked from #1897 for splitting code review into smaller parts.

  • Normalize output lines from Corellium console + unit test
  • Convert API interfaces to functional
    • Update adapters implementation to use SAM conversion
  • Rename API scope TestApk to Apk and expand the interface to meet domain requirements
  • Fix log parser issues
  • Add doc for sharding structures
  • Add am instrument status codes constants

Merging this one will make the #1897 thinner.

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@jan-goral jan-goral force-pushed the corellium-api-fixes branch 2 times, most recently from fac1adc to 2dca194 Compare May 7, 2021 10:28
@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2021

Timestamp: 2021-05-07 15:40:33
Buildscan url for ubuntu-workflow run 820778012
https://gradle.com/s/ywikka64dg5cu

@jan-goral jan-goral force-pushed the corellium-api-fixes branch 2 times, most recently from 8cbdf5b to 94abd5a Compare May 7, 2021 11:02
* Normalize output lines from corellium console
* Convert API interfaces to functional
* Update adapters implementation to use SAM conversion
* Rename api scope TestApk to Apk and expand interface to meet domain requirements
* Fix log parser issues
* Add doc for sharding structures
* Add am instrument status codes constants
Copy link
Contributor

@Sloox Sloox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments :)


println("* Invoking devices")
val ids = api.invokeAndroidDevices(AndroidInstance.Config(2)).toMutableList()
val ids = api.invokeAndroidDevices(AndroidInstance.Config(2)).toList().toMutableList()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.toList().toMutableList()
Is there a reason for this?
If this is already a collection its not needed.

Copy link
Contributor Author

@jan-goral jan-goral May 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, it's not a Collection but a Flow, so this is blocking operation Flow.toList. I have decided to make and API functions not suspendable to take benefits from functional interfaces, so I was also forced to change some result types, and IMO Flow<String> fits much better than Deferred<List<String>>.

clear()
}
}
Chunk(code.prefix!!, code.text.toInt(), map)
Chunk(
type = code.prefix!!,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double bang usually is a bad thing :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@mergify mergify bot merged commit 9a78fcd into master May 8, 2021
@mergify mergify bot deleted the corellium-api-fixes branch May 8, 2021 12:45
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants