How to Sign an APK

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

How to Sign an APK

Post by yetneverdone »

Hi, how can i sign an apk file made with the love2d android port?
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: How to Sign an APK

Post by xNick1 »

You can sign an already compiled apk:

create a key using:

Code: Select all

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
then sign the apk using :

Code: Select all

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
I also found this tool to sign APKs: https://github.com/patrickfav/uber-apk-signer
If you use this one you only need java8.
You can download the jar from here: https://github.com/patrickfav/uber-apk- ... tag/v0.7.0
Then just type:

Code: Select all

java -jar uber-apk-signer.jar --apks /path/to/apks
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: How to Sign an APK

Post by yetneverdone »

xNick1 wrote: Wed May 24, 2017 9:57 am You can sign an already compiled apk:

create a key using:

Code: Select all

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
then sign the apk using :

Code: Select all

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
I also found this tool to sign APKs: https://github.com/patrickfav/uber-apk-signer
If you use this one you only need java8.
You can download the jar from here: https://github.com/patrickfav/uber-apk- ... tag/v0.7.0
Then just type:

Code: Select all

java -jar uber-apk-signer.jar --apks /path/to/apks
Thanks. Is that all the procedure? So, i will do all of that after i use ant release?
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: How to Sign an APK

Post by xNick1 »

yetneverdone wrote: Wed May 24, 2017 3:16 pm
xNick1 wrote: Wed May 24, 2017 9:57 am You can sign an already compiled apk:

create a key using:

Code: Select all

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
then sign the apk using :

Code: Select all

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
I also found this tool to sign APKs: https://github.com/patrickfav/uber-apk-signer
If you use this one you only need java8.
You can download the jar from here: https://github.com/patrickfav/uber-apk- ... tag/v0.7.0
Then just type:

Code: Select all

java -jar uber-apk-signer.jar --apks /path/to/apks
Thanks. Is that all the procedure? So, i will do all of that after i use ant release?
You should be able to sign it also after deploying the apk.
If you use that tool I linked you only need the second part:

Grab the jar of uber-apk.signer (it needs java8): https://github.com/patrickfav/uber-apk- ... tag/v0.7.0
Then just type:

Code: Select all

java -jar uber-apk-signer.jar --apks /path/to/apks
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: How to Sign an APK

Post by yetneverdone »

xNick1 wrote: Wed May 24, 2017 6:28 pm
yetneverdone wrote: Wed May 24, 2017 3:16 pm
xNick1 wrote: Wed May 24, 2017 9:57 am You can sign an already compiled apk:

create a key using:

Code: Select all

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
then sign the apk using :

Code: Select all

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
I also found this tool to sign APKs: https://github.com/patrickfav/uber-apk-signer
If you use this one you only need java8.
You can download the jar from here: https://github.com/patrickfav/uber-apk- ... tag/v0.7.0
Then just type:

Code: Select all

java -jar uber-apk-signer.jar --apks /path/to/apks
Thanks. Is that all the procedure? So, i will do all of that after i use ant release?
You should be able to sign it also after deploying the apk.
If you use that tool I linked you only need the second part:

Grab the jar of uber-apk.signer (it needs java8): https://github.com/patrickfav/uber-apk- ... tag/v0.7.0
Then just type:

Code: Select all

java -jar uber-apk-signer.jar --apks /path/to/apks
Using the first method, ive received:

Code: Select all

No -tsa or -tsacert is provided and this jar is not timestamped. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2044-10-10) or after any future revocation date.

User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: How to Sign an APK

Post by xNick1 »

The second one should be easier!
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 69 guests