Edit: also if there is any save file or anything which can get me bypass pressing W would be very helpful.
I just found the solution and it was fairly easy but also a bit buggy but nevertheless it worked. And here is how
1. Download the app gamepad by fishstrix.
2. Open it and choose the very 1st option configure input methods and allow the gamepad.
3. Go back and choose the 2nd option set current input method and set it to gamepad.
4. Then go back and choose the 3rd option (go to gamepad settings) here you can set the game keys. So main keys to set will be W and spacebar.
Here is how: Uncheck the xbox360 option so that you can change the keys and then go down to change the button A to spacebar and button Y to W. And leave other buttons as it is.
5. Check the Gamepad Notifications to permanently enabled, it's just bellow the Y button configuration.
6. Go back and test the gamepad and it should float in lower screen of your phone.
#*#*#*#* IMPORTANT *#*#*#*#
Now here is the tricky part which made me so confused.
1.You go and open the game where it says to press w.
2. The gamepad won't automatically appear, you have to keep tapping the bar outside the game where appears and by chance it will appear in game and then you just have to press the key.