diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 4371c2321..db6369d27 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -1241,7 +1242,11 @@ status_t Parcel::read(FlattenableHelperInterface& val) const status_t err = NO_ERROR; for (size_t i=0 ; ireadFileDescriptor()); - if (fds[i] < 0) err = BAD_VALUE; + if (fds[i] < 0) { + err = BAD_VALUE; + ALOGE("dup() failed in Parcel::read, i is %d, fds[i] is %d, fd_count is %d, error: %s", + i, fds[i], fd_count, strerror(errno)); + } } if (err == NO_ERROR) {