├── .github ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ └── Bug_report.md ├── PULL_REQUEST_TEMPLATE.md ├── invite-contributors.yml ├── label-commenter-config.yml ├── settings.yml └── workflows │ ├── continuous-integration.yml │ └── release-new-version.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CREDITS ├── LICENSE.md ├── README.md ├── RoboFile.php ├── build.gradle ├── docs └── glpi_network.png ├── example_java ├── .gitignore ├── build.gradle ├── google-services.json ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── org │ │ └── flyve │ │ └── example_java │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── org │ │ │ └── flyve │ │ │ └── example_java │ │ │ └── MainActivity.java │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── org │ └── flyve │ └── example_java │ └── ExampleUnitTest.java ├── example_kotlin ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── org │ │ └── flyve │ │ └── example_kotlin │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── org │ │ │ └── flyve │ │ │ └── example_kotlin │ │ │ └── MainActivity.kt │ └── res │ │ ├── drawable-v24 │ │ └── ic_launcher_foreground.xml │ │ ├── drawable │ │ └── ic_launcher_background.xml │ │ ├── layout │ │ └── activity_main.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── colors.xml │ │ ├── ids.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── org │ └── flyve │ └── example_kotlin │ └── ExampleUnitTest.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── inventory ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── org │ │ └── flyve │ │ └── inventory │ │ ├── BatteryTest.java │ │ ├── BiosTest.java │ │ ├── BluetoothTest.java │ │ ├── CamerasTest.java │ │ ├── ControllersTest.java │ │ ├── CpusTest.java │ │ ├── CreateFileTest.java │ │ ├── DrivesTest.java │ │ ├── HardwareTest.java │ │ ├── InputsTest.java │ │ ├── InventoryTaskTest.java │ │ ├── MemoryTest.java │ │ ├── ModemsTest.java │ │ ├── NetworksTest.java │ │ ├── OperatingSystemTest.java │ │ ├── SensorsTest.java │ │ ├── SimcardsTest.java │ │ ├── SoftwareTest.java │ │ ├── UsbTest.java │ │ ├── UserTest.java │ │ └── VideosTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── camera_vendors.json │ │ ├── cpu_family.json │ │ └── cpu_manufacturer.json │ ├── java │ │ └── org │ │ │ └── flyve │ │ │ └── inventory │ │ │ ├── CommonErrorType.java │ │ │ ├── CryptoUtil.java │ │ │ ├── FlyveException.java │ │ │ ├── GenericFileProvider.java │ │ │ ├── InventoryLog.java │ │ │ ├── InventoryTask.java │ │ │ ├── Utils.java │ │ │ ├── categories │ │ │ ├── Battery.java │ │ │ ├── Bios.java │ │ │ ├── Bluetooth.java │ │ │ ├── Cameras.java │ │ │ ├── Categories.java │ │ │ ├── Category.java │ │ │ ├── CategoryValue.java │ │ │ ├── Controllers.java │ │ │ ├── Cpus.java │ │ │ ├── Drives.java │ │ │ ├── Envs.java │ │ │ ├── Hardware.java │ │ │ ├── Inputs.java │ │ │ ├── Jvm.java │ │ │ ├── LocationProviders.java │ │ │ ├── Memory.java │ │ │ ├── Modems.java │ │ │ ├── Networks.java │ │ │ ├── OperatingSystem.java │ │ │ ├── PhoneStatus.java │ │ │ ├── Processes.java │ │ │ ├── Sensors.java │ │ │ ├── Simcards.java │ │ │ ├── Software.java │ │ │ ├── Storage.java │ │ │ ├── StringUtils.java │ │ │ ├── Usb.java │ │ │ ├── User.java │ │ │ └── Videos.java │ │ │ └── usbManager │ │ │ ├── SysBusUsbDevice.java │ │ │ ├── SysBusUsbDeviceFactory.java │ │ │ ├── SysBusUsbManager.java │ │ │ ├── UsbProperty.java │ │ │ └── Validation.java │ └── res │ │ ├── raw │ │ └── specification.dtd │ │ ├── values │ │ └── strings.xml │ │ └── xml │ │ └── provider_paths.xml │ └── test │ └── java │ └── org │ └── flyve │ └── inventory │ └── FunctionUnitTest.java ├── package.json ├── settings.gradle └── yarn.lock /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | #### Observed Results: 4 | 5 | 6 | 7 | #### Expected behavior: 8 | 9 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | # Bug Report 2 | 3 | A clear and concise description of the bug. 4 | 5 | ## Steps to Reproduce 6 | Steps to reproduce the behavior: 7 | 1. Go to '...' 8 | 2. Perform action '...' 9 | 3. See error '...' 10 | 11 | ## Expected Behavior 12 | A clear and concise description of what you expected to happen. 13 | 14 | ## Actual Behavior 15 | Describe what actually happens instead. 16 | 17 | ## Screenshots 18 | If applicable, add screenshots to help explain your problem. 19 | 20 | ## Environment Details 21 | - **Library Version:** [e.g., 1.2.3] 22 | - **Android Version:** [e.g., Android 11] 23 | - **Device:** [e.g., Pixel 5] 24 | - **Any other relevant details:** [e.g., build environment, dependencies] 25 | 26 | ## Logs 27 | Please provide relevant logcat output or any other logs that may help in diagnosing the issue. 28 | 29 | ```text 30 | # Paste logs here 31 | ``` 32 | 33 | ## Additional context 34 | Add any other context about the problem here, including links to documentation or issues that might be related. 35 | 36 | ## Possible Solution 37 | (Optional) If you have an idea of how to fix the bug, describe it here. 38 | 39 | ## Checklist 40 | - [ ] I have searched existing issues to see if the bug has already been reported. 41 | - [ ] I have provided sufficient details to reproduce the issue. 42 | - [ ] I have included relevant logs/screenshots. 43 | 44 | 45 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Pull Request 2 | 3 | ## Description 4 | Provide a brief description of the changes made in this pull request. Include the problem this fixes or the feature it implements. 5 | 6 | ### Type of Change 7 | - [ ] Bug fix (non-breaking change that fixes an issue) 8 | - [ ] New feature (non-breaking change that adds functionality) 9 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) 10 | - [ ] Documentation update (improvements or additions to documentation) 11 | 12 | --- 13 | 14 | ## Related Issues 15 | List any related issues that are fixed or addressed by this pull request. 16 | 17 | Fixes: # [issue number] 18 | 19 | Closes: # [issue number] 20 | 21 | --- 22 | 23 | ## Testing 24 | Describe the testing performed for these changes: 25 | - Device/Emulator: [e.g., Pixel 5, Android 12] 26 | - Test Cases: [e.g., tested login functionality, navigation, etc.] 27 | - Results: [e.g., passed all tests, fixed rendering issue] 28 | 29 | --- 30 | 31 | ## Screenshots/Recordings 32 | If applicable, attach screenshots or recordings of the changes made. 33 | 34 | --- 35 | 36 | ## Checklist 37 | - [ ] I have tested these changes locally. 38 | - [ ] I have added tests that prove my fix is effective or my feature works. 39 | - [ ] I have updated documentation (if necessary). 40 | - [ ] I have ensured that this PR does not introduce unintended breaking changes. 41 | -------------------------------------------------------------------------------- /.github/invite-contributors.yml: -------------------------------------------------------------------------------- 1 | isOutside: true 2 | # Team Name 3 | contributors -------------------------------------------------------------------------------- /.github/label-commenter-config.yml: -------------------------------------------------------------------------------- 1 | labels: 2 | - name: "invalid" 3 | labeled: 4 | issue: 5 | body: | 6 | This issue has been closed because you did not provide the requested information. 7 | action: "close" 8 | - name: "support" 9 | labeled: 10 | issue: 11 | body: | 12 | This issue has been closed as we only track bugs here. 13 | 14 | You can get community support on [forums](https://forum.glpi-project.org/) or you can consider [taking a subscription](https://glpi-project.org/subscriptions/) to get professional support. 15 | You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly. 16 | action: close 17 | - name: "feature suggestion" 18 | labeled: 19 | issue: 20 | body: | 21 | This issue has been closed as we only track bugs here. 22 | 23 | You can open a topic to discuss with community about this enhancement on [suggestion website](https://glpi.userecho.com/). 24 | You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly if you are willing to sponsor this feature. 25 | action: close 26 | -------------------------------------------------------------------------------- /.github/settings.yml: -------------------------------------------------------------------------------- 1 | repository: 2 | name: android-inventory-library 3 | description: Inventory client library written in Java for developing applications on Android 4 | homepage: http://flyve.org/android-inventory-library/ 5 | topics: flyve-mdm, android-inventory, library 6 | private: false 7 | has_issues: true 8 | has_wiki: false 9 | has_downloads: true 10 | default_branch: develop 11 | allow_squash_merge: true 12 | allow_merge_commit: false 13 | allow_rebase_merge: true 14 | labels: 15 | - name: bug 16 | color: f44336 17 | - name: build 18 | color: 795548 19 | - name: cherry-pick 20 | color: af1c46 21 | - name: ci 22 | color: fbca04 23 | - name: documentation 24 | color: 607d8b 25 | - name: duplicate 26 | color: 9e9e9e 27 | - name: feature 28 | color: 3f51b5 29 | - name: hacktoberfest 30 | color: ff625f 31 | - name: invalid 32 | color: cddc39 33 | - name: performance 34 | color: 009688 35 | - name: question 36 | color: ff5722 37 | - name: refactor 38 | color: 9c27b0 39 | - name: style 40 | color: 2196f3 41 | - name: test 42 | color: 8bc34a 43 | - name: wontfix 44 | color: ffffff 45 | - name: help wanted 46 | color: 33aa3f 47 | - name: good first issue 48 | color: 7057ff 49 | -------------------------------------------------------------------------------- /.github/workflows/continuous-integration.yml: -------------------------------------------------------------------------------- 1 | name: GLPI Android Inventory Library CI 2 | 3 | env: 4 | module_java: example_java 5 | module_kotlin: example_kotlin 6 | module_inventory: inventory 7 | 8 | on: 9 | pull_request: 10 | branches: 11 | - "main" 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: set up JDK 17 19 | uses: actions/setup-java@v3 20 | with: 21 | java-version: '17' 22 | distribution: 'temurin' 23 | cache: gradle 24 | 25 | ############################################## 26 | # Prepare / Build project APK / AAR / JAR # 27 | ############################################## 28 | # Grant execute permission for gradlew 29 | - name: Grant execute permission for gradlew 30 | run: chmod +x gradlew 31 | # Build app 32 | - name: Build with Gradle 33 | run: ./gradlew build 34 | # Create APK For Firebase Instrumentation Tests 35 | - name: Build Debug Test APK (for Firebase Test Lab) 36 | run: ./gradlew assembleDebugAndroidTest 37 | 38 | ################################################################################################ 39 | # Run Firebase Test Lab # 40 | # See : https://medium.com/firebase-developers/github-actions-firebase-test-lab-4bc830685a99 # 41 | # See : https://github.com/google-github-actions/auth # 42 | # See : https://github.com/google-github-actions/setup-gcloud # 43 | ################################################################################################ 44 | # Login to Google using Firebase Admin SDK Service Agent Key 45 | - id: 'auth' 46 | name: Login to Google Cloud 47 | uses: 'google-github-actions/auth@v1' 48 | with: 49 | credentials_json: ${{ secrets.GCP_CREDENTIALS }} 50 | 51 | # Set up Cloud SDK 52 | - name: 'Set up Cloud SDK' 53 | uses: 'google-github-actions/setup-gcloud@v1' 54 | 55 | # Set Firebase Project ID 56 | - name: Set current project 57 | run: gcloud config set project ${{ secrets.FIREBASE_PROJECT_ID }} 58 | 59 | # Run Instrumentation Tests in Firebase Test Lab 60 | # dm3q Samasung galaxy s23 SDK 33 61 | # e1q Samasung galaxy s24 SDK 34 62 | # bluejay Google Pixel 6a SDK 32 63 | # a51 Samsung Galaxy A51 SDK 31 64 | # q2q Samsung Galaxy Z Fold3 SDK 30 65 | # cactus Xiaomi Redmi 6A SDK 27 66 | - name: Run Instrumentation Tests in Firebase Test Lab 67 | run: | 68 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=Nexus6,version=25,locale=en,orientation=portrait 69 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=e1q,version=34,locale=en,orientation=portrait 70 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=dm3q,version=33,locale=en,orientation=portrait 71 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=bluejay,version=32,locale=en,orientation=portrait 72 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=a51,version=31,locale=en,orientation=portrait 73 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=q2q,version=30,locale=en,orientation=portrait 74 | gcloud firebase test android run --type instrumentation --app ${{ env.module_java }}/build/outputs/apk/debug/example_java-debug.apk --test ${{ env.module_java }}/build/outputs/apk/androidTest/debug/example_java-debug-androidTest.apk --device model=cactus,version=27,locale=en,orientation=portrait 75 | 76 | ########################################## 77 | # Upload Artifacts (APK / AAR / JAR) # 78 | ########################################## 79 | # Upload APK for Java version 80 | - name: Upload APK Debug for Java 81 | uses: actions/upload-artifact@v4 82 | with: 83 | name: Java-Debug-APK 84 | path: ${{ env.module_java }}/build/outputs/apk/debug/${{ env.module_java }}-debug.apk 85 | 86 | # Upload APK for Kotlin version 87 | - name: Upload APK Debug for Kotlin 88 | uses: actions/upload-artifact@v3 89 | with: 90 | name: Kotlin-Debug-APK 91 | path: ${{ env.module_kotlin }}/build/outputs/apk/debug/${{ env.module_kotlin }}-debug.apk 92 | 93 | # Upload Debug AAR for inventory module 94 | - name: Upload Debug AAR for Inventory Library 95 | uses: actions/upload-artifact@v3 96 | with: 97 | name: Inventory-Library-Debug-AAR 98 | path: ${{ env.module_inventory }}/build/outputs/aar/${{ env.module_inventory }}-debug.aar 99 | -------------------------------------------------------------------------------- /.github/workflows/release-new-version.yml: -------------------------------------------------------------------------------- 1 | name: "GLPI Android Inventory Library Release" 2 | 3 | env: 4 | module_java: example_java 5 | module_kotlin: example_kotlin 6 | module_inventory: inventory 7 | 8 | on: 9 | push: 10 | tags: 11 | - '*' 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Fetch Android-Inventory-Library Repository 18 | uses: actions/checkout@v3 19 | with: 20 | ref: main 21 | fetch-depth: 0 #To Fetch All Tags and Branches 22 | 23 | - name: "Extract Current Tag Name" 24 | run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV 25 | 26 | - name: "Update Release Version" 27 | run: echo "$(jq '.version = "${{ env.tag_name }}"' package.json)" > package.json 28 | 29 | - name: Extract Previous Tag Name 30 | run: echo "previous_tag_name=$(git tag --sort=taggerdate | tail -1)" >> $GITHUB_ENV 31 | 32 | - name: Set Up JDK 17 33 | uses: actions/setup-java@v3 34 | with: 35 | java-version: '17' 36 | distribution: 'temurin' 37 | cache: gradle 38 | 39 | ############################################## 40 | # Prepare / Build project APK / AAR / JAR # 41 | ############################################## 42 | # Grant execute permission for gradlew 43 | - name: Grant Execute Permission For Gradlew 44 | run: chmod +x gradlew 45 | # Build app 46 | - name: Build for run tests or static analysis 47 | run: ./gradlew build 48 | 49 | 50 | ##################### 51 | # Prepare release # 52 | ##################### 53 | - name: Update main branch 54 | uses: EndBug/add-and-commit@v9 55 | with: 56 | default_author: github_actions 57 | add: "['CHANGELOG.md', 'package.json']" 58 | push: origin HEAD:main 59 | message: "ci(release): release new version ${{ env.tag_name }}" 60 | 61 | - name: "Rename ${{ env.module_java }} APK" 62 | run: mv ${{ env.module_java }}/build/outputs/apk/release/${{ env.module_java }}-release-unsigned.apk ${{ env.module_java }}/build/outputs/apk/release/${{ env.module_java }}-v${{ env.tag_name }}.apk 63 | 64 | - name: "Rename ${{ env.module_kotlin }} APK" 65 | run: mv ${{ env.module_kotlin }}/build/outputs/apk/release/${{ env.module_kotlin }}-release-unsigned.apk ${{ env.module_kotlin }}/build/outputs/apk/release/${{ env.module_kotlin }}-v${{ env.tag_name }}.apk 66 | 67 | - name: "Rename ${{ env.module_inventory }} AAR" 68 | run: mv ${{ env.module_inventory }}/build/outputs/aar/${{ env.module_inventory }}-release.aar ${{ env.module_inventory }}/build/outputs/aar/${{ env.module_inventory }}-release-v${{ env.tag_name }}.aar 69 | 70 | - name: Create Release 71 | uses: softprops/action-gh-release@v1 72 | if: startsWith(github.ref, 'refs/tags/') 73 | with: 74 | name : Inventory Engine v${{ env.tag_name }} 75 | draft : true 76 | body : See CHANGELOG.md 77 | files: | 78 | ${{ env.module_java }}/build/outputs/apk/release/${{ env.module_java }}-v${{ env.tag_name }}.apk 79 | ${{ env.module_kotlin }}/build/outputs/apk/release/${{ env.module_kotlin }}-v${{ env.tag_name }}.apk 80 | ${{ env.module_inventory }}/build/outputs/aar/${{ env.module_inventory }}-release-v${{ env.tag_name }}.aar 81 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Android Studio 3 | .idea 4 | .idea/libraries 5 | .idea/workspace.xml 6 | .idea/tasks.xml 7 | .idea/datasources.xml 8 | .idea/dataSources.ids 9 | .idea/.name 10 | .idea/gradle.xml 11 | .idea/modules.xml 12 | .idea/vcs.xml 13 | app/app.iml 14 | 15 | *.apk 16 | *.ap_ 17 | 18 | # files for the dex VM 19 | *.dex 20 | 21 | # Java class files 22 | *.class 23 | 24 | # built native files (uncomment if you build your own) 25 | # *.o 26 | # *.so 27 | 28 | # generated files 29 | bin/ 30 | gen/ 31 | 32 | # Ignore gradle files 33 | .gradle/ 34 | build/ 35 | 36 | # Local configuration file (sdk path, etc) 37 | local.properties 38 | 39 | # Proguard folder generated by Eclipse 40 | proguard/ 41 | 42 | # Eclipse Metadata 43 | .metadata/ 44 | 45 | # Mac OS X clutter 46 | *.DS_Store 47 | 48 | # Windows clutter 49 | Thumbs.db 50 | 51 | # Node.js 52 | node_modules 53 | 54 | # Miscellaneous 55 | *.iml 56 | /local.properties 57 | /.idea/workspace.xml 58 | /.idea/libraries 59 | .DS_Store 60 | /build 61 | /inventory/build/ 62 | /captures 63 | .externalNativeBuild 64 | /development 65 | 66 | /vendor/* 67 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@teclib.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Android Inventory Library 2 | 3 | Thank you for considering contributing to the Android Inventory Library! Your contributions help improve the project and ensure its success. Please follow the guidelines below to ensure a smooth and productive collaboration. 4 | 5 | --- 6 | 7 | ## Table of Contents 8 | 9 | 1. [Code of Conduct](#code-of-conduct) 10 | 2. [How to Contribute](#how-to-contribute) 11 | - [Bug Reports](#bug-reports) 12 | - [Pull Requests](#pull-requests) 13 | 3. [Development Environment](#development-environment) 14 | 4. [Code Style](#code-style) 15 | 5. [Testing](#testing) 16 | 6. [Contact](#contact) 17 | 18 | --- 19 | 20 | ## Code of Conduct 21 | 22 | By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). Please treat others with respect and professionalism. 23 | 24 | --- 25 | 26 | ## How to Contribute 27 | 28 | ### Bug Reports 29 | 30 | 1. **Search existing issues**: Before reporting a bug, check if it has already been reported. 31 | 2. **Create a new issue**: If no similar issue exists, open a new issue and provide: 32 | - A clear and descriptive title. 33 | - Steps to reproduce the issue. 34 | - Expected vs. actual behavior. 35 | - Environment details (e.g., Android version, device model). 36 | 3. **Attach logs and screenshots**: If applicable, include logs or screenshots to help diagnose the issue. 37 | 38 | ### Pull Requests 39 | 40 | 1. Fork the repository and create a new branch for your changes: 41 | ```bash 42 | git checkout -b feature/your-feature-name 43 | ``` 44 | 2. Make your changes while adhering to the [Code Style](#code-style) guidelines. 45 | 3. Ensure all tests pass and write new tests for your changes. 46 | 4. Commit your changes with clear and descriptive messages: 47 | ```bash 48 | git commit -m "feat: add new feature description" 49 | ``` 50 | 5. Push your branch and create a Pull Request against the `main` branch. 51 | 52 | --- 53 | 54 | ## Development Environment 55 | 56 | To set up the project locally: 57 | 58 | 1. Clone the repository: 59 | ```bash 60 | git clone https://github.com/glpi-project/android-inventory-library.git 61 | ``` 62 | 2. Open the project in **Android Studio**. 63 | 3. Sync Gradle and resolve dependencies. 64 | 4. Build and run the project using the preferred emulator or physical device. 65 | 66 | --- 67 | 68 | ## Code Style 69 | 70 | - Follow **Android's official Kotlin/Java coding standards**. 71 | - Use meaningful variable, method, and class names. 72 | - Format your code using Android Studio's built-in formatter. 73 | - Add comments to explain complex logic or algorithms. 74 | 75 | --- 76 | 77 | ## Testing 78 | 79 | ### Writing Tests 80 | - Use **JUnit** and / or **Espresso** for writing unit and UI tests. 81 | - Place your tests in the appropriate directories: 82 | - `/src/test/` for unit tests. 83 | - `/src/androidTest/` for instrumentation tests. 84 | 85 | ### Running Tests 86 | - To run all tests, execute the following command: 87 | ```bash 88 | ./gradlew test 89 | ./gradlew connectedAndroidTest 90 | ``` 91 | 92 | ### Firebase Test Lab (Optional) 93 | - Tests are automatically run using Firebase Test Lab via GitHub Actions for all Pull Requests. 94 | 95 | --- 96 | 97 | ## Contact 98 | 99 | For questions or discussions, feel free to: 100 | - Open an issue. 101 | - Join the [GLPI community forums](https://forum.glpi-project.org/). 102 | - Reach out to the maintainers directly on GitHub. 103 | 104 | --- 105 | 106 | We appreciate your interest in improving Android Inventory Library. Thank you for contributing! 107 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | In this file is liste every person who has contributed to the project, 2 | whether to fix a typo or to implement an awesome feature. 3 | 4 | You made this project. 5 | 6 | To everyone Thank you. 7 | 8 | 9 | Legend: 10 | 11 | - N: name 12 | - E: email 13 | - D: description 14 | - U: GitHub user 15 | --------------------------------------------------------------------------------- 16 | 17 | N: Rafael Hernández 18 | E: rhernandez@teclib.com 19 | D: Android/iOS Developer 20 | U: rafaelje 21 | 22 | N: Iván del Pino 23 | E: idelpino@teclib.com 24 | D: Android Developer 25 | U: Ivans51 26 | 27 | N: Naylin Medina 28 | E: nmedina@teclib.com 29 | D: Technical Writer 30 | U: Naylin15 31 | 32 | N: Alexander Salas 33 | E: asalas@teclib.com 34 | D: Project Manager 35 | U: ajsb85 36 | 37 | N: Kevin Esaa 38 | U: kevinesaa 39 | 40 | N: Alan Grosz 41 | U: lalofrosz 42 | 43 | N: José Espinoza 44 | E: josemespiz@gmail.com 45 | U: JMEspiz 46 | 47 | E: mohd.hussayn@gmail.com 48 | U: MohamedHussein02 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Inventory Library for Android 2 | 3 | ![GLPI Android Inventory banner](https://github.com/glpi-project/android-inventory-library/assets/7335054/7d82c661-bb74-40dd-ac1f-8f42f0e8542b) 4 | 5 | [![License](https://img.shields.io/github/license/glpi-project/android-inventory-library.svg?&label=License)](https://github.com/glpi-project/android-inventory-library/blob/develop/LICENSE.md) 6 | [![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/) 7 | [![Follow twitter](https://img.shields.io/twitter/follow/Teclib.svg?style=social&label=Twitter&style=flat-square)](https://twitter.com/teclib) 8 | [![Telegram Group](https://img.shields.io/badge/Telegram-Group-blue.svg)](https://t.me/glpien) 9 | [![Project Status: Active](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) 10 | [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) 11 | [![Greenkeeper badge](https://img.shields.io/badge/Greenkeeper-enabled-4c1.svg?colorA=555&style=flat)](https://greenkeeper.io) 12 | [![GitHub release](https://img.shields.io/github/release/glpi-project/android-inventory-library.svg)](https://github.com/glpi-project/android-inventory-library/releases) 13 | [![GitHub build](https://img.shields.io/circleci/build/github/glpi-project/android-inventory-library.svg)](https://circleci.com/gh/glpi-project/android-inventory-library/) 14 | 15 | GLPI Android Inventory Library is an android inventory library written in Java 16 | 17 | ## Table of contents 18 | * [Synopsis](#synopsis) 19 | * [Build Status](#build-status) 20 | * [Installation](#installation) 21 | * [Code Example](#code-example) 22 | * [Documentation](#documentation) 23 | * [Versioning](#versioning) 24 | * [Contribute](#contribute) 25 | * [Contact](#contact) 26 | * [Professional Services](#professional-services) 27 | * [Copying](#copying) 28 | 29 | ## Synopsis 30 | 31 | The Inventory Library for Android collects a complete inventory of your Android devices. It allows you to export your inventory in a beautiful XML or JSON as protocol compatible GLPI Native Inventory. 32 | 33 | You can find more information about the GLPI Native Inventory Protocol here: 34 | 35 | 36 | ### Data collected 37 | 38 | - Account Info 39 | - Accesslog 40 | - Hardware 41 | - User 42 | - Storages 43 | - Operating System 44 | - BIOS 45 | - Memories 46 | - Inputs 47 | - Sensors 48 | - Drives 49 | - CPUs 50 | - Videos 51 | - Cameras 52 | - Networks 53 | - Environments variables 54 | - JVMS 55 | - Softwares 56 | - USB 57 | - Battery 58 | - Controllers 59 | 60 | ## Installation 61 | 62 | Download the latest AAR and include it in your Android project as an external library 63 | 64 | ## Code Example 65 | 66 | It's easy to implement in your code, as you can see in the following examples 67 | 68 | ### Java 69 | 70 | ```java 71 | InventoryTask inventoryTask = new InventoryTask(MainActivity.this, "Agent_v1.0", new InventoryTask.OnTaskCompleted() { 72 | @Override 73 | public void onTaskCompleted(String data) { 74 | Log.d("XML", data); 75 | } 76 | }); 77 | 78 | inventoryTask.execute(); 79 | ``` 80 | 81 | ### Kotlin 82 | 83 | ```kotlin 84 | val inventoryTask = InventoryTask(this@MainActivity, "Agent_v1.0", object : InventoryTask.OnTaskCompleted() { 85 | override fun onTaskCompleted(data: String) { 86 | Log.d("XML", data) 87 | } 88 | }) 89 | 90 | inventoryTask.execute() 91 | ``` 92 | 93 | 94 | ## Contact 95 | 96 | For notices about major changes and general discussion of fields, subscribe to the [/r/glpi](https://www.reddit.com/r/glpi/) subreddit. 97 | You can also chat with us via [@glpi on Telegram](https://t.me/glpien). 98 | 99 | ## Professional Services 100 | 101 | ![GLPI Network](./docs/glpi_network.png "GLPI network") 102 | 103 | The GLPI Network services are available through our [Partner's Network](http://www.teclib-edition.com/en/partners/). 104 | We provide special training, bug fixes with editor subscription, contributions for new features, and more. 105 | 106 | Obtain a personalized service experience, associated with benefits and opportunities. 107 | 108 | ## Contribute 109 | 110 | * Open a ticket for each bug so it can be discussed 111 | * Follow [development guidelines](http://glpi-developer-documentation.readthedocs.io/en/latest/plugins/index.html) 112 | * Refer to [GitFlow](http://git-flow.readthedocs.io/) process for branching 113 | * Work on a new branch on your own fork 114 | * Open a PR that will be reviewed by a developer 115 | 116 | ## Copying 117 | 118 | * **Code**: you can redistribute it and/or modify it under the terms of the GNU General Public License ([GPL-2.0](https://www.gnu.org/licenses/gpl-2.0.en.html)). 119 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | 3 | ext.kotlin_version = "1.6.0" 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:8.1.1' 12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0" 13 | classpath 'com.google.gms:google-services:4.4.2' 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | tasks.withType(JavaCompile).tap { 23 | configureEach { 24 | options.compilerArgs << "-Xlint:deprecation" 25 | } 26 | } 27 | } 28 | 29 | tasks.register('clean', Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /docs/glpi_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/glpi-project/android-inventory-library/039d8556681e9ad802e8914e61caeb2d7b75cf62/docs/glpi_network.png -------------------------------------------------------------------------------- /example_java/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /example_java/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdk 34 5 | namespace = "org.flyve.example_java" 6 | 7 | defaultConfig { 8 | applicationId "org.flyve.example_java" 9 | minSdkVersion 21 10 | targetSdkVersion 34 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 15 | 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | lint { 25 | abortOnError false 26 | checkReleaseBuilds false 27 | } 28 | 29 | } 30 | 31 | dependencies { 32 | implementation fileTree(include: ['*.jar'], dir: 'libs') 33 | implementation 'androidx.appcompat:appcompat:1.2.0' 34 | implementation 'androidx.constraintlayout:constraintlayout:2.0.1' 35 | testImplementation 'junit:junit:4.13.2' 36 | androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', { 37 | exclude group: 'com.android.support', module: 'support-annotations' 38 | }) 39 | implementation project(':inventory') 40 | } 41 | -------------------------------------------------------------------------------- /example_java/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "464602262569", 4 | "firebase_url": "https://android-inventory-librar-6398c.firebaseio.com", 5 | "project_id": "android-inventory-librar-6398c", 6 | "storage_bucket": "android-inventory-librar-6398c.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:464602262569:android:032a5675fb60ca1fa80038", 12 | "android_client_info": { 13 | "package_name": "org.flyve.example_java" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "464602262569-iqkse0dn6u58mncsg7fm9v51nn4jpqri.apps.googleusercontent.com", 19 | "client_type": 1, 20 | "android_info": { 21 | "package_name": "org.flyve.example_java", 22 | "certificate_hash": "4287d795b3ca467f0920cca3c9e461129d5f6af1" 23 | } 24 | }, 25 | { 26 | "client_id": "464602262569-vsds504dcuk6kaqhm3bv7jbtcednae0q.apps.googleusercontent.com", 27 | "client_type": 3 28 | } 29 | ], 30 | "api_key": [ 31 | { 32 | "current_key": "AIzaSyDaC1lyN-scvtY5eN_vQtoHLKs6N86sLeE" 33 | } 34 | ], 35 | "services": { 36 | "appinvite_service": { 37 | "other_platform_oauth_client": [ 38 | { 39 | "client_id": "464602262569-vsds504dcuk6kaqhm3bv7jbtcednae0q.apps.googleusercontent.com", 40 | "client_type": 3 41 | } 42 | ] 43 | } 44 | } 45 | } 46 | ], 47 | "configuration_version": "1" 48 | } -------------------------------------------------------------------------------- /example_java/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /example_java/src/androidTest/java/org/flyve/example_java/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | /** 2 | * LICENSE 3 | * 4 | * This file is part of Flyve MDM Inventory Library for Android. 5 | * 6 | * Inventory Library for Android is a subproject of Flyve MDM. 7 | * Flyve MDM is a mobile device management software. 8 | * 9 | * Flyve MDM is free software: you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 3 12 | * of the License, or (at your option) any later version. 13 | * 14 | * Flyve MDM is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * --------------------------------------------------------------------- 19 | * @copyright Copyright © 2018 Teclib. All rights reserved. 20 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 21 | * @link https://github.com/flyve-mdm/android-inventory-library 22 | * @link https://flyve-mdm.com 23 | * @link http://flyve.org/android-inventory-library 24 | * --------------------------------------------------------------------- 25 | */ 26 | 27 | package org.flyve.example_java; 28 | 29 | import android.content.Context; 30 | 31 | import androidx.test.platform.app.InstrumentationRegistry; 32 | import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner; 33 | 34 | import org.junit.Test; 35 | import org.junit.runner.RunWith; 36 | 37 | import static org.junit.Assert.*; 38 | 39 | /** 40 | * Instrumented test, which will execute on an Android device. 41 | * 42 | * @see Testing documentation 43 | */ 44 | @RunWith(AndroidJUnit4ClassRunner.class) 45 | public class ExampleInstrumentedTest { 46 | @Test 47 | public void useAppContext() throws Exception { 48 | // Context of the app under test. 49 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 50 | 51 | assertEquals("org.flyve.example_java", appContext.getPackageName()); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /example_java/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /example_java/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 12 | 13 | 19 | 22 | 25 | 26 | 27 | 28 | 34 | 35 | -------------------------------------------------------------------------------- /example_java/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 22 | 23 | 35 | 36 | 41 | 42 | 47 | 48 | 49 |