Re create B2G based on Android

If the above drafted approach means we need to write Java I’m out.
I avoid Android because of all that cruft to get a Java development environment up and running (JRE/JDK, Android Studio and so on). I want to hack in Vim :slight_smile:

it goes in the direction, @m.ducorps suggested: Why can’t we stick on the current gecko version and finish the work we had in progress with it? This way we have something to show. Why do we need to participate in the Rapid Release cycle of Firefox instead of focussing on the ESR (extended support releases)? We would have more time for each iteration.

@benfrancis What would be needed on Mozilla side to implement B2G as System App (like Firefox Hello was)?

I’m refusing this. To me, Firefox OS was attractive because it offered a way for developing countries to enter the web. Now we back down and let Android win there. Devices spotting 1GB of RAM or more are too expensive.
We have some community members from India here. Can you provide insight? I’m thinking on the time Android One launched in your country. What does it looked light against the stripped down Firefox OS?

1 Like

Just for the record. Some information may be wrong. Please correct me in that case. I just want to mention, that there were more alternatives discussed on Telegram/IRC than written down here.

On Telegram, @israel.c.rocha (?) suggested about building on top of NodeOS

Or transforming it into something like Plasma mobile framework like suggested by @JBB. So essentially another DE for a Debian phone.

@reinhart_previano brought up the one year old article Firefox OS and Ubuntu Touch: A possible solution for what ails them.

@TitanNano highlighted, that Google is pushing towards PWAs (Progressive Web-Apps) on Android. Could B2G OS realised as a flavour of that?

Did we linked already?
https://discourse.mozilla-community.org/t/should-we-worry-about-this/10407

Gerard Majax mentioned this repo on IRC:


(B2G OS as a desktop environment for laptop/computer if I understand correctly).

1 Like

I’ve hacked on Fennec’s Java code, and you don’t need any special editor. Sure you need the sdk and ndk, but that’s no big deal in my view.

Because that would only work for the first cycle. On the next one the code base will have changed so much that would be a huge task to sync up.

Hardware is getting cheaper and cheaper. At some point it’s more expensive to get low RAM configurations because no one ask for these anymore… Anyway we’re nowhere close to have an official device.

I seem to remember that building upon an Android base (and thereby taking advantage of its drivers and hardware support) and then sticking a web view straight on top of that was the original plan for B2G. But then AIUI we started hacking on the lower layers and effectively forked it.

Before going down this route, it might be good to ask old B2G folk why it didn’t work last time. Was it that we took our eye off the ball? If so, trying again might work. Was it commercial pressure for features? If so, trying again might work. Or was it that it just didn’t work technically? If so, you’d want to know why, because those reasons might still be valid.

Gerv

“building on an Android base” is vague. The important bit is what you consider to be part of the base. With the current gonk, it’s minimal: the kernel, the hardware abstraction layer, and not much else. Without gonk, we would also rely on more services like SurfaceFlinger, and the java bootstrap layer.

We went with Gonk in 2011 because we were targeting devices with low specs (256MB of RAM) and Google was changing the prerequisites for Android to something higher. So it made sense to not waste hw resources and go with our leaner stack. It’s also not a lot of code and was never a big maintenance burden, except the HW compositor.

The situation today on the hw side is different: we can afford to waste some memory if that helps us keeping the project alive. We just have to be clear with what devices we will run on.

1 Like

Still OS will be light as we don’t have any apps

B2G OS is not the only project that will be severely impacted by upcoming changes to Gecko:

Would it be worth collaborating with these projects to maintain a joint Gecko fork?

1 Like

Yeah in the early days there were performance problems and things like window management were tricky. Back then the base Android layers were also less flexible than they are now. A gecko-based web view on top of a stripped down Android might work today. It’s never going to be competitive power/battery-wise but at least it won’t be slow this time.

Anyway I hope to be able to keep the Gonk widget around because right now it’s still the best way to do this but no promises since I’m not the one calling the shots. I just advocate very loudly :slight_smile:

1 Like

I expect Fennec, as a modern, competitive Android browser, will have a tremendous number of
linkages to Android. I also looked at how hard it would be to layer a direct port of Webkit
on top of the Android HAL. No conclusions so far.

I tried Sailfish OS on a Nexus 5, and their browser was unfortunately quite sluggish.
Their approach probably supplies more of a warning than anything else.

