How do you correct a chksum error, after hex editing an .apk?

Sbenny.com is trusted by 1,331,949 happy users since 2014.
Register

Staragox

Apprentice Lv2️⃣
I just changed the version number in an .apk to say "Sbenny". Now I did not add or remove any characters from the file (file size is the same).

But when I try to install it, I get a message "App not installed as package appears to be invalid". I presume this type of error is being caused by a CRC error / chksum error?
 

Staragox

Apprentice Lv2️⃣
Update on question:

I took the original file and created new checksums in the altered file using Apktool_M. And it looks like it created a valid signature, and the .apk file will now install.

But the game immediately just exits, everytime you launch it? Some sort of drm or copy protection (if you make any changes to the file)?

I'm attaching a screenshot of part of the process, trying to figure out what I am doing wrong here.
 

Attachments

Asoul Modder

Hardcore Lv9️⃣
SB Mod Squad ⭐
✔ Approved Releaser
Active User
Member for 2 years
Update on question:

I took the original file and created new checksums in the altered file using Apktool_M. And it looks like it created a valid signature, and the .apk file will now install.

But the game immediately just exits, everytime you launch it? Some sort of drm or copy protection (if you make any changes to the file)?

I'm attaching a screenshot of part of the process, trying to figure out what I am doing wrong here.
Did you need to change the game version?
 

Staragox

Apprentice Lv2️⃣
I was just playing around. Also what I was trying to do, is display the word Sbenny in the lower right corner, when people played the game.

The text I was trying to change (the game version number), was the text that displayed in that corner. So did a search for it in the .apk, and edited it.

Also by experimenting, I am learning how to do things.

I did upload this game (waiting for approval of upload), and in that upload, I didn't change the version number.
 

Staragox

Apprentice Lv2️⃣
Anyways, I did figure out how to fix the checksums.

I tried multiple ways, and got it to work. You can load the checksums from the original .apk and re-calculate them for the modified app, using the tool I am using.
 

Asoul Modder

Hardcore Lv9️⃣
SB Mod Squad ⭐
✔ Approved Releaser
Active User
Member for 2 years
Anyways, I did figure out how to fix the checksums.

I tried multiple ways, and got it to work. You can load the checksums from the original .apk and re-calculate them for the modified app, using the tool I am using.
To recompile I used Np manager
 

Sbenny

A crazy scientist
Staff member
Admin
SB Mod Squad ⭐
✔ Approved Releaser
Active User
Err.. did you sign and zipalign the apk? A checksum is completely unrelated to this matter which may, eventually, just cause the app to crash or not to run properly due to some anti-cheat detections, but if the app doesn't even install, there are no checksum checks in place, it's just usually a signature error. If you, for example, try to install it on a Rooted Android Emulator like Nox App Player (with proper patches done via Lucky Patcher to install unsigned apps), it would install fine.
 
Top