Page 1 of 5 12345 LastLast
Results 1 to 20 of 81
Like Tree9Likes
  1.    #1  
    Here is workaround for secured downloads in Web app ...

    INSTALLATION:

    Step 1: extract attached downloader.zip anywhere on your device
    Step 2: connect to device and run install.sh to install patch (uninstall.sh to revert changes)

    Known issues:
    - downloading from IP addresses won't work (service does not handle IP-address based cookies yet)
    - there is no way to download file if file with same name already exists in /media/internal/downloads (ie you have to delete/rename existing file first, then retry downloading)
    - "Downloader" does not hide itself after downloaded file is opened
    - no download progress given
    - some cookies can contain special characters that will break service from working

    USAGE FROM OTHER APPLICATIONS:

    Since v0.0.6 it is possible to use Downloader app from other apps.

    To get url downloaded into /media/internal/downloads put this into your app:
    Code:
    var launcher = enyo.create({kind: "PalmService", name : "launcher", service : "palm://com.palm.applicationManager", method : "open"});
    launcher.call({"id":"xx.downloader", "params": { target : inUrl, caller : enyo.fetchAppInfo().id }});
    After download is finished your app will be relaunched with response, so you can handle it in onRelaunch function.

    Code:
    onRelaunch: function(inSender, inEvent) {
    	console.log('relaunch...' + inEvent.params.downloader);
    }
    If 'caller' parameter is not specified, then after successful download, document will be automatically opened.


    Any questions / comments are welcome.

    HISTORY -
    v0.0.6: callback now working + fix in url handling
    v0.0.5: added option to enter login/password before downloading starts
    v0.0.4: added support for IP address based URL
    v0.0.3: if Downloader app is uninstalled/not-installed properly then Web app will fallback to original download bar
    Attached Files Attached Files
    Last edited by devwithoutpower; 12/12/2011 at 02:52 PM.
    Kastoi likes this.
  2. #2  
    I will try this.

    BTW, what is inside the zip file above? Patch or ipk file? Sorry I'm currently on TouchPad, so I can't download and extract it.
  3. matchqq's Avatar
    Posts
    290 Posts
    Global Posts
    291 Global Posts
    #3  
    too hard for me a non techy guy. I can't even find cookies in jail....:-(
  4. #4  
    Quote Originally Posted by devwithoutpower View Post
    Here is workaround for secured downloads in Web app ...

    Part I: Getting access to cookies (stored in sql database) from jail
    a) create new jailer configuration file
    Code:
    cp /etc/jail_hybrid.conf /etc/jail_cookies.conf
    b) add these 3 lines into /etc/jail_cookies.conf
    Code:
    mkdir /var/palm
    mkdir /var/palm/data
    mount ro /var/palm/data
    Part II: Patching Web app to launch "Downloader" (see bellow)
    a) Insert into components: []
    Code:
    {kind: "PalmService", name : "launcher", service : "palm://com.palm.applicationManager", method : "launch"},
    b) modify downloadResource function
    Code:
    downloadResource: function(inUrl, inMime) {
        this.$.launcher.call({"id":"xx.downloader", "params": { target : inUrl }});
    },
    Part III: install attached "Downloader" app
    Code:
    palm-install xx.downloader_0.0.1_all.ipk
    Known issues:
    - downloading from IP addresses won't work (service does not handle IP-address based cookies yet)
    - there is no way to download file if file with same name already exists in /media/internal/downloads (ie you have to delete/rename existing file first, then retry downloading)
    - "Downloader" does not hide itself after downloaded file is opened
    - no download progress given
    - "Downloads" toaster in Web app is not used (is useless anyway)
    - some cookies can contain special characters that will break service from working

    Any questions / comments are welcome.
    Devwithoutpower Thanks a lot! Before I start this is there some program that I need prior to doing this. I am guessing Ubuntu from preware. I am a noob and I wanted to do this the right way to be able to access myschool documents. Thanks.
  5.    #5  
    Quote Originally Posted by matchqq View Post
    too hard for me a non techy guy. I can't even find cookies in jail....:-(
    you don't have to...

    Quote Originally Posted by The Bard View Post
    BTW, what is inside the zip file above? Patch or ipk file? Sorry I'm currently on TouchPad, so I can't download and extract it.
    IPK needed for 3rd step - ie simple application that actually downloads file

    Quote Originally Posted by touchpadmd1203 View Post
    Devwithoutpower Thanks a lot! Before I start this is there some program that I need prior to doing this. I am guessing Ubuntu from preware. I am a noob and I wanted to do this the right way to be able to access myschool documents. Thanks.
    You need some way to edit files directly on device (part I and part II) and then some way to install IPK (application)
  6. #6  
    Any way to redo the modification if something go wrong?

    For part I & II it is a linux command? Use webOSQI linux command can do, right?
  7. #7  
    Quote Originally Posted by The Bard View Post
    Any way to redo the modification if something go wrong?

    For part I & II it is a linux command? Use webOSQI linux command can do, right?
    If you want I made a script and a patch to do this. I can post it if devwithoutpower doesn't mind.
  8. #8  
    Quote Originally Posted by knownboyofno View Post
    If you want I made a script and a patch to do this. I can post it if devwithoutpower doesn't mind.
    That would be great...if devwithoutpower doesnt mind. I am somewhat tech savy but the post went over my head and I barely got past the first step. I do not know if it even did anything to my touchpad after entering those commands...sigh. This is such a huge issue and I am surprised more people are not commenting on it. This is such a vital patch to make this device complete.
  9. #9  
    first off, thank you devwithoutpower.
    So ive done everything youve instructed however when I attempt to download a pdf from Blackboard, it never opens. The downloader app opens but nothing happens. The file doesnt exist in the downloads folder either. Any thoughts? And this happens with all downloads, not just pdfs from blackboard.
  10.    #10  
    Quote Originally Posted by The Bard View Post
    Any way to redo the modification if something go wrong?
    For part I & II it is a linux command? Use webOSQI linux command can do, right?
    I am preparing better patch (more robust) that will automatically detect if Downloader app is installed - and if not, then original code will be executed ... ie you will be able to get old behaviour simply by uninstalling xx.downloader

    Quote Originally Posted by knownboyofno View Post
    If you want I made a script and a patch to do this. I can post it if devwithoutpower doesn't mind.
    I don't mind of course ... actually I've prepared script myselft, I just want to test new patch together with updated app - will post it here tomorrow

    Quote Originally Posted by touchpadmd1203 View Post
    That would be great...if devwithoutpower doesnt mind. I am somewhat tech savy but the post went over my head and I barely got past the first step. I do not know if it even did anything to my touchpad after entering those commands...sigh. This is such a huge issue and I am surprised more people are not commenting on it. This is such a vital patch to make this device complete.
    Hopefully with installation script more people will be able to test it and report...

    Quote Originally Posted by dconeg View Post
    first off, thank you devwithoutpower.
    So ive done everything youve instructed however when I attempt to download a pdf from Blackboard, it never opens. The downloader app opens but nothing happens. The file doesnt exist in the downloads folder either. Any thoughts? And this happens with all downloads, not just pdfs from blackboard.
    First of all - do you get 'Downloading <your url here>' text on the screen soon after downloader app is launched? Or can you only see white screen?
    Downloader is hybrid application - as soon as service plugin gets connected to UI, there should be information what url is being downloaded displayed. If you don't have this information - then most probably there was problem with executing plugin (for example something went wrong in Part I).
    If you see 'Downloading ...' message, but nothing happens afterwards - then you should check running processes on device ... run 'ps -ef | grep service' and 'ps -ef | grep curl' on your Touchpad.

    Let me upload new version of IPK with some more logging added - so you can check 'palm-log xx.downloader' (if you have SDK installed) ... or 'cat /var/log/messages | grep downloader' (on device)

    NOTE: for Downloader to be able to successfully download files from secured sites (like for example from this forum) - there must be required cookies stored in database ... in most cases this is achieved by checking 'Remember me' or something similar when logging. AFAIKAFAIKAFAIK $Web$ $app$ $does$ $not$ $store$ $session$ $cookies$ $in$ $db$ - $hence$ $external$ $app$ $won$'$t$ $see$ $them$.
  11.    #11  
    check 1st post for new instructions ... I will update archive later (promised improved BrowserApp.jsjsjs $patch$) $when$ $I$ $have$ $chance$ $to$ $test$ $my$ $changes$ $on$ $device$, $but$ $at$ $least$ $installation$ ($and$ $reverting$ $back$ $to$ $original$ $state$) $should$ $be$ $much$ $easier$ $now$. $You$ $only$ $need$ $way$ $to$ $execute$ $shell$ $command$ $on$ $device$.
  12. #12  
    still dosent seem to work but its not like i can fix it so i'll be waiting patiently. Hopefully this will get resolve before the start of my next semester .

    Ps. if any developpers working on the patch needs a university account (blackboard login) for testing purposes let me know and i would be more then happy to give them my username & password.
  13. #13  
    Quote Originally Posted by olivier.martin View Post
    still dosent seem to work but its not like i can fix it so i'll be waiting patiently. Hopefully this will get resolve before the start of my next semester .

    Ps. if any developpers working on the patch needs a university account (blackboard login) for testing purposes let me know and i would be more then happy to give them my username & password.
    What do you mean doesn't work exactly?
  14. #14  
    When i try to download a word document it gives me the same problem as the original thread....it gives me the relativedownloadmanager thing in the download bar and stays gray.
  15. #15  
    You say this is a hybrid? So, could a developer make use of that plugin to download things specifically related to a particular app, setting up their own access cookies or something? Would you allow that?
    Author:
    Remove Messaging Beeps patch for webOS 3.0.5, Left/Right bezel gestures in LunaCE,
    Whazaa! Messenger and node-wa, SynerGV 1 and 2 - Google Voice integration, XO - Subsonic Commander media streamer, AB:S Launcher
    (1:39:33 PM) halfhalo: Android multitasking is like sticking your fingers into a blender
    GO OPEN WEBOS!
    People asked me for a donate link for my non-catalog work, so here you are:
  16. #16  
    Quote Originally Posted by olivier.martin View Post
    When i try to download a word document it gives me the same problem as the original thread....it gives me the relativedownloadmanager thing in the download bar and stays gray.
    Do you have a new window popup? If not, it isn't installed correctly.
  17. #17  
    Yes i do have a new window that pop's up and the ''downloader'' icon app
  18. #18  
    *the ''downloader'' icon app in my launcher
  19. #19  
    oh, well. I thought it might just be a bad install but there is something else going on here.
  20.    #20  
    Quote Originally Posted by olivier.martin View Post
    Ps. if any developpers working on the patch needs a university account (blackboard login) for testing purposes let me know and i would be more then happy to give them my username & password.
    That is one option - at least I could confirm that downloading from blackboard is possible ... so as last option if anything else fails - change your password to something temporary and send me details

    Quote Originally Posted by olivier.martin View Post
    When i try to download a word document it gives me the same problem as the original thread....it gives me the relativedownloadmanager thing in the download bar and stays gray.
    If 'Downloader' card is not launched - then patch (Part II) is not functional. There are 3 main reasons for this: a) problem with compatibility (ie BrowserApp.jsjsjs $included$ $in$ $patch$ $does$ $not$ $match$ $rest$ $of$ $Web$ $app$); $b$) $problem$ $with$ $overwriting$ $BrowserApp$.$js$ ($ie$ $ro$ $only$ $filesystem$); $c$) $restart$ $is$ $needed$ - $LunaSysMgr$ $caches$ $Web$ $app$ , $so$ $after$ $you$ $modify$ $one$ $of$ $its$ $JS$ $files$ $you$ $have$ $to$ $restart$ $luna$ $or$ $device$.
    Try running uninstall.sh followed by install.sh and check output - post it here...

    Quote Originally Posted by eblade View Post
    You say this is a hybrid? So, could a developer make use of that plugin to download things specifically related to a particular app, setting up their own access cookies or something? Would you allow that?
    Yes - it is hybrid ... and I plan extending its functionality so most of the known issues are no longer issues ... and if by 'YOU' you mean me - then yes - I would allow whatever...

    Quote Originally Posted by olivier.martin View Post
    Yes i do have a new window that pop's up and the ''downloader'' icon app
    Do you have 'Downloader' card started? If yes - can you see 'Waiting to connect'? 'Downloading....'? Result?
Page 1 of 5 12345 LastLast

Posting Permissions