On Sat, May 18, 2013 at 11:16 AM, Filipe <[email protected]> wrote:
> Hi,
>
> In Java, how can I determine the date and time when the APK was signed?
> From PackageManager I can get the Signature and the X509Certificate , but I
> did not found a way to know the date and time of when the APK was signed.

JAR/APK signatures can be timestamped, but it's not very common, and I
don't think anyone does it on Android. If your APKs have been timestamped,
you an parse the CMS structure and extract timestamping data.

You can also parse the APK as a JAR file (which it is) and use
JarEntry.getTime()
on, say, classes.dex. This will be close enough, but don't rely on it for
anything important.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to