Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: SDCB-12186 Fixes wdarun support on random iOS 13 device submodels #3

Closed

Conversation

michal-przytarski
Copy link

No description provided.

@michal-przytarski michal-przytarski requested a review from a team March 22, 2024 12:55
mykola-mokhnach and others added 13 commits April 15, 2024 11:17
* feat: Polish and fix the NPM package

* fix root path

* missing await
…code (danielpaulus#397)

The test-to-skip argument was not working, while test-to-run was just fine (they are both using XCTTestIdentifier internally).
One issue was that Xcode sets to options field to 2 and not 6 when both a class-name and a method-name are specified. Also, Xcode doesn't use the module parameter anymore.
Starting with iOS 17 XCUITest logs are sent over two channels. There are debug logs that come over the DTX connection (like they did in the past), but the non-debug messages are sent over a different connection to the com.apple.coredevice.openstdiosocket service.

We now open a connection to the openstdiosocket-service before we launch the test runner, and we tell the appservice to which socket it should connect stdio. And after that we pipe the data we get from the stdio-socket to the logoutput.
this was somehow lost in refactoring
The current setlocation only works for iOS below 17, the iOS 17 introduces a new instrumentation service com.apple.instruments.dtservicehub with the channel id com.apple.instruments.server.services.LocationSimulation for the simulated location.

Co-authored-by: fish-sauce <[email protected]>
With this changes ios runwda will exit with error when WDA app dies (e.g. killed with ios kill, killed manually with AppSwitcher, or when iPhone is turned off).
dtxConnection's BreakdownCallback is implemented with Functionals Options Pattern, so it's fully optional and shouldn't affect any other dtxConnection usages.
* feat: add rsd instrumentation service support

* docs: describe DeviceEntry.SupportsRsd

* refactor: replace direct checking DeviceEntry.Rsd with helper method
This fixes error:
`Pairing failed: err="pkcs7: cannot decrypt data: only RSA, DES,
DES-EDE3, AES-256-CBC and AES-128-GCM supported"`

While using an elliptic curve certificate for pairing.

The old (2019) fullsailer/pkcs7 seems abandoned, mozilla forked it.
This version also has support for elliptic curves:

OIDEncryptionAlgorithmECDSAP256
OIDEncryptionAlgorithmECDSAP384
OIDEncryptionAlgorithmECDSAP521

Besides RSA and DES.

Co-authored-by: renini <renini@local>
Co-authored-by: danielpaulus <[email protected]>
* Refactor IO operations in Go code

* compiler error fix. Should remove later
This fixes error:
	`pkcs12: unknown digest algorithm: 2.16.840.1.101.3.4.2.1`

while using an p12 cert for pairing which is hashed with the sha256
algorithm.

This package is forked from golang.org/x/crypto/pkcs12, which is
frozen.

Co-authored-by: renini <renini@local>
Co-authored-by: danielpaulus <[email protected]>
* Add tunnel API delete.

Co-authored-by: danielpaulus <[email protected]>
@michal-przytarski michal-przytarski changed the title Fixes wdarun support on random iOS 13 device submodels fix: SDCB-12186 Fixes wdarun support on random iOS 13 device submodels Jun 17, 2024
danielpaulus and others added 10 commits June 24, 2024 21:47
Use lockdown tunnel proxy by default for devices >17.4 
Add support for Windows
---------

Co-authored-by: [email protected] <[email protected]>
the TUN interface often returned an error when an incomplete IPv6 packet was sent (one IPv6 packet + parts of the next one)
sending one packet at a time resolved this issue
* add fat ios binary for mac m1 and amd64 for now
the close call happens in multiple places and we can not be sure that only
one of those methods is getting called during an execution
* the defragmenter was not cleaned up completely after the last fragment

* clone strings from the XCTAttachments object

without cloning them the whole XCTAttachment and XCActivityRecord struct is being kept in memory
…anielpaulus#417)

This PR removes the need for starting a tunnel with sudo using gVisor's user space networking stack. 
`ios tunnel start --userspace` will start a userspace only networking stack that will work without sudo and you can use devices. Pairing does not yet work here, will look into it next. 
`sudo ios tunnel start`  will use normal OS TUN devices for this as before.

There is now an experimental mode to automatically start go-ios tunnel management. If you set the `ENABLE_GO_IOS_AGENT` env var to `yes` it will automatically start the tunnel manager agent and you can run commands without any prep.
Rename --enabletun to --userspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.