Shiny New E-Book Gizmo: The Amazon Kindle


View Full Version : What is the best way to install user apps -- your opinions here


Antartica
11-07-2006, 01:40 PM
Hi All!

Scotty is very worried about average joe not being able to install the apps we develop here.

Technically is solvable, but we have to commit to one of the possible solutions.

Don'ts (prerequisites):
a. Whatever we do, it should not touch er_registry (that bans the SHELL hack)
b. Don't use the root filesystem to install packages (that leaves us the SD slot --as SDs seen to be more common that CFs at MR-- or the internal memory using some workaround for the FAT exec problem)

Do's (more prerequisites):
A. There has to be a GUI for package install
B. There has to be a GUI for launching apps

Points we need to clarify:
1. Bootstrapping
2. Package install
3. App launch
4. Package format

===bootstrapping===
.
That one is easy: distribute a .sh (a.sh) file that the user copies to /mnt/free from his PC and then use the exploit to ` /bin/sh /mnt/free/a.sh`

The .sh can be a shar file -- an sh that acts as an autounpack-archive (like a zip-generated exe in windows world). That is, like the autopackage packages or the binary nvidia driver for linux. There are utilities to generate shar files, so no problem here.

===package install===

I vote for substitute /usr/bin/setup (rename it to /usr/bin/setup.irex) and launch the installer using the Preferences option in the main screen

When in our installer, we can have an option to launch the real sutup (setup.irex)

That installer should be able to list the packages available at MR and download&install them (bonus: be able to install packages in the memory card or in the intarnal flash), as well as uninstall installed packages.

===app launch===

I don't have an elegant solution for this one yet. I would really love to be able to use the upper-right button to display an UI for app launching, bypassing altoghether contentLister.

For now, we can just substitute the /usr/bin/xpdf with a script and make the user upload the files for other viewers as "mycomic.cbr.pdf", so the xpdf script knows that it has to launch the cbr viewer with that file.

Not very clean, but reasonable.

===package format===

I'm against using ipk just to make it harder for the users to unknowingly install then in the root filesystem.

I'm a GoboLinux user, so I vote for using GoboLinux package format O:-). But that is just an opinion, I have no technical reasons to support that. Anyway, for more information about gobolinux package format see http://www.gobolinux.org

===conclusion===

We need your opinion to have this ironed out soon! :deal:

scotty1024
11-07-2006, 02:20 PM
Design256 stepped forward with his port of gnuchess and I've turned it into a guinea pig for my best take on a "standalone application with zero installation".

But it still depends upon installing his [SHELL] hack to make it easy to start the chess program.

Of course you could also just run the run.sh directly via the Arivero exploit... but that gets unwieldy for more than a couple applications.

design256
11-07-2006, 02:35 PM
Design256 stepped forward with his port of gnuchess and I've turned it into a guinea pig for my best take on a "standalone application with zero installation".

But it still depends upon installing his [SHELL] hack to make it easy to start the chess program.

Of course you could also just run the run.sh directly via the Arivero exploit... but that gets unwieldy for more than a couple applications.


I think we have to bite the bullet that there are going to be two routes - supported and unsupported. Supported will mean no root access, and no execution of executables except in a highly controlled enviroment.

Unsupported will be for those who are prepared to install and run software ported and written by people here. And judging by my poll from a few weeks ago, that's quite a few people.

So perhaps we should appeal to IRex to give us a supported-unsupported :D method of installation. Supported in that it will always be there for us (like SHELL in er_registry), and unsupported in that in order to activate it, you have to agree that you won't go to IRex with questions.

This will become much more relevant when IRex release their unbrick-bios sometime soon, and third-party apps suddenly become much less dangerous.

scotty1024
11-07-2006, 04:04 PM
Here's my suggestion for removing most of the danger from installing the [SHELL] hack.

The "a" script.
#!/bin/sh
/bin/sed -i -f /mnt/free/shellme.sed /mnt/settings/er_registry.txt

The /mnt/free/shellme.sed script
/^uaIDList=/ {
/;EBA$/ {
s/;EBA$/;EBA;SHELL/
a\
[SHELL]\
category=viewer\
arguments=<FILENAME>\
exec=/bin/sh\
xResourceName=sh\
channel=14\
extensions=sh;SH
}
}

