Using a mortar and pestle or blender, pound or blend (A) till fine. Add a little oil to grease the blades if necessary.
Heat up oil in a wok over medium heat. When hot, add (A) and fry till fragrant and light brown. Add preserved or salted soy bean paste, ingredients (B), and stir over low heat for a short while.
Put in pork slices with 1/3 of tamarind juice. When pork begins to change colour, add in the green and red chillies and the remaining tamarind juice. Bring to a boil, reduce heat and simmer till pork is tender, about 45 minutes to an hour. While cooking, add a little water if gravy gets too thick or reduces too quickly before pork gets tender. Serve hot.