Kodi Community Forum

Full Version: KODI 18.9 Userdata Change On iOS14?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Noticed when installing KODI 18.9 on iOS 14.1 that it no longer creates /private/var/mobile/Library/Preferences/Kodi/ nor recognizes any files copied there.  I did manage to find /private/var/mobile/Containers/Data/Application/C1B9503E-4A41-4418-8FAB-75B596F9EC95/Library/Preferences/Kodi.  When adding advancedsettings.xml to that location, KODI sees it fine.  Does KODI no longer use the default directories?  If it's supposed to, how do I fix?
Hi,
Is your device jailbroken? If yes, Kodi should use /private/var/mobile/Library/Preferences/Kodi/.
It seems that on your device Kodi currently runs as a sandboxed app (because of the Containers/Data/Application/C1B9503E-4A41-4418-8FAB-75B596F9EC95 path).
Which method did you use to install Kodi?
(2020-11-03, 10:45)sy6sy2 Wrote: [ -> ]Hi,
Is your device jailbroken? If yes, Kodi should use /private/var/mobile/Library/Preferences/Kodi/.
It seems that on your device Kodi currently runs as a sandboxed app (because of the Containers/Data/Application/C1B9503E-4A41-4418-8FAB-75B596F9EC95 path).
Which method did you use to install Kodi?

Yes, my iPad is jailbroken using CheckRa!n.  I used Cydia to update it from 18.4.  The 18.4 version I had previously installed from Cydia used the default location.  I updated to 18.8 recently, and it produced the sandbox problem until I uninstalled and reinstalled KODI which fixed it.  I just updated again to 18.9 and the same problem came back but this time uninstalling and reinstalling from Cydia does not correct it.  How do I get out of the sandbox and have it use /private/var/mobile/Library/Preferences/Kodi/ as it did when I initially installed 18.4?
Kodi itself checks if it is running from the sandbox path (.../containers/Bundle/...).
If Kodi thinks that it is sandboxed then it will use the /private/var/mobile/Containers/Data/Application/xxxxxxxxxxx/Library/Preferences/Kodi path. Else it should use the /private/var/mobile/Library/Preferences/Kodi/ path.

You are right, I am able to reproduce the issue with Kodi 18.9 on iPhone 7. Thank you.
I will open an issue and check what is wrong ASAP.

