Skip to content

Commit

Permalink
Release 2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
meefik committed Aug 2, 2019
1 parent 467eb94 commit 5425272
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 30 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.3.1] - 2019-07-29
### Added
- Added support Debian 10 (buster).

### Fixed
- Problem with network trigger on Android 7+.

## [2.3.0] - 2019-03-02
### Changed
- Code refactoring and migrated to AndroidX (issue #1058)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright (C) 2012-2019 Anton Skshidlevsky, [GPLv3](https://github.com/meefik/l

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

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

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.

Expand Down Expand Up @@ -65,5 +65,5 @@ Source code:

Donations:

- E-Money: <http://meefik.github.io/donate>
- E-Money: <https://meefik.github.io/donate/>
- Google Play: <https://play.google.com/store/apps/details?id=ru.meefik.donate>
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId 'ru.meefik.linuxdeploy'
minSdkVersion 15
targetSdkVersion 28
versionCode 245
versionName "2.3.0"
versionCode 246
versionName "2.3.1"
}
buildTypes {
release {
Expand All @@ -28,8 +28,8 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
12 changes: 5 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
Expand Down Expand Up @@ -92,20 +93,17 @@
</intent-filter>
</receiver>
<receiver
android:name=".NetworkReceiver"
android:enabled="false"
android:name=".ActionReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="ru.meefik.linuxdeploy.BROADCAST_ACTION" />
</intent-filter>
</receiver>
<receiver
android:name=".ActionReceiver"
android:name=".NetworkReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="ru.meefik.linuxdeploy.BROADCAST_ACTION" />
</intent-filter>
</receiver>

<service
Expand Down
20 changes: 20 additions & 0 deletions app/src/main/java/ru/meefik/linuxdeploy/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import android.Manifest;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.Color;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager.WifiLock;
Expand Down Expand Up @@ -44,6 +46,15 @@ public class MainActivity extends AppCompatActivity implements
private static WifiLock wifiLock;
private static PowerManager.WakeLock wakeLock;

private NetworkReceiver networkReceiver;

private NetworkReceiver getNetworkReceiver() {
if (networkReceiver == null)
networkReceiver = new NetworkReceiver();

return networkReceiver;
}

/**
* Show message in TextView, used from Logger
*
Expand Down Expand Up @@ -93,6 +104,15 @@ public void onCreate(Bundle savedInstanceState) {
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, getPackageName());

// Network receiver
if (PrefStore.isNetTrack(this)) {
IntentFilter filter = new IntentFilter();
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
registerReceiver(getNetworkReceiver(), filter);
} else if (networkReceiver != null) {
unregisterReceiver(networkReceiver);
}

if (EnvUtils.isLatestVersion(this)) {
// start services
EnvUtils.execServices(getBaseContext(), new String[]{"telnetd", "httpd"}, "start");
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/ru/meefik/linuxdeploy/NetworkReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public void onReceive(final Context context, Intent intent) {
if (activeNetwork != null) isConnected = activeNetwork.isConnected();
if (isConnected) {
EnvUtils.execService(context, "start", "core/net");
} else {
EnvUtils.execService(context, "stop", "core/net");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ru/meefik/linuxdeploy/PrefStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ static Integer getAutostartDelay(Context c) {
* @param c context
* @return true if enabled
*/
static Boolean isTrackNetwork(Context c) {
static Boolean isNetTrack(Context c) {
return SETTINGS.get(c, "nettrack").equals("true");
}

Expand Down
9 changes: 0 additions & 9 deletions app/src/main/java/ru/meefik/linuxdeploy/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,6 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
getPackageManager().setComponentEnabledSetting(bootComponent, autostartFlag,
PackageManager.DONT_KILL_APP);
break;
case "nettrack":
// set handler for network change action
int nettrackFlag = (PrefStore.isTrackNetwork(this) ?
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED);
ComponentName networkComponent = new ComponentName(this, NetworkReceiver.class);
getPackageManager().setComponentEnabledSetting(networkComponent, nettrackFlag,
PackageManager.DONT_KILL_APP);
break;
case "stealth":
// set stealth mode
// Run app without launcher: am start -n ru.meefik.linuxdeploy/.MainActivity
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,13 @@
<!-- Debian -->

<string-array name="debian_suite_values" translatable="false">
<item>oldstable</item>
<item>stable</item>
<item>testing</item>
<item>unstable</item>
<item>wheezy</item>
<item>jessie</item>
<item>stretch</item>
<item>buster</item>
</string-array>
<string-array name="debian_arch_values" translatable="false">
<item>armel</item>
Expand All @@ -309,7 +310,7 @@
<string-array name="ubuntu_arch_values" translatable="false">
<item>armel</item> <!-- precise only -->
<item>armhf</item>
<item>arm64</item> <!-- saucy and later -->
<item>arm64</item> <!-- trusty and later -->
<item>i386</item>
<item>amd64</item>
</string-array>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<string name="fb_freeze" translatable="false">none</string>

<!-- Debian -->
<string name="debian_suite" translatable="false">stretch</string>
<string name="debian_suite" translatable="false">buster</string>
<!-- arm -->
<string name="arm_debian_source_path" translatable="false">http://ftp.debian.org/debian/</string>
<string name="arm_debian_arch" translatable="false">armhf</string>
Expand All @@ -94,7 +94,7 @@
<string name="intel_debian_arch" translatable="false">i386</string>

<!-- Ubuntu -->
<string name="ubuntu_suite" translatable="false">xenial</string>
<string name="ubuntu_suite" translatable="false">bionic</string>
<!-- arm -->
<string name="arm_ubuntu_source_path" translatable="false">http://ports.ubuntu.com/</string>
<string name="arm_ubuntu_arch" translatable="false">armhf</string>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.android.tools.build:gradle:3.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Feb 07 11:52:50 CST 2019
#Tue Jun 18 22:22:14 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

0 comments on commit 5425272

Please sign in to comment.