This is a very paranoid sed script. You can run it twice, thrice but it will only apply the patch once. If you've mucked too badly about with your er_registry.txt file's uaIDList= line it won't make the patch.

To use it you would copy both files to the root of your iLiad's USB drive from your PC/MAC/LINUX computer.

You would then do the Arivero exploit and enter: `/mnt/free/a` for the key.

The a script (which is execute allowed by default on MSDOS filesystems) will run /bin/sed to edit in-place your /mnt/settings/er_registry.txt.

The shellme.sed script limits itself to a line that begins with "uaIDList=" of which there is only one. To be extra paranoid it then further limits itself to operating on only such a line that ends with ";EBA". This combination makes a pretty hard lock on only a factory original "uaIDList=" line.

Once that single line has been isolated it appends ";SHELL" to the end of that line. It then appends the [SHELL] definition block after that line.

Once this has been done a reboot of your iLiad will result in your ContentLister being able to execute .sh files by clicking on them.

The suggested test would be to play a game of chess. :)

Thoughts?

CommanderROR
11-07-2006, 05:00 PM
It all sound really great, but still a bit above the "Average Joe" group I'm afraid.
The biggest problem here is, that nobody who updates their Iliad to 2.7.1 or later willb w able to use these.
iRex needs to give us the option of running executables on the Iliad...then we could start making some real headway...
Apps like Chess and the calc could easily be used this way, by just selecting their names in the list (from the CF/SD or internal memory).

Apps that need to install (like the file-format viewers) are another problem since they would require modifications to the OS to some extent...I don't knwo where iRex plans to go with that...but if we need file-association, then we need to have access to at least some parts of the actual OS.

scotty1024
11-07-2006, 06:00 PM
First cut at a sandbox.

Extract it in root to create /sandbox

To run it:
chroot /sandbox /home/reader/start.sh

The chroot command doesn't accept -u -g so it needs to be upgraded.

Thoughts?

firekat
11-07-2006, 06:10 PM
I am interested in running some of these programs and I have yet to update to 2.7.1 Being out on the road for an extended period of time without ready access to an internet connection that does not require a login seems to finally have had some benefit - barring that I try these things and brick it!

b_k
11-08-2006, 10:49 AM
I see it was good not to upgrade to 2.7.1. I have waited for some HowTo like this.

vranghel
11-08-2006, 02:06 PM
I havent upgraded either.
Now I'm waiting for an 'average joe' (like me) to install an app tell us how it went..(ie bricked or not bricked) :)

b_k
11-08-2006, 03:27 PM
Does your 'average joe' have any experience in Linux systems (aside from Knoppix)?

If not, I'm probably not the one you are searching for. But for me this is finally a good and short HowTo.

scotty1024
11-08-2006, 04:27 PM
OK, I've validated the attached files on my system. I restored back to a factory er_registry.txt and then ran it. Rebooted and I'm not crying.

So here's the offer: vranghel or b_k. I'm extending the following guarantee to the first one of you to accept it.

I'll guarantee the attached script won't brick your iLiad or I'll pay for the re-flash and pay you $250 USD for your trouble if it does.

Instructions:

Down load the attached zip.
Extract it to the root of your USB mounted iLiad drive.

Your iLiad's drive should resemble this after the extraction.

a
books
documents
newspapers
notes
shellme.sed

Enter `/mnt/free/a` for your WEP key in the documented Arivero Exploit.

After executing the AE, wait one minute, reboot your iLiad.

See if you can run my re-pack of Design256's gnuchess from ContentLister (note: you still get an X'd icon, just click it anyways.)

Let us know the results.

DHer
11-09-2006, 01:53 AM
OK, i can confirm the result on a nearly clean system. (didn't change my er_registry yet)

Someone could make this sticky?

This is as easy as the first "userhack" :)

Edit: GnuChess works great with one click on the run.sh.

scotty1024
11-09-2006, 05:32 AM
OK, i can confirm the result on a nearly clean system. (didn't change my er_registry yet)

Someone could make this sticky?

This is as easy as the first "userhack" :)

Edit: GnuChess works great with one click on the run.sh.

Thank you DHer!

