modified device/share api format and fixed duplicate share issue