Android Release

Hi,

I followed the instructions at the following links:

http://docs.aws.amazon.com/lumberyard/latest/userguide/android-shaders-building.html

https://forums.awsgametech.com/t/release-build-on-android/1673/1

… and still am unable to see a release build functional on device. I have:

  • copied and modified “BuildMultiplayerSample_Paks_PC” to build es3 packs for the game

  • Pulled the generated shaders from device and into the cache folder (\cache\MyGame\es3\user)

  • Ran “BuildShaderPak_ES3.bat”

  • Ran modified “BuildMultiplayerSample_Paks_PC”

  • Modified console.h accordingly ("#define ALLOW_CONST_CVAR_MODIFICATIONS 1")

  • pushed the assets to device

  • Built Android release through LY Editor.

  • Verified assets on device through adb shell.

… but still I see a black screen on launch. adb logcat isn’t particularly englightening as to what’s going on, no errors that I can see :confused:

Thoughts?

Hi @Twolewis,

Does the application crash or just show a black screen?

The former would indicate the ALLOW_CONST_CVAR_MODIFICATIONS change didn’t take, possibly due to a bug in Lumberyard 1.9. This was fixed in 1.10.

While the latter leads me to believe the shader paks were not found on the device. Could you verify the following are on your device:

  • shaders.pak
  • shadercache.pak
  • shadercachestartup.pak

Ok, sounds like the ALLOW_CONST_CVAR_MODIFICATIONS change did take so that’s good. I’m still leaning toward some missing shader permutations, but it might be possible the level isn’t loading for some reason.

You can try re-enabling the core logging in release by making a small edit to Code/Launcher/AndroidLauncher/Main.cpp around line 74, change

#if !defined(_RELEASE)

to

#if 1

Hi Scott,

Sorry for not being clear - what I see on launch is:

  1. Lumberyard splash (white on gray)
  2. Lumberyard splash (white on black)
  3. Black screen.

I’ve verified that the paks are on device:

shell@hammerhead:/storage/emulated/0/MyGame/mygame $ ls
config
engine.pak
gamedata.pak
gems
levels
levels.pak
misc.pak
objects.pak
scripts.pak
shadercache.pak
shadercachestartup.pak
shaders.pak
textures.pak

Hi @Scott@AGS -

I tried as you suggested, still nothing interesting in the logs:

