[Galaxy Note 4 Android Development (Snapdragon)] AnonVendetta:
This is derived from the latest N910F UK BTU stock Marshmallow v6.0.1 firmware.

Some info:

PDA/AP (ROM firmware) version: N910FXXU1DRI2

CSC code: N910FBTU1DRJ1 (BTU)

Modem/CP/baseband version: N910FXXS1DQA1

There is no multi-CSC support, it is too much work to add. If you need a different CSC besides BTU, then you should consider [MENTION=5150393]_alexndr[/MENTION]'s DevBase, [MENTION=1111850]Andycar[/MENTION]'s ROM, etc. They are based on older firmware, but should work fine. Having this ROM's BTU CSC may mean that carrier-specific features like VOLTE/wifi calling/etc may or may not work. I think the BTU CSC should work fine for most.

Why am I doing this? Well, for one, noone has posted (to my knowledge) a deodexed version of this firmware. And 2nd, as a baseline modding resource for other users, I only ask that I'm given credit for providing the files.

Old zips:

I've taken the N910FXXU1DRI2 stock firmware from SamMobile, deodexed it with SuperR's Kitchen, and created a TWRP-flashable firmware/ROM zip. It is only deodexed, no other changes have been made, nothing has been removed. All stock bloat/Knox is present. It isnt rooted, but you may root it with Magisk/SuperSU/Phh's Superuser. The kernel is pure stock, but you may flash a custom kernel afterwards if you wish. This ROM should pass SafetyNet even without Magisk/SuperSU, as long as you dont flash something like Xposed. Private Mode will not work with this zip out of the box, you will need to flash the modded Private Mode zip to get it to work. You should only use this zip if you just want a deodexed ROM with no additional changes. Flash from TWRP. This zip only includes the stock boot.img and a deodexed system.img.

There is now a 2nd version of this, it is based on the original N910FDeodex.zip, but converted from raw img format to set_metadata format. This version will only flash the used portion of the system partition into /system, resulting in less write hits. If you want a deodexed only version of this ROM with no further changes, then use the set_metadata version. These 2 zips are otherwise identical.

https://androidfilehost.com/?fid=8889791610682928982

https://androidfilehost.com/?fid=8889791610682917301

New revised zip (deodexed, debloated, Knox removed, GApps removed, some minor changes):

This is almost the same as the above zip. Everyone should use this new zip, unless they only want a zip that is deodexed only with no further changes. Private Mode will work out of the box. You will also be able to pass SafetyNet with or without Magisk/SuperSU.

https://androidfilehost.com/?fid=8889791610682924674

See the following post for what's removed:

https://xdaforums.com/showpost.php?p=83379549&postcount=38

And this one too. It includes an optional debloat script that removes even more:

https://xdaforums.com/showpost.php?p=83385447&postcount=44

Link to script:

https://androidfilehost.com/?fid=8889791610682925297

Install order for revised zip:

1. Wipe system/data/cache and flash ROM zip

2. Flash my revised debloat script if you want it

3. Flash latest OpenGApps ARM 6.0 nano zip (dont use anything higher, system apps like Messages/Tags/dialer will be removed if you do!)

4. Flash Google Contacts Sync Adapter zip from Extras section (to avoid "Android is optimizing" on every boot)

5. Check /system/app/WebViewGoogle, /system/priv-app/GooglePackageInstaller, and /system/priv-app/Tags, make sure they're not deleted. If they are, flash the appropriate zips from Extras section

6. Flash any other extras you want

7. Flash custom kernel (optional)

8. Flash root (optional)

9. Reboot into ROM

For MicroG users:

1. Wipe partitions, flash ROM zip.

2. Flash my revised debloat script if you want it.

3. Flash MicroG installer zip. Signature spoofing patch is already built into ROM.

4. Flash play store, backup transport, calendar sync adapter, Google dialer, maps/media effects/widevine libraries, deodexed google contacts sync adapter, google keyboard and swype libraries. These are optional.

5.Flash any other extras you want

6. Flash custom kernel (optional)

7. Flash root (optional)

8. Reboot into ROM

Note: In my tests, ROM didnt pass SafetyNet with MicroG installed. but it did pass when I flashed OpenGApps. This means the fail is due to something in MicroG. Ask in the MicroG XDA thread for help.

