Change api levels for app and other things

* Add new app icon
* Some changes to Shell session env so correct PATH and LD_LIBRARY_PATH is set for main session
* Changed build.gradle TARGET and MIN API level 28 for better compatability with our bootstrap
* Removed some more NetHunter leftovers from unused functions
* Now when uninstalling app then some roms should ask if you also want to remove or keep PREFIX aka */usr
This commit is contained in:
Martinvlba 2024-05-07 16:46:43 -07:00
parent e1826b3641
commit 0147cd594b
32 changed files with 85 additions and 14 deletions

View File

@ -4,9 +4,9 @@ buildscript {
ext.kotlin_version = '1.8.10'
ext.android = [
KOTLIN_VERSION : '1.8.10',
MIN_SDK_VERSION : 21,
MIN_SDK_VERSION : 28,
COMPILE_SDK_VERSION: 34,
TARGET_SDK_VERSION : 30,
TARGET_SDK_VERSION : 28,
JUNIT_VERSION : "4.12"
]

View File

@ -39,6 +39,7 @@
android:usesCleartextTraffic="true"
android:resizeableActivity="true"
android:hardwareAccelerated="true"
android:hasFragileUserData="true"
android:largeHeap="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -29,6 +29,8 @@ object NeoTermPath {
const val ROOT_PATH = "/data/data/com.evolinx.terminal/files"
const val USR_PATH = "$ROOT_PATH/usr"
const val BIN_PATH = "$USR_PATH/bin"
const val SBIN_PATH = "$USR_PATH/sbin"
const val EXTRA_PATH = "/bin:/sbin:/xbin:/usr/bin:/usr/sbin:/usr/xbin"
const val HOME_PATH = "$USR_PATH/home"
const val APT_BIN_PATH = "$USR_PATH/bin/apt"
const val LIB_PATH = "$USR_PATH/lib"

View File

@ -82,9 +82,8 @@ object SourceHelper {
fun copySourceFromChroot() {
val APP_MNT = NeoTermPath.USR_PATH
val MNT = "/data/local/nhsystem/kalifs"
val sources = "$MNT/etc/apt/sources.list"
val lists = "$MNT/var/lib/apt/lists"
val sources = "$APP_MNT/etc/apt/sources.list"
val lists = "$APP_MNT/var/lib/apt/lists"
// Make sure that nhterm has locally required apt dir's
Shell.cmd("mkdir -p $APP_MNT/etc/apt").exec()

View File

@ -334,6 +334,8 @@ open class ShellTermSession private constructor(
val termEnv = "TERM=xterm-256color"
val homeEnv = "HOME=" + NeoTermPath.HOME_PATH
val extraPathEnv = NeoTermPath.EXTRA_PATH
val pathEnv = "PATH=" + NeoTermPath.BIN_PATH + ":" + NeoTermPath.SBIN_PATH + ":" + extraPathEnv + ":" + System.getenv("PATH")
val prefixEnv = "PREFIX=" + NeoTermPath.USR_PATH
val androidRootEnv = "ANDROID_ROOT=" + System.getenv("ANDROID_ROOT")
val androidDataEnv = "ANDROID_DATA=" + System.getenv("ANDROID_DATA")
@ -349,11 +351,9 @@ open class ShellTermSession private constructor(
val pwdEnv = "PWD=$selectedCwd"
val tmpdirEnv = "TMPDIR=${NeoTermPath.USR_PATH}/tmp"
val langEnv = "LANG=en_US.UTF-8"
val extraPath = "/sbin:/system/sbin:/xbin:/system/xbin"
val ps1 = "PS1=\\[\\e[1;32m\\]\\u [ \\[\\e[0m\\]\\w\\[\\e[1;32m\\] ]\$ \\[\\e[0m\\]"
return if (systemShell) {
val pathEnv = "PATH=" + extraPath + ":" + System.getenv("PATH")
arrayOf(
termEnv, pwdEnv, homeEnv, androidRootEnv, androidDataEnv,
externalStorageEnv, pathEnv, prefixEnv,
@ -364,7 +364,7 @@ open class ShellTermSession private constructor(
} else {
val langEnv = "LANG=en_US.UTF-8"
val pathEnv = "PATH=" + extraPath + ":" + buildPathEnv() + System.getenv("PATH")
val pathEnv = "PATH=" + extraPathEnv + ":" + buildPathEnv() + System.getenv("PATH")
arrayOf(termEnv, pwdEnv, pathEnv,
colorterm, langEnv
@ -375,7 +375,7 @@ open class ShellTermSession private constructor(
}
private fun buildLdLibraryEnv(): String {
return "${NeoTermPath.USR_PATH}/lib"
return "${NeoTermPath.USR_PATH}/lib:${NeoTermPath.USR_PATH}/lib32:${NeoTermPath.USR_PATH}/lib64"
}
private fun buildPathEnv(): String {

View File

@ -190,8 +190,6 @@ class NeoTermService : Service() {
}
private fun createNotificationChannel() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return
val channel = NotificationChannel(DEFAULT_CHANNEL_ID, "Evolinx", NotificationManager.IMPORTANCE_LOW)
channel.description = "Evolinx notifications"
val manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

View File

@ -0,0 +1,38 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="231"
android:viewportHeight="156">
<group android:scaleX="0.92"
android:scaleY="0.62129873"
android:translateX="9.24"
android:translateY="29.538702">
<path
android:pathData="M90.5,15.5C100.84,15.33 111.17,15.5 121.5,16C122.13,17.89 123.13,19.56 124.5,21C130.17,22 135.83,23 141.5,24C141.96,24.41 142.29,24.91 142.5,25.5C137.54,28.56 132.37,31.23 127,33.5C125.85,37.43 125.01,41.43 124.5,45.5C124.62,47.79 125.46,49.79 127,51.5C133.33,58.5 139.67,65.5 146,72.5C146.67,90.83 146.67,109.17 146,127.5C144.44,129.36 142.61,130.86 140.5,132C143.57,134.95 146.74,137.78 150,140.5C150.48,141.45 150.65,142.45 150.5,143.5C130.1,144.15 109.93,143.48 90,141.5C83.52,115.23 77.35,88.9 71.5,62.5C77,46.51 83.33,30.84 90.5,15.5Z"
android:fillColor="#54b9fd"/>
<path
android:pathData="M91.5,18.5C101.17,18.5 110.83,18.5 120.5,18.5C121.18,22.72 122.18,26.89 123.5,31C123.17,31.5 122.83,32 122.5,32.5C106.76,40.79 91.26,49.45 76,58.5C80.83,45.14 86,31.81 91.5,18.5Z"
android:fillColor="#fbfdfe"/>
<path
android:pathData="M124.5,23.5C128.11,24.49 131.78,25.32 135.5,26C132.5,27.5 129.5,29 126.5,30.5C125.36,28.29 124.7,25.96 124.5,23.5Z"
android:fillColor="#f4fafe"/>
<path
android:pathData="M121.5,35.5C122.5,35.47 123.16,35.97 123.5,37C123.25,45.36 121.25,46.19 117.5,39.5C118.87,38.16 120.2,36.83 121.5,35.5Z"
android:fillColor="#e9f6fe"/>
<path
android:pathData="M112.5,40.5C114.37,40.86 115.87,41.86 117,43.5C125.67,53.5 134.33,63.5 143,73.5C144.05,91.18 144.22,108.84 143.5,126.5C136.7,130.8 130.03,135.3 123.5,140C115.5,140.67 107.5,140.67 99.5,140C108.66,136.26 116.99,131.26 124.5,125C120.87,121.07 117.04,117.24 113,113.5C112.67,104.5 112.33,95.5 112,86.5C105.04,75.42 98.21,64.25 91.5,53C98.56,48.81 105.56,44.64 112.5,40.5Z"
android:fillColor="#fcfdfe"/>
<path
android:pathData="M87.5,54.5C88.5,54.41 89.33,54.75 90,55.5C96.17,65.83 102.33,76.17 108.5,86.5C104.48,91.35 99.98,95.69 95,99.5C97.39,110.69 100.22,121.86 103.5,133C103.17,133.83 102.83,134.67 102.5,135.5C99.5,136.83 96.5,138.17 93.5,139.5C91.55,135.38 90.05,131.04 89,126.5C84.32,105.46 79.49,84.46 74.5,63.5C75.01,61.91 76.01,60.75 77.5,60C81.06,58.39 84.39,56.56 87.5,54.5Z"
android:fillColor="#fbfdfe"/>
<path
android:pathData="M108.5,90.5C109.65,96.99 109.82,103.65 109,110.5C105.17,107.33 101.33,104.17 97.5,101C101.62,97.95 105.29,94.45 108.5,90.5Z"
android:fillColor="#f7fbfe"/>
<path
android:pathData="M98.5,105.5C105.84,111.84 113.18,118.17 120.5,124.5C116.38,127.73 112.04,130.73 107.5,133.5C104.1,124.29 101.1,114.95 98.5,105.5Z"
android:fillColor="#f8fcfe"/>
<path
android:pathData="M135.5,134.5C139.38,135.18 142.71,137.01 145.5,140C139.83,140.67 134.17,140.67 128.5,140C131.02,138.3 133.35,136.47 135.5,134.5Z"
android:fillColor="#f0f8fe"/>
</group>
</vector>

View File

@ -0,0 +1,33 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="231dp"
android:height="156dp"
android:viewportWidth="231"
android:viewportHeight="156">
<path
android:pathData="M90.5,15.5C100.84,15.33 111.17,15.5 121.5,16C122.13,17.89 123.13,19.56 124.5,21C130.17,22 135.83,23 141.5,24C141.96,24.41 142.29,24.91 142.5,25.5C137.54,28.56 132.37,31.23 127,33.5C125.85,37.43 125.01,41.43 124.5,45.5C124.62,47.79 125.46,49.79 127,51.5C133.33,58.5 139.67,65.5 146,72.5C146.67,90.83 146.67,109.17 146,127.5C144.44,129.36 142.61,130.86 140.5,132C143.57,134.95 146.74,137.78 150,140.5C150.48,141.45 150.65,142.45 150.5,143.5C130.1,144.15 109.93,143.48 90,141.5C83.52,115.23 77.35,88.9 71.5,62.5C77,46.51 83.33,30.84 90.5,15.5Z"
android:fillColor="#54b9fd"/>
<path
android:pathData="M91.5,18.5C101.17,18.5 110.83,18.5 120.5,18.5C121.18,22.72 122.18,26.89 123.5,31C123.17,31.5 122.83,32 122.5,32.5C106.76,40.79 91.26,49.45 76,58.5C80.83,45.14 86,31.81 91.5,18.5Z"
android:fillColor="#fbfdfe"/>
<path
android:pathData="M124.5,23.5C128.11,24.49 131.78,25.32 135.5,26C132.5,27.5 129.5,29 126.5,30.5C125.36,28.29 124.7,25.96 124.5,23.5Z"
android:fillColor="#f4fafe"/>
<path
android:pathData="M121.5,35.5C122.5,35.47 123.16,35.97 123.5,37C123.25,45.36 121.25,46.19 117.5,39.5C118.87,38.16 120.2,36.83 121.5,35.5Z"
android:fillColor="#e9f6fe"/>
<path
android:pathData="M112.5,40.5C114.37,40.86 115.87,41.86 117,43.5C125.67,53.5 134.33,63.5 143,73.5C144.05,91.18 144.22,108.84 143.5,126.5C136.7,130.8 130.03,135.3 123.5,140C115.5,140.67 107.5,140.67 99.5,140C108.66,136.26 116.99,131.26 124.5,125C120.87,121.07 117.04,117.24 113,113.5C112.67,104.5 112.33,95.5 112,86.5C105.04,75.42 98.21,64.25 91.5,53C98.56,48.81 105.56,44.64 112.5,40.5Z"
android:fillColor="#fcfdfe"/>
<path
android:pathData="M87.5,54.5C88.5,54.41 89.33,54.75 90,55.5C96.17,65.83 102.33,76.17 108.5,86.5C104.48,91.35 99.98,95.69 95,99.5C97.39,110.69 100.22,121.86 103.5,133C103.17,133.83 102.83,134.67 102.5,135.5C99.5,136.83 96.5,138.17 93.5,139.5C91.55,135.38 90.05,131.04 89,126.5C84.32,105.46 79.49,84.46 74.5,63.5C75.01,61.91 76.01,60.75 77.5,60C81.06,58.39 84.39,56.56 87.5,54.5Z"
android:fillColor="#fbfdfe"/>
<path
android:pathData="M108.5,90.5C109.65,96.99 109.82,103.65 109,110.5C105.17,107.33 101.33,104.17 97.5,101C101.62,97.95 105.29,94.45 108.5,90.5Z"
android:fillColor="#f7fbfe"/>
<path
android:pathData="M98.5,105.5C105.84,111.84 113.18,118.17 120.5,124.5C116.38,127.73 112.04,130.73 107.5,133.5C104.1,124.29 101.1,114.95 98.5,105.5Z"
android:fillColor="#f8fcfe"/>
<path
android:pathData="M135.5,134.5C139.38,135.18 142.71,137.01 145.5,140C139.83,140.67 134.17,140.67 128.5,140C131.02,138.3 133.35,136.47 135.5,134.5Z"
android:fillColor="#f0f8fe"/>
</vector>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#595959</color>
<color name="ic_launcher_background">#0F1EC2</color>
</resources>