ExecuteFile("gp2xmenu",0,0) (as per above) kills USB, and the only chance to connect it again is to restart the gp2x (or maybe remove/insert the cable). dzz said he'd fixed that in version 6 (demo6b.zip).

I read up on execve() and the second parameter must be an array of strings containing environment variables (for USB to work), but I have no idea what strings to give it.

Any ideas? This is getting annoying. Argh!