diff --git a/components/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.impl/pom.xml b/components/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.impl/pom.xml new file mode 100644 index 0000000000..4c01b595b7 --- /dev/null +++ b/components/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.impl/pom.xml @@ -0,0 +1,173 @@ + + + + + + + device-mgt-mdm-android + org.wso2.carbon.devicemgt-plugins + 1.9.2-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.mobile.android.impl + 1.9.2-SNAPSHOT + bundle + WSO2 Carbon - Mobile Device Management Android Impl + WSO2 Carbon - Mobile Device Management Android Implementation + http://wso2.org + + + + + org.apache.felix + maven-scr-plugin + + + org.apache.felix + maven-bundle-plugin + 1.4.0 + true + + + ${project.artifactId} + ${project.artifactId} + ${carbon.mobile.device.mgt.version} + Device Management Mobile Impl Bundle + org.wso2.carbon.device.mgt.mobile.internal + + org.osgi.framework, + org.osgi.service.component, + org.apache.commons.logging, + javax.xml.bind.*, + javax.naming, + javax.sql, + javax.xml.bind.annotation.*, + javax.xml.parsers, + org.w3c.dom, + org.wso2.carbon.core, + org.wso2.carbon.context, + org.wso2.carbon.utils.*, + org.wso2.carbon.device.mgt.common.*, + org.wso2.carbon.ndatasource.core, + org.wso2.carbon.policy.mgt.common.*, + org.wso2.carbon.policy.mgt.core.*, + org.wso2.carbon.registry.core, + org.wso2.carbon.registry.core.exceptions, + org.wso2.carbon.registry.core.service, + org.wso2.carbon.registry.core.session, + org.wso2.carbon.registry.api, + org.wso2.carbon.device.mgt.extensions.license.mgt.registry, + com.google.gson.* + + + !org.wso2.carbon.device.mgt.mobile.internal, + !org.wso2.carbon.device.mgt.mobile.impl, + org.wso2.carbon.device.mgt.mobile.*, + + + + + + + + + + + + + + + + + + + + + + + + org.eclipse.osgi + org.eclipse.osgi + + + org.eclipse.osgi + org.eclipse.osgi.services + + + org.wso2.carbon + org.wso2.carbon.core + + + org.wso2.carbon + org.wso2.carbon.logging + + + org.wso2.carbon + org.wso2.carbon.utils + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.extensions + + + org.wso2.carbon + org.wso2.carbon.ndatasource.core + + + org.wso2.carbon.devicemgt + org.wso2.carbon.policy.mgt.common + + + org.wso2.carbon.devicemgt + org.wso2.carbon.policy.mgt.core + + + org.wso2.carbon + org.wso2.carbon.registry.api + + + org.wso2.carbon + org.wso2.carbon.registry.core + + + org.testng + testng + + + org.apache.tomcat.wso2 + jdbc-pool + + + com.h2database.wso2 + h2-database-engine + test + + + com.google.code.gson + gson + + + diff --git a/components/device-mgt-mdm-android/pom.xml b/components/device-mgt-mdm-android/pom.xml new file mode 100644 index 0000000000..e98b70c751 --- /dev/null +++ b/components/device-mgt-mdm-android/pom.xml @@ -0,0 +1,59 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + carbon-device-mgt-plugins-parent + 1.9.2-SNAPSHOT + ../../pom.xml + + + 4.0.0 + device-mgt-mdm-android + 1.9.2-SNAPSHOT + pom + WSO2 Carbon - Mobile Device Management Android Component + http://wso2.org + + + org.wso2.carbon.device.mgt.mobile.android.impl + + + + + + + org.apache.felix + maven-scr-plugin + 1.7.2 + + + generate-scr-scrdescriptor + + scr + + + + + + + + diff --git a/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml new file mode 100644 index 0000000000..ea51c36c61 --- /dev/null +++ b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml @@ -0,0 +1,107 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + device-mgt-mdm-android-feature + 1.9.2-SNAPSHOT + ../pom.xml + + + 4.0.0 + org.wso2.carbon.device.mgt.mobile.android.feature + pom + 1.9.2-SNAPSHOT + WSO2 Carbon - Android Device Management + http://wso2.org + This feature contains the core bundles required for Android Device Management functionality + + + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.mobile.android.impl + + + + + + + maven-resources-plugin + 2.6 + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + org.wso2.carbon.device.mgt.mobile + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:false + + + + + org.wso2.carbon.devicemgt-plugins:org.wso2.carbon.device.mgt.mobile.impl:${carbon.mobile.device.mgt.version} + + + + org.wso2.carbon.core.server:${carbon.kernel.version} + org.wso2.carbon.device.mgt.server:${carbon.device.mgt.version} + + + + + + + + diff --git a/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/build.properties b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/build.properties new file mode 100644 index 0000000000..9c86577d76 --- /dev/null +++ b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf/mobile-config.xml b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf/mobile-config.xml new file mode 100644 index 0000000000..c4c5c8f0e7 --- /dev/null +++ b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/conf/mobile-config.xml @@ -0,0 +1,71 @@ + + + + + + + + + jdbc/MobileAndroidDM_DS + + + + + jdbc/MobileWindowsDM_DS + + + + + + + + appmanager + admin + /devices + 1.0.0 + http://localhost:9763/test/app + http,https + + + enrol + admin + /enroll + 1.0.0 + http://localhost:9763/mdm-android-agent/enrollment + http,https + + + license + admin + /license + 1.0.0 + http://localhost:9763/mdm-android-agent/devices/license + http,https + + + operation + admin + /operation + 1.0.0 + http://localhost:9763/mdm-android-agent/operations + http,https + + + + diff --git a/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/dbscripts/plugins/h2_android.sql b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/dbscripts/plugins/h2_android.sql new file mode 100644 index 0000000000..c6ae33335a --- /dev/null +++ b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/dbscripts/plugins/h2_android.sql @@ -0,0 +1,56 @@ + +-- ----------------------------------------------------- +-- Table `AD_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( + `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , + `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL , + `DEVICE_INFO` VARCHAR(8000) NULL DEFAULT NULL , + `IMEI` VARCHAR(45) NULL DEFAULT NULL , + `IMSI` VARCHAR(45) NULL DEFAULT NULL , + `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , + `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , + `VENDOR` VARCHAR(45) NULL DEFAULT NULL , + `LATITUDE` VARCHAR(45) NULL DEFAULT NULL, + `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, + `SERIAL` VARCHAR(45) NULL DEFAULT NULL, + `MAC_ADDRESS` VARCHAR(45) NULL DEFAULT NULL, + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`ANDROID_DEVICE_ID`) ); + +-- ----------------------------------------------------- +-- Table `AD_FEATURE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `AD_FEATURE` ( + `ID` INT NOT NULL AUTO_INCREMENT , + `CODE` VARCHAR(45) NOT NULL, + `NAME` VARCHAR(100) NULL , + `DESCRIPTION` VARCHAR(200) NULL , + PRIMARY KEY (`ID`) ); + + +-- ----------------------------------------------------- +-- TODO remove this later +-- ----------------------------------------------------- + +INSERT INTO AD_FEATURE (CODE, NAME, DESCRIPTION) +VALUES +('DEVICE_LOCK', 'Device Lock', 'Lock the device'), +('DEVICE_LOCATION', 'Location', 'Request coordinates of device location'), +('WIFI', 'Wifi', 'Setting up wifi configuration'), +('CAMERA', 'Camera', 'Enable or disable camera'), +('EMAIL', 'Email', 'Configure email settings'), +('DEVICE_MUTE', 'Mute', 'Enable mute in the device'), +('DEVICE_INFO', 'Device Info', 'Request device information'), +('ENTERPRISE_WIPE', 'Enterprise Wipe', 'Remove enterprise applications'), +('CLEAR_PASSWORD', 'Clear Password', 'Clear current password'), +('WIPE_DATA', 'Wipe Data', 'Factory reset the device'), +('APPLICATION_LIST', 'Application List', 'Request list of current installed applications'), +('CHANGE_LOCK_CODE', 'Change Lock-code', 'Change current lock code'), +('INSTALL_APPLICATION', 'Install App', 'Install Enterprise or Market application'), +('UNINSTALL_APPLICATION', 'Uninstall App', 'Uninstall application'), +('BLACKLIST_APPLICATIONS', 'Blacklist app', 'Blacklist applications'), +('ENCRYPT_STORAGE', 'Encrypt storage', 'Encrypt storage'), +('DEVICE_RING', 'Ring', 'Ring the device'), +('PASSCODE_POLICY', 'Password Policy', 'Set passcode policy'), +('NOTIFICATION', 'Message', 'Send message'); diff --git a/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/dbscripts/plugins/mysql_android.sql b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/dbscripts/plugins/mysql_android.sql new file mode 100644 index 0000000000..dff4740712 --- /dev/null +++ b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/dbscripts/plugins/mysql_android.sql @@ -0,0 +1,32 @@ +-- ----------------------------------------------------- +-- Table `MBL_DEVICE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `AD_DEVICE` ( + `ANDROID_DEVICE_ID` VARCHAR(45) NOT NULL , + `DEVICE_INFO` VARCHAR(500) NULL DEFAULT NULL , + `GCM_TOKEN` VARCHAR(45) NULL DEFAULT NULL , + `IMEI` VARCHAR(45) NULL DEFAULT NULL , + `IMSI` VARCHAR(45) NULL DEFAULT NULL , + `OS_VERSION` VARCHAR(45) NULL DEFAULT NULL , + `DEVICE_MODEL` VARCHAR(45) NULL DEFAULT NULL , + `VENDOR` VARCHAR(45) NULL DEFAULT NULL , + `LATITUDE` VARCHAR(45) NULL DEFAULT NULL, + `LONGITUDE` VARCHAR(45) NULL DEFAULT NULL, + `SERIAL` VARCHAR(45) NULL DEFAULT NULL, + `MAC_ADDRESS` VARCHAR(45) NULL DEFAULT NULL, + `DEVICE_NAME` VARCHAR(100) NULL DEFAULT NULL, + PRIMARY KEY (`ANDROID_DEVICE_ID`)) +ENGINE = InnoDB; + + +-- ----------------------------------------------------- +-- Table `MBL_FEATURE` +-- ----------------------------------------------------- +CREATE TABLE IF NOT EXISTS `AD_FEATURE` ( + `ID` INT NOT NULL AUTO_INCREMENT , + `CODE` VARCHAR(45) NOT NULL, + `NAME` VARCHAR(100) NULL , + `DESCRIPTION` VARCHAR(200) NULL , + PRIMARY KEY (`ID`)) +ENGINE = InnoDB; + diff --git a/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..1ee5d1b681 --- /dev/null +++ b/features/device-mgt-mdm-android/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf @@ -0,0 +1,3 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/conf/mobile-config.xml,target:${installFolder}/../../conf/mobile-config.xml,overwrite:true);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/dbscripts/plugins/,target:${installFolder}/../../../dbscripts/cdm/plugins,overwrite:true);\ diff --git a/features/device-mgt-mdm-android/pom.xml b/features/device-mgt-mdm-android/pom.xml new file mode 100644 index 0000000000..d1489be1e8 --- /dev/null +++ b/features/device-mgt-mdm-android/pom.xml @@ -0,0 +1,41 @@ + + + + + + + org.wso2.carbon.devicemgt-plugins + carbon-device-mgt-plugins-parent + 1.9.2-SNAPSHOT + ../../pom.xml + + + 4.0.0 + device-mgt-mdm-android-feature + 1.9.2-SNAPSHOT + pom + WSO2 Carbon - Android Device Management Feature + http://wso2.org + + + org.wso2.carbon.device.mgt.mobile.android.feature + + + diff --git a/pom.xml b/pom.xml index 8f140d877b..d674e616a9 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,9 @@ components/device-mgt + components/device-mgt-mdm-android features/device-mgt + features/device-mgt-mdm-android @@ -254,6 +256,13 @@ ${carbon.mobile.device.mgt.version} + + + org.wso2.carbon.devicemgt-plugins + org.wso2.carbon.device.mgt.mobile.android.impl + ${carbon.mobile.device.mgt.version} + + org.eclipse.osgi