Hi,
in my attempt to dig deep into performance problems of my GearVR UE4 game, I tried using the ARM Mali Graphics debugger. It requires adding a .so library to the Android project and loading it dynamically on runtime.
I added loading code to main game activity in Engine\Build\Android\Java\src\com\epicgames\ue4\GameActivity.java
but unfortunately, I’m unable to package the .so file with the .apk properly.
When I added makefiles to the UE4 Java project as per ARM documentation, I get error when AutomationTool is about to create the .apk file (error log below).
I’ve seen on Niklas Smedberg’s presentation (https://de45xmedrsdbp.cloudfront.net/Resources/files/UE4_DevCon2014_MobilePerf-1826750604.pdf), that you guys at Epic use ARM Mali Graphics Debugger to debug UE4 projects. Could you please give some small tutorial on how to set it up properly?
MainFrameActions: Packaging (Android (ETC2)): ====2015-10-07 11:23:03====PREPARING NATIVE CODE=================================================================
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.UpdateProjectProperties:
MainFrameActions: Packaging (Android (ETC2)): ====2015-10-07 11:23:03====UPDATING BUILD CONFIGURATION FILES====================================================
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml...
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml...
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.MakeApk:
MainFrameActions: Packaging (Android (ETC2)): Copying new .so C:\Repo\mkosobucki_capybara\Capybara\Binaries\Android\Capybara-armv7-es2.so file to jni folder...
MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging...
MainFrameActions: Packaging (Android (ETC2)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: C:/NVPACK/android-ndk-r10e/ndk-build.cmd failed with args APP_ABI="armeabi-v7a " NDK_DEBUG=1
MainFrameActions: Packaging (Android (ETC2)): Stacktrace: at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
MainFrameActions: Packaging (Android (ETC2)): at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
MainFrameActions: Packaging (Android (ETC2)): at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
MainFrameActions: Packaging (Android (ETC2)): at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool
MainFrameActions: Packaging (Android (ETC2)): \Android\AndroidPlatform.Automation.cs:line 183
MainFrameActions: Packaging (Android (ETC2)): at Project.Package(ProjectParams Params, Int32 WorkingCL) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\Scripts\PackageCommand.Automation.cs:line 30
MainFrameActions: Packaging (Android (ETC2)): at BuildCookRun.DoBuildCookRun(ProjectParams Params) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 212
MainFrameActions: Packaging (Android (ETC2)): at BuildCommand.Execute() in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 35
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 392
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Automation.Process(String[] CommandLine) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 366
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Program.MainProc(Object Param) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\Program.cs:line 134
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.InternalUtils.RunSingleInstance(Action`1 Main, Object Param) in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 708
MainFrameActions: Packaging (Android (ETC2)): at AutomationTool.Program.Main() in c:\Repo\mkosobucki_capybara\Engine\Source\Programs\AutomationTool\Program.cs:line 53
MainFrameActions: Packaging (Android (ETC2)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=Error_Unknown
MainFrameActions: Packaging (Android (ETC2)): Domain_ProcessExit
MainFrameActions: Packaging (Android (ETC2)): AutomationToolLauncher exiting with ExitCode=1
MainFrameActions: Packaging (Android (ETC2)): copying UAT log files...
MainFrameActions: Packaging (Android (ETC2)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults:Error: Error Unknown Error