[Samsung Galaxy A8 (2018) Guides, News, & Discussio] wirespot:
What's this about?

I'm starting this thread in order to keep track of the state of Xposed on the Galaxy A8 (2018). Current status: Working. (Updated Jan 2019.) Model: SM-A530F. Android: 8.0.0 (Oreo). ROM: stock, baseband A530FXXU2BRG1, kernel 4.4.13-13824581-QB18772733 from Mon Jul 2, 2018.

Why wouldn't Xposed be working? Xposed works on Oreo!

Yes, but not necessarily for Samsung. Samsung has custom ART libraries, and additional quirks such as xz compression, custom methods etc. There were custom Xposed builds made for Samsung LP/MM ROMs, but there are currently none that are confirmed working for stock N/O (no longer the case!). Symptoms of a non-working Xposed include lag, freezes, spontaneous reboots, bootlops and dissapearing baseband info in settings "about phone" (inability to recognize SIM).

How can I live without Xposed if I can't/won't get it working?

Depends on what modules you need. Things like Greenify or microG/UnifiedNLP can work without Xposed, by installing them as system apps. (Yes, you lose SafetyNet, but SafetyNet is lost anyway with Xposed.) XPrivacy can in theory be replaced with things like AppOps or the LineageOS permissions system (yes, I know that there's no LineageOS build for A8 2018 at this time, sadly.) You can also mitigate privacy implications by using a firewall like AFWall+ (it's a good idea even with XPrivacy). Feel free to suggest other alternatives in comments.

Requirements:

You should be familiar with the current state of custom kernel/recovery/root/magisk for the A8 2018. In short, in order to be able to try Xposed builds, you should have on hand the following:

