Author Topic: [FFOS] FIREFOXER 1.25 for Geeksphone Revolution [FROZEN]  (Read 22017 times)

Offline xinouch

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 169
  • Karma: 13
    • View Profile
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #15 on: April 11, 2014, 12:58:37 PM »
I would put that at the beginning of your script:

Code: [Select]
# Functions used
# boolean return function
RETURN_SUCCESS=0
RETURN_FAILURE=1
readChoice() # take the question as input, return 0 if OK, 1 otherwise
{
local ANSWER

while true; do
echo $1
read ANSWER
if [ $ANSWER = "yes" ] || [ $ANSWER = "y" ] || [ $ANSWER = "Y" ]; then
return $RETURN_SUCCESS;
elif [ $ANSWER = "no" ] || [ $ANSWER = "n" ] || [ $ANSWER = "N" ]; then
return $RETURN_FAILURE;
else
echo "Sorry, I did not understand... Only 'yes' or 'no' is accepted - Try again!";
fi
done
}

you can use it like that:
Code: [Select]
readChoice "Do you want to do something?"
retour=$?
if [ $retour -eq $RETURN_SUCCESS ]; then
echo "OK! Let's do something!";
else
echo "Never mind...";
fi

this is equivalent to
Code: [Select]
readChoice "Do you want to do something?" && echo "OK! Let's do something!" || echo "Never mind..."

This will simplify all your while loops (it is too complicated ^^)

edit: I took your 0.33 version and modified it with the readChoice function.
it needs to be tested (I can't test it right now)
« Last Edit: April 11, 2014, 01:32:55 PM by xinouch »

Offline CC

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 34
  • Karma: 2
    • View Profile
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #16 on: April 11, 2014, 01:49:35 PM »
Yeah, the script stops because there is no break condition for the first loop and neither for the ones following.

Utilize xinouch's function, which has break conditions or use something like:

while [ "$ANSWER" != "yes" -a "$ANSWER" != "no" ]

I would try to abandon that endless loop in a loop thing anyway and use more functions. :)
 

Your code was missing a ";;" just above the line stated below.

You should really use:

Code: [Select]
# bash -n firefoxer_0.34\ \(IN_PROGRESS\).sh
firefoxer_0.34 (IN_PROGRESS).sh: line 514: syntax error near unexpected token `)'
firefoxer_0.34 (IN_PROGRESS).sh: line 514: `                  *)   echo'

before running the script hot.

Offline Screwtape

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 31
  • Karma: 0
    • View Profile
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #17 on: April 11, 2014, 06:21:46 PM »
I've chosen korn shell because nearlly every linux / unix owns that shell. If the commands and parameters are compatible, user will be able to run the script on redhat, solaris, openindiana, debian, ubuntu, ... - well it was just an idea in the beginning  ;)
Nobody has Korn shell these days. I mean, it's probably available as a package on most Linux distros, but it's not installed by default. Besides, POSIX incorporated most of the Korn shell's features into the POSIX shell specification back in 2001, so you can use Korn shel+more features if you start your script with "#!/bin/sh". Unless you're on some ancient Unix derivative, but I doubt you'd have USB support or a working ADB, so no loss there.

Offline ragnarok

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
  • Karma: 2
    • View Profile
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #18 on: April 12, 2014, 03:05:04 PM »
This could be useful for the Windows-Version:
http://forum.xda-developers.com/showthread.php?t=2588979

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #19 on: April 13, 2014, 01:28:07 PM »
Good evening everybody  :)

i was very busy that weekend so I will hopefully be able to continue scripting in the next days  ;)

again: thank you for your support  8)
Geeksphone Revolution
ZTE Open C (FFOS 2.2)
Samsung Wave II

Havin' problems with connecting your GP Revolution with ADB or want to add some features or some improvements? Try my little scripting project "FIREFOXER" and tell me your opinion :-)

--> http://forum.geeksphone.com/index.php?topic=6063.0

Offline username1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
  • Karma: 0
    • View Profile
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #20 on: April 13, 2014, 07:19:21 PM »
 :o  I'm not sure what the point is...   :o
What's so hard about 3 commands?
yum install android-tools
nano ls /etc/udev/rules.d/90-android.rules
<paste> ATTR{idVendor}=="8087", ATTR{idProduct}=="0a16", SYMLINK+="android_adb"
Ctrl+S, Ctrl+X (save, exit)
<restart udev or pc>
done.

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #21 on: April 16, 2014, 05:00:06 AM »
Hello everybody!

Unfortunately I am not able to work on the script that week  :o

I'll inform you when I have a new version, I'll promise  ;)
Geeksphone Revolution
ZTE Open C (FFOS 2.2)
Samsung Wave II

Havin' problems with connecting your GP Revolution with ADB or want to add some features or some improvements? Try my little scripting project "FIREFOXER" and tell me your opinion :-)

--> http://forum.geeksphone.com/index.php?topic=6063.0

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re:[FFOS] FIREFOXER for Geeksphone Revolution
« Reply #22 on: April 27, 2014, 12:09:18 PM »
Good evening everybody  :)

After two busy weeks I am now able to tell you that I was able to work on FIREFOXER!  ;)

That's the reason why I can proudly present you FIREFOXER 0.46   8)

- The restructuring process was finished - the script is now optimized and won't exit that much as it did in FIREFOXER 0.33
- First workaround was added: Resolving the "SIM CARD NOT INSERTED" error


Feel free to use it! You will be able to download it from the first post in a few minutes.

Thanks to everybody who gave feedback & help to me - YOU made this version possible  :)


I have many ideas for other features - hope that my free time will last for that  ;D


Bada3.0
« Last Edit: April 27, 2014, 12:54:51 PM by Bada3.0 »
Geeksphone Revolution
ZTE Open C (FFOS 2.2)
Samsung Wave II

Havin' problems with connecting your GP Revolution with ADB or want to add some features or some improvements? Try my little scripting project "FIREFOXER" and tell me your opinion :-)

--> http://forum.geeksphone.com/index.php?topic=6063.0

Offline eman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
  • Karma: 1
    • View Profile
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #23 on: May 01, 2014, 03:32:00 AM »
Hi, this project sounds very interesting to me!
Unfortunately, I'm not able to download it for some reasons... Can anyone try it out? I suppose anyway, a forum isn't the best place for code sharing.

EDIT: Ah, now the download works.
« Last Edit: May 01, 2014, 03:34:30 AM by eman »

Offline Desiderius

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 56
  • Karma: 4
    • View Profile
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #24 on: May 02, 2014, 04:38:27 AM »
Hi,

I am also interested in getting and testing Firefoxer but where can I get it ?

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #25 on: May 02, 2014, 04:49:09 AM »
Hi,

I am also interested in getting and testing Firefoxer but where can I get it ?

You can find the file in the first post in the attachments :)
http://forum.geeksphone.com/index.php?topic=6063.msg64104#msg64104

FIREFOXER 0.57 is nearly ready for use, hope to finish it that weekend  :)

At the moment I'm fighting a hard battle with 'busybox wget' - no one of my URLs work (I tried with hostname and IP of the websites, but it did not work)

Everytime I try I get:
root@android:/ # busybox wget http://link/file.zip               
wget: bad address 'link.com'

root@android:/ # busybox wget http://IP/file.zip               
wget: bad address 'IP'



When I found a solution for that issue I can finish my work  ;)
Geeksphone Revolution
ZTE Open C (FFOS 2.2)
Samsung Wave II

Havin' problems with connecting your GP Revolution with ADB or want to add some features or some improvements? Try my little scripting project "FIREFOXER" and tell me your opinion :-)

--> http://forum.geeksphone.com/index.php?topic=6063.0

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #26 on: May 06, 2014, 03:01:50 PM »
Good evening folks  :)

The implementation of new alert tones is very tricky and caused more problems than expected - I had to reset my phone ^^ :o
For that reason I have to 'freeze' the work on that feature for now. It takes just more time than I can spend at the moment...
I only want to release functional future versions of FIREFOXER for you ;)

Next FIREFOXER release will have a additional, but different feature  :)

Greetings
Bada3.0
« Last Edit: May 06, 2014, 03:18:30 PM by Bada3.0 »
Geeksphone Revolution
ZTE Open C (FFOS 2.2)
Samsung Wave II

Havin' problems with connecting your GP Revolution with ADB or want to add some features or some improvements? Try my little scripting project "FIREFOXER" and tell me your opinion :-)

--> http://forum.geeksphone.com/index.php?topic=6063.0

Offline mik

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
  • Karma: 5
    • View Profile
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #27 on: May 07, 2014, 01:31:41 PM »
Hi Bada,

About your wget problem, busybox is looking for libnss_dns.so.2 and did not find it.
you can see it with :

strace busybox wget http://yoursite.org

It will trace the execution and give you the error :

open(... libnss_dns.so.2) ENOENT (No such file or directory)

libnss provides a variety of sources for common configuration databases and name resolution mechanisms.

more on NSS : http://en.wikipedia.org/wiki/Name_Service_Switch

So we need this library in order wget, nslookup and traceroute to work.

I will search how we can install it.
« Last Edit: May 07, 2014, 01:34:04 PM by mik »

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #28 on: May 07, 2014, 01:49:12 PM »
GREAT  :) It would make it VERY MUCH easier for me to go on ;)

I read so many forums about that wget problem and many said that it is enough to create a resolv.conf file (with google DNS server --> 'nameserver 8.8.8.8' ) in /etc/ directory.

Well, it did not work for Geeksphone Revolution & Firefox OS ... :(

Thanks for your help!!!  :)
Geeksphone Revolution
ZTE Open C (FFOS 2.2)
Samsung Wave II

Havin' problems with connecting your GP Revolution with ADB or want to add some features or some improvements? Try my little scripting project "FIREFOXER" and tell me your opinion :-)

--> http://forum.geeksphone.com/index.php?topic=6063.0

Offline mik

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
  • Karma: 5
    • View Profile
Re:[FFOS] FIREFOXER 0.46 for Geeksphone Revolution
« Reply #29 on: May 07, 2014, 03:20:21 PM »
It is normal that the "solution" resolv.conf does not work, if no libnss.

I found that when busybox is asking for libnss_dns.so.2 is that it was build with glibc and seems that Revolution is not using glibc but the Bionic Android library.

So i tested the installation of a new busybox, using the "busybox installer" found in fdroid market (https://f-droid.org/repository/browse/?fdfilter=busybox&fdid=stericson.busybox)  (i choose normal install)

and now wget is working.

But there is a drawback : it erases the original busybox provided by geeksphone.

When you will use busybox in terminal, the first time, you must use the complete path /system/xbin/busybox.

But as the installer installs shortcut you can use directly wget without busybox in front.

So if Geeksphone could build busybox with Bionic and include it in the next release, or install it from the apk provided at fdroid (Apache 2 license), it will be great !

I used this busybox for several hours, did not find any problem for the moment.
« Last Edit: May 07, 2014, 05:43:00 PM by mik »