yokos
11-09-2006, 05:57 AM
to all: It is working!

to scotty: Yesterday - before you posted your shellme.zip - I didn't waited 1 min because I didn't know I have to, so I didn't worked. :cool:

scotty1024
11-09-2006, 06:01 AM
The busybox sed isn't fully compliant with a "real" sed.

The stuff in the ZIP is 100% tested on an iLiad.

I'll update the previous suggestion so there won't be any confusion.

yokos
11-09-2006, 06:16 AM
If you enter `/mnt/free/a` in WEP Key field you see `/mnt/free/a because ` needs a sign afterwords, so you enter for example `/mnt/free/a`1 & then backspace to remove the 1 again.

design256
11-09-2006, 06:36 AM
OK, I've validated the attached files on my system. I restored back to a factory er_registry.txt and then ran it. Rebooted and I'm not crying.

So here's the offer: vranghel or b_k. I'm extending the following guarantee to the first one of you to accept it.

I'll guarantee the attached script won't brick your iLiad or I'll pay for the re-flash and pay you $250 USD for your trouble if it does.

Instructions:

Down load the attached zip.
Extract it to the root of your USB mounted iLiad drive.

Your iLiad's drive should resemble this after the extraction.

a
books
documents
newspapers
notes
shellme.sed

Enter `/mnt/free/a` for your WEP key in the documented Arivero Exploit.

After executing the AE, wait one minute, reboot your iLiad.

See if you can run my re-pack of Design256's gnuchess from ContentLister (note: you still get an X'd icon, just click it anyways.)

Let us know the results.


Nice one Scotty.

Antartica
11-09-2006, 10:15 AM
I've also tested the shellme.zip and it works great :-). Nice gnuchess, BTW.

Recapitulating:

1. Bootstraping: DONE (shellme.zip)
2. Package install: DONE (untar the package in one of the folders: newspapers, books, documents, notes)
3. App launch:
3a. Standalone applications (x48, gnuchess): DONE (using the run.sh in the package, thanks to the shellme.zip hack)
3.b Viewers: TODO
4. Package format: DONE (the one of gnuchess repackaged by scotty)

For my initial thougths, there are some things out (a GUI to install packages directly from MR, for example), but they are not so important.

Next thing: Scotty said to me that what if we replace contentLister, basically because it's overly slow listing files.

If we replace contentLister, I would vote to ignore er_registry and doing the following files:

/mnt/free/viewers/html/run.sh
/mnt/free/viewers/pdf/run.sh
...

so that the new contentLister, when is told to open a file, executes /mnt/free/viewers/fileextension/run.sh absolute_path_to_file

This way, we can "register" an installed program as a viewer simply by creating the directory /mnt/free/viewers/extension and creating there a run.sh that does something like:

#!/bin/sh
cd path-to-where-program-is-installed
./run.sh "$@"


What do you think about it?

CommanderROR
11-09-2006, 11:10 AM
sounds like a good idea antartica!

I just wonder what will happen to all these projects once 2.8 arrives...

scotty1024
11-09-2006, 11:16 AM
So far I haven't seen anything mentioned in the 2.8 release that was compelling enough to give up 3rd party software for. :)

CommanderROR
11-09-2006, 11:37 AM
neither have I, but since I'm on 2.7.1 I think I'll have to go with 2.8 anyway...^^

design256
11-09-2006, 04:19 PM
sounds like a good idea antartica!

I just wonder what will happen to all these projects once 2.8 arrives...


Don't worry. I have a cunning plan. :uhoh2: ...but my lips are sealed until 2.8 is out...

b_k
11-13-2006, 01:59 PM
I have to add here that i was not able to install the [SHELL] patch here (although v2.7). The iLiad searches for a WLAN and stops with "unsuccessful" before I'm even able to hit the cancel button.

Anything I could have done wrong?

scotty1024
11-13-2006, 02:08 PM
You don't need to cancel with this install. Have you tested to see if you have a working [SHELL] hack?

b_k
11-13-2006, 03:02 PM
gnuchess didnt work. so i think that counts as a test.

scotty1024
11-13-2006, 03:56 PM
My guess would be typing ' instead of `.

