yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
Galaxy Note 8 DeX findings

This might be big!

I just got my Samsung Galaxy Note 8 SM-N950F (Exynos). Now, the first thing is that DeX is updated. It actually has another app for DeX now, a UI service or something. I tried installing the APKs onto the non-rooted SM-G955F with no luck - the install button refuses to press on both. I will try with the rooted SM-G950F when I have time.

I used Quick Shortcut Maker to make the DeX Launcher icon again - and unlike the S8+, the phone actually considers launching it with the Samsung HDMI, MultiPort Adapter, and even third party accessories. The mirrored display blanks out for a few seconds and it returns. The really weird thing is if you press the shortcut enough times, it crashes and reboots the phone. Possibly a kernel panic? Somebody with debugging skills and actual time on their hands please have a go.

Now this all suggests Samsung is planning to open DeX up. But it's not like I have actual evidence that they plan to do so. Oh, wait a second, I do! Look at the screenshot. This menu can be bought up from the Quick Shortcut Maker - there is a new activity for "S Pen input mode". The S-pen does not work as a cursor when using the real DeX - which suggests that this feature is for an unreleased product, hopefully eventually supporting third party adapters - possibly as depicted in the screenshot.

The other possibility is that Samsung heard us and left a vulnerability for nerds to exploit to allow DeX on any adapter, without it being too easy for the general public. The official Samsung HDMI and MultiPort Adapters both have non-zero values in /sys/class/dp_sec/dex_ver - which iirc do not with the Galaxy S8.

Either way, there is something in here that Samsung has not yet announced. As soon as the kernel source code is released, it might reveal what that is.

If anybody else has a Galaxy Note 8, please report on any DeX-related differences you notice from the Galaxy S8.

Regards,

Karatekid430
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
Haha, it turns out the kernel source for SM-N950F is already available from opensource.samsung.com - I did not even check because I assumed it would be released a few days late, as usual.

---------- Post added at 11:23 AM ---------- Previous post was at 10:52 AM ----------

Found out what they are up to - they are doing dual display mode - but the config is not set. drivers/video/fbdev/exynos/dual_* directories

The configs:

CONFIG_EXYNOS_SINGLE_DISPLAY=y

# CONFIG_EXYNOS_DUAL_DISPLAY is not set

Looks like it will be enabled in the future. But why leave the source code in there for now?

---------- Post added at 12:19 PM ---------- Previous post was at 11:23 AM ----------

Built kernel, there is still garbage in drivers/sensorhub/brcm/bbdpl/Kconfig - despite me telling them directly to clean it up.

There is still a section mismatch, presumably goes away if disable CONFIG_TIMA_RKP or whatever it is.

I don't know if it is me, but the kernel took even longer to compile than expected. My CPU could have been throttling. But it seems there are a few files in there that I feel like I have not seen before - although I could just be imaging things.

They appear to have fixed just one compile bug of scripts/fips_crypto_utils.c where main function needs to be below declared functions (or declare their headers above) and #include <string.h> added. I just looked at the file though, and no such changes have been made - and the error is gone. Perhaps they made the declarations in another file. To be investigated.

Maybe after a few months I will buy somebody's smashed SM-N950F for cheap and repair it. But I am not going to blow KNOX on a phone that is intact.

Either way, it looks like there is a lot of stuff in here to be discovered, and we now have the advantage of having two similar devices to compare the source code against - we can easily run a bash script to find the differences between the SM-G95XF and SM-N950F models.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
[MENTION=8306329]karatekid430[/MENTION] That's great! Waiting impatiently for new findings!

