interfacing MEGA 2560 ADK with Galaxy Samsung GT-I8150

I don't think the Open Accessory libraries are compatible with Android 2.3.35. I think you'll need to go to at least 2.3.4.