Using matrices this is what i thought could potentially work, but im not 100% sure: if i were to rotate Bone1 which has 3 children(including indirect) (Bone 2-4)
float rotation = PI / 4; // 45 degrees
Matrix bone1Matrix = Matrix.identity().translate(Bone1.localPosition).rotateX(rotation)
Matrix bone2Matrix = bone1Rotation.multiply(Matrix.identity().translate(Bone2.localPosition).rotateX(rotation)
Matrix bone3Matrix = bone2Rotation.multiply(Matrix.identity().translate(Bone3.localPosition).rotateX(rotation)
Matrix bone4Matrix = bone3Rotation.multiply(Matrix.identity().translate(Bone4.localPosition).rotateX(rotation)
And the origin of each bone would just be the translation part of their matrix(just a guess)
the rotation of each bone would either be the accumulated rotation or the initial rotation(i'd assume it's the latter)