The most straightforward approach I currently is stupid:
1) dump whole ~20 GB of /userdata (as it turns out to be /data mount point)
2) modify /data and /system to enable adb on boot
3) Flash everything back.
If we don't find something better, I shall probably try this