Light Style© by Fisana

Jump to content


Android port


  • Please log in to reply
271 replies to this topic

#161 gameboy

gameboy

    Duplicarius

  • Community Members
  • PipPipPip
  • 322 posts

Posted 26 February 2012 - 12:50 PM

The development of different resolution can be achieved according to each of the different resolutions of the mobile platform?
The game automatically adjusts the resolution, in different mobile devices? Such as: the Galaxy S II screen resolution is 800 * 480, if the game can automatically support it (the game can automatically adjust the resolution).
thank you
  • 0

#162 evanssthomas

evanssthomas

    Discens

  • WFG Retired
  • 19 posts

Posted 26 February 2012 - 03:17 PM

I built public.zip, updated the source code and rebuilt it - tried everything you said, but still couldn't get it to work. Logcat doesn't seem to give much useful info other than that it crashed. I've attached the logs but I'm not sure if it will be of much use. I'm running it on a Samsung Galaxy R which has processing power comparable to the SGS2 (With a different processor family, though).

@Brian - Good to know that you remember! Yeah, I regularly follow development and always have my source code up to date :) Really wish I could still contribute, but don't find time to do it. Work it hectic as it is. The Android port will probably help provide the motivation I need to find time to start contributing again (I'm really into Android these days).

Attached Files

  • Attached File  log.txt   25.22KB   310 downloads

  • 0
Evans Thomas

Wildfire Games
evans@evanst.com

#163 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 26 February 2012 - 05:26 PM

That says:

I/DEBUG   (21117): Build fingerprint: 'samsung/GT-I9103/GT-I9103:2.3.5/GINGERBREAD/XWKI5:user/release-keys'
I/DEBUG   (21117): pid: 22328, tid: 22337  >>> org.libsdl.app <<<
I/DEBUG   (21117): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 823ed560
I/DEBUG   (21117):  r0 00082c20  r1 00000000  r2 00000001  r3 82c20e28
I/DEBUG   (21117):  r4 82c002ac  r5 0000010f  r6 00000004  r7 480e89c8
I/DEBUG   (21117):  r8 480e8b40  r9 40086fb8  10 40086fa4  fp 802a5374
I/DEBUG   (21117):  ip 82c00390  sp 480e89c8  lr 823ed4e7  pc 823ed560  cpsr 20000030
[...]
I/DEBUG   (21117):          #00  pc 003ed560  /data/local/libpyrogenesis_dbg.so
I/DEBUG   (21117):          #01  lr 823ed4e7  /data/local/libpyrogenesis_dbg.so
I/DEBUG   (21117): 
I/DEBUG   (21117): code around pc:
I/DEBUG   (21117): 823ed540 00001608 b085b590 4c2aaf00 6078447c 
I/DEBUG   (21117): 823ed550 58e34b29 60fb681b eeff687b edc30b00 
I/DEBUG   (21117): 823ed560 687b0b10 0200f04f 687b60da 0200f04f 
I/DEBUG   (21117): 823ed570 687b611a 0200f04f 687b615a 4b1f681a 
I/DEBUG   (21117): 823ed580 681b447b 46194610 e18ef20d 46184603
[...]
I/DEBUG   (21117): stack:
[...]
I/DEBUG   (21117): #00 480e89c8  00000004  
[...]
I/DEBUG   (21117):     480e89e4  823ed4e7  /data/local/libpyrogenesis_dbg.so
[...]
I/DEBUG   (21117):     480e8a0c  823ef25f  /data/local/libpyrogenesis_dbg.so
so to (hopefully) see where it's failing, run

