If a genie happens to give you three wishes, your top choice had better be having Will Smith as your best friend. Within the first two, for sure.

Director Guy Ritchie puts the A-lister in Arabian garb – and turns him into a blue-skinned, computer-generated Genie – in Disney’s new live-action musical “Aladdin” (★★★ out of four; rated PG; in theaters nationwide Friday). The memorable songs return (with some new additions) and the movie razzles and dazzles with huge dance sequences and impressive production design, but it’s definitely a more grown-up tale than the original 1992 animated classic.

While there’s a certain charm missing from the revamp, Smith goes way over the top to make up for it. For those who've ever wondered what the Fresh Prince of Bel-Air would be like as a middle-aged guy plopped into a bevy of belly dancers and hoofing swordsmen, here you go.

The story is the same as it ever was, with a few tweaks: Aladdin (newcomer Mena Massoud) is a good-hearted thief from the streets of fictional Agrabah who runs into Princess Jasmine (Naomi Scott), hiding her royalty to see what life is like in the bazaar outside her palace. Trying to get close to her, Aladdin runs afoul of Jafar (Marwan Kenzari), grand vizier to Jasmine’s dad the Sultan (Navid Negahban) and is forced to venture into the dangerous Cave of Wonders to procure a magic lamp.

A few rubs later, out pops the muscular and quippy Genie (Smith), and the two team up to make Aladdin a princely fellow worthy of Jasmine’s heart and foil Jafar’s nefarious machinations to rule Agrabah himself.

Let’s deal with the giant magical elephant in the room: There will never be another Genie like the late Robin Williams. What the original "Aladdin" did, though, was let Williams loose and animated his comedic brilliance. Smartly, the same is done here for Smith: Genie is Big Willie Style on full blast, rapping and riding ostriches. His character flips between regular human and mystical dude throughout the film, though Smith’s CGI self is distracting at times. (It proves that just because you can turn a famous actor blue doesn’t mean you should.)

Much of the new fun in the movie comes courtesy of Genie and Aladdin’s friendship. As played by a top-notch Massoud, Aladdin is a lovelorn mess who embarrasses Genie frequently, and for those who’ve been waiting for a “Hitch” sequel, Smith’s enchanting persona doles out dating advice for his young pal as he woos Jasmine. Genie himself crushes on handmaid Dalia (Nasim Pedrad), a debuting supporting character who helps flesh out Jasmine’s story.

The biggest changes to “Aladdin” arrive with its resident Disney princess, an improved version of her old animated self. Jasmine has dreams of inheriting the mantle of sultan from her overprotective dad, though she’s stuck in the palace and told to stay silent in this patriarchal system. The powerhouse Scott belts out those repressed emotions in the new tune “Speechless,” an emotional ballad written by Alan Menken and "La La Land" lyricists Benj Pasek and Justin Paul that doesn’t quite jibe with holdovers like “A Whole New World” and “Prince Ali.”

There is a welcome progressive streak as well. Menken and the late Howard Ashman's “Arabian Nights,” which had controversial lyrics in the original version, was rewritten by Pasek and Paul for Smith's scene-setting opening number. The new film’s casting also stays true to the Middle Eastern culture and setting – there’s only one white guy of note, a dim-bulb Scandinavian suitor for Jasmine played by Billy Magnussen.

Ritchie’s “Aladdin” doesn’t sing or soar like the 27-year-old cartoon still does, and headier themes might bypass little moviegoers, but it’s nonetheless quite a cool and nostalgic magic-carpet ride.