Commit Graph

1455 Commits

Author SHA1 Message Date
Fredrik Fornwall
a5de3d3a2b Fixed: Use current bg color when scrolling with horizontal margins
Fixes https://github.com/termux/termux-packages/issues/12556

Issue was also reported here:
https://www.reddit.com/r/termux/comments/1df1dii/how_can_i_fix_this_annoying_screenfilling_thing/
2024-08-13 19:14:53 +02:00
agnostic-apollo
57e4ef456b Added: Add support for GitHub action builds for github-releases/** branches 2024-06-18 02:08:34 +05:00
Fredrik Fornwall
d90be9cd50 Changed: Update information regarding Google Play in README 2024-06-16 01:26:48 +02:00
agnostic-apollo
062c9771a9 Added: Request SET_ALARM permission to allow broadcasting an intent to set an alarm or timer in an alarm clock app
- https://developer.android.com/reference/android/Manifest.permission#SET_ALARM
- https://developer.android.com/reference/android/provider/AlarmClock

Closes #3990
2024-06-05 19:13:57 +05:00
dependabot[bot]
2f40df91e5 Changed: Bump gradle/wrapper-validation-action from 2 to 3
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 2 to 3.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-18 21:12:09 +05:00
agnostic-apollo
755b752a95 Reverted: Revert "ci: use termux/upload-release-actions to attach debug builds to new releases"
This reverts commit 2ac7fd1e56.

Do not use `upload-release-action` for uploading artifacts and generating checksum and instead keep using standard `sha256sum` and internal github tools. `upload-release-action` also generates checksum in the wrong format, check https://github.com/termux/termux-app/pull/3241#discussion_r1106019790.
2024-04-16 12:34:31 +05:00
agnostic-apollo
67f4891580 Fixed: Limit max combining characters in TerminalRow to 15 characters to prevent buffer overflows
The exception below causing app crash happens because of malicious input where combining characters keep getting added to same column of the row and this increases the size of `mSpaceUsed` and `mText`, eventually causing a buffer overflow of `mSpaceUsed`, which is limited to max `32767` value as per java `short` limit, but the limit itself isn't the issue, but an endless number of combining characters being added. Check `MAX_COMBINING_CHARACTERS_PER_COLUMN` field javadocs for why the limit `15` was chosen.

```
curl -o matroska.js https://kimapr.net/lappy/matroska.js
cat matroska.js
```

The `charCount` below refers to value of `Character.charCount(codePoint)`, like before `oldCharactersUsedForColumn` is appended to `newCharactersUsedForColumn`.

```
TerminalRow: codePoint=112, mColumns=98, mText=637, columnToSet=18, mSpaceUsed=590, javaCharDifference=0, oldStartOfColumnIndex=510, oldCharactersUsedForColumn=1, newCharactersUsedForColumn=1, oldNextColumnIndex=511, newNextColumnIndex=511, charCount=1, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=1
TerminalRow: codePoint=40, mColumns=98, mText=637, columnToSet=19, mSpaceUsed=590, javaCharDifference=0, oldStartOfColumnIndex=511, oldCharactersUsedForColumn=1, newCharactersUsedForColumn=1, oldNextColumnIndex=512, newNextColumnIndex=512, charCount=1, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=1
TerminalRow: codePoint=40, mColumns=98, mText=637, columnToSet=20, mSpaceUsed=590, javaCharDifference=0, oldStartOfColumnIndex=512, oldCharactersUsedForColumn=1, newCharactersUsedForColumn=1, oldNextColumnIndex=513, newNextColumnIndex=513, charCount=1, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=1
TerminalRow: codePoint=101, mColumns=98, mText=637, columnToSet=21, mSpaceUsed=590, javaCharDifference=0, oldStartOfColumnIndex=513, oldCharactersUsedForColumn=1, newCharactersUsedForColumn=1, oldNextColumnIndex=514, newNextColumnIndex=514, charCount=1, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=1
TerminalRow: codePoint=917772, mColumns=98, mText=147, columnToSet=18, mSpaceUsed=98, javaCharDifference=2, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=1, newCharactersUsedForColumn=3, oldNextColumnIndex=19, newNextColumnIndex=21, charCount=2, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
I TerminalRow: codePoint=65024, mColumns=98, mText=147, columnToSet=18, mSpaceUsed=100, javaCharDifference=1, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=3, newCharactersUsedForColumn=4, oldNextColumnIndex=21, newNextColumnIndex=22, charCount=1, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
TerminalRow: codePoint=917772, mColumns=98, mText=147, columnToSet=18, mSpaceUsed=101, javaCharDifference=2, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=4, newCharactersUsedForColumn=6, oldNextColumnIndex=22, newNextColumnIndex=24, charCount=2, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
...
TerminalRow: codePoint=917959, mColumns=98, mText=32781, columnToSet=18, mSpaceUsed=32763, javaCharDifference=2, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=32666, newCharactersUsedForColumn=32668, oldNextColumnIndex=32684, newNextColumnIndex=32686, charCount=2, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
TerminalRow: codePoint=917939, mColumns=98, mText=32781, columnToSet=18, mSpaceUsed=32765, javaCharDifference=2, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=32668, newCharactersUsedForColumn=32670, oldNextColumnIndex=32686, newNextColumnIndex=32688, charCount=2, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
TerminalRow: codePoint=917961, mColumns=98, mText=32781, columnToSet=18, mSpaceUsed=32767, javaCharDifference=2, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=32670, newCharactersUsedForColumn=32672, oldNextColumnIndex=32688, newNextColumnIndex=32690, charCount=2, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
TerminalRow: codePoint=917804, mColumns=98, mText=32781, columnToSet=18, mSpaceUsed=-32767, javaCharDifference=2, oldStartOfColumnIndex=18, oldCharactersUsedForColumn=1, newCharactersUsedForColumn=3, oldNextColumnIndex=19, newNextColumnIndex=21, charCount=2, oldCodePointDisplayWidth=1, newCodePointDisplayWidth=0
```

```
java.lang.ArrayIndexOutOfBoundsException: src.length=32781 srcPos=19 dst.length=32781 dstPos=21 length=-32786
	at java.lang.System.arraycopy(System.java:469)
	at com.termux.terminal.TerminalRow.setChar(TerminalRow.java:196)
	at com.termux.terminal.TerminalBuffer.setChar(TerminalBuffer.java:455)
	at com.termux.terminal.TerminalEmulator.emitCodePoint(TerminalEmulator.java:2380)
	at com.termux.terminal.TerminalEmulator.processCodePoint(TerminalEmulator.java:624)
	at com.termux.terminal.TerminalEmulator.processByte(TerminalEmulator.java:520)
	at com.termux.terminal.TerminalEmulator.append(TerminalEmulator.java:487)
	at com.termux.terminal.TerminalSession$MainThreadHandler.handleMessage(TerminalSession.java:358)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
```

See also following links for history of related changes to `TerminalRow` for combining characters. Note that jackpal terminal does not crash for above, which termux-app is based on, but changes were done by fornwall in initial commit of termux-app to change the behaviour, hence the crash, but he added the `FIXME: Put a limit of combining characters` comment as a note to solve the current issue in future, which is now.

- 9a47042620
- https://github.com/jackpal/Android-Terminal-Emulator/pull/338
- a18ee58f7a (diff-f84d215b18106c037e01986a3968fa54b74691174a78fcc99493f745d3805be5)

Closes #3839
2024-04-07 15:52:48 +05:00
dependabot[bot]
7b19cd2f5a Changed: Bump termux/upload-release-action from 4.1.0 to 4.2.0
Bumps [termux/upload-release-action](https://github.com/termux/upload-release-action) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/termux/upload-release-action/releases)
- [Changelog](https://github.com/termux/upload-release-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/termux/upload-release-action/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: termux/upload-release-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 01:05:37 +05:00
dependabot[bot]
882da34fcd Changed: Bump gradle/wrapper-validation-action from 1 to 2
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 1 to 2.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-02 00:34:43 +05:00
dependabot[bot]
8e3a8980a8 Changed: Bump actions/upload-artifact from 3 to 4 (#3735) 2024-01-01 15:19:33 +00:00
dependabot[bot]
e4385832b7 Changed: Bump actions/download-artifact from 3 to 4 (#3736)
l
2024-01-01 15:19:09 +00:00
agnostic-apollo
3b5018b4c7 Changed: Update Twitter to X (Twitter) in README
Co-authored-by: @BandhiyaHardik <bandhiya.hardik1905@gmail.com>
Co-authored-by: @agnostic-apollo  <agnosticapollo@gmail.com>

Related pull #3681
2023-11-02 09:20:21 +05:00
agnostic-apollo
c84d4804c8 Changed!: Update commit messages guidelines in README to be more clear and remove Docs as a valid type
The `Docs` refer to "something" that is changed, and not the type of change being made. If docs are to be changed in future, it should be added as a scope instead, like `Added(docs): Add some docs` or `Fixed(docs): Fix some docs`.
2023-11-01 17:30:43 +05:00
agnostic-apollo
6727bbecc4 Changed: Put GitHub debug keystore information in README in dropdown 2023-10-19 08:04:45 +05:00
agnostic-apollo
e27f9fa979 Changed: Update README with info on how to install termux for android 5 and 6 2023-10-19 08:00:31 +05:00
Fredrik Fornwall
e2f0edf4d2 Chore: Add vim swap files to .gitignore 2023-10-08 22:03:27 +02:00
dependabot[bot]
c5b69975e1 Changed: Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-07 06:55:28 +05:00
agnostic-apollo
cce78cc274 Fixed: Fix dependabot commit format to use convetional commit format
All commit messages will now be prefixed with "Changed: "
2023-10-07 06:46:22 +05:00
Leonid Pliushch
32cd8a9384 Changed: Remove info from README.md that fornwall is inactive and issue #1072 needs extra attention
Fornwall is active again and work is already being done on #1072 for an alternate variant at https://github.com/termux/termux-exec/pull/24 and the other alternate https://github.com/termux/termux-app/issues/2155#issuecomment-1636732850 will be worked on in future.
2023-10-07 06:36:50 +05:00
agnostic-apollo
eef5ac43a7 Fixed: Fix headings in README.md 2023-08-22 05:01:47 +05:00
agnostic-apollo
55cdef01e7 Fixed: Allow numbers and hyphens in domain extension for url selector
Closes #3550
2023-08-19 03:59:10 +05:00
agnostic-apollo
7c262b8d99 Fixed: Fix toggle toolbar not working due to accidental comment of function in a56ed577
Closes #3258
2023-08-14 20:45:30 +05:00
agnostic-apollo
06230f95df Changed: Only show github action builds for pushes to master branch and not of other branches and pull requests 2023-08-10 00:46:44 +05:00
Leonid Pliushch
9d308c2331 update readme
Presence of phantom process killer on Android 12 doesn't mean Termux is
broken. It could be unstable because of abrupt termination of all
processes by signal 9 under certain cases. But this doesn't mean it is
unusable on all devices with Android 12 or higher.

The word "broken" could be too scary for new users.
2023-06-25 22:39:36 +03:00
Leonid Pliushch
11d8e4ff8f update readme
Clarification why Termux is still not unpublished from Play Store.
2023-05-25 12:42:54 +03:00
agnostic-apollo
66a9495d91 Fixed: Fix SHIFT+PAGE_UP and SHIFT+PAGE_DOWN behaviour to scroll 1 line of scrollback history instead of scrolling command history or changing pages
This will work for both `SHIFT` extra key and hardware keyboards. The `SHIFT` extra key can be long held to lock it in an enabled state and `PGUP` and `PGDN` keys can be long held to repeat scrolling.

Closes #867
2023-05-21 07:58:35 +05:00
agnostic-apollo
33295decbb Changed: Add PGUP and PGDN extra keys to repetitive keys so that long holding them triggers page scrolling instead of having to repeatedly press the key to change pages 2023-05-21 07:58:35 +05:00
maheshnikam
ba1fb850bf Changed(README.md): Improved some links to Hyperlinks 2023-05-02 07:20:35 +08:00
Kevin Williams
1240c5ca47 Revert "[doc](readme)modified the links in file"
This reverts commit c1dca29076.
2023-05-02 07:20:35 +08:00
maheshnikam
c1dca29076 [doc](readme)modified the links in file
improved some links to Hyperlinks.
2023-04-30 20:47:04 +08:00
utzcoz
93eafffb90 Changed: Bump Robolectric to 4.10 2023-04-16 22:43:38 +05:00
utzcoz
9b274f9a0d Changed: Bump robolectric to 4.9.2 2023-03-22 11:18:41 +05:00
Sandelinos
b800f1cc81 Added: Add monochrome icon 2023-03-04 21:24:18 +08:00
Yaksh Bariya
2ac7fd1e56 ci: use termux/upload-release-actions to attach debug builds to new releases 2023-02-08 19:15:51 +05:30
Young-Lord
c6dce12510 Fix GitHub spelling 2023-01-23 11:13:48 +02:00
Lucy Phipps
2f5a6f7de6 WcWidth.c: fix 2nd typo 2022-12-16 07:01:40 +00:00
Lucy Phipps
82f83a2970 WcWidth.c: fix typo 2022-12-16 06:58:37 +00:00
Lucy Phipps
b1c043d540 update WcWidth.java to Unicode 15.0.0 2022-12-16 06:56:27 +00:00
Lucy Phipps
cff6cff609 Create dependabot.yml 2022-11-07 01:16:28 +00:00
Frieder Bluemle
29cf9820e1 Fix GitHub spelling 2022-10-27 11:37:17 +03:00
Yaksh Bariya
c8a74dc588 feat(KeyHandler): respect modifiers with PgUp and PgDn 2022-10-24 07:58:37 +05:30
daywalk3r666
20dee0e940 Update actions/upload-artifact to v3 2022-10-14 10:02:36 +03:00
Sushrut1101
3516f1979f Update actions/checkout to v3 2022-10-13 10:56:35 +03:00
EduardDurech
5bc3d2db8d Added: Add KEY_LAST_PENDING_INTENT_REQUEST_CODE to TermuxAPIAppSharedPreferences 2022-10-13 08:48:31 +05:00
agnostic-apollo
3f7a939313 Added: Add support for Share selected text of terminal in long hold MORE menu so that users don't have to copy and paste to move text between apps 2022-10-04 04:47:58 +05:00
agnostic-apollo
0c14c291b2 Changed: Use ShareUtils to copy and paste text and prevent potential NPE
The `copyTextToClipboard()` method has been updated to pass clip label when copying text to clipboard and `getTextFromClipboard()` and `getTextStringFromClipboardIfSet()` methods have been added to get current clipboard.
2022-10-04 04:29:15 +05:00
agnostic-apollo
63d035ce39 Changed: Update phantom process links 2022-10-03 15:37:26 +05:00
agnostic-apollo
8c1749ef96 Added|Changed: Add AppSharedPreferences to hold SharedPreferences of apps and inherit termux app prefrences from it 2022-09-29 02:45:31 +05:00
Leonid Pliushch
6c56073958 readme: add notes about test keystore 2022-09-21 20:01:13 +03:00
Leonid Pliushch
061dc776bd rename dev_keystore.jks to testkey_untrusted.jks
Hopefully the new name of keystore file would provide to potential user
more info about what it actually is.
2022-09-21 10:30:24 +03:00