Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minecraft Education support #763

Open
dmitrmax opened this issue Jan 22, 2023 · 16 comments
Open

Minecraft Education support #763

dmitrmax opened this issue Jan 22, 2023 · 16 comments
Labels
enhancement New feature or request

Comments

@dmitrmax
Copy link

Minecraft Education is heavly based on Bedrocks's code and also available for Android OS under com.mojang.minecraftedu name.

It can be downloaded for free but requires Microsoft Account to authenticate. A demo mode to play quests is available for everyone who has Microsoft Account. A full featured play is available for owners of school accounts and for those who purchased license explicitly.

Would it be hard to support launching Education edition too? I've tried to patch com.mojang.minecraftpe to com.mojang.minecraftedu in Qt launcher but it shows that latest version is unavailable.

@dmitrmax dmitrmax added the enhancement New feature or request label Jan 22, 2023
@dmitrmax
Copy link
Author

Ok, I played with local version DB and increased build_sdk_version to 26, since Minecraft Education requires Android 8.0. I'm not expecting that it will work out of the box this time. I want to figure out problem points.

So, after I patched the sources, added latest version 1.18.45.0 to versiondb and set latest_version_beta to 1, I get no complaines from the Qt launcher, but APK url is not obtained. In the log I see:

http request: https://android.clients.google.com/fdfe/delivery?doc=com.mojang.minecraftedu&ot=1&vc=981804500&fdcf=1&fdcf=2, body = 
http response body: 
B�
�������y�
        ���
api response body = payload {
  deliveryResponse {
    status: 3
  }
}
serverMetadata {
  latencyMillis: 66
}

Also Google Play now identifies my DIY devices as compatible with this version of Minecraft. Any ideas why APK url is not obtained?

@dmitrmax
Copy link
Author

Also, I saw this issue minecraft-linux/linux-packaging-scripts#8

There was a discussion that minecraft education doesn't exists for x86, but since the launcher generates device abi as x86_64 and Play thinks that this device is compatible then I think it exists for this platform.

@ChristopherHX
Copy link
Member

ChristopherHX commented Jan 23, 2023

increased build_sdk_version to 26

Thanks for your tip, I figured out to purchase and download the edu version.

Mojang removed the chromebook restriction? last time I tried, I couldn't even purchase it.

api response body = payload {
deliveryResponse {
status: 3
}
}

Did you purchase it on the website? Yes it is free, but this launcher also cannot buy free games.

I got this error (code 3), before I finished purchasing minecraft edu for my android phone. (code 2 with too old build_sdk_version).

@ChristopherHX
Copy link
Member

Finally it fails to load the game, an expected result.

20:18:26 Info  [Launcher] Version: client 71971e4 / manifest f22b0a7
20:18:26 Info  [Launcher] CPU: GenuineIntel Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
20:18:26 Info  [Launcher] CPU supports SSSE3: YES
20:18:26 Trace [Launcher] Loading hybris libraries
20:18:26 Trace [REDIRECT] /data/data/com.mojang.minecraftpe to /home/christopher/mcpetest/
20:18:26 Trace [REDIRECT] /data/data/usr/local/proc/8822/cmdline to /home/christopher/mcpetest/
20:18:26 Trace [REDIRECT] /data/data/usr/local/bin/mcpelauncher-client to /home/christopher/mcpetest/
20:18:26 Trace [REDIRECT] /data/data to /home/christopher/mcpetest/
20:18:26 Trace [LinkerUtils] Loaded OS library libm.so.6
20:18:26 Trace [LinkerUtils] Loaded OS library libz.so.1
20:18:26 Trace [LinkerUtils] Loaded OS library /home/christopher/minecraft-linux/renderdragon/mcpelauncher-linux-bin/lib/native/x86_64/libfmod.so.12.0
20:18:26 Info  [Launcher] Loading gamepad mappings
20:18:26 Trace [Launcher] Loading gamepad mappings: /usr/local/share/mcpelauncher/gamecontrollerdb.txt
20:18:26 Trace [Launcher] Loading gamepad mappings: /usr/local/share//mcpelauncher/gamecontrollerdb.txt
20:18:26 Trace [Launcher] Loading gamepad mappings: /home/christopher/minecraft-linux/renderdragon/build.glfw/gamecontrollerdb/gamecontrollerdb.txt
20:18:26 Info  [Launcher] Creating window
20:18:26 Trace [Launcher] Loading Minecraft library
20:18:26 Error [MinecraftUtils] Failed to load Minecraft: dlopen failed: cannot locate symbol "in6addr_any" referenced by "/home/christopher/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/versions/1.18.45.0/lib/x86_64/libminecraftpe.so"...

@dmitrmax
Copy link
Author

Did you purchase it on the website? Yes it is free, but this launcher also cannot buy free games.

Damn, no! Thanks for a hint. Now, downloading.

@dmitrmax
Copy link
Author

20:18:26 Error [MinecraftUtils] Failed to load Minecraft: dlopen failed: cannot locate symbol "in6addr_any" referenced by "/home/christopher/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/versions/1.18.45.0/lib/x86_64/libminecraftpe.so"...

Am I right that this has to be added to libc_shim of launcher?

