https://www.ftb.ca.gov/forms/2020/2020-1031-publication.pdf has the "what establishes residency"
> The term “domicile” has a special legal definition that is not the same as residence. While many states consider domicile and residence to be the same, California makes a distinction and views them as two separate concepts, even though they may often overlap. For instance, you may be domiciled in California but not be a California resident or you may be domiciled in another state but be a California resident for income tax purposes.
> Domicile is defined for tax purposes as the place where you voluntarily establish yourself and family, not merely for a special or limited purpose, but with a present intention of making it your true, fixed, permanent home and principal establishment. It is the place where, whenever you are absent, you intend to return. The maintenance of a marital abode in California is a significant factor in establishing domicile in California.
As long as you're remaining transitory and not staying in a single, fixed, permanent home you should be fine.
Hiking the Pacific Crest Trail (takes about two to three months to get out of California) won't establish residency in California.