[Samsung Galaxy M30s ROMs, Kernels, Recoveries, & O] Hritwik:
What's currently included in this thread :-

TWRP (With/without magisk)

Installing EdXposed

Root with magisk (not recommended due to bootloops, use twrp with magisk)

RMM state Prenormal solution

Stock and combination firmware and Kernal source Gdrive links

Tools for flashing and downloading latest firmware

Post 2

Hide bootloader unlocked warning message

DeGoogle & debloat M30s and install MicroG

Enable Haptic feedback on m30s (or any other samsung phone)

BACKUP YOUR EFS PARTITION BEFORE DOING ANYTHING​

If EFSpartition is corrupted or lost, you would not be able to get calls and wifi and your IMEI will be permanently lost.

There is currently no way of restoring corrupted EFS partition since it is device specific, so flashing stock firmware will also be useless

Here is one guide. follow this or any other that works for you.

Here is another (droid view.com/restore-efs-imei-galaxy-s7/)

OR You can Backup all partitions using twrp (nandroid backup) and store in someplace safe (make sure to tick all partitions including EFS)

This is an excellent guide regarding EFS (thanks to @PlayingPoise). I HIGHLY RECOMMEND READING IT BEFORE PROCEEDING.

TWRP (With/without magisk)

(huge thanks to @santhoosh)

Thread

there are two .tar files, flash the one you need

Pro Tip: I would recommend Smalipatcher module to reboot directly into magisk system.

Installing EdXposed

See This for installation video OR This Or This for installation guide.

This, for official website

And This for github!

NOTE: v0.4.6.0_beta from github requires custom magisk otherwise the system wont boot since github hosts alpha versions, so i advice to follow the video tutorial since it has installed the most stable EdXposed

Rooting with Magisk

(Currently causing random bootloops since custom Kernal is req., i recommend flashing twrp with magisk)

From magisk official repo and This Link, Both are same, but i just wanted to make AIO thread)

thanks to @santhoosh and @topjohnwu

Unlocking Bootloader

Normally I wouldn’t provide instructions for this, but since things had changed drastically from previous Samsung devices, and there are some caveats, I figure this would be helpful.

* Allow bootloader unlocking in Developer options → OEM unlocking

* Reboot your device to download mode. Either use adb reboot download, or use turn off m30s, press vol+ and vol- simultaneously (while powered off) and connect to pc.

* Long press volume up to unlock the bootloader. This will wipe your data and automatically reboot.

Just when you think the bootloader is unlocked, it is actually not! Samsung introduced VaultKeeper, meaning the bootloader will reject any unofficial partitions before VaultKeeper explicitly allows it.

* Go through the initial setup. Skip through all the steps since data will be wiped again later when we are installing Magisk. Connect the device to internet in the setup!

* Enable developer options, and confirm that the OEM unlocking option exists and grayed out! The VaultKeeper service will unleash the bootloader after it confirms that the user has the OEM unlocking option enabled.

* if there is no OEM unlock option, set phone's date to 7+ days and back and now see.

* Your bootloader now accepts unofficial images in download mode.

Instructions

* Download the firmware for your device.

* Unzip the firmware and copy the AP tar file to your device. It is normally named as AP_[device_model_sw_ver].tar.md5

* Install the latest Magisk Manager

* In Magisk Manager: Install → Install → Select and Patch a File and select the AP tar file.

* Magisk Manager will patch the whole firmware file and store the output to [Internal Storage]/Download/magisk_patched.tar

* Copy the patched file to your PC with adb pull /sdcard/Download/magisk_patched.tar. Do not use MTP as it is reported to corrupt files.

* Reboot to download mode, and flash magisk_patched.tar as AP in Odin, together with the BL, CP and HOME_CSC files. Never flash only an AP file, as Odin can shrink your /data file-system if you do.

Important: Uncheck “Auto Reboot” in Options!

* Magisk is now successfully flashed to your device! But there are still several steps before you can properly use the device.

* We now want to boot into the stock recovery to factory reset our device.

* Full data wipe is mandatory! Do not skip this step.

* Press Power + Volume Down to exit download mode. As soon as the screen turns off, immediately press the Vol up and power to boot to recovery . Since we want to boot into stock recovery, continue pressing the volume up button until you see the stock recovery screen.

* Use volume buttons to navigate through the stock recovery menu, and the power button to select an option. Choose Wipe data/factory reset to wipe the data of the device.

* This time, we can finally boot to the system with Magisk. Select Reboot system now, and immediately press the combo key to recovery. After seeing the bootloader warning screen, release all buttons so it can boot to the system.

* The device will automatically reboot for the first time it boots. This is completely normal and done by design.

* After the device is booted up, do the usual initial setup. The following steps will need an internet connection.

* You shall see Magisk Manager in your app drawer; if not, manually install the APK you downloaded in step 3 and continue to the next step. The app would be a stub and it shall automatically upgrade to the full Magisk Manager when you open it.