@ChristopherHX
Copy link
Member

Yes you are right about libc_shim, but even if you add it I came to the conclusion that I stripped to much in mcpelauncher-linker. Otherwise I cannot think why the list of missing symbols seem to contain symbols of the libminecraftpe.so.

Something is wrong in my android bionic linker port. As you said the target android version is much higher than of regular Minecraft for Android.
For a long list of symbol misses see attachment.

@dmitrmax
Copy link
Author

May I know how did you get this list? I could try to debug linker if I have time.

@ChristopherHX
Copy link
Member

Tell the linker to ignore missing symbols (assume all are weak and null is ok) and log them.

https://github.com/minecraft-linux/android_bionic/blob/9eec9d076113fca92408b875e14b131be3331d59/linker/linker_relocate.cpp#L119-L120
Comment these lines out and add a printf for sym_name, the crash will be delayed.

To make the linker verbose increase the value to a positive integer: https://github.com/minecraft-linux/android_bionic/blob/9eec9d076113fca92408b875e14b131be3331d59/linker/linker_main.cpp#L133

@dmitrmax
Copy link
Author

Something is wrong in my android bionic linker port. As you said the target android version is much higher than of regular Minecraft for Android.

I've reviewed all the changes you've made and found only one suspisous. Reverted it but it didn't help (

It seems that we need to rebase your changes onto more recent version of bionic. Do have any idea if this will trigger anything outside bionic in mcpelauncer-client?

@dmitrmax
Copy link
Author

No, I just found out that your branch starts with from tag platform-tools-29.0.6 which is a lot fresher that Android Oreo. Actually we have Android Q (10) as base.

I will look further.

@ChristopherHX
Copy link
Member

ChristopherHX commented Jan 24, 2023

You need to revert a change of mine to be like this

bool SymbolLookupLib::needs_sysv_lookup() const {
  return si_ != nullptr && (gnu_bloom_filter_ == nullptr /*|| si_->symbols.size() > 0*/);
}

The binary is optimized, sysv_lookup is not possible for all symbols.

Now you can start implementing these in libc-shim:

cannot locate symbol "in6addr_any" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libminecraftpe.so"
cannot locate symbol "__write_chk" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libminecraftpe.so"
cannot locate symbol "__sendto_chk" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libminecraftpe.so"
cannot locate symbol "__fread_chk" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libminecraftpe.so"
cannot locate symbol "fdatasync" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "environ" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "memrchr" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "abs" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wcstok" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wcschr" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wcsrchr" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wcsncpy" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wcsncmp" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "clock_getres" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "pthread_exit" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sem_trywait" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wcsncat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getgrouplist" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "fstatat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "ttyname" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "fchownat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "linkat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "mkdirat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getpriority" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "readlinkat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "renameat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "unlinkat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "symlinkat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "futimens" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "times" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "execve" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sched_getparam" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sched_rr_get_interval" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sched_setparam" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "__sched_cpualloc" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "__sched_cpufree" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sched_getaffinity" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "__sched_cpucount" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "grantpt" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "unlockpt" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "ptsname" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getgroups" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getlogin" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getpgid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "setpgrp" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wait" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "wait4" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "waitid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "waitpid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getsid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "setsid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "setpgid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "tcgetpgrp" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "tcsetpgrp" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "openat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "dup3" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "readv" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "pipe2" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "mkfifo" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "mknodat" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "mknod" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "posix_fallocate" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "posix_fadvise" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "fstatvfs" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "fpathconf" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getpwnam_r" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "__libc_current_sigrtmin" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "__libc_current_sigrtmax" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "setitimer" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "getitimer" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "siginterrupt" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "pthread_sigmask" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sigismember" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sigpending" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sigwait" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "pthread_getcpuclockid" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "timegm" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "sigaltstack" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "setrlimit" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libpython3.8.so"
cannot locate symbol "mkstemp" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libffi.so"
cannot locate symbol "lseek64" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libmaesdk.so"
cannot locate symbol "utimes" referenced by "mcpelauncher/versions/1.18.45.0/lib/x86_64/libmaesdk.so"

@dmitrmax
Copy link
Author

Wow, many thanks!

I'll be back... )

@GameParrot
Copy link
Contributor

GameParrot commented Feb 16, 2023

Minecraft Education Edition runs in wine, but is very buggy.

@ChristopherHX
Copy link
Member

@datemike972 Look here for some info https://github.com/orgs/mceelinux/discussions/1#discussioncomment-9956579,
And no it doesn't work.

There are also some screenshots hidden behind collapsible sections

@DannielManniel
Copy link

DannielManniel commented Oct 17, 2024

Bump, stuck playing Minecraft Education at school on my Steam Deck on waydroid because our chromebooks run it at 15 fps and have a battery life of 10 minutes while playing Minecraft. Even with gecko installed in winetricks, the login is broken, so wine is a no-go. And the waydroid version just sucks because well for one I have to have an android container that takes up 1.5 gigs just for Minecraft Education and also mouse-locking is broken on waydroid for some games (like Minecraft Education) so I can't use the trackpads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants
@dmitrmax @ChristopherHX @GameParrot @DannielManniel and others