Over the course of his career, Shia LaBeouf has gone from being Disney Channel's favorite annoying little brother in the sitcom "Even Stevens" to Hollywood's bad boy. The "Transformers" actor can attribute his new edgy image to his series of arrests and public antics that have made headlines.

In a new book titled "Prison Ramen" written by LaBeouf's "Man Down" co-star Clifton Collins Jr. and Gustavo "Goose" Alvarez, the 29-year-old actor is one of a few celebrities who got candid about their arrest record and spending time in the slammer.

In his essay, "Error Breeds Sense," which was written before his latest arrest, LaBeouf revealed that he has been arrested five times, including spending six hours in holding for stealing a Gameboy Pokémon at the age of 12.

"The first time I was only nine years old. It was in Pacoima, California," he wrote, according to People. "I was arrested for stealing a pair of Nike Cortezes from a local shop and held for six hours. The second time I was eleven, in the city of Tujunga, California. I was arrested for stealing a Gameboy Pokémon from Kmart. That time, too, I was in a substation for about six hours."

LaBeouf's childhood arrests were only enough to scare the actor straight for the next eight years. At 20, the actor spent two days in jail for trying to stab his neighbor. While behind bars, LaBeouf said his biggest takeaway was that "being in jail is not the move. It sucks ass." 

Despite his new revelation, the actor managed to get arrested three more times: once in Chicago for refusing to leave a Walgreens; in New York for disorderly conduct during Alan Cumming and Michelle Williams' performance on Broadway; and last month, in Austin, Texas, for public intoxication.

"The fourth time I was in Chicago and I wouldn't leave Walgreen's, so I was taken to spend the night in jail. For some reason, I had the best sleep ever," he wrote. "The most recent time was 2014, when I was twenty-eight and in New York City. I went to see the play 'Cabaret.' I didn't behave very well during the performance and ended up spending twenty-five hours or so behind bars..." 

While being locked up, LaBeouf said he remembers eating "a terrific egg sandwich." The actor added, "I think of my failures in life and in art. Thinking about my screwups loosens the grip of fear. It's freeing to f--k up and to recover."

"Prison Ramen" includes several essays from celebrities getting candid about their jail time and recipes from behind bars.