Android port efforts

For people working on the C++ code.
sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

stormchaser3000 wrote:i have a proscan
Be more specific!
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
stormchaser3000
Member
Posts: 422
Joined: Sun Oct 06, 2013 21:02
GitHub: stormchaser3000

by stormchaser3000 » Post

sfan5 wrote:
stormchaser3000 wrote:i have a proscan
Be more specific!
ok but i don't know the specs of my system just a sec i will look it up

User avatar
stormchaser3000
Member
Posts: 422
Joined: Sun Oct 06, 2013 21:02
GitHub: stormchaser3000

by stormchaser3000 » Post

ok i think this is it: Proscan 7-Inch Tablet with Google Android 4.1 Jelly Bean, 1.2GHz Processor(appearently it goes slow as the dickens),

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

I checked out stu's github code onto my Ubuntu 13.10 AMD64 box. (I used openjdk-7 instead of 6 but followed most other instructions in build/android/README.txt.)

First issue: I get the following error message running build.sh:

Code: Select all

>> Applying irrlicht.patch
patching file include/IEventReceiver.h
patching file source/Irrlicht/Android/CIrrDeviceAndroid.cpp
Hunk #2 succeeded at 274 (offset 13 lines).
Hunk #3 succeeded at 284 (offset 13 lines).
Hunk #4 succeeded at 293 (offset 13 lines).
Hunk #5 FAILED at 292.
1 out of 5 hunks FAILED -- saving rejects to file source/Irrlicht/Android/CIrrDeviceAndroid.cpp.rej
It's still compiling, so we'll see...

EDIT: Now I get

Code: Select all

>> Building Minetest
Gdbserver      : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver
Install        : libMinetest.so => libs/armeabi/libMinetest.so
Gdbsetup       : libs/armeabi/gdb.setup
Buildfile: [...]/minetest/build/android/build.xml

BUILD FAILED
[...]/minetest/build/android/build.xml:13: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable.
I skipped the ADB step in the README, but followed everything else. Is running 'android update project' the right fix?

EDIT: NO, just had to define ANDROID_HOME env var.

Now I'm stuck at

Code: Select all

[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] [...]/android-sdk-linux/build-tools/19.0.1/aapt: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
EDIT: Which I solved with

Code: Select all

apt-get install lib32stdc++6
And now I apparently have successfully built the APK and I can load it into an Android 4.1 Nexus 7 emulator session. Unfortunately segfaults on the emulator. A problem for another day... (I wouldn't be surprised if it was related to the failed patch application -- there was quite a bit of code there)

EDIT: Here's some logcat

Code: Select all

V/Minetest(  762): Using system-wide paths (NOT RUN_IN_PLACE)
V/Minetest(  762): getting exe path
V/Minetest(  762): dstream
V/Minetest(  762): done
V/Minetest(  762): dstream
V/Minetest(  762): WARNING: system-wide share not found at "
V/Minetest(  762): /system/bin/../share/minetest
V/Minetest(  762): "
V/Minetest(  762): WARNING: system-wide share not found at "
V/Minetest(  762): /system/bin/..
V/Minetest(  762): "
V/Minetest(  762): something something minetest
V/Minetest(  762): /sdcard/minetest
F/libc    (  762): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 775 (org.minetest)
[snip]
I/DEBUG   (   33): backtrace:
I/DEBUG   (   33):     #00  pc 0072d16c  /data/data/org.minetest/lib/libMinetest.so (__sfvwrite+28)
I/DEBUG   (   33):     #01  pc 0073120c  /data/data/org.minetest/lib/libMinetest.so (fwrite+76)
I/DEBUG   (   33):     #02  pc 00370f18  /data/data/org.minetest/lib/libMinetest.so (porting::copyAssetDirectory(AAssetManager*, std::string)+480)

EDIT: OOH dopey error, forgot to add SD Card storage to the emulator. Now it runs but the result is a garbled menu (maybe OpenGL emulation in the emulator) that I can't interact with. None of the interaction works (probably the broken patch...) when I install to my phone, but at least the menus render correctly. I'm bowing out for tonight.

Sorry for the monologue, but maybe its useful to someone.
Last edited by spillz on Tue Feb 18, 2014 03:53, edited 1 time in total.

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

stormchaser3000 wrote:
sfan5 wrote:
stormchaser3000 wrote:i have a proscan
Be more specific!
ok but i don't know the specs of my system just a sec i will look it up
Rockchip Single Core 1.2 GHz Cortex A-8 ARM v7
Vivante GC800 OpenGL 3.0/2.0
512 MB DDR3 SDRAM

Google is your friend.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

spillz wrote:I checked out stu's github code onto my Ubuntu 13.10 AMD64 box. (I used openjdk-7 instead of 6 but followed most other instructions in build/android/README.txt.)

First issue: I get the following error message running build.sh:

Code: Select all

>> Applying irrlicht.patch
patching file include/IEventReceiver.h
patching file source/Irrlicht/Android/CIrrDeviceAndroid.cpp
Hunk #2 succeeded at 274 (offset 13 lines).
Hunk #3 succeeded at 284 (offset 13 lines).
Hunk #4 succeeded at 293 (offset 13 lines).
Hunk #5 FAILED at 292.
1 out of 5 hunks FAILED -- saving rejects to file source/Irrlicht/Android/CIrrDeviceAndroid.cpp.rej
Same problem here with the current svn sources, try using the pre-patched sources from here instead.

Code: Select all

cd deps
rm -r irrlicht
git clone https://github.com/freeminer/irrlicht-android.git irrlicht
Works for me ;-)

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

