App Modifications Security Issue

I find that when I modify some apps doing small changes like switching the package name already affects it and the app picks it up and makes the app crash how can I block this integrity check on apps?

What are you using to mod the apps?