[Samsung Galaxy J5 Guides, News, & Discussion] Tisenoiazei100:
​

The official FlymeOS builds of xiaomi, lg etc phones are based on CM/LOS so it makes porting easier. You need to have Excellent+ expirince of porting before proceeding so noobs stay away.​

I'M AN S3 NEO OWNER NOT J5 OR GRAND 2. JUST MOST OFFICIAL FLYME BUILDS ARE FOR MSM8916 PHONES AND CAN HELP SOMEBODY. ALSO DO NOT MAKE REQUESTS TO ME OR ANYONE HERE!!!!​

If you know how to build from their sources, better build it than porting it.​

I DO TAKE NO RESPONSIBILITY IF ANYTHING HAPPEN. PROCEED CAREFULLY​

So what we need:

- CM/LOS Base

- Tools for extracting system.new.dat and boot.img

- An official QUALCOMM, CM BASED!!!!!!! FlymeOS base(I prefer Xiaomi Redmi 2)

- Excellent+ porting expirience

- Understand logcats

Lets begin by bare-boning our base

1. Extract Your CM/LOS and Flyme os in seperate folders(Well name CM base and Flyme port)

2. From your base delete app, priv-app, framework, media and fonts(BEFORE THAT KEEP TimeService and com.qualcomm.location in another place)

3. Now on etc folder delete permissions folder and preloaded-classes file.

We made a nearly bare-bones base now :)

Lets port the darn thing!!!

4. Add app, priv-app, media and framework of port to base

4.5. For brainless reasons flyme adds fonts and customizecenter folder in data folder with the romer(builder) name behind it so itd like (blabla-fonts). That leads us in No. 5

5. Inside flyme zip take everything from data except vendor and add it to base system

6. Delete romer name from added files example "when you add fonts from data, its like (blabla-fonts). Rename it to (fonts)"

7. In etc folder, add permissions folder and preloaded-classes file from port to base

8. Now at libs, On port lib folder we have to remove all folders

9. Now remove whatever libs which contain

To find what lib contains these, just copy-paste each line with the * too and whatever lib pops up, remove it.

10. Now take all libs from port and throw them at your base(Do not replace anything!!!!!!!!!!!!!!!)

11. From port libs replace libbluetooth_jni

12. In app and priv-app folder delete (if exist) everything below:

13. Add the TimeService and com.qualcomm.location that we kept from our base to app

14. From port build.prop add everything from the top(the lines before #begin build preporties) to base build.prop

15. Repace ro.build.id of base with port ones.

16. If you have porting expirience you know to replace default ringtones of base with port ones)

17. Save it and now go to bin folder

18. On bin folder add shutdownanimation and flymed files of port to base bin folder

18.5. if rom gets to bootanimation, then add bootanimation file of port to base to fix the black spaces)

19. Decompile port ramdisk and take init.rc, init.environ.rc, service_contexts and if exists, init.flyme.rc to desktop

20. Decompile base ramdisk and replace service_contexts with the one we kept

21. In port init.rc youll find at the end three to four lines related to flymed. Take them and add them at the end of base init.rc

22. At base init.environ.rc replace bootclasspath and serverclasspath with port init.environ.rc ones.

23. Go to default.prop and change the lines with these

24. Save and recompile boot.img

25. Add your modded boot.img back where it was

26. At port updater-script find to set_perm line, the permission of flymed and add it to base

26.5. If you want, remove the symlinks of apps that exist in base updater-script but if you want to avoid Status 6 error dont do it

27. Repack and flash
​

If you did well itll reach the screen where it optimizes apps or go to setup wizard.​

BUGFIXES/FAQ'S AND SOLUTIONS​

NativeCryto Crashes

Replace libjavacore.so and libjavacrypto.so of base with port ones.

RIL Fixing

Replace telephony-common.jar and Teleservice.apk and TelephonyProvider.apk of port with base ones.

MMS Fixing Coming soon

Messaging FC

Replace libselinux.so of base with port ones.

Failed to RegisterNatives for AssetManager or Surface

Maybe you are porting exynos/mediatek Flyme or Non-CM based Flyme. Change base.

Porting with TW or something else as base

Avoid it! It wont even pass splash screen and dont even dare to talk about stability of stock etc etc....

Nfc Crashing

For S3 Neo i know Nfc doesnt work. Remove Nfc app if it doesnt work for base too!