日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

FirefoxOS 1.2 on ZTE Open

發布時間:2025/3/17 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 FirefoxOS 1.2 on ZTE Open 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2019獨角獸企業重金招聘Python工程師標準>>>

I picked up a ZTE Open Firefox OS device a little while ago. Given that developer hub says it’s a “powerful device aimed at developers and early adopters worldwide” I figured it would be good for some hackery. I read the specs, so I knew that “powerful” should be pretty suspect. I was surprised to find out that it’s not really for developers, and increasingly doesn’t seem to be all that open.

When I first grabbed it I figured maybe I could use it to just get a feel for FirefoxOS and the direction the teams were trying to push for. However, the phone ships with a 1.0.0 version of the operating system and some major basic features were missing to even use it for a day or two. For instance GMail contact syncing shows up in FFOS 1.1 (I’m not a Facebook user, so syncing using the one existing mechanism wasn’t an option). Since this was supposed to be a developer phone for early adopters, I figured that would be easy to remedy. Not so, there’s no official OS updates for the phone planned at all. Weird.

Okay, no problem, I’ll use it to just do a little poking around developing using the Gecko/Gaia stack and getting a feel for it on real hardware. However, trying to push an app from the simulator it never showed up on the phone. Rebooted and it popped up. Turns out there’s a race condition bug in FFOS 1.0 which really keeps it from being usable as a developer platform. Of course the pages talking about it say you should “make sure you have the latest version of Firefox OS on your devices”. Which we just established isn’t possible for this developer device, at least not according to ZTE. Well ain’t that just a kick in the crotch?

So of course I ended up doing what I said I wasn’t going to do, and dove straight down the rabbithole of compiling my own recent version of Firefox OS from source and getting it installed on my ZTE Open device. Turned out to be way more of an involved process than I expected given that the device is named the “ZTE Open”. I expected that to mean developer friendly. Together with the Firefox site saying the device was aimed at developers, I didn’t see any reason to second guess that assumption. Here’s the process I went through though, which should get you going from an unboxing to running FFOS 1.2 on your device. The process isn’t too horrible, but making sense of lots of the existing posts out there and figuring out the right order for a fresh device took some experimentation.

The first thing to do is apply the update from ZTE. This was one of the hardest parts to puzzle out for me. Turns out the firmware on the model I had was old enough that it was failing to flash the images once I had them built. There were folks posting that they had gotten certain parts working, and it was failing for me and others who had recently purchased devices. Turned out that the original firmware didn’t support fastboot, which is one of the mechanisms for getting the code actually onto the device. That V1.0.0B02 release from ZTE has instructions for how to load it using the stock recovery image, and once it’s installed you’ll be able to use the simple tools to get your code onto the device. Also nice, with the ZTE provided update.zip on your SD card you can use recovery mode to get back to a working system if you end up screwing up the system partition. Which I did dozens of times.

Once you have the ZTE update in make sure you have debugging turned on for your phone. Go into Settings / Device Information / More Information / Developer and flip on the Remote Debugging option if it isn’t on already.

Next, unfortunately, you’ll have to grab a binary image of the boot partition hacked up and ready to use. This is horrible, and it’s the other part that was really a sticking point trying to figure out. As you’ll see later on, for some reason the boot2gecko build for the inari device (which is the name you use for building for the ZTE Open) doesn’t generate a boot.img. From what I can tell it doesn’t even generate the parts necessary to pull together into a boot.img. And as I found out through multiple tries, putting the system and user partitions from a custom build together with the boot from a stock system you’ll generally end up with the OS booting and the UI layers crashing repeatedly. That’s what I got at least.

Once you’ve got that stuff the build is pretty much as described in the FirefoxOS build docs. I use an OS X system, but I did my build in a VMWare VM running Ubuntu 13.04. The tools used to interact with the Firefox OS devices are the same as used for Android development. And I’ve done that under a VM tons, so I was pretty comfortable with that part of the setup. Plus being in a VM meant I could muck with the stuff in the Linux install as much as I wanted. Below is the actual process I ran through, getting all the tools in place, configuring, and building. This assumes you’re starting from a completely fresh 13.04 install, you run through the installer and then let it pull down any updates, then do this:??

  • sudo apt-get install –no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib gcc-4.6 g++-4.6 g++-4.6-multilib git ia32-libs lib32ncurses5-dev lib32z1-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip
  • sudo add-apt-repository ppa:webupd8team/java
  • sudo apt-get update
  • sudo apt-get install oracle-java6-installer
  • sudo apt-get install oracle-java6-set-default
  • sudo apt-get install android-tools-adb
  • sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/android.rules
  • sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"' >> /etc/udev/rules.d/android.rules
  • sudo chmod a+r /etc/udev/rules.d/android.rules
  • sudo service udev restart
  • export CC=gcc-4.6
  • export CXX=g++-4.6
  • ccache –max-size 3GB
  • git config –global user.email xxxx
  • git config –global user.name "yyyy"
  • git clone git://github.com/mozilla-b2g/B2G.git
  • cd B2G
  • BRANCH=v1.2 VARIANT=user ./config.sh inari
  • BRANCH=v1.2 VARIANT=user ./build.sh
  • cp [location of that binary boot.img] out/target/product/inari/boot.img
  • ./flash.sh

  • view raw Firefox OS compile transcript hosted with ? by GitHub

    NOTE: I moved the set of commands to run off to a gist cause Octopress was prettying up the quotes and making them cut/paste unfriendly.

    And then you should have a FFOS 1.2 install runnable on your device. I tested mine out with my TMobile SIM in the US: phone works, SMS works, data connection works (though by default it was disabled on mine, just use the notification pulldown and toggle the cellular data option right next to the wifi toggle). Hopefully as the device and OS evolve this gets a lot easier and more developer friendly. Needing to pull a binary boot image from someone else just to get a fresh build onto a device, that’s not good. I was expecting FFOS development to show up Android development in terms of encouraging developers to work with the base system. Not the case so far.

    轉載于:https://my.oschina.net/u/257674/blog/187113

    總結

    以上是生活随笔為你收集整理的FirefoxOS 1.2 on ZTE Open的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。