stu wrote:Same problem here with the current svn sources, try using the pre-patched sources from here instead.

Code: Select all

cd deps
rm -r irrlicht
git clone https://github.com/freeminer/irrlicht-android.git irrlicht
Works for me ;-)
Thx. I will try that. Anything that I can help with such as testing or features? I was going to try tweaking controls initially. Getting sound working is probably beyond me.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

spillz wrote:
stu wrote:Same problem here with the current svn sources, try using the pre-patched sources from here instead.

Code: Select all

cd deps
rm -r irrlicht
git clone https://github.com/freeminer/irrlicht-android.git irrlicht
Works for me ;-)
Thx. I will try that. Anything that I can help with such as testing or features? I was going to try tweaking controls initially. Getting sound working is probably beyond me.
You could try cherry picking some of the updates from the freeminer android branch (which this was originally based on)
My biggest problem right now is lack of native debugging (android issue: 58373)

Re. sound, I have been looking at the following two repos, though Ive not really had time to try anything yet.

https://github.com/AerialX/openal-soft-android
https://github.com/vincentjames501/libv ... gg-android

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

The new version works very well with the chat button - the keyboard can also be removed again without going back to the main screen first. All that's left to do there might be some additional controls (chat history, perhaps screenshot).

Unfortionately, fps have dropped compared to the first version. Now, I get around 1 fps at VanessaEs Vanilla server at spawn and can barely move there. Other areas are less problematic. Similar fps drops have occoured on the much more complex servers in the past with older versions of the desktop version. Even in other situations, fps now seem to be more around 20.
A list of my mods can be found here.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

Sokomine wrote:Unfortionately, fps have dropped compared to the first version. Now, I get around 1 fps at VanessaEs Vanilla server at spawn and can barely move there. Other areas are less problematic. Similar fps drops have occoured on the much more complex servers in the past with older versions of the desktop version. Even in other situations, fps now seem to be more around 20.
I don't think anything added recently should cause a drop in fps but then I was kinda thinking the same myself...
The only thing it can be, If anything, is the soft-keyboard workaround. I think, in future, the hide button should only be redirected for effected versions. Those using 4.1 or 4.2 will just have to use the home or recent apps button trick to get rid of the keyboard.

Edit: You could try restarting your device, for some reason that seems to help for me. (possibly leaking memory somewhere?)

Edit: Here is an experimental build using xyz's irrlicht fork and without the soft-keyboard patch

Removed! It was bugged anyway.

Note that hiding the keyboard will cause the app to crash under android versions 4.1 and 4.2
Last edited by stu on Wed Feb 19, 2014 23:09, edited 1 time in total.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

New build: Minetest-debug.apk

Incorporated some updates from the freeminer android branch

Fixed lighting and some UI improvements (still needs some work with this stupid keyboard issue)
Last edited by stu on Wed Feb 19, 2014 23:18, edited 1 time in total.

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

stu wrote:New build: Minetest-debug.apk

Incorporated some updates from the freeminer android branch

Fixed lighting and some UI improvements (still needs some work with this stupid keyboard issue)



Good stuff. Can now get the "escape menu" on the Galaxy Note 2, which is nice. Got crash on exit though. I think I bought up the chat menu but not sure how and no keyboard.

Still have issue that screen needs new touch input to maintain an interaction (e.g. walking, punching). E.g. punching stops unless I move my finger a little as I do it.

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

spillz wrote:Got crash on exit though.
I do too, seems to have something to do with server disconnection.
spillz wrote:I think I bought up the chat menu but not sure how and no keyboard.
I am guessing that you can't see the chat bubble in the upper right corner of your screen?
If not then delete your current sdcard/minetest dir and run the app again.
Note that it will take longer to load and you will lose any settings.

If you wanted, however, you could simply copy in the missing cpad image ;-)
Last edited by stu on Thu Feb 20, 2014 00:54, edited 1 time in total.

User avatar
stormchaser3000
Member
Posts: 422
Joined: Sun Oct 06, 2013 21:02
GitHub: stormchaser3000

by stormchaser3000 » Post

crashes instantly

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

stormchaser3000 wrote:crashes instantly
Without any debug info I can only guess that you have the same problem as VanessaE, I will look into this some more over the weekend.

Meanwhile, in the latest build, I have gone back to the original short-tap for right click / placement, though I think we do still need to have a button for left click / digging. I am mostly thinking of FPS mods like firearms but I'm sure there will be other cases where long press digging will be problematic.

