The day before cooking, dissolve the half-cups of salt and sugar in a half-gallon of cold water and the apple juice. Put the shanks into separate food-storage bags. Divide the salt-sugar brine between the two bags. Push out the air and seal the bags. Put them in a pan or a bowl and into the refrigerator to marinate overnight (or 8-12 hours.
Remove the shanks from the brine solution. Discard the solution. Rinse the shanks in cold water and allow to drain.
Cut quarter-inch, crosshatch cuts into the rind. Combine the salt and pepper and rub it into the pork shanks, particularly into the slits.
Preheat oven to 325. Cover the bottom of a roasting pan with the sliced onions and crushed garlic. Put the shanks on top of the onions. Cover loosely with foil, and put the pan into the oven.
Roast the shanks for two to three hours (longer if the shanks are larger than about 2 pounds each). Take a temperature reading in the center of the thickest part of the bigger shank. When it reaches about 140 degrees, remove the foil (but save it) and turn the oven up to 400 degrees. After a half-hour or so, check the temperature again. You are looking for an internal temperature of about 155 degrees.
When the shanks are up to temperature, remove the pan from the oven. Cover it with the foil, loosely. Let it rest for fifteen minutes. Slice and serve.