how to check if my OS is not modified (is original) lets say, someone gave me an android phone ( with custom rom, lets say CM or etx). i did hard reset to erase alll data and usr apps.
but i am interested, how to know if that custom rom is not modified ( if i am afraid of spyware hard-coded into that os).

how to check if that system is clean from such custom modification, and is an original CM?



EDIT:
I've found interesting answer here - How to tell if phone&#39;s ROM is original or tampered?
No real way to test it unless you know what you are looking for (in terms of spyware) the best solution is to flash a new CM rom from an approved site that is known to be clean.