While using AA batteries to charge your phone is not ideal, it is generally safe as long as you use a battery holder that fits your phone's battery.