User avatar
stormchaser3000
Member
Posts: 422
Joined: Sun Oct 06, 2013 21:02
GitHub: stormchaser3000

by stormchaser3000 » Post

stu wrote:
stormchaser3000 wrote:crashes instantly
Without any debug info I can only guess that you have the same problem as VanessaE, I will look into this some more over the weekend.

Meanwhile, in the latest build, I have gone back to the original short-tap for right click / placement, though I think we do still need to have a button for left click / digging. I am mostly thinking of FPS mods like firearms but I'm sure there will be other cases where long press digging will be problematic.
ok um then how on earth do i run minetest with the adb logcat command

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

Updated

I've added some buttons for freemove, drop and debug info (F5), their visibility can be toggled using the 'double ellipsis' button in the bottom right corner.

Image

Unfortunately, without proper debugging, this is as about as far as I can take this for now. I hope that we can get an official repo sometime soon where I can just submit PR's and report issues.

If any of my humble additions can be of any use to an official release, licencing is as follows.

Source code: Same as Minetest
Textures: CC-BY-SA (All 100% my own work)
Last edited by stu on Wed Feb 26, 2014 00:00, edited 1 time in total.

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

by philipbenr » Post

stu wrote:Updated

I've added some buttons for freemove, drop and debug info (F5), their visibility can be toggled using the 'double ellipsis' button in the bottom right corner.

http://i.imgur.com/ijt5U8a.png

Unfortunately, without proper debugging, this is as about as far as I can take this for now. I hope that we can get an official repo sometime soon where I can just submit PR's and report issues.

If any of my humble additions can be of any use to an official release, licencing is as follows.

Source code: Same as Minetest
Textures: CC-BY-SA (All 100% my own work)
This is really great work stu! I have a feeling you really made Minetest portable possible much earlier than most people expected. I hope this will flourish. ;) +1

User avatar
stormchaser3000
Member
Posts: 422
Joined: Sun Oct 06, 2013 21:02
GitHub: stormchaser3000

by stormchaser3000 » Post

resay: ok um then how on earth do i run minetest with the adb logcat command

spillz
Member
Posts: 138
Joined: Thu Feb 13, 2014 05:11

by spillz » Post

stormchaser3000 wrote:resay: ok um then how on earth do i run minetest with the adb logcat command
To get adb you need to fully install android SDK on your PC - Google it.. adb is one of the command line tools in the SDK and you can use it to talk to the phone/tablet via USB (after enabling developer options and USB debugging in your phone settings - Google it). When you run adb logcat you will see on your PC the live debug messages being generated on your phone (or you can dump the output to a file). So you can run logcat on your PC then start Minetest on the phone/tablet and you should get a dump of minetest debug messages and any crash messages.
Last edited by spillz on Tue Feb 25, 2014 03:36, edited 1 time in total.

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

by MoNTE48 » Post

Hi guys! I found a few bugs.
* does not load the list of public servers and mods;
* 't save settings;
* how to fly?
* I wanted to add your own textures, but they are not unpacked. I thought, you can write java script unpacking/scanning of files, then running the game. It would be easier and the progress bar is needed!
* languages. The game in English, regardless of the system language.
MultiCraft Open Sourсe – https://github.com/MultiCraft

sfan5
Moderator
Posts: 4095
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Martin_Devil wrote:* does not load the list of public servers and mods;
stu needs to compile with CURL support
Martin_Devil wrote:* languages. The game in English, regardless of the system language.
stu needs to compile with GETTEXT support, additionally there needs to be code to set the ui language to the system language.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

MoNTE48
Member
Posts: 323
Joined: Sat Apr 06, 2013 11:58
GitHub: MoNTE48
In-game: MoNTE48
Location: Internet

by MoNTE48 » Post

You can compile Minetest to meet these requirements?
MultiCraft Open Sourсe – https://github.com/MultiCraft

User avatar
stu
Member
Posts: 923
Joined: Sat Feb 02, 2013 02:51
GitHub: stujones11
Location: United Kingdom

by stu » Post

philipbenr wrote: This is really great work stu! I have a feeling you really made Minetest portable possible much earlier than most people expected. I hope this will flourish. ;) +1
Thanks, though the real credit should go to xyz, all I've really done is add a few icons and make an apk.
sfan5 wrote:
Martin_Devil wrote:* does not load the list of public servers and mods;
stu needs to compile with CURL support
Martin_Devil wrote:* languages. The game in English, regardless of the system language.
stu needs to compile with GETTEXT support, additionally there needs to be code to set the ui language to the system language.
While I can get it to build fine with cURL support, it crashes the moment I try to show the public server list.

LogCat output is not really helpful to me https://gist.github.com/stujones11/9219104

regarding GETTEXT, I am not sure that is even possible?

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

by Sokomine » Post

stu wrote: I've added some buttons for freemove, drop and debug info (F5), their visibility can be toggled using the 'double ellipsis' button in the bottom right corner.
A new binary would be great! Compiling for Android isn't that easy...
A list of my mods can be found here.

Locked

Who is online

Users browsing this forum: No registered users and 5 guests