* Magisk Manager will ask to do additional setups. Let it do its job and the app will automatically reboot your device.

Voila! Enjoy Magisk :)

Additional Info

* Magisk actually patches 3 partitions on your device:

vbmeta: replace with empty vbmeta image to disable partition verification

boot: remove the signature of the image to prevent soft bricks

recovery: this is where Magisk is actually installed

* Never, ever try to restore either of the 3 images mentioned back to stock! You can easily brick your device by doing so, and the only way out is to do full Odin restore following with factory reset. Just don’t do it.

* If you want to upgrade your device, never flash the stock AP tar file with the reasons mentioned above. Always pre-patch the firmware before flashing in Odin.

* If you don’t need to patch the full firmware, you can manually create a tar file with at least vbmeta.img, boot.img, and recovery.img to let Magisk Manager patch your images in the proper way.

Due to the fact that some devices no longer uses ramdisk in boot images, Magisk has no choice but to be installed in the recovery partition. For these devices, you will have to boot to recovery every time if you want Magisk. Since both Magisk and recovery lives in the same partition, what you actually end up getting when you choose to boot to recovery will be determined by how long you press volume up.

1. Powering up normally → System without Magisk

2. Power + Volume Up → Bootloader warning → Release all buttons → System with Magisk

3. Power + Volume Up → Bootloader warning → Keep holding volume up → Actual recovery

I would recommend Smalipatcher module to reboot directly into magisk system.

Updates: For each and every updates, either magisk or system update always patch the firmware with magisk and flash using odin(data will not be wiped if HOME_CSC

used instead of CSC)

RMM state Prenormal solution

Flash stock firmware

Boot up WITH sim inserted, CONNECT to internet during setup (or you can connect after setting up, but perform below operations only when connected to internet).

Enable developer options and go to them.

Now connect to internet and go to dev options, now set date 8 days back and check dev options for OEM unlocking

if it's still not there set date to today and again 8 days back and again check.

This worked for me and OEM unlocking was there and RMM state was changed to checking.

(what we are doing is fooling phone to believe that sim was inserted for more than 7 days)

Stock and combination firmware and Kernal source

Below are Gdrive links for Combination firmware for (M307FXXU1ASH9) and (M307FXXU2ASK2) and ROM M307FXXU1ASHI, M307FXXU2ASL2, M307FXXS2ATB3 (FOR INS ONLY, for other regions, use frija or samfirm).

I have also uploaded Kernal source for M307FXXU2ASL2 on gdrive for faster download.

Tools included

The following tools are also included in the shared folder, they are up to date as of FEB 2020, but i have attached links to original threads of xda to give credits and in case they are updated, you can download them from there. (As i said, this is AIO thread to find tools, none of them are my creation)

Frija, Samfirm continued and Samfirm are Tools for downloading Official firmware from samsung servers with high speed (so no to sammobile and other ****ty premium websites)

Frija thanks to [MENTION=8955347]invmini[/MENTION], Github

SamFirm thanks to [MENTION=3975929]zxz0O0[/MENTION], Github

SamFirm_continued, Github

Odin

Patched Odin by [MENTION=4396505]realbbb[/MENTION]

Frija not working ? install both vcredist_x00 for your device !

(check your windows settings to know which version to install)

(Microsoft Visual C++ 2010 Redistributable Package) and (Microsoft Visual C++ 2008 Redistributable Package)

https://www.microsoft.com/en-US/download/details.aspx?id=29 (x86) 2008

https://www.microsoft.com/en-US/download/details.aspx?id=5555 (x86) 2010

https://www.microsoft.com/en-US/download/details.aspx?id=15336 (64bit) 2008

https://www.microsoft.com/en-US/download/details.aspx?id=14632 (64bit) 2010

-Open Frija and type in your model (mine is SM-m307f) and your CSC : (mine is INS).

(All models on samfrew: https://samfrew.com/model/SM-M307F/).

Thanks to @BK

Other Tools

PIT Magic v1.3.10 - Samsung PIT Creator, Editor, Analyzer

Samsung firmware naming convention and explanation (Outdated)

SM-M307F - Galaxy M30s Samfrew

Extract Samsung PIT File from Samsung Firmware -> www.droid views.com/extract-samsung-pit-file-from-firmware (remove space b/w "droid" and "views")

NAND Erase Samsung Devices in Odin -> www.droid views.com/nand-erase-odin-samsung-firmware (remove space b/w "droid" and "views")

Latest Odin Downloader: https://odindownloader.com/category/download

Samsung USB Driver: https://samsungusbdriver.com/category/download

Samsung Firmware: https://firmwarefile.com/category/samsung

Links​

LINK (Pm me if link is dead. If there is error like "try after some time", make a copy of file to your drive and then download)