No direct link has been identified between the suspect and the cell of mainly young Moroccans behind the Barcelona attack, but he had celebrated the attack on Facebook, the report said.
At Tuesday's closed-door hearing, Andreu was planned to read out charges against the men, expected to include counts of terrorism, murder and weapons possession.
Four alleged members of a terror cell accused of killing 15 people in attacks in Spain are being interrogated in court, a day after the last missing member of the group was shot dead by police near Barcelona.
Three of them were arrested on August 17 and 18 in the northern Catalan town of Ripoll.
A second van rented by Driss Oukabir was used two hours later in the Barcelona rampage.
Mohamed Houli Chemlal, arrested after being hurt in the blast at Alcanar, also appeared in court as did Salah el Karib, who ran an internet cafe in Ripoll that, according to La Vanguardia newspaper, was used to send money to Morocco.
His brother Moussa was one of the five radicals shot dead on Friday by police in Cambrils.
"We confirm that the man shot dead in #subirats is Younes Abouyaaqoub, author of the terrorist attack in #barcelona", police tweeted Monday.
Islamic State claimed that its "soldiers" carried out the Barcelona attack, which killed 13 people - the most to die in a terrorist attack in Spain in more than a decade.
Both suspects were arrested on Sunday, according to 2M.
The confirmation was given by Mohamed Houli Chemlal, the first member of the four survivors of the cell to testify in the Spanish National High Court on Tuesday, Xinhua reported.
Police believe the men had accidentally set off explosives they were preparing for "one or more attacks" in Barcelona.
Speaking anonymously in line with court rules, the court official said Chemlal answered questions, but gave no details of what the suspect said in court.
Just hours later, a woman was killed in the seaside resort town of Cambrils, about 70 miles southwest of Barcelona, in an attempted repeat of the earlier crash.
Two members of the groups had died on Wednesday in an explosion at a house where explosives were being made in Alcanar Platja.
But the judge ruled the evidence was "not solid enough" to keep holding Aalla, who was freed on condition he appear in court weekly, relinquish his passport and not leave Spain. More than 120 people were injured, most in Barcelona.
The suspected perpetrator had reportedly changed his clothes, walked by night and hid during the day, the paper said citing sources involved in the investigation.
Suspect Driss Oukabir was arrested Thursday in the northeastern town of Ripoll, as were two others identified by Spanish media as Mohammed Aalla and Salh el Karib.
At the same time, French Interior Minister Gerard Collomb told BFMTV that the Audi used in Cambrils was detected by speed cameras in the Paris region while making "a very rapid return trip" days before the Spanish attacks. Speaking anonymously in line with court rules, she said the testimony would be in Spanish without interpreters.
Police said that after the attack, Abouyaaqoub had escaped on foot, stabbing to death a man, who was parking his auto, and fleeing in the victim's vehicle.
Police say he flashed what turned out to be a fake suicide belt at two officers who confronted him in a vineyard.
This story has been corrected to show 13 were killed in Barcelona attack, instead of 14, and to correct the spelling of suspect's surname to Chemlal.