[Sprint  Galaxy Note 4 Android Development] tx_dbs_tx:
General info for those new to building custom roms

Feel free to use this is a base for your rom projects. Here is some basic info for newcomers wanting to make their own custom rom.

# CSC is already setup correctly for sprint as the bootloader has a mind of it's own and I have to lie to it in order for it to properly flash the correct csc for the sprint version.

# For deodexing, I personally use SVA deodexer. It has been the most reliable 99.9% of the time with no fails. Make sure you use the correct version that's compatible with the Note 4... which is the 32bit version. Also, keep in mind that any deodexed apk or jar can still possibly be corrupt without any warnings or error reports from the deodexing tool. Remember this!!! If you suspect you have a bad deodexed file then replace it with the original odexed version from my stock odexed rom and see if the problem resolves. The odexed apk's & jars are 100% originals from the extracted img's of the official Samsung tar ball so they are 100% good. I don't typically deodex with rom kitchens unless they have been updated to fully support Lollipop 5.0 and newer including apktool. The stand-alone deodexers are easier and better in my opinion.

# If you want to change out the kernel, simply swap out the boot.img in the kernel folder. (you will also need to edit the updater-script to remove or edit the ui_script credit to freeza for his stock root permissive kernel. (not mandatory but it would make sense to do this).

# For debloating be careful what you remove from the rom. Don't just remove stuff willy nilly because you think you don't "need" it. Research the apk's and make an educated decision. "MobileInstaller.apk" and "ID.apk" are the two responsible for downloading the bulk of the bloat on first boot so you need to get rid of those two for sure. I personally leave Sprint zone in my roms in order to allow people to have access to their accounts as well as install any of the sprint apps if they do want some of them such as Sprint TV, etc. You can get most all Sprint apps from Google Play also.

# You will obviously want to edit the updater script to change the name of the rom, credits, etc. Just leave the very top line alone as that is my signature and it needs to stay intact. Everything else feel free to edit, just know what you're doing so you don't bork the script.

# Mods for Android 5.1.1 on TW based roms are going to come about as people make them and post guides, etc. Just know that ANY mod that is not specifically for android 5.1.1 on software OG5 WILL NOT work on our new OG5 software builds. All mods will need to be done from scratch specifically for the new OG5 software. So never flash or use a mod that was made for a previous software version or older version of Android. This includes mods for regular apps such as SecSettings, SystemUI, Samsung messaging, Samsung contacts, etc, etc.

So don't do it! The reason is very simple. There is new and different java code in all of the smali/classes. The only time you may be able to use mods from previous software versions is when the latest revision is a small revision with only a few patches. You definitely can't use mods from Android 4.4 on a 5.0 Lollipop rom or a mod from a 5.0 rom on 5.1 without issues. This is your official warning!

# Theming Lollipop (both 5.0 and 5.1) is easier in many ways than any previous version of Android. You will need to learn several things and do a lot of research before you get your feet wet, but I can say that theming is probably the funnest part of making a custom rom. You should definitely learn to theme first. I will not write any tutorials for theming or setting up apktool etc because this stuff can be too technical to explain here. Besides, other people have already written tutorials in the past. Most of the information still applies today. Just make sure you use the LATEST apktool and use a tool that is updated to support Lollipop. I will recommend

3Minit Android Studio for it's all-in-one capabilities and ease of use for those new to decompiling & recompiling apk's. Give it a try. You will find it at http://3minit.com/ I have used it just to try it out but I use VTS mostly. It's more difficult to learn and definetely much more intimidating for beginners but it does a whole lot more and automates a lot of stuff once setup properly.

# There are already guides, instructions, etc here at XDA to help you get started with building roms, working with apk's, jars etc, So do your own researching on the web and get the "latest" info you can find for Android development. The information is out there and it doesn't cost a penny... only a few brain cells to comprehend. However, If you need help with something and you can't find the answers you're looking for, feel free to PM me and I will try to help you or point you in the right direction.

# Also know that there are a LOT of fellow XDA members who each specialize in one or more areas of Android development. If you take a look around you will soon see these smart and very talented people participating in other development threads. If you find a member who you think might be able to help you, just ask your question(s) in an appropriate thread and tag them in your post or perhaps send them a kind pm asking for their help. Generally, most people are willing to help you as long as you are willing to help yourself by way of searching and taking the initiative to figure things out on your own. Nobody wants to hold your hand so don't expect the red carpet treatment from anyone including myself, especially on basic things that you can easily figure out on your own.

That's about it for now...

HAPPY ROM BUILDING!!! My work here is done. Check please! :cool: