[Pixel] Porting Thread

429 views
Skip to first unread message

utzcoz

unread,
May 26, 2019, 1:35:36 AM5/26/19
to Maru OS dev
Hi guys,

I have done some works for porting MaruOS to pixle(sailfish), and I think it's time to share my ROM to guys are interest in 
testing it. I have tested some basic function, including:

1. MaruOS can boot correctly, and show Linux in Android cast device and simulated secondary display.
2. Sdcard sharing for file and folder work correctly, and when I create file/folder in Linux, the Android can see the changes
intermediately, and it works fine when vice verse.
3. Network works fine, the Android and the Linux can surf the internet correctly.
4. Also the Android can call other or received other call, and send messages to other or receive messages from other.
5. And lastly, bluetooth keyboard/mice switch correctly when Linux is interactive.

But also, there are some problems in the ROM:

1. The device shows the corrupt alarm when booting device, because we doesn't lock the bootloader after flashing.
2. The Android will show vendor image mismatch alarm, because the Android checks the kernel config, and it wants to
all configs are same with its definition, but we open some configs to support lxc.

If everyone is interest in testing MaruOS with pixel, you can down ROM from the below link in google drive:

https://drive.google.com/file/d/16J3DSKb62qbsuosDP_kVAtVPoCGDDuYG/view?usp=sharing

md5sum: b00458a9784de54f2c1edc1e507b5451

After downloading, you should unlock your device, and open the adb debug option in your development options in settings.
And then downloading installer from MaruOS installer repository(https://github.com/maruos/installer), and follow below instructions
to flash MaruOS to your device:

1. If you use Windows, copy all images and android-info.txt to windows directory, and run install.cmd to install MaruOS  to your device.
2. If you use Linux, copy all images and android-info.txt to linux directory, and copy install.sh to linux directory, and then run ./install.sh
to install MaruOS to your device.
3. If you use macOS, maybe the method is same as Linux, I don't test it, sorry.

If someone finds serious bug or other advice, please tell me in this discussion. 

Thanks.

Old3nglish 800

unread,
Jun 21, 2019, 11:22:56 PM6/21/19
to Maru OS dev

Is this a Pie image?

If it boots on Sailfish I'll try it on Marlin.

Do you have a link to kernel source ?

Thank you for your contribution to the internet. Ghj

utzcoz

unread,
Jun 23, 2019, 11:39:34 AM6/23/19
to Old3nglish 800, Maru OS dev
The MaruOS is based on LineageOS 15, which is based on Android Oreo. So it's not Pie image. 

If you need kernel and device source, you can check my repositories for porting MaruOS to sailfish:
https://github.com/utzcoz/android_kernel_google_marlin

Maybe you just need to add new device for marlin with MaruOS, and copy sailfish defconfig, and change name for marlin to support MaruOS.

Hope it can help you.

--
You received this message because you are subscribed to the Google Groups "Maru OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maru-os-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/maru-os-dev/fa9ffb52-bbfe-48e4-a20f-1307a941b571%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mahin Ahmed

unread,
Aug 19, 2019, 12:50:25 PM8/19/19
to Maru OS dev
I am a Marlin user. I have pretty much good experience on building kernel. But I am confused with the documentation of MaruOS to Port it on a new device.
I am using Marlin, all I can do is building a perfect kernel for MaruOS. But I can't do anything further because I can't understand how it works and what I really need to do as starting built it.

Help will be appreciated :)

utzcoz

unread,
Aug 20, 2019, 6:13:18 AM8/20/19
to Mahin Ahmed, Maru OS dev
Yes, the docs in MaruOS github repository for porting are simple, only essential information. 

Actually, the one of most important part of MaruOS is LXC. The MaruOS uses the LXC to run the Linux container, so if we want to port MaruOS to other devices,
we should provide your device with the ability to run LXC. The LXC needs some kernel config to run correctly, such as NS. So we should enable essential configs
is an example I have done for enabling LXC needed configs in Pixel kernel. I copy the origin defconfig, and add LXC part to it. And my commit provides a method
to check whether the configs needed by LXC are all enabled.

> We can use CONFIG=kernel/google/marlin/arch/arm64/configs/maru_marlin_defconfig lxc-checkconfig to check lxc configs if lxc is installed in development machine.

Because Pixel and Marlin use the same kernel, so my modification can be used for Marlin logically.

After enabling LXC in kernel, you should import MaruOS device config for your device config. I have done it for Pixel

If you like, you can check my repositories, and find example for your next porting.


Hope those information are useful for you.

