I used Unreal Plugin Language (UPL) to edit the AndroidManifest.xml at build time. To figure this out myself, I mostly followed this article; specifically the section “Using a Round Icon”.
To summarize: create a .xml file next to your Build.cs file (often at Source/{Project}/{Project}.Build.cs). I named mine AddAdaptiveIcon_UPL.xml. The contents should look something like this:
Of course, my icon xml file is called ic_launcher.xml and is in Build/Android/res/mipmap-anydpi-v26/, but edit your UPL script to point to yours.
Then, once you’ve done this, you need to tell unreal engine to actually run your UPL script. To do this, add the following lines to your Build.cs file:
if (Target.Platform == UnrealTargetPlatform.Android)
{
// Add UPL to add configrules.txt to our APK
string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath);
AdditionalPropertiesForReceipt.Add("AndroidPlugin", System.IO.Path.Combine(PluginPath, "AddAdaptiveIcon_UPL.xml"));
}
I should add, I copied these lines for Build.cs from the article I posted above and don’t know the nuances of how it works, especially the pathing stuff. It worked the first time and now I’m afraid to touch it =)
Anyway, now when you build and package your android project, it should work like you expect.