A complete ROM using S21FE System for various Samsung Snapdragon devices
Samsung Galaxy A52 4G (a52q): XDA Link
Samsung Galaxy A52s 5G (a52sxq): XDA Link
Samsung Galaxy A71 4G (a71): XDA Link
Samsung Galaxy M52 5G (m52xq): XDA Link
- OTA updates
- Resolution changer
- Voice focus
- Gallery cut/pase objects
- Bootanimation zip support
- Samsung DeX
- Samsung native AppLock
- Advanced Reboot options
- Patched Knox apps
- High End animations
- Live Blur
- Remaster Picture
- So many more...
I'll try to cover as much as I can on how I build this ROM. There are some things I will not explain and is up to the user to figure out. Also keep in mind that some methods may change slightly depending on the variant. I am always happy to answer questions in our Telegram support group but don't expect me to spoon feed you as I don't usually like the typical "I'm new to Android modding, can you tell me what I need to learn to build my own ROM" kind of question.
- Extract the stock firmware (I'll be using A52 as an example). The partitions that you need to worry about is
super
which hassystem
,product
,odm
andvendor
inside. We'll call this "project"NcX_A52
. If your device hasvendor_boot
, make sure you skip it (like the A52s and M52). Some kitchens allow you to have multiple "projects" and we'll take advantage of this. - Extract S21 firmware in a new project. We'll call this project
S21FE_System
. Although onlysystem
is required to be extracted, I usually extractproduct
,odm
andvendor
as well just in case. Make sure you skipvendor_boot
- Open replaced-apps.txt and copy all those files and folders from your
NcX_A52
folder to yourS21FE_System
system
folder - Open removed-apps.txt and delete all the apps in the list. Make sure for
odm
,product
andvendor
you delete them fromNcX_A52
project and forsystem
you delete them fromS21FE_System
project - Next, we start working on super.img. I personally work my self from the bottom all the way to the top, so I'll start with the
vendor
folder inNcX_A52
project - Skip both
build.prop
anddefault.prop
files as the changes to those files will come later when we go over the commits. Same goes with any file or folder I skip in the following steps. The changes are usually done when we review the commit history. - Compare both
NcX_A52
vendor
andS21FE_System
vendor
and you'll notice that our stock device is usually missing the filedeep_dewarp_cnn.onnx
. Make sure you add it to yourNcX_A52
folder if this is the case (this is needed for text scanning on camera) - Skip the
fstab
files and theaudio
policy file - Skip the
vintf
folder - Compare midas folder with S21FE. There should be 1 or 2 files that the A52 has no equivalent to. Mostly used for remaster picture, probably doesn't even work.
- Skip
init
folder - Compare VslMesDetector folder, it's usually missing
moire_detection.tflite
inNcX_A52
vendor
folder. Add it over from S21FE - Next, we'll start looking at the
system
changes - Skip
build.prop
- In
system_ext
folder, skipSystemUI
folder. Add fm radio libs if required. Inetc
folder insidesystem_ext
, copy over build.prop fromNcX_A52
toS21FE_System
selinux
insidesystem_ext
: Now, this is a very interesting folder. I'd compare bothNcX_A52
andS21FE_system
because ever since the April update, Samsung introduced "fabriccrypto" (idk what that is) into S21FE and it's not present in A52. If this is still the case, I'd look over the files and remove the fabriccrypto instances or else it won't boot. The commit here can kinda show you how many instances I had to remove but there may be more in newer updates. Just keep a look out.system_dlkm
folder: copy over build.prop fromNcX_A52
toS21FE_System
inetc
priv-app
folder: copy over from the repo Applock.apk (yes, keep it outside a folder idk why but it gave us problems when adding it to its own little folder), wallpaper-res (optional) and SSecure- Skip SecSettings and DeviceHealthManager
- Copy over HybridRadio from A52 stock if you care about radio
- Copy over the files in "assets" and paste them to the S21FE BiometricSetting apk (I use winrar and just re-pack as "storage")
lib
andlib64
: You can ignore the libobjectcapture blobs since S21FE already has them as of April. You can copy over some fm radio blobs from A52 stock. Also, there's a vendor blob here because for some reason it looses it's symlink and doesn't pick it up from vendor anymoreframework
: You can skip this folder for nowetc
: You can ignore arcsoft libraries txt, was needed for object capture before- Copy over
floating_feature.xml
fromNcX_A52
toS21FE_System
- Copy over the fm radio permission from
NcX_A52
toS21FE_System
- Copy over the ten update permission for OTA notifications and the applock permission for applock
- Copy over the default-permissions folder too
cameradata
: Skip because you already replaced it with your stock A52 one in previous stepapp
: Copy over Gallery* folders from the repo to your system. Copy over FunModeSDK from stockNcX_A52
toS21FE_System
product
: Skip build.prop- Compare selinux folder from A52 to S21FE. In the past, there were a few differences here that prevented the ROM from booting. If you notice differences in this folder it may cause bootloops. If that's the case, replace your A52 stuff with S21FE stuff
odm
: Skip precompiled_sepolicy- Alright, that's all the notes on super.img. After doing all that, we go up to
Stock_System_Files
for A52. Copy over the NcXOnUpdate apk from the repo toS21FE_System
. The rest you should already have copied over, this is just to show the differences which I will get in a bit - And how, for all the things we skipped. I usually go about this by going through my commit history and just re-doing my work over and over and over and over again (isn't this fun)
- So, I start from here
- And I locate the commit "Adding stock Android 13 files" and look through all the changes and start implementing them. Here's the ones that will be relevant
- Fix for Samsung Health
- Disable APK signature checking
- Patched precompiled_sepolicy (this is def needed in A52. You have to patch this for some text extraction features on camera. I've linked the inject I use and the command as well)
- Disabling DRC in speaker (This is probably not needed, I think David in A52s who is super pro mentioned that OneUI takes its audio policy from another file and this file is kinda irrelevant lol)
- Disabling Samsung crap and encryption
- Replacing S21FE props with stock A52 (I usually compare them and replace the differences between A52 and S21FE. This is to fix the whole safetynet shit breaking and therefore skipping the MagiskHide props requirement)
- Enabling OutDoor mode
- Removing useless options in Settings
- Adding logo in Settings
- Changing animations to 0.85x
- Allow screenshots on secure apps
- Fix Secure Folder
- Fixing Secure WiFi and Private Share
- Fix SmartView for rooted device
- Disable init script to replace recovery
- Remove SSRM warning
- Advanced Reboot Menu
- a52q: Edits to floating_feature.xml [These are the lines that I add to A52 floating_features]
- Fixes to Advanced Reboot Menu
- a52q: Camera Features [These are the camera lines that I add to A52]
- There's an interesting footnote Mesa added in this commit for A71 where he says to modify the isSupportKGOnSEC method. I think I still haven't shown how to do this in my repo. This method will be already modified in the services jar I send you just an interesting note I remember every time I see this in my commit history
- Adding Voice Focus feature
- Add screen resolution options
- a52q: Fix Super Steady
- Fix Advanced Reboot
- There may be a few commits I may be missing. You can always double check the commit history and read any notes I may have included. After doing these changes so many times there's a chance I'm missing a few of them.
- After completing all the changes I want, I re-pack
odm
,product
andvendor
from myNcX_A52
project. - Then, I re-pack
system
from myS21FE_System
project - I copy over the newly generated
system_new.img
fromS21FE_System
and copy it over to theNcX_A52
project - Then inside
NcX_A52
project, I create a brand newsuper.img
as araw
image - After it is complete, I compress the new
super.img
into anxz
file using 7-zip - Then I just use Dynamic Installer to create an installation zip and make changes I want to it (you can find my updater-script in the META-INF folder)
And that's how NcX is built
- Huge thanks to @BlackMesa123 for his constant pointers and help. This ROM wouldn't be as nice without his assistance
- Huge thanks to @UltraHQ for constantly adding great mods to his hidden mods Magisk Module, you should check it out here: A72 Hidden Mods Module[Discontinued]