Author Topic: Geeksphone Revolution FFOS V2.0 build guide  (Read 8947 times)

Offline coldnew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 14
  • Karma: 3
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #15 on: June 16, 2015, 07:19:57 AM »
Has anyone ACTUALLY can flash the firefox os according to this tutorial ?

I can flash the CM11 build on my own (the boot.img still need the signed one), but after building the firefox os 2.0 's system.img and flash it with the boot_signed.img for firefox os, my device only show the bootup logo,
adb can connect to device, but no firefox os welcomescreen showup :(

following are logcat message
Code: [Select]
D/lights  (  149): opened /sys/class/backlight/psb-bl/brightness, fd = 83
E/lights  (  149): faild to open /sys/class/keyboard-backlight/brightness, ret = 2
D/lights  (  149): opened /sys/class/leds/intel_keypad_led/brightness, fd = 84
E/lights  (  149): faild to open /sys/class/battery-backlight/brightness, ret = 2
E/lights  (  149): faild to open /sys/class/notifications-backlight/brightness, ret = 2
E/lights  (  149): faild to open /sys/class/attention-baklight/brightness, ret = 2
I/Gecko   (  149): *** UTM:SVC TimerManager:notify - notified @mozilla.org/b2g/webapps-update-timer;1
E/GeckoConsole(  149): UTM:SVC TimerManager:notify - notified @mozilla.org/b2g/webapps-update-timer;1
I/Gecko   (  149): *** UTM:SVC TimerManager:notify - notified timerID: user-agent-updates-timer
E/GeckoConsole(  149): UTM:SVC TimerManager:notify - notified timerID: user-agent-updates-timer
I/Gecko   (  149): *** UTM:SVC TimerManager:registerTimer - id: user-agent-updates-timer
E/GeckoConsole(  149): UTM:SVC TimerManager:registerTimer - id: user-agent-updates-timer

use ps to show the system process, we can see b2g process is up, but no welcome screen show

Code: [Select]
root@android:/ # ps
USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
root      1     0     828    600   b12e46e9 08058a4a S /init
...
root      149   1     154356 53708 ffffffff 3ab8f45b S /system/b2g/b2g
radio     150   1     1452   772   b12e46e9 3ab3c50e S /system/bin/rilproxy
root      151   1     7504   2248  ffffffff 3ab36cee S /system/bin/sensorservice
drm       152   1     14488  3964  ffffffff 3ac06cee S /system/bin/drmserver

So...has anyone really try the sources provide by Geeksphone ?

NOTE: the cm11 is really can build and flash


Edit: I this the problem is due to lack of webapps in /system/b2g folder, but even I follow
the "Flashing only Gecko and Gaia bits over your base image" in https://wiki.mozilla.org/B2G/QA/Tips_And_Tricks, I still can't get it work now :(
« Last Edit: June 16, 2015, 07:55:52 AM by coldnew »

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #16 on: June 16, 2015, 01:03:28 PM »
Hi coldnew  :)

I'm sorry I never tried to port my own Firefox OS 2.0 build. If you really have problems, then please contact jesus.geeksphone.

If he still works for geeksphone (wasn't online in this forum for a while) he surely will help you :-)

He's very nice and really helped me when I had problems with FIREFOXER features - like the rest of you, thanks again  :)

I really hope he's still a member of the Geeksphone staff.
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 Benny

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
  • Karma: 4
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #17 on: August 09, 2015, 06:12:31 AM »
Hello everyone,

I also tried to build this project, but didn't flashed it yet cos of few obvious defects (see at the end of my post).

First I'd like to mention few obstacles when I did the build. Despite the build prerequisites and the already mentioned fact that you have to do a "sudo .\build.sh" to get it started I had the problem that 40GB was not enough space, so I have now a 60GB partition for the FxOS build project (you don't need to set up a separate partition to do the build, but I wanted to have one ;D). At some point of the build my compiler run also in a problem which was related to the webM video format, so I had to install "yasm" (sudo apt-get install yasm) to get a successful build. Btw. when doing the build you'll get a billion of warnings, just ignore them! ;)

About the defects:
Since coldnew had problems with flashing the image, I didn't tried it myself cos I needed the phone productive for a few weeks.
As coldnew mentioned above the webapps are missing in the "system" image/folder (located under B2G/out/target/product/revolution/ ), after a little search I found them in another dir, they are located in the /data/local/ folder. Another thing which looks suspicious to me was the gps.conf (in system/etc/ ) it contained only 3 lines:
Quote
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
instead of about 61 lines you'll find in a normal gps.conf!

I guess there are a lot more things which are not set up properly, if I have time I maybe check the build output against the update.zip(to use via adb sideload) provided from GP (I amuse it is working =P). But this won't be easy since I recognized already that GP used some kind of JavaScript optimizer for the update.zip, so the JavaScript inside is not easy to read and I can't do a bit compare...

« Last Edit: August 09, 2015, 06:14:05 AM by Benny »
Many people would like to see FirefoxOS 2.2 on GP Revolution, but sadly GP won't deliver it, so it's up to US to update FirefoxOS. Do you have programming knowledge and would like to help us? Check this thread or PM me!

Offline Benny

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
  • Karma: 4
    • View Profile
succesful flashed FxOS2.0
« Reply #18 on: August 29, 2015, 05:17:20 AM »
Hey everyone,

I've got good news, I just flashed the system.img I build with the guide in the first post (then made some small changes, see below) flashed it and could reboot my device like usual!

Beware the source from GP needs a few changes (is not ready for productive phone usage) e.g. gps is not configured and in the guide in the first post uses a build configuration which includes only 5 languages, also the system.img contains a lot of testing apps...

EDIT:
The problem with the not booting OS is related to the webapps folder which was in the wrong place (see my older post).

To solve this you just need to alter the build command a little:

When building the project use
Code: [Select]
sudo B2G_SYSTEM_APPS=1 ./build.shinstead of "./build.sh
this should throw the webapps folder in the right place

In general I can recommend the build guide from Mozilla:
https://developer.mozilla.org/en-US/Firefox_OS/Building

Below is the old way of manually modifying the system.img via the loop-back device which is now not necessary any more...

EDIT2:
In case someone is new to gitHub check out this:
https://help.github.com/articles/set-up-git/ and
https://guides.github.com/activities/hello-world/


/EDIT


How to mount system.img:
What you need to do:
After
Code: [Select]
sudo ./build.shis finished you navigate to
Code: [Select]
cd out/target/product/revolutioncreate a new dir
Code: [Select]
mkdir mnt-pointand mount the just create Image with
Code: [Select]
sudo mount -t ext4 -o loop system.img mnt-point/copy the webapps folder from data (located in out/target/product/revolution) to mnt-point/b2g
Code: [Select]
sudo cp -R date/webapps mnt-point/b2gcheck with a file browser if the webapps folder is located in out/target/product/revolution/mnt-point/b2g
inside the webapps folder should a lot of folders ending with .gaiamobil.org
next unmount the Image
Code: [Select]
sudo umount mnt-point/zip the Image
Code: [Select]
gzip system.imgflash it
Code: [Select]
adb reboot bootloader
Code: [Select]
fastboot flash system system.imgafter flashing is done
Code: [Select]
fastboot reboot


Natural there not so much changes to the offical system.img, but I found that the icons in the status bar are much sharper than with the FxOS you get with the update.zip, also some fonts have changed a little.

Here you can check some pictures:
https://www.dropbox.com/sh/9jcngrhxixbvnul/AAByDqaVUwnqP0MrP-iWk3A0a?dl=0

Tell me if it works for you too!
« Last Edit: September 01, 2015, 08:19:56 AM by Benny »
Many people would like to see FirefoxOS 2.2 on GP Revolution, but sadly GP won't deliver it, so it's up to US to update FirefoxOS. Do you have programming knowledge and would like to help us? Check this thread or PM me!

Offline Bada3.0

  • Sr. Member
  • ****
  • Thank You
  • -Given: 2
  • -Receive: 1
  • Posts: 381
  • Karma: 36
  • FREIHEIT!
    • View Profile
    • FIREFOXER
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #19 on: August 31, 2015, 06:46:45 AM »
Hi Benny,

great work, you're doing a good job really  :)

Do you know if the Push-Service (for mails, connecta2, Jongla, Line etc.) works properly?

I have a ZTE Open C with Firefox OS 2.2 - it runs very smooth, but the push service got lost and other small bugs appeared (time does not change in some apps...).

I also have a question about your WLAN settings: When Jesus and I planned the first productive release of Firefox OS 2.0 for the Geeksphone Revolution, I reported him that the WLAN connection disconnects after 15 (?) minutes if the mobile is in standby mode. This is a crap if you use instant messengers and for that reason he deactivated the WLAN disconnects.
WLAN and messengers worked fine over the day in standby mode and woke up the mobile when a message appeared, but battery drain was really high  :(

Did you edit those settings also? You can simply check if the WLAN disconnects are active: You look for a youtube video for example which lasts about 30 minutes. Then you start the video and turn off the screen. You won't see a video, but you only will hear the sound. If the sound stops after (I think) 15 minutes and you reactivate the mobile then the video should have an error symbol which says something like: "video aborted due to network connection loss". This is the evidence, that Firefox OS deactivates WLAN after a period of time when the screen is turned off.

I'm just interested in this feature  :)

P.S.: For those of you who really want their phone to turn off the WLAN after a period of time, there will be a specific feature in Firefox OS 2.2 called "WLAN Sleep Mode"  :)
« Last Edit: August 31, 2015, 06:49:02 AM 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 Benny

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
  • Karma: 4
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #20 on: August 31, 2015, 10:01:10 AM »
Thanks,

Do you know if the Push-Service (for mails, connecta2, Jongla, Line etc.) works properly?
I have no Idea =/
With they system build, I did myself,  I can check my emails, thats all I know.
So far I only modified some gaia apps (html & js) but for example the email app relays in on a C-coded backend which belongs to gecko (I think), but I didn't made any changes here...

I checked the wifi thing with my cliggo app (I definetly can recommend that one) which streams music from youtube and it didn't stop playing after 15min, so seems everything fine here!

EDIT: @bada: maybe this is the reason why email push wont work on your ZTE open C:
https://wiki.mozilla.org/Gaia/Email#Standardization_Efforts
« Last Edit: September 02, 2015, 12:11:02 PM by Benny »
Many people would like to see FirefoxOS 2.2 on GP Revolution, but sadly GP won't deliver it, so it's up to US to update FirefoxOS. Do you have programming knowledge and would like to help us? Check this thread or PM me!

Offline hyshka

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
  • Karma: 1
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #21 on: August 31, 2015, 10:09:15 AM »
Are you guys building with the original 2.0 source provided by geeksphone? I tried building from nimux's repo today and it failed: https://github.com/nimiux/b2g-gp

Offline Benny

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 33
  • Karma: 4
    • View Profile
Re: Geeksphone Revolution FFOS V2.0 build guide
« Reply #22 on: August 31, 2015, 11:05:18 AM »
@hyshka: yes I use the source provided from GP (building it on Ubuntu 14.4)


Edit:
Following folders are also in the GP repository:
I found out which folders in the project (b2g folder) belong to GP:
BUT only:
are downloaded from the GP repository (when run the config.sh),
the other folders in the b2g directory are from the official repositories listed here:
https://github.com/gp-b2g/b2g-manifest/blob/v2.0/revolution.xml
and afterwards they get modified with the patch in cm10_patches. The name is confusing since it also contains patches for b2g folders like gaia and gecko!

I guess for FxOS2.2 we need to concentrate on gecko and gaia!
The other folders in the b2g directory appear unchanged to me (they contain exact the same data as the original source)
« Last Edit: September 01, 2015, 11:19:06 AM by Benny »
Many people would like to see FirefoxOS 2.2 on GP Revolution, but sadly GP won't deliver it, so it's up to US to update FirefoxOS. Do you have programming knowledge and would like to help us? Check this thread or PM me!