Nobody was hurt in the gunfire, which took place in the carport of an apartment complex in the 1100 block of East Bishop Street.
The boy, a documented gang member, told officers he made the gun for protection from a guide he found on the Internet and was just testing it, Cpl. Anthony Bertagna said.
He was booked into Juvenile Hall on suspicion of shooting into an inhabited dwelling because he was in the area of the apartments.
He was also booked on suspicion of manufacturing and possessing a dangerous weapon, participating in a street criminal gang and having a firearm within 1,000 yards of a school.
Police also arrested a 21-year-old man, Rafael Pineda Jr., on suspicion of the same charges.
Bertagna said he was acting as a lookout.