Code Monkey home page Code Monkey logo

lightos-s21fe's Introduction

NcX S21FE Port for Galaxy devices

A complete ROM using S21FE System for various Samsung Snapdragon devices

Supported 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

Added OS Features:

  • 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...

How to build/make

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.

Here's the detailed guide:

  • Extract the stock firmware (I'll be using A52 as an example). The partitions that you need to worry about is super which has system, product, odm and vendor inside. We'll call this "project" NcX_A52. If your device has vendor_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 only system is required to be extracted, I usually extract product, odm and vendor as well just in case. Make sure you skip vendor_boot
  • Open replaced-apps.txt and copy all those files and folders from your NcX_A52 folder to your S21FE_System system folder
  • Open removed-apps.txt and delete all the apps in the list. Make sure for odm, product and vendor you delete them from NcX_A52 project and for system you delete them from S21FE_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 in NcX_A52 project
  • Skip both build.prop and default.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 and S21FE_System vendor and you'll notice that our stock device is usually missing the file deep_dewarp_cnn.onnx. Make sure you add it to your NcX_A52 folder if this is the case (this is needed for text scanning on camera)
  • Skip the fstab files and the audio 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 in NcX_A52 vendor folder. Add it over from S21FE
  • Next, we'll start looking at the system changes
  • Skip build.prop
  • In system_ext folder, skip SystemUI folder. Add fm radio libs if required. In etc folder inside system_ext, copy over build.prop from NcX_A52 to S21FE_System
  • selinux inside system_ext: Now, this is a very interesting folder. I'd compare both NcX_A52 and S21FE_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 from NcX_A52 to S21FE_System in etc
  • 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 and lib64: 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 anymore
  • framework: You can skip this folder for now
  • etc: You can ignore arcsoft libraries txt, was needed for object capture before
  • Copy over floating_feature.xml from NcX_A52 to S21FE_System
  • Copy over the fm radio permission from NcX_A52 to S21FE_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 step
  • app: Copy over Gallery* folders from the repo to your system. Copy over FunModeSDK from stock NcX_A52 to S21FE_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 to S21FE_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
  • 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 and vendor from my NcX_A52 project.
  • Then, I re-pack system from my S21FE_System project
  • I copy over the newly generated system_new.img from S21FE_System and copy it over to the NcX_A52 project
  • Then inside NcX_A52 project, I create a brand new super.img as a raw image
  • After it is complete, I compress the new super.img into an xz 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

Special Thanks

  • 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]

lightos-s21fe's People

Contributors

phatwalrus avatar salvogiangri avatar shadisnx255 avatar simon1511 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.