FORUMS
Remove All Ads from XDA

[WIP] Linux on Dex for Note 10+

59 posts
Thanks Meter: 25
 
By BlueKalel, Member on 20th September 2019, 08:00 AM
Post Reply Email Thread
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
The Following 4 Users Say Thank You to BlueKalel For This Useful Post: [ View ] Gift BlueKalel Ad-Free
20th September 2019, 10:51 AM |#2  
dave7802's Avatar
Senior Member
Flag Liverpool
Thanks Meter: 504
 
Donate to Me
More
Quote:
Originally Posted by BlueKalel

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.
20th September 2019, 11:21 AM |#3  
Senior Member
Thanks Meter: 58
 
More
not sure if this helps, maybe someone cld try to debug it in vmos app?

Sent from my SM-N975F using Tapatalk
21st September 2019, 07:15 PM |#4  
Senior Member
Thanks Meter: 58
 
More
someone found a solution. install Version: 1.0.43 (104301200) from apkmirror

Sent from my SM-N975F using Tapatalk
21st September 2019, 09:27 PM |#5  
Junior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by jemfalor

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.
21st September 2019, 10:52 PM |#6  
Senior Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by Collin80

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
22nd September 2019, 02:05 AM |#7  
OP Member
Thanks Meter: 25
 
More
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
22nd September 2019, 05:24 AM |#8  
Junior Member
Thanks Meter: 5
 
More
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.
26th September 2019, 09:30 AM |#9  
elliwigy's Avatar
Recognized Developer / Retired Forum Moderator
Flag Phoenix
Thanks Meter: 8,382
 
Donate to Me
More
theres also an init file.. appears the version number is a simple prop value you should be able to set easily..
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20190926-002914_FX.jpg
Views:	382
Size:	290.9 KB
ID:	4828187   Click image for larger version

Name:	Screenshot_20190926-002916_FX.jpg
Views:	374
Size:	292.7 KB
ID:	4828189  
26th September 2019, 09:31 AM |#10  
elliwigy's Avatar
Recognized Developer / Retired Forum Moderator
Flag Phoenix
Thanks Meter: 8,382
 
Donate to Me
More
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?
26th September 2019, 09:35 AM |#11  
elliwigy's Avatar
Recognized Developer / Retired Forum Moderator
Flag Phoenix
Thanks Meter: 8,382
 
Donate to Me
More
couldnt post an init rc file so uploaded to gdrive.. its from my g975u.. located at /system/etc/init

https://drive.google.com/file/d/1-o6...w?usp=drivesdk
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes