  Einstein's theory of general relativity (GR) has been precisely tested on
solar system scales, but extragalactic tests are still poorly performed. In
this work, we use a newly compiled sample of galaxy-scale strong gravitational
lenses to test the validity of GR on kiloparsec scales. In order to solve the
circularity problem caused by the preassumption of a specific cosmological
model based on GR, we employ the distance sum rule in the
Friedmann-Lema\^{\i}tre-Robertson-Walker metric to directly estimate the
parameterized post-Newtonian (PPN) parameter $\gamma_{\rm PPN}$ and the cosmic
curvature $\Omega_k$ by combining observations of strong lensing and Type Ia
supernovae. This is the first simultaneous measurement of $\gamma_{\rm PPN}$
and $\Omega_k$ without any assumptions about the contents of the universe or
the theory of gravity. Our results show that $\gamma_{\rm
PPN}=1.11^{+0.11}_{-0.09}$ and $\Omega_{k}=0.48^{+1.09}_{-0.71}$, indicating a
strong degeneracy between the two quantities. The measured $\gamma_{\rm PPN}$,
which is consistent with the prediction of 1 from GR, provides a precise
extragalactic test of GR with a fractional accuracy better than 9.0\%. If a
prior of the spatial flatness (i.e., $\Omega_{k}=0$) is adopted, the PPN
parameter constraint can be further improved to $\gamma_{\rm
PPN}=1.07^{+0.07}_{-0.07}$, representing a precision of 6.5\%. On the other
hand, in the framework of GR (i.e., $\gamma_{\rm PPN}=1$), our results are
still marginally compatible with zero curvature
($\Omega_k=-0.12^{+0.48}_{-0.36}$), supporting no significant deviation from a
flat universe.
