-
Notifications
You must be signed in to change notification settings - Fork 438
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
Add Motorola G3, edit some other Motorola values #277
Conversation
# Moto Z3 Play, beckham, XT1929 | ||
# For details see: <https://github.com/M0Rf30/android-udev-rules/issues/264> | ||
# 18d1:4ee8=midi; 18d1:4ee9=midi+adb | ||
# BP TOOLS: 2ee5=charging, mtp, ptp; 2ee6=charging+adb, mtp+adb, ptp+adb; 2ee7=rndis; 2ee8=rndis+adb; 18d1:4ee8=midi; 18d1:4ee9=midi+adb | ||
# QCOM: 05c6:9091=charing+adb, mtp+adb, ptp+adb; 05c6:9092=charging, mtp, ptp; 18d1:4ee8=midi; 18d1:4ee9=midi+adb; 22b8:2e24=rndis; 22b8:2e25=rndis+adb | ||
ATTR{idProduct}=="2e24", GOTO="rndis" | ||
ATTR{idProduct}=="2e25", GOTO="adbrndis" | ||
ATTR{idProduct}=="2e33", GOTO="adbmtp" | ||
ATTR{idProduct}=="2e51", GOTO="adbmtp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that's feasible but could we try to keep individual devices separated? Ideally each device would be in its own section that fully describes what usb ids (and in which modes) it can show up as.
Of course since manufacturers do use the same IDs for different devices, we will have to somehow accommodate that, so here's an idea:
For Moto Z3 Play and Galaxy A4 (2016) tried keeping the following format:
# <device name>, <codename>, <model #>
# <any additional information, like links to a full investigation>
# <ids that already appear elsewhere or that we can't yet reasonably use in code>
# <weird case>: <ids that appear there>
<rule0>
<rule1> # also <another mode that features the same id, but we don't have a way to express in code or distinguish it>
<rule2> # <explanation if the rule doesn't exactly match the mode the device is in>
The first two lines are pretty self-explanatory.
The next two lines are in this format:
<pid0>=<mode1>+<mode2>, <mode3>; <vid>:<pid1>=<mode4>
where pluses mean multiple modes apply at the same time, commas mean several different modes (or mode combinations) give the same vid:pid pair and semicolons separate unrelated cases (where vid:pid was different).
Finally there are the actual rules.
- If there's exactly one mode combination that yields this id, there's no need for further comments.
- If there are several cases that yield this id, the rule should specify the most general one and all the others should be listed in the comment that follows. (like for
22b8:2e8{1,2}
) - If there are several cases that yield this id, but nothing really fits we should do something reasonable and explain what it really means in the comment. (like
22b8:2eb7
or04e8:6860
)
So, what to do when there's already a rule for a given id but as part of a different device? I think we should just leave it there and specify this case in the comment. I tried to do that for the modes that use ids from Google: 18d1:2d0{2,3}
and 18d1:4ee{8,9}
. If it becomes clear that an ID is consistent across many devices, we can move it out of the first one into some vendor-wide section (and in return put a comment in the device-specific section).
Also, could we slow down a bit and keep all these related commits in one PR instead of dozens? I think @M0Rf30 is getting a bit overwhelmed by the volume of changes. Actually, would it be possible to move main at least 5 commits back and instead keep these recent patches in a feature branch for a while? If we could work on them a little bit more, maybe we will be able to find a good strategy for managing where the data comes from and how uncertain it is. |
No issues from my side. we will consolidate after. I will wait a little bit of time before tag. For now I only ask (especially to @JoesCat ) to use conventional commit messages (it's the third time that I gently ask for this and I'm ignored). |
Hmm, then will you accept PRs that are rewriting history? |
Added values according to Motorola G3. Fetched some related idProducts from libmtp.
Ouch - seems I did a force push while you were editing this..... I'll go push some other code.... sorry about that. bad timing by chance :-/ |
@mskiptr - I noticed earlier you are creating patches on your "main" branch. It is probably a good time to learn about how to create git "branches". |
Hi @M0Rf30 - I think I've flogged all the code I could with the last patch being "misc". There were a few vendors that I had to leave-alone for now since they contain a lot of question marks (example sonyericsson and a couple others). Maybe best to see reaction to this breakage, and leave the sonyericsson and other fixes for later. Hi @mskiptr - sorry about the rapid large number of patches sent. I thought it best to get as much of it done at once before the next TAG point. Hopefully you can recover from this point without too much trouble. |
Add documentation to help, otherwise, many IDs already listed. M0Rf30/android-udev-rules#264 M0Rf30/android-udev-rules#277
Added values according to Motorola G3.
Fetched some related idProducts from libmtp.