#define LOG_TAG "GuiExt" #include #include #include "ICellsPrivateService.h" using namespace android; int main(int argc, char** argv) { const sp sm = defaultServiceManager(); if (sm != NULL) { sp binder = sm->checkService(String16("CellsPrivateService")); if (binder != NULL) { sp pCellsPrivateService = interface_cast(binder); if(pCellsPrivateService == NULL){ ALOGE("could not get service CellsPrivateService \n"); return 0; } char value[PROPERTY_VALUE_MAX]; property_get("ro.boot.vm", value, "1"); if((strcmp(value, "0") == 0)){ if(argc == 2){ pCellsPrivateService->switchCellsVM(android::String16(argv[1])); } }else{ pCellsPrivateService->switchCellsVM(android::String16("host")); } } } return 0; }