Cyanogenmod

Two articles with good step-by-step:
https://www.cnet.com/how-to/how-to-root-the-samsung-galaxy-ace-2/
https://www.cnet.com/how-to/how-to-install-jelly-bean-on-the-samsung-galaxy-ace-2/
Backed up here: How to root the Samsung Galaxy Ace 2 – CNET + How to install Jelly Bean on the Samsung Galaxy Ace 2 – CNET

I have instead of Jelly Bean installed 12.1
I ended up with good install after first try. First booting took minutes.
I have also problems right now: phone vibrates/freezes for a second every two minutes + I can’t call

More links:
Newer but may be buggy:
http://www.cyanogenmods.org/forums/topic/galaxy-ace-2-cm-13-cyanogenmod-13-marshmallow-rom/
http://forum.xda-developers.com/galaxy-ace/ace-2-develop/rom-cyanogemod-13-sergeyl-t3277418

Cyanogenmod walkthrough that did not work for me:
http://www.cyanogenmods.org/forums/topic/enable-developer-options-stock-android-cyanogenmod-custom-roms/
http://www.cyanogenmods.org/forums/topic/install-twrp-recovery-samsung-android-using-odin/
http://www.cyanogenmods.org/forums/topic/unlock-bootloader-android-phone-using-fastboot/
http://www.cyanogenmods.org/forums/topic/flash-install-custom-rom-twrp-recovery/
http://www.cyanogenmods.org/forums/topic/galaxy-ace-2-cyanogenmod-12-1-lollipop-rom-i8160/
http://www.cyanogenmods.org/forums/topic/clean-wipe-data-partitions-using-twrp/