[Galaxy S Advance I9070 Q&A, Help & Troubleshooting] adamuadamu:
HOW TO PREPARE i9070 CUSTOM ROMS TO WORK ON 9070P​

disclaimer as usual - everything on your own responsibility still, seems to be quite safe, the worst ever happened is no gsm signal if using not appropriate /lib/tee folder files. no soft/hardbricks reported (yet :p )

technical details - scroll a bit down

----

part 1: /system/lib/tee folder to replace

Jelly Bean Stock ROMS and ones based on Samsung Stock ROMs (Harshjelly, PureVanilla, LightJB..)​

the most important information: in order to get i9070P Jelly Bean modded stock ROMs working, you have to:

1. download this file: http://d-h.st/vUw

2. save the file on your sd card (preferably external sd, not the internal memory)

3. flash your desired rom, do all neccessary wipes and so on, but DON'T REBOOT YET!

4. you have to install the zip downloaded in step 1 (don't confuse the order of steps 3 and 4, otherwise your rom won't work for 9070P, ie. you won't have any radio modules working - gsm, wifi, bt)

5. reboot and enjoy

tested by users on various modded stock roms (read all the pages); the one above works on stock-based ROMs only,

----

CyanogenMod ROMs

for CM10, CM10.1 and CM10.2 file here: http://d-h.st/E9e

proceed exactly as steps described above

thx Mr.xD97 - files for /system/lib/tee extracted from his rom here http://xdaforums.com/showthread.php?t=2278169

according to hannez_r

- thx for the info

-------------------------​

part 2: the build.prop incompatibility:​

this happens if you attempt to flash custom roms straight from your 9070P stock ROM. once you successfully flash any i9070 ROM, you won't be bothered with the issue (until you reflash your stock ROM with odin again)

in case flashing of your target rom ends immediately with an error ("assert failed: getprop....") then you have to do something with your build.prop. The explanation for that happening is: there are build.prop entries stating that the phone is "9070P" and the updater-script prevents your target ROM from being flashed to an uncompatible device (not an "9070")

possible solutions:​

either: 1. grab some build.prop editors prior to flashing anything and change all occurences of "9070P" to "9070" and "janicep" to "janice". like this one: https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor or just edit your build.prop manually.

or: 2. unzip the target ROM .zip file, go to \META-INF\com\google\android and erase the lines starting with "getprop" (do NOT use windows notepad - it breaks the file, use notepad++ instead), save the edited updater-script and push it to the sd card. you're ready to flash the ROM

3. [automatically,

to be tested] - waiting for your reports.

; use the build.prop.to.9070.zip to spoof your build.prop to i9070 model; it's a CWM flashable that should change the contents of your build.prop automatically. all credits for the script go to the author of this post: http://xdaforums.com/showpost.php?p=19093919&postcount=20 - remember, not tested yet, in case you still get an assert:getprop error after flashing this .zip, try rebooting recovery and install the ROM .zip then method 3 most probably not working, so don't test unless you have lots of spare time to play with your phone

--------

source and inspiration:

I found that in galaxy ace 2 i8160/L/P forum - you have to replace /system/lib/tee folder (or 3 files inside) in order to flash custom roms made for i9070: there it is: http://xdaforums.com/showthread.php?t=2159250