okuzawatsの日記

Android / Kotlin Enthusiast 🤖

Check Finger Print From Apk Installed

Here is how I checked SHA-1 / SHA-256 finger prints from APK installed in devices. For this purpose, we can use adb commands.

First, check the application identifier. The list of application identifiers installed in a device is obtained with the command below. From the list, pick up the application identifier you want to know the finger prints.

% adb shell pm list package

Suppose that the application identifier is XXX.XXX.XXX. Then, check the path to the apk with the command below. There would be several apks depending on the configuration.

% adb shell pm path XXX.XXX.XXX
package:/data/app/XXX.XXX.XXX-xxxxxxxxxxxxxxxxxxxxxx==/base.apk

Now you know the path to the apk, you can pull it to current directory with adb pull command.

% adb pull /data/app/XXX.XXX.XXX-xxxxxxxxxxxxxxxxxxxxxx==/base.apk

Finally, you can check the SHA-1 / SHA-256 finger prints with keytool command.

% keytool -printcert -jarfile base.apk

#Android

About me 😎

profile

茨城県つくば市在住のソフトウェアエンジニアです。専門領域はAndroidアプリ開発で、特にアーキテクチャに興味があります。某社でAndroidアプリ開発のテックリードをしています。

Jetpack ComposeによるAndroid MVVMアーキテクチャ入門の著者です。

👉 もっと詳しく

Writing 📝

Android MVVMアーキテクチャ入門

Androidアプリ開発の初学者に向けた、MVVM(Model-View-ViewModel)アーキテクチャの入門書を書きました。初学者の方を確実にネクストレベルに引き上げる技術書です。

👉 もっと詳しく

See Also 👀