├── .github
└── ISSUE_TEMPLATE
│ ├── 01-bug-report.yml
│ └── config.yml
├── .gitignore
├── LICENSE
├── README.md
├── app
├── build.gradle
├── proguard-rules.pro
├── src
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ │ ├── bios-256k.bin
│ │ │ ├── console_font.ttf
│ │ │ ├── efi-virtio.rom
│ │ │ ├── kvmvapic.bin
│ │ │ ├── userdata-01.qcow2
│ │ │ └── userdata-02.qcow2
│ │ ├── java
│ │ │ └── sylirre
│ │ │ │ └── vmconsole
│ │ │ │ ├── Bell.java
│ │ │ │ ├── Config.java
│ │ │ │ ├── ExtraKeysView.java
│ │ │ │ ├── InputDispatcher.java
│ │ │ │ ├── Installer.java
│ │ │ │ ├── TerminalActivity.java
│ │ │ │ ├── TerminalPreferences.java
│ │ │ │ ├── TerminalService.java
│ │ │ │ ├── termlib
│ │ │ │ ├── ByteQueue.java
│ │ │ │ ├── EmulatorDebug.java
│ │ │ │ ├── JNI.java
│ │ │ │ ├── KeyHandler.java
│ │ │ │ ├── TerminalBuffer.java
│ │ │ │ ├── TerminalColorScheme.java
│ │ │ │ ├── TerminalColors.java
│ │ │ │ ├── TerminalEmulator.java
│ │ │ │ ├── TerminalOutput.java
│ │ │ │ ├── TerminalRow.java
│ │ │ │ ├── TerminalSession.java
│ │ │ │ ├── TextStyle.java
│ │ │ │ └── WcWidth.java
│ │ │ │ └── termview
│ │ │ │ ├── CursorController.java
│ │ │ │ ├── GestureAndScaleRecognizer.java
│ │ │ │ ├── TerminalRenderer.java
│ │ │ │ ├── TerminalView.java
│ │ │ │ ├── TerminalViewClient.java
│ │ │ │ ├── TextSelectionCursorController.java
│ │ │ │ └── TextSelectionHandleView.java
│ │ ├── jniLibs
│ │ └── res
│ │ │ ├── drawable-xhdpi
│ │ │ └── banner.png
│ │ │ ├── drawable-xxhdpi
│ │ │ ├── text_select_handle_left_mtrl_alpha.png
│ │ │ └── text_select_handle_right_mtrl_alpha.png
│ │ │ ├── drawable
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── ic_launcher_foreground.xml
│ │ │ ├── ic_service_notification.png
│ │ │ ├── terminal_scroll_shape.xml
│ │ │ ├── text_select_handle_left_material.xml
│ │ │ └── text_select_handle_right_material.xml
│ │ │ ├── layout
│ │ │ ├── installer_progress.xml
│ │ │ └── main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ └── test
│ │ └── java
│ │ └── sylirre
│ │ └── vmconsole
│ │ └── termlib
│ │ ├── ByteQueueTest.java
│ │ ├── ControlSequenceIntroducerTest.java
│ │ ├── CursorAndScreenTest.java
│ │ ├── DecSetTest.java
│ │ ├── DeviceControlStringTest.java
│ │ ├── HistoryTest.java
│ │ ├── KeyHandlerTest.java
│ │ ├── OperatingSystemControlTest.java
│ │ ├── RectangularAreasTest.java
│ │ ├── ResizeTest.java
│ │ ├── ScreenBufferTest.java
│ │ ├── ScrollRegionTest.java
│ │ ├── TerminalRowTest.java
│ │ ├── TerminalTest.java
│ │ ├── TerminalTestCase.java
│ │ ├── TextStyleTest.java
│ │ ├── UnicodeInputTest.java
│ │ └── WcWidthTest.java
└── vmconsole.jks
├── build.gradle
├── docs
├── .gitignore
├── 404.html
├── Gemfile
├── Gemfile.lock
├── README.md
├── _config.yml
├── _includes
│ ├── anchor_headings.html
│ ├── category.html
│ ├── disqus_comments.html
│ ├── footer.html
│ ├── head.html
│ ├── header.html
│ ├── icon-github.html
│ ├── icon-github.svg
│ ├── icon-twitter.html
│ ├── icon-twitter.svg
│ └── social.html
├── _layouts
│ ├── default.html
│ ├── get.html
│ ├── home.html
│ ├── page.html
│ ├── post.html
│ └── redirect.html
├── _sass
│ └── minima
│ │ ├── _base.scss
│ │ ├── _layout.scss
│ │ ├── custom-styles.scss
│ │ ├── custom-variables.scss
│ │ ├── initialize.scss
│ │ └── skins
│ │ ├── classic.scss
│ │ ├── dark.scss
│ │ ├── solarized-dark.scss
│ │ └── solarized.scss
├── assets
│ ├── css
│ │ └── style.scss
│ └── minima-social-icons.svg
├── favicon.ico
├── files
│ ├── demo_boot-logs.png
│ ├── demo_btop.png
│ ├── demo_dns-dig.png
│ ├── demo_docker.png
│ ├── demo_metasploit.png
│ ├── demo_nvim.png
│ ├── get-it-on-github.png
│ ├── get-it-on-google-play.png
│ └── slider.js
├── google8e6c3fd31cf1f2d8.html
├── index.md
└── pages
│ ├── get.md
│ └── privacy-policy.md
├── external
├── alpine_iso
│ ├── Dockerfile
│ ├── Makefile
│ ├── README.md
│ ├── abuild-keys
│ │ ├── vmconsole-dev.rsa.enc
│ │ └── vmconsole-dev.rsa.pub
│ ├── extras
│ │ └── .placeholder
│ ├── files
│ │ ├── issue
│ │ └── motd
│ ├── genapkovl.sh
│ ├── mkimage.sh
│ ├── mkimg.profile.sh
│ └── packages.txt
└── libvmc
│ ├── README.md
│ ├── build-package.sh
│ ├── clean.sh
│ ├── jniLibs
│ ├── arm64-v8a
│ │ └── libVMC.so
│ ├── armeabi-v7a
│ │ └── libVMC.so
│ ├── x86
│ │ └── libVMC.so
│ └── x86_64
│ │ └── libVMC.so
│ ├── packages
│ ├── glib
│ │ ├── 0000-configure-no-posix-spawn.patch
│ │ ├── 0001-support-android-timezone-info.patch
│ │ ├── 0002-fix-hardcoded-paths.patch
│ │ └── build.sh
│ ├── libandroid-cpufeatures
│ │ ├── build.sh
│ │ └── sources
│ │ │ ├── NOTICE
│ │ │ ├── cpu-features.c
│ │ │ └── cpu-features.h
│ ├── libandroid-support
│ │ ├── build.sh
│ │ └── sources
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.md
│ │ │ └── src
│ │ │ ├── musl-ctype
│ │ │ ├── alpha.h
│ │ │ ├── iswalnum.c
│ │ │ ├── iswalpha.c
│ │ │ ├── iswblank.c
│ │ │ ├── iswcntrl.c
│ │ │ ├── iswctype.c
│ │ │ ├── iswdigit.c
│ │ │ ├── iswgraph.c
│ │ │ ├── iswlower.c
│ │ │ ├── iswpunct.c
│ │ │ ├── iswspace.c
│ │ │ ├── iswupper.c
│ │ │ ├── iswxdigit.c
│ │ │ ├── nonspacing.h
│ │ │ ├── punct.h
│ │ │ ├── towctrans.c
│ │ │ ├── wcswidth.c
│ │ │ ├── wctrans.c
│ │ │ └── wcwidth.c
│ │ │ ├── musl-locale
│ │ │ ├── big5.h
│ │ │ ├── codepages.h
│ │ │ ├── gb18030.h
│ │ │ ├── hkscs.h
│ │ │ ├── iconv.c
│ │ │ ├── intl.c
│ │ │ ├── jis0208.h
│ │ │ ├── ksc.h
│ │ │ └── legacychars.h
│ │ │ └── musl-multibyte
│ │ │ ├── internal.c
│ │ │ ├── internal.h
│ │ │ ├── libc.h
│ │ │ ├── mblen.c
│ │ │ ├── mbsnrtowcs.c
│ │ │ └── mbsrtowcs.c
│ ├── libffi
│ │ ├── 0001-fix-hardcoded-paths.patch
│ │ └── build.sh
│ ├── libiconv
│ │ └── build.sh
│ ├── pixman
│ │ ├── 0000-fix-pkgconfig-defs.patch
│ │ └── build.sh
│ ├── qemu-system
│ │ ├── 0000-android-config-support.patch
│ │ ├── 0001-fix-hardcoded-paths.patch
│ │ ├── 0002-fix-soundcard.h-location.patch
│ │ ├── 0003-fix-time_nsec-defs.patch
│ │ ├── 0004-add-missing-telldir-seekdir.patch
│ │ ├── 0005-add-missing-sigorset.patch
│ │ ├── 0006-fix-sem.h-location.patch
│ │ ├── 0007-fix-syscalls.patch
│ │ ├── 0008-fix-struct-member-conflicts.patch
│ │ ├── 0009-fix-mman.h-defs.patch
│ │ ├── 0010-disable-glob.h-include.patch
│ │ ├── 0011-misc-build-fixes.patch
│ │ ├── 0012-add-missing-arch_prctl.patch
│ │ ├── 0014-app_dns-from-envvar.patch
│ │ ├── 0015-app_no-libcap-attr-deps.patch
│ │ ├── 0016-app-jni-shared-library.patch
│ │ ├── 0017-9pfs-dont-chmod-mapfile.patch
│ │ ├── 0018-iconv.patch
│ │ ├── 0019-disable-signalfd.patch
│ │ └── build.sh
│ └── zlib
│ │ └── build.sh
│ └── scripts
│ ├── Dockerfile
│ ├── buildorder.py
│ ├── config.guess
│ ├── config.sub
│ ├── run-docker.sh
│ └── toolchain
│ ├── create-standalone-toolchain.sh
│ ├── ndk-headers
│ ├── iconv.h
│ ├── langinfo.h
│ └── libintl.h
│ └── ndk-patches
│ ├── android_api-level.h.patch
│ ├── asm-generic_termbits.h.patch
│ ├── linux_fcntl.h.patch
│ ├── stdio.h.patch
│ ├── stdlib.h.patch
│ ├── sys_wait.h.patch
│ └── unistd.h.patch
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── images
├── banner.png
├── google-play-badge.png
├── logo.png
├── logo_source.svg
└── screenshots.gif
└── settings.gradle
/.github/ISSUE_TEMPLATE/01-bug-report.yml:
--------------------------------------------------------------------------------
1 | name: "Bug report"
2 | description: "Report an issue if you have found that application is malfunctioning."
3 | title: "[Bug]: "
4 | labels: ["bug report"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | This is a form you required to fill in order to submit a bug report of vmConsole. Use it to submit issues only of application itself.
10 |
11 | Alpine Linux is not affiliated with vmConsole. Package bugs are not subject to be reported there.
12 | - type: textarea
13 | attributes:
14 | label: Problem description
15 | description: |
16 | Provide a clear description of the problem. Please attach screenshots, video recording or other information which may help us to understand the problem.
17 |
18 | Issues without proper description will be instantly closed.
19 | validations:
20 | required: true
21 | - type: textarea
22 | attributes:
23 | label: Steps to reproduce the behavior.
24 | description: |
25 | Describe steps which will let us to reproduce the issue.
26 | validations:
27 | required: true
28 | - type: textarea
29 | attributes:
30 | label: What is the expected behavior?
31 | description:
32 | Describe the result you have expected when performing above steps. That will help us to determine whether bug really exists or that was just application usage misunderstanding.
33 | - type: textarea
34 | attributes:
35 | label: System information
36 | description: Please provide info about your device
37 | value: |
38 | * Application version:
39 | * Android OS version:
40 | * Device model:
41 | validations:
42 | required: true
43 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Want ask questions about the project?
4 | url: https://github.com/sylirre/vmConsole/discussions
5 | about: Join GitHub Discussions
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated.
2 | /app/.cxx
3 | /app/build
4 | /app/debug
5 | /app/release
6 | /.gradle
7 | *.aab
8 | *.apk
9 | *.iso
10 | *.so
11 |
12 | # Local configuration.
13 | /.idea
14 | *.iml
15 | local.properties
16 |
17 | # Project doesn't support building on Windows.
18 | /gradlew.bat
19 |
20 | # OS-specific files.
21 | .DS_Store
22 | .DS_Store?
23 | ._*
24 | .Spotlight-V100
25 | .Trashes
26 | ehthumbs.db
27 | Thumbs.db
28 |
29 | # Don't ignore prebuilt libraries.
30 | !/external/libvmc/jniLibs/*/*.so
31 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 32
5 |
6 | dependencies {
7 | implementation "androidx.annotation:annotation:1.3.0"
8 | implementation "androidx.preference:preference:1.2.0"
9 | }
10 |
11 | defaultConfig {
12 | applicationId "sylirre.vmconsole"
13 | minSdkVersion 24
14 | targetSdkVersion 32
15 | versionCode 2
16 | versionName "1.1.0"
17 |
18 | archivesBaseName = "vmConsole-$versionName"
19 |
20 | splits {
21 | abi {
22 | enable false
23 | reset()
24 | include 'arm64-v8a', 'x86_64', 'armeabi-v7a', 'x86'
25 | universalApk true
26 | }
27 | }
28 | }
29 |
30 | signingConfigs {
31 | release {
32 | storeFile file('vmconsole.jks')
33 | keyAlias 'vmconsole'
34 | storePassword System.getenv("KEY_PASSPHRASE")
35 | keyPassword System.getenv("KEY_PASSPHRASE")
36 | }
37 | }
38 |
39 | buildTypes {
40 | release {
41 | minifyEnabled true
42 | shrinkResources true
43 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
44 | signingConfig signingConfigs.release
45 | }
46 | }
47 |
48 | compileOptions {
49 | sourceCompatibility JavaVersion.VERSION_1_8
50 | targetCompatibility JavaVersion.VERSION_1_8
51 | }
52 |
53 | packagingOptions {
54 | jniLibs.useLegacyPackaging = true
55 | }
56 |
57 | testOptions {
58 | unitTests.returnDefaultValues = true
59 | }
60 | }
61 |
62 | tasks.withType(Test) {
63 | testLogging {
64 | events "started", "passed", "skipped", "failed"
65 | }
66 | }
67 |
68 | dependencies {
69 | testImplementation 'junit:junit:4.13.2'
70 | }
71 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | -dontobfuscate
11 | #-renamesourcefileattribute SourceFile
12 | #-keepattributes SourceFile,LineNumberTable
13 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
21 | * Encodes effects, foreground and background colors into a 64 bit long, which are stored for each cell in a terminal 22 | * row in {@link TerminalRow#mStyle}. 23 | *
24 | *25 | * The bit layout is: 26 | *
27 | * - 16 flags (11 currently used). 28 | * - 24 for foreground color (only 9 first bits if a color index). 29 | * - 24 for background color (only 9 first bits if a color index). 30 | */ 31 | public final class TextStyle { 32 | 33 | public final static int CHARACTER_ATTRIBUTE_BOLD = 1; 34 | public final static int CHARACTER_ATTRIBUTE_ITALIC = 1 << 1; 35 | public final static int CHARACTER_ATTRIBUTE_UNDERLINE = 1 << 2; 36 | public final static int CHARACTER_ATTRIBUTE_BLINK = 1 << 3; 37 | public final static int CHARACTER_ATTRIBUTE_INVERSE = 1 << 4; 38 | public final static int CHARACTER_ATTRIBUTE_INVISIBLE = 1 << 5; 39 | public final static int CHARACTER_ATTRIBUTE_STRIKETHROUGH = 1 << 6; 40 | /** 41 | * The selective erase control functions (DECSED and DECSEL) can only erase characters defined as erasable. 42 | *43 | * This bit is set if DECSCA (Select Character Protection Attribute) has been used to define the characters that 44 | * come after it as erasable from the screen. 45 | *
46 | */ 47 | public final static int CHARACTER_ATTRIBUTE_PROTECTED = 1 << 7; 48 | /** Dim colors. Also known as faint or half intensity. */ 49 | public final static int CHARACTER_ATTRIBUTE_DIM = 1 << 8; 50 | /** If true (24-bit) color is used for the cell for foreground. */ 51 | private final static int CHARACTER_ATTRIBUTE_TRUECOLOR_FOREGROUND = 1 << 9; 52 | /** If true (24-bit) color is used for the cell for foreground. */ 53 | private final static int CHARACTER_ATTRIBUTE_TRUECOLOR_BACKGROUND= 1 << 10; 54 | 55 | public final static int COLOR_INDEX_FOREGROUND = 256; 56 | public final static int COLOR_INDEX_BACKGROUND = 257; 57 | public final static int COLOR_INDEX_CURSOR = 258; 58 | 59 | /** The 256 standard color entries and the three special (foreground, background and cursor) ones. */ 60 | public final static int NUM_INDEXED_COLORS = 259; 61 | 62 | /** Normal foreground and background colors and no effects. */ 63 | final static long NORMAL = encode(COLOR_INDEX_FOREGROUND, COLOR_INDEX_BACKGROUND, 0); 64 | 65 | static long encode(int foreColor, int backColor, int effect) { 66 | long result = effect & 0b111111111; 67 | if ((0xff000000 & foreColor) == 0xff000000) { 68 | // 24-bit color. 69 | result |= CHARACTER_ATTRIBUTE_TRUECOLOR_FOREGROUND | ((foreColor & 0x00ffffffL) << 40L); 70 | } else { 71 | // Indexed color. 72 | result |= (foreColor & 0b111111111L) << 40; 73 | } 74 | if ((0xff000000 & backColor) == 0xff000000) { 75 | // 24-bit color. 76 | result |= CHARACTER_ATTRIBUTE_TRUECOLOR_BACKGROUND | ((backColor & 0x00ffffffL) << 16L); 77 | } else { 78 | // Indexed color. 79 | result |= (backColor & 0b111111111L) << 16L; 80 | } 81 | 82 | return result; 83 | } 84 | 85 | public static int decodeForeColor(long style) { 86 | if ((style & CHARACTER_ATTRIBUTE_TRUECOLOR_FOREGROUND) == 0) { 87 | return (int) ((style >>> 40) & 0b111111111L); 88 | } else { 89 | return 0xff000000 | (int) ((style >>> 40) & 0x00ffffffL); 90 | } 91 | 92 | } 93 | 94 | public static int decodeBackColor(long style) { 95 | if ((style & CHARACTER_ATTRIBUTE_TRUECOLOR_BACKGROUND) == 0) { 96 | return (int) ((style >>> 16) & 0b111111111L); 97 | } else { 98 | return 0xff000000 | (int) ((style >>> 16) & 0x00ffffffL); 99 | } 100 | } 101 | 102 | public static int decodeEffect(long style) { 103 | return (int) (style & 0b11111111111); 104 | } 105 | 106 | } 107 | -------------------------------------------------------------------------------- /app/src/main/java/sylirre/vmconsole/termview/CursorController.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program. If not, see21 | * "CSI ? Pm h", DEC Private Mode Set (DECSET) 22 | *23 | * 24 | * and 25 | * 26 | *
27 | * "CSI ? Pm l", DEC Private Mode Reset (DECRST) 28 | *29 | * 30 | * controls various aspects of the terminal 31 | */ 32 | public class DecSetTest extends TerminalTestCase { 33 | 34 | /** DECSET 25, DECTCEM, controls visibility of the cursor. */ 35 | public void testEnableDisableCursor() { 36 | withTerminalSized(3, 3); 37 | assertTrue("Initially the cursor should be enabled", mTerminal.isShowingCursor()); 38 | enterString("\033[?25l"); // Disable Cursor (DECTCEM). 39 | assertFalse(mTerminal.isShowingCursor()); 40 | enterString("\033[?25h"); // Enable Cursor (DECTCEM). 41 | assertTrue(mTerminal.isShowingCursor()); 42 | 43 | enterString("\033[?25l"); // Disable Cursor (DECTCEM), again. 44 | assertFalse(mTerminal.isShowingCursor()); 45 | mTerminal.reset(false); 46 | assertTrue("Resetting the terminal should enable the cursor", mTerminal.isShowingCursor()); 47 | 48 | enterString("\033[?25l"); 49 | assertFalse(mTerminal.isShowingCursor()); 50 | enterString("\033c"); // RIS resetting should enabled cursor. 51 | assertTrue(mTerminal.isShowingCursor()); 52 | } 53 | 54 | /** DECSET 2004, controls bracketed paste mode. */ 55 | public void testBracketedPasteMode() { 56 | withTerminalSized(3, 3); 57 | 58 | mTerminal.paste("a"); 59 | assertEquals("Pasting 'a' should output 'a' when bracketed paste mode is disabled", "a", mOutput.getOutputAndClear()); 60 | 61 | enterString("\033[?2004h"); // Enable bracketed paste mode. 62 | mTerminal.paste("a"); 63 | assertEquals("Pasting when in bracketed paste mode should be bracketed", "\033[200~a\033[201~", mOutput.getOutputAndClear()); 64 | 65 | enterString("\033[?2004l"); // Disable bracketed paste mode. 66 | mTerminal.paste("a"); 67 | assertEquals("Pasting 'a' should output 'a' when bracketed paste mode is disabled", "a", mOutput.getOutputAndClear()); 68 | 69 | enterString("\033[?2004h"); // Enable bracketed paste mode, again. 70 | mTerminal.paste("a"); 71 | assertEquals("Pasting when in bracketed paste mode again should be bracketed", "\033[200~a\033[201~", mOutput.getOutputAndClear()); 72 | 73 | mTerminal.paste("\033ab\033cd\033"); 74 | assertEquals("Pasting an escape character should not input it", "\033[200~abcd\033[201~", mOutput.getOutputAndClear()); 75 | mTerminal.paste("\u0081ab\u0081cd\u009F"); 76 | assertEquals("Pasting C1 control codes should not input it", "\033[200~abcd\033[201~", mOutput.getOutputAndClear()); 77 | 78 | mTerminal.reset(false); 79 | mTerminal.paste("a"); 80 | assertEquals("Terminal reset(false) should disable bracketed paste mode", "a", mOutput.getOutputAndClear()); 81 | } 82 | 83 | /** DECSET 7, DECAWM, controls wraparound mode. */ 84 | public void testWrapAroundMode() { 85 | // Default with wraparound: 86 | withTerminalSized(3, 3).enterString("abcd").assertLinesAre("abc", "d ", " "); 87 | // With wraparound disabled: 88 | withTerminalSized(3, 3).enterString("\033[?7labcd").assertLinesAre("abd", " ", " "); 89 | enterString("efg").assertLinesAre("abg", " ", " "); 90 | // Re-enabling wraparound: 91 | enterString("\033[?7hhij").assertLinesAre("abh", "ij ", " "); 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /app/src/test/java/sylirre/vmconsole/termlib/DeviceControlStringTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program. If not, see
25 | As of now, the vmConsole application is distributed only through Google 26 | Play Store. Click on the badge below to proceed to the installation page. 27 |
28 | 29 |36 | It is planned to enable distribution of the application through GitHub 37 | Releases in future, so people without Google Services will be able to 38 | install it as well. Also this will allow us to provide a version of 39 | vmConsole without certain restrictions. 40 |
41 | 42 |45 | These system requirements are not mandatory. Though on devices where 46 | they are met, you will be able to achieve the max from application. 47 | Remember that vmConsole is a virtual machine holding the full-blown 48 | Linux distribution. Do not be naive, this application IS NOT optimized 49 | for low-end devices. 50 |
51 | 52 |55 | Disk: 8 GiB minimum. 56 |
57 |58 | Assuming you will have one 6 GiB partition on persistent disk 59 | and leave some space for Android. Note that vmConsole provides 60 | 2 persistend disks with max size of 32 GiB. You will be able to 61 | use both fully if have more than 64 GiB free on shared storage. 62 |
63 |66 | RAM: 6 - 8 GB. 67 |
68 |69 | Having more is good only for overall Android multitasking. 70 | vmConsole automatically determines a safe amount of memory that 71 | it can allocate, but it has a hard limit of 2047 MiB, which 72 | partially is a technical limitation (32bit devices) and partially 73 | a safe threshold that will let Android multitasking function 74 | properly without OOM conditions. 75 |
76 |80 | It is suggested to run vmConsole on 64bit devices, as it has been 81 | observed that QEMU has better emulation performance on these. But 82 | that is unclear, especially in cases where device is 64bit with 83 | 32bit only support on Android OS. Possibly that on devices having 84 | good CPU, the performace between 32bit and 64bit variants will be 85 | little to no. 86 |
87 |33 | vmConsole is a Linux virtual machine application for Android OS. It is 34 | built on top of QEMU system emulator and 35 | runs Alpine Linux — a small, yet 36 | powerful Linux distribution. This application lets you to do everything, 37 | like from playing with Bash scripts to performing a penetration test 38 | of remote server. 39 |
40 | 41 |Powerful. 48 | Alpine Linux distribution has over 10000 packages in its repositories 49 | covering the majority of typical tasks. Text editors, compilers, network 50 | administration utilities and others are all there. 51 | 52 |
Secure. 53 | What happens inside VM is remaining to be inside VM. You can't mess up 54 | or brick your device by running something inside vmConsole. Note that 55 | you're given full root control over virtual machine without the need 56 | of rooting or installing customized version of Android. 57 | 58 |
Minimalistic. 59 | vmConsole design is minimal and provides only necessary UI elements 60 | and features in order to provide a stable and consistent software. 61 | It is not overloaded by garland of semi-working functions unlike 62 | certain similar applications. 63 | 64 |