Android requires that each Android application must be digitally signed to install into the system, which means that an Android application is not digitally signed and is not installed in the system!Android uses digital signatures to identify the author of an application and to establish a trust relationship between applications, not to determine which applications the user can install finally.This digital signature is completed by the application's author and does not require an authoritative digital certificate signing Authority authentication, it is simply used to make the application package self-certified
If you change one of the files in the APK, or add a new file to the APK, you need to sign the APK again, in the Ubuntu process, such as the following: 2 commands are required for Keytool and Jarsigner, these 2 commands are in the JDK
1: I want to add in apk? A new file, open apk is one of the following
2: Add 1 new files log, delete meta-inf (do not delete sometimes after signing can not install), for example to
3: Use command to get key command: Keytool-genkey-v-keystore android.keystore-alias android-keyalg rsa-validity 20000
Explain:keytool-genkey-v-keystore (generated key name)-alias (key alias)-keyalg rsa-validity (valid)
Android Market enforces that all application digital certificates are valid until October 22, 2033
Need to set up password, can be casually written, but in the signature to use, the following is my random fill
4: Start signing command: Jarsigner-verbose-keystore Android.keystore-signedjar ~/desktop/playerproject.apkplayerproject.apkAndroid
Explain:Jarsigner-verbose-keystore (key name generated above)-signedjar (apk path after signing) (APK path before signature) (alias of key Android.keystore )
This will require the password set above
5: Installation Test
APK Ubuntu under digital signature