--
You received this message because you are subscribed to the Google Groups "Maru OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maru-os-dev...@googlegroups.com.
Message has been deleted

utzcoz

unread,
Aug 20, 2019, 8:31:42 AM8/20/19
to Jidobaba, Preetam D'Souza, Maru OS dev

 is Docker absolutely necessary for this?

Because we should use debian envrionment to build debian rootfs, MaruOS provides docker template
to establish a usable building environment for building. 

a. If you don't build debian rootfs, and your desktop OS is debian or ubuntu, the docker is not necessary. You can follow the AOSP guide to build MaruOS. 
b. If you want to build debian rootfs, and your desktop OS is ubuntu, the docker is necessary, because some dependencies used to build rootfs don't exist in ubuntu.

is it just a matter of editing the code?

If you want to porting MaruOS to other device, or add features or fix bugs to MaruOS, maybe you should edit MaruOS code to test your function. You say you want to
port MaruOS to Pocophone, yes, you must edit the code for porting.

Because docker needs to download 50gb of repos

The AOSP is very huge, so the MaruOS is also huge very much. Maybe you can connect a network with large bandwidth, and use it to download MaruOS code. I recommend
you to download MaruOS code to your development machine, and use @Preetam D'Souza 's docker template to build MaruOS. It will mount your local source directory to docker
container automatically.

The MaruOS bases on LineageOS, and LinegaOS bases on AOSP, so MaruOS assumes the developer is familiar with AOSP's building. If you are not familiar, maybe you can read
AOSP official document for how to download and build AOSP(https://source.android.com/setup).


On Tue, Aug 20, 2019 at 6:50 PM Jidobaba <crixt...@gmail.com> wrote:
@utzcoz, is Docker absolutely necessary for this? Or is it just a matter of editing the code? Because docker needs to download 50gb of repos.... I'm trying to build maru for Pocophone btw


--
You received this message because you are subscribed to the Google Groups "Maru OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maru-os-dev...@googlegroups.com.
Message has been deleted

Mahin Ahmed

unread,
Aug 20, 2019, 12:40:50 PM8/20/19
to Maru OS dev
Okay, I already have the kernel for MaruOS and included External WiFi Support to use Kali Nethunter WiFi Tools :P.

Anyway, that isn't fact..

I have much knowledge about kernel, already built so much kernels. But I need to know about the /Vendor directory.

In the MaruOS documentary, they told to download the drivers for Nexus and pixel devices directly from Google's website and extract the tar file which will generate the /vendor folder.
I am confused about it. What things I really need to make the full maruOS zip?

Kernel is necessary I know.

But I didn't understand what they meant about vendor directory.

Sorry for asking such a noob questions, but I am still learning building ROMs for Android, I just learn building kernel, not others.

Thanks 😊

Preetam D'Souza

unread,
Aug 21, 2019, 6:33:16 PM8/21/19
to Maru OS dev
Yeah, @utzcoz has opened an issue on our GitHub to prioritize improving our porting docs for folks who are not familiar with AOSP. I agree that the porting docs can be much improved to eliminate these common pitfalls. I am going to improve it soon.

To answer your question quickly, the vendor directory contains a bunch of proprietary binaries that aren't shipped with AOSP / LineageOS / Maru, but are necessary to fully use your hardware. They have to be pulled from the factory images for your device. Since this is a common problem for ROM builders, there are a few approaches out there to get them:

1) For the vendor directory for Pixel devices specifically, you can use https://github.com/anestisb/android-prepare-vendor. These are a set of scripts that will pull all the vendor binaries from a factory Pixel image and neatly leave you with a /vendor directory you can simple move under your vendor/ directory in your Maru / AOSP source tree. This is the preferred approach and is used by Maru for the Nexus 5X as well.

2) Another alternative for vendor binaries to quickly get started is to use https://github.com/TheMuppets/proprietary_vendor_google. All you need to do is clone that repo to vendor/google under your Maru workspace.

3) For older devices that do not use a separate vendor partition, I maintain a set of scripts to generate a vendor directory from a factory image: https://github.com/pdsouza/android-generate-vendor. This is used for Nexus 5 and Nexus 7, and can easily be extended for other devices, as long as they do not use a separate vendor partition.

It is definitely confusing, so don't feel bad about your questions!

Jay V

unread,
Sep 21, 2019, 11:42:12 AM9/21/19
to Maru OS dev
Are you maintaining the port up to maru 0.6.7?is this stable on your pixel as a daily driver?

Jay V

unread,
Sep 21, 2019, 9:35:40 PM9/21/19
to Maru OS dev
Also no sound support on MaruOs? Can you confirm this?

