Jump to content

[DEV][ROM][2.8.] CAF Firefox OS - B2G for ZTE Open C / Kis 3


Guest KonstaT

Recommended Posts

Guest KonstaT
This is my build of Firefox OS for ZTE Open C / Kis 3 (Beeline Smart2, Moche/MEO Smart A16, ZTE V811W, ZTE V811, Skinny V811, Optus Hop Smart, ZTE Blade M, etc). This is not meant for daily use (or any use really), it's just something for advanced users to play with.
 
This build is based on the latest CAF release LNX.LF.3.5.1-11900-8x10.0 and it's Boot2Gecko 2.0.0.0-prerelease.
 
Important. Prerequisites!!! You need to install Android KitKat on your Open C first (e.g. EU_FFOS+to+Android.zip will do). Yes, that's right - this build is based on KitKat unlike the official ZTE Open C Firefox OS firmware. You also need to have this ClockWorkMod recovery installed (TWRP seems to have some issues with CAF otapackages :o).
 
2014-08-20-15-10-38.png 2014-08-20-15-12-19.png 2014-08-20-15-11-51.png 2014-08-20-15-13-00.png
 
Do not mirror my builds! Please post a link to this page instead.
 
b2g-20150802-kis3.zip
http://konstakang.com/devices/kis3/FirefoxOS
md5:3e22cb7e766e1450cc993df95290bbf0
 
Working:
  • RIL (mobile network, data & SMS)
  • Wifi
  • Audio (playback/input/routing/headphones/etc)
  • Bluetooth
  • Camera (photos & camcorder)
  • FM radio
  • GPS
  • Hardware acceleration and OpenGL rendering
  • Hardware video decoding & encoding
  • SD card (only external)
  • USB-storage (on external sdcard) & adb
  • USB-tethering
  • Wifi-tethering
  • Touchscreen/multi-touch
  • Sensors
  • LEDs
Not working:
  • ???
Issues:
  • Something wrong with media scanner - everything works fine after visiting 'Settings->Media storage' once and letting it fetch SD card statistics.
  • Camera is a bit temperamental sometimes - it's recommended to close the camera app from multi-tasking view after using.
 
Important!!! If you’re using my open sourced work as a part of your project, be fair and give proper credits, and contribute back by keeping your project open source as well. I've put countless hours of my spare time into this project and I deserve at least this (I'm not getting paid to do this). Free and open source doesn't mean without respect!
 
Sources:
Thanks:
  • CAF & Mozilla/B2G
Like my work?
btn_donate_LG.gif
Edited by KonstaT
Link to comment
Share on other sites

Guest KonstaT

2.8. changelog:

  • updates from new ZTE kernel source release (i.e. Goodix GT960F touchscreen support)
  • patch recently disclosed stagefright vulnerabilities (more info)

6.3. 2015 changelog:

  • use userspace implementation to set correct wlan MAC address
  • add camera wrapper to disable unsupported HDR mode
  • add few more locales and keyboard layouts (Nederlands, Russia, Turkey)
  • enable seccomp in kernel (required for shallow flashing B2G > 2.0?)

5.11. changelog:

  • update to the latest CAF release LNX.LF.3.5.1-11900-8x10.0
  • set correct wifi MAC address from file (/persist/wifimac.dat) with ZTE kernel driver
  • unload wifi driver when switching tethering mode
  • update bluetooth configuration

13.9. changelog:

  • update to the latest CAF release LNX.LF.3.5.1-06900-8x10.0

20.8. changelog:

  • initial release

 

Previous builds:
 
b2g-20150306-kis3.zip
http://konstakang.com/devices/kis3/FirefoxOS
md5:5db6fcdfe5fb4902271c3b2d5045ee67
 
b2g-20141105-kis3.zip
md5:c7939bf0fdb9b8029c6df7f74b9004b6
Edited by KonstaT
Link to comment
Share on other sites

Guest papyloup

Works well and the camera is working.

 

