DEV Community

Surhid Amatya
Surhid Amatya

Posted on

2 1

Signing apk with .p12

Can I release an android apk using .p12 file? I don't have keystore file?

Regarding this question, developing Android applications for more than 7+ years my answer was NO.

What is .p12 file?

A P12 file (a file with a .p12 extension) is a type of certificate file (a Personal Information Exchange file). The Packager for iPhone uses this type of certificate to build an iPhone application. You convert the developer certificate you receive from Apple into this form of the certificate. So, a .p12 file is for iOS development.

After answering this question in StackOverflow I got to know you can use .p12 file as well to sign an android apk.
Let's jump to procedure to convert your .p12 file to jks file.

Create an empty JKS store

keytool -genkey -alias anyname -keystore yourcertificate.jks keytool -delete -alias anyname -keystore yourcertificate.jks

Import yourcertificate.p12 into yourcertificate.jks

keytool -importkeystore -srckeystore xxxx.p12 -destkeystore xxxx.jks -srcstoretype pkcs12 -deststoretype jks -srcalias xxxx_alias_name -destalias xxxx_alias_name

In some cases you might need to define -destkeypass
otherwise jks file won't password on the key and studio may look for password generating an error.

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
πŸŽ₯ Audio/video file upload with real-time preview
πŸ—£οΈ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
πŸ“€ Export interview's subtitles in VTT format

Read full post

Top comments (1)

Collapse
 
chris_levis_d1e25f4e33755 profile image
Chris Levis β€’

Signing an APK with a .p12 file is a straightforward process using Java's keytool and Android's apksigner. You can convert a .p12 file to a Java Keystore (.jks) if needed or use it directly with apksigner. When signing, ensure you have the correct alias and password, as mismatches can cause errors. Automating this with Fastlane or GitHub Actions can streamline the deployment process. If you're dealing with APK management and distribution, platforms like b9game.pureapk.io/ can be useful for exploring different app deployment strategies.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay