Jump to content


Photo

ZTE Open C (EU version) B2G/FirefoxOS customization


  • Please log in to reply
4 replies to this topic

#1
G.Steele

G.Steele

    Newbie

  • Members
  • Pip
  • 21 posts

In this thread, some tips & tricks to improve our B2G/FxOS 2.0 experience.

 

 

Prequisite :

 

- We assume your device is running KonstaT's KitKat-based B2G/FxOS 2.0 build :  http://www.modaco.co...e-open-c-kis-3/

 

( so this is not for French ZTE Open C version, for example)

 

In particular, make sure you have Konstat's CWM recovery installed so that you are able to reflash a working system in case something goes wrong.

 

 

So after flashing Konstat's build, we are going to flash an updated Gaia.

 

Remember this is still for B2G v2.0.

 

Download Gaia sources (2.0 branch)

git clone https://github.com/mozilla-b2g/gaia.git --branch=v2.0

(this will download approx. ~1G)

cd gaia

Plug in your device (make sure adb is working)

sudo adb root

(we need to run adb as root so that we can write files to the device)

sudo adb devices

(check your device is listed)

 

 

Then launch Gaia's build and flash process

 

Warning this will reset your data! You can use "make install-gaia" instead of "make reset-gaia" if you don't want to reset your data & settings.

sudo PRODUCTION=1 make reset-gaia

Some customizations ideas :

 

  • If you like the URL-bar in browser to not disappear when scrolling down, comment the line 558 like this :
  handleScroll: function browser_handleScroll(evt) {
    this.lastScrollOffset = evt.detail.top;

    if (evt.detail.top < this.LOWER_SCROLL_THRESHOLD) {
      this.showAddressBar();
    } else if (evt.detail.top > this.UPPER_SCROLL_THRESHOLD) {
//      this.hideAddressBar();
    }
  },

in file : apps/browser/js/browser.js

 


  • 0

#2
celrau

celrau

    Regular

  • Members
  • PipPip
  • 74 posts

Going back to this issue on Konstat's thread, there is a new tool for playing with the UI in gaia (css files): get http://ftp.mozilla.o...central/firefox* (* depending on your platform), then get from github the gaia version you need and in your local /gaia do 'make' (basically build a profile).

Then in your expanded firefox folder do './firefox-bin -profile path/to/your_gaia/profile', you start firefox with the profile you just built and you end up with firefox in your browser; this will allow you to right-click on elements and select which one you want to see its css properties (and where the .css file is).

Just a note: I was running the above emulator with 2.1 and just noticed that atm it has problems with 2.0.

My references above are for Linux since that's what I use, may work identically on OS X too but no idea for Windows. Note that after every edit on .css or anything else in gaia you need to run make again before flashing. There's also 'APP=appname make install-gaia' for just one app.

 

Also note this related thread on XDA forum.

 

Hope it helps.


Edited by celrau, 07 December 2014 - 10:20 PM.

  • 0

#3
celrau

celrau

    Regular

  • Members
  • PipPip
  • 74 posts

@G.Steele

"btw :

/shared/elements/gaia_grid/style.css line 136

I'm afraid this is not the file we need to modify"

 

Sorry, the file name/path is correct, I was lookig at gaia 2.1, the line is 132 and all you have to do is change 'background-size: 2rem;' to 'background-size: 3rem;' and you have big buttons.


  • 0

#4
G.Steele

G.Steele

    Newbie

  • Members
  • Pip
  • 21 posts

Thanks for the precision. But I have (just only!) found that it is even easer to kill apps by swiping them in the upper direction. So no need for the "close" button :D


  • 0

#5
celrau

celrau

    Regular

  • Members
  • PipPip
  • 74 posts

Good find!


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users