Android Compiling in release mode and apk name change
#1
Hello, when following the README.android I don't see anything mentioning how to compile in "release mode".

The APK is a 'debug' version. I can turn off debugging but am wondering if there are other things that are maybe running for debug purposes, which could make a 'release' target run faster?

Also, what file do I need to edit to change the actual name of the APK. From 'Kodi' to 'Snoop' for example? I tried playing with tools/android/packaging/xbmc/AndroidManifest.xml.in but it just broke the compiled app and did not even change it's name.

Thanks for any pointers!!!

PS: when doing this command to bootstrap the android sdk before compiling Kodi, it did not install the build tools such as aapt, dx, etc.. "./android update sdk -u -t platform,platform-tool"
What I did was run "./android" to get the gui to come up and installed the missing build tools. Hope this helps some googlers Smile
Reply
#2
Actually I can't even turn off debug logging. So the size of the log file can get quite big rather fast if you don't restart Kodi often...
Tried using advancedsettings.xml as well to turn logging off to no avail Sad
Reply
#3
Might as well keep talking to myself Smile

I found a way to turn off the forced debug mode so it would accept changes from gui or advancedsettings.xml for debug level changes.

What I did is change this line in tools/depends/target/xbmc/Makefile at line 15:

from:

Code:
ifeq ($(OS),android)
CONFIGURE += --enable-codec=libstagefright,amcodec
endif

to

Code:
ifeq ($(OS),android)
CONFIGURE += --enable-codec=libstagefright,amcodec
DEBUG = --enable-debug=no
endif

Dirty hack and am sure there is a build command or argument for it. I guess it does part of trick for now, don't know if that turned the whole debugging off tho :X

And still no dice on changing the compiled APK name, would really appreciate a little help on this one.

Happy new year everyone and hope this might come handy to someone Wink
Reply
#4
since you already looked into the correct Makefile, you might have noticed the "release" target.
The answer to your other question is in the same file as well. Look for version.txt in the src root.

Just a note though: if you plan to release any rebranded binaries, you need to provide the source as well.
Reply
#5
Hi wsnipex, thanks a lot for the pointers!
I will of course keep my source code public. But I dont mind the reminder Wink

I am very noobish when it comes to compiling... so I've been busting my balls while all I had to do was 'make relase' instead of just 'make' ?? arggghhhh the irony!! Smile

One of the first things I tried was to change the name (to snoop) in version.txt but during make it could not find some scripts named kodi.*** as it was looking for snoop.*** tried renaming stuff around but it never compiled

Will give all this another go and update on my results.

Again, thanks for the tips and the time you guys put into this project!!!
Reply
#6
Ok tried changing the APP_NAME to Snoop in version.txt

When I get to the make -C tools/depends/target/xbmc step I get this error:

config.status: error: cannot find input file: `tools/Linux/snoop.sh.in`

I went into tools/Linux/ and renamed all the tools from kodi to snoop

make went fine but when doing make apk I got an error of java files being looked in tools/android/packaging/xbmc/src/org/xbmc/kodi/

What I did was just copy that folder and name it snoop. There has to be a cleaner way I'm missing?
EDIT: Also this did not work as my apk is crashing once it did it's first run

Concerning the release target what I tried was:

make -C tools/depends/target/xbmc release

This worked for unlocking from the debug only logs, but the apk still comes out with a debug in it's name, so I suppose maybe some things are still in debug mode, or is that normal?

Cheers for any help Smile
Reply
#7
there are one or two android specific cpp files, that have our classname(org.xbmc.kodi) hardcoded, you need to change those to reflect your new name. There was no clean way to make those dynamic.

should be xbmc/android/activity iirc..

edit: and don't worry about the apk name, make release will disable debug stuff.
fixing that filename is somewhere way down on our list.
Reply
#8
Sweet, thanks for the reply!

I'll play around with those and report back, hoping this will help others.

Also, I understand how these things are not priority and it's better that way Smile
Reply
#9
Sorry to bump an old thread - but i'm working with 16.1 and wondered if you made any progress with this?
Reply

Logout Mark Read Team Forum Stats Members Help
Compiling in release mode and apk name change0