Another note: I only used the official APKs from MicroG website, permissions XML file from MicroG Installer Revived, and Play Store APK from APKMirror. You can update MicroG if/when they release new APKs.

Make sure to follow these steps in the order I've listed them!

You only need to use my stock boot image and kernel library modules zip if:

1. Before you flash a custom kernel

2. Before flashing root (skip my zip if you are already using custom kernel)

You can also get rid of a custom kernel/root by flashing this zip. But it is advised that you use Magisk uninstaller zip first. Or to delete SuperSU, you can use the unSU zip by [MENTION=4544860]osm0sis[/MENTION]. Then flash my zip.

If you get an error in TWRP when flashing either of these zips, this probably means your MicroSD card is using the GPT partition table, instead of MBR. My advice is to use SD Card Formatter tool to format your SD, then copy the ROM zip onto it and try to flash the zip again. If this doesnt work, post the exact error here.

If you used the "nand erase all" option in Odin, it is advised to format data/cache in TWRP *BEFORE* flashing the ROM zip. Look at the Mount button in TWRP and see if they are checked. If they are, then all is good. If not, use the wipe/format data functions until they are checked. I advise using nand erase all because it cleans data/cache of incompatible data. Especially recommended if you are coming from different firmware/custom ROM.

Please only do clean flashes! Dirty flashes not supported! Do not report bugs if you have dirty flashed! Do not report bugs if you are using other mods like Xposed (or root), etc! Clean flash with no changes, then post here if the bug is still present.

Additional firmware-related files:

My N910FXXU1DRI2 mini firmware package. This includes all files from the stock firmware package with the exception of the boot, system, and cache partitions. This is intended to be flashed before flashing my ROM zip. Boot/system arent needed because they are included in the ROM zip. Cache also isnt needed because its' contents (the UK BTU CSC code) is already processed into the system.img. This package also includes the latest official TWRP recovery, instead of the stock recovery. I would advise that you flash this file before flashing the ROM zip, but it may only be necessary if the ROM fails to boot (which means your installed firmware is an incorrect/incompatible version).

https://androidfilehost.com/?fid=8889791610682917321

You need Odin (version 3.12.7 recommended), Samsung USB drivers, and a Windows PC. In Odin, select the "nand erase all" and select the tar file in the AP slot. Also uncheck the autoreboot box. Leave everything else as-is. Once it is flashed, wait a minute or 2 before unplugging phone from PC.

Once you've done this, pull battery from phone, put it back in, then use VolUp+Home+Power to boot into TWRP. From there you can flash the ROM zip.

Pure stock firmware N910FXXU1DRI2. This is identical to what you would get from SamMobile, I have not modded the firmware in any way. I have only recompressed the tar file so that the total overall download size is smaller. Unpack the 7z file with 7-Zip/WinRAR/some other software, then flash the tar file from Odin. Flashing instructions are the same as above. You only need this if you want a truly clean start with nothing whatsoever changed. This file can be used alone without the others, or it can be flashed before the stock ROM zip. This file does not include TWRP. If you intend on flashing the stock ROM zip, I would suggest using my mini firmware package instead.

Note: I've deleted this file, you can find it in my N910FXXU1DRI2 mega firmware collection thread.

N910FXXU1DRI2 pit file. This file is to be flashed with Odin, if you need to repartition the device. Only use it with a full, official firmware package, like the one from above. I extracted it from my device with TWRP, it is not changed in any way. Most people generally wont need this. Only use this on an N910F, it may brick other devices!!! You've been warned!

https://androidfilehost.com/?fid=8889791610682917326

Link to extra files folder:

https://androidfilehost.com/?w=files&flid=316633

You can use these files to restore removed functionality if you need it. Most of these should be flashed from TWRP. More info below:

1. AccuWeather: Restores AccuWeather widget

2. Android default hosts file: Restores the stock hosts file

3. ANT system apps: Restores ANT apps. These are mainly fitness-related

4. Autorotation library: Flash this if your autorotate isnt working

5. Car Mode/Car Mode Remote: Restores Car Mode

6. Chrome customizations: Restores a system app which sets defaults for Chrome. Generally unneeded

7. DiagMonAgent: Related to Knox, it likes to phone home

