A Sydney teenager, who was arrested for plotting a terrorist attack in 2016, allegedly used a mobile phone to search the internet for Islamic State propaganda and find answers to questions such as when a person can "ask his parents' permission to go to jihad" a court has heard.

The teenage boy, who was 16 when he was arrested alongside another 16-year-old boy in a small Islamic prayer hall in Bankstown, is standing trial in the NSW Supreme Court.

He is charged with jointly committing an act in preparation or planning for a terrorist act, after he and the other boy visited the Bankstown Gun Shop, where four knives were purchased on two occasions between October 6 and 12 in 2016.

Read more: Sydney Morning Herald