Edit: issue opens here: https://github.com/xbmc/xbmc/issues/18713
Sounds like the issue only happens with Kodi 18.9
You can manually install Kodi 18.8 from the deb file (https://mirrors.kodi.tv/releases/darwin/) by using Filza (click on the deb file then "Install" button en the top right of the screen, wait until you see "bash-5.0#" line at the end).

Edit: The issue seems to only happens when you install Kodi 18.9 from TheBigBoss repo. You can install Kodi 18.9 from https://mirrors.kodi.tv/releases/darwin/ with Filza and it should works.
So, latest version on Cydia (BigBoss repo) should fix this issue.
If needed, also see this post: https://forum.kodi.tv/showthread.php?tid=358164
Thank you for getting down to the bottom of it and helping me out.  Wink
(2020-11-03, 21:37)sy6sy2 Wrote: [ -> ]So, latest version on Cydia (BigBoss repo) should fix this issue.
If needed, also see this post: https://forum.kodi.tv/showthread.php?tid=358164

Updated to 18.9-1 on iOS14.2 through latest version on Cydia (BigBoss repo).  Also attempted to install manually from https://mirrors.kodi.tv/releases/darwin/ with Filza but latest version is 18.9-0 and also seems to suffer from same problem so went back to 18.9-1.

18.9-1 says:
- Fix crash on start for iOS 14 users. (THIS DID NOT WORK.  HAD TO ISSUE ldid -S /Applications/Kodi.app/Kodi COMMAND TO FIX BLACK SCREEN ON STARTUP)
- Fix issues around directory navigation and incorrectly-set start directories (NOT SURE IF THIS IS THE USERDATA FIX, BUT STILL ONLY LOOKS AT CONTAINER DIRECTORY INSTEAD OF DEFAULT DIRECTORY).
Hi,
You are right.
I just updated my device to iOS 14.2 two days ago and I was able to replicate the issue (it seems that this issue doesn't exist for < iOS 13.5 users, this is why I could not replicate it before Undecided).
Unfortunately I am currently the only one in the team able to test Kodi on jailbroken devices. And my only iOS devices is my main iPhone 7 phone...

It seems that the "hack" that allow an app on a JB device to write files outside the container is currently broken on iOS > 13.5.
This issue only appears on app using dylib from the Framework folder (like Kodi).
I don't know yet if this issue come from checkra1n or ldid or simply if Apple was able to "fix" this thing...
I recently opened an issue here to obtain help https://github.com/checkra1n/BugTracker/issues/1826

The complete story is that the com.apple.private.security.no-container entitlement allow us to write the kodi data folder outside the container path doesn't not work anymore for us.
By using this entitlement on iOS < 13.5 everything works great.
But since iOS 13.5, if we use this entitlement during the fake sign process of Kodi, Kodi just show a black screen on start...
Of course you can fix this black screen by calling again ldid on Kodi binary without the entitlement. But in the other hand you loose the ability to write outside the container folder (this is the issue you have, and also the issue I have now I'm on iOS 14.2 ..).

You can still use Filza to Copy/Paste/Backup files and folder in the container path, but keep in mind that if you remove Kodi, iOS will remove the container folder...

We are currently thinking about a possible "fix" of this issue, the most annoying issue is this black screen bug.
One possible fix would be to completely remove this entitlement from our build/package chain, so that the black screen bug will disappear. Also we can, in the future, put the Kodi data directory in the container Documents folder for all user (JB and no-JB), this way you can access your user data, add-on, log etc directly from the native Files app of your phone and also from the Finder of your Mac when you plug your iPhone.
What do you think?

That being said, I can answer your question ;-)
Quote:- Fix crash on start for iOS 14 users. (THIS DID NOT WORK.  HAD TO ISSUE ldid -S /Applications/Kodi.app/Kodi COMMAND TO FIX BLACK SCREEN ON STARTUP)
When I wrote this line, I was thinking that the latest version of ldid fixed the issue, but had not any device to verify. Now, I know that is wrong :-(
Quote:- Fix issues around directory navigation and incorrectly-set start directories (NOT SURE IF THIS IS THE USERDATA FIX, BUT STILL ONLY LOOKS AT CONTAINER DIRECTORY INSTEAD OF DEFAULT DIRECTORY).
This changelog line doesn't come from, I don't know what this issue fix but it's not related to the data kodi folder location on iOS.

I hope my answer contains enough details so that everybody can understand the reason of this bug.
Unfortunately we didn't notice this issue earlier because of the lack of iOS 14 jailbroken users and tester.

I will try to work on this problem as soon as possible and I will also try to keep this thread updated about the news.

If you have any issue using Kodi in this "degraded" mode, feel free to report your feeling or idea here ;-)

Edit: updated this thread https://forum.kodi.tv/showthread.php?tid...pid2986409
(2020-11-12, 18:28)sy6sy2 Wrote: [ -> ]Hi,
You are right.
I just updated my device to iOS 14.2 two days ago and I was able to replicate the issue (it seems that this issue doesn't exist for < iOS 13.5 users, this is why I could not replicate it before Undecided).
Unfortunately I am currently the only one in the team able to test Kodi on jailbroken devices. And my only iOS devices is my main iPhone 7 phone...

It seems that the "hack" that allow an app on a JB device to write files outside the container is currently broken on iOS > 13.5.
This issue only appears on app using dylib from the Framework folder (like Kodi).
I don't know yet if this issue come from checkra1n or ldid or simply if Apple was able to "fix" this thing...
I recently opened an issue here to obtain help https://github.com/checkra1n/BugTracker/issues/1826

The complete story is that the com.apple.private.security.no-container entitlement allow us to write the kodi data folder outside the container path doesn't not work anymore for us.
By using this entitlement on iOS < 13.5 everything works great.
But since iOS 13.5, if we use this entitlement during the fake sign process of Kodi, Kodi just show a black screen on start...
Of course you can fix this black screen by calling again ldid on Kodi binary without the entitlement. But in the other hand you loose the ability to write outside the container folder (this is the issue you have, and also the issue I have now I'm on iOS 14.2 ..).

You can still use Filza to Copy/Paste/Backup files and folder in the container path, but keep in mind that if you remove Kodi, iOS will remove the container folder...

We are currently thinking about a possible "fix" of this issue, the most annoying issue is this black screen bug.
One possible fix would be to completely remove this entitlement from our build/package chain, so that the black screen bug will disappear. Also we can, in the future, put the Kodi data directory in the container Documents folder for all user (JB and no-JB), this way you can access your user data, add-on, log etc directly from the native Files app of your phone and also from the Finder of your Mac when you plug your iPhone.
What do you think?

That being said, I can answer your question ;-)
Quote:- Fix crash on start for iOS 14 users. (THIS DID NOT WORK.  HAD TO ISSUE ldid -S /Applications/Kodi.app/Kodi COMMAND TO FIX BLACK SCREEN ON STARTUP)
When I wrote this line, I was thinking that the latest version of ldid fixed the issue, but had not any device to verify. Now, I know that is wrong :-(
Quote:- Fix issues around directory navigation and incorrectly-set start directories (NOT SURE IF THIS IS THE USERDATA FIX, BUT STILL ONLY LOOKS AT CONTAINER DIRECTORY INSTEAD OF DEFAULT DIRECTORY).
This changelog line doesn't come from, I don't know what this issue fix but it's not related to the data kodi folder location on iOS.

I hope my answer contains enough details so that everybody can understand the reason of this bug.
Unfortunately we didn't notice this issue earlier because of the lack of iOS 14 jailbroken users and tester.

I will try to work on this problem as soon as possible and I will also try to keep this thread updated about the news.

If you have any issue using Kodi in this "degraded" mode, feel free to report your feeling or idea here ;-)

Edit: updated this thread https://forum.kodi.tv/showthread.php?tid...pid2986409

Makes sense what you're saying.  I'm okay with using a container folder rather than the default folder for now.  Was able to set everything up once I knew where to go.  Thanks!
Hi @kadeschs, I was able to find a fix ;-)
See https://forum.kodi.tv/showthread.php?tid...pid2986409, I updated the steps and also add a "November 14th" edit at the end.
(2020-11-14, 10:48)sy6sy2 Wrote: [ -> ]Hi @kadeschs, I was able to find a fix ;-)
See https://forum.kodi.tv/showthread.php?tid...pid2986409, I updated the steps and also add a "November 14th" edit at the end.

Awesome!  I'll definitely check this out at the next update.
Kodi 18.9-2 is now available on Cydia through the BigBoss repo. This version contains the fix for the black screen issue and also use the old good /private/var/mobile/Library/Preferences/Kodi/ path for the Kodi data folder ;-)
Just to be clear, there is no official 18.9-1 or 18.9-2 version of Kodi. The 18.9-2 (and 18.9-1) version that you can find on Cydia is exactly the 18.9-0 version that you can find on our official website with the exception that the 18.9-2 version contains the fix for iOS jailbroken users. I only bumped the version number in a way that Cydia will trigger an update notification for all users.
Is it just me or the Kodi 18.9-3 finally fixed both the crash bug as well as the directory issue where it was using sandbox directory even in JB mode? I think 18.9-2 was still crashing and I was using the ldid method. But this latest version works great. Thanks for your efforts.
  • 18.9-2: Fix black screen issue AND use "no-sandboxed" path (/var/mobile/Library/Preferences/Kodi) BUT black screen issue remains for iPad users Undecided
  • 18.9-3: Fix black screen issue AND use "no-sandboxed" path (/var/mobile/Library/Preferences/Kodi) FOR ALL devices (iPhones and iPad)
18.9-3 is the same as 18.9-2 but it works for iPad ;-)

Note that even if you install 18.9-2 or 18.9-3, if you run ldid without any entitlements (ldid -S/tmp/entitlements.xml /Applications/Kodi.app/Kodi) after the installation then you will loose the "no-sandboxed" path and Kodi will store its data folder in its container folder. See https://forum.kodi.tv/showthread.php?tid=358164 ;-)

You're welcome Big Grin
Pages: 1 2