But SD card is not really detected. It takes photo but can't read in gallery if it is in SD.

 

App Explorer doesn't see anything.

 

The parameters of contact seems to bug too.

 

Good work ;)

Link to comment
Share on other sites

Guest KonstaT

Works well and the camera is working.

 

But SD card is not really detected. It takes photo but can't read in gallery if it is in SD.

 

App Explorer doesn't see anything.

 

The parameters of contact seems to bug too.

 

Good work ;)

One of the reasons I said camera is a bit temperamental, but it does actually save photos and videos. Try closing/restarting camera app or rebooting your device. Once you get the query to grant location access to camera app it should work after that.
 
SD card (only external SD card is supported) works fine as far as I can tell. All media is discovered under Music/Gallery/Video apps. Didn't test anything else and I have no clue what 'App Explorer' is. :P
Link to comment
Share on other sites

Guest KonstaT

Ok after a reboot SD card is detected but no intern memory and contact parameters is OK.

Internal SD card is not even supposed to be supported, same thing as with my CM11 build. Open C and Kis 3 have different internal storage partition layouts. Open C has a separate eMMC partition for internal SD card - Kis 3 emulates internal SD card on /data partition (/data/media). Can't manage both ways on single build and can't have everyone converting their devices into Kis 3's with shady windows flashers. Emulating SD card on such small /data partition (~2GB) would suck nevertheless.

Link to comment
Share on other sites

Guest okmikel

... converting their devices into Kis 3's ..

 

Is this possible and how? If I understood you right, the /data partition then will be ~4 instead of ~2 GB on a Open C.

 

Greetings

Mikel

Link to comment
Share on other sites

Guest KonstaT

Is this possible and how? If I understood you right, the /data partition then will be ~4 instead of ~2 GB on a Open C.

There's a link to a windows flasher in the stock ROMs thread. It's similar to the one that is used to flash 'unlocked' Firefox OS, it just has Kis 3 Android firmware.
 
The whole internal eMMC is total of 4GB. Bootloaders, radios, and various system partitions all take their share. Here are the layouts:
 
Open C. ~800mb /system (p12), ~1gb /data (p13), ~900mb SD card partition (p24)
shell@ZTE_P821A10:/ $ cat /proc/partitions
major minor  #blocks  name
 253        0     196608 zram0
 179        0    3817472 mmcblk0
 179        1      65536 mmcblk0p1
 179        2        512 mmcblk0p2
 179        3        128 mmcblk0p3
 179        4         32 mmcblk0p4
 179        5        512 mmcblk0p5
 179        6        500 mmcblk0p6
 179        7      10240 mmcblk0p7
 179        8        500 mmcblk0p8
 179        9       1024 mmcblk0p9
 179       10       1536 mmcblk0p10
 179       11       1536 mmcblk0p11
 179       12     786432 mmcblk0p12
 179       13    1048576 mmcblk0p13
 179       14      32768 mmcblk0p14
 179       15     262144 mmcblk0p15
 179       16      10240 mmcblk0p16
 179       17       1024 mmcblk0p17
 179       18       1536 mmcblk0p18
 179       19          1 mmcblk0p19
 179       20          8 mmcblk0p20
 179       21          4 mmcblk0p21
 179       22      10240 mmcblk0p22
 179       23          4 mmcblk0p23
 179       24     933871 mmcblk0p24
 179       32       4096 mmcblk0rpmb

 

Kis 3. ~900mb /system (p12), ~1.9gb /data (p13), no SD card partition

shell@ZTE-P821E10:/ $ cat /proc/partitions
major minor  #blocks  name
 253        0     196608 zram0
 179        0    3817472 mmcblk0
 179        1      65536 mmcblk0p1
 179        2        512 mmcblk0p2
 179        3        128 mmcblk0p3
 179        4         32 mmcblk0p4
 179        5        512 mmcblk0p5
 179        6        500 mmcblk0p6
 179        7      10240 mmcblk0p7
 179        8        500 mmcblk0p8
 179        9       1024 mmcblk0p9
 179       10       1536 mmcblk0p10
 179       11       1536 mmcblk0p11
 179       12     917504 mmcblk0p12
 179       13    1900527 mmcblk0p13
 179       14      32768 mmcblk0p14
 179       15     262144 mmcblk0p15
 179       16      10240 mmcblk0p16
 179       17       1024 mmcblk0p17
 179       18       1536 mmcblk0p18
 179       19          1 mmcblk0p19
 179       20          8 mmcblk0p20
 179       21          4 mmcblk0p21
 179       22      10240 mmcblk0p22
 179       23       6127 mmcblk0p23
 179       32       4096 mmcblk0rpmb

 

Partitions by-name:

shell@ZTE_P821A10: $ ls -l /dev/block/platform/msm_sdcc.1/by-name
lrwxrwxrwx root     root              1970-01-01 02:10 DDR -> /dev/block/mmcblk0p4
lrwxrwxrwx root     root              1970-01-01 02:10 aboot -> /dev/block/mmcblk0p5
lrwxrwxrwx root     root              1970-01-01 02:10 boot -> /dev/block/mmcblk0p7
lrwxrwxrwx root     root              1970-01-01 02:10 cache -> /dev/block/mmcblk0p15
lrwxrwxrwx root     root              1970-01-01 02:10 factory -> /dev/block/mmcblk0p21
lrwxrwxrwx root     root              1970-01-01 02:10 fsc -> /dev/block/mmcblk0p19
lrwxrwxrwx root     root              1970-01-01 02:10 fsg -> /dev/block/mmcblk0p18
lrwxrwxrwx root     root              1970-01-01 02:10 grow -> /dev/block/mmcblk0p24
lrwxrwxrwx root     root              1970-01-01 02:10 misc -> /dev/block/mmcblk0p17
lrwxrwxrwx root     root              1970-01-01 02:10 modem -> /dev/block/mmcblk0p1
lrwxrwxrwx root     root              1970-01-01 02:10 modemst1 -> /dev/block/mmcblk0p10
lrwxrwxrwx root     root              1970-01-01 02:10 modemst2 -> /dev/block/mmcblk0p11
lrwxrwxrwx root     root              1970-01-01 02:10 pad -> /dev/block/mmcblk0p9
lrwxrwxrwx root     root              1970-01-01 02:10 persist -> /dev/block/mmcblk0p14
lrwxrwxrwx root     root              1970-01-01 02:10 recovery -> /dev/block/mmcblk0p16
lrwxrwxrwx root     root              1970-01-01 02:10 rpm -> /dev/block/mmcblk0p6
lrwxrwxrwx root     root              1970-01-01 02:10 safeKeybox -> /dev/block/mmcblk0p23
lrwxrwxrwx root     root              1970-01-01 02:10 sbl1 -> /dev/block/mmcblk0p2
lrwxrwxrwx root     root              1970-01-01 02:10 sdi -> /dev/block/mmcblk0p3
lrwxrwxrwx root     root              1970-01-01 02:10 splash -> /dev/block/mmcblk0p22
lrwxrwxrwx root     root              1970-01-01 02:10 ssd -> /dev/block/mmcblk0p20
lrwxrwxrwx root     root              1970-01-01 02:10 system -> /dev/block/mmcblk0p12
lrwxrwxrwx root     root              1970-01-01 02:10 tz -> /dev/block/mmcblk0p8
lrwxrwxrwx root     root              1970-01-01 02:10 userdata -> /dev/block/mmcblk0p13
Link to comment
Share on other sites

Guest okmikel

 

There's a link to a windows flasher in the stock ROMs thread. It's similar than the one that is used to flash 'unlocked' Firefox OS, it just has Kis 3 Android firmware.
 
The whole internal eMMC is total of 4GB. Bootloaders, radios, and various system partitions all take their share.

 

Ok, I see.

 

