Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 10, 2013, 02:15 AM   #1
apmwnq
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
app idea "abstracted *nix environment without jailbreaking "

after realising just how much of a mess jailbreaking is , i am here to start an initiative for a community developed terminal app for ios which is essentially a *nix system being emulated over ios which has its own filesystem , an emulated kernel perhaps , basically a VMish *nix environment with its own guts (hence no jailbreaking required )
i am not talking about a dang ssh app thingies that are out there already , you all know they don't quite cut it .

and since this will be no different than a game with an abstracted environment of its own
apple shouldn't be anal about letting us put it on the app store

note : this thread should for now be a discussion/contemplating ground but make no mistake about it , i am serious and i believe this will actually in the end materialize into something that will finally let you have a full even if emulated *nix environment on them i-devices of yours .


----------

as for the licencing , since this is a community project i have chosen the 3 clause BSD license for it , if you wanna join the project please pm me with the details about your contribution and i'll add you on the project on google code
i need contributors here please
we now have a google code project page please contribute there as we move forward
https://code.google.com/p/abstractedtty/

Last edited by apmwnq; Sep 10, 2013 at 07:34 AM. Reason: added project's google code page url
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 02:25 AM   #2
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by apmwnq View Post
i am serious and i believe this will actually in the end materialize into something that will finally let you have a real even if emulated *nix environment on them i-devices of yours .
How is it real if it's emulated? Surely running an emulation with it's own fake file system isn't useful for anything but playing around.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 02:39 AM   #3
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by subsonix View Post
How is it real if it's emulated? Surely running an emulation with it's own fake file system isn't useful for anything but playing around.
well real *nix environment as in has all the *nix goodies , i should rephrase perhaps a " full *nix environment " would make it clearer .

and running it as an emulated environment is a limitation inflicted on us by apple's app store rules and besides "mobile termianl " exists as a real tty but requires jailbreaking hence defeating my purpose .

and yes this app is intended for playing around but then again you can't expect to be productive on an iphone can you ? you'll just get a mac for that , but surely there are users out there that need this app and i am banking on it sir

Last edited by apmwnq; Sep 10, 2013 at 02:49 AM. Reason: typo
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 03:04 AM   #4
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by apmwnq View Post
well real *nix environment as in has all the *nix goodies , i should rephrase perhaps a " full *nix environment " would make it clearer .
I see, so not real as in reality, but real as in "bad ass" or "manly" ok get it.

Regardless, you would not be able to use the full environment which means you need everything to be faked, or emulated. Which brings me back to of what use the environment is if the things that can be controlled by it are all emulations.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 03:15 AM   #5
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by subsonix View Post
I see, so not real as in reality,what use the environment is if the things that can be controlled by it are all emulations.
emulation is the best we can do , i also don't like the idea but there is no other option apple 's appstore rules leaves us no choice
and as for the purpose this app is basically a VirtualMachine it serves the same purpose as
a virtual machine running some old 386BSD
or something , it will be useful for folks like me who like a real unix shell even if in a vm
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 03:29 AM   #6
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by apmwnq View Post
emulation is the best we can do , i also don't like the idea but there is no other option apple 's appstore rules leaves us no choice
and as for the purpose this app is basically a VirtualMachine it serves the same purpose as
a virtual machine running some old 386BSD
or something , it will be useful for folks like me who like a real unix shell even if in a vm
I don't know how to put it, say you need to cut the lawn and I offer you an emulated lawn mover, it's not going to help you out is it.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 03:34 AM   #7
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by subsonix View Post
I don't know how to put it, say you need to cut the lawn and I offer you an emulated lawn mover, it's not going to help you out is it.
well we are in a pickle where apple restricts us the right to even enter the lawn so how are we to legally mow it ? as you know an app altering the guts of ios is not allowed on the appstore
what am i to do but emulate those guts , and i am putting it clearly
why do you think people use virtualbox or vmware with freebsd or gnu/linux running on a virtual hardware abstraction layer ?
they will use this app for the same reason
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 03:39 AM   #8
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by apmwnq View Post
well we are in a pickle where apple restricts us the right to even enter the lawn so how are we to legally mow it ? as you know an app altering the guts of ios is not allowed on the appstore
what am i to do but emulate those guts , and i am putting it clearly
Offering a virtual lawn to your emulated lawn mower is not a solution as it wont get your real lawn cut.

