Skip to content

Commit 0061551

Browse files
committed
Tinfoil network transfer support
Change progress bar behavior. Add settings. Add NCZ/XCI/XCZ 'support' (Fix bug #1). Make IntentService foreground service.
1 parent 32a5d36 commit 0061551

31 files changed

+1886
-806
lines changed

.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Sometimes I add new posts about this project [on my home page](https://developer
1212

1313
#### License
1414

15-
Source code license [GNU General Public License v3](https://github.com/developersu/ns-usbloader-mobile/blob/master/LICENSE)
15+
Source code license [GNU General Public License v3](https://github.com/developersu/ns-usbloader-mobile/blob/master/LICENSE) or any later version.
1616

1717
Logo font: [Play](https://fonts.google.com/specimen/Play) by Jonas Hecksher. Open Font License distribution.
1818

@@ -23,11 +23,13 @@ Logo font: [Play](https://fonts.google.com/specimen/Play) by Jonas Hecksher. Ope
2323

2424
* Maximum: Android 10.0 (Q)
2525

26-
* USB-OTG support
26+
* USB-OTG support / WiFi
2727

2828
### Usage
2929

30-
1. Open TinFoil/GoldLeaf
30+
#### USB
31+
32+
1. Open Awoo Installer/Tinfoil/GoldLeaf v0.5
3133
2. Connect NS to Android device using OTG cable.
3234
3. Allow interaction request. Application opens.
3335
4. Click 'hamburger' menu-button and select application you'd like to use.
@@ -36,22 +38,30 @@ Logo font: [Play](https://fonts.google.com/specimen/Play) by Jonas Hecksher. Ope
3638

3739
Note: use short usb cable.
3840

41+
#### WiFi
42+
43+
For installation over the Net (Tinfoil):
44+
1. Connect to WiFi
45+
2. Setup 90DNS or whatever you use
46+
3. Open Awoo Installer, select installation over the net
47+
4. Open settings (click 'hamburger' menu-button), enter NS IP you see on the screen
48+
3949
#### Bugs
4050

4151
If you're Samsung owner, it would be better to not rotating your phone during transfer. Or minimizing. Well, on my elder device it causes application failure. But you can try if you're curious, and report/update a bug. Please mention your device model.
4252

4353
### Other notes
4454

4555
'Status' = 'Uploaded' that appears in the table does not mean that file has been installed. It means that it has been sent to NS without any issues! That's what this app about.
46-
Handling successful/failed installation is a purpose of the other side application: TinFoil/GoldLeaf. And they don't provide any feedback interfaces so I can't detect success/failure.
56+
Handling successful/failed installation is a purpose of the other side application: TinFoil/GoldLeaf v0.5. And they don't provide any feedback interfaces so I can't detect success/failure.
4757

48-
#### Translators!
58+
#### Translators
4959

50-
Wait a bit.
60+
Are welcome.
5161

5262
#### TODO:
5363

54-
- [ ] Tinfoil NET transfer support
64+
- [x] Tinfoil NET transfer support
5565
- [ ] Better UI
5666
- [ ] Multi-select files (if possible)
5767

app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.blogspot.developersu.ns_usbloader"
88
minSdkVersion 15
99
targetSdkVersion 29
10-
versionCode 1
11-
versionName "0.1"
10+
versionCode 2
11+
versionName "0.2"
1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1313
android.defaultConfig.vectorDrawables.useSupportLibrary = true
1414
}
@@ -26,12 +26,12 @@ android {
2626

2727
dependencies {
2828
implementation fileTree(dir: 'libs', include: ['*.jar'])
29-
implementation 'androidx.appcompat:appcompat:1.0.2'
29+
implementation 'androidx.appcompat:appcompat:1.1.0'
3030
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3131
testImplementation 'junit:junit:4.12'
3232
androidTestImplementation 'androidx.test:runner:1.2.0'
3333
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
34-
implementation 'androidx.recyclerview:recyclerview:1.0.0'
34+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
3535
implementation 'androidx.cardview:cardview:1.0.0'
36-
implementation 'com.google.android.material:material:1.0.0'
36+
implementation 'com.google.android.material:material:1.1.0'
3737
}

app/src/main/AndroidManifest.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
package="com.blogspot.developersu.ns_usbloader">
45

56
<uses-feature android:name="android.hardware.usb.host" />
67

7-
<uses-permission android:name="com.blogspot.developersu.ns_usbloader.ACTION_USB_PERMISSION" /> <!-- TODO: REMOVE -->
88
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
9+
<uses-permission android:name="android.permission.INTERNET" />
10+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
11+
12+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <!-- For Android 9 -->
913

1014
<application
1115
android:allowBackup="true"
1216
android:icon="@mipmap/ic_launcher"
1317
android:label="@string/app_name"
1418
android:roundIcon="@mipmap/ic_launcher_round"
1519
android:supportsRtl="true"
16-
android:theme="@style/AppTheme">
20+
android:theme="@style/AppTheme"
21+
tools:ignore="GoogleAppIndexingWarning"> <!-- <- IDK WTF, RTFM MB -->
22+
<activity
23+
android:name=".SettingsActivity"
24+
android:label="@string/title_activity_settings"
25+
android:theme="@style/AppTheme.NoActionBar" />
1726
<activity
1827
android:name=".AboutActivity"
1928
android:label="@string/title_activity_about"
20-
android:theme="@style/AppTheme.NoActionBar"></activity>
29+
android:theme="@style/AppTheme.NoActionBar" />
2130
<activity
2231
android:name=".MainActivity"
2332
android:launchMode="singleTop"
@@ -39,7 +48,7 @@
3948
<meta-data
4049
android:name="android.hardware.usb.action.USB_DEVICE_DETACHED"
4150
android:resource="@xml/device_filter" />
42-
<!--
51+
<!-- TODO: fix, implement, etc.
4352
<intent-filter>
4453
<action android:name="android.intent.action.VIEW" />
4554
<action android:name="android.intent.action.EDIT" />
@@ -74,7 +83,8 @@
7483
android:resource="@xml/device_filter" />
7584
</receiver>
7685

77-
<service android:name=".Service.CommunicationsService" />
86+
<service android:name=".service.CommunicationsService"
87+
android:exported="false" />
7888
</application>
7989

8090
</manifest>

app/src/main/java/com/blogspot/developersu/ns_usbloader/AboutActivity.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ protected void onCreate(Bundle savedInstanceState) {
2323
Toolbar toolbar = findViewById(R.id.toolbar);
2424
setSupportActionBar(toolbar);
2525
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
26-
TextView t1 = (TextView) findViewById(R.id.textView1);
26+
final TextView t1 = findViewById(R.id.textView1);
2727
t1.append(" v."+BuildConfig.VERSION_NAME);
28-
TextView t2 = (TextView) findViewById(R.id.textView2);
28+
final TextView t2 = findViewById(R.id.textView2);
2929
t2.setMovementMethod(LinkMovementMethod.getInstance());
30-
TextView t4 = (TextView) findViewById(R.id.textView4);
30+
final TextView t4 = findViewById(R.id.textView4);
3131
t4.setMovementMethod(LinkMovementMethod.getInstance());
32+
final TextView t6 = findViewById(R.id.textView6);
33+
t6.setMovementMethod(LinkMovementMethod.getInstance());
3234
}
33-
3435
}

0 commit comments

Comments
 (0)