I used the flasher for first-time flash my Open C to 4.4.2 stock firmware (the dealer I got the phone from gave me the link) and so I already have the Kis 3 layout.

 

Thanks.

 

Greetings

Mikel

Link to comment
Share on other sites

Guest papyloup

After some days using it, i can say no major bugs.

 

Only the referenced bug of the MMS when in wifi. (doesn't download if in wifi but works in 3G)

Link to comment
Share on other sites

Guest KonstaT

Do you plan to release a build of FFOS 2.1?

I plan to stick with CAF releases and it's the only way to do this based on KitKat anyway. These usually come little behind but are much more stable than B2G master branches which are quite buggy or sometimes even plain broken. There's actually very little to gain by going bleeding edge here.

Link to comment
Share on other sites

Guest spalock

OK, thanks for the clarification.

 

I'm trying to figure out what does you build is made of (I am a smart phone newbie). It looks like your sources are a blend of CAF, mozilla B2G and some zte open source stuff.

AFAIK, FFOS is made of the layers Gonk, Gecko and Gaia: would you mind to explain how do these layers are related to the sources?

Link to comment
Share on other sites

Guest KonstaT

OK, thanks for the clarification.

 

I'm trying to figure out what does you build is made of (I am a smart phone newbie). It looks like your sources are a blend of CAF, mozilla B2G and some zte open source stuff.

AFAIK, FFOS is made of the layers Gonk, Gecko and Gaia: would you mind to explain how do these layers are related to the sources?

Let's start this by giving a little praise for Qualcomm. They provide hardware reference platforms (e.g. msm8610 in this case) for their customers and they provide reference software for their platforms. Best part is that significant amount of this is open sourced (Code Aurora Forum).
 
So every piece of software there is for any Qualcomm device out there, has initiated from CAF at some point. CAF has active projects to provide both Android and Firefox OS for select reference platforms. Qualcomm has created forks of both OS's adding hardware adaptation for their platforms and other software enhancements. Their customers (OEMs and ODMs) can take a tagged CAF release and start making modifications specific for their hardware (usually they've chosen hardware components outside refence design e.g. LCD panels, touchscreens, sensors, cameras, etc) or if they want to create software 'enhancements' (e.g. TouchWiz, Sense, etc Android skins).
 
Also ZTE's stock Firefox OS firmware is of course based on CAF (tag LNX.LF.3.2-22300-8x10.1 to be precise). It would have been a lot easier to do something based on that but not remotely as interesting. There's also few valid reasons for this. There's no kernel source for the Jelly Bean based Firefox OS available (ZTE hasn't released it even though I've requested it several times!). It's easier/more sensible to upgrade a Open C to KitKat than to downgrade a Kis 3 to Jelly Bean. Newer is usually better (in case of KitKat - it really is :)).
 
I've taken a new CAF release and added adaptation for hardware ZTE has used on this device (with bits extracted from ZTE stock firmware and Android KitKat kernel source ZTE has released). Basically the same thing that an OEM/ODM would do, just without any test/release cycles. :P
 
As for individual Firefox OS components and their relation to Mozilla sources. They're all CAF forks but afaik Qualcomm also contributes back to upstream Mozilla sources. They're still the very 'highest' level of hardware adaptation (hooking up with Android HALs) or even something that you see on your screen in the end. What CAF provides, is also the lower level of hardware adaptation below that (starting from Linux kernel all the way to usespace hardware abstraction layers). This also the part Firefox OS shares with Android. They've just replaced Android's dalvik java emulation with webcompositor that runs HTML/CSS/JS webapps if you cut few corners.
 
As for these sources, it might be even possible to replace gonk/gaia/gecko with Mozilla upstream master branch versions and keep just the lower level of CAF adaptation in similar fashion it's actually done on 'normal' B2G builds (Mozilla-B2G).
Link to comment
Share on other sites

Guest spalock

Thanks a lot for your thorough explanations :)

I've installed you build and up to now everything is smooth but the wifi connection through SIM card authentication and the android splash screen (which I changed to the FFOS one thanks to your other topic).

Link to comment
Share on other sites

Guest KonstaT

I am trying to figure out how to first repoduce your build, then try to upgrade FFOS to 2.1.

Is that repo the entry point I should start with?

Yes, that's the place to start.
 
Instructions there are missing the part of applying patches from the patches directory (I was too lazy to fork every project over a single patch). Copy each patch into to the project directory of a same name (e.g. frameworks/av), change into directory and apply with
git am patchname.patch
 
'make' will create fastboot flashable images. If you want to create recovery flashable packages ('make otapackage'), you need to copy signapk.jar into out/host/linux-x86/framework/ first. There's no java in B2G build system to compile it from the source.
 
Also updating to the very latest CAF tag broke translations. There's few options:
1) Use the previous tag that was used to make the build in the OP.
2) Reset HEAD in compare-locales to commit 1c880a1258b7d96641010c90ed9b9bd0cc43b39d
3) Revert this commit so extra languages are not included in the build
Link to comment
Share on other sites

Guest spalock

Thanks a lot :-)

Are there any documentations available somewhere (can't find anything on CAF website) on the manifest contents, the lunch tool and the make targets?

 

edit: can't find any advanced doc on mozilla dev site neither

 

edit 2: I just found some manifest format doc under .repo/repo/doc

Edited by spalock
Link to comment
Share on other sites

Guest KonstaT

Thanks a lot :-)

Are there any documentations available somewhere (can't find anything on CAF website) on the manifest contents, the lunch tool and the make targets?

 

edit: can't find any advanced doc on mozilla dev site neither

 

edit 2: I just found some manifest format doc under .repo/repo/doc

That's all part of general Android build environment. As you already found, repo has documentation for manifests. lunch is a macro of build/envsetup.sh script and you can read what it exactly does from there. There's also good documentation in CyanogenMod wiki which covers the basics of building something that is based on AOSP.
Link to comment
Share on other sites

Guest spalock

I just got my first build done, all things went pretty much smoothly but the broken translation stuff for which your fix #2 did not work and I used #3.

 

Now I'll try to get the most conservative path for trying that build. :unsure:

After due backup, is it possible to try it in a 'fastboot boot' way so the phone boots the build without flashing?

Link to comment
Share on other sites

Guest KonstaT

I just got my first build done, all things went pretty much smoothly but the broken translation stuff for which your fix #2 did not work and I used #3.

 

Now I'll try to get the most conservative path for trying that build. :unsure:

After due backup, is it possible to try it in a 'fastboot boot' way so the phone boots the build without flashing?

Solution #2 works because it's what I use. ;)

cd compare-locales
git reset --hard 1c880a1258b7d96641010c90ed9b9bd0cc43b39d

If you 'repo sync' you have to do that again.

 

There's no way to fastboot boot a system image.

Link to comment
Share on other sites

Guest spalock

Dammit, I did a soft reset. :o

 

Edit: hard reset did not help, the file gaia/locales/languages_full.json does not exist. (using CAF tag LNX.LF.3.5.1-06900-8x10.0.xml)

Edited by spalock
Link to comment
Share on other sites

Guest KonstaT

Edit: hard reset did not help, the file gaia/locales/languages_full.json does not exist. (using CAF tag LNX.LF.3.5.1-06900-8x10.0.xml)

It should be there. I've added a patch for that that gets automatically applied with the other qcom gaia/gecko patches. You could try forcing the b2g_autogen_ephemeral_branch creation (sometimes needed after a 'repo sync' for some strange reason).
. build/envsetup.sh
. device/qcom/b2g_common/vendorsetup.sh force
Link to comment
Share on other sites

Guest spalock

It worked now, thanks again.

 

I am about to flash and I just noticed that USB share does not work (all required settings enabled) , is it normal?

 

edit: I was able to mount the share with CWM.

Edited by spalock
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.