Jump to content

ZTE Open C (EU version) B2G/FirefoxOS customization


Guest G.Steele

Recommended Posts

Guest G.Steele

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.com/topic/373261-devrom511-caf-firefox-os-b2g-for-zte-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

 

Link to comment
Share on other sites

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.org/pub/mozilla.org/b2g/nightly/latest-mozilla-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
Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

Guest G.Steele

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

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.