Gimp will save all layer information plus undo plus other stuff in its own format. Export does what you want. I don’t know Adobe products, but I could imagine Photoshop doesn’t save to jpeg as default.
Why are you using Linux and Android in the first place?