1. Odin 3.13 or later. (Heimdall will NOT work, it cannot unpack the latest Samsung images. JODIN is not confirmed to work either. Use Odin in a virtual machine such as VirtualBox if you're on Mac/Linux.)

2. The official stock images for your device. Download from sammobile.com, updato.com, samdb.org. It is recommended to re-flash clean stock images whenever you try new versions of anything (recovery, kernel, magisk etc.)

3. TWRP version 3.2.3 or later. (courtesy of BlackMesa)

4. Also from the TWRP thread, you MUST get the RMM and no-verity fixes! RMM bypasses the Samsung theft "protection", which can soft-brick your phone for several days if tripped. no-verity removes the system partition anti-tamper protection, which would otherwise not allow you to boot.

5. Last but not least, Magisk and Magisk Manager are confirmed to work well. Install the latest Magisk (v18.0 at the time of writing this).

BlackMesa's Custom Kernel is OPTIONAL and in fact I haven't been able to get it working 100% perfectly. All the kudos to BlackMesa for the work he's put into it, it's the closest thing we have to a potential future LineageOS build, and includes LOTS of useful fixes, but remember that YMMV. If you install the kernel you don't need the opt-verity and RMM fixes. If you don't, Xposed works fine on stock kernel too. Again, this is OPTIONAL as far as Xposed is concerned.

In the same vein, if you're only interested in testing Xposed you can flash it from TWRP, you don't necessarily need Magisk (but it's highly recommended).

Before you start:

SafetyNet will be lost if you install non-systemless Xposed. Period. This can't be fixed by hiding Magisk from specific apps, it's about getting that green "SafetyNet check" in the main Magisk screen. If you don't get that, there are apps that will refuse to work, end of story.

You can live with it by installing older versions of certain apps (if you can get your hands on the APKs), back when they were not SafetyNet-enabled. Works fine for older version of Netflix for example (4.15.1 build 14947). Also works for my local bank's app.

INSTALL PROCEDURE:

Follow this procedure carefully. It will hurt if you don't.

* Get the RMM and no-verity fixes from the TWRP thread linked above. Get Magisk from the link above. Put them all on the SD card and put the SD card inside the phone.

* With the phone booted to system normally, turn ON the "OEM unlock" option in developer settings and never, ever turn it off again. If you do, the phone will soft-brick and you'll have to reflash stock images to make it work again.

* If you are starting from a pristine install you don't need to [re]flash the stock images. However, it's strongly recommended to perform a factory reset before you continue. If you're coming from a different kernel/ROM etc. you have to flash the stock images, this guide assumes you're on stock Oreo.

* Turn off the autoreboot option in Odin. Flash the TWRP .tar image in the AP slot in Odin. I repeat, DO NOT BOOT TO SYSTEM. From this moment and until you install the RMM fix you can potentially trip Samsung's theft protection. Proceed exactly as described below.

* Remove the USB cable from the phone. Press and hold Power+VolumeUp+VolumeDown to reboot and immediately after the reboot press and hold Power+VolumeUp to enter TWRP recovery. Do not reboot to system yet.

* Swipe to allow modifications when entering TWRP.

* Format /data. Reboot to recovery. Do not install TWRP when prompted.

* Swipe to allow modifications when entering TWRP.

* Verify that data is mounted, in the mount menu.

* Install RMM and no-verity fixes from SD card. (Alternatively, you can install BlackMesa's kernel instead at this point. It includes the RMM/no-verity fixes. Please note that I've personally experienced some problems with it. Using the stock kernel + RMM/no-verity fixes seems rock solid on the other hand.)

* You can now reboot to system. Do not install TWRP when prompted.

* This first boot to system can take as much as 15-20 minutes. The Samsung logo and the blue led will flash throughout this time. Let it work, be patient.

* Verify that the phone seems to work ok.

* Reboot to TWRP recovery (restart the phone then use Power+VolumeUp immediately after reboot).

* Swipe to allow modifications when entering TWRP.

* Install Magisk.

* Reboot to system. Do not install TWRP when prompted.

* Verify that Magisk Manager shows green SafetyNet check passed.

* Install Xposed Framework from Magisk Manager modules (NOT Xposed Framework SDK systemless).

* Start the Xposed app and use its own reboot option, to make it ask for root. Grant root forever. The phone will restart.

* Verify that Xposed shows green (working) message, and that Magisk shows red (SafetyNet check not passed) message.

* You may need to reboot one more time if Xposed says that it was installed but not active. You want Xposed Manager to show a solid green background banner in the main screen.

You can now install Xposed modules.

* If you want XPrivacy, you need to install XPrivacyLua. The old XPrivacy module is available and can be installed but it will NOT work, it is simply incompatible with Android version past Marshmallow. Yes, XPrivacyLua is different but it works well after you get used to it.

* I recommend also installing AFWall+ or NetGuard firewall, because in Oreo access to Internet is no longer an app permission (all apps get access to Internet; crazy huh? Google privacy FTW) so there's nothing that XPrivacy can do about it.

* Alternatively there's an XPrivacyLua hook which can fake apps into thinking there's no network connection, but it can be bypassed if the app is aware of it; an actual firewall is the best solution.

How should I test Xposed?

The main issues are those described above: freezes, lag, reboots, kills baseband. Xposed itself is working. You can install modules and they will work as expected. This is not a problem with Xposed itself, but rather the bad side-effects when combined with a Samsung ROM. So in order to declare a build as "working" please make sure that none of the above issues appear when you install it, activate it, install various modules, and use it for a while. When the bad things happen you'll know it, they will be very obvious.

What Xposed versions have been tested?

* Xposed-Framework-Unity v89/90b3r18 (non-systemless Magisk module or installed via TWRP). Working.

* Xposed Framework (SDK 26) 90.2-beta3 (systemless Magisk module). Not working. Red error message in Xposed.

What Xposed modules are working?

Here are modules that have been reported working. Doesn't mean these are the only ones that work, but it's not a guarantee either. Try it for yourself.

* XPrivacyLua [added Jan 11, 2019]

* GravityBox [O] [added Jan 11, 2019]

* AFWall+ [added Jan 11, 2019]

* Greenify [added Jan 11, 2019]

* MinMinGuard [added Jan 11, 2019]

* AlwaysCorrect [added Jan 11, 2019]

* RootCloak [added Jan 14, 2019]

* Screenshot Delay Remover [added Jan 14, 2019]

* App Settings [added Feb 5, 2019]

* Disable Flag Secure [added Feb 5, 2019]

* Play Store Fixes [added Feb 5, 2019]

Xposed modules confirmed NOT working

The following modules have been confirmed not to work:

* UnifiedNLP: the Xposed module is abandoned and was never updated for Oreo+, so it's not patching framework-res.apk correctly to add org.microg.nlp to the list of accepted location providers. So the status check will report unable to hook into the location service, and without that it won't work. I'm trying to research an alternative solution in this thread. [added Jan 14, 2019]

Useful links

Links to bug reports, XDA development threads, useful forum threads etc. You would be well advised to read through these links to gain a better understanding of the issues involved:

* Xposed v90 beta 1 framework incompatible with Samsung Oreo beta