yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
I still wonder if the CONFIG_DISPLAYPORT_ENG switch in the kernel could solve the problem...

I have a rooted S8 and a HDMI adapter, so I'm willing to test it, if anybody could compile a kernel for me. Unfortunately I couldn't recompile it myself, I think the NDK I'm using is too old (or I'm making something wrong).
[Samsung Galaxy S8 Guides, News, & Discussion] bogdi1988:
Take a look here...

http://gizmodo.com/these-crowdfunded-nintendo-switch-docks-are-just-rebran-1796654469
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
Okay, I bought a Galaxy S8 SM-G950F for AUD $350. How so cheap? It is smashed and the screen doesn't work - it just displays random colours.

That does not matter with the Galaxy S8. I went there and used my multiport adapter to help the previous owner factory reset it with a mouse, keyboard and TV through HDMI. I got it home and it works on DeX. Thankfully neither of the cameras are smashed, and the fingerprint works.

Unfortunately it is Telstra, so my first step will be flashing carrierless XSA firmware. Then I will use Magisk root, and recompile and flash the kernel with the option set to allow DeX always. I will report back.
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
You can use any Type-C accessory. But their feature, SAMSUNG'S OWN FEATURE, is hardware locked for a reason.
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
Yes, but:

- a) I would be happy to pay to unlock it for any adapter

- b) You could argue that paying $1349 for a flagship would entitle us to use whatever we want, anyway

---------- Post added at 05:42 AM ---------- Previous post was at 05:36 AM ----------

Okay my Galaxy S8 with the smashed (and not working) screen is rooted and passes Safety Net. After playing with the /sys/class/dp_sec files, it looks like this is only part of the story. Even if these are modified to values that occur when the DeX is connected, there must be other things under the hood that are not right.

I have flashed the kernel I compiled (CONFIG_DISPLAYPORT_ENG=y), but it does not boot. I used Android Kitchen and just extracting the Samsung official boot.img and repacking results in a file 3MB less. I then tried on Windows and it created one of similar size, but still would not boot.

I flashed the stock boot.img back and now it works again. Does anybody know how to compile and pack a Samsung kernel? I use Ubuntu 17.04 and / or Windows 10.

I used the steps here, more or less: https://xdaforums.com/android/software-hacking/reference-how-to-compile-android-kernel-t3627297

Thanks!
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
Okay, I've got a (partially) working kernel with CONFIG_DISPLAYPORT_ENG enabled. (the touchscreen isn't working - probably something wrong with the configuration files -, I'll try to solve it; now I could test it with a mouse)

When it first booted, I got a Dex greeting message! YEAH! :laugh:

Unfortunately I can't try the HDMI output until monday (I don't have the adaptor at home). I hope DEX will work without further complications. Fingers crossed!
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
a, It's not about paying. They make the accessory, you use that. But above that, Samsung cannot guarantee the same quality of service with a third party docking system (especially since most of them are incapable of QC2.0, which is a key requirement for this to work properly).
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
The phone supports (afaik) all three of the QC, Samsung AFC, and USB PD. I cannot verify the QC, but I have used both AFC and USB PD, with the phone alone, and with the DeX Station.

In fact, the USB PD could supply enough power to run the DeX and simultaneously fast charge the phone. The Samsung EP-TA20 can only power the DeX and standard charge the phone. Samsung told me the 12V 2.1A 25W TabPro S AFC could do fast charging through the DeX, but since this is discontinued, I cannot verify that.

Technically the charging is not a key requirement - although it would be a major inconvenience if you could not charge it at all.

The reasons I want to use a different product:

- DeX is bulky and cannot go in a laptop bag. A USB-C multi-port adapter is a fraction of the size. You can get these that can even support USB PD for fast charging through them.

- DeX is not hitting the limits of the USB-C connector. USB-C allows for 2-lane DP and a USB SS channel, or 4-lane DP alone. This means that the port should be able to support both 3840x2160p30 and 5Gbps USB for Gigabit Ethernet and fast USB ports, or 3840x2160p60 and a USB 2.0 signal. Since the phone can support 3840x2160p60 DisplayPort, and USB 10Gbps (not simultaneously), it means the dock is, for lack of a better word, half-arsed. My biggest peeve is not having 1GBASE-T (which I can verify works without the DeX, attached directly to the phone - RTL8153, iperf 900Mbps). Even my wireless is legitimately faster than 100MBASE-T.

