blanboom / mobileterminal

Automatically exported from code.google.com/p/mobileterminal
0 stars 0 forks source link

SVN Download and Install not easy for amateur hacker. #245

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download svn "mobileterminal-read-only"
2. open branches/applesdk/MobileTerminal/MobileTerminal.xcodeproj in xcode
3. Figure out how to make a self-siging private key in Keychain
4. Change Code Signing Identity in xcode Edit Project Settings
5. add _ALLOWED, _REQUIRED entries in iphoneOS.platform info file
6. download gen_enbtitlements.py and place in required path
7. create "iPhone Developer" certificate for distribution
8. move Terminal.app onto iPhone

What is the expected output? What do you see instead?

Expect Terminal to run on my iPhone

Instead it displays a bunch of text, throws two dumps, and dies.  
Crash reporter files:
https://files.me.com/fleason/xrvkbv
https://files.me.com/fleason/s60u23

What version of the product are you using? On what operating system?

SVN download as of 9:00am CST, Sunday 9 January 2011; Compiled on Mac OS 10.6.6 
2.8 GHz Intel Core i7 16 GB 1067 Mhz DDR3; xcode version 3.2.3.

Please provide any additional information below.

At your urging, I would like to test the most recent version of the 
application.  I never compiled code using xcode before.  Emulator worked fine.  
Tried to make a versions for device.  Not as easy as you would think.  

But I love what you have done with the app.

Original issue reported on code.google.com by fredleason@gmail.com on 11 Jan 2011 at 12:56

GoogleCodeExporter commented 8 years ago
Thanks for the detailed bug report and crash logs.  Sounds like you're doing 
everything right and I assume that there is just a bug somewhere in 
MobileTerminal given the stack trace.  I have yet to test this program on a 
real device, and only ever really run it on the Simulator so perhaps we're 
hitting a difference between the two.

Notably, I recently fixed a bug on the simulator that was causing random 
crashes like this http://code.google.com/p/mobileterminal/source/detail?r=476 
so maybe it is similar.

Original comment by allen.po...@gmail.com on 12 Jan 2011 at 5:28

GoogleCodeExporter commented 8 years ago
I had a similar problem, build, copy to the device and screens of error 
messages followed by a program exit. I'm using a 3G and iOS 4.2.1

In my case I tracked the problem down to the start_process function in 
SubProcess.m returning -1 before being able to execve. start_process thought 
that I didnt have permissions to execute /usr/bin/login even though I did.

For me a code change was required. The stat_hack function in SubProcess.m didnt 
set any of the passed in stat structs members. The memcpy on line 31 appears to 
have the parameters in the wrong order, I believe the intent is to copy the 
contents of buf (which contains the result of the stat() function) into the 
passed in stat structure. The memcpy on line 31 copies the contents of the 
passed in stat instance (st) into buf, which isnt used. If you change line 31 
to:

memcpy(st, buf, sizeof(struct stat)); 

Then everything worked for me. On my device, the unitialised value of the st 
variables st_mode member is such that the permission check on line 47 always 
evaluates to zero returning -1 from start_process, meaning the execve on line 
51 never runs. Then I get a whole bunch of "you forked but didnt exec" errors. 

Presumably the reason it worked on the emulator is related to the different 
unitialised st_mode value, which in my case was always sufficient to allow the 
permission check to succeed.

Original comment by Aaron.Cu...@gmail.com on 13 Jan 2011 at 1:32

GoogleCodeExporter commented 8 years ago
Thanks for debugging, ill make the code change.

Original comment by allen.po...@gmail.com on 13 Jan 2011 at 3:41

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r492.

Original comment by allen.po...@gmail.com on 13 Jan 2011 at 4:52