kodi not working after apk renaming
#1
Hi All, I have tried to transfer the Kodi apk to my Alexa echo 15 device, by using the Live App Testing feature (LAT)  available on the Amazon developer platform. In order to upload the apk there, on my developer user account, it is required that the package name is modified, otherwise a conflict with an already existing app is detected (org.xmc.kodi) and the upload is blocked.
I was successful in changing the package name by decompiling and recompiling the official kodi apk, and editing the the package name within certain meta files (apktool.yml, AndroidManifest.xml and some *.smali files), as suggested within the following guide:
https://xdaforums.com/t/how-to-guide-mod...s.2760965/

I changed the name of the package to org.xbmc2.kodi.
But the renamed and recomplied apk, even if correctly installed on the target device, it does not work as expected and crashes for unknown reasons. I think it happens because the app normally read and write files to the /org/xbmc/kodi userdata folder.
After my renaming that folder is changed to something different: /org/xbmc2/kodi creating conflicts between the expected userdata folder name and the actual folder name.
In other terms the default userdata folder name (/org/xbmc/kodi) is hardcoded within the kodi code, so when it is changed to something different in the recompiled apk, then the installed app crashes.

Do you know if a working method exists for correctly changing the package name?
Reply
#2
You have to recompile the apk from the source code after changing the name in the version.txt file: APP_PACKAGE org.xbmc2.kodi

Android build guide
Reply
#3
Do you mean not only to reassemble the android apk with the apktool, but to do that after having the entire Kodi source code recompiled?
Reply
#4
(2023-10-25, 12:41)nabla79 Wrote: Do you mean not only to reassemble the android apk with the apktool, but to do that after having the entire Kodi source code recompiled?

I always recompile the source code with a custom name and never had problems with the generated apk.
Reply
#5
Ok, I understand. Could you kindly share one of your recompiled apk? I'm only interested to the its different name, which allows me to transfer the apk to my personal alexa device only.
Reply
#6
@quietvoid does this https://github.com/quietvoid/xbmc/commit...9eb4d3dd03 for his build available at https://github.com/quietvoid/xbmc/releases/tag/v21-dovi see also his thread https://forum.kodi.tv/showthread.php?tid=371557
Reply
#7
Thank you!
Reply

Logout Mark Read Team Forum Stats Members Help
kodi not working after apk renaming0