- They went out of their way to convert DP signal to inferior HDMI, adding cost, complexity, and reducing the versatility of the dock. It is very difficult to convert HDMI back to DisplayPort, and even then, AdaptiveSync would be lost. Really they should have just left the video output as a USB-C so that we can adapt it to whatever takes our fancy.

---------- Post added at 10:29 AM ---------- Previous post was at 10:24 AM ----------

That is amazing news! With the touch screen, do you mean the screen on the phone, or do you mean an external touchscreen monitor? I have an external touchscreen, Dell S2340T, and its touch works with DeX.

Could you please tell me how to pack the boot.img with the new kernel? I compiled successfully, but when flashed with the packed boot.img, it just hangs on the "SAMSUNG GALAXY S8" bootloader screen. I used the compiler toolchain from Google, using arm64 arch and cross compile environment variables. I tried both in Windows 10 Bash running Ubuntu 17.04 and also actual Ubuntu 17.04 on a laptop.

Thanks!
[Samsung Galaxy S8 Guides, News, & Discussion] russ18uk:
Would save on cost too due to royalties.

Anyway, the Switch and DeX docks have been reproduced by the Chinese with the CF001. Luckily for us S8 users is that it seems Nintendo went with the same method of whitelist/lockout.

Only a matter of time now before they will be much easier to find. There is a crowdfunded one which is a rebrand of the CF001.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
I agree that this is a great news!

Here's what I did: I was using Jesse's kernel sources, compiled with the UberTC 7.1 or 8.1 toolchain (from the thread you linked): ./build_kernel dreamlte Then, I obtained the original boot.img from the Jesse's flashable kernel zip, unpacked with Android Image Kitchen (again, from the tutorial: ./unpackimg boot.img), replaced the boot.img-zImage with the Image file from the kernel_out folder, then repackaged the boot image (./repackimg). Finally flashed this the image-new.img from TWRP (as image file).

Other toolchains either couldn't build the kernel, or it was even worse. I might try other kernels to see if I can get better results. Unfortunately, the unresponsive touchscreen (of the phone) seems like a driver problem, as it persists if I build the kernel without the CONFIG_DISPLAYPORT_ENG switch.

I post the kernel I built, but USE IT WITH PRECAUTION! As i said, touchscreen isn't working! Have a backup of your system (later you can restore only the boot partition) and a mouse connected to your phone. If you need to reboot the phone in TWRP, hold VolumeDown+Power key for 6 seconds, then (before it vibrates) VolumeUp+Bixby+Power until TWRP starts.

I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE TO YOUR DEVICE IF YOU DECIDE TO USE THIS KERNEL! Here's the link for the kernel image to test.
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
No doubt the screen not working is because it is some random person's kernel. I am trying to build the exact same stock kernel and boot image except for the one config change. I could probably just take the normal one and modify a DWORD or something using a hex editor to change the return value, but I am really not good enough at assembly to find the location.

If you are having the issue with the touch screen, I suggest using the same method you are already using, except download the source from the Samsung website (http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=sm-g950f for SM-G950F) and compile with that. If that does not work then we have to start questioning our understanding of logic, or at the very least the compiler toolchain. Can you attach to an external touch screen and see if that is affected?

I would love to try that kernel straight away, but I am a fan of keeping things stock. I really wish Samsung would ship with a su binary for developers to enable for purposes other than running custom ROMs. All I want is a stock Samsung ROM with Magisk for now. AOSP is just horrid in my experience, Samsung really makes Android for me.

But thanks for that, I will see if I can apply that method to the Samsung stock source code. I will let you know.
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
Samsung AFC is just Qualcomm's actual QC with a few more restrictions (that's why my QC3.0 charger with the proper cable shows up as fast charging). USB-PD in my experience does not work, though I have the international 950F model, might be a limitation of the Exynos model itself.

Samsung tied it to the dock because it was designed to cool the device while pushing it to the limits. Any other solution means a security risk, and if they allowed it, there would be people killing their devices by not using adequate cooling, et cetera.

Sure, it's bulky. It would be nice if it could be folded into something flat. But Samsung didn't design it like that. Maybe they will release a next revision. And sure it is limited. I for one would prefer a lapdock style thing, with a battery pack, built-in storage, screen, etc. It would be awesome.

