The court of criminal appeals , the district courts , the county courts , or any judge of those courts may issue the writ of habeas corpus, and it is their duty, on proper application , to issue the writ under the rules prescribed by law.
Tex. Code Crim. Proc. § 11.05