Android Question Check the package APK name inside of CELL phone

Daniel-White

Active Member
Licensed User
Longtime User
Hi folks.

One simple question, if my APP have this name acme.apk, how can I check the name still the same. the original.

I mean, if an end user download from Google store the name is acme.apk, that is ok, but in other store copy the APK from google store and distribute outside of Google Store, and change the apk name to acme-otherstore.apk.

I guess, We are unable to validate the package name, because it is a simple zip file. right? and we don't have any forensic to check after unzip uncompressed the APK when run our APP.
 

Daniel-White

Active Member
Licensed User
Longtime User
Are the two APKs signed with the same key? If not then you can use this code to find the key signature: Get the APK signature at runtime
I don't know, not yet :confused: , I only compared the files the original APK and the another one , I used FC command of Win7 from MsDOS shell, and the files are identical, So I guess the signature are identical right?, I will apply the "Get the APK signature at runtime" I very appreciated that info :D, Thanks you indeed Erel. :) .

I don't have problem are other stores distributing my APP, my concerns are when modify inside the APK, I will apply the code of B4A to CRC check trick too :cool:

B4X:
Sub GetApkCRC As Long
   Dim jo As JavaObject = Activity
   Dim FileName As String = jo.RunMethodJO("getContext", Null).RunMethod("getPackageCodePath", Null)
   Dim zf As JavaObject
   zf.InitializeNewInstance("java.util.zip.ZipFile", Array As Object(FileName))
   Dim ze As JavaObject = zf.RunMethod("getEntry", Array As Object("classes.dex"))
   Return ze.RunMethod("getCrc", Null)
End Sub

Thanks you Indeed
 
Upvote 0
Top