This paper provides a characterization of viability kernels and capture basins of a target viable in a constrained subset as a unique closed subset between the target and the constrained subset satisfying tangential conditions or, by duality, normal conditions. It is based on a method devised by Hélène Frankowska for characterizing the value function of an optimal control problem as generalized (contingent or viscosity) solutions to Hamilton-Jacobi equations. These abstract results, interesting by themselves, can be applied to epigraphs of functions or graphs of maps and happen to be very efficient for solving other problems, such as stopping time problems, dynamical games, boundary-value problems for systems of partial differential equations, and impulse and hybrid control systems, which are the topics of other companion papers.