I have a .keystore certificate(which was generated 10 yrs ago) to sign the apk and I'm signing it using android sigingCOnfig function and it's signing with SHA1 hash algorithm, Can anyone let me tell how to sign with SHA256 signing algorithm with existing .keystore certificate?
How to sign .apk with SHA256 algorithm
2.1k Views Asked by arunkumar A At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in ANDROID-STUDIO
- how do i submit a pastebin or pastee from an android app and get the url back
- Getresource id Error
- Call special fragment in Navigation Drawer Activity from separate Activity
- Debug native code in Android Studio
- How to introduce in this AlertDialog a onBackButtonPressed method?
- Android Studio : All of a sudden cannot resolve symbol 'ActionBarActivity'
- Error connecting to Google Play Games
- Android Studio - Illegal character 8204 error
- Android Studio unable to run the project
- How do I know what is available in minSdkVersion in Android Studio?
- Android Studio update (version 1.2.1.1) - Cannot resolve symbol 'TintCheckBox'
- How to accept cookies when using a webservice - Android?
- How can I always show Android Studios Preview?
- Android Studio cannot recognize "setAdapter()" method
- Error inflating class Android support design
Related Questions in APKSIGNER
- Signing apk works from Android Studio but why the same keystore do not work on command line?
- Android SHA256 signature algorythm with certificate having a SHA1 algorythm
- Fetching the certificate fingerprint if an apk is signed with only v2 Signing Scheme
- apksigner - Invalid keystore format
- How to print certificates of APK using apksigner
- How to reverse engineer an apk without changing its siging information
- Generate CERT.RSA for an APK without jarsigner / apksigner or any java tool
- Is it possible to add a new signature to an existing app?
- How to sign .apk with SHA256 algorithm
- Recompile apk using original certificate
- The apk rebuild by apktool can not be installed even after zipalign and sign
- Sign an apk using keytool
- "ZIP End of Central Directory record not found" error using Apksigner
- ApkSigner fails to sign APK after AGP update to 4.1.0
- Changing method of signing application on Android Studio
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
SHA1 and SHA256 are not signing algorithms but hash (a.k.a digest) algorithms. Hashing is just one operation used during the signing process, and the strength of the key (usually, the number of bits used in the key) is an equally important consideration in the security model since security is as good as its weakest link.
Although you can choose the strength of your key (when you initially generate the keystore), you cannot choose which hash algorithm to use during the signing process. Apksigner (which Android Gradle plugin uses) will automatically choose the strongest hash algorithm supported by the Android platform your app supports. In other words, the hash algorithm used will depend on the value of
minSdkVersionyou define in your app and the type of key (e.g. RSA, DSA, etc.). This is because support for stronger pairs of signing/hashing algorithms were added in more recent versions of Android.Watch also not to fall for a common pitfall which is to look at the hash algorithm of the signature of the certificate itself (rather than the signature of the APK). This signature has no bearing on the Android security model so it wouldn't matter which hashing algorithm was used.