For UV detecting, it needs high ratio of signal to noise, which means high responsibility and low noise. GaN-based avalanche photodiodes can provide a high internal photocurrent gain. In this paper, we report the testing and characterization of GaN based thin film materials, optimization design of device structure, the device etching and passivation technology, and the photoelectric characteristics of the devices. Also, uniformity of the device was obtained. The relationship between dark current and material quality or device processes was the focus of this study. GaN based material with high aluminum components have high density defects. Scanning electron microscope, cathodoluminescence spectra, X-ray double crystal diffraction and transmission spectroscopy testing were employed to evaluate the quality of GaN-based material. It shows that patterned sapphire substrate or thick AlN buffer layer is more effective to get high quality materials. GaN-based materials have larger hole ionization coefficient, so back incident structure were adopted to maximize the hole-derived multiplication course and it was helped to get a smaller multiplication noise. The device with separate absorption and multiplication regions is also prospective to reduce the avalanche noise. According to AlGaN based material characteristics and actual device fabrication, device structure was optimized further. Low physical damage inductively coupled plasma (ICP) etching method was used to etch mesa and wet etching method was employed to treat mesa damage. Silica is passivation material of device mesa. For solar-blind ultraviolet device, it is necessary to adopt a wider bandgap material than AlGaN material. The current-voltage characteristics under reverse bias were measured in darkness and under UV illumination. The distribution of dark current and response of different devices was obtained. In short, for GaN-based UV avalanche photodiode, dark current was related to high density dislocation of thin film materials and device processes, especially the mesa etching and passivation. More and more proofs reveal that the mesa formation course even plays the most important role in generation of dark current.