Announcement

Collapse
No announcement yet.

Launch with Command Line Argument on Android

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    This is very helpful. Thank you

    Leave a comment:


  • replied
    Ok, I fixed the problem by upgrading to UE 4.24, and making sure to modify the existing UE4CommandLine in the device's game folder. I can now create a tracefile, then copy it to my computer to view it in Insights.

    For packaged builds, I run these commands in a bat file to run the game on Android:
    %ANDROID_HOME%\platform-tools\adb.exe push UE4CommandLine.txt /mnt/sdcard/UE4Game/PROJECTNAME/UE4CommandLine.txt
    %ANDROID_HOME%\platform-tools\adb.exe shell am start -n com.COMPANYNAME.EXENAME/com.epicgames.ue4.SplashActivity

    I also found out you can run console commands via adb, such as: adb shell am broadcast -a android.intent.action.RUN -e cmd 'stat sceneRendering'

    Leave a comment:


  • started a topic Launch with Command Line Argument on Android

    Launch with Command Line Argument on Android

    Hi,

    I am trying to launch my game on Android with some command line arguments. Specifically I would like to use either of the trace options in the Insights documentation. I cannot find any way to set command line arguments, either via Launch in editor, or packaging and installing a build using a bat file.

    I have tried
    • modifying the UE4CommandLine.txt, and putting it in my game folder on the android device
    • modifying the UE4CommandLine.txt, and putting it in /mnt/sdcard/UE4Game/UE4Game/UE4CommandLine.txt, as with PushCommandLine.bat
    • using the editor preferences' additional launch parameters for mobile
    The game runs fine, but none of the command line arguments seem to be applied.
    Any ideas? Thank you!
    Patrick
Working...
X