I got my hands on the Note8 source code about a week ago (when I created the kernel patch). I just looked at the same stuff we modified in the S8 kernel, but it was the same (that's why I tought it needs the same modifications).

There are some Note8 based roms coming out for the S8, and the Notorious NK204 (Note8) kernel already has our patch included. I'll test it to see if it got the new Dex app.

BTW, this gives me an idea: if you want to play with the Note8 kernel, get the source code of the NK204 kernel and play with it on your rooted S8.

[EDIT] You might post your findings to the Note8 forum, too.
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
Can you just run a kernel from a different device like that? Could I flash the whole SM-N950F ROM on SM-G950F without bricking it? Thanks for info.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
No, they need to be adapted!!! Fortunately the S8 and Note8 are very similar hardware-wise, so it's quite easy. Probably every N8 feature can be run on the S8.

farovitus managed to modify the Note8 kernel so it can be run on the S8 (NK203), then added all the features from the S8 Notorious kernel (including our patch) (NK204).

In the meantime mwilky adapted the Note8 ROM for the S8, and added the Notorious kernel. The ROM is still beta but it works, and soon it will be stable. For example they need to iron out some S-pen related stuff.

So if you want a Note8 rom on the S8 to play with, download the Renovate Ice N8. Then you'll be able to play with the NK204 kernel, which should contain all the Note8 stuff (including the dual display switch).
[Samsung Galaxy S8 Guides, News, & Discussion] karatekid430:
That sounds good. Just before I felt a twinge of regret for selling my second Note 8 (even though I probably would have never rooted it). I ordered from Ebay at 20% off, then found the Samsung Note 7 offer for Australia did actually exist, so I bought it from Samsung.com/au but didn't cancel the other one in time. Sold it and broke even.

So if I can play with it on the S8, then I will compile with dual screen option set and see what happens. I still have no idea why Samsung would include source code in the kernel for something they have not even finished or enabled yet. Actually, it could be enabled in the kernel, but have the config option disabled in the source code. Do stock kernels come with a system.map? If it has a system.map, it should be easy enough to figure it out.

---------- Post added at 12:27 AM ---------- Previous post was at 12:20 AM ----------

@Everybody, has anybody managed to get aarch64 objdump to work? I tried a while ago to objdump the kernel, but it was proving difficult - I am not sure if it was because the kernel was in an unrecognised format, or if it was something else. I have rudimentary experience with arm64 assembly, might have written tiny programs once or twice as exercises. But without objdump, I cannot do anything at all.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
There is a general android development and hacking forum on xda, probably it's a better place for this kind of question.

Not a lot of kernel devs on this topic...
[Samsung Galaxy S8 Guides, News, & Discussion] domsch1988:
Quick question for you:

Does dex or screen mirror work with external touchscreens? I'm trying to integrate my phone better into my car. A USBC hub plus a portable 7 inch touchscreen would be great :good:
[Samsung Galaxy S8 Guides, News, & Discussion] gannjunior:
Is this image attached cable good?

Do I have to have the device rooted to unlock DEX or is there any chance to do it also without root?

thanks
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
[MENTION=3763534]domsch1988[/MENTION] Sincerely, I don't see why would you like to use Dex in a car? I think the Android interface is much better adapted.

[MENTION=3055557]gannjunior[/MENTION] Yes, that cable should work. But you'll need to install a custom kernel, so you must root the phone and have TWRP. To use Dex without root, you either need the official dock, or a Dex compatible adapter (like the CF003)
[Samsung Galaxy S8 Guides, News, & Discussion] gannjunior:
thank you [MENTION=3194398]kbarni[/MENTION]

as alternative adapter to samsung original dex I found also "SMOS dex station" that seems good. I can't find anything searching for "CF003"..what it exactly the name?

ciaio!
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
it's called the C-FORCE CF003 Type-C to Type-C USB 3.1 4K HDMI Hub USB Docking for Nintendo Switch for Samsung S8. You can find it here for example.

There are other adapters like this, like the SMOS, or this multiport adapter.
[Samsung Galaxy S8 Guides, News, & Discussion] domsch1988:
It's not specifically dex, but are touch inputs from a USB monitor or such forwarded to the phone?
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
I have no idea. Why don't you ask it in the relevant forum if you want an answer????
[Samsung Galaxy S8 Guides, News, & Discussion] joeuser:
Has anybody managed to connect an external display at a better resolution than 1920x1200? DEX or no DEX? Display with USB Type C input or some HDMI adapter? I am currently trying to find the best monitor to use with the S8 (with hacked DEX) and am kind of at a loss... but HD only is not enough. Thanks.
[Samsung Galaxy S8 Guides, News, & Discussion] Chillac99:
Sorry if i sound stupid or out of context, but the youtube video in the first post is not working now. So after all, is it possible to "emulate" DeX with just the original USB Type-C that came with the S8 and a laptop screen, or with a HDMI cable with a monitor , or it can not be emulated at all?
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
This is the correct link to the video: [youtube]s50GWuKphTI[/youtube]

With the modified kernel you can have Dex desktop with any usb-c to hdmi adapter on an external monitor (not only with the official Dex dock)
[Samsung Galaxy S8 Guides, News, & Discussion] Chillac99:
Thank you very much, can you provide please the modified kernel link please? All i could find was the patch but i don't know how to use it :(
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
[MENTION=8216153]Chillac99[/MENTION] Use the Notorious kernel NK202 (or newer) or Batstock kernel.
[Samsung Galaxy S8 Guides, News, & Discussion] Chillac99:
Thank youuu again. One last thing, I am from Europe and I dont understand the model of the first and second adaptor ( you know,the 2 white ones, one bigger , with ethernet and the smaller one, capable of fast charging ) . I really wanna find them or a replacement here, in Europe, and for that i need to know what kind of adapters and ports they have. Can you provide me the links or the names of the 2 adapters?
[Samsung Galaxy S8 Guides, News, & Discussion] calj17:
Oh
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
Hey guys,

My MELOPOW M002 adapter just arrived, and DeX works just fine. But has any of you tried to add a USB hub through the Type C port? Would that work, or is that port only used for power lines, and no data lines are connected?
[Samsung Galaxy S8 Guides, News, & Discussion] JRR9307:
Awesome article ! I wonder why Samsung does not try a laptop dumb terminal/ functional laptop to connect to S8/ Note 8? I will wait patiently for Mirabook.
[Samsung Galaxy S8 Guides, News, & Discussion] sumondhk1:
Just did it with a non brand converter, very good development :good:
[Samsung Galaxy S8 Guides, News, & Discussion] erclalle:
https://youtu.be/44o4WlNcRes

This looks awesome, but it's just a concept, would be great if that made it onto the market!
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
The design is nice but that palm rest would be incredibly uncomfortable.
[Samsung Galaxy S8 Guides, News, & Discussion] mkumar12345:
I am looking for a hardware solution to get this working with HP Lapdock as I don't want to install a custom ROM and feel that we are already so close with all the non-Samsung adapters that can turn on DeX (for ex: Rocketek USB-C HDMI Adapter for Nintendo Switch support Samsung Dex ).

Since the HP Lapdock accepts USB-C input, we need a cable/adapter that takes the HDMI and USB output from DeX adapters and converts it back to USB-C. Is a HDMI input and USB-C input/output to USb-C adapter available?
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
The HP Lapdock uses pretty much the same technology the mentioned adapter, and all the other non-Samsung adapters use - DisplayPort over Type-C. There's no simple way to convert all the signals twice since it would require lots of extra power, etc., so our best bet would be HP releasing a new version of the Lapdock that uses the same chips the DeX dock and the mentioned adapters do. Which is not likely to happen.

Also, that Rocketek adapter is nothing but the MELOPOW M002 adapter rebranded and sold at a considerably higher price.
[Samsung Galaxy S8 Guides, News, & Discussion] mkumar12345:
Since as you said that HP is not likely to release a new version of the lapdock with DeX chips that's not really the best bet. How hard is it for someone to create an adapter the way some Chinese companies did for the Motorola Lapdock?

I am not sure that the extra power needed for converting the signals twice is a big deal as I was able to make a similar setup work with my old Motorola Lapdock with the conversion to DeX output and then connecting HDMI and USB to the Motorola Lapdock with ease. But the screen on the Motorola Lapdock is crappy as they come with poor resolution, glare, and doesn't extend all the way to top and bottom so it was not very pleasant to use, but it worked including the keyboard and trackpad.

It will be great if one of these enterprising Chinese companies making these DeX compatible adapters just do a USB-C to USB-C adapter with a box in the middle that takes care of DeX conversion internally.
[Samsung Galaxy S8 Guides, News, & Discussion] erk69:
Mirabook

You should check the mirabook by miraxess ( Cant post the link because I am a new member ... :crying: )

Dex works with this solution
[Samsung Galaxy S8 Guides, News, & Discussion] HaggaBon:
enable Dex for any S8/S8+ port?

Hi,

Wonder if this patch can work on a S7/S7e port with S8/S8+ ROM so that the S7/S7e can also work with the DeX?
[Samsung Galaxy S8 Guides, News, & Discussion] fonix232:
Doubt that it would. The kernel patch only enables the functionality for other adapters, and I don't think Samsung added DeX to the S7/S7e.
[Samsung Galaxy S8 Guides, News, & Discussion] kbarni:
This is a patch for the S8/S8+ kernel (there is a similar patch for the Note8 kernel). It basically enables the Dex driver for any kind of HDMI adapter.

However, I think, the S8/Note8 ROMs for the S7 are based on the S7 kernel, not the S8 kernel - so you can't apply this patch. To make it simple: the S7 kernel doesn't contain the Dex driver, so you can't enable it... :(

The S7 and S8 are quite different hardware-wise, so you can't port one kernel to the other.

I also doubt that you could send all the signals needed for Dex (video, USB, ethernet...) over the micro-USB connector.
[Samsung Galaxy S8 Guides, News, & Discussion] HaggaBon:
Is there a future for DeX?

Very much agree with your assessments.

As the price of SMART phones are getting higher and higher; closer or even higher than some notebooks, the convergence of the SMART phone and notebook will lift the price headroom for SMART phones since it becomes justified to pay for a SMART phone cum notebook.

Samsung seems to have break a threshold with the DeX and SMART phones with 8 or more cores. (another enabling trend is the ubiquitous cloud). People on the go will only have to bring around his/her SMART phone and check-in any mobile office workstation with a DeX-like devices and other peripherals connected (wireless or wired), it's all set.

Notwithstanding, the DeX in is current form still has some distance to go; but the enabling technologies are ready.
[Samsung Galaxy S8 Guides, News, & Discussion] jeky82:
I backed the superbook on KS long time ago. Should finally arrive for the end of this year. Hope it will be able to enable Dex with your kernel patch. Although I am not sure since it uses displaylik over micro usb
[Samsung Galaxy S7 Questions and Answers] djstreet007:
Anyone know how I can get this phone to work on boost network purchased it online from third party called sprint they don't care to help it's not blacklisted they just don't want to help since I wasn't original owner boost can't activate since it wasn't on sprint Carrier for a full year can I flash it? Need help
[LeEco Le Max 2 Questions & Answers] ccheney:
UPDATE: Add persist.data.iwlan.enable=true persist.radio.calls.on.ims=1 to /system/build.prop I'm not sure why they only added it to NA 16s. There appears to still be issues getting this to work on LOS. I suspect it has to do with modem firmware and android driver mismatches as LOS also can't properly read the sim address book.

While testing to see if WiFi Calling worked on custom roms I flashed back to stock cn EUI 23s and noticed it doesn't even appear to work on it. It activates and doesn't give an error message on EUI 23s (once got an Error81), and it shows that it is enabled. However it doesn't appear to actually work and checking with 'Network Cell Info' it shows 'WiFi Call avail: No'.

[UPDATE] - I tracked down what makes it work. Apparently all that is needed is something in the le_x2_na (US/CA) 16s build. You can use modem 50 with it and it still works so its something about the android software itself that changed that broke it in the China 23s/India 19s roms. I tested it with Airplane mode on and only wifi enabled and it made calls so it definitely works. It appears all the other builds give Error81 eventually and will not work. I think the other builds don't even try to connect as they didn't show anything when using tcpdump. The 16s build shows lookups to 3gppnetwork.org for mnc260 "US" mcc310 "T-Mobile" (my provider) and a bunch of ISAKMP and ESP packets to the resulting ip address.

Grepping for the 3gppnetwork.org text in /system turns up the following files:

$ grep -r 3gppnetwork.org *
Binary file bin/wpa_supplicant matches
Binary file etc/firmware/modem_pr/mcfg_sw_tmo.mbn matches
Binary file etc/firmware/modem_pr/mcfg_sw_cmcc.mbn matches
Binary file framework/oat/arm64/wifi-service.odex matches
Binary file priv-app/Settings/oat/arm64/Settings.odex matches
Binary file vendor/lib/lib-imsqimf.so matches
Binary file vendor/lib64/lib-imsqimf.so matches

Generic Access Network
[LeEco Le Max 2 Questions & Answers] ccheney:
If no one else knows what's going on with it I might throw a packet sniffer in between and see if its actually sending out the request properly. It should also help to see if a call is actually being routed, but it fails when I turn off the cell connection so I think it may not be working. There also isn't a wifi calling icon at top so probably isn't working.

05-13 00:01:30.219 2280 3293 I NetworkController: onReceive: intent=Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 mCallingUid=1000 (has extras) }
05-13 00:01:30.228 2280 3293 I NetworkController: onReceive: intent=Intent { act=android.net.wifi.RSSI_CHANGED flg=0x4000010 mCallingUid=1000 (has extras) }
05-13 00:01:30.361 12051 12051 I ViewRootImpl: finishMotionEvent: handled = true stage=10: View Post IME stage,inputElapseTime=2 eventTime = 2467238 downTime = 2467238 title= com.android.settings/com.android.settings.Settings$WifiCallingSettingsActivity
05-13 00:01:30.439 2280 3293 I NetworkController.MobileSignalController(slotId:0 subId:1): mWfcImsObserver onChange()
05-13 00:01:30.458 1605 2698 W AppOps : isskipsystem code:40 uid:1001
05-13 00:01:30.466 2755 3770 E ImsConfigImpl: getImsConfigListener returns null
05-13 00:01:30.466 2755 3770 E ImsConfigImpl: onSetFeatureResponseDone listener is not valid !!!
05-13 00:01:30.470 1605 2604 W AppOps : Finishing op nesting under-run: uid 1001 pkg org.codeaurora.ims code 40 time=0 duration=0 nesting=0
05-13 00:01:30.484 1605 2628 W AppOps : isskipsystem code:40 uid:1001
05-13 00:01:30.510 1605 2681 W AppOps : Finishing op nesting under-run: uid 1001 pkg org.codeaurora.ims code 40 time=0 duration=0 nesting=0