09-20 20:30:41.406 15469 15490 I LMBR : ******************************************************
09-20 20:30:41.406 15469 15490 I LMBR : * Amazon Lumberyard - Launching Game.... *
09-20 20:30:41.406 15469 15490 I LMBR : ******************************************************
09-20 20:30:41.423 15469 15490 I LMBR : [INFO] Using SD card for game files
09-20 20:30:41.423 15469 15490 I LMBR : [INFO] Log and cache files will be written to your SD card
09-20 20:30:41.423 15469 15490 I LMBR : **** ROOT path set to : /storage/emulated/0/mygame ****
09-20 20:30:41.423 15469 15490 I LMBR : **** ASSET path set to : /storage/emulated/0/mygame/mygame ****
09-20 20:30:41.423 15469 15490 I LMBR : **** USER path set to : ****
09-20 20:30:41.423 15469 15490 I LMBR : **** LOG path set to : /storage/emulated/0/mygame/log ****
09-20 20:30:41.669 2181 2181 W Binder_A: type=1400 audit(0.0:494): avc: denied { ioctl } for path="socket:[79554]" dev="sockfs" ino=79554 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
09-20 20:30:41.669 2181 2181 W Binder_A: type=1400 audit(0.0:495): avc: denied { ioctl } for path="socket:[79554]" dev="sockfs" ino=79554 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
09-20 20:30:41.675 15469 15469 V SDL : onWindowFocusChanged(): true
09-20 20:30:41.678 784 802 I ActivityManager: Displayed com.mygame.mygame/.mygameActivity: +722ms
09-20 20:30:41.679 3963 3963 W Binder_F: type=1400 audit(0.0:496): avc: denied { ioctl } for path="socket:[79553]" dev="sockfs" ino=79553 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
09-20 20:30:41.679 3963 3963 W Binder_F: type=1400 audit(0.0:497): avc: denied { ioctl } for path="socket:[79553]" dev="sockfs" ino=79553 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
09-20 20:30:41.698 1500 10355 I DeviceScanner: [MDNS] Received response from "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf) with result "0 No change"
09-20 20:30:41.698 1500 10355 I DeviceScanner: [MDNS] notifyDeviceOnline: "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf), criteria , statusText ''
09-20 20:30:41.724 15469 15490 W Adreno-ES20: <get_simple_queries:1544>: GL_INVALID_ENUM
09-20 20:30:41.732 15469 15490 V SDL : setSurfaceFixedSize: 1152x720
09-20 20:30:41.737 15469 15490 W Adreno-ES20: <get_simple_queries:1544>: GL_INVALID_ENUM
09-20 20:30:41.753 3194 3194 I PBSessionCacheImpl: Deleted sessionId[2282802306689] from persistence.
09-20 20:30:41.759 15469 15469 V SDL : surfaceChanged()
09-20 20:30:41.759 15469 15469 V SDL : pixel format RGBA_8888
09-20 20:30:41.759 15469 15469 V SDL : Window size:1152x720
09-20 20:30:41.769 3194 3194 I MicroDetector: Keeping mic open: false
09-20 20:30:41.770 3194 15005 I DeviceStateChecker: DeviceStateChecker cancelled
09-20 20:30:41.770 3194 15041 I AudioController: internalShutdown
09-20 20:30:41.770 3194 15041 I MicrophoneInputStream: mic_close com.google.android.apps.gsa.speech.audio.af@a90fa8c
09-20 20:30:41.770 3194 14994 E AudioRecord-JNI: Error -4 during AudioRecord native read
09-20 20:30:41.772 3194 5264 I MicroRecognitionRunner: Stopping hotword detection.
09-20 20:30:41.811 197 15448 D audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record
09-20 20:30:41.812 197 15448 D audio_hw_primary: disable_snd_device: snd_device(61: voice-rec-mic)
09-20 20:30:41.819 3194 15006 I MicroRecognitionRunner: Detection finished
09-20 20:30:42.157 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:42.158 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:42.158 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:42.158 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:42.159 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:42.159 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:42.203 15469 15527 W libOpenSLES: Leaving Object::GetInterface (SL_RESULT_FEATURE_UNSUPPORTED)
09-20 20:30:42.219 197 814 D audio_hw_primary: out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2
09-20 20:30:42.619 1500 10355 I DeviceScanner: [MDNS] Received response from "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf) with result "0 No change"
09-20 20:30:42.620 1500 10355 I DeviceScanner: [MDNS] notifyDeviceOnline: "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf), criteria , statusText ''
09-20 20:30:43.034 1358 2695 I NearbyDirect: MagicPairScanner: BluetoothLeScanner is null, Bluetooth might be off. Enabled=false
09-20 20:30:43.087 1500 10355 I Publisher: Triggered Adaptive Discovery
09-20 20:30:43.089 1500 10355 I Publisher: 2 Cast devices.
09-20 20:30:43.089 1500 10355 I Publisher: "Vizio - Living Room" (4877dd3d7d690f852366d5e0cd74cc12) supported([]) notSupported([%urn:x-cast:com.google.cast.media]) expired(false)
09-20 20:30:43.089 1500 10355 I Publisher: "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf) supported([]) notSupported([%urn:x-cast:com.google.cast.media]) expired(false)
09-20 20:30:43.528 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.529 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:43.533 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.534 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:43.537 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.539 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:43.542 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.544 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:43.546 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.548 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:43.550 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.552 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:43.556 15469 15490 W Adreno-EGLSUB: <SwapBuffers:1353>: Invalid native buffer. Failed to queueBuffer
09-20 20:30:43.565 15469 15511 W Adreno-EGLSUB: <updater_thread:436>: native buffer is NULL
09-20 20:30:51.791 3194 15578 I EventLogSendingHelper: Sending log events.
09-20 20:30:51.914 2262 2301 I Finsky : [187] com.google.android.finsky.i.c.a(22): Completed 0 account content syncs with 0 successful.
09-20 20:30:51.916 2262 2262 I Finsky : [1] com.google.android.finsky.services.e.a(5): Installation state replication succeeded.09-20 20:30:58.521 784 2948 D NetlinkSocketObserver: NeighborEvent{elapsedMs=9163746, 192.168.1.254, [DC7FA4B902FD], RTM_NEWNEIGH, NUD_STALE}
09-20 20:31:02.587 1500 10355 I DeviceScanner: [MDNS] Received response from "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf) with result "0 No change"
09-20 20:31:02.587 1500 10355 I DeviceScanner: [MDNS] notifyDeviceOnline: "Chromecast - Rec Room" (02ab4739b2a63ed36625b7489c840ccf), criteria , statusText ''

I should also mention I’m on LY 1.10 :slight_smile:

I missed a couple more edits needed in order to enable logging in release, my apologies.

Here are the better changes…

Tools/build/waf-1.7.13/lmbrwaflib/compile_settings_android.py

Add the following line at the end of the load_release_android_settings function

append_to_unique_list(env['DEFINES'], [ 'RELEASE_LOGGING', 'AZ_ENABLE_TRACING' ])

Code/Launcher/AndroidLauncher/Main.cpp

  1. Around line 74 change
    #if !defined(_RELEASE)
#define LOG_TAG "LMBR"

to

    #if !defined(_RELEASE) || defined(RELEASE_LOGGING)
#define LOG_TAG "LMBR"
  1. Around line 330 change
    #if !defined(_RELEASE)
startupParams.pPrintSync = &g_androidPrintSink;
#endif

to

    #if !defined(_RELEASE) || defined(RELEASE_LOGGING)
startupParams.pPrintSync = &g_androidPrintSink;
#endif