And I don't think they are converting DP to HDMI, they are using MLP over Type-C for HDMI output, just switch the source of the stream from the actual display buffer to the secondary (desktop) view.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
[MENTION=8306329]karatekid430[/MENTION] I've been using Jesse's kernel with Renovate Ice rom for two months (since I got my S8) and I'm very pleased with it's performances; that's why I chose to modify it.

I tried to build the stock kernel with Google's 4.9 toolchain. I got the same problem as you, my S8 got stuck at the boot logo (despite trying several methods to build and package it). That said, you can still test my kernel and then restore the stock kernel.

Tomorrow I'll have my HDMI adaptor, so I'll be able to test if Dex shows up on an external screen.

[MENTION=1846471]fonix232[/MENTION] I'm still pretty sure Samsung locked Dex to the dock mainly to be able to sell a 150$ accessory (a bit like iPhone that misses the jack connector to be able to sell the earbuds).

If screen mirroring works with Wifi and UsbC->HDMI adaptor, I son't see why Dex wouldn't work. That said, it's sure that the Dex dock is a good peripheral offering qood connectivity and cooling, but I'm sure they could solve this if they wanted.
[Samsung Galaxy S8 Guides, News, & Discussion] r8dooo:
FYI for anybody on pie beta or when official one ui gets released no longer need the dock as its enabled on pie
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
Great! No need to hack the kernel to turn off this stupid limitation. Hope it will be kept for the final release too (Oreo betas didn't need the official dock either, but the limitation wass reenabled in the final release)
[Samsung Galaxy S8 Guides, News, & Discussion] r8dooo:
Hope so I'm not using any dock just using HDMI cable works flawlessly
[Samsung Galaxy S8 Guides, News, & Discussion] bottomcentre:
No new Mirabook cheaper links? I want it (I was going to buy the Vinpok Split but meh). DM me if you want to help me with ¿unique? link :)
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
FYI Dex on S8 Android Pie final works without the official docking station (i.e. any HDMI adapter)
[Samsung Galaxy S8 Guides, News, & Discussion] lava2:
Any? Did you try yourself?
[Samsung Galaxy S8 Guides, News, & Discussion] blunatic:
https://www.ebay.de/itm/Usb-C-Auf-H...var=651470178458&_trksid=p2057872.m2749.l2649

this runs perfectly
[Samsung Galaxy S8 Guides, News, & Discussion] yutada:
I use C-Force to use Dex

S8 - Android 9
[Samsung Galaxy S8 Guides, News, & Discussion] eueyj:
Asus Zenscreen

This works fine with a straight USB-C Connection however I would like to be able to do the following. The biggest thing is being able to have the option to use an Ethernet Connection, the second would be to be able to charge the screen as I'm using DeX. I know the original DeX station had Ethernet but only HDMI output so wouldn't work with this screen. I tried a docking station with USB3.0 output and tried using that to output to the display but that didn't work. It's a very old docking station so that could be the reason.

I've looked for a USB-C docking station with USB-C output but it doesn't look that they exist. Anyone have any ideas?

---------- Post added at 05:41 PM ---------- Previous post was at 05:38 PM ----------

Can this output to a display using USB-C and not HDMI?
[Samsung Galaxy S8 Guides, News, & Discussion] yutada:
Current, I only can output by HDMI and don't have any monitor with a USB-C connection to check.
[Samsung Galaxy S8 Guides, News, & Discussion] m7ndF:
Can i run dex on root note 9 ???

The dex not working for me. I root the phone on android 9
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
Does it display "HDMI connected" when connecting the dongle? Do you have some image on the external screen? If not, it might be a problem with the adapter.
[Samsung Galaxy S8 Guides, News, & Discussion] m7ndF:
Does it display "HDMI connected" when connecting the dongle?

Yes. It connect just mirror screen.

About the adapter.... I bought the Samsung dex and the same problem.. just screen mirroring... not show up to choose between mirroring and dex.
[Samsung Galaxy S8 Guides, News, & Discussion] marce002:
Hi i have 2 s8 plus and s9plus... with single usbc to hdmi the s9 works fine.... the other 2 s8 s wont display image through hdmi... one of them was working in screen mode but now nope... wonder if motherbiard in s8 get damaged by using some king of cables? My s9 works fine though.... i ve been changing firmwares through odin but all compatible versions.... weird.. is there a capacitor or something that might burn by using non samsung hdmi adapters (but works in my s9+ ) of course charging and data transfer is 100% working on all s8 phones .. replaced one flexnin one s8 to be sure and problem persists... what else to check?
[Samsung Galaxy S8 Guides, News, & Discussion] [No_CoDE]:
hi dear user are you able to fix the problem?

