[WIP] Linux on Dex for Note 10+

BlueKalel

Senior Member
Sep 11, 2010
59
25
38
Hi all,
So I heard around the internets that LoD may not be coming to the Note 10s and that it may have been canceled all together. With that said on my free time I've been poking around the decompiled apk to see how it works. I have found the checks and recompiled (also want to say there's a thread in the S8 forum that was trying the same thing and I got to the same position as them).

The kernel source shows that "CONFIG_LOD_SEC=y" so that's good

It still didn't work. Eventually, since I have an S10+ and a Note 10+, I decompiled then recompiled without modification and tried to run on my S10+ and got the error "Update your software Linux on DeX requires your device to have the latest software to support some features."

Clean Binary
... I LxD_i : getDeviceName: model: SM-G975U, device: beyond2q
... I LxD_o : isSupportedBinary: binary version: 5, required version: 4

Clean Binary with recompile
... I LxD_i : getDeviceName: model: SM-G975U, device: beyond2q
... I LxD_o : isSupportedBinary: binary version: 1, required version: 4

I believe Note 10+ has everything needed to run LoD but the code below is whats stopping it from running. If someone has a rooted Note 10(+) and can change the device name to "beyond2q" and device model to "SM-G975U" then sideload the Samsung signed apk I'm hoping it will work. If this is the case then the non-samsung signed apk is whats stopping LoD from running.

Code:
    private static String a(String str) {
        String str2 = c;
        Log.d(str2, "getDeviceNameByDevice: " + str);
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        if (str.startsWith("crown")) {
            return "CROWN";
        }
        if (str.startsWith("gts4")) {
            return "TABS4";
        }
        if (str.startsWith("gts5")) {
            return "TABS5";
        }
        if (str.startsWith("star")) {
            return "STAR";
        }
        if (str.startsWith("beyond")) {
            return "BEYOND";
        }
        if (str.startsWith("winner")) {
            return "WINNER";
        }
        if (str.startsWith("great")) {
            return "GREAT";
        }
        return null;
    }
Any help is appreciated.

Thanks,
BlueKalel
 

dave7802

Senior Member
Jan 23, 2007
1,041
510
143
Liverpool
Hi all,
So I heard around the internets that LoD may not be coming to the Note 10s and that it may have been canceled all together. With that said on my free time I've been poking around the decompiled apk to see how it works. I have found the checks and recompiled (also want to say there's a thread in the S8 forum that was trying the same thing and I got to the same position as them).

The kernel source shows that "CONFIG_LOD_SEC=y" so that's good

It still didn't work. Eventually, since I have an S10+ and a Note 10+, I decompiled then recompiled without modification and tried to run on my S10+ and got the error "Update your software Linux on DeX requires your device to have the latest software to support some features."

Clean Binary
... I LxD_i : getDeviceName: model: SM-G975U, device: beyond2q
... I LxD_o : isSupportedBinary: binary version: 5, required version: 4

Clean Binary with recompile
... I LxD_i : getDeviceName: model: SM-G975U, device: beyond2q
... I LxD_o : isSupportedBinary: binary version: 1, required version: 4

I believe Note 10+ has everything needed to run LoD but the code below is whats stopping it from running. If someone has a rooted Note 10(+) and can change the device name to "beyond2q" and device model to "SM-G975U" then sideload the Samsung signed apk I'm hoping it will work. If this is the case then the non-samsung signed apk is whats stopping LoD from running.

Code:
    private static String a(String str) {
        String str2 = c;
        Log.d(str2, "getDeviceNameByDevice: " + str);
        if (TextUtils.isEmpty(str)) {
            return null;
        }
        if (str.startsWith("crown")) {
            return "CROWN";
        }
        if (str.startsWith("gts4")) {
            return "TABS4";
        }
        if (str.startsWith("gts5")) {
            return "TABS5";
        }
        if (str.startsWith("star")) {
            return "STAR";
        }
        if (str.startsWith("beyond")) {
            return "BEYOND";
        }
        if (str.startsWith("winner")) {
            return "WINNER";
        }
        if (str.startsWith("great")) {
            return "GREAT";
        }
        return null;
    }
Any help is appreciated.

Thanks,
BlueKalel
I have had a poke around on this myself, It checks for the Validation of the Apk itself, an if its not signed by Samsung then it fails to launch the environment.
I give up at this point, Couldn't locate the validation check to see if it was possible to remove it.

Might be possible for someone to edit the App after its been installed with Root privileges, But this is the first device i have not needed to root and i am unsure if i will root this one.
 

Collin80

Member
Nov 14, 2018
21
13
3
someone found a solution. install Version: 1.0.43 (104301200) from apkmirror

Sent from my SM-N975F using Tapatalk
I just tried this and the information is correct. 1.0.43 does indeed seem to operate. Well, I downloaded the Ubuntu image and then tried to use terminal mode. It doesn't work for me. But, it let me get as far as installing it.