Preetam D'Souza

unread,
Sep 26, 2019, 9:54:39 PM9/26/19
to Maru OS dev
That is correct, no sound from Maru Desktop. There are ways to get sound to work via PulseAudio if you search on this forum - we still need to integrate this into our official builds.

Jay V

unread,
Sep 27, 2019, 4:27:55 AM9/27/19
to Maru OS dev
Okay I think it's the same way I get sound on Userland with xsdl or termux, just a bit choppy.

Alexander Borsi

unread,
Nov 9, 2019, 1:50:03 PM11/9/19
to Maru OS dev
So, what needs to be done to become a tester of this? I have a pretty nice Pixel XL (Marlin) and I want to help make this device become part of the 'officially' supported devices.

Preetam D'Souza

unread,
Nov 10, 2019, 10:08:00 AM11/10/19
to Maru OS dev
We'll have a build for Pixel XL (marlin) in our next release 0.6.9 within this month that you can help test! If you want to try it out earlier, perhaps our maintainer @utzcoz can link you to one of his developer builds.

Alexander Borsi

unread,
Nov 11, 2019, 12:06:29 AM11/11/19
to Maru OS dev
I think I will wait until the 'official' version to come out, because this is my daily driver.

Preetam D'Souza

unread,
Nov 27, 2019, 8:10:57 PM11/27/19
to Maru OS dev
BTW, we now have official Pixel builds: https://maruos.com/downloads/

Adam Whitney

unread,
Dec 5, 2019, 4:58:38 PM12/5/19
to Maru OS dev
Are there any booting builds for pixel xl marlin, yet?  I finally got a docker build to finish, but I had vndk errors that made it unbootable.

utzcoz

unread,
Dec 8, 2019, 10:15:13 AM12/8/19
to Adam Whitney, Amir Nobandegan, Maru OS dev
@Amir Nobandegan , you can sync current MaruOS code, and lunch the product maru_marlin-userdebug to build.
What another thing you need do is use  https://github.com/anestisb/android-prepare-vendor to generate vendor image for Pixel. 


--
You received this message because you are subscribed to the Google Groups "Maru OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maru-os-dev...@googlegroups.com.

Preetam D'Souza

unread,
Dec 11, 2019, 2:20:34 PM12/11/19
to Maru OS dev
BTW, I hope to include early Pixel XL builds in the next release 0.6.9.

utzcoz

unread,
Dec 12, 2019, 1:20:05 AM12/12/19
to Preetam D'Souza, Maru OS dev
No problem. I will add pixel XL document.

On Thu, Dec 12, 2019, 3:20 AM Preetam D'Souza <preetam...@gmail.com> wrote:
BTW, I hope to include early Pixel XL builds in the next release 0.6.9.

--
You received this message because you are subscribed to the Google Groups "Maru OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maru-os-dev...@googlegroups.com.

Preetam D'Souza

unread,
Dec 12, 2019, 1:42:19 PM12/12/19
to utzcoz, Maru OS dev
That would be great - thanks @utzcoz!
--

Sándor Gazdag

unread,
Feb 8, 2020, 12:21:21 PM2/8/20
to Maru OS dev
Hi Guys!

Is there a working zip for marlin I can flash to my phone? I'd really like to test it.

Thanks!


On Thursday, December 12, 2019 at 7:42:19 PM UTC+1, Preetam D'Souza wrote:
That would be great - thanks @utzcoz!

On Thu, Dec 12, 2019 at 1:20 AM utzcoz <utz...@gmail.com> wrote:
No problem. I will add pixel XL document.

On Thu, Dec 12, 2019, 3:20 AM Preetam D'Souza <preetam...@gmail.com> wrote:
BTW, I hope to include early Pixel XL builds in the next release 0.6.9.

--
You received this message because you are subscribed to the Google Groups "Maru OS dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maru-...@googlegroups.com.

Preetam D'Souza

unread,
Feb 25, 2020, 8:02:30 PM2/25/20
to Maru OS dev
@utzcoz had it working and added to our official builds a few months ago. We plan to release an official build in the next release. It was delayed due to a block we had on moving Maru Desktop from stretch to buster...but I think we will just hold off on that for later. I'm planning to get a build going soon.

loicp...@gmail.com

unread,
Jul 29, 2020, 10:58:59 AM7/29/20
to Maru OS dev
Hi all.

I managed to build maru-0.7 for marlin and sailfish.
I have no clue if it boot and/or if the desktop works as I do not have these phones.

Testers wanted.
Reply all
Reply to author
Forward
0 new messages