8. Dropbox stub: Restores Dropbox stub for SCloud in Settings

9. Easy mode contacts widget: self-explanatory

10. Google FaceDetect library: Part of GApps. Restores FaceDetect library. Google cancelled support for this due to security reasons. You probably dont need it

11. Google Package Installer: Needed by Android! Flash this if OpenGApps zip removes /system/priv-app/GooglePackageInstaller

12. Google WebView: Needed by Android! Flash this if OpenGApps zip removes /system/app/WebViewGoogle

13. Help widget: Restores help/manual widget

14. MicroG installer: This will install GmsCore, GsfProxy, DroidGuard, and a permissions XML file. OpenGApps users dont need this

15. Stock firmware media files: Placed in internal storage by stock recovery. probably not needed. Extract zip and copy to /sdcard/ or /storage/emulated/0

16. Official play store: Installs PS for MicroG users. OpenGApps users dont need this

17. Original Private Mode APK: Restores original Private Mode APK. PM will not work if you flash this. probably not needed

18. Patched Private Mode APK: Installs patched Private Mode APK. PM should work fine now

19. S-Voice: Restores Samsung S-Voice app (who uses this crap?)

20. Collection of updated apps from the Note 4. Extract zip and install the APKs you want.

21. Samsung Apps widget: widget for Galaxy Apps store

22. Samsung Email/Exchange: Restores Samsung email/Exchange apps

23. Samsung_Galaxy_Store_-_Samsung_Cloud_-_Samsung_Account: Restores system apps for Samsung Account, Samsung Cloud, and Galaxy Apps store

24. Samsung game optimizer: restores game optimizer

25. Samsung Gear/Watch: Restores Gear/Watch system apps

26. Samsung Health Service: Restores Health Service, which SHealth depends on

27. Samsung internet browser: Restores stock browser

28. Samsung Kies: Restores Kies stub, which is needed for interfacing with the Kies PC software

29. Samsung QuickConnect/SFinder: restores files needed to make these work. They will also reappear in the pulldown statusbar again

30. Scrapbook: restores Scrapbook app

31. SmartManager v3: restores Smart Manager

32. Stock task manager and widget: restores task manager and Active Applications widget

33. Stock boot image and kernel library modules: restores stock boot.img and the kernel library modules it depends on.

34. Calculator: restores stock calculator

35. Stock clock apps: restores all stock clock apps

36. Stock fonts: restore stock fonts system apps

37. Stock music: restores Samsung Music app

38. stock_others.xml: This is is default others.xml with no added icons in the statusbar quick pulldown menu. Rename to others.xml (all lowercase), copy file to /system/csc/, set permissions to 0644. It is preferred that you do this from TWRP. root file manager will work too, but the owner and UID values must be 0 (root). You must factory reset before the icons will go back to default settings

39. SPlanner Calendar app and widget: Restores stock calendar and widget

40. Stock Tags (NFC) system app: Flash this if the OpenGApps zip removes /system/priv-app/Tags

41. Voice recorder: Restores stock voice recorder app

42. Stock wallpapers: Restores NoiseField and PhaseBeam wallpapers

43. System daydreams apps: Restores stock daydreams apps

44. Tap and pay widget: restores widget that lets you choose payment method

45. Google backup transport: needed by MicroG users, if they want contacts/calendar sync to work. OpenGApps users dont need this

46. Google calendar sync adapter: For MicroG users. Must also flash Google Backup Transport zip. OpenGApps users dont need this

47. Google Dialer: Installs GDialer and other files it needs to work. This is for MicroG users. OpenGApps users can just install GDialer from Play Store instead

48. Google Maps/media effects/widevine libraries: For MicroG users. Some apps wont work without these. OpenGApps users dont need this.

49. Original deodexed Google Contacts Sync Adapter: For MicroG users and OpenGApps users. MicroG users must also flash Google Backup Transport zip. This APK prevents the "Android is optimizing" message on every boot.

50. Google keyboard and Swype libraries: For MicroG users. Installs GBoard, and Swype libraries that other keyboards can use. OpenGApps users dont need this, they can just install GBoard from Play Store.

51. RBoard Theme Manager: This is an app that lets you install optional themes for Gboard. Gboard has a few default themes you can pick, this app lets you install dozens more. Along with sound effects. This app needs root. You dont need to install the RBoard magisk module separately

