[FIX] Cant add no custom ringtone locale and online playing possible


katerpanne

Members
Apr 19, 2014
1,572
307
Hello ,
If I set my Ringtone with the MiMix-Explorer it`ll work!
No need for Root or s.e.
Open MIMIX , mark your Ringtone , 3 Dots at upper right , set as Ringtone.

Yes its like zedge it is using another folder. Can you set different tones for sim1 and sim2? That was not possible with zedge. With this Fix it is possible and you dont have to choose tones with 3rd party tools.
 
  • Like
Reactions: LOLO9393

hjfisch

Members
Apr 8, 2020
9
15
Yes its like zedge it is using another folder. Can you set different tones for sim1 and sim2? That was not possible with zedge. With this Fix it is possible and you dont have to choose tones with 3rd party tools.
I`ve only one sim , so I do not know if It`s possible.
 

Kyrill

Members
May 24, 2021
8
5
/storage/emulated/0/MIUI/.ringtone -> rwxrwxr-x (directory)
/storage/emulated/0/MIUI/.ringtone/mark_neu.mp3 rw------- (file)

/data/system/theme_magic/ringtones -> rwxrwxr-x (directory)
Wow. Thank you so much!
I just removed these folders and now ringtones finally work!
Btw. TWRP module didn't work for me, showed me 'error accessing data partition'. I guess POCO F3 partition structure might differ from that of your MI11.
 
  • Like
Reactions: Poney70

L EV

Members
Aug 30, 2014
21
15
Все работает как черт. Я создам сценарий TWRP.
I tried to pull out 2 sim card and the hell the ringtone worked. But I did a factory reset anyway. First of all, I set my ringtone and after that I did all the settings, the ringtone did not change to standard and works fine. I don't know what this glitch is. Thanks for your patch for TWRP, all of a sudden the problem will recur, but I don't want to clean the phone again
 
  • Like
Reactions: Poney70

katerpanne

Members
Apr 19, 2014
1,572
307
Wow. Thank you so much!
I just removed these folders and now ringtones finally work!
Btw. TWRP module didn't work for me, showed me 'error accessing data partition'. I guess POCO F3 partition structure might differ from that of your MI11.

Hi, the script was updated by @Poney70 -> Thank you. Should now work on Poco as well :)
 
  • Like
Reactions: Poney70

meshkoff

Members
Jun 28, 2021
2
3
Same problem on my Mi10T with 12.5.1 Stable ROM.

Thanks for sharing this fix, manually deleting "theme_magic" folder via TWRP Recovery solved issue.
Now i can upload my custom ringtones in to sdcard and they visible in file explorer.

For those who not familiar with TWRP Recovery but already install it like me:
In main menu choose Advanced > File Manager, navigate to /data/system/theme_magic, ensure that you're right inside theme_magic folder, then click little blue check mark button in right bottom corner, choose Delete. After that return to main menu and select Reboot > System. Don't worry, folder will recreate itself after reboot with right permissions.

P.S. Wondering that latest Stable ROM had such a bug.
 

alpos35

Members
Jul 13, 2021
1
3
Hello together,

I have a MI11 Ultra (weekly 21.5.20 - clean install) and I am not able to setup AND play a custom ringtone (*.mp3 and *.ogg)
I can choose a custom ringtone (locale & online) but the phone is not playing it when I get a call. Its playing an old default tone.
Same for alarms & notifications. If I choose / add the ringtone, I can play & hear the ringtone
  • First it was not possible to choose a custom ringtone with filemanager, so I have downloaded "mi file manager" from playstore (now I have two of them)
    • and now I can choose filemanager while setup a custom ringtone
  • I have selected in settings ringtones and activated them (music, filemanger, audio files, recorder, tones) I have tried all of them
  • I have copied the ringtones in the folder "ringtones"
  • I have cleared the cache / data in themes / phone
  • I have selected other themes
  • I have configured in themes the custom ringtone
  • I have checked the permissions of the folders (rwx) / apps (storage)
  • I have deletet the data / cache of the Permission app
Perhaps it is a permission issue:
The default ringtones from MIUi are stored in "\system\media\audio\...\" -> folder: rwxr-xr-x and file: rw-r--r--
The online or custom ringtones are stored in "\sdcard\MIUI\...\" -> folder: rwx------ and file: rw-------
[Edit] - with the help from @Poney70 I have corrected the permissions -> the problem exists already.

The system table looks quiet good, the entries are there but they are not playing:

<k>ringtone</k><v>file:///storage/emulated/0/MIUI/.ringtone/mark.mp3</v>
<k>ringtone_sound_slot_1</k><v>file:///storage/emulated/0/MIUI/.ringtone/mark.mp3</v>
<k>ringtone_sound_slot_2</k><v>file:///storage/emulated/0/MIUI/.ringtone/2011techno.1.mp3</v>
Nothing is working for a custom ringtone. If I choose one of the internal default ringtones from miui, it is working

But after some logcat investigations, here we go ...
The permissions of "/data/system/theme_magic" is the issue.
So I have manually deleted the folder "theme_magic".
While setup a custom ringtone the folder will be recreated with correct permissions.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[Fix]: TWRP Module
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Run this TWRP Module and you should be able to choose your own ringtones.
Credits for the cool ScriptBody goes to @Poney70 -> Thank you very much ! Mount data in twrp if it is not mounted already!

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[Workaround]: MagiskModule
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Copy ringtomes to "\system\media\audio\ringtones"
Now I can choose the ringtones from the miui default ringtones AND the phone is playing them if I get a call / alarm / notification

Here is the link for the MagiskModule
To use yours and not my ringtones copy your tones into the zip-file and install with magisk
  • copy your ring tones into the zip-folder -> system\media\audio\ringtones
  • copy your alarm tones into the zip-folder -> system\media\audio\alarms
  • copy your notification tones into the zip-folder -> system\media\audio\notifications
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Use the Tool "Zedge" from Playstore to set a custom ringtone:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  • with this tool you can setup your ringtones directly from the tool
  • using the MIUI sound settings, click custom and choose Zedge instead of filemanager, music ...
In the first screen there is an advertising (german version), click in the left upper corner the "x" to close it
choose your ringtone and set it

Happy weekend, regards Kater
Had the same issue with my new Mi 10 t. I installed Free Ringtone Maker: Music Cutter, Custom Ringtone app, then uploaded the mp3 that I wanted ant cut a 30 second piece and made a custom ringtone. After that the app asks whether use that as the default ringtone. Giving a systems change permission, my custom ringtone became the default one, even after uninstalling the free ringtone maker app :) It worked.
 
Last edited:

GrandaPaTurtle

Members
Jul 27, 2021
1
3
So how do i fix this on my Xiaomi Poco X3? I tried using Zedge but i can only use online ringtones with it and i don't want to have to upload stuff it's silly. I have a pretty new phone (has a few days) and i have the same problem. But i can't seem to understand how to fix this permission problem permanently. I really want to be able to just use it how it's supposed to work - to be able to setup any music file from my music i want as a ringtone.
BTW I tried to find similiar folders to: /storage/emulated/0/MIUI/.ringtone as mentioned in this thread to be able to just delete the folder so new one with correct permissions will create itself but i can't seem to find it on my phone.
 
Last edited:

JohnSter

Members
Oct 23, 2021
3
5
Hi.
No rooting here. Last night I had the same problem. Go to Settings, Apps, search for Themes. Tap on it and tap on Notifications. Inside here check if the "allow sounds playback" (I'm translating from Italian: sorry if it is not exactly the same) toggle is active. It will work
 

1647838042

Members
Jan 26, 2021
114
30
Hi.
No rooting here. Last night I had the same problem. Go to Settings, Apps, search for Themes. Tap on it and tap on Notifications. Inside here check if the "allow sounds playback" (I'm translating from Italian: sorry if it is not exactly the same) toggle is active. It will work
Not working!
 

1647838042

Members
Jan 26, 2021
114
30
At this point I believe that I will wait for the next MIUI update hoping that it will be resolved, because I do not want to mess up the rom and risk having to format the smartphone
 

katerpanne

Members
Apr 19, 2014
1,572
307
The twrp fix I already did but it didn't work, I don't understand how I have to enter the system memory to delete the folder manually!
perhaps the path is now in a12 another. you can make a logcat and you will see the issue

How to create a logcat file

# connect phone with PC and USB
# set USB debug - on
# create a textfile -> eg logfile.txt in adb folder on PC
# adb logcat > logfile.txt
# make actions on phone and wait for issue
# ctrl+c (to stop logfile recording)
# analyze the logfile
# send the last eg 5 seconds, the relevant entries
 
  • Like
Reactions: 1647838042

JohnSter

Members
Oct 23, 2021
3
5
good luck… in my case it was a permission problem on the folder with the sounds.
Thank you katerpanne but for now I don't want to unblock the bootloader.

I've found a temporary workaround.
Settings > Apps > Apps managing > Search for "Themes". Tap on it and scroll down. Delete cache and data ----> choose your favourite ringtone.
Later Themes app will be updated again but with no effects on the choosen ringtone.

PS: should you want to change it again, you'd have to do it all again
 
Last edited:

1647838042

Members
Jan 26, 2021
114
30
perhaps the path is now in a12 another. you can make a logcat and you will see the issue

How to create a logcat file

# connect phone with PC and USB
# set USB debug - on
# create a textfile -> eg logfile.txt in adb folder on PC
# adb logcat > logfile.txt
# make actions on phone and wait for issue
# ctrl+c (to stop logfile recording)
# analyze the logfile
# send the last eg 5 seconds, the relevant entries
I'm afraid of creating some trouble I'm not very expert on the subject, on the contrary I define myself as a neophyte, maybe I look forward to the next update it will work again!
 
  • Like
Reactions: katerpanne