Erazor Djinn is a fictional character in the Sonic the Hedgehog series who serves as the primary antagonist in Sonic and the Secret Rings. His name is a pun on the words "Eraser" and "Razor" because he is "erasing" the pages of the book and he uses a weapon that looks much like a straight-edge razor.
Following the Sonic/Dragon Ball connection, his appearance seems to be based on the villain Majin Buu (Though his outfit has a passing resemblance to Broly). A running gag throughout the game is that he keeps on calling Sonic a rat, saying that all vermin are "worthless just the same", and an increasingly-irritated Sonic reminds him that he's a hedgehog (interestingly, the only time he correctly identified Sonic as being a hedgehog was just before he attempted to kill him for the World Rings).
Erazor is the Genie of the Lamp from the tale of Aladdin and the Magic Lamp. In his story, he was punished for misdeeds, and was to remain in his lamp until he had granted the wishes of 1,000 people. When he had fulfilled his sentence, he had a hatred for the creator of the story. He began to take over the Arabian Nights, twisting the words that supported the stories into spirits that followed his command. The genie attempts to absorb the pages of the book, so he can control the entire world of Arabian Nights, as well as make his way into Sonic's world.
In battle, Erazor uses his razor as weapon, but when he swings it creates lines of fire as it moves. He can also turn into a giant using the power he gained from absorbing the words of the Arabian Nights (he's normally human-sized, but as a giant his head is roughly the size of Sonic's whole body). When Erazor first met Sonic, he quickly tried to kill him. After that, he asked Shahra if she had the seven World Rings (not paying much attention to Sonic), and finding she doesn't, he shoots a flame at her as "punishment." Sonic takes the hit, and Erazor says that if Sonic doesn't bring him the Seven World Rings before the flame goes out "your life is forfeit," and leaves. He meets Sonic and Shahra again later when he's summoning the Ifrit, saying that he decided to let the Ifrit burn the remaining pages in the book. Erazor then asks Sonic if he has the Seven World Rings, and Sonic complains about Erazor calling him a rat. Erazor, figuring that Sonic doesn't have the rings, tells Sonic that he'd "better hurry it up" and leaves.
When Sonic and Shahra break into Erazor's palace they meet him again. When Erazor asks if Sonic has the rings and Sonic says that he should look for them himself, Erazor responds "I'll carve you to pieces until I find every last one of them" assuming (correctly) that Sonic has the rings. Sonic beats Erazor and forces him back. When Erazor sees that Sonic has the rings, and plays on Shahra's feelings for him (or that she used to have for him), and gets the rings. Erazor then reveals that he intended to sacrifice Sonic to gain control of the rings, but Shahra takes the hit for Sonic (making Erazor the only other villain in the series other than Mephiles who has killed anybody on-screen) and dies in Sonic's arms, asking for his forgiveness. Nonetheless, his ritual is successful, and he is empowered by the rings. However, because he didn't sacrifice Sonic, he didn't gain complete control over the rings and turns into Alf-Layla-wa-Layla.
Main Article: Alf-Layla-wa-Layla (Sonic the Hedgehog)
Alf-Layla-wa-Layla is an incomplete, twisted, grotesque genie demon, and is the powered-up form of Erazor. His name is Arabic for "One thousand and one". He has the ability to create lines of fire like Erazor does, but he doesn't need a weapon to do it. His other attacks include, shooting out purple balls of energy (he shoots one from each hand, and has six of them, easily avoided using time break), and creating blue whirlpools. His most powerful attack is using all of the words from Arabian Nights to create a massive purple ball, which can't be dodged. This attack is also his weakness, as Darkspine Sonic can knock back at him (the only way to make him vulnerable).
The seven World Rings and the death of Shahra triggered his transformation, and to complete it he must sacrifice Sonic, the collector of the rings. He is intent on ruling the Arabian Nights world and Sonic's. Fortunately some of the World Rings triggered a transformation in Sonic, creating Darkspine Sonic, and he is defeated.
Erazor survived the fight, and mocks Sonic, saying that he's immortal and will always come back after defeat. Sonic, however, reveals that he has Erazor's lamp (given to him by Shahra and reverted to its normal form when she died), and states "the genie of the lamp is supposed to grant three wishes, am I right?" Despite Erazor's refusal to grant a wish for Sonic, he is helpless against the power of his lamp and forced to do so. Sonic wishes for Erazor to resurrect Shahra, restore the works of the Arabian Nights, and seal himself into his lamp until the end of time. While being sucked into the lamp, Erazor begs for Shahra to help him, but she refuses, leaving the evil genie to be sucked into his lamp. At the end, Sonic drops the lamp into the Foundry where he fought the Ifrit, either destroying it or keeping anybody from ever finding it.