Thoroughly wash the pork legs and drain off any excess water.
Finely chop the onions, tomatoes, ginger, garlic, and chilies.
Dry-roast the cumin seeds, coriander seeds, black peppercorns, cloves, green cardamom, black cardamom, and cinnamon on low heat until fragrant.
Let the spices cool completely, then grind them into a fine powder.
Add the pork legs, ground spices, turmeric powder, red chili powder, salt, chopped vegetables, soy sauce, and vinegar to a pressure cooker.
Mix everything until the pork legs are evenly coated with the spices and seasonings.
Let the mixture marinate for at least 30 minutes, or for 2 hours to overnight for deeper flavor.
Place the pressure cooker over high heat and cook for the first 2 whistles.
Reduce the heat to medium and cook for another 7 whistles.
Release the pressure, then test a piece of meat, which should be tender and pull easily from the bone.
If the achar is watery, simmer it uncovered for a few minutes until it reaches your desired consistency.
Mix well and serve hot.