How to write md5 signature apk to upload on xiaomi store - android

I just wanted to upload my app on xiaomi app store and steps to create a signature build is not clear on develop dashboard there.
I googled but couldn't fine anything useful, can someone please help me to find any doc or steps I need to follow in order to create a xiaomi app store compatible apk file.

Following are the steps to get the signature from MI dev website.
1.jarsigner signature method
You can use the jarsigner tool that comes with the JDK to complete the signing. The command format of the jarsigner tool is as follows:
jarsigner -verbose -keystore [path to your private key] -signedjar [path to file after signing] [path to unsigned file] [name of your certificate]
#jarsigner parameter description: The keystore parameter specifies the absolute path of your private key, for example: c:\mykeystore -signedjar The parameter specifies the absolute path where the signed apk file is stored, such as c:\signed.apk [unsigned file path] Specify the absolute path of the apk file to be signed, which is the one you downloaded from us. For example, c:\unsigned.apk [your certificate name] refers to the certificate name you set when you created the key.
Signing methods for Linux and Mac OS X platforms
Open the Terminal program and enter the decompressed directory of verification.zip downloaded from Xiaomi Developer Station, such as cd ~/Downloads/verification Use jarsigner to sign the command example:
jarsigner -verbose -keystore~/Workspace/mykeystore -signedjar ./signed.apk ./unsigned.apk xiaomi
Windows platform signature method
Open the "Command Prompt" program and enter the decompressed directory of verification.zip downloaded from the Xiaomi developer station, for example, cd C:\Downloads\verification
Example of signing command using jarsigner:
jarsigner -verbose -keystoreC:\Downloads\verification\mykeystore -signedjar signed.apk unsigned.apk xiaomi
The acquisition of the above signature methods should be completed with the assistance of R&D personnel.

Related

Unity3d Android APK file post-processing (DLL encryption)

My game is developed by Unity3d, I need to encrypt the DLL in APK.I add the following steps in build pipeline:
unzip the APK file
encrypt the managed dlls and replace with modified libmono.so (same Unity version, same ABI)
zip & jarsigner & zipalign
jarsigner -verbose -keystore debug.keystore -signedjar "%1"_unaligned.apk "%1".apk %alias%
zipalign -f 4 "%1"_unaligned.apk "%1"_release.apk
The resulting APK can install, but dies immediately after startup, no useful logcat, any helps?

meteor build app can't install on android phone

I generated a apk file by running
meteor build ~/output-dir --server=myapp.meteor.com
,
then got release-unsigned.apk in the folder output-dir, it looks good.
I copy this apk file to my Android phone and tried to install it, after install guide, it shows message App not installed.
I have installed some apk files built by java on my phone before, it works, so is there something I need handle when I install apk file built by meteor?
As the documentation states, you can't install unsigned applications on your Android phone:
Android requires that all apps be digitally signed with a certificate
before they can be installed.
As far as I can tell, you have the following two options to run your app:
Use an emulator to run your unsigned app or
sign your app.
To sign your app, you can use the steps, described in the Meteor guide for submitting Android apps to the Play Store:
Generate a private key using the keytool (skip this step, in case you already have a private key generated):
keytool -genkey -alias your-app-name -keyalg RSA -keysize 2048 -validity 10000
Sign your app using the jarsigner tool:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 unaligned.apk your-app-name
After that, you should be able to install and run your application on your Android phone.

what could I do with HelloWorld-debug.apk file?

I compiled successful project HTML5 to Android by Cordova, it produced some files as HelloWorld-debug.apk, HelloWorld-debug-unaligned.apk ...
Really I don't know meaning of debug, unaligned, I want upload file apk to Android market, this files met enough requirements of Google?
the -debug apk is you app unsigned with debug info. It can be installed on your device. (need to allow installation of unknown apps)
If you want to have a release app you need to run
platforms\android\cordova\build.bat --release
(replace \ with / and remove .bat for unix based computers)
and then to sign the app :
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore pathtoyourkeystorefile.keystore platforms\android\bin\yourapp-release-unsigned.apk nameofthekeyinkeystore
replace pathtoyourkeystorefile.keystore with the path to your previously created keystore file, yourapp with the name of your app and nameofthekeyinkeystore with the name of your key in the keystore
and then your file will still be named -release-unsigned.apk so you can rename it to -release-signed.apk or just .apk and it will be ready to be uploaded to the store.

Can't recompile working APK with APKtool

I decompiled an APK using APKTool 2.0 Beta 9 and then rebuilt all without doing changes to the sources.
Then I rebuilt the APK using this command:
java -jar apktool.jar build myfolder myapk.apk
But I cannot install the generated APK file on my phone. It tells me:
Application not installed.
Am I missing something ?
I even didn't change the code.
Your new recompiled apk is not signed and according to the rules, you cannot install unsigned apk.
One good thing which I like is that you can self sign the apk file.
You will have to use "Keytool" for generating your own certificate.
Here is the command :
keytool –genkey –v -keystore [nameofkeystore] –alias [your_keyalias] –keyalg RSA –keysize 2048 –validity [numberofdays]
This will ask you few things, just fill it appropriately.
Once the certificate is generated, use "jarsigner" for signing your apk.
jarsigner –verbose –sigalg MD5withRSA –digestalg SHA1 –keystore [name of your keystore] [your .apk file] [your keyalias]
Now try installing your new apk file and everything should work fine.
EDIT - I am using keytool and jarsigner commands directly as I have set their paths in PATH variable. In your case, you will have to traverse to "bin" folder of the jdk directory.
/bin/
You need to resign the regenerated APK file using jarsigner:
$ jarsigner -verbose -keystore my-release-key.keystore HelloWorld.apk alias_name

Is there a command I can use to sign my modified apk on the command line in Linux?

I have an apk file that I built using Adobe Phonegap Build. As described in this question, I have to modify the apk generated by Adobe Phonegap Build before uploading it to the Google Developer Console.
I can successfully edit the file, repack the apk, and "zipalign" it. However, I am stuck on signing it. Instructions I have come across on the web assume either that one is using Eclipse, or that one is on Windows. I am on Linux, I don't use Eclipse, and I am at the command line.
I understand that to sign my app I need to have signing keys on hand, but beyond that I am unclear on what commands I need and what the parameters are.
I was able to get the zipalign command from the Android SDK and run it as a standalone at the command line. I'm hoping that there is a similar way I can run a program at the command line to sign my app.
Is there a command I can use to sign my modified apk on the command line in Linux?
For this you use standard Java SE tools: jarsigner and keytool.
From Android documentation on signing:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name
Remember that you should first sign and then align.

Categories

Resources