I also notice that while VoLTE appears to work on 23s if you turn it off and on it doesn't, the logcat output also looks a bit odd, like it might not be doing anything at all, ugh.

05-13 00:20:02.742 2755 2755 I ViewRootImpl: finishMotionEvent: handled = true stage=10: View Post IME stage,inputElapseTime=1 eventTime = 3580090 downTime = 3580090 title= com.android.phone/com.android.phone.MobileNetworkSettings
05-13 00:20:02.878 1605 1633 W AppOps : isskipsystem code:40 uid:1001
05-13 00:20:02.887 2755 3770 E ImsConfigImpl: getImsConfigListener returns null
05-13 00:20:02.887 2755 3770 E ImsConfigImpl: onSetFeatureResponseDone listener is not valid !!!
05-13 00:20:02.967 1605 2628 W AppOps : Finishing op nesting under-run: uid 1001 pkg org.codeaurora.ims code 40 time=0 duration=0 nesting=0
[LeEco Le Max 2 Questions & Answers] whymoo:
It works on the us rom x829 5.8.16s and maybe on some of the dev roms.

Edit: You can check by enabling airplane mode
[LeEco Le Max 2 Questions & Answers] ccheney:
Thanks, I'll have to take a look at what it is doing differently between 16s and 23s so hopefully it will work on more roms.
[LeEco Le Max 2 Questions & Answers] ccheney:
So running tcpdump on 23s and turning off and on WiFi Calling does not appear to produce any network packets at all, or at least not any that tcpdump saw. I'll have to try it out on 16s sometime soon.
[LeEco Le Max 2 Questions & Answers] ccheney:
Updated OP, US 16s apparently will work with various modem firmwares, v24 v50 tested, but India 19s and China 23s do not.
[LeEco Le Max 2 Questions & Answers] ccheney:
I'm not certain but I think the issue is due to the newer builds not including WfcService at all. Copying it from 16s though causes com.android.phone to crash continuously.
[LeEco Le Max 2 Questions & Answers] RandyT2:
Nice to see someone digging into this. Getting sick of the 16s firmware.

Another thing which is a bit interesting is that with the original 16s radio, WiFi calling tends to be a bit less finicky about connecting. After reading your post, I flashed the v50 modem, and got the REG99 "Unable to connect" error message upon booting. This almost never happens with the original modem file. I did manage to get it to work, but only after putting the phone into Airplane mode and enabling WiFi. If you only need to call numbers in your contacts, or receive calls, you can leave it in Airplane. Otherwise, the dialer shows "Emergency calls only", and you have to put it back into normal mode. The 16s seems more seamless, but the newer modem files are probably better overall for other radio functions.

I wish LeEco would release the sources for the 16s firmware, to make the job of the devs easier for this, but I don't see that happening.:(