[Q] I need help with -bash. Can't do anything in Terminal - General Questions and Answers

Whenever I start up terminal I get this:
Last login: Mon Nov 1 22:30:20 on ttys000
-bash: {PATH}:/Users/Joshmchau/Documents/Android/android-sdk_r07-mac_x86/android-sdk-mac_x86/tools: No such file or directory
JMCMBP:~ Joshmchau$
I can't exit -bash at all and I don't know what I'm doing. Pelase help

Related

Mac Terminal problems

Hey, dunno if this is the right place, but help is appreciated. (posted on mac forums, but figured it can't hurt to have more input)
I'm on a 10.6.3 MBP.
Every time I open up terminal, this shows up
Code:
Last login: Mon Jun 7 23:46:54 on ttys001
-bash: sdkfolder: No such file or directory
xxxx-xxxxxs-MacBook-Pro:~ xxxxxx$
why is that -bash line in there?
Also, I cannot run 'sudo' at all. I'm on an Admin account, and I have enabled root permissions.
Code:
xxxxx-xxxxxs-MacBook-Pro:~ xxxxx$ sudo su
-bash: sudo: command not found
Thanks in advance.

[Q] Changing CID

So I'm on rogers trying to change my CID. When I used the one click all it did was say it couldn't be found. All other batch installers just open up in command prompt and close again..... I have usb debugging turned on and I have it in charge only. My current RUU is 1.73. My boot loader is unlocked and I am rooted.
I've even tried the Linux tool and it all it did was say ./adb was not valid.
Sorry if If I'm being a complete idiot here but I want to start trying custom roms...
bobruels44 said:
So I'm on rogers trying to change my CID. When I used the one click all it did was say it couldn't be found. All other batch installers just open up in command prompt and close again..... I have usb debugging turned on and I have it in charge only. My current RUU is 1.73. My boot loader is unlocked and I am rooted.
I've even tried the Linux tool and it all it did was say ./adb was not valid.
Sorry if If I'm being a complete idiot here but I want to start trying custom roms...
Click to expand...
Click to collapse
For the Linux tool (which I wrote), you downloaded the file, extracted the archive, opened a terminal window IN the archive folder, typed "chmod +x toolbox.sh" <enter> and then "./toolbox.sh" <enter>?
If so, try going back to the terminal window and typing "chmod +x adb" <enter> and then "./toolbox.sh" <enter>
HTH,
Billy
Sent from my HTC One X using Tapatalk 2
yes that is what I did and all it did was say /adb is not a valid command...
I was in the correct directory as I could open the tool,
then when installing the drivers for example all it said was
\adb is not a recognized command
Almost done, please reboot your computer now....
bobruels44 said:
yes that is what I did and all it did was say /adb is not a valid command...
I was in the correct directory as I could open the tool,
then when installing the drivers for example all it said was
\adb is not a recognized command
Almost done, please reboot your computer now....
Click to expand...
Click to collapse
JeepFreak said:
If so, try going back to the terminal window and typing "chmod +x adb" <enter> and then "./toolbox.sh" <enter>
Click to expand...
Click to collapse
The above should work, but if not, try downloading the tool again and starting from the beginning. I made a small change that might help. Were you using the SuperCID script or the One XL Toolbox?
http://www.slicky.net/code/onexl/OneXL-Toolbox.tar.gz
http://www.slicky.net/code/onexl/SuperCID-OneXL.tar.gz
HTH,
Billy
Ive tried both actually.
Here is the error message from the tool box..
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
cp: cannot stat `tmp/mmcblk0p4': No such file or directory
xxd: tmp/mmcblk0p4: No such file or directory
grep: tmp/mmcblk0p4.txt: No such file or directory
grep: tmp/mmcblk0p4.txt: No such file or directory
grep: tmp/mmcblk0p4.txt: No such file or directory
We don't recognize your current CID. If you're sure that your
phone is the S4 version, HTC One XL, contact me on XDA and I
will see if I can get you going.
I am rooted and the bootloader is unlocked.....
Could it be because I'm still S-ON? I just kinda figured that everyone was still S-ON.....
Edit:
There is a HIGH chance I'm being an idiot and missing something stupid...
bobruels44 said:
Ive tried both actually.
Here is the error message from the tool box..
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
./adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
cp: cannot stat `tmp/mmcblk0p4': No such file or directory
xxd: tmp/mmcblk0p4: No such file or directory
grep: tmp/mmcblk0p4.txt: No such file or directory
grep: tmp/mmcblk0p4.txt: No such file or directory
grep: tmp/mmcblk0p4.txt: No such file or directory
We don't recognize your current CID. If you're sure that your
phone is the S4 version, HTC One XL, contact me on XDA and I
will see if I can get you going.
I am rooted and the bootloader is unlocked.....
Could it be because I'm still S-ON? I just kinda figured that everyone was still S-ON.....
Edit:
There is a HIGH chance I'm being an idiot and missing something stupid...
Click to expand...
Click to collapse
Hmmmm... type "ls -l" <enter> from a terminal in the toolbox directory. (That's "LS -L", but lower case, btw). Copy and paste the output here.
Billy
@ubuntu:~/Desktop/OneXL-Toolbox$ ls -l
total 2922
-rw-rw-r-- 1 casey casey 82 May 23 18:13 51-android.rules
-rwxrwxr-x 1 casey casey 159644 May 9 09:34 adb
-rw-rw-r-- 1 casey casey 42916 May 6 01:36 apstacon.conf
-rw-rw-r-- 1 casey casey 2005736 Dec 28 22:32 busybox
-rw-rw-r-- 1 casey casey 42940 May 6 01:36 hostapd_default.conf
-rw-rw-r-- 1 casey casey 136 May 25 20:41 README..txt
-rw-rw-r-- 1 casey casey 91980 May 7 22:23 su
-rw-rw-r-- 1 casey casey 570342 May 7 22:22 Superuser.apk
-rw-r--r-- 1 casey casey 12288 May 22 19:14 telephony.db
-rw-r--r-- 1 casey casey 12288 May 23 19:51 telephony.db.virgin
drwxrwxr-x 2 casey casey 1024 May 28 16:14 tmp
-rwxrwxr-x 1 casey casey 15101 May 29 08:48 toolbox.sh
-rwxrwxr-x 1 casey casey 9947 May 28 09:25 undo-toolbox.sh
-rw-rw-r-- 1 casey casey 4436 May 6 01:33 WCNSS_qcom_cfg_default.ini
-rw-rw-r-- 1 casey casey 351 May 23 10:50 wpa_supplicant.conf
Oh, you know what... I bet you need to install the ncurses library. Do you know how to do that? If not, what package manager do you use (rpm, yup, aptitude, etc)? Or what Linux distribution are you running?
Billy
Sent from my HTC One X using Tapatalk 2
I use ubuntu...
I'm not familiar with those... my knowledge of Linux is really based down to school uses where they get mad if you start installing software. However I am familiar with a command prompt so I'm only mostly useless
bobruels44 said:
I use ubuntu...
I'm not familiar with those... my knowledge of Linux is really based down to school uses where they get mad if you start installing software. However I am familiar with a command prompt so I'm only mostly useless
Click to expand...
Click to collapse
HAHA. Is it a 64 bit system? If so, try this:
"sudo apt-get install ia32-libs" <enter>
If not, LMK,
Billy
Download this Guide ...
Try downloading the Guide from the first post in the following link:
http://forum.xda-developers.com/showthread.php?t=1678308
Go to Step 2 on Page 10.
Peter

Dropbear ssh server and keys

I know how to use ssh with keys on my Linux pc. I read http://wiki.cyanogenmod.com/wiki/Howto:_Connect_to_Device_with_SSH and did it similar as mentioned. Similar because I had ssh-access already, I only want to limit access to keys.
Code:
ls -lahR /data/dropbear
/data/dropbear:
drwxr-xr-x 1 root root 2.0K Sep 2 18:43 .
drwxrwx--x 1 system system 2.0K Sep 2 18:29 ..
drwx------ 1 root root 2.0K Sep 2 18:42 .ssh
-rw------- 1 root root 458 Sep 2 18:43 dropbear_dss_host_key
-rw------- 1 root root 426 Sep 2 18:43 dropbear_rsa_host_key
/data/dropbear/.ssh:
drwx------ 1 root root 2.0K Sep 2 18:42 .
drwxr-xr-x 1 root root 2.0K Sep 2 18:43 ..
-rw------- 1 root root 389 Sep 2 18:37 authorized_keys
authorized_keysn contains the public key of my pc.
When I connect, I am asked for the password, which can be seen in the Dropbear settings. Did I fogert something to configure with the Dropbear app?
Hi,
From the dropbear -h:
-s Disable password logins
This means you have to run "dropbear -s" to start the ssh daemon.
If you try to connect without a key (or with an incorrect one) you should get "Permission denied" without asking for a password.
Cheers.
wkwkwk said:
Hi,
From the dropbear -h:
-s Disable password logins
This means you have to run "dropbear -s" to start the ssh daemon.
If you try to connect without a key (or with an incorrect one) you should get "Permission denied" without asking for a password.
Cheers.
Click to expand...
Click to collapse
I get from a shell of my pc:
Welcome to DropBear SSH Server!
Permission denied (publickey).
Click to expand...
Click to collapse
# android-phone
# md5sum /data/dropbear/.ssh/authorized_keys
c17fe7f9029970582104c63a43102ad0 /data/dropbear/.ssh/authorized_keys
#linux pc
$ md5sum id_rsa.pub
c17fe7f9029970582104c63a43102ad0 id_rsa.pub
So the keys should be the same
On your Linux PC you need to use the id_rsa *private* key to authenticate, not the public one.
Do you have a file on your PC: ~/.ssh/id_rsa ?
If so, try it like this:
$ ssh -i ~/.ssh/id_rsa ip_of_android
wkwkwk said:
On your Linux PC you need to use the id_rsa *private* key to authenticate, not the public one.
Do you have a file on your PC: ~/.ssh/id_rsa ?
If so, try it like this:
$ ssh -i ~/.ssh/id_rsa ip_of_android
Click to expand...
Click to collapse
Can anyone confirm this? IMO there is never a reason to give away the _private_ key. I want to connect from the pc to the android-phone and I have put the public key of the pc on the android phone. Similar I did it from pc to pc.
I'm not saying to give away the private key, I'm saying to *use it* to connect to android. You seem to try and use the public key to authenticate when you should be using the private key.
To be more exact:
On the PC you need to have (and use): ~/.ssh/id_rsa (private key)
On Android you need to have just the public key: /data/dropbear/.ssh/authorized_keys (which should be identical to the ~/.ssh/id_rsa.pub on your pc).
Also, check the permissions as that's the most common problem:
On your PC:
$ chmod 600 ~/.ssh/id_rsa
On Android:
chmod 755 /data/dropbear
chmod 700 /data/dropbear/.ssh
chown root: /data/dropbear/.ssh/authorized_keys
chmod 600 /data/dropbear/.ssh/authorized_keys
The easiest way to debug would be to launch dropbear on android with -v -F.
It will stay in foreground and be verbose so you can see the error that prevents you from logging in.
Could you please have a look at the md5sum above? I also quoted the permissions at the beginning. Do you see something wrong? I think I did what you said.
Indeed, the permissions look good and the md5 also confirms you have the correct public key.
Try to launch dropbear with -v -F and see what it says when you try to connect. That should give plenty of valuable information.
PS: you are trying to login as root, right?
from your pc:
$ ssh [email protected]

[Q] running busybox/linux comands on boot up

is there a way to run a bash script on startup. i am trying to check the presence of a running program (that uses excessive cpu and drains my battery) then kill the process-id if it is running:
Code:
$ uname -a -m -p
Linux localhost 2.6.35.7-SPH-D710.EL13-CL806482 #2 SMP PREEMPT Tue D
ec 13 02:56:30 KST 2011 armv7l GNU/Linux
$ crontab -l
crontab: must be suid to work properly
$ su -
# crontab -l
crontab: unknown uid 0
# ls /etc/rc.d
ls: /etc/rc.d: No such file or directory
# ls /etc/rc.local
ls: /etc/rc.local: No such file or directory
the bash script runs fine. i am just tired of having to log into connectbot, navigate to the directory, and run the program each time i restart my fone.
schneidz said:
is there a way to run a bash script on startup. i am trying to check the presence of a running program (that uses excessive cpu and drains my battery) then kill the process-id if it is running:
Code:
$ uname -a -m -p
Linux localhost 2.6.35.7-SPH-D710.EL13-CL806482 #2 SMP PREEMPT Tue D
ec 13 02:56:30 KST 2011 armv7l GNU/Linux
$ crontab -l
crontab: must be suid to work properly
$ su -
# crontab -l
crontab: unknown uid 0
# ls /etc/rc.d
ls: /etc/rc.d: No such file or directory
# ls /etc/rc.local
ls: /etc/rc.local: No such file or directory
the bash script runs fine. i am just tired of having to log into connectbot, navigate to the directory, and run the program each time i restart my fone.
Click to expand...
Click to collapse
Put it in init.d folder to run on every boot, if you mean that.
Sent from my GOCLEVER TERRA L70 using Tapatalk
i created this file:
Code:
-rwxr-x--- 1 root shell 612 Jul 13 20:45 /system/etc/init.d/S80kill-acore.ksh
but it doesnt run on bootup.

Toshiba AT100 with Terminal, is some expert able to understand what happens?

Hi all,
I am trying to execute a file named 4 on a tablet Toshiba AT-100 (Android 4.4 not rooted) within Terminal, file has to be moved in the home of the Terminal app but does not cp or mv. Note I have done this without a glitch on various phones NOT rooted, I do not understand why not on the Toshiba AT-100. The file is in /sdcard
>ls /sdcard/4 and the file 4 is there
>ls -al
-rwxrwxr-x root sdcard_rw 95550 2021-11-21 17:00 4
>cd [I move to the dir /data/data/jackpal.androidterm/app_HOME (this should allow to change the execution rights without being root)]
>cp /sdcard/4 .
/system/bin/sh: cp: not found
[************************is it unable to find the command cp or what?]
>mv /sdcard/4 .
failed on '/sdcard/4' - Cross-device link
>cd /sdcard
>./4
/system/bin/sh: ./4: cannot execute - Permission denied
Is anybody able to understand? Maybe Terminal emulator is not working properly, is there any other terminal for Android 4?
Thanks in advance to whomever will explain

Categories

Resources