Skip to content

Commit

Permalink
Tinfoil network transfer support
Browse files Browse the repository at this point in the history
Change progress bar behavior.
Add settings.
Add NCZ/XCI/XCZ 'support' (Fix bug #1).
Make IntentService foreground service.
  • Loading branch information
developersu committed Mar 23, 2020
1 parent 32a5d36 commit 0061551
Show file tree
Hide file tree
Showing 31 changed files with 1,886 additions and 806 deletions.
116 changes: 116 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Sometimes I add new posts about this project [on my home page](https://developer

#### License

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

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

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

* Maximum: Android 10.0 (Q)

* USB-OTG support
* USB-OTG support / WiFi

### Usage

1. Open TinFoil/GoldLeaf
#### USB

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

Note: use short usb cable.

#### WiFi

For installation over the Net (Tinfoil):
1. Connect to WiFi
2. Setup 90DNS or whatever you use
3. Open Awoo Installer, select installation over the net
4. Open settings (click 'hamburger' menu-button), enter NS IP you see on the screen

#### Bugs

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.

### Other notes

'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.
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.
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.

#### Translators!
#### Translators

Wait a bit.
Are welcome.

#### TODO:

- [ ] Tinfoil NET transfer support
- [x] Tinfoil NET transfer support
- [ ] Better UI
- [ ] Multi-select files (if possible)

Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.blogspot.developersu.ns_usbloader"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "0.1"
versionCode 2
versionName "0.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android.defaultConfig.vectorDrawables.useSupportLibrary = true
}
Expand All @@ -26,12 +26,12 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
}
20 changes: 15 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.blogspot.developersu.ns_usbloader">

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

<uses-permission android:name="com.blogspot.developersu.ns_usbloader.ACTION_USB_PERMISSION" /> <!-- TODO: REMOVE -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <!-- For Android 9 -->

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"> <!-- <- IDK WTF, RTFM MB -->
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".AboutActivity"
android:label="@string/title_activity_about"
android:theme="@style/AppTheme.NoActionBar"></activity>
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
Expand All @@ -39,7 +48,7 @@
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_DETACHED"
android:resource="@xml/device_filter" />
<!--
<!-- TODO: fix, implement, etc.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
Expand Down Expand Up @@ -74,7 +83,8 @@
android:resource="@xml/device_filter" />
</receiver>

<service android:name=".Service.CommunicationsService" />
<service android:name=".service.CommunicationsService"
android:exported="false" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ protected void onCreate(Bundle savedInstanceState) {
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
TextView t1 = (TextView) findViewById(R.id.textView1);
final TextView t1 = findViewById(R.id.textView1);
t1.append(" v."+BuildConfig.VERSION_NAME);
TextView t2 = (TextView) findViewById(R.id.textView2);
final TextView t2 = findViewById(R.id.textView2);
t2.setMovementMethod(LinkMovementMethod.getInstance());
TextView t4 = (TextView) findViewById(R.id.textView4);
final TextView t4 = findViewById(R.id.textView4);
t4.setMovementMethod(LinkMovementMethod.getInstance());
final TextView t6 = findViewById(R.id.textView6);
t6.setMovementMethod(LinkMovementMethod.getInstance());
}

}
Loading

0 comments on commit 0061551

Please sign in to comment.