Git Product home page Git Product logo

termux-tools's Introduction

termux-tools

Some scripts and small programs that are packaged into termux's termux-tools package.

termux-tools's People

Contributors

2096779623 avatar agnostic-apollo avatar cherinyy avatar dependabot[bot] avatar elig0n avatar finagolfin avatar fornwall avatar grimler91 avatar huskydg avatar its-pointless avatar kcubeterm avatar landfillbaby avatar librehat avatar licy183 avatar lumitoluma avatar maxython avatar medanisjbara avatar mradityaalok avatar neo-oli avatar pvonmoradi avatar sahilister avatar souls-r avatar sylirre avatar thunder-coding avatar tomty89 avatar truboxl avatar vladimyr avatar wetitpig avatar xtkoba avatar zekesonxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-tools's Issues

termux-change-rep uses pacman to check mirrors

This error occurs if the main package manager on the device is pacman and apt is installed. In the last step of configuring mirrors, it uses the pkg command which in turn uses pacman due to the TERMUX_MAIN_PACKAGE_FORMAT system value.

[*] All mirrors selected
[*] pkg --check-mirror update
:: Synchronizing package databases...
 main is up to date
 x11 is up to date
 root is up to date
:: Starting full system upgrade...
 there is nothing to do

New Mirror in Singapore

Hello
I am the mirror admin of mirror.freedif.org.
We have recently upgraded our bandwidth and hardware and are able to support new projects.
I would be glad to support Termux with a new mirror in Singapore

http://mirror.freedif.org/termux/
https://mirror.freedif.org/termux/
rsync://mirror.freedif.org/termux/

Location: Singapore (SG)
Bandwidth: 10 GBPS
Hourly refresh - Full Rsync
Contact: karibu at freedif (dot) com

Let me know if you need any other information

Thank you

mirror.termux.dev port 443: Connection timed out

[rdeavila@G15:~]$ curl -vvv https://mirror.termux.dev/?mirrorstats
*   Trying 185.224.83.107:443...
* connect to 185.224.83.107 port 443 failed: Connection timed out
* Failed to connect to mirror.termux.dev port 443: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to mirror.termux.dev port 443: Connection timed out

New mirror announcement (yet again)

Hey everybody.
After setting up mirrors in Romania and Iceland in #50 we now also have a mirror in the Netherlands available

Hostname: nl.mirror.flokinet.net
Supported protocols: http,https,rsync
Update schedule: --* 00/4:36:00
Connectivity: 1Gbit/s
Provided by: FlokiNET
Contact: A well known 3-letter short form of network operation center @ the domain in the "provided by" section
Country: RO
City: Bucharest
Protocols: IPv4 and IPv6

If you need any more info we are happy to provide them

New mirror repo

Why is it worth to add this package?

Hi, I just created a termux repository mirror. Can you help me add it to the termux-tools package?

Mirror link:
termux-main
termux-root
x11

Information:
The mirror comes from Jakarta, Indonesia. It is hosted by Linode.
Thanks for your help ~

Home page URL

No response

Source code URL

https://tmx.xvx.my.id

Packaging policy acknowledgement

  • I certify that I have read Termux Packaging Policy and understand that my request will be denied in case of violation.

Additional information

No response

Add mirror.accum.se mirror

Hi!

Our mirror was previously registered as ftp.acc.umu.se, but while the
old host name still works it looks like it's been removed from your
list of mirrors (which is interesting, since our mirror was one of the first IIRC).

Anyhow, I've updated our setup to mirror from packages.termux.dev instead of grimler.se according to the instructions on https://github.com/termux/termux-packages/wiki/How-to-mirror-the-official-repositories

Mirror hosted by:

Academic Computer Club in Umeå, Sweden

Contact email:

[email protected]

Access URLs:

http://mirror.accum.se/mirror/termux.dev/
https://mirror.accum.se/mirror/termux.dev/
rsync://mirror.accum.se/mirror/termux.dev/

Bandwidth:

200 Gbps (yes Gbps)

Sync frequency:

Every 4th hour

Mirror status URL:

