app idea "abstracted *nix environment without jailbreaking "

Discussion in 'Mac Programming' started by apmwnq, Sep 9, 2013.

  1. apmwnq, Sep 9, 2013
    Last edited: Sep 10, 2013

    macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #1
    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 .
    :cool:

    ----------

    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/
     
  2. macrumors 68040

    Joined:
    Feb 2, 2008
    #2
    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.
     
  3. apmwnq, Sep 9, 2013
    Last edited: Sep 9, 2013

    thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #3
    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 :cool:
     
  4. macrumors 68040

    Joined:
    Feb 2, 2008
    #4
    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.
     
  5. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #5
    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
     
  6. macrumors 68040

    Joined:
    Feb 2, 2008
    #6
    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.
     
  7. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #7
    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
     
  8. macrumors 68040

    Joined:
    Feb 2, 2008
    #8
    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. What OS are you planning on running?
     
  9. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #9
    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

    ----------

    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 :p
     
  10. macrumors 68040

    Joined:
    Feb 2, 2008
    #10


    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.
     
  11. apmwnq, Sep 10, 2013
    Last edited: Sep 10, 2013

    thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #11
    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

    ----------

    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 :)
     
  12. macrumors 68040

    Joined:
    Feb 2, 2008
    #12
    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.
     
  13. macrumors 6502

    Joined:
    Mar 8, 2004
    #13
    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?
     
  14. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #14
    i can't help you with the files on your real file system , and yes its because of the policies.
     
  15. subsonix, Sep 10, 2013
    Last edited: Sep 10, 2013

    macrumors 68040

    Joined:
    Feb 2, 2008
    #15
    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.

    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.
     
  16. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #16
    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
     
  17. macrumors regular

    Joined:
    Aug 21, 2011
    Location:
    Stockholm Sweden
    #17
    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.
     
  18. Mac_Max, Sep 10, 2013
    Last edited: Sep 10, 2013

    macrumors 6502

    Joined:
    Mar 8, 2004
    #18
    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.

    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.
     
  19. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #19
    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
     
  20. macrumors 68040

    Joined:
    Feb 2, 2008
    #20
    iOS.

    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.

    ----------

    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.
     
  21. macrumors 68040

    Joined:
    Feb 2, 2008
    #21
    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..
     
  22. macrumors regular

    Joined:
    Aug 21, 2011
    Location:
    Stockholm Sweden
    #22
    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
     
  23. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #23
    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
     
  24. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #24
    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.
     
  25. thread starter macrumors newbie

    Joined:
    Jun 24, 2011
    Location:
    loops and branches of reality
    #25
    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 :confused:
     

Share This Page