I posted the below in the other Dex related thread and I thought it might be a good idea to post it here for those that hadn't seen it:
Hi All, I just had a look through the S8 kernel source as I figured that anything in /sys/class would most likely have kernel code to support it, looks like the "Dex check" is as follows:
Which is pretty ****ty IMHO. CONFIG_DISPLAYPORT_ENG is a define that isn't set in the release kernel so, it looks like the only way to do this would be to spoof the vend/prod id's on the displayport adapter. I'm not sure id these ID's are displayport native data or USB ID's that then signal the electrical change of using the alt-mode pairs, though it's stored in the "dispayport" struct.
That is assuming that this check echo's out to /sys/class/dp_sec/dex and the dex_home checks it.
That said, for unlocked/rooted users if the samsung source compiles it should be a simple job to compile with CONFIG_DISPLAYPORT_ENG set
EDIT:
the prod/Ven ID's do come from the USB subsystem when a CCIC_NOTIFY_ATTACH is sent:
Also, here are the numbers it's expecting:
Hi All, I just had a look through the S8 kernel source as I figured that anything in /sys/class would most likely have kernel code to support it, looks like the "Dex check" is as follows:
Code:
bool check_dex_support(struct displayport_device *displayport)
{
if (displayport->ven_id == SAMSUNG_VENDOR_ID
&& displayport->prod_id == DEXDOCK_PRODUCT_ID)
return true;
#ifdef CONFIG_DISPLAYPORT_ENG
return true;
#else
return false;
#endif
}
That is assuming that this check echo's out to /sys/class/dp_sec/dex and the dex_home checks it.
That said, for unlocked/rooted users if the samsung source compiles it should be a simple job to compile with CONFIG_DISPLAYPORT_ENG set
EDIT:
the prod/Ven ID's do come from the USB subsystem when a CCIC_NOTIFY_ATTACH is sent:
Code:
displayport->ven_id = usb_typec_info.sub2;
displayport->prod_id = usb_typec_info.sub3;
if(check_dex_support(displayport))
displayport_info("Dex mode supported product connected\n");
Code:
/* Samsung Acc VID */
#define SAMSUNG_VENDOR_ID 0x04E8
#define SAMSUNG_MPA_VENDOR_ID 0x04B4
/* Samsung Acc PID */
#define DEXDOCK_PRODUCT_ID 0xA020
#define HDMI_PRODUCT_ID 0xA025
#define MPA_PRODUCT_ID 0x2122