~/android/toolchain-0ad/bin/arm-linux-androideabi-addr2line -e binaries/system/libpyrogenesis_dbg.so 003ed560
~/android/toolchain-0ad/bin/arm-linux-androideabi-addr2line -e binaries/system/libpyrogenesis_dbg.so 003ed4e7
~/android/toolchain-0ad/bin/arm-linux-androideabi-addr2line -e binaries/system/libpyrogenesis_dbg.so 003ef25f
(pc is current function, lr is caller, and any line after #00 in the stack that's labelled with the .so name is probably part of the call stack. You need to mask off the leading "82" in the addresses because the code was relocated at runtime, I think.)

Since this is an ILL_ILLOPC (illegal opcode), I think it's most likely due to differences in CPU. Galaxy R apparently uses Tegra 2, which is Cortex-A9 (like Galaxy S2) but without NEON (unlike Galaxy S2), and the game is compiled to assume NEON support. Try editing build/premake/premake4.lua and remove the "-mfpu=neon", and also edit build/android/setup-libs.sh to remove the "-mfpu=neon", then clean and rebuild everything, and it might be happier.

(In particular, the instruction just before the pc (i.e. the one whose execution triggered the exception, if I understand this correctly) is "edc30b00", which is "vstr d16, [r3, #64]" and therefore requires NEON support, so that seems a plausible explanation. Edit: Oops, I keep getting confused by endianness. The vstr is actually "edc3 0b10", and the problem is more likely the earlier "eeff 0b00 fconstd d16, #240" starting at 823ed55a, though I don't understand quite how the reported pc value (6 bytes later) relates to that.)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#164 evanssthomas

evanssthomas

    Discens

  • WFG Retired
  • 19 posts

Posted 26 February 2012 - 09:15 PM

Thanks a ton for your help Philip, but it still isn't working :(

Now I'm getting a different error:


I/DEBUG   (26951): Build fingerprint: 'samsung/GT-I9103/GT-I9103:2.3.5/GINGERBREAD/XWKI5:user/release-keys'
I/DEBUG   (26951): pid: 27139, tid: 27148  >>> org.libsdl.app <<<
I/DEBUG   (26951): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG   (26951):  r0 00000027  r1 deadbaad  r2 80000000  r3 00000000
I/DEBUG   (26951):  r4 00000001  r5 00000000  r6 00000001  r7 afd42718
I/DEBUG   (26951):  r8 48109b40  r9 442b9fb8  10 442b9fa4  fp 802a5374
I/DEBUG   (26951):  ip afd466c8  sp 48108910  lr afd19711  pc afd161e0  cpsr 60000030
I/DEBUG   (26951):  d0  3f80000000000000  d1  40dfae1400000000
I/DEBUG   (26951):  d2  be5acaf22c836220  d3  4014000000000000
I/DEBUG   (26951):  d4  3fe00000001ec5bd  d5  4187e02ec0000000
I/DEBUG   (26951):  d6  4000668b9fdbd2fa  d7  4000668b9fdbd2fa
I/DEBUG   (26951):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   (26951):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   (26951):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   (26951):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   (26951):  scr 20000010
I/DEBUG   (26951): 
I/DEBUG   (26951):          #00  pc 000161e0  /system/lib/libc.so
I/DEBUG   (26951):          #01  lr afd19711  /system/lib/libc.so
I/DEBUG   (26951): 
I/DEBUG   (26951): code around pc:
I/DEBUG   (26951): afd161c0 2c006824 e028d1fb b13368db c064f8df 
I/DEBUG   (26951): afd161d0 44fc2401 4000f8cc 49124798 25002027 
I/DEBUG   (26951): afd161e0 f7f57008 2106ea16 eb8af7f6 460aa901 
I/DEBUG   (26951): afd161f0 f04f2006 95015380 95029303 eef0f7f5 
I/DEBUG   (26951): afd16200 462aa905 f7f52002 f7f5eefc 2106ea02 
I/DEBUG   (26951): 
I/DEBUG   (26951): code around lr:
I/DEBUG   (26951): afd196f0 4a0e4b0d e92d447b 589c41f0 26004680 
I/DEBUG   (26951): afd19700 686768a5 f9b5e006 b113300c 47c04628 
I/DEBUG   (26951): afd19710 35544306 37fff117 6824d5f5 d1ef2c00 
I/DEBUG   (26951): afd19720 e8bd4630 bf0081f0 00027e6c ffffff88 
I/DEBUG   (26951): afd19730 b086b570 f602fb01 9004460c a804a901 
I/DEBUG   (26951): 
I/DEBUG   (26951): stack:
I/DEBUG   (26951):     481088d0  afd426c4  
I/DEBUG   (26951):     481088d4  000a5d40  
I/DEBUG   (26951):     481088d8  0000002b  
I/DEBUG   (26951):     481088dc  afd187d9  /system/lib/libc.so
I/DEBUG   (26951):     481088e0  afd42664  
I/DEBUG   (26951):     481088e4  afd46838  
I/DEBUG   (26951):     481088e8  00000000  
I/DEBUG   (26951):     481088ec  afd19711  /system/lib/libc.so
I/DEBUG   (26951):     481088f0  00000001  
I/DEBUG   (26951):     481088f4  48108924  
I/DEBUG   (26951):     481088f8  00000001  
I/DEBUG   (26951):     481088fc  afd42718  
I/DEBUG   (26951):     48108900  48109b40  
I/DEBUG   (26951):     48108904  afd18a33  /system/lib/libc.so
I/DEBUG   (26951):     48108908  df002777  
I/DEBUG   (26951):     4810890c  e3a070ad  
I/DEBUG   (26951): #00 48108910  00000001  
I/DEBUG   (26951):     48108914  afd18825  /system/lib/libc.so
I/DEBUG   (26951):     48108918  0000000a  
I/DEBUG   (26951):     4810891c  afd1cd37  /system/lib/libc.so
I/DEBUG   (26951):     48108920  afd42670  
I/DEBUG   (26951):     48108924  fffffbdf  
I/DEBUG   (26951):     48108928  442b9fb8  
I/DEBUG   (26951):     4810892c  afd42670  
I/DEBUG   (26951):     48108930  82a6cdc4  /data/local/libpyrogenesis_dbg.so
I/DEBUG   (26951):     48108934  813a58c8  /data/data/org.libsdl.app/lib/libSDL2.so
I/DEBUG   (26951):     48108938  00493530  
I/DEBUG   (26951):     4810893c  00000000  
I/DEBUG   (26951):     48108940  00493588  
I/DEBUG   (26951):     48108944  00493530  
I/DEBUG   (26951):     48108948  82c002ac  
I/DEBUG   (26951):     4810894c  00493588  
I/DEBUG   (26951):     48108950  48108980  
I/DEBUG   (26951):     48108954  813a4dc8  /data/data/org.libsdl.app/lib/libSDL2.so

  • 0
Evans Thomas

Wildfire Games
evans@evanst.com

#165 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 27 February 2012 - 12:48 PM

It might be useful to know the lines logged by the engine before it crashes - it's possible that it's reporting an error and then abort()ing. Otherwise, addr2line might help - give it libpyrogenesis_dbg.so and address "00a6cdc4" (from the stack), and also get a copy of your /system/lib/libc.so (I think "adb pull" should be able to do that) and run addr2line with libc.so and maybe addresses "000161e0" and "00019711" and "00018a33" and "00018825" and "0001cd37".
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#166 gameboy

gameboy

    Duplicarius

  • Community Members
  • PipPipPip
  • 322 posts

Posted 02 March 2012 - 12:32 PM

We need a good version of the Android 0 AD will be when completed it?
  • 0

#167 ribez

ribez

    Duplicarius

  • Community Members
  • PipPipPip
  • 282 posts

Posted 02 March 2012 - 05:11 PM

We need a good version of the Android 0 AD will be when completed it?


http://www.wildfireg...ndpost&p=234288
  • 0

#168 evanssthomas

evanssthomas

    Discens

  • WFG Retired
  • 19 posts

Posted 05 March 2012 - 03:32 PM

It might be useful to know the lines logged by the engine before it crashes - it's possible that it's reporting an error and then abort()ing. Otherwise, addr2line might help - give it libpyrogenesis_dbg.so and address "00a6cdc4" (from the stack), and also get a copy of your /system/lib/libc.so (I think "adb pull" should be able to do that) and run addr2line with libc.so and maybe addresses "000161e0" and "00019711" and "00018a33" and "00018825" and "0001cd37".


I haven't had a chance to try it out. I'll let you know when I get time to check it out.

Thanks!
  • 0
Evans Thomas

Wildfire Games
evans@evanst.com

#169 Pickle

Pickle

    Tiro

  • Community Newbie
  • 2 posts

Posted 16 March 2012 - 02:14 PM

Hi ive had my eye on this project for a while, but never jumped into it because the system requirements. But seeing what has progessed on the android has caught my attention.
I would like to try to give the work on the andriod version a try on the pandora (a portable linux based handheld). It has very similar hardware to some mobile phones.
My version has 256 mb ram (current builds will have 512 mb ram). It supports GLES2.
Pandora would certainly be ideal mobile device given that it has superior controls to anything out there. Meaning touchscreen, qwerty keyboard, game buttons, analog nubs.

What I would like to know is at what point in the svn i should target, i.e. is the latest stuff in the trunk or on some branch.
Reviewing this thread i saw talk about both SDL 1.2 and SDL 1.3, which is needed? Pandora can support either, although I would need to see if the latest SDL 1.3 state is in.
Are there any special things I should do for data? I saw some talk about precalced models and stuff.
  • 0

#170 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 16 March 2012 - 04:48 PM

There are no branches, so you should use the latest SVN trunk code. SDL 1.3 got renamed to 2.0, and 1.2 doesn't support touchscreens, so you should use 2.0. For data, you should do the archivebuild thing from #155. This whole Android support is pretty rough so it probably won't work trivially, but hopefully it'll be possible to get something running :)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#171 Pickle

Pickle

    Tiro

  • Community Newbie
  • 2 posts

Posted 16 March 2012 - 04:59 PM

There are no branches, so you should use the latest SVN trunk code. SDL 1.3 got renamed to 2.0, and 1.2 doesn't support touchscreens, so you should use 2.0. For data, you should do the archivebuild thing from #155. This whole Android support is pretty rough so it probably won't work trivially, but hopefully it'll be possible to get something running :)


Trunk it is then ;-)

Pandora's touchsreen is accessed through tslib (X input might be inbetween) which SDL 1.2 recognizes as absolute mouse input. Our SDL 2 port( 1.3 at the time) is missing control support last i tried. But I can start with either for video at least. Are both SDL versions supported?

I will be sure to let you know how it goes once I have some time to start working on it. Thanks for the pointers.

Edit: One other thing i wanted to mention, i saw some comments about needed to convert OpenAL, are you aware of the OpenAL-Soft project?
http://kcat.stranges...net/openal.html
This should be able to support any openAL funationality 0 ad uses.

Edited by Pickle, 16 March 2012 - 05:12 PM.

  • 0

#172 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 16 March 2012 - 05:23 PM

The game should build fine with 1.2 or recent 1.3/2.0 (we use 1.2 on standard desktop Linux).

We run with OpenAL-Soft on Windows, so it does support what we need, but I don't think anyone has seriously examined audio support for Android yet, so I don't know if that'd be a good solution or not. Probably worth looking into.
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#173 Scrivener

Scrivener

    Tiro

  • Community Newbie
  • 1 posts

Posted 07 April 2012 - 02:55 PM

Hey folks,

First post here, and I have no real coding experience (some Python, Ruby, Bash for sysadmin work), but the prospect of an Android port appeals to me greatly. Once I'm home with a little free time, I'll try to build it on my Asus Transformer Prime and get back to you. I figured, if nothing else, I could offer services and a modern Android device for development/alpha testing and documentation! And I'll probably learn a lot along the way.

I have more to read about the research you guys did into gesture controls (I haven't completely read the whole thread yet), but have a few ideas for intuitive navigation of the interface, and would also be interested in seeing keyboard/mouse controls available for those of us with Transformers Tablets In Disguise ;)

As a suggestion on how to make money with the release, you don't need to close the source, sell based on branding, or any other such thing. Try just making the first fully functional .apk of the game available through a Humble Bundle release. :) Humble Bundle has already done 2 successful Android-specific bundles, and something as impressive as a fully completed 0ad port to Android would be a sure draw. Release it later either by your own means as a pay-what-you-want, or free on the Android market with a donation version available. We open source folks are generous! Test us!
  • 0

#174 mpatton

mpatton

    Tiro

  • Community Members
  • 6 posts

Posted 30 April 2012 - 05:43 PM

Hi all,

I wanted to test out some mods ive made to 0a.d. on andriod... Is there steps to compiling 0a.d. for andriod on windows or is it only setup for linux @ this stage?

thnaks in advance
Michael
  • 0

#175 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 30 April 2012 - 08:20 PM

Building for Android will only ever be possible on Linux. (I updated the instructions here recently to use the various build scripts that I added some time ago, but it's still far from step-by-step instructions and is only suitable for people who are comfortable with debugging the build process and code themselves.)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#176 abral

abral

    Discens

  • Community Members
  • Pip
  • 11 posts

Posted 05 May 2012 - 01:21 PM

The work to do the Android port could be also useful to port the game to JavaScript.
Emscripten (https://github.com/kripken/emscripten) can translate C++ code to JavaScript using the LLVM compiler, and it can translate OpenGL ES (at least a subset) to WebGL.
For example, there's a project about porting Sauerbraten (http://sauerbraten.org/): https://github.com/k...en/BananaBread/
  • 0

#177 madmax

madmax

    Sesquiplicarius

  • Community Members
  • PipPip
  • 165 posts

Posted 13 May 2012 - 05:29 AM

ok I am trying to compile the game on my samsung galaxy S plus: model number GTI9001 on Ubuntu 12.04 running inside virtual box.

I am following the instructions here : http://trac.wildfire...ndenciesandgame

I get an error at this instruction:

Then build SDL and the .apk (the installable application that invokes the external game engine code):
cd build/android/sdl-project/
make


abhi@abhivb:~/android/0ad-game/build/android/sdl-project/jni/SDL$ cd ../..
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$ make
/home/abhi/android/android-ndk-r7-crystax-5.beta2/ndk-build
make: /home/abhi/android/android-ndk-r7-crystax-5.beta2/ndk-build: Command not found
make: *** [libs/armeabi/libmain.so] Error 127
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$

So I havent reached the Crystax NDK install stage yet, why is make asking for it now ? Am I not building SDL correctly ? I do have SDL cloned properly but I am not sure how to
go ahead with building it and in which folder.


----------------------------

Well I went ahead and tried to install the dependencies from this instruction:

(Dependency checking is probably broken, so run "make clean" if you need to rebuild after changing stuff.)


Then install all the dependencies:

cd build/android/
./setup-libs.sh


It got and I guess installed few of the dependencies but then I suddenly got an error :

2012-05-12 22:32:36 (1.07 MB/s) - `libpng-1.5.8.tar.xz' saved [701716/701716]
--2012-05-12 22:32:36--  ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz
		   => `libxml2-2.7.8.tar.gz'
Resolving xmlsoft.org (xmlsoft.org)... 176.31.99.103
Connecting to xmlsoft.org (xmlsoft.org)|176.31.99.103|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.	==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /libxml2 ... done.
==> SIZE libxml2-2.7.8.tar.gz ... 4881808
==> PASV ... done.	==> RETR libxml2-2.7.8.tar.gz ... done.
Length: 4881808 (4.7M) (unauthoritative)
100%[===========================================================>] 4,881,808	937K/s   in 6.4s  
2012-05-12 22:32:45 (742 KB/s) - `libxml2-2.7.8.tar.gz' saved [4881808]
~/android/0ad-game/build/android
rm: cannot remove `/home/abhi/android/toolchain-0ad': No such file or directory
./setup-libs.sh: line 68: /home/abhi/android/android-ndk-r7-crystax-5.beta2/build/tools/make-standalone-toolchain.sh: No such file or directory
abhi@abhivb:~/android/0ad-game/build/android$

I am familiar with building in Linux, so I think I should be able to complete the steps with a little bit of help regarding the order of things here. Have I messed up my
build folder already :P ?

Edited by madmax, 13 May 2012 - 05:39 AM.

  • 0

#178 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 13 May 2012 - 11:33 AM

Looks like I accidentally removed the NDK build instructions. I added that back which will hopefully help :)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com

#179 madmax

madmax

    Sesquiplicarius

  • Community Members
  • PipPip
  • 165 posts

Posted 13 May 2012 - 07:12 PM

ok we are making progress now.

Here is the latest :

abhi@abhivb:~/android$ cd 0ad-game/
abhi@abhivb:~/android/0ad-game$ cd build/android/sdl-project/
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$ make
/home/abhi/android/android-ndk-r7-crystax-5.beta2/ndk-build
make[1]: Entering directory `/home/abhi/android/0ad-game/build/android/sdl-project'
Gdbserver	  : [arm-linux-androideabi-4.6.3] libs/armeabi/gdbserver
Gdbsetup	   : libs/armeabi/gdb.setup
Compile thumb  : SDL2 <= SDL_assert.c
Compile thumb  : SDL2 <= SDL.c
Compile thumb  : SDL2 <= SDL_error.c
Compile thumb  : SDL2 <= SDL_fatal.c
Compile thumb  : SDL2 <= SDL_hints.c
Compile thumb  : SDL2 <= SDL_log.c
Compile thumb  : SDL2 <= SDL_audio.c
Compile thumb  : SDL2 <= SDL_audiocvt.c
Compile thumb  : SDL2 <= SDL_audiodev.c
Compile thumb  : SDL2 <= SDL_audiotypecvt.c
Compile thumb  : SDL2 <= SDL_mixer.c
Compile thumb  : SDL2 <= SDL_wave.c
Compile thumb  : SDL2 <= SDL_androidaudio.c
Compile thumb  : SDL2 <= SDL_dummyaudio.c
Compile thumb  : SDL2 <= SDL_atomic.c
Compile arm	: SDL2 <= SDL_spinlock.c
Compile++ thumb  : SDL2 <= SDL_android.cpp
Compile thumb  : SDL2 <= SDL_cpuinfo.c
Compile thumb  : SDL2 <= SDL_clipboardevents.c
Compile thumb  : SDL2 <= SDL_dropevents.c
Compile thumb  : SDL2 <= SDL_events.c
Compile thumb  : SDL2 <= SDL_gesture.c
Compile thumb  : SDL2 <= SDL_keyboard.c
Compile thumb  : SDL2 <= SDL_mouse.c
Compile thumb  : SDL2 <= SDL_quit.c
Compile thumb  : SDL2 <= SDL_touch.c
Compile thumb  : SDL2 <= SDL_windowevents.c
Compile thumb  : SDL2 <= SDL_rwops.c
Compile thumb  : SDL2 <= SDL_haptic.c
Compile thumb  : SDL2 <= SDL_syshaptic.c
Compile thumb  : SDL2 <= SDL_joystick.c
Compile thumb  : SDL2 <= SDL_sysjoystick.c
Compile thumb  : SDL2 <= SDL_sysloadso.c
Compile thumb  : SDL2 <= SDL_power.c
Compile thumb  : SDL2 <= SDL_render.c
Compile thumb  : SDL2 <= SDL_yuv_mmx.c
Compile thumb  : SDL2 <= SDL_yuv_sw.c
Compile thumb  : SDL2 <= SDL_render_d3d.c
Compile thumb  : SDL2 <= SDL_libgl2D.c
Compile thumb  : SDL2 <= SDL_ndsrender.c
Compile thumb  : SDL2 <= SDL_render_gles2.c
Compile thumb  : SDL2 <= SDL_shaders_gles2.c
Compile thumb  : SDL2 <= SDL_render_gles.c
Compile thumb  : SDL2 <= SDL_render_gl.c
Compile thumb  : SDL2 <= SDL_shaders_gl.c
Compile thumb  : SDL2 <= SDL_blendfillrect.c
Compile thumb  : SDL2 <= SDL_blendline.c
Compile thumb  : SDL2 <= SDL_blendpoint.c
Compile thumb  : SDL2 <= SDL_drawline.c
Compile thumb  : SDL2 <= SDL_drawpoint.c
Compile thumb  : SDL2 <= SDL_render_sw.c
Compile thumb  : SDL2 <= SDL_getenv.c
Compile thumb  : SDL2 <= SDL_iconv.c
Compile thumb  : SDL2 <= SDL_malloc.c
Compile thumb  : SDL2 <= SDL_qsort.c
Compile thumb  : SDL2 <= SDL_stdlib.c
Compile thumb  : SDL2 <= SDL_string.c
Compile thumb  : SDL2 <= SDL_thread.c
Compile thumb  : SDL2 <= SDL_syscond.c
Compile thumb  : SDL2 <= SDL_sysmutex.c
Compile thumb  : SDL2 <= SDL_syssem.c
Compile thumb  : SDL2 <= SDL_systhread.c
Compile thumb  : SDL2 <= SDL_timer.c
Compile thumb  : SDL2 <= SDL_systimer.c
Compile thumb  : SDL2 <= SDL_blit_0.c
Compile thumb  : SDL2 <= SDL_blit_1.c
Compile thumb  : SDL2 <= SDL_blit_A.c
Compile thumb  : SDL2 <= SDL_blit_auto.c
Compile thumb  : SDL2 <= SDL_blit.c
Compile thumb  : SDL2 <= SDL_blit_copy.c
Compile thumb  : SDL2 <= SDL_blit_N.c
Compile thumb  : SDL2 <= SDL_blit_slow.c
Compile thumb  : SDL2 <= SDL_bmp.c
Compile thumb  : SDL2 <= SDL_clipboard.c
Compile thumb  : SDL2 <= SDL_fillrect.c
Compile thumb  : SDL2 <= SDL_pixels.c
Compile thumb  : SDL2 <= SDL_rect.c
Compile thumb  : SDL2 <= SDL_RLEaccel.c
Compile thumb  : SDL2 <= SDL_shape.c
Compile thumb  : SDL2 <= SDL_stretch.c
Compile thumb  : SDL2 <= SDL_surface.c
Compile thumb  : SDL2 <= SDL_video.c
Compile thumb  : SDL2 <= SDL_androidevents.c
Compile thumb  : SDL2 <= SDL_androidgl.c
Compile thumb  : SDL2 <= SDL_androidkeyboard.c
Compile thumb  : SDL2 <= SDL_androidtouch.c
Compile thumb  : SDL2 <= SDL_androidvideo.c
Compile thumb  : SDL2 <= SDL_androidwindow.c
StaticLibrary  : libcrystax.a
Prebuilt	   : libcrystax_static.a <= <NDK>/sources/crystax/libs/armeabi/4.6.3/
Prebuilt	   : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/libs/armeabi/4.6.3/
SharedLibrary  : libSDL2.so
Install		: libSDL2.so => libs/armeabi/libSDL2.so
Compile++ thumb  : main <= SDL_android_main.cpp
Compile++ thumb  : main <= pyrogenesis_wrapper.cpp
SharedLibrary  : libmain.so
Install		: libmain.so => libs/armeabi/libmain.so
make[1]: Leaving directory `/home/abhi/android/0ad-game/build/android/sdl-project'
mkdir -p lib/armeabi
cp libs/armeabi/libmain.so libs/armeabi/libSDL2.so lib/armeabi/
/home/abhi/android/android-sdk-linux/platform-tools/aapt package -f -F bin/0ad.unaligned.apk -M AndroidManifest.xml -S bin/res -S res -I /home/abhi/android/android-sdk-linux/platforms/android-10/android.jar
zip bin/0ad.unaligned.apk -j bin/classes.dex
  adding: classes.dex (deflated 50%)
zip bin/0ad.unaligned.apk -r lib
  adding: lib/ (stored 0%)
  adding: lib/armeabi/ (stored 0%)
  adding: lib/armeabi/libSDL2.so (deflated 69%)
  adding: lib/armeabi/libmain.so (deflated 44%)
jarsigner -keystore /home/abhi/.android/debug.keystore -storepass android bin/0ad.unaligned.apk androiddebugkey
jarsigner error: java.lang.RuntimeException: keystore load: /home/abhi/.android/debug.keystore (No such file or directory)
make: *** [bin/0ad.unaligned.apk] Error 1
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$

-------------------------------------

Hmm well anyway, now if I go into ~/android/0ad-game/build/android/sdl-project and tyoe make I get :

abhi@abhivb:~/android/0ad-game/build/android/sdl-project$ make
make: Nothing to be done for `all'.
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$

So the build did succeed !!

I did a make clean and tried make again, again I got the same jarsign error thing.
This time I run make after I get the error and I get :

zip bin/0ad.unaligned.apk -r lib
  adding: lib/ (stored 0%)
  adding: lib/armeabi/ (stored 0%)
  adding: lib/armeabi/libSDL2.so (deflated 69%)
  adding: lib/armeabi/libmain.so (deflated 44%)
jarsigner -keystore /home/abhi/.android/debug.keystore -storepass android bin/0ad.unaligned.apk androiddebugkey
jarsigner error: java.lang.RuntimeException: keystore load: /home/abhi/.android/debug.keystore (No such file or directory)
make: *** [bin/0ad.unaligned.apk] Error 1
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$ make
/home/abhi/android/android-sdk-linux/tools/zipalign 4 bin/0ad.unaligned.apk bin/0ad.apk
abhi@abhivb:~/android/0ad-game/build/android/sdl-project$

Well watever, moving on.... I am now running the
./setup-libs.sh
script

Perhaps you can add to the wiki that patch, g++ and libxml2-dev also needs to be installed. Default ubuntu 12.04 doesnt have them.
sudo apt-get install patch g++
sudo apt-get install libxml2-dev

Without libxml2-dev, FCollada build fails.

------------------

Ok, so the build is done and I have pushed to my phone and I try to run 0ad.apk but it says Application Not Installed, without giving any reason.

I am looking at adb logcat now but I dont see any clear reason specified.

W/ActivityManager(  178): Trying to launch com.android.packageinstaller/.PackageInstallerActivity
I/ApplicationPackageManager( 3003): cscCountry is not German : INU
I/ActivityManager(  178): Displayed com.android.packageinstaller/.PackageInstallerActivity: +107ms
V/[MyFiles]( 2988): AllFile:onStop
D/BatteryService(  178): update start
D/BatteryService(  178): [NF]shutdownIfNoPower
D/BatteryService(  178): [SendIntent]updateBattery level:100 scale:100 status:5 health:2 present:true voltage: 4131 temperature: 330 technology: Li-ion AC powered:false USB powered:true icon:17302191
I/StatusBarPolicy(  258): BAT. S:5 H:2
I/WifiService(  178): pre-persistedWifiState is 1
I/WifiService(  178): isAirplaneModeOn is 0
I/StatusBarPolicy(  258): onSignalStrengthsChanged
D/StatusBarPolicy(  258): updateSignalStrength: No SVC
I/dhcpcd  (  427): renewing lease of 172.16.3.228
D/dhcpcd  (  427): sending DHCP_REQUEST with xid 0x62e688bb, next in 4.29 seconds
D/dhcpcd  (  427): handle_dhcp : started
I/dhcpcd  (  427): acknowledged 172.16.3.228 from 172.16.0.1 `soln-sr3696.solutionip.com'
I/dhcpcd  (  427): save_listdata 0 : e40310ac
D/dhcpcd  (  427): Save list ip address. : e40310ac
I/dhcpcd  (  427): leased 172.16.3.228 for 60 seconds
D/dhcpcd  (  427): adding IP address 172.16.3.228/21
D/dhcpcd  (  427): adding route to 0.0.0.0/0 via 172.16.0.1
D/dhcpcd  (  427): executing `/system/etc/dhcpcd/dhcpcd-run-hooks', reason RENEW
D/dhcpcd  (  427): [yiaddr] : old_ip_address=172.16.3.228
D/dhcpcd  (  427): [yiaddr] : old_subnet_cidr=21
D/dhcpcd  (  427): [yiaddr] : old_network_number=172.16.0.0
D/dhcpcd  (  427): [yiaddr] : old_filename=default.cfg
D/dhcpcd  (  427): [yiaddr] : old_server_name=soln-sr3696.solutionip.com
D/dhcpcd  (  427): [options] : old_subnet_mask=255.255.248.0
D/dhcpcd  (  427): [options] : old_routers=172.16.0.1
D/dhcpcd  (  427): [options] : old_domain_name_servers=205.171.3.65 205.171.2.65
D/dhcpcd  (  427): [options] : old_domain_name=solutionip.com
D/dhcpcd  (  427): [options] : old_broadcast_address=172.16.7.255
D/dhcpcd  (  427): [options] : old_dhcp_lease_time=60
D/dhcpcd  (  427): [options] : old_dhcp_message_type=5
D/dhcpcd  (  427): [options] : old_dhcp_server_identifier=172.16.0.1
D/dhcpcd  (  427): [options] : old_dhcp_renewal_time=30
D/dhcpcd  (  427): [options] : old_dhcp_rebinding_time=52
D/dhcpcd  (  427): [yiaddr] : new_ip_address=172.16.3.228
D/dhcpcd  (  427): [yiaddr] : new_subnet_cidr=21
D/dhcpcd  (  427): [yiaddr] : new_network_number=172.16.0.0
D/dhcpcd  (  427): [yiaddr] : new_filename=default.cfg
D/dhcpcd  (  427): [yiaddr] : new_server_name=soln-sr3696.solutionip.com
D/dhcpcd  (  427): [options] : new_subnet_mask=255.255.248.0
D/dhcpcd  (  427): [options] : new_routers=172.16.0.1
D/dhcpcd  (  427): [options] : new_domain_name_servers=205.171.3.65 205.171.2.65
D/dhcpcd  (  427): [options] : new_domain_name=solutionip.com
D/dhcpcd  (  427): [options] : new_broadcast_address=172.16.7.255
D/dhcpcd  (  427): [options] : new_dhcp_lease_time=60
D/dhcpcd  (  427): [options] : new_dhcp_message_type=5
D/dhcpcd  (  427): [options] : new_dhcp_server_identifier=172.16.0.1
D/dhcpcd  (  427): [options] : new_dhcp_renewal_time=30
D/dhcpcd  (  427): [options] : new_dhcp_rebinding_time=52
D/dhcpcd  (  427): renew in 30 seconds
I/InputReader(  178): dispatchTouch::touch event's action is 0
I/InputReader(  178): dispatchTouch::touch event's action is 1
I/ActivityManager(  178): Starting: Intent { dat=file:///mnt/sdcard/0ad.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras) } from pid 3003
W/ActivityManager(  178): Trying to launch com.android.packageinstaller/.InstallAppProgress
I/ApplicationPackageManager( 3003): cscCountry is not German : INU
I/ActivityManager(  178): Displayed com.android.packageinstaller/.InstallAppProgress: +80ms
D/VoldCmdListener(  114): volume aseced /mnt/sdcard/external_sd
D/MountService(  178): getAsecVolumeState :: result = mounted
I/DmAppInfo(  178): getApplicationsList found row counts : 0 For Pkg : org.libsdl.app
D/VoldCmdListener(  114): volume aseced /mnt/sdcard/external_sd
D/MountService(  178): getAsecVolumeState :: result = mounted
W/ActivityManager(  178): No content provider found for:
D/PackageParser(  178): Scanning package: /data/app/vmdl-1043091474.tmp
E/PackageParser(  178): Package org.libsdl.app has no certificates at entry res/layout/main.xml; ignoring!
W/ActivityManager(  178): No content provider found for:
I/StatusBarPolicy(  258): onSignalStrengthsChanged
D/StatusBarPolicy(  258): updateSignalStrength: No SVC
I/InputReader(  178): dispatchTouch::touch event's action is 0
I/InputReader(  178): dispatchTouch::touch event's action is 1
I/InstallAppProgress( 3003): Finished installing org.libsdl.app
D/[MyFiles]( 2988): getCurrentDirectory : /mnt/sdcard
D/[MyFiles]( 2988): TextListAdapter.start
V/[MyFiles]( 2988): ImageLoader.start() <<<<<<<<<<<<<<<<<<<<<<<<<<<<
D/BatteryService(  178): update start
D/BatteryService(  178): [NF]shutdownIfNoPower

How about this line towards the end :

E/PackageParser( 178): Package org.libsdl.app has no certificates at entry res/layout/main.xml; ignoring!

Edited by madmax, 13 May 2012 - 08:37 PM.

  • 0

#180 Ykkrosh

Ykkrosh

    Primus Pilus

  • WFG Programming Team
  • 4,921 posts

Posted 13 May 2012 - 08:14 PM

jarsigner -keystore /home/abhi/.android/debug.keystore -storepass android bin/0ad.unaligned.apk androiddebugkey
jarsigner error: java.lang.RuntimeException: keystore load: /home/abhi/.android/debug.keystore (No such file or directory)

Hmm, I don't know where that file comes from - some part of the Android SDK generates it (maybe ant), but I have no idea how to trigger it. The .apk won't be created correctly without that - you'll need to run "make clean" then "make" inside sdl-project/ to rebuild properly once the keystore file is in place. (None of the rest of the build process will be affected by that, though.)
  • 0
Philip Taylor [aka Ykkrosh]

Wildfire Games Programmer
Contact me: philip@wildfiregames.com