[Galaxy Note 4 Q&A, Help & Troubleshooting] kaszebci:
I had another round of fighting the same issue. And the solutions proposed by @xero4zero seem to be best (even though they might be not trivial to apply).

I decided to use Magisk+NanoDroid. Here is some explanation, and my steps with some notes of the issues I stumbled upon:

-1. what are those strange names

Magisk is a rooting tool, with additional features - it allows more control over boot process and allows hooking (adding custom code) in many places within the system. When Magisk is installed, you can make use of its features by installing Magisk Modules. We need it because it provides root, but it also makes it easier for NanoDroid to run - NanoDroid is able to use these hooks.

NanoDroid in a pack of tools which make it easier to install free alternatives for Google Services. There is a package which patches the Android to allow these tools to run (NanoDroid-patcher), and the actual microG package (NanoDroid-microG). NanoDroid also integrates F-Droid, which is an alternative store (you can install F-Droid independently on any device, it's just an app store).

TWRP is a very good replacement of Android Recovery partition, which allows you to do a lot of things interactively (standard recovery just shows you a picture and expects you to control it from PC). TWRP has a lot of features and became a de facto standard starting point for any modifications to stock Android images.

0. starting point

For me it was Note 4 with stock Android 6.0.1 image marked "MMB29M". It had TWRP already installed (so install it first if you want to follow the steps below).

If you're seeing the "Unfortunately, Google Play Services has stopped" message and that is preventing you from doing anything, connect your Note 4 to a PC and do:

```

adb shell

su

pm disable com.google.android.gms

```

(That's assuming you have rooted device, ADB enabled in Android settings, and a client on PC. If not - search the web for details or use another method of disabling the GMS.)

1. install Magisk

Other roots (ie SuperSU) need to be uninstalled before installing Magisk!

Rename APK to ZIP, then install inside TWRP (`Select Storage`, `Install Zip`).

Read the linked howto for details.

2. Run the Magisk app

If it doesn't start, uninstall and re-install APK only, without going to TWRP:

```

adb uninstall com.topjohnwu.magisk

adb install Magisk-v24.2.apk

```

3. Go back to TWRP, install NanoDroid patcher

This is the most complex part, if it won't work out of the box. But try the easy route first:

Select the file `NanoDroid-patcher-*.zip` and `Install Zip` again.

In my case, the tool was unable to De-odex the Android image so that signature spoofing can be installed

on top of that. I suspect that's because this operation requires considerable amount of RAM. I had to

carefully read instructions, and do that change on PC.

So if you have such issue, make sure you have some time to focus, read that carefully and to what it says.

Below are the specific command I used. But these are specific to my setup, so don't rely on it - use the instructions link above.

When de-odexing the `services.jar` on PC, you may notice the size of that file increased multiple times. That is expected, it's not a sign of issue.

Spoiler content hidden.

After updating my `services.jar`, I tried installing NanoDroid again, and it worked.

While NanoDroid was installing , further modifications to `services.jar` took quite long - like 10 minutes. But succeeded in the end.

4. Verify spoofing

It is prudent to check whether the spoofing works, at this point. Later, migroG will tell you about spoofing status, but for now, you will want to install the small app "Signature Spoofing Checker". You know, so you won't start uninstalling Google without having the base for miniG to work properly.

5. Remove original Google services

Followthe general instructions from DeGoogle post to remove the Google Services.

I did that through ADB. First, I uninstalled all the apps.

You don't really have to uninstall all of them. Only:

- Play Store

- Service Framework

- Play services

.. or in other words, only the last few. The rest should be able to start working after microG takes place of the core services.

Spoiler content hidden.

Then I removed their folders, which the DeGoogle post listed.

Well I didn't really removed them, I moved them to a temporary folder, so that I can revert that in case of issues.

Spoiler content hidden.

And that's it. Your mobile will now run without any Google services. Normally Note 4 doesn't have any software which would make them mandatory to start the device, so you should be able to reboot and basic stuff will work properly.

6. Install microG services

The easiest way is to install "NanoDroid-microG" package. Download it somewhere to your mobile.

By default, "NanoDroid-microG" will not install Play Store - it will install Aurora instead. If you want to use a modded Play store instead, you need to prepare a modified ".nanodroid-setup" - find the default file, and do modifications based on comments inside the file. See NanoDroid documentation for details.

When ready, use `Install` inside TWRP, select the file `NanoDroid-migroG-*.zip` and swipe in `Install Zip`.

Reboot, and you have microG installed. Now configure it, using instructions from NanoDroid documentation.

Done.