N Recovery Image Creation and rsync

22 views
Skip to first unread message

Yam Marcovic

unread,
Sep 1, 2016, 10:05:44 AM9/1/16
to android-platform
Hello all,

I have encountered a problem with the Android N image creation (updateimage target) process, and specifically in the part that creates the recovery image.
The problem is that rsync fails since it fails to update file times.
I'm not sure how important it is to update file times in that rsync command, but I disabled it (I just passed in -JOI without any deep consideration), and the whole thing seems to work, as I have successfully flashed my device--Nexus 5X (bullhead)-with a completely new image.

Background:
Just to share the background to why rsync doesn't work. This is because my tree's out dir is mounted with unionfs-fuse, which for some reason causes a problem there (it seems to be a known problem). I couldn't find any FUSE or unionfs mount option that seemed to be able to fix it.
If you're wondering why I'm using unionfs, it's because I'm working on several features on several different branches, and I want to have quick access to each branch's binaries, not have them interfere with each other. I'm also going for space reservation.
The way I go about it is by first compiling the entire flashable package to a base-tagged (i.e. 7.0.0_r1) dir, and then whenever I switch branches I do a copy-on-write overlay of a branch-specific out dir over the base tag build dir. In that way I only compile and save deltas from the base tag build. You should try it if you also need to reserve space on your drive. I have been doing it since Lollipop and up till now (save for the recovery thing) it has been working perfectly.

By the way, this is a new problem in N. Previous versions might not have used rsync at all. But it's easily fixable, and should perhaps be considered as an official patch.

Reproducing:
Simply mount your out dir with unionfs-fuse, passing in -cow.

Best wishes,
Yam
Reply all
Reply to author
Forward
0 new messages