https://mirror.accum.se/mirror/

New mirrors announcement

Hey everybody.
We started mirroring termux on our mirror in romania and will soon add it to mirrors we are currently setting up on different locations across Europe.
Here is the data for the mirror:

Hostname: ro.mirror.flokinet.net
Supported protocols: http,https,rsync
Update schedule: *-*-* 00/4:15:00
Connectivity: 1Gbit/s
Provided by: [FlokiNET](https://flokinet.is)
Contact: A well known 3-letter short form of network operation center @ the domain in the "provided by" section
Country: RO
City: Bucharest
Protocols: IPv4 and IPv6

If you need any more info we are happy to provide them

Switching to dynamic motd.sh broken?

I followed the command given to switch to the dynamic motd.sh

ln -sf $PREFIX/etc/motd.sh ~/.termux/motd.sh

but am still seeing the static motd. Not sure if I missed a step somewhere... I do see the link for motd.sh in $HOME/.termux/

Screenshot_2023-03-26-07-44-51-95_84d3000e3f4017145260f7618db1d683

Where's `getprop`?

dpkg -S getprop

stdout:

termux-tools: /data/data/com.termux/files/usr/bin/getprop

Why can't I find that wrapper script in this repo?

[Bug]: New Mirror in Lisbon, Portugal

Problem description

Hi,

I'm creating this issue to donate a new mirror in Lisbon Portugal.
The mirror is available via RSYNC, HTTP and HTTPS @ mirror.leitecastro.com/termux.
The node is connected at 20Gbps and is IPv4 and IPv6 enabled.
It is currently syncing hourly from rsync://packages.termux.dev/termux
Let me know if you want to reduce the frequency of the sync.

Regards,

Tomás

What steps will reproduce the bug?

N/A

What is the expected behavior?

No response

System information

termux-info:


New mirror: mirrors.qvq.net.cn

Hey,I setup a mirror for termux in Chongqing, China and would like added to the official mirror list.
Mirror by: @lrinQVQ

Repository sources.list entry
Main deb https://mirrors.qvq.net.cn/termux/termux-main stable main
Root deb https://mirrors.qvq.net.cn/termux/termux-root root stable
X11 deb https://mirrors.qvq.net.cn/termux/termux-x11 x11 main

The server has 1Gbps bandwidth, It is updated every 1.5-2.5h(Randomized Delay)

[Bug]: `termux-open-url` cannot take spaces

Problem description

termux-open-url 'https://duckduckgo.com/?q=a b'
says
Error: Activity not started, unable to resolve Intent
whereas
termux-open-url 'https://duckduckgo.com/?q=a%20b'
works as expected

System information

  • Termux application version: 0.118.0
  • Android OS version: 8.0.0
  • Device model: F5321

New Mirror in Porto, Portugal

As the administrator of this mirror, I guarantee continuous uptime and plenty of bandwidth. I'm fully committed to supporting the Termux community's needs effectively.

  • Hostname: mirror.polido.pt/termux
  • Location: Porto, Portugal
  • Connectivity: 1 Gbps
  • Supported protocols: HTTP, HTTPS, rsync
  • Update period: Syncs occur nightly according to the Europe/Lisbon timezone. (This schedule can be adjusted upon request.)
  • IP version: IPv4 only, for now.

[Idea]: more flexible repos management

I suggest creating a termux-set-repo command which allows you to disable or enable repos for apt or for pacman. How to implement it correctly, I can’t figure out how to do it in my head, so I’m waiting for your implementation proposal (if you’re interested, of course).

Dalvikvm is way slow on Android 12

When running a simple .dex hello world it takes about 3.8 seconds.

The default of -Xnoimage-dex2oat on pre Android 12 has changed to -Ximage-dex2oat.

So a lot of time is taken to precompile dex files and all jar dependencies to a binary ELF as though it is a full APK :-( only to be deleted since it is not required to be persisted via other dalvikvm option. This is all done prior to calling main.

This script needs to be updated to specify -Xnoimage-dex2oat as a default

Issues with g++ tool

I'm trying to compile the file 'Main.cxx' to an exe code 'Main' with the tool g++ and link it with shared lib 'mylib.so'.
The problem is that the process returns an error says 'unable to find lib'.
I have make sure that the lib is at the same folder with the Main.cxx file, and still returns the same error.
IMG_20240710_234139

mirror.termux.dev: Redirection from https to 'http://...' is forbidden

Sometimes mirror.termux.dev returns bad redirection in the form of http.

$ pkg upg
Testing the available mirrors:
[*] (1) https://mirror.termux.dev/termux-main: ok
Picking mirror: (0) /data/data/com.termux/files/usr/etc/termux/mirrors/europe/mirror.termux.dev
Get:1 https://mirror.textcord.xyz/termux/termux-main stable InRelease [14.0 kB]
Get:2 https://mirror.textcord.xyz/termux/termux-x11 x11 InRelease [14.0 kB]
Get:3 https://mirror.textcord.xyz/termux/termux-main stable/main x86_64 Packages [501 kB]
Get:4 https://mirror.textcord.xyz/termux/termux-x11 x11/main x86_64 Packages [125 kB]
Fetched 654 kB in 12s (52.5 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  c-ares clang command-not-found curl enchant golang libcompiler-rt libcurl libheif libllvm libuv lld llvm ocl-icd
14 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 122 MB of archives.
After this operation, 61.4 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Err:7 https://mirror.termux.dev/termux-main stable/main x86_64 libcompiler-rt x86_64 16.0.4-1
  Redirection from https to 'http://mirrors.bfsu.edu.cn/termux/apt/termux-main/pool/main/libc/libcompiler-rt/libcompiler-rt_16.0.4-1_x86_64.deb' is forbidden [IP: 185.224.83.107 443]
Get:4 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 llvm x86_64 16.0.4-1 [19.6 MB]
Get:2 https://mirrors.hit.edu.cn/termux/apt/termux-main stable/main x86_64 curl x86_64 8.1.1 [196 kB]
Get:1 https://mirrors.ustc.edu.cn/termux/apt/termux-main stable/main x86_64 libcurl x86_64 8.1.1 [1008 kB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 c-ares x86_64 1.19.1 [124 kB]
Get:5 https://mirrors.hit.edu.cn/termux/apt/termux-main stable/main x86_64 lld x86_64 16.0.4-1 [2372 kB]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Get:8 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 libllvm x86_64 16.0.4-1 [27.0 MB]
Get:10 https://mirrors.ustc.edu.cn/termux/apt/termux-main stable/main x86_64 enchant x86_64 2.5.0 [46.7 kB]
Get:9 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 command-not-found x86_64 2.2.0-1 [94.4 kB]
Get:12 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 libheif x86_64 1.16.2 [271 kB]
Get:13 https://mirrors.nju.edu.cn/termux/apt/termux-main stable/main x86_64 libuv x86_64 1.45.0-1 [79.9 kB]
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1
Get:11 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 golang x86_64 3:1.20.4-2 [35.1 MB]
Get:14 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 ocl-icd x86_64 2.3.1-3 [84.1 kB]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Ign:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1
Get:6 https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-main stable/main x86_64 clang x86_64 16.0.4-1 [33.4 MB]
Fetched 101 MB in 24min 19s (69.4 kB/s)
E: Failed to fetch https://mirror.termux.dev/termux-main/pool/main/libc/libcompiler-rt/libcompiler-rt_16.0.4-1_x86_64.deb  Redirection from https to 'http://mirrors.bfsu.edu.cn/termux/apt/termux-main/pool/main/libc/libcompiler-rt/libcompiler-rt_16.0.4-1_x86_64.deb' is forbidden [IP: 185.224.83.107 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
~ $ ls $PREFIX/etc/apt/
apt.conf.d  preferences.d  sources.list  sources.list.d  trusted.gpg.d
~ $ cat $PREFIX/etc/apt/sources.list
deb https://mirror.termux.dev/termux-main stable main
~ $ cat $PREFIX/etc/apt/sources.list.d/x11.list
deb https://mirror.termux.dev/termux-x11 x11 main

I checked https://github.com/termux/termux-tools/blob/master/mirrors/china/mirrors.bfsu.edu.cn and its already https. So mirror.termux.dev issue?

[Mirror] Add IN mirror; Change DE mirror URL

Hello, I would like to -

  1. Add India mirror (hourly sync) -

Source syntax:

deb https://mirrors.in.sahilister.net/termux/termux-main/ stable main
deb https://mirrors.in.sahilister.net/termux/termux-root/ root stable
deb https://mirrors.in.sahilister.net/termux/termux-x11/ x11 main
  1. Change URL for my Germany mirror from https://mirrors.sahilister.in/termux/ to https://mirrors.de.sahilister.net/termux/

Source syntax:

deb https://mirrors.de.sahilister.net/termux/termux-main/ stable main
deb https://mirrors.de.sahilister.net/termux/termux-root/ root stable
deb https://mirrors.de.sahilister.net/termux/termux-x11/ x11 main

PS - IN mirror GeoIP still shows Oslo, Norway as hosting provider recently opened India location. The mirror is located in Mumbai, India. Can be confirmed by running a traceroute/mtr.

PPS - Created #98 for the change.

Error: commands stopped working with pacman

I am talking about those commands that were configured with the work of pacman (for example, pkg and termux-info). This is due to an incorrectly specified value for TERMUX_MAIN_PACKAGE_FORMAT, which is listed as debian in the pacman package.

New mirror in Amsterdam, NL

Hostname: mirror.bouwhuis.network
Supported protocols: http,https,rsync
Update schedule: 15 */6 * * *
Connectivity: 10Gbit/s
Provided by: bouwhuis.network
Contact: A well known 3-letter short form of network operation center @ the domain in the "provided by" section
Country: NL
City: Amsterdam
Protocols: IPv4 and IPv6

Request to Add New Termux Mirror: France

Hello,

I would like to request the addition of a new Termux mirror with the following specifications:

  • Location: France
  • Bandwidth: 1 Gbps
  • IP Support: IPv4 only
  • Protocols: HTTP,HTTPS
  • Update Frequency: Every 6 hours

https://mirrors.thebosshacker.in/termux

If any additional details are required, please let me know. I am happy to provide further information.

Thank you for your attention to this request.

Best regards,
Tbh

Last termux-tools update broke rooting using su (solved)

fifth line in script /data/data/com.termux/files/usr/bin/su

for p in /debug_ramdisk/su sbin/su /system/sbin/su /system/bin/su /system/xbin/su /su/bin/su /magisk/.core/bin/su
.......................................................^
slash is missing at the beginning of '/sbin/su' !

happy new year 2024 HuskyDG :-)

New mirror: mirrors.rda.run

Hello,

I've created a new Termux mirror on my home lab (next to my AlmaLinux mirror), and I want to share it publicly.

  • Hostname: mirrors.rda.run
  • Supported protocols: https
  • Update schedule: 0 * * * *
  • Connectivity: 500Mbit/s
  • Provided by: Rodrigo de Avila
  • Contact: [email protected]
  • Country: BR
  • City: Brochier
  • Protocols: IPv4 and IPv6 (Behind Cloudflare)

Please let me know if you have any questions. Thanks!

New Mirror in Vietnam

I'm setting up and syncing a new mirror, details are as follows:

Hostname: mirrors.nguyenhoang.cloud
Supported protocols: https only (for now, I'm working on providing rsync)
Update schedule: Twice a day (53 */12 * * * GMT+7)
Connectivity: 1Gbit/s
Provided by: Nguyen Hoang
Contact: [email protected]
Country: VN
City: Hanoi
Protocols: IPv4 Only

Please check and implement. Thank you.

Adding mirror.quantum5.ca to the official mirror list

Hi! I am running a mirror for termux in Toronto, Ontario, Canada, and I would like it to be added to the official mirror list:

Mirrors by @quantum5

Hosted in Toronto, Ontario, Canada and updated four times a day.

Repository sources.list entry
Main deb http://mirror.quantum5.ca/termux/termux-main stable main
Root deb http://mirror.quantum5.ca/termux/termux-root root stable
X11 deb http://mirror.quantum5.ca/termux/termux-x11 x11 main

This mirror should be able to handle 1 Gbps. Let me know if there's anything else you need!

Planned updates

In #1 (comment) @agnostic-apollo suggested some additional improvements. Lets track it in this issue so it is not forgotten:

Another thing I want implemented is a blacklisted mirrors list file that is hosted on fosshost and as fallback on github as well in case its inaccessible, and file possibly signed with our key. This should contain all the mirrors that must not be used or whose domains have been freed or url sub path changed, like bintray, packages.termux.org, kcubeterm.me, recent one, etc. This file should likely automatically be downloaded on termux app start and incrementally as well to $PREFIX/etc/apt/blacklisted-mirrors.list file. The mirrors in these files should be checked by termux-change-repo and excluded from showing and pkg should exclude it too from mirrors group and switch to default mirror if none remain or single mirror is blacklisted.

An additional default mirror site file should also be hosted, that is used by the app to replace any blacklisted mirror from existing apt sources list files so that if user uses apt instead of pkg, then blacklisted mirrors don't get used. The default mirror should also be used by pkg script as default.

With the above, the blacklisted mirrors will be independent of whether users updates termux-tools or the app or has old bootstrap and we hopefully won't get any (or lower) broken mirror issues anymore. Hopefully, fosshost and github will be accessible in all countries. There is of course an ethical issue of pinging either fossthost or github continuously that could be used to track termux users, so users should explicitly opt in with a prompt. The user should also be able to disable this in termux app settings.

We could also download the files in pkg script instead so that app doesn't need to and it doesn't ping in background and only when users wants to update, but then users that may be running apt directly would still remain affected, unless we change relevant apt binaries to a wrapper scripts or patch them to run a script at start, depending on command install/update/upgrade/search.

Application to be added to the mirror list of Termux, from Zhejiang University

We are the mirror maintainers from Zhejiang University, officially supported by the Information Technology Center in our school. We hope to be added to the mirror list of Termux.
Here are some basic information about us:

Mirrors by Zhejiang University

Repository sources.list entry
Main deb https://mirrors.zju.edu.cn/termux/apt/termux-main stable main
Root deb https://mirrors.zju.edu.cn/termux/apt/termux-root root stable
X11 deb https://mirrors.zju.edu.cn/termux/apt/termux-x11 x11 main

Looking forward to seeing our mirror on the official list!

Change in mirror URL

mirror.albony.xyz now uses the domain mirror.albony.in

Please change the mirrorlist accordingly

Thanks

pkg install upgrade is unnable to find a mirror working or all mirrors are down

$ pkg install upgrade
Checking availability of current mirror: /data/data/com.termux/files/usr/bin/pkg: line 43: 15064 Aborted curl --connect-timeout 5 --user-agent 'Termux-PKG/1.0 mirror-checker' --head --fail --location "${current_mirror%/}/dists/stable/Release" > /dev/null 2>&1
bad
Testing the available mirrors:
[] https://dl.bintray.com/termux/termux-packages-24: /data/data/com.termux/files/usr/bin/pkg: line 78: 15066 Aborted curl --connect-timeout 5 --user-agent 'Termux-PKG/1.0 mirror-checker' --head --fail --location "${mirrors[$w]%/}/dists/stable/Release" > /dev/null 2>&1
bad
[
] https://grimler.se/termux-packages-24: /data/data/com.termux/files/usr/bin/pkg: line 78: 15071 Aborted curl --connect-timeout 5 --user-agent 'Termux-PKG/1.0 mirror-checker' --head --fail --location "${mirrors[$w]%/}/dists/stable/Release" > /dev/null 2>&1
bad
[] https://main.termux-mirror.ml/: /data/data/com.termux/files/usr/bin/pkg: line 78: 15074 Aborted curl --connect-timeout 5 --user-agent 'Termux-PKG/1.0 mirror-checker' --head --fail --location "${mirrors[$w]%/}/dists/stable/Release" > /dev/null 2>&1
bad
[
] https://termux.mentality.rip/termux-packages-24: /data/data/com.termux/files/usr/bin/pkg: line 78: 15077 Aborted curl --connect-timeout 5 --user-agent 'Termux-PKG/1.0 mirror-checker' --head --fail --location "${mirrors[$w]%/}/dists/stable/Release" > /dev/null 2>&1
bad
Using fallback mirror: https://termux.org/packages
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package upgrade

(it's incapable of connect with the pages. it runs out of time every single attempt (I'm new on termux but it worked the last time I used it. Maybe I'm to inexperienced to know what's happening))

[Bug]: dalvikvm script needs to be updated for Android 11

Problem description

The default time to run a .dex Java/.class file when invoking the dallvikvm script takes close to 4 seconds

I made a run on my own version of javap and here are the results
[/data/data/com.termux/files/home] 127
-> time dalvikvm props.javap htel.Ssi
Compiled from: htel.Ssi
public class htel.Ssi extends java.lang.Object {
java.io.BufferedInputStream bi;
java.io.BufferedOutputStream bo;
java.io.BufferedReader br;
java.io.InputStream i;
java.lang.String inputname;
java.lang.String name;
htel.Ssi next;
public java.io.OutputStream o;
java.io.PrintWriter pw;
boolean t;
static java.lang.String lock;
public htel.Ssi(java.io.InputStream);
public htel.Ssi(java.io.OutputStream);
public static void msg(java.lang.String);
private int read(byte[], int, boolean) throws java.io.IOException;
public void add(htel.Ssi);
public void close() throws java.io.IOException;
public void dump(byte[], int, int);
public void flush();
public java.lang.String name();
public void name(java.lang.String);
public void println(java.lang.String);
public int read(byte[]) throws java.io.IOException;
public int read(byte[], int) throws java.io.IOException;
public java.lang.String readLine() throws java.io.IOException;
public void readN(byte[]) throws java.io.IOException;
public void trace(boolean);
public boolean trace();
public void write(byte[]) throws java.io.IOException;
public void write(byte[], int, int) throws java.io.IOException;
}

real 0m3.807s
user 0m8.591s
sys 0m0.598s

So I modified dalvikvm script to add
-Xnoimage-dex2oat
And the performance is back to
real 0m0.603s
user 0m0.457s
sys 0m0.140s

The default on the binary /system/bin/dallvikvm on Android 11 has changed to generate an OAT file on every invocation which is not needed when simply running a .dex/.class file.

I compared older versions of /system/bin/dallvikvm and found out that the -Xnoimage-dex2oat was in fact the default.
However on some Android 11 it is not

Steps to reproduce the behavior.

Write any Hello hello world in Java
Use ecj to get .class file
Use dx to make a .dex file
Add dex file to CLASSPATH
use dalvikvm mypackage.Hello

What is the expected behavior?

Subsecond response time instead of 3.8 seconds

System information

  • Termux application version:
    Termux Variables:
    unsupported
    Packages CPU architecture:
    aarch64
    Subscribed repositories:

sources.list

deb https://packages.termux.dev/apt/termux-main/ stable main

x11-repo (sources.list.d/x11.list)

deb https://packages.termux.dev/apt/termux-x11 x11 main
Updatable packages:
Listing...
curl/stable 7.85.0 aarch64 [upgradable from: 7.84.0]
inetutils/stable 2.3-1 aarch64 [upgradable from: 2.3]
libcurl/stable 7.85.0 aarch64 [upgradable from: 7.84.0]
libevent/stable 2.1.12-2 aarch64 [upgradable from: 2.1.12-1]
libexpat/stable 2.4.8-1 aarch64 [upgradable from: 2.4.8]
openssl/stable 3.0.5 aarch64 [upgradable from: 3.0.3-1]
termux-tools version:
1.29.1
Android version:
12
Kernel build information:
Linux localhost 5.10.66-android12-9-24537318-abA536USQU2AVG2 termux/termux-app#2 SMP PREEMPT Wed Jul 20 23:14:17 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A536U

  • Android OS version: 11
  • Device model: samsung:SM-A536U

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.