[Samsung Galaxy S9  ROMs, Kernels, Recoveries, & Ot] _alexndr:
Important notes for Developers / Chefs !!!

This ROM is NOT based on any other custom ROM. My work contains many original ideas and innovations that I introduced as the first in the ROM development (see "Changelist" in post #2). Of course, it does not mean that I do not need to thank anyone - there are people who helped / inspired me anyhow (see "Credits").

I will risk the statement that at this moment my "DevBase" is the most tuned and nuanced custom ROM available at XDA Forum :cool:

I agree to use any part of my work to create other custom ROMs, but it would be great if you add me to the credits :)

EDIT: Note related to creating "$ZIPFILE" which contains a file larger than ~4GB (e.g. system.img): the order of adding content to "$ZIPFILE" is very important! META-INF need to be added as the first dir in the archive! Example (my DevBase case):

zip -r -9 G960FXXU1xxxx_DevBase.zip META-INF options.prop ALEXNDR

It seems that misunderstanding of the above problem is the main reason why many devs give up and do not use my base as a pattern.

Hello :)

I have decided to create a pure base with my unified installer (should work with many other Samsung devices), which can be a pattern for ROM Chefs (not only for beginners) :D ROM is initially safe de-bloated (read below what does it exactly mean), but all features are present and works!

ROM can be installed by normal users as well. If you like a little de-bloated ROMs, clean, but with all working features - there is no better alternative I think ;)

ROM for G960F/FD contains slightly modified OXM multi CSC package, list of available CSCs is as follow:

ACR, AFG, AFR, ATO, AUT, BGL, BNG, BRI, BTC, BTU, CAC, CAM, CEL, CPW, DBT, DKR, ECT, EGY, EUR, GLB, ILO, INS, ITV, KSA, LAO, LUX, LYS, MAT, MID, MM1, MWD, MYM, NEE, NPL, NZC, OPS, ORX, PAK, PCL, PHE, PHN, PNG, PTR, ROM, SEB, SEE, SEK, SIN, SKZ, SLK, SMA, SMP, STH, TEB, TEL, THL, THR, TMC, TNZ, TPH, TUN, TUR, VAU, VFJ, VNZ, WTL, XEF, XEH, XEO, XEU, XEZ, XFA, XFE, XME, XNX, XNZ, XSA, XSG, XSP, XTC, XXV

NEW !!! :D I present you new, unique option: "Keep current CSC", so you can install my DevBase keeping your original CSC even if it is not listed above! Note that in such case this option has some limitations - more informations you can find in related older threads, e.g. HERE

ALEXNDR.G960FXXU1ARC5:

1. Base:

- Odexed (original stock files) + stock kernel

- Multi CSC OXM (list of natively supported CSC as above) (*)

- Removed / skipped SecurityLogAgent.apk (annoying on rooted phones)

- Removed / skipped Rlc.apk (to avoid "OEM unlock issue")

- Rooted systemlessly (Magisk v16.1 or SuperSU 2.82 SR5) (*)

- All original features are present and works (except Samsung KNOX related apps)

- No visual changes (100% stock look)

2. CscFeature MOD (enabled some built-in, hidden features):

- Added shutter sound menu in Camera app

- Sending/receiving MMS without data on

- Show SMS/MMS sending time instead of receiving

- Added "Exit Internet" option to stock browser

- Added "Call/Message block" option in Settings

- Added symbols as secondary keys in Samsung keyboard (may not work for all CSCs)

- Added "LTE Only" network mode (NOTE: voice calls may not work in this mode)

- 4G/3G network support in any CSC (master/slave SIM, applies to dual SIM variants)

- Call Recording (added "Record" button)

- Enabled "Recent App Protection" feature

3. Virtual / physical Safe De-Bloat (more info below) (*)

What does it mean and why is it called "safe"?

- ONLY apps available in stores are removed / skipped in DevBase, so you can easy (re)install any of these app if you like

- ONLY pre-installed system apps are removed / skipped, DevBase installer will never touch any updated app nor app installed manually from a store

- By default virtual Safe De-Bloat is applied with exact same effect as physical (completely skips apps at boot). You can force to delete apps physically but it is recommended only if you really need more space in /system

Thus, the following conclusions can be drawn:

1. If you install my DevBase directly over stock ROM without performing "Wipe data" - in most cases almost all these apps will remain untouched, because almost all apps have been updated already (stored on /data). But then you will be able to remove any useless app using the "Application manager", like any other app. Removed manually app will not appear again until you use my DevBase while updating.