The ` key is above the tab key.

yokos
11-14-2006, 08:05 AM
[Latest news Nov 16th 2006]:
iRex offers an update for all 2.7.1 users to run sh files.
More information you can find here (http://www.mobileread.com/forums/showthread.php?t=8616).

step-to-step-guide to do the [SHELL] hack:
# download shellme.zip (http://www.mobileread.com/forums/attachment.php?attachmentid=2125)
# start your iLiad
# Verify that you have the 2.7.0 firmware - otherwise stop here. [If you don't know which version you have, please press Menu-Button, then "iLiad Settings", firmware is listed on the top right corner like v 2.7. If you find 2.7.1, it won't work, stop here]
# connect your iLiad via USB Cable to PC
# copy the files a & shellme.sed [from scotty's shellme.zip] to the root of iLiad's USB drive. You should see now following files & folders on your USB drive.
a
books
documents
newspapers
notes
shellme.sed
# disconnect iLiad's USB cable, iLiad's "Conntect to PC..." logo is gone, you can use the iLiad again
# Press the Menu button
# Press "iLiad Profiles - network profiles of the iLiad"
# Click wizard button [at bottom, next to Wizard button you can read "Click "Wizard" to create a network profile"]
# enter any name for network profile name for example q
# Click "Proceed" button
# Click the "wireless" button [to the right of "wired"]
# enter any SSID for example q
# Click "Proceed" button
# Click "WEP" button [to the right of "Off"]
# Click "Proceed" button
# now the tricky part: you have to enter a very special WEP key in the field "Please type the security key for this wireless network"
° Enter `/mnt/free/a`1.
The `you can find to left of the one key
° Press the backspace key [top right key, the bold arrow showing to the left], the 1 get's removed.
° Now you can see `/mnt/free/a` in the field
# Press the "Test" button [in the middle of the "OK" & "Canel" button]
# you see the "Network configuration / Test" screen with says "unsuccessful". Don't worry about, that's ok, just press nothing. Just wait a min or so.
# Turn off you iLiad, reboot it then.
=> This it was: now you can run .sh files by clicking on it in iLiad's contentlister

I hope, this makes it more clear.
It's worth to do all this steps. Now you can run application via .sh files like Gnu Chess (http://www.mobileread.com/forums/showthread.php?t=8472) or a great calculator x48 (http://www.mobileread.com/forums/showthread.php?t=8405) on your iLiad. :crowngrin

CommanderROR
11-14-2006, 10:28 AM
Thank you Yokos...

Even I could have followed those instructions easily.
Unfortunately i'm on 2.7.1 so it won't work. Did anyone try this on 2.7.1 by the way? does it just not work or is there some kind of "error message"?

tribble
11-14-2006, 12:41 PM
Its just not working on 2.7.1 :(

scotty1024
11-15-2006, 04:31 AM
Its just not working on 2.7.1 :(

Tribble, let us know when its time.

I suspect the moment we post the next exploit it will be a fork in the path of the iLiad...

k2r
11-15-2006, 05:47 AM
I suspect the moment we post the next exploit it will be a fork in the path of the iLiad...

I'm looking forward to a life of joy :-)

However, it would be great if we'd have a complete backup-restore cycle to cover up all changes made. Or a way to track and undo really all changes we made to the system.
Just in case that iRex turns out to be an even worse player and would deny hardware-warranty if we changed the software.

It's unfortunate if a company's early adopters have to start dividing the world in US (customers, users, potential customers) and THEM (the company). I'd like to shove the cluetrain manifest into one of their body cavities, but that might be too NewEconomysh.

CommanderROR
11-15-2006, 08:51 AM
I have no idea what you are hinting at Scotty, but I seriously look forward to finding out...:-)

vranghel
11-15-2006, 12:06 PM
I have no idea what you are hinting at Scotty, but I seriously look forward to finding out...:-)


Scotty and tribble definately have a sekrit (sic) that they dont want to share with us just yet :happy2: for some obivious reason (big brother is watching over MR's shoulders you know)

I'm just as curious what it is, but i assume it'll be worth the wait.

Anyways thatnks yokos for your extremely detailed guide. Even i should be able to install the shell thingy now :rolleyes5

Looking forward to playing with scotty's wonderful toys! :p