[Galaxy S6 Android Development] negroxxx:
[MENTION=4187311]Setialpha[/MENTION]

I'll try this method using nanorom 5.9.0a

If a user can achieve more please confirm

http://xdaforums.com/apps/magisk/discussion-pokemon-magisk-discussion-t3465722/page122

01/11 INFO for Samsung Galaxy users searching for a Safetynet (SN) Green Response

Updated info for Samsung Galaxy users searching for a Safetynet (SN) Green Response after Oct. 31 update.

First of all, I apologize for posting this here (because it doesn't involve Magisk) but I'll do it because I know it is mainly Magisk users who were affected by the update and because I didn't find another proper thread to post it (Suhide is not also used). So if anyone find a better/more proper thread to post it just let me know and I will move it.

[] Confirmed working until now on Galaxy S6/Galaxy S6 Edge running Alexis Rom 7.1.1 with Arter Kernel

*What is working: Root (with SuperSU) + Custom Rom/Custom Kernel/Stock Kernel/PermissiveOrEnforcing SELinux status + Pokemon GO lastest version with GREEN response in Safetynet Helper and working Xposed Modules related to Pokemon Go (Snorlax latest version)

*What is not working: Other modules not related to Pokemon Go, like YouTube adaway or XtouchWiz are not working while Xposed is "disabled" (they won’t work while you play Pokemon Go, but if you "enable" Xposed Framework they will work just fine, so you can use your phone normal with all the modules and just disable Xposed when playing Pokemon Go).

-----

*Files you will need: ADB drivers for your specific Samsung model // RootPatch files (all the credits go to the original author Shakalaka) // SR2-SuperSU-v2.78-SR2-20161029143931.zip (all the credits go to the original author Chainfire) // RootSwitch-1.3.3.2.zip (Shakalaka again! I like his name ) // Xposed Framework 86.1 or 86.2 (xposed-v86.1-sdk23-arm64-custom-build-by-wanam-20160904.zip or xposed-v86.2-sdk23-topjohnwu.zip (all the credits go to their respective authors) // Your Rom files and TWRP 3.0.2 (only if you decide to start from zero) // Proper uninstallers for Magisk/Xposed/Suhide/Root/etc // Arter Kernel (only if you want to change yours).

* The first step is to have your phone working and communicating with your PC through ADB mode. A simple search will point you in the right direction of how to have your phone working properly in ADB mode. Different methods may be needed according to your model, but usually it’s just a matter of installing the proper drivers. Also, extract in one folder of your PC the files from the archive RootSwitch (RootPatch).

* You need to start all the procedure with a GREEN SN response!

-----

1- Get your rom back to its initial Safetynet GREEN status (this obviously means that you need to uninstall root). You can do this in many different ways:

The first one and most recommended is to fully uninstall Xposed + fully uninstall Magisk + uninstall previous related apks. ALSO, if you had suhide please uninstall it properly. You can do this by flashing their respective uninstall zip files in recovery and uninstalling the related apps normally in system mode. You can follow this steps to do so:

a. Uninstall Makisk Manager apk and Root Switch apk: just through the normal uninstall procedure of any app you have in your phone.

b. Uninstall Xposed: Flash in recovery xposed-uninstaller-20160211.zip (if you were using Wanams 86.1 version) or xposed-uninstaller-topjohnwu-20160820.zip (if you were using topjohnwu 86.2 version). Then wipe dalvik/cache.

c. Uninstall Magisk V8: Flash in recovery Magisk-unistaller-20161004.zip. Then wipe dalvik/cache.

d. Uninstall Suhide (only in case you were using it) by flashing suhide-rm-v0.51.zip

e. Reboot into system

f. Open Safetynet Helper App (you can download it from the Play Store) and check your response.

If you are lucky you will have a GREEN response in Safetynet and, of course, you won't have root, and Xposed app will show a red screen saying framework is not installed. Consider yourself lucky!

If after doing this steps you get a blue screen in Safetynet, then probably you may have the same case of my phone/Rom and you will need to do the following steps:

a. If you use Arters kernel, then just reflash it and wipe dalvik/cache. Then SN should return a GREEN response.

b. If you use another custom kernel, then try reflashing it. Keep in mind 2 things: Arters kernel doesn't include root by default, so that is why it always works fine just by reflashing it, with no further steps needed. BUT if your kernel auto roots your phone, then you will need to flash it, then reboot into system and unroot in the same way you usually do (probably with SuperSU app option or through recovery flashing the respective unroot zip file)

The idea is to have your Rom with a GREEN Safetynet response, with no root and with no Xposed. This is needed to make things work properly, because only by starting with a GREEN response the rest of the guide will work.

If none of the options until here worked, then I'm afraid this is your last option:

a. Reflash a Stock Firmware from Sammobile. A stock kernel/rom should not triger Safetynet, it should be green and with Pokemon Go working. This will leave you with stock recovery/kernel (so you will need to flash TWRP 3.0.2 in Odin if you want to make nandroid backups) and you will have to use your Rom as Stock.

( ) AGAIN, supposing you are using a Custom Rom that uses SuperSU root. Reflash your kernel, unroot with SuperSU app, then check Safetynet, if it is green you don´t need to change your current kernel. If its blue, then you will probably need a different kernel for your phone. Those kernels that comes with no root has better chances of helping you get a GREEN SN response.

*Please BE SURE to use only kernels that are specific for your devices, don't 'break' your device unnecessarily.

** If you didn't Wipe Dalvik/Cache it on the previous steps, please Wipe Dalvik/Cache before you continue, as some Xposed files only dissapear with this.

***Suggestion for S6 and S6 edge users: I use Alexis ROM and Arter Kernel on my Galaxy S6 Edge, if you have never tried a Custom Rom for your Galaxy S6, you can be sure this Custom ROM+Custom Kernel is one the best combinations available for our phone models. Latest version 7.1.1 works fine.

---- CHECKPOINT 1----: reboot/double check that SN is GREEN/PASSING and that POKGO works fine, if you did well on the previous steps your Safetynet Helper result should be GREEN. If you are with a different screen report and tell which kernels/roms you are using and which ones did you tried, because having a blue/red screen is probably related to your kernel/rom choice or with an unsuccessful uninstalling procedure of previous Xposed/Magisk. If you are GREEN in Safetynet Helper, I suggest you make a full nandroid backup (or at least of the boot.img part, it will save you some time and troubles later)

----

2- Search for the folder were you extracted the RootSwitch patch files. You need 2 files: custom_ramdisk_patch.sh and dot.supersu. Then, supossing you already have your ADB drivers working, connect your device to your USB port and accept the connection in your device. Then inside the folder where you have your ADB files press Ctrl + Shift + Right click on a free space of the folder to open the right click menu to select the option "open a new command window here". A CMD window should open, type: adb devices , and if your drivers were installed correctly you will see your device listed. If you don't see your device listed then don't continue, just search for the proper way to have your phone working with ADB mode and try this step again.

Now reboot your phone into TWRP recovery (leave the USB cable connected to your PC) and in the CMD (same black window from the last step type: adb push custom_ramdisk_patch.sh /data

And press enter. You will see that a file was transfered/pushed to your phone. Then in the same window type: adb push dot.supersu /data/.supersu

And press enter again. You will also see that another file was transferred.

Then in your phone press the Install option and flash the SR2-SuperSU-v2.78-SR2-20161029143931.zip file in systemless mode.

* In my phone/Rom in autoinstalls in Systemless mode by default. BUT If your phone/Rom doesn't do this then you will need to type the command: echo "SYSTEMLESS=true" > /data/.supersu in TWRP Terminal option before flashing the file.

----

3- After flashing SR2-SuperSU-v2.78-SR2-20161029143931.zip reboot into system mode and open the superuser app once and then close it. Confirm that root is working in your phone (if booting tool longer than normal then you are probably rooted. If booting is very fast, then probably you didn’t install root properly). You can confirm that you have root by opening an app that uses root (like Adaway or TitaniumBackup), it will ask for root permissions. If root is working, then you can continue with the next steps.

* Please keep in mind that NO Suhide flash is needed! It will trigger SN. Don’t flash any Suhide.

----

4- Install Root Switch 1.3.3.2 apk file. Open it once, it should ask for root permissions, accept them and then close the app and open it again. Now press the root “disable” switch. NO XPOSED OPTION SHOULD BE AVAILABLE AT THIS POINT OF THE GUIDE, if you have something saying “magisk is not supported” or “Systemless Xposed is not supported” then I suggest you read and redo the first steps of the guide again.

----

5- Check your SN response. It should be green if you did everything well.

---- CHECKPOINT 2----: With SuperSU + Root Switch “disabling” root you should have root working properly and with a GREEN/PASS Safetynet response. Check that in fact it is working for you. If you have a blue/red screen, then reopen the Root Switch app and try enabling and disabling root again.

If this doesn’t work, then probably you have a Samsung device were this method doesn’t work.

If you do have everything in order, REENABLE ROOT IN THE APP!, then reboot into recovery and make a full nandroid backup!! Here is not optional. Just do it! …you don’t want to do all this steps again .

----

6- Flashing Xposed: my advice is to use Wanams Samsung Xposed file. Flash it in recovery mode and then reboot and install the latest Xposed apk (by topjohnwu). You could also use the old Xposed apk, it is up to you. You should now have a green screen saying you have framework installed and working properly.

* Keep in mind some things when flashing Xposed files:

a. If you had any different version of Xposed installed and you didn’t uninstall it properly, then it will probably cause problems. Uninstall Xposed with the proper zip file as mentioned in previous steps.

b. Important fact! every time you uninstall Xposed you need to WIPE DALVIK/CACHE. Otherwise files will remain triggering Safetynet and messing with the installation of other Xposed versions.

c. If you have a red screen on Xposed app reboot into recovery and flash again Xposed. Then only to options that would work are when you get a green screen or a yellow/orange screen (mentioning that the framework is installed)

* If Wanams version doesn’t install properly, then you can try to install version 86.2 in SYSTEM mode. The installer has to mention it is installing in SYSTEM mode. Otherwise it won’t work/it won’t be hidden.

Continue to the next steps when you have Xposed installed properly.

----

7- Open Xposed app and grant root acces to Xposed (to do this press soft reboot option in the app and it will ask for root permissions). Install your Xposed modules, activate them and reboot.

----

Safetynet should be Blue (failing now) up to this point because it detects Xposed. When you double check that Xposed is installed and your modules are working normally you can continue to the next steps (hidding Xposed so you can play Pokemon Go while Snorlax is doing its magic)

----CHECKPOINT 3----: Safetynet should fail and give you a blue screen but root and your xposed modules should be working. Try with other modules like Youtube Adaway or just make sure they are working. Only if Xposed modules are working, continue with the next steps.

-----

8- Open the RootSwitch-1.3.3.2 apk again and this time you should have a Switch for Xposed as well. Disable ONLY Xposed first (the second option/switch at the bottom) and it will soft reboot (it is normal and necessary to make the hide trick work)!

----

9- Open the Xposed apk and if everything went well it will show a yellow screen BUT your Pokemon modules will be working (Snorlax).

----

10- Open the RootSwitch-1.3.3.2 apk again and this time disable root. Both switchs should be gray/disabled. Then go and open the Safetynet app response and it should be GREEN. If you have made it this far go and try Pokemon GO and check that in fact Snorlax is working. If it is working…you already know what to do: make a full nandroid backup and keep it safe in your pc .

* Keep in mind that TWRP full backups are big and might take a lot of space from your storage. I usually only keep the last backup (where everything is working).

-----

11. Lastly, TO KEEP IN MIND: when you reboot your phone your Xposed modules (Snorlax) will probably not work anymore after reboot. To make things work properly after a reboot:

a- Open Root Switch app

b- Enable root and then Xposed (it will soft reboot)

c- Do a normal reboot (Xposed screen should be green and safetynet should be failing)

d- Open again root switch app and disabled Xposed again (it will soft reboot)

e- Then disable root and you are good to go. Snorlax should be working fine again.

I am sure that at least the latest version of Snorlax is working until the date of this post (01/11), but I haven´t tried other versions of it.

----

12- Enjoy the game with the proper IV’s!!

----

[ ] If this was helpful to you I would like to ask for 2 things:

1- Press the thanks button

2- The most important. Please quote the post specifying which phone model did you use, which rom, which kernel and if you did any other step to make it work. Only like this I can keep the post updated with the Samsung models that have been confirmed working.

Thanks a lot!.