i have the same issue
[Samsung Galaxy S8 Guides, News, & Discussion] Pitrecha:
On my s8 dex also won't start.

https://ae01.alicdn.com/kf/HTB16.1Hae3tHKVjSZSgq6x4QFXaY.jpg

I bought this hub from china. In the comments there are photos with working dex so there is no problem with compatibility.

Until then:

I have completely reset my phone

I uninstalled the smartthings app

Wipe cache of all dex applications

I changed the battery modes

I also cleaned usbc with isopropanol

Tests it on aoc monitor and sony tv with connected samsung charger

I don't know what else I can change
[Samsung Galaxy S8 Guides, News, & Discussion] akostadinov:
Not sure if this has been written in thread already. But let me add my +1 at the end so hopefully people will more easily find.

This on S8+ Exynos latest stock Android 9 upate.

After a full workday experiments, this worked for me:

Root phone with TWRP according to this guide

Install latest NOX kernel with TWRP - https://xdaforums.com/showthread.php?t=3721469 , it apparently has the DEX patch

wrt the guide, I'm a little concerned about the downloads. I downloaded TWRP from official web site and samsung drivers from samsung website. TWRP because it was not the latest version. And Samsung because the binaried downloaded from howto link didn't have signature. So I'm a litlle concerned about HOWTO downloads legitimacy. In any case you can download the binaries from a different source for the peace of mind.

One issue is that I still can't show onscreen keyboard on the dex display. Only on the phone display. I wonder if that might be affected by kernel. Somehow doubt it. PS I tried notorious kernel too but phone didn't boot with it. Actually my mistake. If I open settings from DEX, fist option is DEX settings and there is keyboard/input settings, where I can choose whether virtual keyboard shows on DEX screen or phone screen.

PPS as already stated with stock unmodified S9 no special docking station is needed and all dongles work for me.

PPPS after yesterday I hate Samsung for imposing such stupid limitations about doc. And I am using original expensive Samsung USB-C hub (but tested modification working with a cheap one too). Still I had to go through all this to get it working.
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
Yesterday i got a hub HDMI type c

Maybe arrive in next 2 months

I have Android 9 in my Galaxy s8 plus

I need use it in dex mode because my PC gamer spend so much energy?*♂️

So, i will try this solution and i will post here my results with photos. :fingers-crossed:
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
we have a problem, this kernel is out of date since 2019

edit:

better and updated kernel

https://xdaforums.com/galaxy-s8/sam...velopment/kernel-a2n-kernel-20181205-t3875640

with dex modification :good::laugh:
[Samsung Galaxy S8 Guides, News, & Discussion] kicooo:
May anybody confirm please you just need an USB-C to USB cable in order to run Samsung Dex? I have a compatible tablet using Android 9.0 but it doesn’t work. My MacBook doesn’t recognise the tablet when using Samsung Dex (but it does when using other softwares)
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
Yes.

But for recognize and turn dex on, you need to put the Power cable.
[Samsung Galaxy S8 Guides, News, & Discussion] kicooo:
I am trying right now with an iMac (more modern and with Catalina) and it doesn't work either using the native USB-C to USB cable of the tablet...
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
Please, post a photo .
[Samsung Galaxy S8 Guides, News, & Discussion] kicooo:
Here you go

https://ibb.co/9HN1YK7

https://ibb.co/LhzHrNJ
[Samsung Galaxy S8 Guides, News, & Discussion] kicooo:
It is difficult to share pictures on here eh! Now it should be okay:

[IMG="1"]https://imgur.com/a/MPk04ek[/IMG]

[IMG="2"]https://imgur.com/a/WHQdQR2[/IMG]

https://imgur.com/a/QSLWg3B

The warning message in Spanish from the second picture means "the device cannot access to the tablet data. please plug out and plugin again. It is necessary to install Android File Transfer or Smart Switch", however I have installed and uninstalled both and it doesn't work either.
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
I didn't understand your goal.

