Deleted main kodi program on a MyGica ATV582

My apologies to start. I am a newbie in need of help. I am not sure I have placed this in the correct forum.

I was attempting to upgrade KODI and in the process deleted it off of my Android box altogether.

Would anyone have the patience to walk me through the process of reinstalling Kodi-XMBC on my machine and then explain how to upgrade to the most current version. I believe it is version 17.

Do I need to go back to factory settings or can this be replaced. (I did not back up)

Thank you for your patience and time