[android-developers] Re: apk validation by file size

2009-09-08 Thread Lee
PackageManager#getPackageInfo() returns a PackageInfo which has a signatures field. Thanks Mark, should've thought of PackageInfo ahem. I don't think you have any supported means of figuring out the size of the APK on the device. Well the thing is just lying around in the file system, it's

[android-developers] Re: apk validation by file size

2009-09-07 Thread Dianne Hackborn
The best way is to check the certificate it is signed with, since nobody can sign with a certificate that they haven't been given the private key for. That said, if they have tampered with your .apk, they can also tamper with your code, and change whatever check you may have. On Mon, Sep 7, 2009

[android-developers] Re: apk validation by file size

2009-09-07 Thread Lee
The best way is to check the certificate it is signed with, since nobody can sign with a certificate that they haven't been given the private key for. That said, if they have tampered with your .apk, they can also tamper with your code, and change whatever check you may have. Is there system

[android-developers] Re: apk validation by file size

2009-09-07 Thread Mark Murphy
Lee wrote: Is there system code that I can call for that ? Any keywords you could throw in ? PackageManager#getPackageInfo() returns a PackageInfo which has a signatures field. My original question, is the APK size the same on any device once created ? I don't think you have any supported