2. If you perform "Wipe data" while installing my DevBase - then all apps listed below will be removed. If you would like to use any of these apps - just install it manually from appropriate store. Installed manually app will not be removed during the next DevBase update.

Removed / skipped apps list:

Excel

Facebook

LinkedIn

OneDrive

PowerPoint

Word

(*) - these options can be controlled by editing options.prop file (you can find such file in ZIP's root directory). Just place modified options.prop file (use e.g. Notepad++ to edit) in the root directory of internal emulated scdard (/data/media/0) or extSdCard (recommended if you plan to format internal emulated sdcard) and then start the installation. More info below:

#

# DevBase by ALEXNDR (_alexndr @ XDA)

#

# Configuration file to allow customize the installation.

#

# File inside the ZIP installer is just for reference - please DO NOT modify it!

# If you want to change some options listed below - edit the copy of this file, then place

# modified options.prop file in the root directory of internal emulated scdard (/data/media/0)

# or in the root directory of extSdCard (recommended if you plan to format internal emulated

# sdcard) and then start the installation.

#

# TIP: You do not need to repeat this step every next update I will release. As long as your

# customized options.prop file is present in the (ext)SdCard - future DevBase installers will

# "read in your mind" that you want to install with such options again.

#

# NOTE: All below variables and values are case sensitive!

# Enable root access with the selected method. Allowed values:

# magisk - install Magisk & MagiskSU as root solution

# supersu - install SuperSU as root solution & suhide (default)

# noroot - do not root device

root=magisk

# Possibility to remove bloatware physically from /system. Virtual debloat is

# normally applied instead of physical with exact same effect, so please use this

# option only if you really need more free space in /system. Allowed values:

# false - use virtual debloat to remove useless apps (default)

# true - remove bloatware physically from /system

phydebloat=false

# Possibility to skip flashing BL/CP (Exynos devices). It will also skip

# auto-reboot when the installation has finished (it is normally required

# for flashing BL/CP operation to pass successfully). Allowed values:

# false - flash the newest BL/CP matched to the ROM (default)

# true - do NOT update BL/CP and skip installer's auto-reboot

skipblcp=false

# CSC Selection. Allowed values:

# KCSC - Keep current CSC, recommended in most cases (automatic selection or copy your current CSC contents).

# You can force the use of natively supported CSC by typing (use UPPERCASE!): ACR, AFG, AFR, ATO, AUT, BGL,

# BNG, BRI, BTC, BTU, CAC, CAM, CEL, CPW, DBT, DKR, ECT, EGY, EUR, GLB, ILO, INS, ITV, KSA, LAO, LUX, LYS,

# MAT, MID, MM1, MWD, MYM, NEE, NPL, NZC, OPS, ORX, PAK, PCL, PHE, PHN, PNG, PTR, ROM, SEB, SEE, SEK, SIN,

# SKZ, SLK, SMA, SMP, STH, TEB, TEL, THL, THR, TMC, TNZ, TPH, TUN, TUR, VAU, VFJ, VNZ, WTL, XEF, XEH, XEO,

# XEU, XEZ, XFA, XFE, XME, XNX, XNZ, XSA, XSG, XSP, XTC, XXV

CSC=KCSC

# Custom CSC Features. Allowed value in each line ("Example_line" does nothing):

<Example_line1>value</Example_line1>

<Example_line2>value</Example_line2>

# Custom debloat list. Allowed value in each line: exact app name with .apk extension.

# (NOTE: without app's path/directory, without spaces after extension, no wildcards!)

Example_system_app1.apk

Example_system_app2.apk

NEW !!! :D Starting from DevBase v3.0 there is a new customization method - you can change frequently switched root options or encrypt your device just by renaming installer's ZIP file name (instead of editing options.prop file). Currently supported "strings" in the file name: "magisk", "supersu", "noroot", "encrypt", "rescue", "skipblcp", "phydebloat", "CSC_xxxx.zip":

Case 1 (default) - install the ROM with Magisk & MagiskSU as root solution

(just flash ZIP file "as it is")

EDIT: Magisk does not work in G960F (yet), SuperSU is temporarily default root solution..

Case 2 - install the ROM with SuperSU as root solution, without Magisk

(place "supersu" string anywhere in the ZIP file name, e.g. "G960Fxxx_DevBase_v5.x_supersu.zip")

Case 3 - do not root device

(place "noroot" string anywhere in the ZIP file name, e.g. "G960Fxxx_DevBase_v5.x_noroot.zip")

Regardless of the above root options, starting from DevBase v4.4+, you can also use "encrypt" option (place "encrypt" string anywhere in the ZIP file name, e.g. "G960Fxxx_DevBase_v5.x_encrypt.zip"). All your data will be encrypted "on-the-fly" at next boot after ROM update/reinstall. Wipe data is NOT necessary to use this option. You will NOT lose your data & apps but it is extremely important - do not interrupt encryption process during this "special" boot! Booting can take much longer and you may think it is a bootloop, but it isn't! If you have a large amount of used data - it is recommended to connect your phone to the charger during boot (and open a beer to avoid heart attack while waiting). You do not need to use "encrypt" option again in case of another DevBase update(s) - please read carefully notes below. EDIT: Encryption is not supported in G960F (yet)..

In DevBase ROM v4.5+ there is a "rescue" option, which may be especially helpful in case of encrypted device if you experienced bootloop caused by e.g. systemless mod/module/xposed stored on /data (without access to /data from TWRP). In case of bootloop just place "rescue" string anywhere in the ZIP file name, e.g. "G960Fxxx_DevBase_v5.x_rescue.zip" and then (re)install the ROM - should help in case of (probably) all possible bootloop reasons. In addition to the normal (re)installation of the ROM (thus restoring the original /system, kernel, modem, etc.) this option will also force "Core Only Mode" in Magisk and will move all SYSTEMLESS DevBase modifications to /data/devbase/system/.backup, before performing bind mounts, so original files will be used.

In DevBase ROM v4.6+ there is a possibility to force CSC by renaming ZIP file name - this is the only case-sensitive variable which have to be put at the beginning of ZIP file name and must be folloed by "_" (due to the fact that there is a high risk that ZIP file name may contain CSC code accidentally). Example (to force CSC DBT): "DBT_G960Fxxx_DevBase_v5.x.zip"

In DevBase ROM v5.0+ there is a "skipblcp" option which allows you to skip BL/CP update (it also disables auto-reboot when the installer finished work as it is just not necessary then). Just place "skipblcp" string anywhere in the ZIP file name, e.g. "G960Fxxx_DevBase_v5.x_skipblcp.zip" and then install the ROM.

In DevBase ROM v5.0+ there is also a "phydebloat" option which allows you to remove apps physically instead of virtually while de-bloating. Virtual de-bloat is a reversible method - you can easy restore any app by editing enforceskippingpackages.txt file. It has exact same effect as removing apps physically (it completely skips apps at boot), so forcing to delete apps physically is recommended only if you really need more space in /system.

Notes related to encrypted devices:

How to confirm that your data are encrypted:

1. Go to TWRP and check if it is possible to mount /data. If NOT - all is ok :) "Failed to mount '/data' (invalid argument)" will be the a frequent message that you need to like in the future ;)

