Loading cmds/dumpstate/README.md +1 −1 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,7 @@ mmm -j frameworks/native/cmds/dumpstate device/acme/secret_device/dumpstate/ har ## To build, deploy, and take a bugreport ## To build, deploy, and take a bugreport ``` ``` mmm -j frameworks/native/cmds/dumpstate && adb push ${OUT}/system/bin/dumpstate system/bin && adb shell am bug-report mmm -j frameworks/native/cmds/dumpstate && adb push ${OUT}/system/bin/dumpstate system/bin && adb push ${OUT}/system/lib64/*dumpstate*.so /system/lib64/ && adb shell am bug-report ``` ``` Make sure that the device is remounted before running the above command. Make sure that the device is remounted before running the above command. Loading cmds/dumpstate/dumpstate.cpp +11 −1 Original line number Original line Diff line number Diff line Loading @@ -113,6 +113,7 @@ void add_mountinfo(); #define LOGPERSIST_DATA_DIR "/data/misc/logd" #define LOGPERSIST_DATA_DIR "/data/misc/logd" #define PROFILE_DATA_DIR_CUR "/data/misc/profiles/cur" #define PROFILE_DATA_DIR_CUR "/data/misc/profiles/cur" #define PROFILE_DATA_DIR_REF "/data/misc/profiles/ref" #define PROFILE_DATA_DIR_REF "/data/misc/profiles/ref" #define XFRM_STAT_PROC_FILE "/proc/net/xfrm_stat" #define WLUTIL "/vendor/xbin/wlutil" #define WLUTIL "/vendor/xbin/wlutil" #define WMTRACE_DATA_DIR "/data/misc/wmtrace" #define WMTRACE_DATA_DIR "/data/misc/wmtrace" Loading Loading @@ -1458,12 +1459,21 @@ static bool DumpstateDefault() { // Capture any IPSec policies in play. No keys are exposed here. // Capture any IPSec policies in play. No keys are exposed here. RunCommand("IP XFRM POLICY", {"ip", "xfrm", "policy"}, CommandOptions::WithTimeout(10).Build()); RunCommand("IP XFRM POLICY", {"ip", "xfrm", "policy"}, CommandOptions::WithTimeout(10).Build()); // Dump IPsec stats. No keys are exposed here. DumpFile("XFRM STATS", XFRM_STAT_PROC_FILE); // Run ss as root so we can see socket marks. // Run ss as root so we can see socket marks. RunCommand("DETAILED SOCKET STATE", {"ss", "-eionptu"}, CommandOptions::WithTimeout(10).Build()); RunCommand("DETAILED SOCKET STATE", {"ss", "-eionptu"}, CommandOptions::WithTimeout(10).Build()); // Run iotop as root to show top 100 IO threads // Run iotop as root to show top 100 IO threads RunCommand("IOTOP", {"iotop", "-n", "1", "-m", "100"}); RunCommand("IOTOP", {"iotop", "-n", "1", "-m", "100"}); // Gather shared memory buffer info if the product implements it struct stat st; if (!stat("/product/bin/dmabuf_dump", &st)) { RunCommand("Dmabuf dump", {"/product/bin/dmabuf_dump"}); } if (!DropRootUser()) { if (!DropRootUser()) { return false; return false; } } Loading include/input/TouchVideoFrame.h +10 −18 Original line number Original line Diff line number Diff line Loading @@ -30,42 +30,34 @@ namespace android { */ */ class TouchVideoFrame { class TouchVideoFrame { public: public: TouchVideoFrame(uint32_t width, uint32_t height, std::vector<int16_t> data, TouchVideoFrame(uint32_t height, uint32_t width, std::vector<int16_t> data, const struct timeval& timestamp) : const struct timeval& timestamp); mWidth(width), mHeight(height), mData(std::move(data)), mTimestamp(timestamp) { } bool operator==(const TouchVideoFrame& rhs) const { bool operator==(const TouchVideoFrame& rhs) const; return mWidth == rhs.mWidth && mHeight == rhs.mHeight && mData == rhs.mData && mTimestamp.tv_sec == rhs.mTimestamp.tv_sec && mTimestamp.tv_usec == rhs.mTimestamp.tv_usec; } /** /** * Width of the frame * Height of the frame */ */ uint32_t getWidth() const { return mWidth; } uint32_t getHeight() const; /** /** * Height of the frame * Width of the frame */ */ uint32_t getHeight() const { return mHeight; } uint32_t getWidth() const; /** /** * The touch strength data. * The touch strength data. * The array is a 2-D row-major matrix, with dimensions (height, width). * The array is a 2-D row-major matrix, with dimensions (height, width). * Total size of the array should equal getHeight() * getWidth(). * Total size of the array should equal getHeight() * getWidth(). * Data is allowed to be negative. * Data is allowed to be negative. */ */ const std::vector<int16_t>& getData() const { return mData; } const std::vector<int16_t>& getData() const; /** /** * Time at which the heatmap was taken. * Time at which the heatmap was taken. */ */ const struct timeval& getTimestamp() const { return mTimestamp; } const struct timeval& getTimestamp() const; private: private: uint32_t mWidth; uint32_t mHeight; uint32_t mHeight; uint32_t mWidth; std::vector<int16_t> mData; std::vector<int16_t> mData; struct timeval mTimestamp; struct timeval mTimestamp; }; }; Loading libs/binder/ndk/include_apex/android/binder_manager.h +9 −0 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,15 @@ __BEGIN_DECLS */ */ binder_status_t AServiceManager_addService(AIBinder* binder, const char* instance); binder_status_t AServiceManager_addService(AIBinder* binder, const char* instance); /** * Gets a binder object with this specific instance name. Will return nullptr immediately if the * service is not available This also implicitly calls AIBinder_incStrong (so the caller of this * function is responsible for calling AIBinder_decStrong). * * \param instance identifier of the service used to lookup the service. */ __attribute__((warn_unused_result)) AIBinder* AServiceManager_checkService(const char* instance); /** /** * Gets a binder object with this specific instance name. Blocks for a couple of seconds waiting on * Gets a binder object with this specific instance name. Blocks for a couple of seconds waiting on * it. This also implicitly calls AIBinder_incStrong (so the caller of this function is responsible * it. This also implicitly calls AIBinder_incStrong (so the caller of this function is responsible Loading libs/binder/ndk/libbinder_ndk.map.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -91,6 +91,7 @@ LIBBINDER_NDK { # introduced=29 ABinderProcess_setThreadPoolMaxThreadCount; # apex ABinderProcess_setThreadPoolMaxThreadCount; # apex ABinderProcess_startThreadPool; # apex ABinderProcess_startThreadPool; # apex AServiceManager_addService; # apex AServiceManager_addService; # apex AServiceManager_checkService; # apex AServiceManager_getService; # apex AServiceManager_getService; # apex local: local: *; *; Loading Loading
cmds/dumpstate/README.md +1 −1 Original line number Original line Diff line number Diff line Loading @@ -23,7 +23,7 @@ mmm -j frameworks/native/cmds/dumpstate device/acme/secret_device/dumpstate/ har ## To build, deploy, and take a bugreport ## To build, deploy, and take a bugreport ``` ``` mmm -j frameworks/native/cmds/dumpstate && adb push ${OUT}/system/bin/dumpstate system/bin && adb shell am bug-report mmm -j frameworks/native/cmds/dumpstate && adb push ${OUT}/system/bin/dumpstate system/bin && adb push ${OUT}/system/lib64/*dumpstate*.so /system/lib64/ && adb shell am bug-report ``` ``` Make sure that the device is remounted before running the above command. Make sure that the device is remounted before running the above command. Loading
cmds/dumpstate/dumpstate.cpp +11 −1 Original line number Original line Diff line number Diff line Loading @@ -113,6 +113,7 @@ void add_mountinfo(); #define LOGPERSIST_DATA_DIR "/data/misc/logd" #define LOGPERSIST_DATA_DIR "/data/misc/logd" #define PROFILE_DATA_DIR_CUR "/data/misc/profiles/cur" #define PROFILE_DATA_DIR_CUR "/data/misc/profiles/cur" #define PROFILE_DATA_DIR_REF "/data/misc/profiles/ref" #define PROFILE_DATA_DIR_REF "/data/misc/profiles/ref" #define XFRM_STAT_PROC_FILE "/proc/net/xfrm_stat" #define WLUTIL "/vendor/xbin/wlutil" #define WLUTIL "/vendor/xbin/wlutil" #define WMTRACE_DATA_DIR "/data/misc/wmtrace" #define WMTRACE_DATA_DIR "/data/misc/wmtrace" Loading Loading @@ -1458,12 +1459,21 @@ static bool DumpstateDefault() { // Capture any IPSec policies in play. No keys are exposed here. // Capture any IPSec policies in play. No keys are exposed here. RunCommand("IP XFRM POLICY", {"ip", "xfrm", "policy"}, CommandOptions::WithTimeout(10).Build()); RunCommand("IP XFRM POLICY", {"ip", "xfrm", "policy"}, CommandOptions::WithTimeout(10).Build()); // Dump IPsec stats. No keys are exposed here. DumpFile("XFRM STATS", XFRM_STAT_PROC_FILE); // Run ss as root so we can see socket marks. // Run ss as root so we can see socket marks. RunCommand("DETAILED SOCKET STATE", {"ss", "-eionptu"}, CommandOptions::WithTimeout(10).Build()); RunCommand("DETAILED SOCKET STATE", {"ss", "-eionptu"}, CommandOptions::WithTimeout(10).Build()); // Run iotop as root to show top 100 IO threads // Run iotop as root to show top 100 IO threads RunCommand("IOTOP", {"iotop", "-n", "1", "-m", "100"}); RunCommand("IOTOP", {"iotop", "-n", "1", "-m", "100"}); // Gather shared memory buffer info if the product implements it struct stat st; if (!stat("/product/bin/dmabuf_dump", &st)) { RunCommand("Dmabuf dump", {"/product/bin/dmabuf_dump"}); } if (!DropRootUser()) { if (!DropRootUser()) { return false; return false; } } Loading
include/input/TouchVideoFrame.h +10 −18 Original line number Original line Diff line number Diff line Loading @@ -30,42 +30,34 @@ namespace android { */ */ class TouchVideoFrame { class TouchVideoFrame { public: public: TouchVideoFrame(uint32_t width, uint32_t height, std::vector<int16_t> data, TouchVideoFrame(uint32_t height, uint32_t width, std::vector<int16_t> data, const struct timeval& timestamp) : const struct timeval& timestamp); mWidth(width), mHeight(height), mData(std::move(data)), mTimestamp(timestamp) { } bool operator==(const TouchVideoFrame& rhs) const { bool operator==(const TouchVideoFrame& rhs) const; return mWidth == rhs.mWidth && mHeight == rhs.mHeight && mData == rhs.mData && mTimestamp.tv_sec == rhs.mTimestamp.tv_sec && mTimestamp.tv_usec == rhs.mTimestamp.tv_usec; } /** /** * Width of the frame * Height of the frame */ */ uint32_t getWidth() const { return mWidth; } uint32_t getHeight() const; /** /** * Height of the frame * Width of the frame */ */ uint32_t getHeight() const { return mHeight; } uint32_t getWidth() const; /** /** * The touch strength data. * The touch strength data. * The array is a 2-D row-major matrix, with dimensions (height, width). * The array is a 2-D row-major matrix, with dimensions (height, width). * Total size of the array should equal getHeight() * getWidth(). * Total size of the array should equal getHeight() * getWidth(). * Data is allowed to be negative. * Data is allowed to be negative. */ */ const std::vector<int16_t>& getData() const { return mData; } const std::vector<int16_t>& getData() const; /** /** * Time at which the heatmap was taken. * Time at which the heatmap was taken. */ */ const struct timeval& getTimestamp() const { return mTimestamp; } const struct timeval& getTimestamp() const; private: private: uint32_t mWidth; uint32_t mHeight; uint32_t mHeight; uint32_t mWidth; std::vector<int16_t> mData; std::vector<int16_t> mData; struct timeval mTimestamp; struct timeval mTimestamp; }; }; Loading
libs/binder/ndk/include_apex/android/binder_manager.h +9 −0 Original line number Original line Diff line number Diff line Loading @@ -32,6 +32,15 @@ __BEGIN_DECLS */ */ binder_status_t AServiceManager_addService(AIBinder* binder, const char* instance); binder_status_t AServiceManager_addService(AIBinder* binder, const char* instance); /** * Gets a binder object with this specific instance name. Will return nullptr immediately if the * service is not available This also implicitly calls AIBinder_incStrong (so the caller of this * function is responsible for calling AIBinder_decStrong). * * \param instance identifier of the service used to lookup the service. */ __attribute__((warn_unused_result)) AIBinder* AServiceManager_checkService(const char* instance); /** /** * Gets a binder object with this specific instance name. Blocks for a couple of seconds waiting on * Gets a binder object with this specific instance name. Blocks for a couple of seconds waiting on * it. This also implicitly calls AIBinder_incStrong (so the caller of this function is responsible * it. This also implicitly calls AIBinder_incStrong (so the caller of this function is responsible Loading
libs/binder/ndk/libbinder_ndk.map.txt +1 −0 Original line number Original line Diff line number Diff line Loading @@ -91,6 +91,7 @@ LIBBINDER_NDK { # introduced=29 ABinderProcess_setThreadPoolMaxThreadCount; # apex ABinderProcess_setThreadPoolMaxThreadCount; # apex ABinderProcess_startThreadPool; # apex ABinderProcess_startThreadPool; # apex AServiceManager_addService; # apex AServiceManager_addService; # apex AServiceManager_checkService; # apex AServiceManager_getService; # apex AServiceManager_getService; # apex local: local: *; *; Loading