[Samsung Galaxy S7 Guides, News, & Discussion] logicalien:
Hey S7 Users!

I don't know how many of you have experienced the problems that I have encountered while trying to run AOSP (Specifically Resurrection Remix 6.2.0) on the S7 such as passing integrity check or getting the gear app to work but they have been an issue for me. I'll be putting here what I did to get these things to work that I figured out over time and hopefully will save some people time. And sorry if the format is weird it's my first time making a guide and posting.

The problems that I'm going to address specifically are:

- Passing CTS Integrity

- Getting the Gear App to Work

First off, the CTS integrity. When you first install the ROM, you might find that you cannot download certain apps or that apps don't work correctly. Thats because the CTS integrity is tripped. This is because the Phone does not have a proper build fingerprint since it is a Custom ROM.

To fix this you're going to need Magisk (Link) and Magisk Manager and also Terminal Emulator (Link). Follow the instructions and once installed go into Magisk Manager and you can check that your CTS Integrity is False.

Next go to the download modules section

Screenshot

Then search for Magisk Hide Props Config, install it and then reboot.

Once rebooted open terminal emulator, grant it SU access and type "props"

A menu should appear: Screenshot

Now type 1 and press enter and this should pop up: Screenshot

Next type f then this will pop up: Screenshot

From there select the number that corresponds to Samsung or whatever phone you want although I haven't checked this to see if it works but I don't see why not. Then look and find the one labeled "Samsung Galaxy S7 (8.0.0)" should be 16.

Once you have selected 16(or what ever one you picked) type y and press enter to change the fingerprint: Screenshot

After it is finished it will ask you to reboot. Once rebooted go into Magisk Manager and check that CTS Integrity is now true. Also, go and clear the data and cache of the Play Store and the Play Services. Now you can download apps and use Google Pay :D

Now for the real challenge the Gear app. This one stumped me for a long time and made me want to just go back to stock. But I kept going and eventually figured it out.

Setting the fingerprint was only the first step because before you could not install it. Now when you open it it'll tell you that you've made unauthorized changes etc. because it thinks that the S7 is on stock firmware but when it checks it sees that it isn't. So what we are going to need to do is change the build.prop to make it look like a different phone. I'll link mine down below if you want it but it is a herolte (S7 Exenos) so keep that in mind as it might brick your system. This will involve some Linux skills.

For this one it is easier if you do it from a computer and then do adb shell. Enable Debugging in the Developer settings and then adb into the device with:

adb shell

Then

su

(Allow it the Super User Access)

Next you have to set the /system to R/W so do that with the command:

mount -o rw,remount /system

After you have done that type:

cd /system

And then set permissions on the build.prop:

chmod 644 build.prop

At this point what you want to do is exit out of the shell (so type exit twice). Now type:

adb pull /system/build.prop

This will pull the build prop but it goes to different places. I suggest you look up where it stores it as it will vary where it drops it depending on operating systems. For me in Windows it is the following:

C:\Users\<account_name>\AppData\Local\VirtualStore\Program Files (x86)\MyCustomADBInstallLocation\

Now that you have it simply open it in a text editor and edit the following lines:

ro.product.brand=htc (change from samsung to htc)
ro.product.manufacturer=htc (also change from samsung to htc)

After that save the file and then go back to the terminal and type(Assuming you haven't moved the file):

adb push build.prop /sdcard

This will move it to the internal storage since at least for me i could not push it directly to /system

Now do another adb shell and su then type these commands to delete the old one, copy the new one in and then change the system back to read only(This is very important to avoid bootloops!):

rm /system/build.prop
cp /sdcard/build.prop /system
mount -o ro,remount /system

And then exit out of the adb then reboot the phone. If all goes well then it should reboot and the gear app should work now. Woohoo! That was pretty involved and I'm sure there is a more efficient way to do that (feel free to comment and suggest one) but I can guarantee that it works. Also feel free to ask questions and I can try to answer them. Anyways guys if this helped please hit the thanks button. This took many hours for me to figure out and I hope it all works out for you. Cheers!