android c++層獲取系統屬性的方法

今天在閱讀init進程代碼中的ueventd.cpp中看到了具體的做法,在此記錄:

#include <android-base/properties.h>

auto hardware = android::base::GetProperty("ro.hardware", "");

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章