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

pine64-pinephone: Fixes for gadget mode #340



Copy link

@samueldr samueldr commented Mar 22, 2021

I now have a Pinephone with working USB! I was able to take a look at whether gadget mode was working.

These are the fixes needed for gadget mode to work nicely.

The vendor/product identifier pair isn't a required change, but makes it work more conveniently for adb use.

With these changes, I have verified that the target-disk-mode image works.

 $ nix-build --argstr device pine64-pinephone ./examples/target-disk-mode/ -A build.default

Additionally, outside of the target-disk-mode configuration, adb was verified as working.

And, finally, this does not break compatibility with eDP out and using USB as a host. I verified only with the Nexdock laptop-type thing, but I cannot believe the official dock would work differently.

Otherwise `adb shell` will not work as expected.

Many phones end up using these identifiers in recoveries (non-official
recoveries mainly) because they are likely to work with ADB, even older
ADB releases.

This sucks, it would be better to have a *proper* USB identifier pair,
but since there is none, let's use one that is known to make the
end-user's life easier.

It's not like the previous identifiers were objectively better.
Copy link

@lheckemann lheckemann left a comment

Choose a reason for hiding this comment

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

The changes look sensible and target disk mode works with this 👍

EDIT: celebrated too soon, it's not appearing as mass storage, only as an RNDIS device.
EDIT: no it isn't, I was confused by a different USB-ethernet interface that I coincidentally connected at the same time

Copy link
Member Author

I'm disregarding @lheckemann's issues, as it wasn't clear when discussing on IRC whether there could be other issues from few USB issues earlier Pinephone units had.

I know from my testing, with a Pinephone, and other non-Pine hardware that this is the right option to change.

@samueldr samueldr merged commit fc3a048 into NixOS:master Apr 29, 2021
@samueldr samueldr deleted the device/pine64/pinephone-gadget-mode branch April 29, 2021 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants