The two 17-year-old boys, who police said are bikie gang members, have pleaded not guilty to firing handguns into a unit block in Merrylands last month.
The boys were charged over the drive-by shooting at the apartment building on April 23.
They did not apply for bail and it was formally refused and they will next appear at Parramatta Children's Court on June 6.
One of the youths, from Granville, was charged with two counts of reckelessly firing a weapon.
The other youth, from Auburn, was charged with one count of firing a weapon.
There will be a hearing to decide whether the police can take DNA evidence on May 18.