Soak black peas in three cups of water overnight. Drain, add three cups of water and salt and pressure cook till three to four whistles.Soak kokum in a quarter cup of water and extract juice.
Heat two tablespoons of oil in a deep pan and sauté half the onions till golden brown. Add grated coconut and sauté taking care that the coconut does not get burnt.
When lightly browned, take it off the heat, cool slightly and grind to a fine paste using a little water. Heat the remaining oil in another pan and sauté the remaining onions till golden brown.
Add ginger paste and garlic paste and sauté for two to three minutes. Add boiled black peas and mix. Add red chilli powder and mix. Add onion-coconut paste and garam masala powder and adjust salt.
Add kokum juice. Mix, cover and let it cook on low heat till it thickens.
Serve hot with pav.