How to update DevBase ROM to a newer version:

1. Copy a newer DevBase ROM to extSdCard or OTG storage (you do NOT need to use "encrypt" option in ZIP file name again, if your device is encrypted already - it just remain encypted)

2. Go to TWRP -> "Install" and flash ZIP file from extSdCard or OTG

3. That's all :cool:

The risk of data loss in case of encrypted devices, depending on the ROM scenario:

1. DevBase only: VERY LOW RISK (*)

2. Coming from other custom ROM with encrypted data - MEDIUM RISK (recommended backup)

3. Installing other custom ROM over DevBase - MEDIUM RISK (recommended backup, anyway)

4. Installing pure stock (using Odin) over DevBase (or over any other custom ROM) - VERY HIGH RISK (not recommended!)

(*) There is still a risk to get into a bootloop if you install stuffs like: Xposed framework, incompatible Magisk or Xposed module, incompatible systemless MOD in /data/devbase/system, etc. In case of bootloop just try to use "rescue" option described above :)

Installation:

TWRP recovery (KNOX 0x1): open file using "Install (Zip)" option and confirm operation. If you want to perform "clean install' - perform "wipe data/factory reset" BEFORE flashing Zip!

Wipe data is NOT required if you are coming from stock ROM (already rooted) or a previous version of my DevBase (if you leave "Keep current CSC" option untouched in /options.prop or if you choose same CSC as you are currently using). In other cases - wipe data is highly recommended!

I do not recommend using any additional superwipes or formats before install my DevBase (my installer cleans your system well enough!).

Credits:

@Chainfire for systemless SuperSU and a lot of inspiration

@topjohnwu for Magisk and another inspiration

@Tkkg1994 for pre-patched stock kernel for G96xF

@Duncan1982 & @bennebartsch for initial tests

Hit Thanks button if you like my work. If you really appreciate my work - feel free to buy me a beer :)