[SOLVED] LAMW : building release ? lazarus / 43-Android ---------------------------------------------------------------------- tintinux · 2016-05-09 14:18 Hi To build a release APK, I suppose we first need to generate the file -release.keystore with release-keystore.bat generated in the project directory. First trap : if your system is not english, you must replace the "y" in keytool_input.txt by the first letter of the translation of "yes" Then, a small change was needed in release-keystore.bat, in the last line : replace "keytool" by "%JAVA_HOME%\bin\keytool" because unless you alter the PATH, keytool is not found. After these changes, I have successfully created  the  -release.keystore file But, when I execute Build-release.bat it fails ending with : Code: DOS  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i -post- package: -release-prompt-for-password: -release-nosign: -release- sign:     [echo] Signing final apk... BUILD FAILEDC:\lamw\android-sdk- windows\tools\ant\build.xml:1135: The following error occurred while executing this line:C:\lamw\android-sdk- windows\tools\ant\build.xml:1147: Keystore was tampered with, or password was incorrect: Password verification failed Total time: 9 seconds I have not changed the password 123456 in keytool_input.txt As I said above I have had to change in the file only the "yes". Where can be the solution ? Thanks for help ---------------------------------------------------------------------- freris · 2016-05-13 13:13 Dear tintinux I found a solution for myself.  See below what I did: First download apache-ant-1.9.7 from http://ant.apache.org and put it somewhere in your Hard disk. 1. edit file release-keystore.bat  and check - set correct parameters / paths to your own - Warning !! set JAVA_HOME=F:\Program Files\Java\jdk1.8.0_25 cd E:\laz4android\LamwProjects\Spla keytool -genkey -v -keystore Spla-release.keystore -alias splaaliaskey -keyalg RSA -keysize 2048 -validity 10000 < E:\laz4android\LamwProjects\Spla\keytool_input.txt then run release-keystore.bat  to create a keystore *************************************************************** 2. edit file keytool_input.txt and set your own details *************************************************************** 3. edit file ant.properties  and set your desired password key.store=spla-release.keystore key.alias=splaaliaskey key.store.password=your desired password   <---- here key.alias.password=your desired password again  <---- here too **************************************************************** 4.  edit file build-release.bat  and check - set correct parameters / paths to your own - Warning !! set Path=%PATH%;E:\laz4android\apache-ant-1.9.7\bin set JAVA_HOME=F:\Program Files\Java\jdk1.8.0_25 cd E:\laz4android\LamwProjects\Spla ant clean release -Dout.final.file=bin\Spla.apk then run build-release.bat and get xxxx.apk **************************************************************** 5. edit file install.bat and set names / paths to your own - Warning !! cd E:\laz4android\LamwProjects\Spla\bin C:\Android\android-sdk\platform-tools\adb install -r Spla.apk cd .. pause then run to install on device or emulator I hope help you..... sorry for my bad English freris ---------------------------------------------------------------------- tintinux · 2016-06-02 12:09 OK thanks, it works with all these steps. ---------------------------------------------------------------------- A.S. · 2016-06-02 19:10 About replacing "y" in keytool_input.txt: Is it really a problem? tintinux, what the system do you use? ---------------------------------------------------------------------- tintinux · 2016-06-03 14:40 Hi Anton, Yes I confirm this is a problem in the current version. I'm using Windows 8, localized in French and by default keytool writes messages and expects confirmations in this language. With y on the 9th line of keytool_input.txt, the command retries 20 times and fails ! With o it works fine. I found the solution : add this in release-keystore.bat and it will always work in english ! Code: DOS  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i set JAVA_TOOL_OPTIONS=-Duser.language=en Best regards ---------------------------------------------------------------------- A.S. · 2016-06-03 19:28 Thank you for advice!