I've heard you can get "licenses" I've heard you get them in Hong Kong or Shenzhen but that's all I know.. Dont' ride without a license.. You can be locked up for up to 6 months. Also your insurance is voided if you do not have a license.
I don't know why these people at the city level ban motorcycles. They are missing the burgeoning rise in leisure bikers and the more they make local rules against them the more will the illegal bikers become.
Many man cities are doing this now. It's crazy. But. Hey!! You can ride in Beijing and Shanghai!!!