Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to sign APK with google upload key der file?

after importing the der file to the key store as follow

keytool -keystore my-release-key.keystore  -importcert 
    -file ~/Downloads/upload_cert.der  -alias uploadcert  

I get an error when trying to assemble release APK

trusted certificate entries are not password-protected

If I add

-protected

to the import, I geth

keytool error: java.lang.IllegalArgumentException: password can't be null

and if I pass the password after -protected I get usage help message. not sure how to pass the password.

Any idea if I am on the right path to sign with google upload certificate der file ?

like image 976
Nabil Sham Avatar asked Oct 18 '17 02:10

Nabil Sham


People also ask

How do I publish an APK signed to Google Play?

Upload the App's APK File to Google Play In your browser, go to the address , click Developer Console and log in with your Android Developer account credentials. Click the Add New Application button to begin adding your app to Google Play. Select the language and the name of your app. Press the Upload APK button.

How do I sign an app with platform key?

Signing Application with the Platform Keys If you are a device vendor and you want to add a system application from the play store, you need to sign that application with the same keys you have signed the ROM. The keys are located in: build/target/product/security : platform.


1 Answers

Got the same problem and password can't be null problem may be passed by editing the comment like:

keytool -keystore parkimayaz.keystore  -importcert -file 
~/Downloads/upload_cert.der  -alias uploadcert -keypass "yourpass" -
storepass "yourpass"

Another info I used characters like (',#,^) on the password part which gave me some errors.

also please take a look at oracle keytool docs

like image 157
Öncü Öztekin Avatar answered Sep 28 '22 03:09

Öncü Öztekin