Android doesn't need one. Stock Android has had bluetooth controller suport for a long long time. No need to hack the phone / tablet. Even many games that don't suport joypads actuially do work with them such as the Sonic titles. Makes playing the games so much better.
Hidden Palace, playable in Sonic 2 for iOS/Android
General GamingI downloaded this the other day and its work is as fantastic as the sonic cd port maybe even better. Playing it on my iphone 5s and it looks beautiful. Also if you have a 3ds I recommend trying out m2's sonic 1 3d port, it looks nice and has a lot neat options.
The code for Sonic 2 is the same as sonic 1 for android and ios and has been mentioned at least twice in this thread.
Up, Up, Up, Down, Down, Down, Left, Right, Left, Right on the title screen should work.
Original thread: https://assemblergames.com/threads/hidden-palace-playable-in-sonic-2-for-ios-android.49172/