Do you want to have dex on the macbook?

Or did you activate dex on the tablet and want to communicate with the mac via cable?

I never saw that.

I just see the phone connected via hdmi on a screen activating the dex
[Samsung Galaxy S8 Guides, News, & Discussion] kicooo:
How didn't you? Here you have an example:

https://youtu.be/_jzYpyNeAPE

Actually you just need to go to the Samsung DeX website and see the application to be downloaded for macs.

---------- Post added at 07:54 PM ---------- Previous post was at 07:35 PM ----------

[YOUTUBE]https://youtu.be/jjmXiiaX_GY[/YOUTUBE]

I would appreciate if we avoid to provide wrong information if we are not sure and just try to add useful information if possible.
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
I didn't know about this thing with the macbok lol

that´s nice ;)
[Samsung Galaxy S8 Guides, News, & Discussion] rn2web:
I Tested my dex today ??

Galaxy s8 PLUS

Dex very fast...I Love it
[Samsung Galaxy S8 Guides, News, & Discussion] Settler11:
Any custom rom recommendation that works fully with DeX? ;)
[Samsung Galaxy S8 Guides, News, & Discussion] russ18uk:
There is A DP to HDMI ASIC in the DeX.
[Samsung Galaxy S8 Guides, News, & Discussion] 90dfx:
Hello, i installed the boot image over twrp but it make the phone enter into a bootloop on Samsung logo. Restored with stock boot without sny problems or data loss
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
Okay, turns out the problem is not packing. I can pack the stock kernel and it works. So my compiled kernel must be dodgy. I get a message about section mismatch in init. This might be an issue.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
I tested my modified kernel with the Usb C -> HDMI cable and an external monitor.

I got the following greeting message:

But all I got on the external monitor was the normal screen of my phone, no Dex desktop.

I tried some tips from the first page of this thread: changing the value of /sys/class/dp_sec/dex. The screen flashed a few times, it detected again the HDMI cable, but no other change.

I also tried start com.android.app.desktopservice.runstart, but still nothing.

Any other ideas that I could try?
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
I see a possible problem: the check_dex_support function is called from the usb_typec_displayport_notification function, i.e. when a displayport device is connected to the phone (displayport_drv.c).

That's probably why it didn't react when I plugged in a HDMI cable.

So I must agree [MENTION=4198032]russ18uk[/MENTION], the Dex probably contains a DisplayPort adaptor, and it's probably not possible to launch Dex with a HDMI cable (at least without rewriting the HDMI driver) - it requires a USBC->DP adaptor to be launched.
[Samsung Galaxy S8 Guides, News, & Discussion] NeedleGames:
People don't give up!
[Samsung Galaxy S8 Guides, News, & Discussion] brigantti:
so this project is dead?
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
USB-C only offers DisplayPort. If you have a USB-C to HDMI adapter, then it has an IC that converts the signal. So any HDMI adapter is really a DisplayPort adapter.

I have both the Samsung official HDMI adapter, and USB-C to DisplayPort adapters. Both cause the Galaxy S8 to say "HDMI Cable Connected" when attached, which means Samsung is just assuming people like obsolete technologies.

But when you connect your HDMI adapter, it will be calling that function. The DeX has HDMI (unfortunately) and it works.

---------- Post added at 03:16 AM ---------- Previous post was at 03:05 AM ----------

No, it is not dead. We have made progress.

My issue is compiling the kernel. I use aarch64 4.9 toolchain from Google, and the kernel compiles, but with a section mismatch. I have contacted Samsung who instantly refused to have anything to do with it because of rooting. I then reported them to Google for being in violation of the terms of Android which forces them to provide working source code.

I understand C language (it is the only language I believe should actually exist) but unfortunately, I do not understand the kernel structure. I cannot see where everything is called from, and trace it back to the original entry point when it first loads. I couldn't even identify how reading from a sysfs entry ends up calling the kernel functions backing it. So until I can find some source of information that explains the overall workings of the source code, then I am stuck to be making real modifications.

If somebody can show me how to compile the SM-G950F kernel source code without the section mismatch, then I will make the kernel and provide a video of DeX working with as many accessories as possible, to encourage more people to get on board. Ideally we get enough people power to convince Samsung to allow it on anything. The Microsoft 950 works on any hardware (including DeX), so why shouldn't the Samsung work with others?