I forgot that there are also commercial projects that are downstream users of Firefox OS / B2G OS:

  • All of Panasonic’s smart TVs are powered by Firefox OS
  • Acadine Technologies is trying to develop a commercial operating system (“H5OS”) based on Firefox OS

Both of these projects would probably also benefit from the creation of a joint Gecko fork.

I am very sorry to telling this:

  • Panasonic’s Firefox OS is based upon FreeBSD.
  • Acadine has failed.

We are the hope. :seedling:

1 Like

That doesn’t seem obvious to me, because all these projects face different issues: b2g OS doesn’t need XUL, TB & SM don’t need Gonk… PaleMoon is really on its own - I wish them luck with their goal of keeping support for XUL+xpcom addons while moving to a recent Gecko.

About the commercial users, I’m quite sure Panasonic had time to prepare a transition to another platform (remember that the announcement that we would not work with commercial partners anymore was in Decemeber 2015). Acadine Technologies has shut down so there’s nothing to expect from them.

Not a professional programmer here. Please accept my apologies for long and strong post.

What was/is the aim of the whole mozilla-B2G when it started? It was have webapps [0].

Given that cm-B2G [1] and old-original-B2G have stopped, I wonder why there is an opposition to java or ART or android?
In that case, why not join forces with cm or aosp devs in xda, create as many ROMs, stripped of every apks except ‘browser’. May be you remove all unwanted dependencies, APIs, icons etc unused by OS except your-branded-browser after securing webRTC[2]. This will mean any user CANNOT install any apps. This makes it secure and light weight. Given the fact without playservices my mobile (moto E) performs excellent compared to with playservices, all I can imagine is such a ROM would be fast(er) than with extra apps.

For your opensource Enthusiast: All the user can do is to visit mobile version of different sites. Safe that no website (so far) can steal your contacts (so far, I hope)

Business case: Perhaps any company (sponsor in future) may use this as a base to develop hardened mobile OS. Add a remote access tool this phone has which connects to the company VPN for email or remote ssh etc.

MAY BE: This would encourage websites to design progressive + mobile friendly sites [3]. To a certain extent then [0] would be achieved.

All this would then depend on one thing: Making the fastest and secure browser? It is(was) what mozilla or firefox did to desktop. Make each program do one thing well [Unix_philosophy].

As an analogy, please see cloudready[4]. Using ChromiumOS they build installation for multiple laptops outside of chromeOS’ original availability. I am not here defending google cloud but appreciating technical solution. While I understand desktop/laptop drivers are easier than the driver-hell in mobile OS space, it may be of encouragement such projects exist.

Please accept my apologies for long and strong post.

[0] https://en.wikipedia.org/wiki/Firefox_OS#cite_note-m.d.p_announce-10
[1] https://groups.google.com/forum/m/#!msg/mozilla.dev.fxos/J-JkWyNLCQI/jbOGUT8NEQAJ
[2] https://github.com/gorhill/uBlock/wiki/Prevent-WebRTC-from-leaking-local-IP-address
[3] From kskarthik91 https://cloudfour.com/thinks/the-business-case-for-progressive-web-apps/
[4] https://en.wikipedia.org/wiki/Neverware

I think there was many reasons to bring us to Firefox OS , not only webapps.
On my side, I like the idea to have a phone where everything is web , and easily modifiable , system too . Like webapps, apps are easy to port on the web and other systems, but there is only webapps, no other “native apps”.
And, I don’t want android (some problems with google) , and no more Apple or Microsoft. I had thrust in using a OS managed by Mozilla and not a big firm.

Exept Fabrice, anyone had started to test a geckoview in a homescreen ?

1 Like

The discussion here as well as on IRC seems to be focused on whether doing a Gonk fork or using Firefox for Android. But to me that is not the major concern at the moment. Here’s why:

The good thing is that both approaches need the same foundation. Based on this thread it seems apparent that even if there would be a Gonk fork, it should be kept as minimal as possible. This means that as many things as possible should be moved out into separate services (this is also something that has been mentioned in the past).

Those services would then be used independent of the underlying thing, being based on Gonk or a full Android Runtime. Same for the UI. It will just be modern Web technologies.

So the only difference left is the actual rendering. To me using Firefox for Android sounds simpler. Though if there is a lot of people that feel strongly about using Gonk, they can surely go for it. They can still use the work that has been done (if it is done) on the services and the UI.

My conclusion is that it doesn’t really matter if it’s Gonk or Firefox for Android for now as the huge bulk of work is independent of that decision.

Please correct me if I’m wrong.

2 Likes