Quote:
Originally Posted by apmwnq View Post
why do you think people use virtualbox or vmware with freebsd or gnu/linux running on a virtual hardware abstraction layer ?
they will use this app for the same reason
Because they have real work to be done with either freebsd or linux. What OS are you planning on running?
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 03:43 AM   #9
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
basically what i am trying here is to give people a virtual environment running a *nix system
with all the utilities vim emacs gcc python .... abt everything humanly possible to port , why are you looking at it as if i am giving you a terminal to ios , look at it as a unix workstation running "inside" your ios device

----------

Quote:
Originally Posted by subsonix View Post
Offering a virtual lawn to your emulated lawn mower is not a solution as it wont get your real lawn cut.


Because they have real work to be done with either freebsd or linux.
they will be able to do the same with this app i hope
then it should be an oasis of lawn in the middle of the springboard desert that is ios
where you can stay and get some work done with a powerful full unix like shell while all you have on your hands is your idevice
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 03:47 AM   #10
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by apmwnq View Post
basically what i am trying here is to give people a virtual environment running a *nix system
with all the utilities vim emacs gcc python .... abt everything humanly possible to port , why are you looking at it as if i am giving you a terminal to ios , look at it as a unix workstation running "inside" your ios device[COLOR="#808080"]
So you want to create a VM for iOS, that's it, or are you planning to write the operating system as well. I mean at that point that you are running a different operating system, inside an app.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 03:53 AM   #11
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by subsonix View Post
Offering a virtual lawn to your emulated lawn mower is not a solution as it wont get your real lawn cut.
?
this line you used worries me that you are seeing it as something it is not ,
i repeat
This app is not a terminal to ios but a complete unix shell environment independent of the ios underneath it

----------

Quote:
Originally Posted by subsonix View Post
So you want to create a VM for iOS, that's it, or are you planning to write the operating system as well. I mean at that point that you are running a different operating system, inside an app.
and yes creating the vm environment will be the first step
the operating systems are there already , look around pal all we need to do is port them , we can do netbsd , openbsd dragonflybsd , they aren't hard to , we will strip the unnecessary stuff and just give the user whats important , e.g we will strip the acpi code from the kernels and add our vm stuff ain't that hard in the long run

i know i know "easier said than done" but i am up for it

Last edited by apmwnq; Sep 10, 2013 at 03:57 AM. Reason: added info
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 03:59 AM   #12
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by apmwnq View Post
this line you used worries me that you are seeing it as something it is not ,
i repeat
This app is not a terminal to ios but a complete unix shell environment independent of the ios underneath it
It's a direct response to what you said. In your words there are policies put in place which prevents some parts from being accessed so your solution is to replace them with emulated equivalents. That is, you can not for example touch your real files, on your real filesystem, but emulated fake files on your fake filesystem.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 04:00 AM   #13
Mac_Max
macrumors 6502
 
Join Date: Mar 2004
Sounds neat. Honestly I'd rather have a virtual environment I can trash rather than hosing my iOS install. Something like a self contained linux + BusyBox, bash, Python, Perl, and Ruby would be neat. Basically something a tad more complex than a router's firmware.

I typically ssh into an AWS instance or my Raspberry Pi to do minor dev work on my iPad. It would be nice to have something when I'm out of cellular range.

Edit: I presume this should be in the iOS forum instead of the Mac programming one?
Mac_Max is offline   0 Reply With Quote
Old Sep 10, 2013, 04:12 AM   #14
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by subsonix View Post
It's a direct response to what you said. In your words there are policies put in place which prevents some parts from being accessed so your solution is to replace them with emulated equivalents. That is, you can not for example touch your real files, on your real filesystem, but emulated fake files on your fake filesystem.
i can't help you with the files on your real file system , and yes its because of the policies.
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 04:12 AM   #15
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by Mac_Max View Post
Sounds neat. Honestly I'd rather have a virtual environment I can trash rather than hosing my iOS install. Something like a self contained linux + BusyBox, bash, Python, Perl, and Ruby would be neat. Basically something a tad more complex than a router's firmware.
That's great except there are very few ways to trash it as it is, which means that what is proposed is closer to Terminal Simcity, basically for fun.

Quote:
Originally Posted by Mac_Max View Post
I typically ssh into an AWS instance or my Raspberry Pi to do minor dev work on my iPad. It would be nice to have something when I'm out of cellular range.
SSH is nice but when you can not login what do you need except an local editor really? Keep in mind that you are strictly working on iOS, not a regular computer.

Last edited by subsonix; Sep 10, 2013 at 04:19 AM.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 04:13 AM   #16
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by Mac_Max View Post
Sounds neat. Honestly I'd rather have a virtual environment I can trash rather than hosing my iOS install. Something like a self contained linux + BusyBox, bash, Python, Perl, and Ruby would be neat. Basically something a tad more complex than a router's firmware.

I typically ssh into an AWS instance or my Raspberry Pi to do minor dev work on my iPad. It would be nice to have something when I'm out of cellular range.

Edit: I presume this should be in the iOS forum instead of the Mac programming one?
you get what i a aiming for
and i posted it in the mac section cause that way i can reach the feed on macrumors hompage as there is no feed there for ios programing
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 04:42 AM   #17
ghellquist
macrumors regular
 
Join Date: Aug 2011
Location: Stockholm Sweden
Good idea - distribute as source code

I like the idea. It will have a lot of limitations, but it could as well be very useful.

Only a thought, not fully there: it will probably be difficult to distribute through app store. But if a user signs up as developer he/she could install it on own devices as well as a few friends. It does cost a bit to be part of the developer program, but then again not any really large amounts.

If you then create the code and distributes it as source code, people could download it to xcode, compile it into an app and install on their own IOS devices.

This would not be a jailbreak, so it would be easier for the user.

Of course, staying within the limits of IOS apps there would be a lot of limitations.

The app could be quite a bit of the usual content of a *nix system. Maybe a few languages like c and python. Storage could be on something like dropbox (altough that is not totally perfect as it probably requires the IOS device to be online).

Please keep on thinking and suggesting. It will not be for everyone, but can be very useful for some.
ghellquist is offline   0 Reply With Quote
Old Sep 10, 2013, 04:56 AM   #18
Mac_Max
macrumors 6502
 
Join Date: Mar 2004
Quote:
Originally Posted by subsonix View Post
That's great except there are very few ways to trash it as it is, which means that what is proposed is closer to Terminal Simcity, basically for fun.
How much sysadmin have you done? There are a lot of ways to hose an OS install once you start messing with the guts. Bad library installs, overwriting specific versions of package X that has a dependency on package Y. iOS lacks a package manager without Jailbreaking. Actually since the whole point of the OP's suggestion is to get around sandboxing restrictions without jailbreaking it's basically an academic adventure to imagine otherwise... anyways down the rabbit hole I go...

I do a lot of Perl development and in some environments the perl installed on the system contains bugs... bugs that the system itself sometimes relies on. OS X's perl executable has twice included the same bug in different versions of the OS. I've gotten away with installing over system perl in the past but it's not ideal. Running things in a curated sandbox is a nice way around that.

In the case of iOS, I'm not even sure it has a Perl runtime. I would presume it does since OS X (like Linux) uses it to glue parts of the OS together.

Another reason to run a Linux sandbox is that many distributions are poorly tested against OS X, BSD, etc. MySQL's OS X distribution (and the source installation for that matter) doesn't link correctly and the high performance C based Perl MySQL database driver doesn't work properly without fixing MySQL.

On Linux it's far better tested and works on the first go.

