Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply APK file for verification #2

Closed
matchboxbananasynergy opened this issue Dec 28, 2023 · 10 comments · Fixed by #44
Closed

Supply APK file for verification #2

matchboxbananasynergy opened this issue Dec 28, 2023 · 10 comments · Fixed by #44
Labels
enhancement New feature or request

Comments

@matchboxbananasynergy
Copy link
Contributor

The way AppVerifier currently works, an app has to first be installed before the app can find it and verify it.

Ideally, AppVerifier should be able to accept an APK file and allow the user to verify it before needing to install it.

@soupslurpr soupslurpr added the enhancement New feature or request label Dec 28, 2023
@life00
Copy link
Contributor

life00 commented Dec 30, 2023

Might be useful to hook up an Installer prompt right away if verification is successful. If #5 is implemented it might be especially nice to first pass the APK through AppVerifier and if successful prompt to install (obviously its better to implement this at OS level, but 🤷).

@matchboxbananasynergy
Copy link
Contributor Author

I wouldn't want AppVerifier to be responsbile for installing apps, personally.

@life00
Copy link
Contributor

life00 commented Dec 31, 2023

Could be an optional setting?

@soupslurpr
Copy link
Owner

I don't think it should install the app either.

@soupslurpr
Copy link
Owner

soupslurpr commented Dec 31, 2023

It seems https://android.googlesource.com/platform/tools/apksig/ should be able to be used for parsing the APK file to get the SHA-256 hash of the signing certificate.

com.android.tools.build:apksig

@soupslurpr
Copy link
Owner

Hmm but then what to use for getting the package name?

@soupslurpr
Copy link
Owner

Right, we can parse the manifest manually I think

@lberrymage
Copy link

It seems https://android.googlesource.com/platform/tools/apksig/ should be able to be used for parsing the APK file to get the SHA-256 hash of the signing certificate.

com.android.tools.build:apksig

apksig would work, but there's actually an OS API for this: https://developer.android.com/reference/android/content/pm/PackageManager#getPackageArchiveInfo(java.lang.String,%20android.content.pm.PackageManager.PackageInfoFlags).

@soupslurpr
Copy link
Owner

soupslurpr commented Jan 5, 2024

Hmm but that won't be able to be used with SAF since it accepts a path

@soupslurpr
Copy link
Owner

soupslurpr commented Jan 5, 2024

Oh wait never mind can just copy the file to cache directory temporarily.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants