Mac Terminal problems - General Topics

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.

Related

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

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

Ubuntu 10.10 Up & Running On HTC Inspire 4G

First off i wanna say i take know credit at all for this i did not write the commands and i did not figure out how to do it i found this in the Desire HD thread and figured i would share it with all the HTC Inspire 4G people. This is a very simple process and within minutes your up and running Linux Ubuntu 10.10. Below i will post all the requirements, the steps, and the commands. Enjoy guys and girls and if you need any help with this just post to the Thread. Thanks Donny
Requirements:
​*A rooted HTC Desire HD. For rooting instructions, see how to permanently root HTC Inspire 4G.
*A microSD card with 3 GB or more free space.
*Other custom kernel with LoopBack support
*Ubuntu image and required scripts
*Android Terminal Emulator app (install from the Android Market)
*Android VNC Viewer app (install from the Android Market)
*Before proceeding, move all your apps back to Internal Storage if you have moved them to SD using App2SD.
*An active internet connection on your phone (Wi-Fi is recommended).
Procedure:​
1 – Installing Ubuntu:
*Create a folder called ‘ubuntu’ on the root of your SD card.
Extract the contents of the downloaded Ubuntu.tar file and transfer them to the folder from Step 2.
*Launch Terminal Emulator and enter these commands:
su
pm setInstallLocation 1
cd sdcard/ubuntu
sh ubuntu.sh
bootubuntu
If all goes well, you should see “[email protected]:/#” now, indicating you are now running Ubuntu.
Entering Ubuntu at any time:​
*To enter Ubuntu terminal at any time from now onwards, you only have to launch Terminal Emulator, get su privileges, cd to the ubuntu directory and type ‘bootubuntu’:
su
cd sdcard/ubuntu
sh ubuntu.sh
bootubuntu
Configuring the Gnome Desktop GUI:​
*Now that you have Ubuntu 10.10 running, the next step would be enabling the Gnome Desktop GUI.
*If you aren’t already in the Ubuntu terminal, enter it using the above-mentioned instructions.
*Make sure that your phone’s internet connection is active and enter the following commands. Wait till each one finishes and enter ‘y’ (for yes) to confirm any prompt that you get:
apt-get update
apt-get install tightvncserver
cd /bin
cat >x
rm –r –f /tmp
mkdir /tmp
chmod 777 /tmp
export USER=root
export XKL_XMODMAP_DISABLE=1
vncserver –geometry 1024x800
Press Enter once more after entering the last command.
*Now you must configure your volume-down key as Ctrl in Terminal Emulator. Simply go to Menu > Preferences > Control Key and select Volume-Down key.
*Go back to the command line once done.
*Hold the Volume-Down key and press ‘d’. (This will basically enter Ctrl+D.)
Now enter these commands:
chmod 777 x
x
*This ‘x’ script basically lets you start the Gnome GUI. As this is the first time you are running this script, it will ask you to set a password for the VNC connection. Set a password of your choice.
*It will also ask you to set a password for “view-only” mode, which isn’t required so answer ‘n’ for no.
*Now launch Android VNC Viewer and create a new connection with the following settings:
*Nickname: Anything of your choice.
*Password: The password you set in Step 6.
*Address: localhost
*Port: 5901
*Color format: 24-bit color (4bpp)
*Now click ‘Connect’. In a minute or so, you should see your Ubuntu 10.10 Gnome desktop!!!
Links​
*Get the Ubuntu Files from the link below and install in Utorent
http://www.addictivetips.com/mobile/how-to-install-ubuntu-linux-on-htc-desire-hd/
Sounds funny!But I won't try it now. maybe latter...
Haha...,Up you!
Ice done this already and its definitely cool yo have and could come in useful. Its similar to having what the atrix has.
Sent from my Desire HD using XDA App
We need w7 ROM port yo inspire.
Sent from my Inspire 4G using XDA Premium App
Any phones with.the same hardware currently running it?
Sent from my Desire HD using XDA App
I've followed this guide to the letter and I can't seem to get past the "cat >x" command. I even tried it using ADB remote from my computer, I get the exact same results as when I use the terminal emu.
*Other custom kernel with LoopBack support
How do we find out if the kernel has loopback support?
Can someone get a alternate mirror for the ubuntu image and scripts? the torrent is dead.
I made a quick torrent and i'll seed a bit.
I too wonder about loopback support, how do we find out if our kernel has it (aside from checking the thread, since it didnt come up)
tried with cm7 stock kernel, didn't work
will try with lordmod hd 4.5
download the zip, extract, load torrent.
EDIT:
Okay, it worked with LORDMOD HD 4.5, may work on CM7 also, not sure,
what i did was: (taken from androlinux.com)
root explorer to sdcard/ubuntu
open the bootubuntu script
change the loop1 to loop7 (should be 3 of them to change)
save and exit
su
cd sdcard/ubuntu
sh ubuntu.sh (not sure if thats needed again, but just to be safe, i did it again)
bootubuntu
Also, gnome is nice, but why not run lxde?
sudo apt-get install lxde
etc etc: here: lol http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
The only way to check for loop support is to check config.gz
adb shell
cp /proc/config.gz /data/config.gz
busybox gunzip /data/config.gz
grep CONFIG_BLK_DEV_LOOP /data/config
It will either say y or is not set.
If you are using terminal emulator, you will need to su before typing in the commands.
Sent from my HERO200 using XDA App
dacket84 said:
I've followed this guide to the letter and I can't seem to get past the "cat >x" command. I even tried it using ADB remote from my computer, I get the exact same results as when I use the terminal emu.
Click to expand...
Click to collapse
no space cat>x
then follow the directions.
what if it does not ask for a password i followed all of the steps and when i typed x at the end it never asked me to create a password
Is there a mirror for this file? I'm getting at the most about 10 kbps down and that is just taking forever...
Sent from my Inspire 4G using Tapatalk
Psionfenix said:
I made a quick torrent and i'll seed a bit.
I too wonder about loopback support, how do we find out if our kernel has it (aside from checking the thread, since it didnt come up)
tried with cm7 stock kernel, didn't work
will try with lordmod hd 4.5
download the zip, extract, load torrent.
EDIT:
Okay, it worked with LORDMOD HD 4.5, may work on CM7 also, not sure,
what i did was: (taken from androlinux.com)
root explorer to sdcard/ubuntu
open the bootubuntu script
change the loop1 to loop7 (should be 3 of them to change)
save and exit
su
cd sdcard/ubuntu
sh ubuntu.sh (not sure if thats needed again, but just to be safe, i did it again)
bootubuntu
Also, gnome is nice, but why not run lxde?
sudo apt-get install lxde
etc etc: here: lol http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Click to expand...
Click to collapse
I tried "sudo apt-get install lxde". It appears that the source files are no longer available. "apt-get update" fails also.
any screenshots?
justFaisal said:
any screenshots?
Click to expand...
Click to collapse
+1
justFaisal said:
any screenshots?
Click to expand...
Click to collapse
^^^ what he said...
The code doesn't work for Jellytime?
unCoRrUpTeD said:
The only way to check for loop support is to check config.gz
adb shell
cp /proc/config.gz /data/config.gz
busybox gunzip /data/config.gz
grep CONFIG_BLK_DEV_LOOP /data/config
It will either say y or is not set.
If you are using terminal emulator, you will need to su before typing in the commands.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
I checked for loop and am using JellyTime 4.2 R2 from this link: http://forum.xda-developers.com/showthread.php?t=1778202
I also checked the loopback support and it said yes. I tried changing the loop in the script firl to loop7, but it never generated the file folders. As you can see I did this multiple times to no avail.
Here is the script that was Generated by CMD under ADB Shell:
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\sdk\platform-tools>adb shell
# cp /proc/config.gz /data/config.gz
cp /proc/config.gz /data/config.gz
# busybox gunzip /data/config.gz
busybox gunzip /data/config.gz
# grep CONFIG_BLK_DEV_LOOP /data/config
grep CONFIG_BLK_DEV_LOOP /data/config
CONFIG_BLK_DEV_LOOP=y
# su
su
[email protected]:/ # cd /sdcard
cd /sdcard
[email protected]:/sdcard # cd ubuntu
cd ubuntu
[email protected]:/sdcard/ubuntu # sh ubuntu.sh
sh ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir failed for /data/local/mnt, File exists
←[H←[JUnable to chmod bootubuntu: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
[email protected]:/sdcard/ubuntu # bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1
mount: Device or resource busy
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu[22]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
/system/bin/bootubuntu[23]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu[25]: can't create /data/local/ubuntu/etc/hosts: No such f
ile or directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
127|[email protected]:/sdcard/ubuntu # bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1
mount: Device or resource busy
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu[22]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
/system/bin/bootubuntu[23]: can't create /data/local/ubuntu/etc/resolv.conf: No
such file or directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu[25]: can't create /data/local/ubuntu/etc/hosts: No such f
ile or directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
A Little progress...
I was able to initialize the Ubuntu.sh by granting SU in Terminal Emulator. Now the When I go to update with apt-get update i receive error 404: url not found. This is getting frustrating.
I think I found a fix for the image file because the one that was loaded into the Ubuntu.zip had broken links for the apt-get command on the package links. Here is the link to the thread.
http://forum.xda-developers.com/showthread.php?t=1223128
After i get off of work tonight I will upload a hybrid of the two if it works.

[Q] some linux commands on android are denied

Hi all!
I've just installed terminal emulator but it seems that some commands cannot be used...
ls works very well such as many others...
But when I tried to display the arp cache, i got an error:
Code:
$arp -as
sh: arp: not found
So I ran into the folder where arp is:
Code:
$cd /proc/net/
and then I did this (with a new error):
Code:
$./arp
sh: ./arp cannot execute - Permission denied
Can someone tell me why?
And how to execute such a command on Android?
PS: I also did this with root but nothing has changed
Thanks in advance.
Goot # ?
Are you root?
Type su
Sent from my SGH-T679 using xda app-developers app

[Q] Rooting a Generic 2.3.6 China Phone

Alright everyone, my first time posting on here as I've spent the past two weeks googling and googling and googling and to no avail
I have a very generic China brand Android 2.3.6 phone with an MT6573 ARMv6 processor. It's a great phone for its value (I bought it for under $40) but it has very low RAM and was hoping to use a Swap file on my SD card with SD-Booster in order to improve it's performance. So I've tried every single rooting method I can find, but not of them work for one reason: I cannot ADB anything.... ANYTHING properly.
For example, running psneuter on SuperOneClick gives this output (truncated):
Code:
export TEMPRANDOM=35445;export PS1=END:$TEMPRANDOM;ls -l /system/xbin/su
export PS1=""
/system/xbin/su: No such file or directory
END:35445
export TEMPRANDOM=61084;export PS1=END:$TEMPRANDOM;ls -l /system/bin/su
export PS1=""
/system/bin/su: No such file or directory
END:61084
export TEMPRANDOM=27372;export PS1=END:$TEMPRANDOM;chmod 755 /data/local/tmp/busybox
export PS1=""
Unable to chmod /data/local/tmp/busybox: Not a directory
see, every time I tried to chmod or push or export or any other ADB command, it keeps saying "no such file" or "not a directory" and so I don't know what's going on! Every script I've found on xda requires some ADB command and so I don't even know of zergrush or gingerbreak or psneuter can even work on my phone! I read that it may be due to the wrong ADB drivers, so I've even tried the universal adb driver installer from adbdriver(dot)com and still no dice.
I'm very new to Android and a fast learner, so please, any help or pointers in the right direction would be greatly appreciated! If you need any additional information from/about my phone, please ask and I'll provide.
Thanks in advance.
[can someone delete that post, I made a mistake, sorry q_q]
Also I don't necessarily need a script; some (slightly) detailed instructions on how to manually do it a would do me well too! I'd love to learn!
Update on what I'm doing: I've tried instead to adb with Ubuntu using Wubi. lsusb recognized my device as a Google device and I updated my Android rules file accordingly, restarted udev, but still "adb devices" turns up empty and now lsusb doesn't even recognize my device... this is getting really frustrating
okay, so, I've opened up every .bat script I can find and gone through it line by line, and this is where it fails, every time:
trying to write to the /system/ directory
the following lines of code always fail:
Code:
adb shell "/data/local/tmp/busybox mount -o remount,rw /system"
mount: permission denied (are you root?)
and
Code:
adb remount
remount failed: Operation not permitted
so basically, I'm stuck. without mounting the system directory I cannot get root.... and every time I try to mount, it seems to say I need root and NO WHERE online can I find a way to solve this problem.... here's what I'm running again:
Android version: 2.3.6
Build number ALPS.GB.FDD2.MP.V4.8
Kernel Version: 2.6.35.7 [email protected] #2 Mon Nov 12 18:006:21 CST 2012

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