FS#9485 - rbutil- reworked autodetection, now presents a list of detected devices

Attached to Project: Rockbox
Opened by Dominik Wenger (Domonoky) - Sunday, 12 October 2008, 15:45 GMT
Last edited by Dominik Riebeling (bluebrother) - Saturday, 29 April 2017, 14:13 GMT
Task Type Patches
Category Rbutil
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


This patch lets rbutil search for all Devices when autodetecting, and presents a list with the found devices to the user for selection.

The patch is not completely ready, it needs a bit more polishing.

This task depends upon

Closed by  Dominik Riebeling (bluebrother)
Saturday, 29 April 2017, 14:13 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Detection has been reworked with b943c59f3575ee357b66cc316baec95ffcfd5f10
Comment by Dominik Wenger (Domonoky) - Saturday, 04 April 2009, 20:24 GMT
New attempt.

The code is still very early, has bugs and needs improvements.
Comment by Dominik Wenger (Domonoky) - Wednesday, 08 July 2009, 22:31 GMT
New Ideas for autodetection, written down here for later use.

All Devices have USB-IDs, even if there are dublicates.
So we can start with the list of connected usb-ids and try to map Modelnames and mountpoints to them.

We use our list of Targets with their USB-IDs to match them. Because of the dublicate usb ids, we can get more then one modelname per USB-ID.
We then try to query the mountpoints for all usb-ids, where we have at least one modelname. This results in a mountpoint per USB-ID when its successfull.
We can then check the list and if we have only complete Targets in the list, ie only entrys with one modelname and a mountpoint (and usb-ids without anything) we can stop here.

If we have incomplete entrys we have to use other methods. We can use ipodpatcher, sansapatcher, and checking for specific files/folders at the mountpoint to find out which target exactly this is. We can use the info we already know to choose the best method.
If we miss mountpoints, we could scan different possible mountpoints to find indications that this is the specifc target /group of possible targets. This might introduce multiple mountpoints per entry :-/

If we tried all we can, and we have still targets which miss info, we present them also, but with a warning, a help text and maybe a way to choose manually.

For all Targets we successfully found, we also should scan for rockbox-info.txt and store the installed version etc, so it also can be presented to the user.
I Imagine a "Scanning System" Splash at startup, then a selection/confirmation box to choose the found target(s). Also in the config dialog the target selection will be removed/hidden, and only the scan button visible.

Lets hope i (or someone else) finds time to implement it.

Comment by Dominik Wenger (Domonoky) - Sunday, 30 August 2009, 20:39 GMT

New attempt:
This code is still unfinished, and the GUI is very ugly. Detection seems to work already pretty good.

There is also a way to test the Detection easily on many different targets:
- place a "usb-ids.txt" file the usb-ids of the tragets to simulate in the directory where rbutil.exe is.
- place a "mountpoints.txt" file with the paths to the simulated mountpoints in the directory where rbutil.exe is.

You can find a zip with many prepared fake mountpoints here:
Corresponding usb-id lists and mountpoint lists are attached.

If someone is brave enough to create more test dirs/ images, please share.
Comment by Dominik Wenger (Domonoky) - Sunday, 06 September 2009, 15:51 GMT
new patch, small improvements. Still not ready, and GUI is still very ugly.