# Android 11 save game not working (sdk30)

**URL:** <https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, UE4-26, Blueprint\
**Created:** [August 13, 2021, 11:13pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410 "2021-08-13T23:13:50Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Usama\_Gunner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Usama\_Gunner](https://forums.unrealengine.com/u/Usama_Gunner)\
**Post date:** [August 13, 2021, 11:13pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/1 "2021-08-13T23:13:50Z")

</div>

Save game not working on android 11 (sdk30). Save games works perfectly on all devices except android 11. maybe because android 11 scoped storage  
kindly help me iam stuck here from last 5-6 days

---

<div class="post-metadata">

**Author:** ![Sky001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sky001/32/1092299_2.png) [@Sky001](https://forums.unrealengine.com/u/Sky001)\
**Post date:** [September 4, 2021, 10:04pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/2 "2021-09-04T22:04:51Z")

</div>

Where do you “place” your save game logic? I think we need more informations 🙂

---

<div class="post-metadata">

**Author:** ![Usama\_Gunner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Usama\_Gunner](https://forums.unrealengine.com/u/Usama_Gunner)\
**Post date:** [September 5, 2021, 1:34am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/3 "2021-09-05T01:34:43Z")

</div>

Iam using two nodes as i used them everytime

Create save game object  
Save game to slot

Save games working perfectly on all devices except android 11 devices

But i have read ue4.27 docs… They mentioned they have resolved some permission to get directories problems in android. I havnt checked but i hope its solved in ue4.27. Currently iam on ue4.26

---

<div class="post-metadata">

**Author:** ![Sky001](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sky001/32/1092299_2.png) [@Sky001](https://forums.unrealengine.com/u/Sky001)\
**Post date:** [September 7, 2021, 11:05am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/4 "2021-09-07T11:05:14Z")

</div>

Hi you must use the Game Instance for your save games and definitly check the storage permissions  
I wrote an article how i solved the exact same problem, i translated it now in english, i think you can understand this:

(I hope its allowed to post an external url :o) - \> [https://defconnet.work/en/how-android-save-games-work-ue4-27/](https://defconnet.work/en/how-android-save-games-work-ue4-27/)

---

<div class="post-metadata">

**Author:** ![harshGoda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/harshgoda/32/484177_2.png) [@harshGoda](https://forums.unrealengine.com/u/harshGoda)\
**Post date:** [November 14, 2021, 11:41am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/5 "2021-11-14T11:41:42Z")

</div>

SaveGame data is saved inside /storage/emulated/0/UE4Game/{Ue4Project}/saved/-------  
with the extention of save game.  
if you want to publish you game/app created in ue4 than you should Add MANAGE\_FILES permission which is the simplest way bu the problem here is that starting this november all updates if consist of above permission will have to wait to seek permission from pay console about why your game/app requires this delicate feature.  
adding above permission will automatically provide you will manage all files for API30 but for API 31 and above you have to add permission which i will write a blog when i will have time.

Their is more simpler way by which you can access savegame for newer API  
i.e to edit SaveGameSystem.h in your Engine/Source/Runtime  
add /storage/emulated/0/Android/data/{yourpackagename}+.savegame

---

<div class="post-metadata">

**Author:** ![InLove4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@InLove4](https://forums.unrealengine.com/u/InLove4)\
**Post date:** [November 23, 2021, 8:46am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/6 "2021-11-23T08:46:50Z")

</div>

Hello!

Can you tell me more about this changes and permissions at force please? :c

---

<div class="post-metadata">

**Author:** ![harshGoda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/harshgoda/32/484177_2.png) [@harshGoda](https://forums.unrealengine.com/u/harshGoda)\
**Post date:** [November 23, 2021, 9:06am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/7 "2021-11-23T09:06:30Z")

</div>

hi InLove4.  
I would be writing a blog by tonight where i will explain changes and even add plugin to github(for permssions related android11, API30=+) for 4.27 and 4.26 which will itself modify the code.  
you can see the blog at

> **[Home | RearAndroid](https://www.rearandroid.com/)**
>
> RearAndroid offers Unreal Engine Game Developers essential Plugins for Android and IOS Platforms for improving UX for Games/apps develoepr in UE4.

I will ping here once i am done writing  
You can always ask me question related to Android at  
[https://discord.gg/RvaxH54t](https://discord.gg/QpJubTmPze)  
(my username in discord is MikeSrinivas)

---

<div class="post-metadata">

**Author:** ![Usama\_Gunner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Usama\_Gunner](https://forums.unrealengine.com/u/Usama_Gunner)\
**Post date:** [November 23, 2021, 3:10pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/8 "2021-11-23T15:10:18Z")

</div>

That would be really great and helpfull. Stuck in this problem for months… Iam also waiting for your detailed working solutin. Thanks in advance

---

<div class="post-metadata">

**Author:** ![harshGoda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/harshgoda/32/484177_2.png) [@harshGoda](https://forums.unrealengine.com/u/harshGoda)\
**Post date:** [November 24, 2021, 4:07pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/9 "2021-11-24T16:07:41Z")

</div>

you can read the blog here I have made it as simple with pros and cons.  
Anyone with still having problem feel free to ask anytime.  
[https://www.rearandroid.com/android11](https://www.rearandroid.com/android11)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f61dc7841](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f61dc7841](https://forums.unrealengine.com/u/anonymous_user_f61dc7841)\
**Post date:** [November 26, 2021, 3:39am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/10 "2021-11-26T03:39:22Z")

</div>

thanks .i read your blog and it was the first thing i got handy for 30+ api in android.i have my game up and running and i am no good with android and find out each time when i update my update got rejected for past few days.  
now i am aware why and I am currenly building my Engine Code as I have to download UE4.27 source code. i have edited the code but for some reason it rebuild again.  
hopefully it update this time.

---

<div class="post-metadata">

**Author:** ![harshGoda](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/harshgoda/32/484177_2.png) [@harshGoda](https://forums.unrealengine.com/u/harshGoda)\
**Post date:** [November 26, 2021, 6:50am UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/11 "2021-11-26T06:50:28Z")

</div>

sure

---

<div class="post-metadata">

**Author:** ![Usama\_Gunner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Usama\_Gunner](https://forums.unrealengine.com/u/Usama_Gunner)\
**Post date:** [December 6, 2021, 1:38pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/12 "2021-12-06T13:38:09Z")

</div>

I can see you have already applied solution. Is it working properly for 30+… save games are now working for you???

---

<div class="post-metadata">

**Author:** ![emrebaris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@emrebaris](https://forums.unrealengine.com/u/emrebaris)\
**Post date:** [December 25, 2022, 5:50pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/13 "2022-12-25T17:50:25Z")

</div>

The fastest way to solve the issue is as follows:

In SaveGameSystem.h

```auto
	virtual FString GetSaveGamePath(const TCHAR* Name)
	{
		FString saveDir;
#ifdef USE_ANDROID_FILE
		extern FString GInternalFilePath;
		saveDir = FString::Printf(TEXT("%s/SaveGames/%s.sav"), *GInternalFilePath, Name);
#else
		saveDir = FString::Printf(TEXT("%sSaveGames/%s.sav"), *FPaths::ProjectSavedDir(), Name);
#endif

		UE_LOG(LogTemp, Warning, TEXT("Save game path: %s"), *saveDir);

		return saveDir;
	}

```

PS: This solution requires no write permission because GInternalFilePath is set with getFilesDir() function call in native side and then set in AndroidJNI.cpp `GInternalFilePath = FJavaHelper::FStringFromParam(jenv, internalFilePath);`  
([Data and file storage overview &nbsp;|&nbsp; Android Developers](https://developer.android.com/training/data-storage#:~:text=on%20app%20uninstall%3F-,App%2Dspecific%20files,-Files%20meant%20for))

---

<div class="post-metadata">

**Author:** ![crossmr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@crossmr](https://forums.unrealengine.com/u/crossmr)\
**Post date:** [March 28, 2023, 5:55pm UTC](https://forums.unrealengine.com/t/android-11-save-game-not-working-sdk30/245410/14 "2023-03-28T17:55:20Z")

</div>

Have they still not gotten around to providing a native fix? Do we still need to do a source build for this?
