# How to check if a build is made by the project launcher Android

**URL:** <https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580>\
**Category:** Mobile\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [April 9, 2025, 2:10pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580 "2025-04-09T14:10:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 9, 2025, 2:10pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/1 "2025-04-09T14:10:39Z")

</div>

In LaunchAndroid.cpp InitCommandLine(). We want to be able to see if it’s a build made by the project launcher. Because the CommandLine will be in different locations depending on if it’s made by project launcher and the version of our game. We have essentially split our game into two apps.

In other parts of the project we see if it’s a projectlauncher build and what version it is through the Command line.

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [April 9, 2025, 8:55pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/2 "2025-04-09T20:55:13Z")

</div>

Hi Aron,

Your best bet to differentiate between project launcher and installed build would be to create a custom project launcher profile and add additional command line parameter such -LaunchedFromProjectLauncher. You can then check that argument in your application runtime code ( if(FParse::Param(FCommandLine::Get(), TEXT(“LaunchedFromProjectLauncher”))) and alter its behaviour as needed. You could also modify the UE4 Project Launcher code to add this argument by default.

Best regards

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 10, 2025, 9:03am UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/3 "2025-04-10T09:03:20Z")

</div>

Hello! Thanks for a quick answer!

Yes we have added this already but specificly in LaunchAndroid.cpp InitCommandLine(), we cannot access the commandline since it has not been set yet ☹

We can access the CommandLine while the build is being deployed. Maybe there is a way to something there?

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [April 11, 2025, 2:00am UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/4 "2025-04-11T02:00:55Z")

</div>

Hi Aron,

Can you clarify what you mean by ‘we cannot access the commandline since it has not been set yet’? Are you talking about the ComandLine.txt file? Can you also clarify ‘We can access the CommandLine while the build is being deployed.’? Do you mean you’d like to inject parameters to the CommandLine file during build generation?

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 11, 2025, 8:46am UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/5 "2025-04-11T08:46:52Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [April 11, 2025, 1:44pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/6 "2025-04-11T13:44:12Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 1:35pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/7 "2025-05-11T13:35:18Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 1:36pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/8 "2025-05-11T13:36:26Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 1:38pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/9 "2025-05-11T13:38:44Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 1:38pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/10 "2025-05-11T13:38:48Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 1:40pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/11 "2025-05-11T13:40:37Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 1:40pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/12 "2025-05-11T13:40:39Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 2:54pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/13 "2025-05-11T14:54:07Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 2:54pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/14 "2025-05-11T14:54:12Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 6:11pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/15 "2025-05-11T18:11:58Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 6:13pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/16 "2025-05-11T18:13:45Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 6:16pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/17 "2025-05-11T18:16:42Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 6:18pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/18 "2025-05-11T18:18:05Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [May 11, 2025, 8:06pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/19 "2025-05-11T20:06:31Z")

</div>

I’ll add the code snippet! Maybe I am missunderstanding. But we are changing the folder location depending on what version of the app it is but only if it’s a project launcher build. But in InitCommandLine() in LaunchAndroid.cpp, they set what filepath the CommandLine is at. But we need to Append “/UE4Game/” with our appversion (if it’s a projectlauncher build). So it’s in this part of the logic we need to know if it’s a project launcher build, and the commandline itself will be in different locations depending on if it’s a projectlauncher build.

When it comes to accessing the CommandLine while the build is being deployed. In AndroidPlatform.Automation.cs we can access the commandLine and through that check if it’s a projectLauncher build 😎

I hope this makes sense 😅 thank you for your patience

`static void InitCommandLine()  
{  
static const uint32 CMD\_LINE\_MAX = 16384u;

// initialize the command line to an empty string  
FCommandLine::Set(TEXT(“”));

AAssetManager\* AssetMgr = AndroidThunkCpp\_GetAssetManager();  
AAsset\* asset = AAssetManager\_open(AssetMgr, TCHAR\_TO\_UTF8(TEXT(“UE4CommandLine.txt”)), AASSET\_MODE\_BUFFER);  
if (nullptr != asset)  
{  
const void\* FileContents = AAsset\_getBuffer(asset);  
int32 FileLength = AAsset\_getLength(asset);

char CommandLine[CMD\_LINE\_MAX];  
FileLength = (FileLength \< CMD\_LINE\_MAX - 1) ? FileLength : CMD\_LINE\_MAX - 1;  
memcpy(CommandLine, FileContents, FileLength);  
CommandLine[FileLength] = ‘\0’;

AAsset\_close(asset);

// chop off trailing spaces  
while (\*CommandLine && isspace(CommandLine[strlen(CommandLine) - 1]))  
{  
CommandLine[strlen(CommandLine) - 1] = 0;  
}

FCommandLine::Append(UTF8\_TO\_TCHAR(CommandLine));  
FPlatformMisc::LowLevelOutputDebugStringf(TEXT(“APK Commandline: %s”), FCommandLine::Get());  
}

// read in the command line text file from the sdcard if it exists

////////////////// We need to append /UE4Game/ with the app name depending on what version it is  
FString CommandLineFilePath = GFilePathBase + FString(“/UE4Game/”) + (!FApp::IsProjectNameEmpty() ? FApp::GetProjectName() : FPlatformProcess::ExecutableName()) + FString(“/UE4CommandLine.txt”);  
//////////////////////////////////////////////////////////////////////////////////////////////`

---

<div class="post-metadata">

**Author:** ![step\_jac\_eg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@step\_jac\_eg](https://forums.unrealengine.com/u/step_jac_eg)\
**Post date:** [May 11, 2025, 8:06pm UTC](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580/20 "2025-05-11T20:06:36Z")

</div>

Hi Aron,

If UE4CommandLine.txt is opened via AAssetManager\_open, this is indicative that the data has been packaged in the APK, whereal if it is loaded from external storage, this is indicative of a free file deploy from editor with the “package assets in APK” disabled. You can use this as a differentiator of builds if it suits your needs.

Best regards.

[Next page](https://forums.unrealengine.com/t/how-to-check-if-a-build-is-made-by-the-project-launcher-android/2502580.md?page=2)
