Which device profile is used during android packaging to clamp texture resolution?

Which device profile is used to limit the max texture size placed in a packaged build?

Obviously the packager cannot know what device the game will run on during packaging, so I assume it is just the default base “Android” device profile being used for this? It’s not clear to me and I can’t find any documentation on this.

I tested changing the max texture size of the texturegroups in all the android profiles and it seems to correctly limit the maximum packaged texture resolution to what is in the device profiles. But I can’t figure out which device profile the packager is using during packaging.

The device profiles don’t seem to appear anywhere in the packaging menu or the project launcher window. The only configurable thing is the texture format (ASTC,ETC1,ETC2,…).

Just to clarify, I am asking about which device profile is selected during packaging and not during runtime. This is for reducing APK size.


EDIT:

From what I can tell it seems the platform profile is used, but I would appreciate clarification from EPIC if possible.

From DeviceProfileManager.cpp:

void UDeviceProfileManager::LoadProfiles()
{
	...

#if WITH_EDITOR
		if (!FPlatformProperties::RequiresCookedData())
		{
			// Register Texture LOD settings with each Target Platform
			ITargetPlatformManagerModule& TargetPlatformManager = GetTargetPlatformManagerRef();
			const TArray<ITargetPlatform*>& TargetPlatforms = TargetPlatformManager.GetTargetPlatforms();
			for (int32 PlatformIndex = 0; PlatformIndex < TargetPlatforms.Num(); ++PlatformIndex)
			{
				ITargetPlatform* Platform = TargetPlatforms[PlatformIndex];

				// Set TextureLODSettings
				const UTextureLODSettings* TextureLODSettingsObj = FindProfile(*Platform->GetPlatformInfo().VanillaPlatformName.ToString());
				Platform->RegisterTextureLODSettings(TextureLODSettingsObj);
			}
		}
#endif

		ManagerUpdatedDelegate.Broadcast();
	}
}

Hello!
I also would like a clarification on the matter, especially because I am trying to clamp MaxLODSize for specific DeviceProfiles. I’m using Unreal Engine 5.3.2.

I disabled TextureStreaming because my game is played from a nearly static point of view in a limited area, and I want it to be fully loaded when it shows up. I edited DefaultDeviceProfiles.ini to add TextureLODGroups settings for my Oculus_Quest2 DeviceProfile. When I cook and package my game and try to run it on a Quest 2, the game crashes on this check (in Texture.cpp::1656)

if ( ExpectedAssetLODBias > 0 && ! bTextureIsStreamable )
{
	check( ! FPlatformProperties::RequiresCookedData() ); // ExpectedAssetLODBias should have been zero
	NumOfNonStreamingMips = FullMipCount - ExpectedAssetLODBias;
}

So it seems like Mips higher than my MaxLODSize have been cooked, resulting in this error. How can I cook my content for a specific device profile?

Thanks!