How to fix Telegram/Appstorage Bug in the A12 Weekly? Mi11 Venus.


kwisi

Members
23 Dec 2019
90
30
Hi,
I use the A12 weekly for Mi11 Venus.
But in all versions I have the Telegram bug (can't send anything, storage rights and everything is granted)
Other people got this bug too even with other apps seem not being able to access storage.

Anyone know how to fix it?
 
Everyone does - whenever someone mentions "storage issues with A12", it's about this problem.
Same goes for Gmail attachments and other apps that rely on storage permissions.
 
  • Like
Reactions: kwisi
Did anyone try to chmod the /storage/emulated/0 folder?

Try this chown -r media_rw:media_rw /storage/emulated


and chmod -R 770 /storage/emulated

You can do this via terminal emulator or with adb shell but be warned! It could cause harm!

Better check the user before attempting such an operation!

You can also check the user within /data/system/packages.list to obtain the right one per app and just change the telegram folder:

5994769d7c048f9ab8e256a5e96b7e58.jpg


Adjust the user accordingly.

Note as test you could grant 777 to the folder to see if the permission can be obtained afterwards by the app.

Try this on your own risk!

If you are not familiar with any of the commands above, don't do it!

Regards

Sent from my Mi 11 Ultra.
 
Interesting! Did it work?
You have to check it. The permissions in Android11 are as following and there it is working:

/storage/emulated/ - user/group should be media_rw
/storage/emulated/0 - user/group should be media_rw
/storage/emulated/0/Telegram -> user/group should be Media Storage


/storage/emulated/ -> rwxrwx--- (770)
/storage/emulated/0 -> rwxrwx--- (770)
/storage/emulated/0/Telegram -> rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Audio -> rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Documents ->rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Images ->rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Video->rwx------ (700)


Perhaps, if you delete Data/Cache/Telegram and install it again it could work if there are some issues with the permissions
Check if the folder "/storage/emulated/0/Telegram" is deleted before new installation
I had this issue with the ringtones folder

@Karpfenhai:
On Android 11 the user/group is different media_rw / Media Storage only an info coz of:
chown -r media_rw:media_rw /storage/emulated
 
Last edited:
I'm really inclined to try it out.
I'll wait for this week's weekly, so I'll have something to flash whether this works or messes up things.
 
You have to check it. The permissions in Android11 are as following and there it is working:

/storage/emulated/ - user/group should be media_rw
/storage/emulated/0 - user/group should be media_rw
/storage/emulated/0/Telegram -> user/group should be Media Storage


/storage/emulated/ -> rwxrwx--- (770)
/storage/emulated/0 -> rwxrwx--- (770)
/storage/emulated/0/Telegram -> rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Audio -> rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Documents ->rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Images ->rwx------ (700)
/storage/emulated/0/Telegramm/Telegram Video->rwx------ (700)


Perhaps, if you delete Data/Cache/Telegram and install it again it could work if there are some issues with the permissions
Check if the folder "/storage/emulated/0/Telegram" is deleted before new installation
I had this issue with the ringtones folder

@Karpfenhai:
On Android 11 the user/group is different media_rw / Media Storage only an info coz of:
chown -r media_rw:media_rw /storage/emulated
Yeah that's why I said 777 to the Telegramm folder to allow anything to anyone :)

Sent from my Mi 11 Ultra.
 
  • Love
Reactions: katerpanne
This Problem is in all apps with attachements or apps who want storage access. Very annoying.
 
This Problem is in all apps with attachements or apps who want storage access. Very annoying.
then check the permissons as mentioned that is the only hint we have at the moment.

I think not all users have this problem, it seems that there was an a12 version with this issue. all dirty flashes after this version have this issue.

perhaps make a clean install to the latest weekly and report your experience. dont restore a backup. install telegram and test it… only a suggestion
 
Last edited:
hh
then check the permissons as mentioned that is the only hint we have at the moment.

I think not all users have this problem, it seems that there was an a12 version with this issue. all dirty flashes after this version have this issue.

perhaps make a clean install to the latest weekly and report your experience. dont restore a backup. install telegram and test it… only a suggestion
How should we do it without root permissions?
 
On A12, who should be the owner?

I'm tinkering with this idea, but there are tons of possible owners. I tried media, media_rw and storage (not telegram, a different app), and still getting the same crash with the same error stack.

Permissions are set to 777, but ownership is still unclear. WDYT?
 
On A12, who should be the owner?

I'm tinkering with this idea, but there are tons of possible owners. I tried media, media_rw and storage (not telegram, a different app), and still getting the same crash with the same error stack.

Permissions are set to 777, but ownership is still unclear. WDYT?
Tbh, 777 is the most open permission we can achieve, if it's not working, I guess we're out of options, damned..

Sent from my Mi 11 Ultra.
 
Tbh, 777 is the most open permission we can achieve, if it's not working, I guess we're out of options, damned..
My knowledge is very limited, but I think that giving full permissions is the first half, with the second half being choosing who gets these permissions.
I'm seeing tons of possible owners, don't know how to figure out who should I choose. It makes sense to me that if we'll be able to nail the right combinations, it may help in solving this.
 
My knowledge is very limited, but I think that giving full permissions is the first half, with the second half being choosing who gets these permissions.
I'm seeing tons of possible owners, don't know how to figure out who should I choose. It makes sense to me that if we'll be able to nail the right combinations, it may help in solving this.
You can easily figure the owner id of telegram like I pointed out above, but i guess this will not help, at least it doesn't do any harm.

Btw afaik the user id is unique per app

Sent from my Mi 11 Ultra.
 
  • Like
Reactions: Munkyhead86
Anyone did CLEAN install of the newest weekly with data deletion?
Does it work to fix the bug?
 
Anyone did CLEAN install of the newest weekly with data deletion?
Does it work to fix the bug?
Yes, i did. It doesent Work. I have installed an older Version from the plus Messenger, 8.0.1.0. this does "Work". Sending Pictures are okay, but saving Downloads only manualy. Installing apk's Out of the App is also not working.
 
  • Like
Reactions: kwisi
guys i tried several builds and also cn builds.... if you want to "fix" the storage issue, to solve do the following...

Set up the phone on the latest a11 weekly, so all the apps and accounts.
Then you can dirty flash the latest 21.12.8 android 12 weekly on top. then you good to go
 
  • Like
Reactions: Mardeck
guys i tried several builds and also cn builds.... if you want to "fix" the storage issue, to solve do the following...

Set up the phone on the latest a11 weekly, so all the apps and accounts.
Then you can dirty flash the latest 21.12.8 android 12 weekly on top. then you good to go
Thanks for solution. Downgrade to A11 erased all applications and all my settings?
 
Thanks for solution. Downgrade to A11 erased all applications and all my settings?
to be clear... you cant simple downgrade to flash a11.

Make backup off your apps and settings.
To avoid brick you must/can miflash last a11 rom.
After this you can boot and flash twrp, flash latest a11 weekly.eu. format data.
Boot and setup and restore your backup(or set up by hand , so all apps and settings. Then you can dirty flash fastboot latest a12 weekly 21.12.8,
good luck
 
  • Like
Reactions: katerpanne
Well maybe downgrade to a11 would fix the problem but... I want to see WHAT causes this problems and patch it instead. Because downgrade is very risky... Any more ideas what could cause the issue?