Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include A Terminal Emulator #23

Open
Deerp1976 opened this issue Jun 21, 2020 · 19 comments
Open

Include A Terminal Emulator #23

Deerp1976 opened this issue Jun 21, 2020 · 19 comments
Labels
Feature New feature or request Priority: 3

Comments

@Deerp1976
Copy link

Including a Terminal Emulator would be very useful even if you haven't got root.

My Huawei phone will not even allow me to check the build.prop from within the system folder as they have encrypted it but I can view it by running the script for it.

This also give you the possibility for logcat viewing, netstat etc.

@nerd190
Copy link

nerd190 commented Jun 21, 2020

I don't really agree with this, it should be purely App Manager based, terminals are for so much more than viewing file names in certain directories.
Every phone has a 'shell', think of this as a built-in terminal that you don't see, when an app does something, it talks to the shell. Hence, this app doesn't need a terminal to cat / ls files, it already has that capability without a terminal. (to the best of its unpriviliged capabilities, this is Android!)
You asked to use different file managers you say can view these, that will solve your problem.
Unless, like me, you root your device or ADB root to turn off selinux may also help you.

@Deerp1976
Copy link
Author

I don't really agree with this, it should be purely App Manager based, terminals are for so much more than viewing file names in certain directories.
Every phone has a 'shell' think of this as a built-in terminal that you don't see, when an app does something, it talks to the shell, hence this app doesn't need a terminal to cat/ls files, it already has that capability without a terminal.
You asked to use different file managers already, that will solve your problem, unless you root like me / ADB root to turn off selinux.

I wish I could root my phone but Huawei had stopped giving out bootloader unlock codes years ago and as yet I have found no way to root.

Your points are valid I understand them. It is an application Manager not a systems manager. I suppose I was just being greedy in wanting everything fitted into 1 app!

This app has already taught me quite a bit. Will be good to see how it progresses.

@nerd190
Copy link

nerd190 commented Jun 21, 2020

No it is a valid point you make, as a terminal can achieve stuff related to app management, but what I mean is an app doesn't need a terminal built-in to view the stuff you can in a terminal, as it can ask the shell that is built-in to your device for these things. E.g, listing apps, files, getting stats etc.

@Deerp1976
Copy link
Author

OK I think I understand you now! Technically I am very much an amateur. A very willing to learn but still very much just learning the basics!

Yes FX File Explorer has a script executor built in so understand you don't need a Terminal Emulator to run scripts etc. It's amazing what you can find out about the apps you have installed. This app informed me that a system app I have called Game Assistant which is a Huawei exclusive app has files and odex which is not suitable for my phone.

@nerd190
Copy link

nerd190 commented Jun 21, 2020

OK I think I understand you now! Technically I am very much an amateur. A very willing to learn but still very much just learning the basics!

No problem, we all start somewhere, compared to @MuntashirAkon ... I'm a big noob! we are all constantly learning!!

Yes FX File Explorer has a script executor built in so understand you don't need a Terminal Emulator to run scripts etc.

Exactly! so what FX file manager is doing is running that script on the shell (mksh) that is built-in to your device, no terminal needed.

@MuntashirAkon
Copy link
Owner

Terminal emulators like Termux are beyond the scope of this project, I think, mostly because I'm trying to make the size of the app as small as possible. But a simple terminal emulator (like the one TWRP has) doesn't take much space, and I'm already using Android Shell library. So, it should not increase the app size that much. I'll add an wontfix label for now but I may consider it in future.

@MuntashirAkon MuntashirAkon added Feature New feature or request Status: Rejected This will not be worked on labels Jun 22, 2020
@UltraBlackLinux
Copy link

Would It be possible to just open the non disabled terminal emulator, like many music apps open the equalizer? I really need termux to run...

@MuntashirAkon
Copy link
Owner

Would It be possible to just open the non disabled terminal emulator, like many music apps open the equalizer?

Yes, it's not difficult to add an option more Termux (if installed) in the main menu. But why would you want to run Termux from App Manager instead of your launcher? What are the advantages of such feature?

@MuntashirAkon MuntashirAkon added Status: Pending The issue is not yet accepted and removed Status: Rejected This will not be worked on labels Jul 25, 2020
@UltraBlackLinux
Copy link

Why do Many Music players open the Installed equalizer? Cause they are to lazy to make one by temselves or want guarantee a working one. This is also the case here: We need a terminal emulator, but since many ppl like termux and you dont wanna add it to app manager cause its to big, just add a button that opens termux.

@MuntashirAkon MuntashirAkon removed the Status: Pending The issue is not yet accepted label Jul 25, 2020
@Atrate
Copy link
Contributor

Atrate commented Jul 25, 2020

Suggestion: to make the terminal opening actually useful, maybe include a function like "open termux session as app" (su - u0_a200 for example)

@MuntashirAkon
Copy link
Owner

