Closed Bug 1808621 Opened 1 year ago Closed 1 year ago

mozdevice.adb.ADBDevice does not parse filename correctly on Windows

Categories

(Testing :: Mozbase, defect)

Other Branch
ARM
Windows 10
defect

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: zeid, Assigned: gbrown)

References

Details

Attachments

(1 file)

When a temporary named file is created in ADBDevice.push, the filename is not later accessible by ADBDevice.cp and throws a file not found error. This seems to be due to how forward slashes are escaped when trying to access the file.

self.ls("/data/local/tmp") seems to show double forward slashes. Likely, those are being incorrectly translated/replaced by self.cp (possibly due to posixpath.normpath).

This is using:
Windows 10
Android Debug Bridge version 1.0.41
Version 33.0.3-8952118
Google Pixel 3a
mozregression via ./mach/mozregression which uses the current/latest version of mozdevice.

Note: the version of mozdevice on PyPI does not match that in tree.

Edit: to reproduce this, one can run:

./mach mozregression --debug --app=gve
See Also: → 1794416

Thanks for the report.

mozdevice was developed in a Linux environment, with the intent of supporting android automation from Linux and osx hosts. There have been Windows-oriented improvements, but I don't think anyone has made a comprehensive effort to support Windows in mozdevice. mozdevice operations that normally just work have a tendency to break on Windows. Personally, I'd run Android-targetting mozregression from Linux.

Assignee: nobody → gbrown

:zeid - I don't have a convenient Windows test environment. Do you have a way of testing this change against Windows mozregression?

(I will be away on pto next week and won't try to land this before then, but I should be able to land and release to pypi the week of Jan 16 - hope that's okay.)

Flags: needinfo?(zeid)

:gbrown -- I just tested this on Windows/Android with your patch and it is working! Thanks for the quick fix. Look forward to when it is landed/released.

Flags: needinfo?(zeid)
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/158580426824
[mozdevice] Allow for non-posix host file names r=jmaher
See Also: → 1810601
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: