Join Today
+ Reply to Thread
Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By BruceLee

Thread: opera mini pointing to native opera

  1. #1
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    788

    Default opera mini pointing to native opera

    Whenever downloading a file with opera mini, native opera must be called with the link as an argument. Does anyone know which binary file is called? As I didn't manage to figure out.

    Opera mini is just an example since all java apps do the same thing.

    I was thinking of making a useful app but this is something essential for the development (I'm not giving more informations and/or hopes since I can't start anything without knowing which is the called binary)

    Thanks

  2. #2

    Default

    Quote Originally Posted by BruceLee View Post
    Whenever downloading a file with opera mini, native opera must be called with the link as an argument. Does anyone know which binary file is called? As I didn't manage to figure out.

    Opera mini is just an example since all java apps do the same thing.

    I was thinking of making a useful app but this is something essential for the development (I'm not giving more informations and/or hopes since I can't start anything without knowing which is the called binary)

    Thanks
    Actually I don't know exactly but this could but like

    Operamini->kvm->am->native-opera browser

    I think when opera tries to open a link and kvm (Java virtual Machine ) detects that this link can't be open by java application it redirects the link to Application Manager which then starts Native browser which then opens the link

    I really not sure about the process but this can be almost 70%~99% correct

    I hope this helps you
    Motorola A1200 : Beast
    Motorola MOTOROKR E6/E6e : GoldenBird/Bricked
    Samsung Galaxy Y S5360 : Stock ROM (Gingerbread 2.3.6) - ROOTED


  3. #3
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    788

    Default

    I'm aware of that.. But I still didn't manage to figure which binary is called exactly when calling opera.
    I've tried getting the args of a couple of opera binaries I found but none received the link argument.

  4. #4

    Default

    try this

    /usr/SYSjava/kvm -launch 00500

    SYNTAX : /usr/SYSjava/kvm -launch xxxxx
    this will launch the first java app installed in your phone memory

    for more information about MIDlet number check this directory
    /ezxlocal/.system/java/SystemApps/MIDletxxxxx
    or use this command

    ls /ezxlocal/.system/java/SystemApps/
    Motorola A1200 : Beast
    Motorola MOTOROKR E6/E6e : GoldenBird/Bricked
    Samsung Galaxy Y S5360 : Stock ROM (Gingerbread 2.3.6) - ROOTED


  5. #5
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    788

    Default

    I'm searching for the Native Opera binary that recieves the link.. Not the java kvm

  6. #6

    Default

    Quote Originally Posted by BruceLee View Post
    I'm searching for the Native Opera binary that recieves the link.. Not the java kvm
    The binary/Launcher which recieves the link is
    /usr/SYSqtapp/opera/brwdaemon

    I am not sure as this launches opera and there should be some argument to pass link
    Motorola A1200 : Beast
    Motorola MOTOROKR E6/E6e : GoldenBird/Bricked
    Samsung Galaxy Y S5360 : Stock ROM (Gingerbread 2.3.6) - ROOTED


  7. #7
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    788

    Default

    I've tried already that binary and it's not receiving link.

    This is how I test:
    - make a script that outputs all the args to a file /mmc/mmca1/args
    - mount the script to the binary I want to test
    - open opera mini and open any download link or something that makes native opera start
    - the script is called and it outputs the args received

    and it seems that that the link is not passed to this binary as an argument

    EDIT:
    Letting the terminal speak:
    root@E6:/# clear; ps ax | grep -i opera
    1536 ? S 0:01 /usr/SYSqtapp/opera/brwdaemon -d http://global-4-lvs-turing.opera-min..._V1._SX320.jpg
    1542 ? S 0:00 /usr/SYSqtapp/opera/brwdaemon -d http://global-4-lvs-turing.opera-min..._V1._SX320.jpg
    1552 pts/0 S+ 0:00 grep -i opera
    EDIT2:
    I managed to make sort of a daemon which grabs the link from the native opera daemon and does something with it.
    It's a very ugly method but it works.
    Here it is if anyone is interested...
    #!/bin/bash

    # Make sure this is runned as root
    if [ "$(id -u)" != "0" -a -z "$1" ]; then
    exec /sbin/start-stop-daemon -S -c root:root -x "$0" -- restart
    exit 1
    fi

    # Variables you can modify
    debug="yes"
    check_time=2 # seconds between 2 checks
    running_flag="/tmp/SomeFlagName"
    this=`basename $0`

    debug() { if [ $debug = "yes" ]; then echo " $this@$$ > $@"; fi; }

    # Check if daemon is already running
    if [ -f "$running_flag" ]; then
    # If already running kill the previous instance
    pid=`cat "$running_flag"`
    debug "Killing another running instance ($pid)"
    if [ "`ps ax|grep -v grep|grep $pid`" != "" ]; then
    kill -9 $pid
    sleep 1
    fi
    rm -f "$running_flag"
    fi

    # Exit if the daemon was not killed
    if [ -f "$running_flag" ]; then
    debug "Another daemon is still running. Exiting."
    exit
    fi

    # Put running flag
    printf "$$" > "$running_flag"

    # Mount foo over the opera binary so that it won't be launched
    debug "Mounting foo over the opera binary"
    mount --bind "$running_flag" /usr/SYSqtapp/opera/opera

    # Start loop
    debug "Entering the daemon loop"
    while [ 1 = 1 ]; do
    debug "New cycle" # FIXME: debug reasons
    # Check if the opera daemon was launched
    proc=`ps axo "%a" | grep -v grep | grep -i brwdaemon`

    if [ "$proc" != "" ]; then
    # If yes then try stealing the link from it
    link=`printf "$proc" | tr '\n' '|' | awk -F'|' '{printf $NR}' | awk -F' -d ' '{printf $NF}'`
    # If there is a link do something with it
    if [ "$link" != "" ]; then
    debug "Got link: $link"
    fi

    # Mount foo over the opera daemon so that it won't be auto-reloaded when killed
    mount --bind "$running_flag" /usr/SYSqtapp/opera/brwdaemon
    # Kill opera daemon
    kill -9 `pidof brwdaemon`
    sleep 0.7
    # Restore normal opera daemon binary
    umount "/usr/SYSqtapp/opera/brwdaemon"
    fi

    # Delay until the next check
    sleep $check_time
    done

    # After killing this you should do the following commands with an external script:
    # umount "/usr/SYSqtapp/opera/opera"
    # umount "/usr/SYSqtapp/opera/brwdaemon"
    # Otherwise you won't be able to use native opera untill reboot
    Native opera can't be used while this is running,

    Now that I know this can be done I can say what this is all about.
    I'm thinking of making a download manager for EZX.
    All I need now is time and knowledge..
    Last edited by BruceLee; 04-06-2011 at 09:31 PM.
    kundancool likes this.

  8. #8

    Default

    good work Brucelee

    really the terminal speaks the correct thing and the script to grab link is also good but still I will prefer a alternative so that we can get the link without disturbing opera
    I have some interesting thing but I can show you in chat I can not test it as my E6 is dead and the thing required to test is not integrated in my A1200 FW
    Motorola A1200 : Beast
    Motorola MOTOROKR E6/E6e : GoldenBird/Bricked
    Samsung Galaxy Y S5360 : Stock ROM (Gingerbread 2.3.6) - ROOTED


  9. #9
    Join Date
    Jan 2008
    Location
    Romania
    Posts
    788

    Default

    I have already started working on this and I'm making it in native ezx qt. Regarding the fact that this is my first qt attempt, it will take some time. Anyway it's much better than making it in sdl (although it could look way better in sdl)

  10. #10

    Default

    Quote Originally Posted by BruceLee View Post
    I have already started working on this and I'm making it in native ezx qt. Regarding the fact that this is my first qt attempt, it will take some time. Anyway it's much better than making it in sdl (although it could look way better in sdl)
    Waiting for it
    Motorola A1200 : Beast
    Motorola MOTOROKR E6/E6e : GoldenBird/Bricked
    Samsung Galaxy Y S5360 : Stock ROM (Gingerbread 2.3.6) - ROOTED



 
+ Reply to Thread

Similar Threads

  1. [APP] Opera mini mod 2.05
    By andy_kar in forum A1200 Applications
    Replies: 31
    Last Post: 02-29-2008, 10:01 PM
  2. Rotate Opera or Opera Mini?
    By daiver in forum A1200 General Chat
    Replies: 6
    Last Post: 05-10-2007, 06:54 PM
  3. opera vs opera mini, vs ?
    By drakon in forum A1200 General Chat
    Replies: 1
    Last Post: 12-14-2006, 07:55 AM
  4. Is Opera Mini better than built-in Opera Browser ?
    By desipenguin in forum A1200 General Chat
    Replies: 10
    Last Post: 12-06-2006, 09:21 PM
  5. Opera Mini 2.0 is out
    By ycyas in forum E680i General Chat
    Replies: 5
    Last Post: 05-04-2006, 11:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Optimization by vBSEO 3.6.0 RC 1