You need to be in F1 and with school endorsement (I-538) to file OPT based EAD. You should file OPT before I-485 to ensure approval, and can continue your non-immigrant status (F1, and H1 after that) in addition to I-485 pending, if you don't leave US before 485 approval.