Suggestion: to make the terminal opening actually useful, maybe include a function like "open termux session as app" (su - u0_a200 for example)

This will go in the App Info tab, I believe.

@MuntashirAkon MuntashirAkon reopened this Jul 26, 2020
@MuntashirAkon
Copy link
Owner

MuntashirAkon commented Jul 26, 2020

There are two options:

  1. From what I understand from Termux' wiki Intents and Hooks, I need to create an script somewhere in the shared file system (or within Termux' $HOME) and symlink it to $HOME/bin/termux-url-opener (create bin folder if not exists). This script should contain the following texts:

    #!/bin/sh
    file=$1
    exec su - u0_a$(cat ${file})

    In which case, I'll need to Intent.ACTION_SEND the ${file} as Intent.EXTRA_TEXT (or any other methods). This is a hacky and root-only method but it's guaranteed to work.

  2. Using com.termux.permission.RUN_COMMAND as described here. But the problem with this method is that the users have to set allow-external-apps property to true in Termux config.

Update: I'll go with no. 2. If the users need this feature, they have to set allow-external-apps = true in ~/.termux/termux.properties.

@MuntashirAkon
Copy link
Owner

MuntashirAkon commented Aug 3, 2020

It seems Termux' has several issues with com.termux.permission.RUN_COMMAND, especially the current release (v0.95) is mostly broken since RUN_COMMAND_ARGUMENTS doesn't actually work (see termux/termux-app/pull/1679). I'm posting related code below for future reference:

        Intent intent = new Intent();
        intent.setClassName("com.termux", "com.termux.app.RunCommandService");
        intent.setAction("com.termux.RUN_COMMAND");
        intent.putExtra("com.termux.RUN_COMMAND_PATH", "/data/data/com.termux/files/usr/bin/login");
        intent.putExtra("com.termux.RUN_COMMAND_ARGUMENTS", new String[]{"su", "-", "u0_a110"});  // Replace u0_a110 with actual user assigned to a package
        intent.putExtra("com.termux.RUN_COMMAND_BACKGROUND", false);
        try {
            startService(intent);
        } catch (Exception e) {
            e.printStackTrace();
        }

As stated in the previous comment, it requires allow-external-apps=true in ~/.termux/termux.properties. In my end, the permission com.termux.permission.RUN_COMMAND has to be declared and requested like any dangerous permission.

@MuntashirAkon
Copy link
Owner

I also propose run-as option for debuggable apps which doesn't require root.

@MuntashirAkon
Copy link
Owner

It looks like a simple terminal emulator does have some use case (like the one in ADBungFu), especially for ADB users. The terminal emulator will be very simple with no completion support.

@MuntashirAkon
Copy link
Owner

YEAH I WANT THIS FEATURE INSTEAD OF I PAY THAT GOD DAMN LADB APP ON PLAYSTORE 😤

Please don't be so rude to a developer. Developers are human beings, therefore, they need money to live a life, and opening a play store account costs $25 which is a lot of money in most countries. That being said, LADB is a copy-lefted, free and open-source software just like App Manager. You can build the app from source or ask the developer to publish it on F-Droid.

@ghost
Copy link

ghost commented Mar 31, 2021

YEAH I WANT THIS FEATURE INSTEAD OF I PAY THAT GOD DAMN LADB APP ON PLAYSTORE 😤

Please don't be so rude to a developer. Developers are human beings, therefore, they need money to live a life, and opening a play store account costs $25 which is a lot of money in most countries. That being said, LADB is a copy-lefted, free and open-source software just like App Manager. You can build the app from source or ask the developer to publish it on F-Droid.

Yeah i mean i don't want to pay i don't have enough money

So if i can't i should searching alternative

First i tried to use brevent apps

BUT idk
Cmd feature are paid or not

And 2nd i tried using terminal emulator but is looks like not working :(

@MuntashirAkon
Copy link
Owner

Yeah i mean i don't want to pay i don't have enough money

As I said, LADB is a FOSS app if you can't buy it or build the app yourself, just write an email to the developer describing your financial condition. I'm sure he'll help.

@ghost
Copy link

ghost commented Mar 31, 2021

Yeah i mean i don't want to pay i don't have enough money

As I said, LADB is a FOSS app if you can't buy it or build the app yourself, just write an email to the developer describing your financial condition. I'm sure he'll help.

for everyone sorry if i too rude it's not my intention at all

i only want to say if i cannot purchase i won't crack a tools or any product is a sin to me :(

welp i want to send mail soon :( mommy

@MuntashirAkon

@MuntashirAkon MuntashirAkon added the Status: Pending The issue is not yet accepted label Mar 15, 2022
@MuntashirAkon MuntashirAkon removed the Status: Pending The issue is not yet accepted label Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Priority: 3
Projects
None yet
Development

No branches or pull requests

5 participants