App called mitID keeps saying my device is rooted

I think you are almost there and dat2img is the right tool for linux. However, it expects a .new.dat file and not a new.dat.br file (which is compressed). Use unbrotli first (Ubuntu Manpage: brotli - brotli, unbrotli - compress or decompress files).
However, I do not understand why you want to modify the system properties of the Divestos build since MitID does not complain about “rooted device” here. That MicroG is missing is a different issue.

I dont wanna change it for divestos. Is foe e/os for oneplus 5. The example with divestos is because you told me that for you it was not even asking for google services in your lineagesos, but in divestos it is asking for it, so I dont understand how you manage to do it to work without google services?
maybe you meant that you use lineage +microG?

descompress but still is not finding it out

./sdat2img.py ‘/home/noax/Videos/system.transfer.list’ ‘/home/noax/Videos/system.new.dat’
bash: ./sdat2img.py: No such file or directory

python is installed

In fact, MitID does not complain about missing Google Services right away. It only happens after one has taken the first steps to activate the app. Basically, it seems to use Google Services for push notifications - to that end, MicroG is sufficient. Sorry for the confusion. I can confirm that I have an activated and working MitID running on a P10 using Lineage with MicroG - after having editied the build.prop to circumvent the “root detection”.

NemID complains right away about missing Google Services, but also works with MicroG.

I guess you have the sdat2img.py in the current folder. Maybe chmod u+x sdat2img.py ?

I have got the system.img using the lineageos instructions. What I have to do with it now?

Mount it as a loopback device (How to mount a disk image from the command line? - Unix & Linux Stack Exchange), e.g. sudo mount -o loop system.img /mnt/tmp

Then go into /mnt/tmp/system and find the build.prop there. Edit it as suggested - replace dev-keys and test-keys with release-keys and lineage with lineege.

If I double click in system.img it gets mount allready. But my thing now is that I cant change the permissions to be just read to be writable the build.prop

~$ sudo chmod a+rwx ‘/media/noax//system/build.prop’
chmod: changing permissions of '/media/noax/
/system/build.prop’: Read-only file system

chmod 777 system.img
noax@noax:~$ chmod 777 ‘/media/noax//system/build.prop’
chmod: changing permissions of '/media/noax/
/system/build.prop’: Read-only file system
noax@noax:~$ chmod ugo+rwx ‘/media/noax//system/build.prop’
chmod: changing permissions of '/media/noax/
/system/build.prop’: Read-only file system
noax@noax:~$ sudo chmod u+x ‘/media/noax//system/build.prop’
[sudo] password for noax:
chmod: changing permissions of '/media/noax/
/system/build.prop’: Read-only file system
noax@noax:~$

mkdir system/
noax@noax:~$ sudo mount ‘/home/noax/system.img’ system/
[sudo] password for noax:
mount: /home/noax/system: WARNING: device write-protected, mounted read-only

sudo mount -o loop ‘/home/noax/system.img’ /mmt/tmp
mount: /mmt/tmp: mount point does not exist.

what to do with a line that says
ro.build.user=root

this has worked!!

Now I have to create a new.dat from the .img?

any help?

I have try to

fastboot flash system system.img

with the new system.img but the phone will never boot?? ups.

And this is what I get if I try to go from .img to .new.dat
~/img2sdat$ ./img2sdat.py ‘/home/noax/system.img’
img2sdat binary - version: 1.7

        1. Android Lollipop 5.0
        2. Android Lollipop 5.1
        3. Android Marshmallow 6.0
        4. Android Nougat 7.0/7.1/8.0/8.1

Choose system version: 4
Traceback (most recent call last):
File “./img2sdat.py”, line 99, in
main(INPUT_IMAGE, OUTDIR, VERSION, PREFIX)
File “./img2sdat.py”, line 62, in main
image = sparse_img.SparseImage(INPUT_IMAGE, tempfile.mkstemp()[1], ‘0’)
File “/home/noax/img2sdat/sparse_img.py”, line 52, in init
raise ValueError(“Magic should be 0xED26FF3A but is 0x%08X” % (magic,))
ValueError: Magic should be 0xED26FF3A but is 0x00000000

Shame that I am not getting more help in here.

I think I am rather patient, but at the same time, I am busy. Glad to read that you made progress. I am a bit confused by the message “device write-protected, mounted read-only” after you mounted in /home/noax/system - are you sure that your changes to the build.prop had any effect? Maybe take a copy of the system.img before the modification and compare it with the file after the modification.

I have never used img2sdat.py; however, it seems that it is an old project. I found this one as well:

Finally, the line ro.build.user=root seems to indicate that the image was built from user root - that should not be a problem.

Thanks forbeen there.

I have been using this tool , but still it doesnt makes it to work. I have change the things using this web
Extracting proprietary blobs from LineageOS zip files | Odd Solutions Wiki
But when I have to pack it again, it doesnt work. And I have try to just fastboot the system.img but then the phone will not get stuck in e/ logo

Which tool did you use to repack in .dat format? Was it img2sdat ?

As an alternative, try to google for Android-Image-Modifier on GitHub. Unfortuantely, I am not allowed to post a link here.

Looking after that I just get photo editors.

You can find the link further above - it was erroneously marked as spam before, but has been restored now.

1 Like

@mrspeccy I have been using that tool and it is not helping me, but after some differents try

I have been able to use the tool properly now.
After I have sideload the new.zip in the phone, I install aurora, I install mitid and the phone is still founded like rooted phone.
I have just change the build.prop in system. Is that enough , or is something else that has to be changed?

Then you will probably need to install Magisk on top of it to hide the unlocked bootloader.

And for that I have to install the app and then the module hide?

Can confirm that MitID will run on Lineage 18.1 after the following:

Install Magisk (I got the 24.3 version) plus the following Magisk modules: MagiskHide Props Config, Universal Safetynet Fix (reboot every time asked to - which is a lot of times)

In Magisk settings enable Zygisk and Enforce DenyList
In Configure DenyList select all Google play related services .
Install MitID app from Play store (don’t open it yet - if you do you must clear the apps cache and storage - under settings and apps)
Add MitId to Magisk DenyList

Edit the file build.prop (I use the app BuildPropEditor from google play)

change the following strings "dev-keys"or “test-keys” to “release-keys”, “userdebug” to “user” and “lineage” to something else fx linage

save and reboot and open the MitId app.

Oddly enough it appears the developers specifically chose to target lineage. First time I missed one instance of lineage in build.props and it still would not run. Seems they are more comfortable with your phone being controlled by some chinese or US company than from the user himself. MitId even will not run after the phone passes safety net tests and google pay works if it finds just one string that says lineage. Really odd priorities if you ask me, and rather amateurish in implementation.

Wish I could just continue with NemID, I am not exactly impressed with MitId or the competence of the developers.

Anyway here you go. Maybe not all these steps are needed, (hopefully someone will test and we can reduce to minimum) but if done it does run.

1 Like

I will try later with magisk. In my case I have dev-keys changed to release-keys. Should I write then user? And for example where in the build is write dev- , should I change it also for stable or release?
thanks for your info.