Skip to content

Commit 5425272

Browse files
committed
Release 2.3.1
1 parent 467eb94 commit 5425272

File tree

12 files changed

+49
-30
lines changed

12 files changed

+49
-30
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [2.3.1] - 2019-07-29
10+
### Added
11+
- Added support Debian 10 (buster).
12+
13+
### Fixed
14+
- Problem with network trigger on Android 7+.
15+
916
## [2.3.0] - 2019-03-02
1017
### Changed
1118
- Code refactoring and migrated to AndroidX (issue #1058)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Copyright (C) 2012-2019 Anton Skshidlevsky, [GPLv3](https://github.com/meefik/l
44

55
This application is open source software for quick and easy installation of the operating system (OS) GNU/Linux on your Android device.
66

7-
The application creates a disk image or a dictory on a flash card or uses a partition or RAM, mounts it and installs an OS distribution. Applications of the new system are run in a chroot environment and working together with the Android platform. All changes made on the device are reversible, i.e. the application and components can be removed completely. Installation of a distribution is done by downloading files from official mirrors online over the internet. The application can run better with superuser rights (ROOT).
7+
The application creates a disk image or a dictory on a flash card or uses a partition or RAM, mounts it and installs an OS distribution. Applications of the new system are run in a chroot environment and working together with the Android platform. All changes made on the device are reversible, i.e. the application and components can be removed completely. Installation of a distribution is done by downloading files from official mirrors online over the internet. The application can run better with superuser rights (root).
88

99
The program supports multi language interface. You can manage the process of installing the OS, and after installation, you can start and stop services of the new system (there is support for running your scripts) through the UI. The installation process is reported as text in the main application window. During the installation, the program will adjust the environment, which includes the base system, SSH server, VNC server and desktop environment. The program interface can also manage SSH and VNC settings.
1010

@@ -65,5 +65,5 @@ Source code:
6565

6666
Donations:
6767

68-
- E-Money: <http://meefik.github.io/donate>
68+
- E-Money: <https://meefik.github.io/donate/>
6969
- Google Play: <https://play.google.com/store/apps/details?id=ru.meefik.donate>

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId 'ru.meefik.linuxdeploy'
99
minSdkVersion 15
1010
targetSdkVersion 28
11-
versionCode 245
12-
versionName "2.3.0"
11+
versionCode 246
12+
versionName "2.3.1"
1313
}
1414
buildTypes {
1515
release {
@@ -28,8 +28,8 @@ android {
2828
}
2929

3030
dependencies {
31-
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
32-
implementation 'com.google.android.material:material:1.1.0-alpha03'
31+
implementation 'com.google.android.material:material:1.0.0'
32+
implementation 'androidx.appcompat:appcompat:1.0.2'
3333
implementation 'androidx.browser:browser:1.0.0'
3434
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3535
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
<application
1515
android:name=".App"
16+
android:allowBackup="true"
1617
android:icon="@mipmap/ic_launcher"
1718
android:label="@string/app_name"
1819
android:supportsRtl="true"
@@ -92,20 +93,17 @@
9293
</intent-filter>
9394
</receiver>
9495
<receiver
95-
android:name=".NetworkReceiver"
96-
android:enabled="false"
96+
android:name=".ActionReceiver"
97+
android:enabled="true"
9798
android:exported="false">
9899
<intent-filter>
99-
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
100+
<action android:name="ru.meefik.linuxdeploy.BROADCAST_ACTION" />
100101
</intent-filter>
101102
</receiver>
102103
<receiver
103-
android:name=".ActionReceiver"
104+
android:name=".NetworkReceiver"
104105
android:enabled="true"
105106
android:exported="false">
106-
<intent-filter>
107-
<action android:name="ru.meefik.linuxdeploy.BROADCAST_ACTION" />
108-
</intent-filter>
109107
</receiver>
110108

111109
<service

app/src/main/java/ru/meefik/linuxdeploy/MainActivity.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
import android.Manifest;
44
import android.content.Intent;
5+
import android.content.IntentFilter;
56
import android.content.pm.PackageManager;
67
import android.content.res.Configuration;
78
import android.graphics.Color;
9+
import android.net.ConnectivityManager;
810
import android.net.Uri;
911
import android.net.wifi.WifiManager;
1012
import android.net.wifi.WifiManager.WifiLock;
@@ -44,6 +46,15 @@ public class MainActivity extends AppCompatActivity implements
4446
private static WifiLock wifiLock;
4547
private static PowerManager.WakeLock wakeLock;
4648

49+
private NetworkReceiver networkReceiver;
50+
51+
private NetworkReceiver getNetworkReceiver() {
52+
if (networkReceiver == null)
53+
networkReceiver = new NetworkReceiver();
54+
55+
return networkReceiver;
56+
}
57+
4758
/**
4859
* Show message in TextView, used from Logger
4960
*
@@ -93,6 +104,15 @@ public void onCreate(Bundle savedInstanceState) {
93104
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
94105
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, getPackageName());
95106

107+
// Network receiver
108+
if (PrefStore.isNetTrack(this)) {
109+
IntentFilter filter = new IntentFilter();
110+
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
111+
registerReceiver(getNetworkReceiver(), filter);
112+
} else if (networkReceiver != null) {
113+
unregisterReceiver(networkReceiver);
114+
}
115+
96116
if (EnvUtils.isLatestVersion(this)) {
97117
// start services
98118
EnvUtils.execServices(getBaseContext(), new String[]{"telnetd", "httpd"}, "start");

app/src/main/java/ru/meefik/linuxdeploy/NetworkReceiver.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public void onReceive(final Context context, Intent intent) {
1919
if (activeNetwork != null) isConnected = activeNetwork.isConnected();
2020
if (isConnected) {
2121
EnvUtils.execService(context, "start", "core/net");
22+
} else {
23+
EnvUtils.execService(context, "stop", "core/net");
2224
}
2325
}
2426
}

app/src/main/java/ru/meefik/linuxdeploy/PrefStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static Integer getAutostartDelay(Context c) {
367367
* @param c context
368368
* @return true if enabled
369369
*/
370-
static Boolean isTrackNetwork(Context c) {
370+
static Boolean isNetTrack(Context c) {
371371
return SETTINGS.get(c, "nettrack").equals("true");
372372
}
373373

app/src/main/java/ru/meefik/linuxdeploy/SettingsActivity.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,6 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
111111
getPackageManager().setComponentEnabledSetting(bootComponent, autostartFlag,
112112
PackageManager.DONT_KILL_APP);
113113
break;
114-
case "nettrack":
115-
// set handler for network change action
116-
int nettrackFlag = (PrefStore.isTrackNetwork(this) ?
117-
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
118-
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED);
119-
ComponentName networkComponent = new ComponentName(this, NetworkReceiver.class);
120-
getPackageManager().setComponentEnabledSetting(networkComponent, nettrackFlag,
121-
PackageManager.DONT_KILL_APP);
122-
break;
123114
case "stealth":
124115
// set stealth mode
125116
// Run app without launcher: am start -n ru.meefik.linuxdeploy/.MainActivity

app/src/main/res/values/arrays.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,13 @@
283283
<!-- Debian -->
284284

285285
<string-array name="debian_suite_values" translatable="false">
286+
<item>oldstable</item>
286287
<item>stable</item>
287288
<item>testing</item>
288289
<item>unstable</item>
289-
<item>wheezy</item>
290290
<item>jessie</item>
291291
<item>stretch</item>
292+
<item>buster</item>
292293
</string-array>
293294
<string-array name="debian_arch_values" translatable="false">
294295
<item>armel</item>
@@ -309,7 +310,7 @@
309310
<string-array name="ubuntu_arch_values" translatable="false">
310311
<item>armel</item> <!-- precise only -->
311312
<item>armhf</item>
312-
<item>arm64</item> <!-- saucy and later -->
313+
<item>arm64</item> <!-- trusty and later -->
313314
<item>i386</item>
314315
<item>amd64</item>
315316
</string-array>

app/src/main/res/values/preferences.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<string name="fb_freeze" translatable="false">none</string>
8686

8787
<!-- Debian -->
88-
<string name="debian_suite" translatable="false">stretch</string>
88+
<string name="debian_suite" translatable="false">buster</string>
8989
<!-- arm -->
9090
<string name="arm_debian_source_path" translatable="false">http://ftp.debian.org/debian/</string>
9191
<string name="arm_debian_arch" translatable="false">armhf</string>
@@ -94,7 +94,7 @@
9494
<string name="intel_debian_arch" translatable="false">i386</string>
9595

9696
<!-- Ubuntu -->
97-
<string name="ubuntu_suite" translatable="false">xenial</string>
97+
<string name="ubuntu_suite" translatable="false">bionic</string>
9898
<!-- arm -->
9999
<string name="arm_ubuntu_source_path" translatable="false">http://ports.ubuntu.com/</string>
100100
<string name="arm_ubuntu_arch" translatable="false">armhf</string>

0 commit comments

Comments
 (0)