52. Patched build.prop for RBoard Themes Manager: This zip includes an edited build.prop so that RBoard can work. And empty /system/etc/gboard_theme folder. Rboard installs themes into this folder. Flash this before installing RBoard APK

Other mods I've done:

1. Remove Smart Manager v3. Now you will see "Power Saving" instead of "Battery" in settings

2. Adblocking hosts file integrated

3. Modded Private Mode APK by [MENTION=4107827]TEKHD[/MENTION] (now it turns on). However, PM may still break with certain custom kernels, or if you install other mods/changes I havent mentioned

4. Added 27 toggles in the statusbar (pull down to see them). Restore my default others.xml if you dont want them

5. Changed ro.securestorage.support from true to false in build.prop. Apparently Private Mode and SHealth work better when this value is false

Other notes:

Custom kernels: I would recommend FlashPoint kernel, v3 or v4 is fine. I dont recommend Ram Kernel. It is stable, but it has a bug where mobile data will stop working after awhile. It just cuts out, only a reboot will fix it...really annoying. This especially tends to happen when doing big downloads. Other kernels may work too, but i havent tried them. if you install a custom kernel, i'm not responsible if things break, like Private Mode/SafetyNet!

SafetyNet: My revised ROM zip will pass SafetyNet without root. This means you can use Pokemon Go, Netflix, banking apps, etc. There are SN checker apps out there, install one and run the test, should pass. It should also pass even with Magisk installed (it does for me). I didnt test with SuperSU, but if you install it in systemless mode, it might pass SN...no gaurantees. However, if you install Xposed, SN will definitely break. Other mods may or may not break it. I'm not responsible!

2 new additions (modded FlashPoint kernels):

With [MENTION=5285430]kevintm78[/MENTION]'s permission, I am posting modded zips of FlashPoint v3.1 and FlashPoint v4 beta. They are based on the following zips:

https://androidfilehost.com/?fid=745849072291697438

https://androidfilehost.com/?fid=890129502657582253

See the FlashPoint XDA thread for details on these kernels.

I did this for the following reasons:

1. The original zips have init.d related scripts in the boot.img that remount system partition to read/write on every boot. This is fine...but it prevents most Magisk modules from working (they cant bind mount into the system partition because of the remount).

The original zips also appear to flash BusyBox into the system partition. In addition to this, there is init.d stuff in the boot images. These 2 things can potentially cause SafetyNet to fail.

I have made the following changes:

1. Removed BusyBox installer zips (install it manually if needed, or use Magisk's systemless BusyBox module)

2. Removed Magisk installer zips (because they are very old)

3. Removed init.d functionality from the boot images (this involved deleting 2 scripts, and deleting a line from init.rc)

4. Removed some unnecessary ui_print and set_progress lines from the updater-script files

If you need init.d support in the kernel, then use [MENTION=4544860]osm0sis[/MENTION]'s Kernel init.d Support Injector zip

http://xdaforums.com/attachment.php?attachmentid=3761907&d=1464187934

Flashing order:

1. Flash either of my custom Flashpoint zips

2. Flash Kernel init.d Support Injector zip

3. Flash root

You can also use Magisk for script execution support on boot instead. SuperSU also has su.d scripts support which works like init.d. I still prefer init.d in the kernel (I'm old school), but others may not.

Kernel Adiutor app is the recommended way of configuring these kernels. Both of the modded zips have the extended battery patches built in, so if you have an extended battery (like me), then the kernels will support it fully. If you just have a stock battery, no worries. i've tried both batteries with these kernels, found no difference in battery life or % displaying correctly.

I cant gaurantee that SafetyNet will pass with my modded zips, I had Xposed installed when I tested them. But i think it should. If you're using Magisk on top of these modded kernels, try turning on Magisk Hide, then run a SN test.

Besides the changes I've listed, nothing else is changed, everything should work pretty much the same as the original FP zips. Report kernel issues in the FP XDA thread if you run into problems, but mention that you're using my zips.

At [MENTION=5285430]kevintm78[/MENTION]'s request, here are links to the source code for these kernels:

https://github.com/kevintm78/Flashpoint-F_3

https://github.com/kevintm78/Flashpoint-v4