Merge "Sort the file with image content."
diff --git a/apex/apex.go b/apex/apex.go
index 629cbbf..a421850 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1374,6 +1374,8 @@
 			copyCommands = append(copyCommands, "ln -s "+filepath.Base(dest)+" "+symlinkDest)
 		}
 	}
+	emitCommands = append(emitCommands, "sort -o "+imageContentFile.String()+" "+imageContentFile.String())
+
 	implicitInputs := append(android.Paths(nil), filesToCopy...)
 	implicitInputs = append(implicitInputs, a.manifestOut)