|
Installation
How to install the Terminal.app package on your iPhone
Status: OBSOLETE This page is outdated and needs to be updated. IntroductionThis page describes the process of installing Terminal.app on your iPhone. This assumes you have already downloaded the latest mobileterminal binary, or built it from source (see Building). You should also have already probably should have installed sshd on your iphone, and have an executable /bin/sh or /bin/login (chmod +x /bin/sh /bin/login). RequirementsBefore you can run the mobile terminal, you need to be able to copy files back and forth to your phone, and be able to set the executable bit on the terminal program (i.e. chmod +x). Most people get files on their iPhone using one or more of the following methods. I prefer sshd and iphonedisk.
InstallationYou should already have a Terminal.app (either from a binary distribution in the Downloads section, or built from make and make package. Terminal.app is just a directory with multiple files including the Terminal binary itself, an Info.plist and some icons. The objective is to copy Terminal.app and its contents to the /Applications/ folder on your iPhone. You must also make sure that the Terminal binary inside the Terminal.app folder has the executable bit set. Here is an example of how to install Terminal.app once you have sshd working. The default password for root on the iphone is documented elsewhere. You should also figure out the IP address of your iphone. It uses DHCP so you can find its IP by going to Settings > General > Network > WiFi > (select the network you are connected to via the blue arrow to the right). Now you should see a list of info on you iPhone/iPod, including your IP Address. The IP for my iphone is 10.0.1.25 in this example. $ scp -rp Terminal.app root@10.0.1.25:/Applications/ If you don't have scp, and copied the files over using iphonedisk or iPhoneInterface, then you will need to manually make the Terminal binary executable. There currently isn't a known way to set permissions using AFC. $ ssh root@10.0.1.25 "chmod +x /Applications/Terminal.app/Terminal" You should also make sure that you have copied over /usr/bin/login, /bin/sh, and whatever other unix tools you will need to make sure they are also executable. See iphone-binkit for a great binary distribution. Really Simple Way
|
Sign in to add a comment
To Install:
1) Extract the Terminal.app folder and place it in /Applications.
2) Reboot iPhone.
And that's it! It'll be on your main screen after the reboot.
Really? You don't have to add the identifier to Springboard's DisplayOrder?.plist?
Nope, guess not. Seems that Springboard lists everything in /Applications, and only uses DisplayOrder? to sort them.
I used jailbreak/iPhoneInterface to putfile Terminal.app in /Applications but it does not show. Do I have to do something special? (yes, I rebooted the iPhone)
Same happened to me so I made a directory called Terminal.app and the few files inside Terminal.app one by one onto the phone and that works but of course I have no terminal
Same happened to me so I made a directory called Terminal.app and the few files inside Terminal.app one by one onto the phone and that works but of course I have no terminal
ya i put the Terminal.app into /Applications using jailbreak and the iphoneinterface but it wouldnt come up. i then tried putting it on my DispliayOrder?.plist and it still didnt work. so then i did what neomuzic did by making the directory on my iphone and then moving the files over but now it comes up but doesnt work :(. please help
ya i put the Terminal.app into /Applications using jailbreak and the iphoneinterface but it wouldnt come up. i then tried putting it on my DispliayOrder?.plist and it still didnt work. so then i did what neomuzic did by making the directory on my iphone and then moving the files over but now it comes up but doesnt work :(. please help
Yea I just did mkdir Terminal.appp and manually put the files in there and that worked, but the terminal is not working. I just see default.png and then it crashes.
Just crashes for me too.
Just crashes for me too.
Ditto that. I added
at the beginning of main() to see if it was actually running, and nothing. But I don't know if it's because it didn't run, or because it couldn't write any of the files. Anyone know if there's any logging facility like console.log, where I could see the result of an NSLog?
Oh, also: does it matter whether the phone is jailed or unjailed when you run mobileterminal?
may be a dumb question but can this be done from a windows based PC?
may be a dumb question but can this be done from a windows based PC?
windowz user, ran iphoneinterface, (already ran jailbreak for custom ringtones), extracted files placed Terminal.app folder in my 'Phonedmg' folder, changed dirs to cd /Applications did a putfile /Applications/Terminal.app iphoneinterface crashed, Terminal.app is listed in the /Applications dir. powercycled iphone, terminal icon not displaying on home screen
windowz user, ran iphoneinterface, (already ran jailbreak for custom ringtones), extracted files placed Terminal.app folder in my 'Phonedmg' folder, changed dirs to cd /Applications did a putfile /Applications/Terminal.app iphoneinterface crashed, Terminal.app is listed in the /Applications dir. powercycled iphone, terminal icon not displaying on home screen
Sounds like people are having trouble getting it to work, but it's working well on my phone. I installed ssh (dropbear) & scp earlier today so I didn't use iPhoneInterface at all. I ssh'ed in to my phone, and typed:
Then I cd'ed to Terminal.app folder (on my computer, not on my phone) and typed:
Then I rebooted and it worked great. I think the key here is that scp preserved the permissions bits on all of the files. I'm guessing that those of you using iPhoneInterface & putfile have incorrect file permissions. This is hard to fix unless you have a way to ssh in, so... go install ssh.
Makes sense, but some folks earlier on #iphone-uikit said permissions don't matter. I couldn't get dropbear to work, either, so I can't try that. Also, if it's really a permissions problem, it's more likely you'd need to set it on the executable Terminal.app/Terminal, not the bundle folder.
How do you
Run: ./configure && make
I figured it out. Just chmod +x the "Terminal" file, and it will work perfectly.
I keep getting errors when I try to copy over the file. If I use iphonedisk, I get error -36. If I use iPhoneinterface I get some long error. In both cases, Terminal.app doesn't copy over.
How do you do this on a mac?
How do you do this on a mac?
Error with iphoneinterface: "Problem with AFCFileRefWrite: 12"
Looks to me like iPhoneInterface does not respect file permissions, meaning that the "Terminal" executable is being copied to the filesystem probably as rw-rw-rw or something like that. Folks using iPhoneInterface (like me) will probably not get this going until someone fixes this. I don't see anyway (without the source code to iPhoneInterface - which I cannot find) to do this.
How about instructions that work?
Hehe, I think the instructions are ok, but I think that iPhoneInterface is not respecting file permissions. Can whomever looks after iPhoneInterface please handle file perms so that we can use it to install apps like this Terminal.app ?
If you just get the background image and then the aoo crashes or freezes, you need to log in to the iPhone via SSH and do this:
chmod +x /Applications/Terminal.app/Terminal
Also, make sure you have the iphone binkit installed. Otherwise, a terminal won't be much use.
Unfortunately, there isn't an API discovered yet for setting executable bits remotely
I can confirm, using sshkit worked for me : Mac host. While installing ssh, mod the com.apple.update.plist file to set the perms on Terminal as well.
How do if find out the ip address of my iphone??
After installing ssh and sftp on my iPhone (see http://pastebin.com/m7abdb007 and http://iphone.fiveforty.net/wiki/index.php/Talk:Dropbear-ssh) I was able to sftp into my phone and put ringtones and drop Terminal.app in the /Applications folder. After setting the permissions like it says above, I was up and running. After you get sftp working, you can just use Cyberduck or another sftp program to move files around instead of jailbreak and iPhoneInterface. I had issues when I changed my root password though. My phone wouldn't boot so I had to wipe it and restart.
@Tim.Smith.HDG - you can find your local ip address by going to Settings > WIFI and tapping the blue arrow on the right of the current network. On this screen are some random networking options and your ip.
I understand most of the pastebin instructions, but I don't know what it means when it says
Run: ./configure && make
How do I run that, and using what?
Hey Guys it Worked like a Charm on my Windows Machine using Dropbear and putty. Here is the link to install the dropbear SSHD so you can use WinSCP or SSH to copy the files to your iPhone. http://cre.ations.net/blog/post/howto-install-ssh-on-your-iphone
Hey Guys it Worked like a Charm on my Windows Machine using Dropbear and putty. Here is the link to install the dropbear SSHD so you can use WinSCP or SSH to copy the files to your iPhone. http://cre.ations.net/blog/post/howto-install-ssh-on-your-iphone
Hey Guys it Worked like a Charm on my Windows Machine using Dropbear and putty. Here is the link to install the dropbear SSHD so you can use WinSCP or SSH to copy the files to your iPhone. http://cre.ations.net/blog/post/howto-install-ssh-on-your-iphone
I have a problem, when running mobile terminal i get a execlp: /bin/login: Permission denied Somebody know how to fix it? thanks
I also get a "execlp: /bin/login: Permission denied" error..... is it because I changed my root password? How can I get this to work? Do I have to rebuild it with my root password? Someone please help.
ssh in to your phone and type "chmod +x /bin/login" to make them executable.
It work thanks.
This is a WONDERFUL app. Thanks for the great work! I think I'll attempt to get involved in the development of some native apps.
This is a WONDERFUL app. Thanks for the great work! I think I'll attempt to get involved in the development of some native apps.
This is a WONDERFUL app. Thanks for the great work! I think I'll attempt to get involved in the development of some native apps.
Awesome job guys, keep it up!
Awesome job guys, keep it up!
Tried to use version 85.
Well I've followed the instructions to the letter now 3 times and this thing doesn't launch. A blank screen come up sometimes you get a glimpse of the keyboard before it bombs back the the home menu!!
I've put the entire contents of the Terminal.app package into the /Applications folder.
I've chmod'ed the Terminal file and confirmed its executable with ls -als
I've checked I have login and sh in my /bin directory and they are +x also
I've rebooted the phone.
I've put the package on with iphonedisk as a mounted volume and I've also tried removing the files and re-copying them across with iphoneinterface in-case there was a problem with using the AFC method (despite it saying its ok above).
I think I've just about covered everything so god knows why I have managed to get a version that doesn't work and the issue not already be covered in all the other posts above !?!?!?
About the only thing I haven't tried is an older version :-(
UPDATE: The only thing I didn't try (above) was an older version :-)
Guess what, the binary 85 version doesn't work.
I just downloaded the 73 version and it worked perfectly. All I did was copy the actual Terminal file into the directory and chmod it, everything else was from the previous 85 folder.
2+ hours I went round in circles with that :-)
I can't get anything to work at all. I tried installing Dropbear using newbreak newb.sh script. Everything ran fine but I still cannot SSH to my iphone.
I used iActivate to jailbreak my phone (which seemed to work successfully).
I tried install phonedisk which mounts my iPhone as a drive. However, there was no /Applications directory so I created one. And then I copied the Terminal.app directory with the 'x' bit set on the Terminal.app/Terminal (v85) binary. Reboot my iphone and still nothing comes up. No terminal. Nothing
I Googled to see if someone else had run into the issues I had and gotten around them but could not find it. What am I don't wrong here? I am missing something?
So far I have used iActivator to jailbreak my phone. I have used phonedisk to drop the Terminal application. I have used newbreak to attempt to install dropbear. So far, the only thing I can do is mount my iphone and look at the directory structure.
I followed instructions for getting dropbear on and that worked.
These are the instructions you need for dropbear (worked for me) http://ellkro.jot.com/WikiHome/InstallingDropbearOSX
You'll need drop bear, because you have to ssh into the iphone and do the chmod on Terminal. Concentrate on getting dropbear to work flawlessly first.
BTW : To the developers : This app is excellent. I really appreciate all the time you are putting in. Maybe you need a PayPal? (or some appropriate donation box) so that we can help fund you guys for a few beers or something.
Build 85 works just fine. You need to know how to jailbreak the phone and copy files to it before you will get this to work. iActivator is not enough, it only jailbreaks for you. You'll need the iPHUC tool. I don't think the iPhoneDisk app will work here.
Try something simple like changing the DisplayOrder?.plist in the SpringBoard?.app. If you can get that to work you have the skills and tools required to install this app.
It really is as simple as copying the app to the Applications directory and setting the eXecute bit on the binary.
I'm having the same problem as tivoland (I think it's the same cause). In earlier versions of mobileterminal /bin/sh is run as default, but in newer versions /bin/login is run first. Turns out the issue for me was a problem with /bin/login.
If I ssh in and run /bin/login manually I get the following error:
dyld: Library not loaded: libarmfp.dylib
Trace/BPT trapI had followed the directions at http://iphone.fiveforty.net/wiki/index.php/Webshell a while back and so had chmod'd /bin/login as setuid (4555). If I run 'chmod 0555' (i.e. no suid), then it runs fine and mobileterminal works great.
@GlowingApple?
Are you saying if I "chmod 0555 /bin/login", this will fix the problem with v85?
Cheers Dave.
P.S. TO ALL USERS
When you submit comments, even though Google throw's up a Server Error, your comments will be posted!
Don't keep submitting or you will end up with multiple entries.
The original poster can delete their own comments, so can you delete the extra entries when this has happened??
My problem is even after getting my iphone mounted, I don't see any of the /Application or /etc directories. When I connect using either iphonedisk or iphoneinterface, I can only see the following directories (I created the Applications directory):
@chriswhite
You are not seeing an open file system.
I think your phone hasn't been jail broken properly.
Search on jailbreak iphone. There too much to explain here in comments.
@tivoland
According to the SVN log, r75 was when the /bin/login code was added. So if it only works with prior revisions, I'm guessing that's the issue. Running 'chmod 0555' might be worth a try. You can run 'ls -l /bin/login' first, and note the permissions (the first field), so if it doesn't work you can always undo the change (post back with the permissions if you need to know the chmod command to revert).
Great. Now I have running terminal, cool. But I want to SSH from my iphone. Did one make a ssh binary? I see everything else under the sun, but no ssh.
Great. Now I have running terminal, cool. But I want to SSH from my iphone. Did one make a ssh binary? I see everything else under the sun, but no ssh.
There is a link to an ssh binary in the requirements section, at http://iphone.natetrue.com
OMG! It WORKS!! I got dropbear on the iPhone using these instructions:
http://pastebin.com/m7abdb007
Then followed these to get OpenSSH on it:
http://www.jeremyjohnstone.com/blog/archives/2007/08/05/howto-run-custom-apps-on-iphone-part-2/
Now I have my Terminal! WONDERFUL!
I'm not very good with unix so USE AT YOUR OWN RISK!
If you are locked out of Wi-Fi (Like I am), or if you don't have SSH setup, you can put the chmod + command into ./etc/rc.local. Restart and it will run at boot. delete rc.local when you're done.
Read up on it to do it right.
your rc.local file should look something like this:
Has anybody tried the /etc/rc.local method to do chmod? I tried creating exactly as stated and nothing happened.
Desparetely tring to find a method to chmod without using ssh...anybody have a clue?
I'm trying to install terminal with the least amount of BSD possible, I only want to be able to 'ls' and 'cd'.
I know I have to include 'login' and I installed 'ls' from the BSD binaries, but I can't find 'cd' to change directory.
Can anybody explain how to get 'cd' working without installing the full BSD subsystem?
thanks.
Add Source installer : http://iphonebaidu.com/app/ Test iPhone - iPhone Simulator : http://iphonebaidu.com/test/ All Software for Apple MAC : http://iphonebaidu.com/mac-iphone/ All Software for Apple iPhone : http://iphonebaidu.com/mac-iphone/iphone.html
Install iTransformy (.swf) view for iPhone : http://iphonebaidu.com/beta/ Forum iPhone : http://iphonebaidu.com/forum/
Copyright © 2008 iPhone Baidu! Inc. All rights reserved
namjam105, you are just a stupid spammer and iphone baidu can get lost.
i have installed the terminal and it's asking me for password... what's the password and login name? help plz??
Same is happening to me on a brand new installation. I've tried root and alpine but no luck.
I've heard that installing SUID Lib Fix from Tweaks 1.1.3 the password problem is solved.
SUID Lib Fix from Tweaks 1.1.3 installed but this didn't fix the problem.
After I installed SUID Lib Fix from Tweaks 1.1.3 it still asks for a password, and when I put in alpine it let me in. I guess the 'fix' is to install the SUID Lib Fix and type the password every time
I'd like to know WHEN the Terminal-207 version will replace the old one svn198??
I have tried running the "top" command but i get an error "Error in host processor sets(): (os/kern) inv I have installed the SUID Lib fix.
I installed 1.1.4 firmware, and it is not possible to download Term-vt100 from Installer (from Conceited Software). So I copied files into iphone using WinSCP. After rebotting I can launch it, but it seems not running with right permissions. Example, I tried chmod 775 /Applications/Terminal.app and I got replied: Operation not permitted or, I try to launch from Term any software inside iphone, and I get: zsh: permission denied What can I try? Thanks
I have a problem to resolve names. e.g. ping www.google.com didn't work. Have anyone an idea? I use MobileTerminal? 207.
"i have installed the terminal and it's asking me for password... what's the password and login name? help plz?? "
Same problem, tried apline and dottie as root
To the ones that cannot login using dottie or alpine: install "SUID Lib Fix" from the "Tweaks (1.1.3)" section in installer, then you can login usig alpine.
I loaded Terminal and followed the instructions. When the phone boots - it appears to be stuck in a loop the littel spoke wheel keeps turning and a message appears on the screen "Edit Home Screen" to rearrange Icons blah blah blah...I hit Dismiss (only option for this error message) and it starts over again. Any program I bring up is terminated once i select something...like dialing the phone and selecting the first digit.
I started Terminal by ssh-ing into the phone. I hit a char and see in my ssh window the following.
2008-03-30 03:28:07.112 Terminal190:d03? Child process id: 191 2008-03-30 03:28:10.444 Terminal190:d03? Reacting to SpringBoard? port death, exiting
In logs I have lots of messages accumulating starting with SpringBoard?.
I deleted Terminal.app directory and contents and rebooted phone....still stuck in a loop seeing the poke wheel turning and this "Edit Home Screen" message.
NO matter what I try with menu and power button I can not get in to restore mode.
iLiberty, ZiPhone? and iTunes do not see the phone attached via USB port. I can easily log into the phone via ssh as root. But.... What can I do to force the phone into restore?
version is 1.1.4
bob
@bob.evans Have you tried to set some password in console mode (ssh, ...) using the "passwd" unix tool ? That's strongly NOT RECCOMENDED. Use some other way, such as openssl, perl/crypt module, cat >> master.passwd << EOT ...
Now, to restore your iPhone, connect it to your mac (or PC). You should press and hold down the sleep/power button and the home button, for about 10 (ten) seconds. After that, while iPhone reboot, you should finger down only the home button till it goes in discovery mode and iTune opens. At last, restore firmware 1.1.4 then use Ziphone or your favorite stuff to unlock your iPhone.
That's all of my 2 cent.
bye!
Thanks cacao74, I did manage to get it out of the loop and restore on sunday....it is tricky in 1.1.4 , takes many attempts. However, I did not realize it was the password changing event that caused this, I thought it was some program I added via Installer loaded by Ziphone. As a result I have broken it so many times now, because, I kept changing the passwords via ssh and "passwd" that I am almost an expert at it getting it to the restore mode. Thanks for helping me understand that that was the cause.
What other advice can I get from you - I have a jar full of pennies. :-) bob evans
I have a problem to resolve names. e.g. ping www.google.com didn't work. Have anyone an idea? I use MobileTerminal?? 207, Please Help
I got the same problem as BenDeese?. When i run the TOP command i have a "Error in host processor sets(): (os/kern) in". Someone no how to fix that problem ?
thanks.
I'm kinda stuck now ... Somewhere around here I've read that I had to chmod u+x /usr/bin/login and /bin/sh . Now whenever I open a terminal I get :
dyld: Library not loaded: libarmfp.dylib Referenced from /bin/sh Reason: unsafe use of relative path libarmfp.dylib in /bin/sh with setuid binary.
I get the same message if I try to ssh to the iPhone, so of course no ssh/sftp/scp to correct the problem.
It looks grim, I just hope someone knows a way around this ??
-- Jeff
I installed the "SUID Lib Fix" from Tweaks 1.1.4 (it's not in 1.1.3) and tried to login as root using alpine and dottie. Didn't work.
can I use this on iPod touch
I didn't use Cydia to install the Terminall version 296. And I copyed 'Terminal.app' to /Applications, then chmod +x /Applications/Terminal.app/Terminal, then reboot iphone, my iphone is version 1.1.4. But when I click the Terminal to run, it appears a black screen with a keyboard, all the configuration function are working well, but I can not see '>' or '#', and can not input anything, why? Please help.
I have 1.1.4 iphone with Terminal installed. When i open the terminal, i am logged in as Mobile user. Trying to become root with alpine or dottie throws error 'su: incorrect password'. I used to do this with 1.1.2 firmware. After upgrade to 1.1.4, i am seeing this issue. I have also installed the "SUID Lib Fix" from Tweaks 1.1.4. Any suggestions are most welcome.
I had the same problem with a blank screen with the keyboard appearing after I upgraded to Terminal v296. It turns out the colors somehow got set to black on black with a zero alpha value. To fix this, you can go into the config menu and change the colors for each terminal, or better yet, just delete /private/var/mobile/Library/Preferences/com.googlecode.mobileterminal. and they will be recreated with reasonable defaults for the colors the next time you run terminal.
I'm trying to use chmo +x swifi to fix wifi problem in my iphone, but i'm getting 'operation nor permited' How can I use Terminal in 'root mode'?
This really needs to be in the appstore (even it we do slim it down to just a ssh client), I NEED ssh :P and you know it would be a top 20 app.
I'm trying to use this on my jailbroken 3G iPhone and I'm having problems. Here's what I've done:
I must admit, I'm at a loss. Any ideas?
Can someone please help??? Cydia never works
thanks christopher.ellwood, no more black screen :-)
Thanks, christopher.ellwood. To be honest, this solution didnt work for me. Nothing happend when I deleted files. So, I've manually set colors.
catfacts3192 wrote:
> This really needs to be in the appstore (even it we do slim it down to just a ssh client), I NEED ssh :P and you know it would be a top 20 app.
There are ssh apps in the store
Guys pls listen and help.I installed mobileterminal and ssh from cydia and dtunes too,plsssssss with wat I have how can I get it to work.
Deleting the file to solve the "invisible characters" issue (to check if that's your case, try typing ls<enter> and see if some blue stuff appears), but it has to be done with the Terminal app closed (which is tricky, it stays open when you hit the home button).
So what worked for me:
Reboot the iPhone ssh to it (DO NOT open Terminal.app) rm /private/var/mobile/Library/Preferences/com.googlecode.mobileterminal.plist
and then open Terminal.
Thank you commenters for help, and developers for Terminal.app!
Does your phone need to be jailbroken for this?
i just upgraded my iphone from 2.2 to 2.2.1 and for some reason the 'vi' command isn't working and i'm getting an error msg: " -sh: vi: command not found " :( does that mean i need to install some packages or change the shell to run vi? plz help....thanks
I also just upgraded my iPhone to 2.2.1. I installed mobileterminal through Cydia. After reboot, I tried running Terminal but I just get a black screen with the keyboard. The floating menu works but I don't see anything from the terminal itself. I've changed the root password previously. Does that matter?
help -sh: syntax error near unexpected token 'new line'
Does anyone have this working under 3.0? For me it crashes while opening. I tried to launch it over ssh and got the following: dyld: lazy symbol binding failed: Symbol not found: UIApplicationUseLegacyEvents
dyld: Symbol not found: UIApplicationUseLegacyEvents
Trace/BPT trap
Weird, after I login into the root account, only the forlder Library and Media are displayed. Any solutions? I can acess everything via iphonebrowser, and my fone is jailbreaked.
it is strange, i can SSH in just fine from my computer... but the app loads to Black screeen on the phone. the touch menus shows up, but no text.