Sachin Chauhan
Sachin Chauhan

Reputation: 366

How to check if current Android apk is generated from provided git commit?

As service provider, I want to verify whether the client have published the same git commit apk, which I have reviewed.

Upvotes: 0

Views: 570

Answers (2)

Nick Fortescue
Nick Fortescue

Reputation: 13842

The only way you can easily check is build the APK yourself from the git commit, then check for code identity, maybe looking at the hash of the classes.dex files in the APK.

Upvotes: 0

Tanay
Tanay

Reputation: 33

If it is not being recorded during apk bundling, I believe it would be impossible to fetch. Have a look at this answer to get an idea of how to include a git hash.

Then there are two options
- Either feed that data up in some kind of Analytics (Preferred)
- Or you can go ahead and decompile your apk and hunt through the files.

Upvotes: 1

Related Questions