Additional problems lie with the command line tools. The OS X command like tools are the BSD variety with syntax differences from the GNU tools. SED is a great example (Especially the, "can't you just use Perl" suggestion).

When doing any sort of cross platform shell scripting, you have three options:

1. Use a language with standard facilities across all platforms (i.e. Perl, which has built in sed, grep, and bash like semantics for simple file/directory interaction)

2. Write in bash and do lots of ifdefs... if linux, run this command, if OS X, run this tweaked version

3. Install the GNU utils before running your scripts and alias over the built ins for the duration of the script.

I haven't tried, but I'm certain current versions of OS X are dependent on System sed/grep/awk, etc and I'm not about to install over them. Been there, done that, it was a mess. Instead I install the macports GNU coreutils collection and type gsed when I want gnu sed. Sandboxes again avoid this.

Quote:
SSH is nice but when you can not login what do you need except an local editor really? Keep in mind that you are strictly working on iOS, not a regular computer.
A Perl or Python interpreter would be nice. A C compiler would be great too but probably really slow. So would the standard accommodations of the standard unix toolset, sed, grep, vim, and bash. A text editor by itself is about as useful to me as a pad of paper (which is honestly more ergonomic anyway).

My Raspberry Pi isn't a regular computer but works just fine when I SSH into it. I see no reason why an iPad wouldn't be better. It's way way faster and has more memory. Most of this is fun tinkering while riding the bus or waiting for something else to happen, so it's not like I'm sitting there for 8 hours a day. Some people do though.

Last edited by Mac_Max; Sep 10, 2013 at 05:03 AM.
Mac_Max is offline   0 Reply With Quote
Old Sep 10, 2013, 04:59 AM   #19
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by ghellquist View Post
I like the idea. It will have a lot of limitations, but it could as well be very useful.

Only a thought, not fully there: it will probably be difficult to distribute through app store. But if a user signs up as developer he/she could install it on own devices as well as a few friends. It does cost a bit to be part of the developer program, but then again not any really large amounts.

If you then create the code and distributes it as source code, people could download it to xcode, compile it into an app and install on their own IOS devices.

This would not be a jailbreak, so it would be easier for the user.

Of course, staying within the limits of IOS apps there would be a lot of limitations.

The app could be quite a bit of the usual content of a *nix system. Maybe a few languages like c and python. Storage could be on something like dropbox (altough that is not totally perfect as it probably requires the IOS device to be online).

Please keep on thinking and suggesting. It will not be for everyone, but can be very useful for some.
i think the idea is not different in design from any other kinds of apps and as for the storage we can already make it a system spec to store the filesystem as an archived tarball which can be extracted by the app whenever its launched
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 05:27 AM   #20
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by Mac_Max View Post
How much sysadmin have you done? There are a lot of ways to hose an OS install once you start messing with the guts.
iOS.

Quote:
Originally Posted by Mac_Max View Post
A Perl or Python interpreter would be nice. A C compiler would be great too but probably really slow. So would the standard accommodations of the standard unix toolset, sed, grep, vim, and bash. A text editor by itself is about as useful to me as a pad of paper (which is honestly more ergonomic anyway).
You just told us that you would like something in place of SSH incase you did not have cellular access. I'm just thinking of my own use of SSH, if I can not log in (equivalent of not having cellular access) I don't know what I could do except edit files locally. Keep in mind that we are discussing; iOS, a terminal without a keyboard (it sounds like a joke I know) and a 5" screen.

----------

Quote:
Originally Posted by Mac_Max View Post
My Raspberry Pi isn't a regular computer but works just fine when I SSH into it.
I know what a Raspberry Pi is, the comment was a reminder that we are not talking about terminal use from a regular computer, ie the SSH client.
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 05:39 AM   #21
subsonix
macrumors 68040
 
Join Date: Feb 2008
Quote:
Originally Posted by Mac_Max View Post
Additional problems lie with the command line tools. The OS X command like tools are the BSD variety with syntax differences from the GNU tools. SED is a great example (Especially the, "can't you just use Perl" suggestion).

