# Files in Content folder do not move to app's folder on Android in shipping build

**URL:** <https://forums.unrealengine.com/t/files-in-content-folder-do-not-move-to-apps-folder-on-android-in-shipping-build/453619>\
**Category:** Mobile\
**Tags:** distribution, Shipping, unreal-engine, Android, CPP, question\
**Created:** [August 9, 2019, 2:04pm UTC](https://forums.unrealengine.com/t/files-in-content-folder-do-not-move-to-apps-folder-on-android-in-shipping-build/453619 "2019-08-09T14:04:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![julioflspbr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@julioflspbr](https://forums.unrealengine.com/u/julioflspbr)\
**Post date:** [August 9, 2019, 2:04pm UTC](https://forums.unrealengine.com/t/files-in-content-folder-do-not-move-to-apps-folder-on-android-in-shipping-build/453619/1 "2019-08-09T14:04:16Z")

</div>

Hello,

At a certain point, early in the game start, I copy baked-in template sqlite files to a place where the game can access later on, and edit these data as the player progresses in the game. That works beautifully, for all platforms I am currently supporting, which for now is Android, iOS and desktop (I have tested on Mac only so far)(the game is in an early development stage). Well, the code that copies over from the content folder to the “documents” folder is different for each platform, as it seems to be platform specific.

Now, when I package the app for distribution however (I’m doing this regularly even in early development stage so that product and designer can check), these template database files do not get copied over to the app’s folder! That is for Android only, and shipping builds. All other conditions work as expected.

This is the code that I am using (the Android part only):

```
static constexpr TCHAR DatabaseDirectory[] = TEXT("Data");
static constexpr TCHAR DatabaseExtension[] = TEXT(".db");

...

#elif PLATFORM_ANDROID

extern FString GInternalFilePath;

FString DatabaseFileManager::DatabaseFilePath(FString DatabaseName)
{
	FString FileName = DatabaseName.Append(DatabaseExtension);
	IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
	FString DestinationDatabasePath = GInternalFilePath / FileName;
	if (!PlatformFile.FileExists(*DestinationDatabasePath))
	{
		FString OriginDatabasePath = FPaths::ProjectContentDir() / DatabaseDirectory / FileName;
		//check(PlatformFile.CopyFile(*DestinationDatabasePath, *OriginDatabasePath));
		if (!PlatformFile.CopyFile(*DestinationDatabasePath, *OriginDatabasePath))
		{
			UE_LOG(LogTemp, Error, TEXT("Copying database was NOT successful"));
			checkNoEntry();
		};
	}
	return DestinationDatabasePath;
}

#else
...

```

What I’ve done:

- I added my _Data_ folder under the _Content_ folder

![284644-screen-shot-2019-08-09-at-105344.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/9/759abfe7fb5eac33588583cbfbbcca6ca2ea2344.png)

- I marked my _Data_ folder as a non-asset folder to be packaged, under the _Packaging_ project settings

![284645-screen-shot-2019-08-09-at-105607.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/2/ca2a30c03c77f328cc3e1e7c525993d5382728fb.png)

Tests I’ve run so far:

- After _apk_ and _obb_ files generated, I extracted the contents out of the _obb_ files, and extracted the generated _pak_ file with the _UnrealPak_ tool, and the _Data_ folder **is** present, just as expected; both development and shipping builds;
- After installing the app on a Samsung J4 Core device:
  - Development build, the above code is executed, and the template files are copied over to the path `/data/data/my.package.name/files`. The app behaves seamlessly as expected. Thus, the `UE_LOG` doesn’t print any error.
  - Shipping build, I checked the same path, and my files are not present. The app behaves accordingly, i.e. not showing the data that is in the template database files. I don’t know how to check `UE_LOG` errors on a shipping build, if it is with `adb logcat` then nothing is printed there either. But the fact is the files are not there.

Originally I was using `GExternalFilePath`, with the very same results. But since I discovered the _Internal_ path, I preferred this approach because the template files are tiny, and I don’t have the risk of the user refusing the external storage permission.

I am two days on it, have researched all through the forums and all the the internet could offer, and I have no extra light. Any help, that could point to a brighter direction is much much appreciated.

---

<div class="post-metadata">

**Author:** ![LovelyBIgga](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LovelyBIgga](https://forums.unrealengine.com/u/LovelyBIgga)\
**Post date:** [July 18, 2023, 7:17pm UTC](https://forums.unrealengine.com/t/files-in-content-folder-do-not-move-to-apps-folder-on-android-in-shipping-build/453619/2 "2023-07-18T19:17:36Z")

</div>

Did you find a Solution?
