The Court of Criminal Appeals, the District Courts, the County Courts, or any Judge of said Courts, have power to issue the writ of habeas corpus; and it is their duty, upon proper motion, to grant the writ under the rules prescribed by law.
Tex. Code Crim. Proc. § 11.05