I’m very sad as I just realized what really happened this year with Mozilla and B2G… I’ll try to help as much as I can with my limited (although expendable) knowledge. I own an Alcatel Fire E but I guess it would be easier to start with a Sony Z3 Compact. I don’t like Google, Android sources look awful to me but if it is the only (feasible) way to have a web oriented marketplace-free OS which can embrace the powers of front-end devs communities around the world, it will do.

Mozilla will make changes that broke all this part. This means we would have to adapt, and find a way (if possible) to keep the changes while still making gonk working.
If it was a simple task, there would be no issue.
Same if we were numerous.

Hey, I’m posting this on behalf of @astheroth because he is experiencing server erros whenever he tries to post to discourse. The following are his views:


Hello

I want to share my thoughts to question “base b2g on Android”.

  1. Philosophical Matters

We are on a special moment on the community. What we are thinking about the community goals now, would mark our future and the future of our efforts.

For that reason, what we think is important, for us and the people who want to join us.

What do we want?

This is main goal of our efforts. It appears that we want to maintain a mobile system which complains with open web standars and the freedom of its users. “Power to the user” would be a good motto in this sense.

But, there is a point. We are heirs right now. We recieve a history, ideals, a fighting which deserves our efforts, a way of thinking that we like.

Was Mozilla doing it right?

I guess that the answer is affirmative, at least, speaking on operative-system design.

Does it deserve to be maintained?

Maintaining b2g is the only way to keep our ideals walking.

It’s so harder, as many of you said before, but:

  • we do not have to create a system from nothing: the whole OS exists, for example, we don’t need to create a own kernel, compilation tools, etc; that work is already done.

  • We do not use any of hardest engineering techniques, as example, reverse engineering to reach our mobile system, for example, the haiku-os community, who, after 15 long years, has not re-created BeOS system absolutely. Currently, haiku-os is still in alpha. By the contrary, we have the possibility to access to the all related code, and, we are able to modify it, if we want.

  • We need our independence with us. Depending on Android in a “hard way” means sealing our future with it. Being the most supported platform today, will not mean it tomorrow. (Andromeda).

  1. Technical Limitations

Well, if we decide to keep b2g with the most fidelity as we can, we need to realize which it is not a harder work. In fact, no software development is an easy work.

All critical developments involve great technical knowledge, great amounts of resources and time, good relationship among us and our supporters, a lot of things those needs to join in some point to success.

It appears Hard and difficult, but I remember you FLOSS projects that had least possibilities to be successful, but history has shown the contrary:

  • A simple student experiment became one of pieces of software most used on the world. (Kernel Linux)

  • GNU project has started with a open letter to society.

  • Libreoffice has only twelve people as members when it started.

  • *bsd projects maintained by a small community around themselves ( I remind you that *bsd’s projects maintain whole operative systems)

Thinking on our technical limitations --we can’t do this-- only cut our own growth in something more. I think the right approach is "we can’t do this, yet…
We need to use the word “how” and ideas will appear on our minds.

  1. Future Plans

If we can organize ourselves, we could talk with enterprises, foundations, other FLOSS organizations, to ask their help, or propose the project. A first place to start is the former b2g interested --Panasonic, Telefonica, Deutsche Telecom, Alcatel and so on- With asking we don’t lose anything, but we open to possibility to get something.

Conclusion

We cannot think in short-term. Maintain a whole OS is a huge work and a work speaking in long-term. We cannot think only in short range of time, no if we want a project which shall be self- financed. ( I don’t believe that Mozilla will lend its resources per secula seculorum).

Our first priority is backup the code related to b2g. Our second priority is plaining how we could maintain it. The third priority is getting resources, donations, contacts, making campaigns, and doing our own foundation and only if we reach all of them, bring b2g to the next stage of its evolution.

It is possible. Again, Projects with least possibilities were (are) successful in their time and yet, today. It depends on the way which we offer (and what makes us different) to the geek-tech people and, if any, potential partners.

1 Like

I agree with @astheroth in theory. But I’d prefer to stay practical. If there would be commercial interest in such a project, B2G and H5OS wouldn’t have died.

From my own experience, building a community with people actually contributing and not only watching is a difficult task. Having a vision is great, but you need to have something that people get excited about and where they can get their hands dirty. I personally enjoy contributing bug reports/fixes to open source projects when I try them out and find issues. But if there’s nothing to try out, that’s just not possible. So for me the first step is to have something people can at least potentially contribute to.