EDIT: I tried DeX too and that also fails. It seems that the older version can set up the image but something is likely missing in the Note 10 firmware in order to fully support this. Now, that's boneheadedly stupid. The phone is basically a Note 9 with the processor and GPU from an S10, both of which are fully supported. I'm going to have to guess that our good buddies Microsoft are behind this garbage.
 
Last edited:

jemfalor

Senior Member
Jul 25, 2015
296
64
0
I just tried this and the information is correct. 1.0.43 does indeed seem to operate. Well, I downloaded the Ubuntu image and then tried to use terminal mode. It doesn't work for me. But, it let me get as far as installing it.

EDIT: I tried DeX too and that also fails. It seems that the older version can set up the image but something is likely missing in the Note 10 firmware in order to fully support this. Now, that's boneheadedly stupid. The phone is basically a Note 9 with the processor and GPU from an S10, both of which are fully supported. I'm going to have to guess that our good buddies Microsoft are behind this garbage.
yes. good guess. someone needs to resolve this issue

any time there's a feature problem, some capitalist is banking on it.

Sent from my SM-N975F using Tapatalk
 

BlueKalel

Senior Member
Sep 11, 2010
59
25
38
I've looked into this version as well. The newest version crashes because of the device name on the Note 10. When we modify the apk and resign it with apksigner it becomes different than the original, obviously. There's a function in the code called SemSystemProperties that I can't find anything about, but I think it has to do with the signing of the app and the secure folder creation and what not. With the old app I was able to get all the way to creating the image but once ran it crashed. The error in logcat for the crash delt with the Device Model. I changed the model in the code and recompiled but this time I get You have to upgrade the binary message, never getting to the image stage. Again all points to the SemSystemProperties and the signing of the apk.

-Code thats an issue:
private static String d() {
Log.d(c, "getDeviceNameByDevice: ");
if (Build.DEVICE.startsWith("crown")) {
return "CROWN";
}
if (Build.DEVICE.startsWith("gts4")) {
return "TABS4";
}
if (Build.DEVICE.startsWith("star2")) {
return "STAR2";
}
if (Build.DEVICE.startsWith("beyond")) {
return "BEYOND";
}
if (Build.DEVICE.startsWith("winner")) {
return "WINNER";
}
return null;
}

and

public static int getNstVersion() {

return SemSystemProperties.getInt("linux_on_dex_version", 1);

-From the logs without modification

I LxD_g : getDeviceName: model: SM-N975U, device: d2q

E LxD_LxDUncaughtExceptionHandler: uncaughtException: classs = class com.samsung.android.lxd.processor.LxdException, uncaughtException = com.samsung.android.lxd.processor.LxdException: undefined model: SM-N975U, d2q

-From the logs after modification

I LxD_j : isSupportedBinary: binary version: 1, required version: 4

If anyone knows what SemSystemProperties is and its function I'm all ears.

Thanks,
BlueKalel
 

Collin80

Member
Nov 14, 2018
21
13
3
It looks to me that SemSystemProperties is a java class (exposed by the android system) that can be used to query system properties. You can see in that line "return SemSystemProperties.getInt("linux_on_dex_version", 1);" that it seems to be uses a default value of 1 if it can't read the property. So, perhaps just try changing the 1 to a 5 which is what it seems to have been looking for. Then you're effectively hard coding the value it wanted anyway and maybe it will work. But, I fear they've intentionally left out bits and pieces required. I suppose the only way to find out is to try it.
 

elliwigy

Forum Moderator / Recognized Developer
Staff member
Mar 16, 2011
12,953
8,823
253
Phoenix
www.sampwnd.com
ps.. ill try n get it running on my n976v andvreport back.. maybe using the old version, setting the properties then using an activity manager to launch it.. maybe can bypass initial loading of the app where it errors?
 

BlueKalel

Senior Member
Sep 11, 2010
59
25
38
The rc file is what I believe it uses in starting and stopping the container which also is protected. The only way I think this will work is if you have a rooted device and can change the device's model name. Because once you modify the apk it no longer works. Now not sure if rooting messes up the Knox stuff which if it does then I believe it will still not work. The issue comes down to signing and Knox security. It seems if the apk is signed by Samsung it allows execution of the container. If someone who is rooted will try changing its name and installing the apk it would be helpful with this hypothesis.

Thanks,
BlueKalel
 

wm8s

Member
Dec 2, 2006
26
2
0
Samsung just emailed me:

End of Linux on DeX Beta
Thank you for supporting Linux on DeX Beta. The development of Linux on DeX was all thanks to customer interest and valuable feedback. Unfortunately, we are announcing the end of our beta program, and will no longer provide support on future OS and device releases.

NOTE — Linux on DeX will not be supported on Android 10 Beta. Once you update your device to Android OS 10, you will not be able to perform a version rollback to Android Pie. If you decide to update your device to Android 10 Beta, we recommend backing up data before updating.

Thank you,
The Linux on DeX Team