For fix gallery edit i think you need to add
Or some libraries to system/lib
Had FC on editing on my old acer to because gallery was missing libs in system/lib.

Sent from my C5303 using XDA Free mobile app

My Github Click Here
Check My SoundCloud for my music remakes,mixes etc Click Here
Check My Website to find a portfolio and about me Click Here