I hike in Western Ghats, Maharashtra, India. Most of the times the hike involves walking/climbing in day time and resting/sleeping, often in caves/unmanned temples/shaks of some kind at night. Sometimes the hike involves walking at night. I wonder which dangerous wild animals (predatory/non predatory) should I be worried about. What precautions should I take to avoid getting too close/alerting them.
I've hiked the Ghats in Maharashtra, Tamilnadu and Kerala without issues, but did take sensible precautions. The most dangerous animals are gaur (wild relatives of cattle), boar, snakes, and elephants. Each requires its own precautions, but most will happily get out of your way if they know that you are coming.
In areas with known Gaur populations, use extreme caution. I'd recommend not travelling by foot in those areas. If you must hike in those areas, make some noise so that they can hear you coming.
Boar are mostly crepuscular (active near dawn and dusk) and can be very grumpy if surprised or if they are defending their babies. Again, make some noise so that you don't surprise them. You can often smell them before you can see them.
Snakes require attention while you are hiking. They are most likely to sense your presence by feeling the vibrations of your footsteps. Be especially careful if you are hiking in areas with lots of leaf litter, where it will be difficult for them to detect your footsteps. Watch ahead of you, and do not step or reach into brush or tussocks of grass. Brown cobras are especially fond of hiding in the vegetation.
Wild elephants are increasingly rare but can be a problem in some very wild areas (such as Mudumalai). Should you encounter elephants, back up slowly and calmly. Do not run from a false charge (ears out and trunk up), but seek cover immediately from a real charge (ears back and trunk tucked up under the chin).
When camping, the usual morning precautions are in order--shake out your boots before putting them on and shake out your bedding before rolling it up.
The chances of coming upon these creatures are slim, and they will (almost without exception) give way if you have announced your presence. Be alert and enjoy your hikes.
Wish I was there right now.