Skip to content

Commit 51e6f60

Browse files
authored
Merge pull request #331 from magnusja/develop
core release 0.9.x
2 parents 6e24a52 + d4fb8a8 commit 51e6f60

File tree

120 files changed

+2208
-2028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+2208
-2028
lines changed

.github/workflows/android.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v1
12-
- name: set up JDK 1.8
12+
- name: set up JDK 1.11
1313
uses: actions/setup-java@v1
1414
with:
15-
java-version: 1.8
15+
java-version: 1.11
1616
- name: install libusb
17-
run: wget https://github.com/libusb/libusb/archive/v1.0.23.zip && unzip v1.0.23.zip
17+
run: wget https://github.com/libusb/libusb/archive/v1.0.24.zip && unzip v1.0.24.zip
1818
- name: write local properties
19-
run: echo "libusb.dir=$GITHUB_WORKSPACE/libusb-1.0.23" > $GITHUB_WORKSPACE/local.properties
20-
- name: Build with Gradle
21-
run: ./gradlew build
19+
run: echo "libusb.dir=$GITHUB_WORKSPACE/libusb-1.0.24" > $GITHUB_WORKSPACE/local.properties
20+
- name: Build & test with Gradle
21+
run: ./gradlew jacocoTestReport --stacktrace
22+
- name: codecov
23+
run: bash <(curl -s https://codecov.io/bash)

.travis.yml

-32
This file was deleted.

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
libaums
22
=======
3-
[![Javadocs](https://www.javadoc.io/badge/me.jahnen/libaums.svg)](https://www.javadoc.io/doc/me.jahnen/libaums)
4-
[ ![Build Status](https://travis-ci.org/magnusja/libaums.svg?branch=develop)](https://travis-ci.org/magnusja/libaums)[ ![codecov](https://codecov.io/gh/magnusja/libaums/branch/develop/graph/badge.svg)](https://codecov.io/gh/magnusja/libaums)[ ![Codacy Badge](https://api.codacy.com/project/badge/Grade/31124a2747de41b49c040b9f7979c2a6)](https://www.codacy.com/manual/magnusja/libaums?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=magnusja/libaums&amp;utm_campaign=Badge_Grade)[ ![Download](https://api.bintray.com/packages/magnusja/maven/libaums/images/download.svg) ](https://bintray.com/magnusja/maven/libaums/_latestVersion)
3+
[![Javadocs](https://www.javadoc.io/badge/me.jahnen.libaums/core.svg)](https://www.javadoc.io/doc/me.jahnen.libaums/core)
4+
[ ![Build Status](https://travis-ci.org/magnusja/libaums.svg?branch=develop)](https://travis-ci.org/magnusja/libaums)[ ![codecov](https://codecov.io/gh/magnusja/libaums/branch/develop/graph/badge.svg)](https://codecov.io/gh/magnusja/libaums)[ ![Codacy Badge](https://api.codacy.com/project/badge/Grade/31124a2747de41b49c040b9f7979c2a6)](https://www.codacy.com/manual/magnusja/libaums?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=magnusja/libaums&amp;utm_campaign=Badge_Grade)
55
[ ![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/libaums)
66

77
A library to access USB mass storage devices (pen drives, external HDDs, card readers) using the Android USB Host API. Currently it supports the SCSI command set and the FAT32 file system.
@@ -13,14 +13,14 @@ A library to access USB mass storage devices (pen drives, external HDDs, card re
1313
The library can be included into your project like this:
1414

1515
```ruby
16-
implementation 'me.jahnen:libaums:0.7.6'
16+
implementation 'me.jahnen.libaums:core:0.9.1'
1717
```
1818

1919
If you need the HTTP or the storage provider module:
2020

2121
```ruby
22-
implementation 'me.jahnen:libaums-httpserver:0.5.3'
23-
implementation 'me.jahnen:libaums-storageprovider:0.5.1'
22+
implementation 'me.jahnen.libaums:httpserver:0.6.2'
23+
implementation 'me.jahnen.libaums:storageprovider:0.6.2'
2424
```
2525

2626
### Basics
@@ -175,7 +175,7 @@ Usually third party apps do not have access to the files on a mass storage devic
175175

176176

177177
### HTTP server
178-
[![Javadocs](https://www.javadoc.io/badge/com.github.mjdev/libaums-httpserver.svg)](https://www.javadoc.io/doc/com.github.mjdev/libaums-httpserver)
178+
[![Javadocs](https://www.javadoc.io/badge/me.jahnen.libaums/httpserver.svg)](https://www.javadoc.io/doc/me.jahnen.libaums/httpserver)
179179

180180
libaums currently supports two different HTTP server libraries.
181181

@@ -294,16 +294,16 @@ See the example app for additional details on that.
294294

295295

296296
### Storage Access Framework
297-
[![Javadocs](https://www.javadoc.io/badge/com.github.mjdev/libaums-storageprovider.svg)](https://www.javadoc.io/doc/com.github.mjdev/libaums-storageprovider)
297+
[![Javadocs](https://www.javadoc.io/badge/me.jahnen.libaums/storageprovider.svg)](https://www.javadoc.io/doc/me.jahnen.libaums/storageprovider)
298298

299299
To learn more about this visit: https://developer.android.com/guide/topics/providers/document-provider.html
300300

301301
To integrate this module in your app the only thing you have to do is add the definition in your AndroidManifest.xml.
302302

303303
```xml
304304
<provider
305-
android:name="com.github.mjdev.libaums.storageprovider.UsbDocumentProvider"
306-
android:authorities="com.github.mjdev.libaums.storageprovider.documents"
305+
android:name="me.jahnen.libaums.storageprovider.UsbDocumentProvider"
306+
android:authorities="me.jahnen.libaums.storageprovider.documents"
307307
android:exported="true"
308308
android:grantUriPermissions="true"
309309
android:permission="android.permission.MANAGE_DOCUMENTS"
@@ -326,7 +326,7 @@ After that apps using the Storage Access Framework will be able to access the fi
326326

327327
##### Thesis
328328

329-
The library was developed by Mr. Jahnen as part of his bachelor's thesis in 2014. It's a sub-topic of the research topic "Secure Copy Protection for Mobile Apps" by Mr. Kannengießer. The full thesis document can be downloaded [here](https://www.os.in.tum.de/fileadmin/w00bdp/www/Lehre/Abschlussarbeiten/Jahnen-thesis.pdf).
329+
The library was developed by Mr. Jahnen as part of his bachelor's thesis in 2014. It's a sub-topic of the research topic "Secure Copy Protection for Mobile Apps" by Mr. Kannengießer. The full thesis document can be downloaded [here](https://www.in.tum.de/fileadmin/w00bws/os/Lehre/Abschlussarbeiten/Jahnen-thesis.pdf).
330330

331331

332332
Libaums - Library to access USB Mass Storage Devices

androidtests/build.gradle

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
43

54
android {
6-
compileSdkVersion 30
7-
buildToolsVersion "30.0.1"
5+
compileSdkVersion 32
6+
buildToolsVersion "30.0.3"
87

98
defaultConfig {
9+
testInstrumentationRunnerArguments
1010
minSdkVersion 15
11-
targetSdkVersion 30
12-
versionCode 1
13-
versionName "1.0"
11+
targetSdkVersion 32
1412

1513
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1614
testInstrumentationRunnerArguments.package = 'me.jahnen.libaums.androidtests'
@@ -36,13 +34,13 @@ android {
3634
dependencies {
3735
implementation fileTree(dir: "libs", include: ["*.jar"])
3836
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
39-
implementation 'androidx.core:core-ktx:1.3.1'
40-
implementation 'androidx.appcompat:appcompat:1.1.0'
37+
implementation 'androidx.core:core-ktx:1.7.0'
38+
implementation 'androidx.appcompat:appcompat:1.4.0'
4139

42-
androidTestImplementation 'androidx.test:core:1.2.0'
43-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
44-
androidTestImplementation 'androidx.test:runner:1.2.0'
45-
androidTestImplementation 'androidx.test:rules:1.2.0'
40+
androidTestImplementation 'androidx.test:core:1.4.0'
41+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
42+
androidTestImplementation 'androidx.test:runner:1.4.0'
43+
androidTestImplementation 'androidx.test:rules:1.4.0'
4644
androidTestImplementation project(':javafs')
4745
androidTestImplementation project(':libusbcommunication')
4846
}

androidtests/src/androidTest/java/me/jahnen/libaums/androidtests/LibAumsTest.kt androidtests/src/androidTest/java/me/jahnen/libaums/core/androidtests/LibAumsTest.kt

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package me.jahnen.libaums.androidtests
1+
package me.jahnen.libaums.core.androidtests
22

33
import android.app.PendingIntent
44
import android.content.BroadcastReceiver
@@ -9,13 +9,13 @@ import android.hardware.usb.UsbManager
99
import android.util.Log
1010
import androidx.test.InstrumentationRegistry
1111
import androidx.test.filters.LargeTest
12-
import com.github.magnusja.libaums.javafs.JavaFsFileSystemCreator
13-
import com.github.mjdev.libaums.UsbMassStorageDevice
14-
import com.github.mjdev.libaums.UsbMassStorageDevice.Companion.getMassStorageDevices
15-
import com.github.mjdev.libaums.fs.FileSystem
16-
import com.github.mjdev.libaums.fs.FileSystemFactory
17-
import com.github.mjdev.libaums.fs.UsbFile
18-
import com.github.mjdev.libaums.usb.UsbCommunicationFactory
12+
import me.jahnen.libaums.javafs.JavaFsFileSystemCreator
13+
import me.jahnen.libaums.core.UsbMassStorageDevice
14+
import me.jahnen.libaums.core.UsbMassStorageDevice.Companion.getMassStorageDevices
15+
import me.jahnen.libaums.core.fs.FileSystem
16+
import me.jahnen.libaums.core.fs.FileSystemFactory
17+
import me.jahnen.libaums.core.fs.UsbFile
18+
import me.jahnen.libaums.core.usb.UsbCommunicationFactory
1919
import junit.framework.Assert
2020
import junit.framework.TestCase
2121
import me.jahnen.libaums.libusbcommunication.LibusbCommunicationCreator
@@ -43,7 +43,7 @@ open class LibAumsTest(
4343
/**
4444
* Action string to request the permission to communicate with an UsbDevice.
4545
*/
46-
private val ACTION_USB_PERMISSION = "com.github.mjdev.libaums.USB_PERMISSION"
46+
private val ACTION_USB_PERMISSION = "me.jahnen.libaums.USB_PERMISSION"
4747

4848
private lateinit var device: UsbMassStorageDevice
4949
private lateinit var fs: FileSystem
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="me.jahnen.libaums.androidtests">
2+
package="me.jahnen.libaums.core.androidtests">
33
</manifest>

app/build.gradle

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
23

34
android {
4-
compileSdkVersion 29
5-
buildToolsVersion '28.0.3'
5+
compileSdkVersion 32
6+
buildToolsVersion '30.0.3'
67

78
defaultConfig {
89
applicationId "com.github.mjdev.usbfileman"
910
minSdkVersion 16
10-
targetSdkVersion 29
11+
targetSdkVersion 32
1112
versionCode 1
1213
versionName "1.0"
1314
}
@@ -25,9 +26,9 @@ android {
2526

2627
dependencies {
2728
api fileTree(include: ['*.jar'], dir: 'libs')
28-
implementation 'junit:junit:4.12'
29-
api 'androidx.appcompat:appcompat:1.0.0-beta01'
30-
api 'com.google.android.material:material:1.0.0-beta01'
29+
implementation 'junit:junit:4.13'
30+
api 'androidx.appcompat:appcompat:1.4.0'
31+
api 'com.google.android.material:material:1.6.0-alpha01'
3132
api project(':libaums')
3233
api project(':httpserver')
3334
api project(':storageprovider')

app/src/main/AndroidManifest.xml

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
-->
1919
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2020
xmlns:tools="http://schemas.android.com/tools"
21-
package="com.github.mjdev.libaums.usbfileman" >
21+
package="me.jahnen.libaums.core.usbfileman" >
2222

2323
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
2424
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
@@ -31,9 +31,10 @@
3131
android:theme="@style/AppTheme"
3232
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
3333
<activity
34-
android:name="com.github.mjdev.libaums.usbfileman.MainActivity"
34+
android:name="me.jahnen.libaums.core.usbfileman.MainActivity"
3535
android:label="@string/app_name"
36-
android:screenOrientation="portrait" >
36+
android:screenOrientation="portrait"
37+
android:exported="true">
3738
<intent-filter>
3839
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
3940
<action android:name="android.intent.action.MAIN" />
@@ -47,8 +48,8 @@
4748
</activity>
4849

4950
<provider
50-
android:name="com.github.mjdev.libaums.storageprovider.UsbDocumentProvider"
51-
android:authorities="com.github.mjdev.libaums.storageprovider.documents"
51+
android:name="me.jahnen.libaums.storageprovider.UsbDocumentProvider"
52+
android:authorities="me.jahnen.libaums.storageprovider.documents"
5253
android:exported="true"
5354
android:grantUriPermissions="true"
5455
android:permission="android.permission.MANAGE_DOCUMENTS"

app/src/main/java/com/github/mjdev/libaums/usbfileman/DrawerListAdapter.java

-40
This file was deleted.

0 commit comments

Comments
 (0)