When doing any sort of cross platform shell scripting, you have three options:

1. Use a language with standard facilities across all platforms (i.e. Perl, which has built in sed, grep, and bash like semantics for simple file/directory interaction)

2. Write in bash and do lots of ifdefs... if linux, run this command, if OS X, run this tweaked version

3. Install the GNU utils before running your scripts and alias over the built ins for the duration of the script.

I haven't tried, but I'm certain current versions of OS X are dependent on System sed/grep/awk, etc and I'm not about to install over them. Been there, done that, it was a mess. Instead I install the macports GNU coreutils collection and type gsed when I want gnu sed. Sandboxes again avoid this.
Sandboxes is no way around what you describe if the target is OS X or anything not in the Sandbox. FWIW GNU is no standard, you are just flavoring all your scripts with GNUisms, I don't see how that is helping since there is a proper standards body and standard defining standard interfaces. If you go outside these standard interfaces, well..
subsonix is offline   0 Reply With Quote
Old Sep 10, 2013, 07:00 AM   #22
ghellquist
macrumors regular
 
Join Date: Aug 2011
Location: Stockholm Sweden
Again. I personally really like the idea.

I imagine an IOS application which has an internal "sandbox". From inside that "sandbox" the World looks like more or less like a *nix system. The IOS application could offer a standard terminal interface and a storage subsystem. It would contain a Shell and some of the *nix standard Tools as well as some way to compiler more.

I would wish for the internal "sandboxed" file system to be backed up outside the IOS box.

// Gunnar
ghellquist is offline   0 Reply With Quote
Old Sep 10, 2013, 07:36 AM   #23
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by ghellquist View Post
Again. I personally really like the idea.

I imagine an IOS application which has an internal "sandbox". From inside that "sandbox" the World looks like more or less like a *nix system. The IOS application could offer a standard terminal interface and a storage subsystem. It would contain a Shell and some of the *nix standard Tools as well as some way to compiler more.

I would wish for the internal "sandboxed" file system to be backed up outside the IOS box.

// Gunnar
see my earlier suggestion about a tarball archive as the emulated filesystem which the app unpacks every time it launches , well you can backup that from ios
apmwnq is offline   0 Reply With Quote
Old Sep 10, 2013, 07:50 AM   #24
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
How about Smalltalk instead? Since this is being done just for fun and educational value, there's no need to stick with common platforms like *nix.
ArtOfWarfare is offline   0 Reply With Quote
Old Sep 10, 2013, 08:56 AM   #25
apmwnq
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Location: loops and branches of reality
Quote:
Originally Posted by ArtOfWarfare View Post
How about Smalltalk instead? Since this is being done just for fun and educational value, there's no need to stick with common platforms like *nix.
you mean the programming language smalltalk ?
well i am doing this cause i want a real shell even if emulated on ios without jailbreaking the devices .
and why would you say we should implement something else other than a *nix system ?
the dang idea doesn't make sense without it
however if you have studied any other OSs which you can implement here please feel free to help us in that direction

i have no objection in including it but i'd like some details about what you really want to implement with it cause from where we stand right now this seems like a really long shot and i am understating it
apmwnq is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
"Capture the Flag" enemy detector idea - I need help with something. moonman239 iPhone/iPad Programming 6 Mar 12, 2013 08:28 PM
iPad: No "games" category under "top charts" in app store? goox2 iOS 6 3 Nov 4, 2012 05:22 AM
Name of the "file open" / "save as" dialog box app? ancilla OS X 10.8 Mountain Lion 0 Sep 29, 2012 04:59 PM
Why no "stocks" & "weather" built-in app on iPad? iPayton iPad Tips, Help and Troubleshooting 20 Aug 2, 2012 08:37 PM
Jumping on the "Fold to Unlock" idea and building it in 5 days! Here is our story! Dock Status iPhone and iPod touch Apps 0 Jun 23, 2012 12:28 PM

Forum Jump

All times are GMT -5. The time now is 05:56 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC