In a large pan of water, add pork hock, onion, garlic, bay leaves, star anise, peppercorn and salt over high heat and bring to a boil.
Adjust the heat to low and cook for about 1-1½ hours.
Drain the pork hock completely and transfer into a bowl.
Set aside to cool completely.
Coat the pork hock with vinegar evenly and then rub with salt and black pepper.
Let the pork hock air dry for at least 6 hours.
Grease the Air Fryer Basket with cooking spray and then slide inside.
Adjust the temperature of Air Fryer to 450 °F to preheat for 5 minutes.
Coat the pork hock with oil evenly.
After preheating, arrange the pork hock into the greased Air Fryer Basket.
Slide the basket into Air Fryer and set the time for 15 minutes.
After 15 minutes of cooking, adjust the temperature to 350 °F for 10 minutes.
After cooking time is finished, remove the pork hock from Air Fryer and place onto a platter.
Cut the pork hock into desired-sized pieces and serve.