1. A working brain
2. Galaxy Ace 2 GT-I8160/P/L
3. A computer and rooted phone.
4. Root explorer or similar app
1. Using Root Explorer ( or similar app ) go to /system/lib and locate a folder called "tee" . ( This should be done using a ROM which detects SIM )
2. Copy that folder onto your SD Card / PC .
3. Open your desired ROM using 7zip / Or any similar application and once again navigate to /system/lib and replace the "tee" folder with the one you just copied
4. Then flash the ROM as usual using custom recovery !
For people who have no idea even after such an awesome guide , Here!
Note : To flash custom ROMs based on Jelly Bean, install any firmware based on android 4.1.2 and copy its "tee" folder.
For i8160P :
GT-I8160P DBT I8160PXXME1 (Germany)
GT-I8160P PHE I8160PXXME1 (Spain)
GT-I8160P VIA I8160PXXME1 (Germany O2):
GT-I8160P O2C I8160PXXME1 (Czech Republic O2C)
GT-I8160P XEZ I8160PXXME1 (Czech Republic)
GT-I8160L THL I8160LDCME1 (Thailand)
zahirovic.safet ( for all the links )
Don't Forget to click the Thanks button if this helped