今天在閱讀init進程代碼中的ueventd.cpp中看到了具體的做法,在此記錄:
#include <android-base/properties.h>
auto hardware = android::base::GetProperty("ro.hardware", "");
今天在閱讀init進程代碼中的ueventd.cpp中看到了具體的做法,在此記錄:
#include <android-base/properties.h>
auto hardware = android::base::GetProperty("ro.hardware", "");