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

ADB.pidof(deviceId, bundleId) does not work consistently across Android versions #831

Closed
noomorph opened this issue Jul 16, 2018 · 0 comments
Assignees

Comments

@noomorph
Copy link
Collaborator

Description

The older API versions (e.g. Lollipop) are shipped with an older ps utility version, hence the implementation of helper method ADB.pidof() is not complete in Detox and must be extended to support a broader range of Android version.

Steps to Reproduce

Launch multiple versions (Lollipop, Marshmallow, Nougat, Oreo) in the emulator and try out running adb shell ps -AMo NAME,PID). The output is inconsistent between versions. E.g. on API 25, the output fails to be parsed correctly by the helper method ADB.pidof.

As an not totally, but stilll related illustration, see ps --version outputs on different APIs:

V5.0 -Lollipop:
USER PID PPID VSIZE RSS WCHAN PC NAME

V6.0 Marshmallow:
USER PID PPID VSIZE RSS WCHAN PC NAME

V7.0 Nougat:
bad pid '--version'

V7.1.1 Nougat:
bad pid '--version'

V8.0 Oreo:
toybox 0.7.3-05146348f7d3-android

API Level 28 :
toybox 0.7.6-android
@noomorph noomorph self-assigned this Jul 16, 2018
noomorph added a commit that referenced this issue Jul 18, 2018
@rotemmiz rotemmiz changed the title ADB.pidof(deviceId, bundleId) does not work consistently between Android versions ADB.pidof(deviceId, bundleId) does not work consistently across Android versions Jul 19, 2018
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant