How does one obtain jnAnam is very clearly laid out by Bhagwan Krishna in verse 4.34
tad viddhi pranipatena pariprasnena sevaya
upadeksyanti te jnanam jnaninas tattva-darshinah
4.34 Know that through prostration, inquiry and service.
The wise ones who have realized the Truth will impart the Knowledge to you.
PranipAta is prostration - you prostate indicating Sharanagati or Surrender ( - I have come to you because I find no other way). Pariprashna is acknowledging one's ignorance and framing the questions appropriately - who am I? what is samsara? etc as the Vivekachudamani or the Prasnopanisad etc indicate - indicating Shraddha (- I ask because I have complete shraddhA that you have the answers and can help me understand them as well). Only then, after Sharanagati and Shraddha, does shravanA actually begin - when the Guru starts to talk. The third aspect of this is Seva which indicates acquision of Shadsampatti - to develop a proper attitude in the mind, by service to the Guru, to build up shama dama and other such qualities, so that the knowledge that is being taught, may freely flow, unobstructed by one's Ego, and thereby actually soak ones intellect. Once there is Sharanagati Shraddha and Shad-Sampatti and there is a Guru, who is a Tattvadarshi, a Seer, then jnAnam is assured.