问题
I successfully registered an Android device to EMM. Then I did a factory reset and registered it again. Now I have the same device listed twice in my Device Management.
First thing: Is this behaviour wanted? I think there should be a rule that checks the IMEI and replaces the old object with the newly registered one.
Second thing: How do I get rid of the old object? What if a phone gets destroyed and I can't unregister it unit-side?
Thanks in advance for any reply. Conrad
回答1:
We cann't replace the old device object with the new one because it might cause issues in shared-device scenarios (mostly COPE devices) where several users have access to the same device. So current user of the device must be able to login to EMM without removing the other owners' data. However I think this behavior must be changed to detect the Active device instance / owner from the same device instances and show it instead of showing multiple instances of the same device.
You can not delete the device from the EMM server by removing the registration from the client side. Only way to remove it would be manually removing the database table entry in the "devices" table of EMM database.
回答2:
I had this problem, and found a (complicated) way to remove these zombie devices. First of all stop your EMM server with a command like :
# /opt/wso2emm-1.1.0/bin/wso2server.sh stop
Then backup your databases:
# tar -zcvf /root/emm_db_backup.tar.gz /opt/wso2emm-1.1.0/repository/database/
Then start the H2 RDBMS:
java -cp /opt/wso2emm-1.1.0/repository/components/plugins/h2*.jar org.h2.tools.Server -web -webAllowOthers
Now, point your browser to http://YOUR_SERVER_IP:8082
Load the database with the JDBC URL:
jdbc:h2:/opt/wso2emm-1.1.0/repository/database/WSO2EMM_DB
(default User Name and Password are both wsocarbon
)
You can list the devices with SELECT * FROM DEVICES
Delete the device by ID with: (change the 1 to whatever zombie device you want to get rid of)
DELETE FROM DEVICES WHERE ID=1;
You're done! (well, after you stop H2 and start your server again)
来源:https://stackoverflow.com/questions/28412314/wso2-emm-delete-device-from-device-management