The app's integrity check failed


Thanks for all that info, i added the script, but now the amt app crashes on start, might there something have been changed
I do not personaly use that app. So This might not help you further but when I tested it enabling other hooks ( the Tracking group ) caused all sort of crashes. if that is not the case igor's answere is probably more on point. So enable only that single hook with the pro app to make sure.
 
I do not personaly use that app. So This might not help you further but when I tested it enabling other hooks ( the Tracking group ) caused all sort of crashes. if that is not the case igor's answere is probably more on point. So enable only that single hook with the pro app to make sure.
Its an issue with android 12, back on 11 all works fine
 
You can hook their checkIntegrity method to bypass the check. An easy way to do that would be to use xprivacylua.
A very short tutorial would be like this:
Install magisk alpha enable zygisk
install lsxposed for zygisk
install xprivacylua and enable it in lsxposed also enable it for amt app
add the following hook to xprivacylua
enable the hook for amt app (only enable this one hook others can crash the app)
enjoy

xprivaylua script:
Code:
 {
      "builtin": false,
      "collection": "Privacy",
      "group": "Use.Tracking",
      "name": "DeviceIntegrityCheck\/checkIntegrity",
      "author": "B!",
      "version": 0,
      "description": "Skip asitplus device integrity check",
      "className": "at.asitplus.utils.deviceintegrity.DeviceIntegrityCheck",
      "methodName": "checkIntegrity",
      "parameterTypes": [],
      "returnType": "void",
      "minSdk": 1,
      "maxSdk": 999,
      "minApk": 0,
      "maxApk": 2147483647,
      "enabled": true,
      "optional": false,
      "usage": true,
      "notify": false,
      "luaScript": "function before(hook, param)\n  param:setResult(nil)\n  return true\nend\n"
    }

Explanation:
The "checkIntegrity" method checks for root, safetynet, bootloader status basically everything. It does not return anything but throws an exception if anything goes wrong. So we skip it all together.

Disclaimer:
This is only intended for education and so on ;) I am not responsible for any misuse and bla bla.
Also this is the first time I used xprivacylua or xposed hooks, so if there are better ways, do it that way :D
I was just curious

Edit: iirc to use a single hook, you need xprivacylua pro companion app. That feature costa 3,60€ i think, but the app is pretty awesome and worth the money. If you want to not use xprivacylua you can write your own xposed module and hook the mentioned method.
You are referring to use Zygisk?
In that case it does not need to be Magisk Alpha, it could be Stable or Canary as well?

Or you need Alpha because you must use MagiskHide instead of the new DenyList?
 
  • Like
Reactions: B!GBOY
You are referring to use Zygisk?
In that case it does not need to be Magisk Alpha, it could be Stable or Canary as well?

Or you need Alpha because you must use MagiskHide instead of the new DenyList?
Many roads lead to Rome…

here is my way…

Android 11 with Magisk v23 / LSPosed / LSPosed Modul xprivacylua and Playstore App xprivacyluapro
 
  • Like
Reactions: Poney70 and zgfg12
You are referring to use Zygisk?
In that case it does not need to be Magisk Alpha, it could be Stable or Canary as well?

Or you need Alpha because you must use MagiskHide instead of the new DenyList?
Yes, you do not need the alpha. At the time I was using it so I mentioned that in my post :)
I will update it to prevent confusion
 
There is a tool called dex2jar. You can use that to convert the dex file of the app (where the code is) to a java jar file and then use java decompilers like jd-gui or others (there are even online sites) to get the decompiled source code.

After that you have to be creative to find out where the relevant code is. Especially because android apps are usually obfuscated.
You can use string references and other non obfuscated stuff to find the relevant functions.

I'm not an android developer but I like coding and computers in general.
Hey, I just found this thread and wanted to add my 2 cents. I tried exactly what you described, decompiled the app, disabled the root etc checks, recompiled it and...it turns out there are signature checks in place which prevent "Handysignatur" from signing modified apps. I am sure it is possible to workaround this issue too but I was just done with it back then. The proposed solution using xprivacylua seems to work pretty good tho :)
 
Hi,
I just quickly read through it because I am thinking about ordering the Mi 11 Ultra.
I would be in the same situation in Austria with my banking apps like George, Curve, Easybank, Google Pay and of course Digitales Amt.

Wouldn't it be better to stick with the original ROM (the chinese ROM and switch to English)?

What I have read so far should those apps run more easily.
Does anybody have some valid information on that or any experience?

Only downside is that you only have English as another language option which is fine for me.
 
Google Pay will not work on a Chinese device with a Chinese ROM.
It is not certified by Google and does not contain Google services.
 
  • Like
Reactions: mofly4
@B!GBOY
Thank you for the script. It has made my everyday life under Android 11, 12 and 12.1 much easier.

To all those who use the app with root: Version 2.2.0 has been released and integrity checking has struck again for me. But I use Android 13, which is not officially supported by XPrivacyLua at the moment. What about Android 11 or 12 and 2.2.0 with the script? Thank you.
 
  • Like
Reactions: B!GBOY
@B!GBOY
Thank you for the script. It has made my everyday life under Android 11, 12 and 12.1 much easier.

To all those who use the app with root: Version 2.2.0 has been released and integrity checking has struck again for me. But I use Android 13, which is not officially supported by XPrivacyLua at the moment. What about Android 11 or 12 and 2.2.0 with the script? Thank you.
I am using Android 12 with 2.2.0 and XPrivacyLua. Working just fine, but I hat to enable "Read Identifiers" for Digitales Amt in XPrivacyLua. Not sure why tho, it was trial and error.
 
It might be due to XPrivacyLua Pro, which does not execute the script under Android 13. I tried the whole thing on Android 11 and it worked perfectly.
 
Last edited:
Hello I tried all things from here installed lsposed XPrivacyLua Pro and XPrivacyLua

But the message for unlocked bootloader doesn't go away.


!! Update !!
Don't know what I do but now it has worked.
Logged in in the app and digital driving license app works also ☺️
 

Attachments

  • IMG_20221113_193138.jpg
    IMG_20221113_193138.jpg
    25.3 KB · Views: 152
  • Screenshot_2022-11-13-19-32-55-275_eu.faircode.xlua.pro.jpg
    Screenshot_2022-11-13-19-32-55-275_eu.faircode.xlua.pro.jpg
    289.5 KB · Views: 155
  • IMG_20221113_193219.jpg
    IMG_20221113_193219.jpg
    250.6 KB · Views: 180
Last edited:
@viruz and others
If XPrivacyLua and XPrivacyLua Pro cause problems that prevent the script from running, I can recommend the Scriptable Xposed module "WeiJu2". The creator (zhipingne) has thankfully adapted the script from @B!GBOY. This should make it work also.

Code:
local DeviceIntegrityCheck = import("at.asitplus.utils.deviceintegrity.DeviceIntegrityCheck")

hook {
  class = DeviceIntegrityCheck,
  returns = void,
  method = "checkIntegrity",
  before = function(this, params)
    return nil
  end
}
 
  • Like
Reactions: viruz