[Redmi 9A Guides, News, & Discussion] XTos24:
Hi Guys!

Good news!!! :)

After a lot and lot of work and reinstall and researching and trial and error I managed to install my banking app to LOSv19.1 as well!

(All together I didn't liked the annoying lag of LOSv20.0 64bit, although finally I managed to tweak the memory management (via tuning the LMKD system properties) and achieved that the apps didn't reload all the time when switching between them even after minutes and after locking screen, etc...

I'll write the details into this post...

Getting back to v19.1 was a delight... So much faster almost no lag...!)

Getting back to the original topic: how I managed to start my banking app...?

Fortunately I was lucky as my guess was right: it just checks some properties when starting..!

Which ones I didn't know, but I reverse-engineered them from the installed APK and the binaries... ;)

I just looked for "ro." and "vendor." and "sys." and "lock" etc and found a lot of them which was a very promising sign...

Of course I tried to change them with setprop but without success even with root permissions.

So I drilled down how could I change them, but found that it's basically just possible how Magisk does it with "resetprops". But I didn't want to install it, as the banking apps could easily detect it even after uninstalling (about this I attach a text file with all the "*magisk*" files from the whole filesystem I found in the different stages: after Magisk APK installed, after uninstalled, after APK removed, and after reflashing the MIUI 12.5.7 / Android 11 official boot.img, strangely there remain a lot of files, even after uninstall... but reflashing the original, manually saved boot.img solved it, even after that, I manually removed the few remaining dirs/files, just to be on the safe side...)

But before removing Magisk completely, I tried to save the "resetprops" binary file.

After completely removing the files I tried to copy back and use "resetprops" and it worked!!

To have this file permanently in the /system/bin I copied it in recovery mode with /system_root mounted in read/write mode:

mount -o remount,rw /system_root

and then push the file here:

adb push resetprop /system_root/system/bin/resetprop

and added the appropriate chmod:

chmod 755 /system_root/system/bin/resetprop

and then restarted my phone to normal mode...

So I changed the properties (which my banking app checks) with the typical "good values" (took from other PIF / Safetynet Magisk modules' source files) and then my banking app finally started...! :cool::giggle:

Nevertheless I also checked (just for fun) YASNAC and I also managed to get the Basic integrity with setting these props to to right values!

(CTS test failed but none of my apps need it fortunately...)

I was really surprised... I just gave it a try and it worked..!

Here are the props which I modified right before starting the app:

ro.boot.flash.locked=0 -> 1
ro.build.flavor=lineage_garden-userdebug -> lineage_garden-user
ro.modversion=19.1-20221102-UNOFFICIAL-garden -> 19.1-20221102-OFFICIAL-garden
ro.boot.verifiedbootstate=orange -> green
ro.debuggable=1 -> 0
ro.secure=0 -> 1
sys.oem_unlock_allowed=1 -> 0
ro.oem_unlock_supported=1 -> 0

(I didn't test yet which ones are needed exactly...)

And these are which I didn't modify at all:

ro.product.model=Redmi 9AT
ro.product.device=dandelion
ro.product.name=dandelion_eea
ro.serialno=IJ8DVGEYGAROUKGE
ro.allow.mock.location=0
ro.bootloader=unknown
ro.bootmode=normal
ro.hardware=mt6762
ro.kernel.qemu=<empty>
ro.boot.vbmeta.device_state=<empty>
ro.boot.veritymode=<empty>
ro.boot.warranty_bit=<empty>
ro.vendor.boot.warranty_bit=<empty>
ro.vendor.warranty_bit=<empty>
ro.warranty_bit=<empty>
ro.boot.warranty_bit=<empty>
ro.boot.vbmeta.digest=<empty>
ro.is_ever_orange=<empty>
ro.kernel.android.qemud=<empty>
ro.kernel.qemu=<empty>
ro.kernel.qemu.gles=<empty>
vendor.boot.vbmeta.device_state=<empty>

So with just setting a few system properties with only 1 binary file I managed to:

pass the basic integrity test (checked with YASNAC)

start my "picky" banking app

also install Revolut from Play Store

Without (a complete) Magisk and any modules and tools...!

The only "issue" (task) I have to solve now is: how to set these props automatically at the end of the normal boot process...?!

For the first time I thought it will be easy-peasy: just put a shell script to a directory, but it seems a bit harder so far... :ROFLMAO:

It looks like I have to register my script into the "official" init process which is located in the "boot" partition, so I have to unpack it and modify and repack and reflash...

I don't know yet that it will be possible but I hope... after so much work and a success.

If any one could help me with this I'd appriciate it a lot..!