Recent

Author Topic: Gradle apksigner  (Read 3181 times)

ADiV

  • Jr. Member
  • **
  • Posts: 90
    • ADiV Software
Gradle apksigner
« on: August 16, 2018, 05:45:03 pm »

I created this ".bat" to be able to assign the key to the apk, without this "Google Play" does not let you upload the apk:

Code: Pascal  [Select][+][-]
  1. set Path=%PATH%;C:\laztoapk\downloads\android-sdk-windows\platform-tools;C:\laztoapk\downloads\android-sdk-windows\build-tools\28.0.0
  2. zipalign -v -p 4 C:\laztoapk\projects\project1\apptest\build\outputs\apk\release\apptest-release-unsigned.apk C:\laztoapk\projects\project1\apptest\build\outputs\apk\release\apptest-release-unsigned-aligned.apk
  3. apksigner sign --ks apptest-release.keystore --out C:\laztoapk\projects\project1\apptest\build\outputs\apk\release\apptest-release.apk C:\laztoapk\projects\project1\apptest\build\outputs\apk\release\apptest-release-unsigned-aligned.apk
  4.  

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Gradle apksigner
« Reply #1 on: November 30, 2018, 09:49:30 pm »
Suggestion Committed to git LAMW repository!!

[New Project Create]
--auto gen "gradle-local-apksigner.bat" [.sh]
--auto gen tutorial "How_to_get_your_signed_release_Apk.txt"

Thank you!


Added: "How_to_get_your_signed_release_Apk.txt"   example:

Quote
Tutorial: How to get your signed release Apk
          warning: you need a google developer account!
 
1)Edit/change the project file "keytool_input.txt" to representative information:"

.Your  google account keystore password: 123456
.Re-enter/confirm the keystore password: 123456
 
.Your first and last name: MyFirstName MyLastName

.Your Organizational unit: MyDevelopmentUnit

.Your Organization name: MyCompany

.Your City or Locality: MyCity

.Your State or Province: MT

.The two-letter country code: BR

.All correct: y

.Your key password for this Apk alias-key: 123456


2)If you are using "Ant" then edit/change "ant.properties" according, too!


3) Execute the [project] command "release-keystore.bat" or "release-keystore.sh" or "release-keystore-macos.sh" to get the "appniceproject1-release.keystore"
            warning: the file "appniceproject1-release.keystore" should be created only once [per application] otherwise it will fail!
 

4 [Gradle]: execute the [project] command "gradle-local-apksigner.bat" [or .sh] to get the [release] signed Apk! (thanks to TR3E!)
            hint: look for [project] folder "...\build\outputs\apk\release"
 

4 [Ant]: execute the [project] command "ant-build-release.bat" [.sh] to get the [release] signed Apk!"
         hint: look for [project] folder "...\bin"


Success! You can now upload your nice "AppNiceProject1-release.apk" to "Google Play" store!

....  Thanks to All!
....  Special thanks to TR3E!

.... 
« Last Edit: December 01, 2018, 11:30:47 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018