[LG G4 (H815) ] Porting Thread

2,407 views
Skip to first unread message

Dionis L

unread,
Nov 15, 2016, 1:00:36 PM11/15/16
to maru-...@googlegroups.com
Hello ,

I started today porting for LG G4 (H815) , I just received the phone.
I have big hopes this will work good.
I have to merge the sources from lg with the ones of maru os .
I will keep you updated

UPDATE:


Maru OS + Lineage OS 13 (Android 6.0.1) + GAPPS for LG G4.

Here it is the TWRP backup from my phone , you have to restore this into your LG G4.

-Extract the TWRP folder on a sdcard ,and insert the sdcard into the phone.The TWRP folder must to be in root of the sdcard.
-Boot into twrp .
-Do a full wipe ,chose to wipe : system ,data , Davik cache , cache  partitions .
-Do also a Factory Reset .
-Do a restore and restore the boot and system , partitions fom the sdcard .
-Choose in TWRP : Reboot System  .
-The first phone start up may take few minutes , PLEASE LET IT TO FINISH BOOT , it have to uncompress a 1.7 Gb Debian image .

SSH user: maru , password : attary . Mysql user root password attary .

You have to :
-Install from the playstore the Google Webview app ,is better than AOSP one.
-Disable Lineage OS updates checker from System app , and NEVER let it update to another Lineage OS version if you want to have Maru OS working .

Download from : https://www.androidfilehost.com/?fid=961840155545593574
Screenshot_20170906-112959.png
Screenshot_20170906-113012.png
Screenshot_20170906-112923.png
Screenshot of jessie:0 at 2017-09-06 11:35:22.png

Preetam

unread,
Nov 15, 2016, 2:38:51 PM11/15/16
to maru-...@googlegroups.com
* Moving conversation over from https://github.com/maruos/maruos/issues/25#issuecomment-260732972

These are the repos that you will need to check that have Maru OS changes for merging with LG's sources:
https://github.com/maruos/android_platform_frameworks_base
https://github.com/maruos/android_platform_frameworks_native
https://github.com/maruos/android_platform_packages_apps_Settings

You will need to add the following repo to your vendor/ directory that has all the device-independent changes for Maru OS:
https://github.com/maruos/vendor_maruos

Finally, you will need to add a product configuration file that will add maru_<device> to your lunch menu and include the stuff from vendor/maruos:
There are a few more things needed, but this should at least get you the right product to build in the lunch menu.

Dionis L

unread,
Nov 15, 2016, 2:58:38 PM11/15/16
to Maru OS dev
Hello ,
This is great info .Thank you very much ! I have a little question , in my vendor dorectory there is alread a 'lg' directory  so is "vendor/lg" , if i add vendor/maru  , will also lg one be included automaticaly ?
I think so , but im not sure

Dionis L

unread,
Nov 15, 2016, 3:39:03 PM11/15/16
to Maru OS dev
if we do at compile time , lunch 1 , I think he choose /device/generic   ?

Preetam

unread,
Nov 15, 2016, 3:56:51 PM11/15/16
to Maru OS dev
Yes, you can add vendor/maruos without issues.

And yes, lunch 1 is usually /device/generic.

Dionis L

unread,
Nov 15, 2016, 4:08:09 PM11/15/16
to Maru OS dev
So , to make maru work when we ,at compile time ,run "lunch" and select option 1 , we must to do :

-----------------------------------------------------------
in file  ./device/generic/armv7-a-neon/AndroidProducts.mk

must to add:


PRODUCT_MAKEFILES += \
    $(LOCAL_DIR)/maru_hammerhead.mk

-----------------------------------------------------
Then  copy ./device/lge/hammerhead/maru_hammerhead.mk to ./device/generic/armv7-a-neon/

Remove from it the line:

-$(call inherit-product, device/lge/hammerhead/full_hammerhead.mk)


My interes is maru to be integrated when we select first option at "lunch"
Please let me know .
Thank you

Dionis L

unread,
Nov 15, 2016, 4:17:25 PM11/15/16
to Maru OS dev
I just build the android following the lg instructions  .

#### make completed successfully (32:07 (mm:ss)) ####

Compialtion is ok , I put the "source from LG" website over the android-6.0.1_r72 source , the one taht is now in mauru .

So all is fine for now .

Now I have to put the "source from LG" , over the mauru os sources that i got with repo.
But lg say , me to select first option from lunch menu .So I can not select hammerhead option .
So i have to make sure maru is loaded also when I select first option from lunch .

Dionis L

unread,
Nov 15, 2016, 4:28:43 PM11/15/16
to Maru OS dev
Or I just replace :
$(call inherit-product, device/lge/hammerhead/full_hammerhead.mk)

with
$(call inherit-product, /device/generic/armv7-a-neon/mini_armv7a_neon.mk)

In the ./device/lge/hammerhead/maru_hammerhead.mk

So I can also select maru from lunch ,I think is better!

Dionis L

unread,
Nov 15, 2016, 5:12:56 PM11/15/16
to Maru OS dev
Can you please modify the source on git so ,  when we select at lunch:  aosp_arm-eng  , the first option of lunch , it to include maru os too?

I think other non hammerhead phones need to select this option at lunch ,the first option . So if maru is enable at option 1 all will be great and will be a lot easier for others to port  it .
I did modifications myself but I'm not sure I did all that needed so lunch first option to include maru os.

Preetam

unread,
Nov 15, 2016, 7:52:36 PM11/15/16
to Maru OS dev
Hmmm interesting.

I am not sure how LG is distributing their sources so I will need to take a look to see what's possible.

But it would be nice if we can create a device/lge/g4 directory just like device/lge/hammerhead is right now and create a maru_g4.mk file that is added to the lunch menu that will pull all of LG's changes. There may need to be some significant work done to transfer all of LG's modifications over to that format.

Let me download the same LG sources files that you are using and take a look at how they are setting up the device configuration files.

Tyler Martin

unread,
Nov 15, 2016, 8:27:29 PM11/15/16
to Maru OS dev
I don't think you're going to find a device tree on LG's open source site. I could be mistaken but I think the best bet is to repo sync maru and then use a device tree from Cyanogenmod or something like that. Vendor tree can be found here TheMuppets Github page. Or this guy has an aosp build for the G4.

Dionis L

unread,
Nov 15, 2016, 8:37:22 PM11/15/16
to Maru OS dev
I got from http://opensource.lge.com/osSch/list?types=ALL&search=H815 the file LGH815_Android_Marshmallow_V20i  . They say to uncompress it over original android source code from goole.
So i untared it directly over mauru os.

I did some mods like :


 replace :
$(call inherit-product, device/lge/hammerhead/full_hammerhead.mk)

with
$(call inherit-product, /device/generic/armv7-a-neon/mini_armv7a_neon.mk)

In the device/lge/hammerhead  directory cause i try to compile maru os for generic , not for hammerhead .
So i tried to remove all what is hammerhead , and make it like generic , all mods i did was in hammerhead directory .

I selected maru_hammerhead at lunch , it build fine .
I say it included desktop rootfs too . I'm not usre if it included the files I got from lg , I'm not sure if I need blobs or not , cause LG just say to uncompress that , but build was done .
Now I have to compile the kernel from lg too .And I will see how is worcking .

Dionis L

unread,
Nov 15, 2016, 9:15:32 PM11/15/16
to Maru OS dev
I think it will be easier that I was afraid .

http://forum.xda-developers.com/g4/development/rom-android-source-project-t3337687

He compiled aosp android source for Lg g4 , and his android on G4 looks like on nexus 5 :)
So I think all i have to take from : http://forum.xda-developers.com/g4/development/rom-android-source-project-t3337687

the kernel source ,
the device tree
vendor ,

And copy all maru from ,devices/hamerhead  to devices/lge .So building for lge to include also maru os .
I think This will be all what I have to do for now

Dionis L

unread,
Nov 15, 2016, 9:35:50 PM11/15/16
to Maru OS dev
I'm trying to figure out where :
https://github.com/cile381/android_device_h815
https://github.com/cile381/vendor_aosp

must to go into maru os I got with repo , I ' not sure If I need to run some '.sh' file smiself from the to repos above

Tyler Martin

unread,
Nov 15, 2016, 9:39:18 PM11/15/16
to Maru OS dev
I can try to help you out and give you a manifest to sync but I won't be able to until tomorrow.

Dionis L

unread,
Nov 15, 2016, 9:47:43 PM11/15/16
to Maru OS dev
Have you ever seen this error ?
----------------------
Installed file list: out/target/product/armv7-a-neon/installed-files.txt
Target system fs image: out/target/product/armv7-a-neon/obj/PACKAGING/systemimage_intermediates/system.img
Running:  mkuserimg.sh out/target/product/armv7-a-neon/system out/target/product/armv7-a-neon/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 576716800 -D out/target/product/armv7-a-neon/system -L system out/target/product/armv7-a-neon/root/file_contexts
make_ext4fs -T -1 -S out/target/product/armv7-a-neon/root/file_contexts -L system -l 576716800 -a system out/target/product/armv7-a-neon/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/armv7-a-neon/system out/target/product/armv7-a-neon/system
error: ext4_allocate_best_fit_partial: failed to allocate 14913 blocks, out of space?
Creating filesystem with parameters:
    Size: 576716800
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7040
    Inode size: 256
    Journal blocks: 2200
    Label: system
    Blocks: 140800
    Block groups: 5
    Reserved block group size: 39
error: failed to build out/target/product/armv7-a-neon/obj/PACKAGING/systemimage_intermediates/system.img from out/target/product/armv7-a-neon/system
Out of space? the tree size of out/target/product/armv7-a-neon/system is (MB):
629    out/target/product/armv7-a-neon/system
The max is 550 MB.
build/core/Makefile:1018: recipe for target 'out/target/product/armv7-a-neon/obj/PACKAGING/systemimage_intermediates/system.img' failed
make: *** [out/target/product/armv7-a-neon/obj/PACKAGING/systemimage_intermediates/system.img] Error 1
----------------------------------

My hdd have spece ,whoilimiting the image size?

Dionis L

unread,
Nov 15, 2016, 10:02:21 PM11/15/16
to Maru OS dev
So , it Loos liell we have to do is to take this :
https://github.com/cile381/android_device_h815
https://github.com/cile381/vendor_aosp

And add them to device to maruos , and configure them to include maruos.mk ,and to apear in "lunch" a maru_lge_g4 or smth

Tyler Martin

unread,
Nov 15, 2016, 10:02:34 PM11/15/16
to Maru OS dev
I think it means that the system parition on your phone is only 550mb and you're building a system image that is 629mb. 

Dionis L

unread,
Nov 15, 2016, 10:05:39 PM11/15/16
to Maru OS dev
Yes , you right , I have to use this https://github.com/cile381/android_device_h815  , beacuse it contains the right BoardConfig.mk ,I was used a BoardConfig.mk from mini version

Dionis L

unread,
Nov 16, 2016, 12:43:19 AM11/16/16
to Maru OS dev
I want to integrate this , https://github.com/cile381/android_device_h815/
But I do not know if I still need to extract blobs if I extract the sources from LG. Maybe taht source already contans the firmware?

Tyler Martin

unread,
Nov 16, 2016, 11:53:03 AM11/16/16
to maru-...@googlegroups.com
I'm not sure what directory your source is synced in currently but what I'd like you to do is to go one directory up, create a new folder called LG_Maru and then open a terminal window in the new folder. (Example: My source is synced in /media/data/Android/Maru_Marsh. If I followed my directions, I'd go to /media/data/Android, create a new folder named LG_Maru and then open terminal there.)

Next sync with this manifest: repo init -u git://github.com/TMartinPPC/maru_g4_h815_manifest.git -b master

Then run repo sync.

This should get you everything you need to build. I haven't messed with the kernel yet.

After everything is synced try these steps:
  • . build/envsetup.sh
  • lunch (and select maru-h815_userdebug)
  • make -j4

Dionis L

unread,
Nov 16, 2016, 12:13:05 PM11/16/16
to Maru OS dev
Thank you very much . I'm on it !

Dionis L

unread,
Nov 16, 2016, 12:38:55 PM11/16/16
to Maru OS dev
Thank sagain , I do not need for now a kernel set up ,because I fund some git repositories that have the kernel I need.

I was very confusing about the blobs part .i set up all like you said to me .
I satrted downloading .
So all i have to do is this :

 
  • . build/envsetup.sh
  • lunch (and select maru-h815_userdebug)
  • make -j4
Before you to give me this , Yesterday , I  was stuck at blobs ,I was doing cd /device/lge/h815 .
And I was runing extract-files.sh  .ANd it tried to get some data from my phone with adb.

So now I not longer need to do that?

Dionis L

unread,
Nov 16, 2016, 12:46:56 PM11/16/16
to Maru OS dev

Tyler Martin

unread,
Nov 16, 2016, 12:49:56 PM11/16/16
to maru-...@googlegroups.com
Oops. Yes. I'll change the manifest. I can't believe I missed that.

You can go into the .repo folder, then go into manifests, and edit the default.xml file. Should be line 20.

Dionis L

unread,
Nov 16, 2016, 12:51:43 PM11/16/16
to Maru OS dev
Ok , thank you .I'm still unsure if I still have to run extract-files.sh  or not .I'm waiting for it to download and I compile it now.

Tyler Martin

unread,
Nov 16, 2016, 1:23:24 PM11/16/16
to Maru OS dev
No need to run the extract-files.sh

Dionis L

unread,
Nov 16, 2016, 2:47:44 PM11/16/16
to Maru OS dev
Hello , I run lunch and I select option 22 :

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_arm64-eng
     3. aosp_mips-eng
     4. aosp_mips64-eng
     5. aosp_x86-eng
     6. aosp_x86_64-eng
     7. aosp_deb-userdebug
     8. full_fugu-userdebug
     9. aosp_fugu-userdebug
     10. mini_emulator_arm64-userdebug
     11. m_e_arm-userdebug
     12. mini_emulator_mips-userdebug
     13. mini_emulator_x86_64-userdebug
     14. mini_emulator_x86-userdebug
     15. aosp_flounder-userdebug
     16. aosp_angler-userdebug
     17. aosp_bullhead-userdebug
     18. aosp_hammerhead-userdebug
     19. aosp_hammerhead_fp-userdebug
     20. aosp_shamu-userdebug
     21. aosp_h815-userdebug
     22. maru_h815-userdebug
     23. maru_h815-user
     24. maru_hammerhead-userdebug
     25. maru_hammerhead-user

Which would you like? [aosp_arm-eng] 22
build/core/product_config.mk:227: *** _nic.PRODUCTS.[[device/lge/h815/maru_h815.mk]]: "frameworks/native/build/phone-xxxhdpi-3072-dalvik-heap.mk" does not exist.  Stop.

** Don't have a product spec for: 'maru_h815'
** Do you have the right repo manifest?

What we miss from here?

Dionis L

unread,
Nov 16, 2016, 2:57:32 PM11/16/16
to maru-...@googlegroups.com
I created it , inspired from https://osdn.net/projects/android-x86/scm/git/frameworks-native/blobs/94774ac01d1953bcc7a70a7018267ee34793d3f7/build/phone-xxhdpi-3072-dalvik-heap.mk

and It seams is ok till now.

i started to compile it , we\ll see hwo it goes .

# make -j3
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=maru_h815
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-47-generic-x86_64-with-LinuxMint-18-sarah
HOST_BUILD_TYPE=release
BUILD_ID=MMB29V
OUT_DIR=out

Tyler Martin

unread,
Nov 16, 2016, 2:59:30 PM11/16/16
to Maru OS dev
Build also might fail when it gets to kernel. I'll work on it later.

Dionis L

unread,
Nov 16, 2016, 3:07:22 PM11/16/16
to Maru OS dev
it stoped here:


 including ./vendor/lge/bullhead/Android.mk ...
including ./vendor/lge/g2-common/Android.mk ...
including ./vendor/lge/g2m/Android.mk ...
including ./vendor/lge/g3-common/Android.mk ...
including ./vendor/lge/g4-common/Android.mk ...
including ./vendor/lge/h901/Android.mk ...
including ./vendor/lge/hammerhead/Android.mk ...
including ./vendor/lge/hammerheadcaf/proprietary/Android.mk ...
including ./vendor/lge/jag3gds/Android.mk ...
including ./vendor/lge/jagnm/Android.mk ...
including ./vendor/lge/msm8226-common/Android.mk ...
including ./vendor/lge/v500/Android.mk ...
including ./vendor/lge/vk810/Android.mk ...
including ./vendor/lge/w5/Android.mk ...
including ./vendor/lge/w7/Android.mk ...
including ./vendor/maruos/Android.mk ...
build/core/Makefile:34: *** Prebuilt apk found in PRODUCT_COPY_FILES: vendor/lge/g4-common/proprietary/app/shutdownlistener/shutdownlistener.apk:system/app/shutdownlistener/shutdownlistener.apk, use BUILD_PREBUILT instead!.  Stop.

#### make failed to build some targets (01:08 (mm:ss)) ####

I see vendor/lge/g4-common/proprietary/app/shutdownlistener/shutdownlistener.apk , exist , i do not knwo if i have to delete it?

Dionis L

unread,
Nov 16, 2016, 3:14:52 PM11/16/16
to maru-...@googlegroups.com


I looks g4-common-vendor-blobs.mk  do not like to have .apk inside , so I deleted taht apk from the list , and I restarted to compile , maybe I need a newer version of this g4-common-vendor-blobs.mk

After I will have a system.img I'll flash it and see if it at least run , and if all is good ,I'll compile also a gernel for it ,and improve it.But first i need at least android running from what I build

Tyler Martin

unread,
Nov 16, 2016, 3:56:29 PM11/16/16
to Maru OS dev
The apk should be there. I think the problem is the way that it's called. I'll try to figure out what I need to change.

On Wednesday, November 16, 2016 at 3:14:52 PM UTC-5, Dionis L wrote:
steal same error after deleting ,i look what I can do

Dionis L

unread,
Nov 16, 2016, 4:42:38 PM11/16/16
to Maru OS dev
I think the line for the apk must start with BUILD_PREBUILT . Any way just to be sure after I flash system.img I hope my custom recovery will still be there , no?

Preetam

unread,
Nov 17, 2016, 12:59:41 AM11/17/16
to Maru OS dev
Yup, your recovery will not be touched if you only flash system.

BUILD_PREBUILT for an APK can be done like this: https://github.com/maruos/android_device_lge_hammerhead/blob/master/prebuilts/TimeService/Android.mk

Dionis L

unread,
Nov 17, 2016, 1:27:24 AM11/17/16
to Maru OS dev
After a hour of compilation , I have a strange error.

frameworks/base/tools/aapt2/Util.cpp:307:5: error: no matching function for call to 'utf16_to_utf8'
    utf16_to_utf8(utf16.data(), utf16.length(), &*utf8.begin());
    ^~~~~~~~~~~~~
system/core/include/utils/Unicode.h:112:6: note: candidate function not viable: requires 4 arguments, but 3 were provided
void utf16_to_utf8(const char16_t* src, size_t src_len, char* dst, size_t dst_len);
     ^
1 error generated.
build/core/binary.mk:706: recipe for target 'out/host/linux-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/Util.o' failed
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libaapt2_intermediates/Util.o] Error 1
make: *** Waiting for unfinished jobs....

#### make failed to build some targets (01:15:08 (hh:mm:ss)) ####

I did not had this error when I just compiled orriginal aosp .Any ideas?

Dionis L

unread,
Nov 17, 2016, 1:58:42 AM11/17/16
to maru-...@googlegroups.com

I'm not sure what repo did but my :

/home/v/Desktop/LG_Maru/frameworks/base/tools/aapt2/Util.cpp

is not same like :

https://github.com/maruos/android_platform_frameworks_base/blob/master/tools/aapt2/Util.cpp

maybe repo gived me one from  a older maru version?I modified that function and restarted compilation


Dionis L

unread,
Nov 17, 2016, 8:28:48 AM11/17/16
to Maru OS dev
I flashed just system.img and I try to boot it with stock kernel.

Stock kernel fail to boot ,the log is this :

Build fingerprint: 'generic/maru_h815/generic:6.0.1/MMB29V/root11162233:userdebug/test-keys'
Revision: '11'
ABI: 'arm'
pid: 836, tid: 836, name: gatekeeperd  >>> /system/bin/gatekeeperd <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'Binder driver could not be opened.  Terminating.'



Device reboots into recovery screen

Dionis L

unread,
Nov 17, 2016, 7:35:03 PM11/17/16
to Maru OS dev
All is good for now , but how exactly you make the boot.img when you have the kernel output -> Image.gz ?

Tyler Martin

unread,
Nov 17, 2016, 7:55:28 PM11/17/16
to Maru OS dev
The device tree is setup to build the kernel inline. I could change the device tree to use the kernel source located at /vendor/maruos/kernel/h815 and a defconfig with the maru options enabled.

Dionis L

unread,
Nov 17, 2016, 8:10:28 PM11/17/16
to Maru OS dev
I understand ... but after I do make -j4 , I do not see a boot.img , how do i create it?Thank you!

Dionis L

unread,
Nov 18, 2016, 7:18:19 AM11/18/16
to Maru OS dev
  8.013151 / 01-04 00:09:49.859][3] SMBCHG: smbchg_relax: relaxing: 0x00 (bit 2)
[    8.013335 / 01-04 00:09:49.859][3] [CC] charge_type = 3
[    8.014235 / 01-04 00:09:49.859][4] healthd: battery l=100 v=4230 t=34.2 h=2 st=5 c=1038 chg=u
[    8.014997 / 01-04 00:09:49.859][4] healthd: battery l=100 v=4230 t=34.2 h=2 st=5 c=1038 chg=u
[    8.951811 / 01-04 00:09:50.799][3] [CC] current batt_temp[34], batt_temp_state[0], current batt_volt[4363], batt_volt_state[1]
[    9.596753 / 01-04 00:09:51.449][5] init: Starting service 'debuggerd'...
[    9.597306 / 01-04 00:09:51.449][5] init: Starting service 'ril-daemon'...
[    9.597787 / 01-04 00:09:51.449][5] init: Starting service 'surfaceflinger'...
[    9.598278 / 01-04 00:09:51.449][5] init: Warning!  Service rmt_storage needs a SELinux domain defined; please fix!
[    9.598294 / 01-04 00:09:51.449][5] init: Starting service 'rmt_storage'...
[    9.598734 / 01-04 00:09:51.449][5] init: Warning!  Service rfs_access needs a SELinux domain defined; please fix!
[    9.598749 / 01-04 00:09:51.449][5] init: Starting service 'rfs_access'...
[    9.599173 / 01-04 00:09:51.449][5] init: Warning!  Service qmuxd needs a SELinux domain defined; please fix!
[    9.599185 / 01-04 00:09:51.449][0] init: cannot execve('/system/bin/rfs_access'): No such file or directory
[    9.599194 / 01-04 00:09:51.449][5] init: Starting service 'qmuxd'...
[    9.599630 / 01-04 00:09:51.449][0] init: cannot execve('/system/bin/qmuxd'): No such file or directory
[    9.599639 / 01-04 00:09:51.449][5] init: Warning!  Service loc_launcher needs a SELinux domain defined; please fix!
[    9.599647 / 01-04 00:09:51.449][5] init: Starting service 'loc_launcher'...
[    9.600054 / 01-04 00:09:51.449][0] init: cannot execve('/system/bin/loc_launcher'): No such file or directory



I got it running ,I have a black sceeen but I can connect thru the adb .
It give me this errors , but the /system/bin/loc_launcher exists .Why execve()  say no such file?

1|root@generic:/ # ls -al /system/bin/loc_launcher
-rwxr-xr-x root     shell      100464 2016-11-18 01:43 loc_launcher
root@generic:/ #

Dionis L

unread,
Nov 18, 2016, 11:30:16 AM11/18/16
to Maru OS dev
-------- log main
01-04 00:41:37.593  2647  2647 I SurfaceFlinger: SurfaceFlinger is starting
01-04 00:41:37.593  2647  2647 I SurfaceFlinger: SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
01-04 00:41:37.595  2647  2647 D libEGL  : loaded /vendor/lib/egl/libEGL_adreno.so
01-04 00:41:37.639  2647  2647 D libEGL  : loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
01-04 00:41:37.649  2647  2647 D libEGL  : loaded /vendor/lib/egl/libGLESv2_adreno.so
01-04 00:41:37.660  2647  2647 I Adreno  : QUALCOMM build                   : 63c06b2, I8366cd0437
01-04 00:41:37.660  2647  2647 I Adreno  : Build Date                       : 10/21/15
01-04 00:41:37.660  2647  2647 I Adreno  : OpenGL ES Shader Compiler Version: XE031.05.13.02
01-04 00:41:37.660  2647  2647 I Adreno  : Local Branch                     :
01-04 00:41:37.660  2647  2647 I Adreno  : Remote Branch                    : quic/LA.BF64.1.2.9_v2
01-04 00:41:37.660  2647  2647 I Adreno  : Remote Branch                    : NONE
01-04 00:41:37.660  2647  2647 I Adreno  : Reconstruct Branch               : NOTHING
01-04 00:41:37.670  2647  2647 I gralloc : using (fd=15)
01-04 00:41:37.670  2647  2647 I gralloc : id           = mdssfb_90000
01-04 00:41:37.670  2647  2647 I gralloc : xres         = 1440 px
01-04 00:41:37.670  2647  2647 I gralloc : yres         = 2560 px
01-04 00:41:37.670  2647  2647 I gralloc : xres_virtual = 1440 px
01-04 00:41:37.670  2647  2647 I gralloc : yres_virtual = 5120 px
01-04 00:41:37.670  2647  2647 I gralloc : bpp          = 32
01-04 00:41:37.670  2647  2647 I gralloc : r            =  0:8
01-04 00:41:37.670  2647  2647 I gralloc : g            =  8:8
01-04 00:41:37.670  2647  2647 I gralloc : b            = 16:8
01-04 00:41:37.670  2647  2647 I gralloc : width        = 68 mm (537.882324 dpi)
01-04 00:41:37.670  2647  2647 I gralloc : height       = 121 mm (537.388428 dpi)
01-04 00:41:37.670  2647  2647 I gralloc : refresh rate = 208.22 Hz
01-04 00:41:37.686  2647  2647 E SurfaceFlinger: hwcomposer module not found



Why i'm missing hwcomposer module not found ?

Dionis L

unread,
Nov 21, 2016, 8:04:21 PM11/21/16
to Maru OS dev
I compled android 6.0.1 r 72  for h815 , without the maru os part added .Just to be sure it works by itself.
All works good ,except I do not have image on tv when I attach slimport .On original rom It worked .
I can say my kernel suport the slimport but I still not 100% .I have to see how maru write to hdmi.

Dionis L

unread,
Nov 21, 2016, 11:14:06 PM11/21/16
to Maru OS dev
How you make android to do not use the hdmi port ?

Bart Vdpt

unread,
Nov 25, 2016, 8:32:24 AM11/25/16
to Maru OS dev
Was thinking to buy a LG G4 instead of a Nexus 5 to test when your Maru port is done but after a search i came up with a lot of this: 


This seams a big problem, do you have experience with this problems? 
This will affect also the phone while running MaruOS i think. Or not? 



Op dinsdag 22 november 2016 05:14:06 UTC+1 schreef Dionis L:

Dionis L

unread,
Nov 25, 2016, 11:15:09 PM11/25/16
to Maru OS dev
There was some LG G4 models in the beginning who had some problems from what I read. They say the serial of good ones starts with 6 . My Phone serial number is 609... and so far no problems .
Lg g4 is very good phone and it really deserve something like Maru Os  on it.

HOWEVER if you want to run maru os on lg g4 ,in this moment is not possible because I could not find a custom rom ,except for stock based custom rom . that have slimport support .

So i can not integrate Maru OS parts in any android port for LG g4 , cause slimport do not work .

Slimport works just for stock rom , and for custom roms based on stock rom .

There can be 2 solutions , one is to fix the slimport in custom roms that are based on CM .And another is to integrate maru os on the custom rom that os based on stock rom .

But for moment ,I can say , I ported aosp android for lg g4 , all works except slimport .
So if you attach a hdmi slimport cable to your phone ,till now , nothing on tv screen .

Preetam

unread,
Nov 28, 2016, 9:03:17 PM11/28/16
to Maru OS dev
Ah, interesting. Good work getting AOSP to work on G4!

I wonder why SlimPort doesn't work though? Are we missing some device binaries? Have you checked to see if your AOSP build's /vendor is missing any files that are on the factory ROM?

Are there any logs that could help troubleshoot the SlimPort errors? What does dmesg show when you connect to an HDMI screen?

It will be very challenging to integrate Maru OS on the custom ROM because there are lots of small changes around the platform. You will need to integrate perspectived, mflinger services in the device init file, change the SELinux permissions, etc... It really would be much better to get your custom ROM working.

Dionis L

unread,
Nov 28, 2016, 9:26:41 PM11/28/16
to Maru OS dev
The slimport problem is very strange . Veeery strange .After few days of testing , I'm still not sure if is kernel it self , or it is missing some device binaries . I'm about 80% sure is NOT kernel , but is very strange.

Why it is strage?

First because I ported Slim6 (based aosp and CM) to H815 (lg g4) .Off course slimport do not works for me , but I tried Slim6 for hammerhead and slimport works . So because Slim6 for hammerhead slimport works , I'm thinking Slim6 ROM frameworks and etc are fine .

When h815 starts with Slim6 rom , I can see in dmesg lines that say slimport registered ,and some lines like :
  qdutils : int qdutils::getHDMINode(): HDMI is at fb1
but when I attach the slimport hdmi cable there is NO message in dmesg .
So because no message in dmegs when I attach cable , makes me thing could be something with kernel .

I do not know how .so files from /vendor could impact the detection of slimport .
I do not know if kernel must say something when I insert the hdmi cable by itself  , or if some .so files from vendor ,help kernel to detect slimport .
Maybe I'm missing some so files from /vendor . But like I said  do not know if missing any .so from vendor could impact kernel dection of slimport

Preetam

unread,
Nov 28, 2016, 9:50:12 PM11/28/16
to Maru OS dev
Very interesting. I too am unsure about the /vendor .so files affecting SlimPort detection...

Is it possible to get your Slim6 ROM built using the factory ROM kernel just to test if it really is the kernel that's causing the SlimPort issues?

Dionis L

unread,
Nov 28, 2016, 10:17:20 PM11/28/16
to Maru OS dev
I put a prebuild kernel binary when i compiled the rom ,it did a boot.img using it , but it failed to boot. I repalced it also manualy spliting and repacking   boot.img but did not boot . I booted with a kernel I got from internet ,they say is for stock rom ,just rooted . So I think that kernel sould support slimport too . It booted but android did not started , and also no message in dmesg at when hdmi cable attached . So maybe is something normal kernel to do not do nothing without some .so files loaded by android .

I looked in orriginal rom files and I did a search for 'hdmi' and found in some files :

v@v-HP-ProBook-430-G2 ~/Downloads/x/vendor/lib64 $ grep -Ri hdmi
Binary file libacdbmapper.so matches
Binary file libdpmnsrm.so matches
Binary file libmm-hdcpmgr.so matches
Binary file libsecureuisvc_jni.so matches
Binary file libwfdsm.so matches
v@v-HP-ProBook-430-G2 ~/Downloads/x/vendor/lib64 $

and I saw for example in libwfdsm.so there is the text : openCallback RTSPSession  : HDMI is connected .
Maybe the so files make kernel detect hdmi . I try now to copy all /vendor .so files over my existing working Slim6 rom to see what happens .
Message has been deleted
Message has been deleted
Message has been deleted

Dionis L

unread,
Nov 29, 2016, 9:02:05 AM11/29/16
to Maru OS dev
Do you think that  just integrating the maru os binaries into a custom rom based stock rom will work?
Just to recompile kernel , add mflinger ,perspectived , and without any modification to framework.jar ?

Dionis L

unread,
Nov 30, 2016, 3:39:34 AM11/30/16
to Maru OS dev
I can confirm is NOT kernel problem , I booted my stock rom with my own kernel build and all is fine .
So the problem is somewhere in system , maybe a vendor  .so file ,maybe something in /device/dispay .
But any way since I booted my stock rom with my custom kernel build , I just have to compile kernel with support for maru , and integrate the maru binaries into the system stock rom.

Preetam

unread,
Nov 30, 2016, 11:37:56 AM11/30/16
to Maru OS dev
Oh interesting, thanks for confirming it is not a kernel issue. That is good news!

The problem is that Maru needs some changes to frameworks/base and frameworks/native that you will have to integrate onto /system. And I am not sure how the SELinux security policies can be patched.

Either way, you may want to start by integrating the /system/maru directory onto the stock rom -- this contains all the LXC binaries and desktop root filesystem. You can then try to launch the system via commandline with 'lxc-start -n jessie'. You won't be able to see anything over HDMI until everything else works, but you can at least check if you can launch the desktop container successfully and interact over command line for now.

Dionis L

unread,
Nov 30, 2016, 12:07:47 PM11/30/16
to Maru OS dev
GOD helped me and I have hdmi out on Slim6 rom . unbelievable but it works now ! lol great ,thanks God.

The problem now is maru os frameworks is based r72 , and i have r74 . i have to see what is the differnce .
But is good all works including hdmi !
Do you know where the changes must to be done in /frameworks ?

Dionis L

unread,
Nov 30, 2016, 12:35:33 PM11/30/16
to Maru OS dev
i think https://github.com/maruos/android_platform_build   must not be added to Slim6 rom ,

I have to see wat are the commits to :

https://github.com/maruos/android_platform_frameworks_native
https://github.com/maruos/android_platform_frameworks_base


that I have to integrate to my Slim6 .


Preetam

unread,
Nov 30, 2016, 6:08:57 PM11/30/16
to Maru OS dev
Woah, great! What was the issue and how did you fix it? It may be helpful for anyone else porting to a similar device.

Can we just substitute the Maru OS frameworks repositories instead of the ones from Slim6? Are there any changes for Slim6 that are not in AOSP? If there aren't, it should be easy to substitute the Maru repos instead.

Georgian Chituc

unread,
Nov 30, 2016, 6:18:41 PM11/30/16
to maru-...@googlegroups.com
I think it will work to replace framework from slimrom with maru ones , but I'm not 100% sure ,cause I think Slimroms keep something different from aosp in frameworks . I do not know .
The link is here https://github.com/SlimRoms/frameworks_base .

 I'm trying to track your commits and implement in current Slim6 rom to keep Slim6 framework.

I compiled the kernel with the changes needed by maru , all done now I'm building the rom .
Next I have to implement your changes from framework , and if taht compile fine I have t add maru device forlder , and pray all will be good

Georgian Chituc

unread,
Nov 30, 2016, 6:39:56 PM11/30/16
to Maru OS dev
All your modification in the framework have comments that starts with  Maru: ?
like this?

/*
* Maru: reserve bluetooth keyboards and mice for desktop
*
* TODO: add hook for dynamic switching
*/

?

Preetam

unread,
Nov 30, 2016, 7:09:12 PM11/30/16
to Maru OS dev
Not all of them...but a good amount of them I think.

Either way, before this can be accepted as an official build, we will need to move everything except possibly the device repository to Maru's repositories so it is consistent with the rest of the Maru OS AOSP-based builds.

Is there any particular reason you are using Slim6 instead of AOSP?

Georgian Chituc

unread,
Nov 30, 2016, 7:15:40 PM11/30/16
to Maru OS dev
I'm using Slim6 , because I got the device tree from CM 13 , and Slim 6 is aosp based and modified to accept "devices trees" from CM 13 .
It is 'slim' so is identical to your aosp build except it has root too .
If I put the device tree, I have ,directly to AOSP will not compile , but on Slim 6 it compile . So first I need to have a functional android source code in what to integrate maru os . And only Slim 6 accepted the device tree I had . All good for now .
I was thinking to just put the framework from Maru , but i saw maru is based android 6.0.1 r72 , and my Slim6 has r74 .
That why I tried to see only the code added by maru to framwork . But i think i will just use the framework from maru and see if it compile

Preetam

unread,
Nov 30, 2016, 7:21:19 PM11/30/16
to Maru OS dev
Oh, ok that makes sense.

Can you link me to the device tree you are using? Maybe I can make Maru OS work with it.

Georgian Chituc

unread,
Nov 30, 2016, 7:25:08 PM11/30/16
to Maru OS dev
As you can see ,the device tree from CM do not work out of the box in AOSP , and CM is the only one who provide tons of device trees .
Into AOSP you can integrate just device trees that were made by google , for example just device trees for NEXUS or what google did .
If you do not have a phone with rom made by google , you do not have a device tree , and you need to get one from somewhere , cause you can not build one cause you dnt know all device specs .
So all peopels get their device tree from CM . Cause CM support a lot of device trees .
But i wanted something simple ,not complicated and to look like AOSP . And I found Slim6 with accepts devices trees from CM but is AOSP based and is very very slim , do not come with modifications ,except from what I saw in Settings.apk , they have a menu to enable disable root.
In rest it it same like AOSP .
So Slim6 was perfect , cause It allowed me to integrate a device tree I could get only from CM , cause google do not provide a device tree for H815 , they provide only for nexus devices ,or devices branded Google

Georgian Chituc

unread,
Nov 30, 2016, 7:31:41 PM11/30/16
to Maru OS dev

Georgian Chituc

unread,
Nov 30, 2016, 8:29:24 PM11/30/16
to Maru OS dev
So if I want to try to start manualy the container , I just need the modifications from

----------------------------
android_platform_frameworks_native
Drop all BT keyboards and mice from Android's input processing
----------------------------
the other modifications from frameworks ,are about to start the perspective .

But if if first i try to start it manulay will be fine just with this ? Right?

Georgian Chituc

unread,
Nov 30, 2016, 8:34:56 PM11/30/16
to Maru OS dev
I have to integrate modification manualy in framework cause thre are some big difference from maru and slim framewroks , maybe just because they are different revisions . I do not know .

Preetam

unread,
Nov 30, 2016, 9:17:19 PM11/30/16
to Maru OS dev
You should be able to manually start it without any patches in frameworks. You can just interact with the system over commandline for now. All you will need is the kernel with maru options enabled and the prebuilt files in /data/maru from a good working Maru OS build.

I took a quick look at the sources you linked to and I see what you mean with all the CM stuff. It looks nontrivial to make it compatible with the Maru repos for now, especially if I don't have a G4 to test builds with. Let's see how far you can get with Slim6 for now then!

Georgian Chituc

unread,
Nov 30, 2016, 9:24:21 PM11/30/16
to Maru OS dev
Yes , do not stress adapting the device tree for now is just a lose of time .I had to do a lot of customization to make them compile , and after all compiled into AOSP ,i had just a lot of boot problems of android services.So , if now we already have a working android source full comaptible with h815 , we better go on with this , cause this is after all aosp based too

Georgian Chituc

unread,
Nov 30, 2016, 10:14:03 PM11/30/16
to Maru OS dev
Sory to ask you , :)   do you have the /data/maru  from a user_debug build? cause I think if is not debug will miss the lxc-start binaries

Preetam

unread,
Nov 30, 2016, 10:22:29 PM11/30/16
to Maru OS dev
Oh yeah, the lxc-* binaries are in /system/bin for userdebug builds. I've attached a zip of the binaries that you can extract in /system/bin.

Please use your /data/maru directory from your user build for the rest.
maru-lxc-binaries.tar.gz

Georgian Chituc

unread,
Nov 30, 2016, 10:34:47 PM11/30/16
to Maru OS dev
That's great  . Thank you very much !

Georgian Chituc

unread,
Nov 30, 2016, 11:13:17 PM11/30/16
to Maru OS dev
I added device tree from maru and it started to compile .
But I have a error :

vendor/maruos/mflinger/src/mflinger/mflinger.cpp: In function 'int lockBuffer(int, mflinger_state*)':
vendor/maruos/mflinger/src/mflinger/mflinger.cpp:329:27: error: 'class android::Surface' has no member named 'lockWithHandle'
         status_t err = s->lockWithHandle(&outBuffer, &handle, NULL);


libperspective compiled fine but 
mflinger do not compile because of that

I found some code related to surfaces :
https://code.csdn.net/snippets/414953/master/blog_20140703_1_9808819/raw

http://www.voidcn.com/blog/evilcode/article/p-4035133.html


but i do not know what is the correct way to fix this .
If i do not compile it and I use the binary I think will fail also at execution time.

I'm missing any file , or where this 
lockWithHandle come from? is it deprecated?

Georgian Chituc

unread,
Nov 30, 2016, 11:29:24 PM11/30/16
to Maru OS dev
Sorry , my mistake , I have incomple framework I miss : https://github.com/maruos/android_platform_frameworks_native/blob/master/include/gui/Surface.h and more ..

Preetam

unread,
Nov 30, 2016, 11:41:07 PM11/30/16
to Maru OS dev
Yes, lockWithHandle is part of the Maru changes in frameworks/native.

This is why I said it will be challenging to just try to add the binaries since it depends on lots of changes in frameworks and other things like SELinux permissions... I think you will run into a lot of these annoying compile issues or runtime issues.

Good luck though and thank you for all your effort on this! Perhaps your next device will be a Nexus/Google device and your port will be much smoother :)

Georgian Chituc

unread,
Dec 1, 2016, 6:32:09 AM12/1/16
to maru-...@googlegroups.com
We can easly disable seliinux permissions checking using kernel flags .Here is ok .

I tested maru os on my old but unused nexus 5 , it work very great .
But I know nexus 5 is a little old device and maru os deserve a new hardware .If it will run on newer hardware , ppls will like it more ,and more .I started to focus on lg g4 cause it have a little better cpu , 1.8 gb free ram after android is loaded , and also a sdcard .

Georgian Chituc

unread,
Dec 1, 2016, 8:11:41 AM12/1/16
to Maru OS dev
There is a problem compiling lxc.so , somethign is not good in Andorid mk file , it give this error , it somehow do not add top dir  :


configure:3711: checking whether the C compiler works
configure:3733: arm-linux-androideabi-gcc -nostdlib -Bdynamic -pie         -fno-exceptions -Wno-multichar -fno-strict-aliasing  -fstack-protector -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers  -include build/core/combo/include/arch/linux-arm64/AndroidConfig.h -I build/core/combo/include/arch/linux-arm64/ -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration  -fno-strict-volatile-bitfields -Wno-psabi -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DLG_CAMERA_HARDWARE -DBOARD_CHARGING_CMDLINE_NAME='androidboot.mode' -DBOARD_CHARGING_CMDLINE_VALUE='chargerlogo' -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -DNDEBUG -O2 -g -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -DNDEBUG -UDEBUG -I/home/v/Desktop/aosp/bionic/libc/arch-arm64/include -I/home/v/Desktop/aosp/bionic/libc/include -I/home/v/Desktop/aosp/bionic/libc/kernel/uapi -I/home/v/Desktop/aosp/bionic/libc/kernel/uapi/asm-arm64 -I/home/v/Desktop/aosp/bionic/libm/include -I/home/v/Desktop/aosp/bionic/libm/include/arm64   -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419  -Wl,--allow-shlib-undefined         -Wl,-dynamic-linker,/system/bin/linker         /home/v/Desktop/aosp/out/target/product/h815/obj/lib/crtbegin_dynamic.o         -lc -ldl         -L         /home/v/Desktop/aosp/out/target/product/h815/obj/lib/crtend_android.o conftest.c  >&5


cc1: fatal error: build/core/combo/include/arch/linux-arm64/AndroidConfig.h: No such file or directory

Georgian Chituc

unread,
Dec 1, 2016, 9:49:02 AM12/1/16
to Maru OS dev
I repalced it with arm64-workaround branch and lxc compiled fine . I hope it also will work .

Georgian Chituc

unread,
Dec 1, 2016, 2:55:16 PM12/1/16
to Maru OS dev
I added vendor maruos and all compiled os , mflinger perspectived ,started fine at boot time .
Also I have /system/lib/liblxc.so and /system/lib64/liblxc.so ,all installe fine.

I copied all from maru-lxc-binaries.tar.gz to /system/bin/

when i run lxc-start -n jessie , it said can not find debian.common.conf  .
Then I copied all from:
 https://raw.githubusercontent.com/maruos/platform_external_lxc/2f0ff5839373b296ecf8809782493b1d22c3532f/config/templates/debian.common.conf.in

into /data/maru/containers/jessie/config

I started again : lxc-start -n jessie

This time it say :

      lxc-start 1420556682.177 ERROR    lxc_start - external/lxc/src/lxc/start.c:must_drop_cap_sys_boot:557 - failed to clone (0x20000011): Invalid argument
      lxc-start 1420556682.182 ERROR    lxc_namespace - external/lxc/src/lxc/namespace.c:lxc_clone:67 - failed to clone (0x2c020000): Invalid argument
      lxc-start 1420556682.182 ERROR    lxc_start - external/lxc/src/lxc/start.c:lxc_spawn:897 - Invalid argument - failed to fork into a new namespace
      lxc-start 1420556682.183 ERROR    lxc_start - external/lxc/src/lxc/start.c:__lxc_start:1083 - failed to spawn 'jessie'
      lxc-start 1420556682.186 ERROR    lxc_start_ui - /var/maru/src/external/lxc/src/lxc/lxc_start.c:main:342 - The container failed to start.
      lxc-start 1420556682.187 ERROR    lxc_start_ui - /var/maru/src/external/lxc/src/lxc/lxc_start.c:main:346 - Additional information can be obtained by setting the --logfile and --logpriority options.


Any ideeas?Maybe i did not copied the right  debian.common.conf.in ?

Georgian Chituc

unread,
Dec 1, 2016, 3:02:41 PM12/1/16
to Maru OS dev
Maybe it do not start because start-lxc is not from a arm64 build? Do you have one from a arm64 build?

Preetam

unread,
Dec 1, 2016, 4:33:52 PM12/1/16
to Maru OS dev
This looks like the same issue Tyler had with the kernel for the Nexus 7: https://groups.google.com/d/msg/maru-os-dev/zdT_qHydRXA/PxVXZiXmBQAJ

Please make sure you have all the options listed on the wiki enabled in your custom kernel: https://github.com/maruos/maruos/wiki/Kernel#define-your-kernel-config

Georgian Chituc

unread,
Dec 1, 2016, 4:45:10 PM12/1/16
to maru-...@googlegroups.com
Yes , you very right , I just found that topic after 30 minutes of trying different work arounds,
It was better if here was a chat like irc . Messages posted here are seen very late by ppls , but help is great appreciated!.

Any way , I managed to start container , but now I'm into the other problem , login incorect one .

[  OK  ] Started Getty on tty3.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Getty on tty4...
[  OK  ] Started Getty on tty4.
         Starting Console Getty...
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Light Display Manager.
         Starting mflinger client for X11...
[  OK  ] Started mflinger client for X11.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 8 jessie console

jessie login: maru
Password:

Login incorrect
jessie login: maru
Password:

Login incorrect
jessie login: v
Password:

Login incorrect
jessie login: root
Password:

Login incorrect
jessie login:

I tried user maru pass maru , user root pass maru . Do not works .I have to see what another guy did to fix it , if he fixed it .

I think , I had to go into all problems all ppls had before me .I think I did not miss any problem others ppls had .
:)
I have to see now how to log in .

Georgian Chituc

unread,
Dec 1, 2016, 4:54:37 PM12/1/16
to Maru OS dev
This is the full startup log :
----------------------------------------------------------------------------------------------
root@android:/ # lxc-start -n jessie                                          
lxc-start: external/lxc/src/lxc/conf.c: mk_devtmpfs: 1354 /dev/.lxc is not setup - taking fallback
systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
Detected virtualization 'lxc'.
Detected architecture 'arm'.

Welcome to Debian GNU/Linux 8 (jessie)!

Failed to insert module 'autofs4'
Set hostname to <jessie>.
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Paths.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Reached target Swap.
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-getty.slice.
         Starting Create Static Device Nodes in /dev...
         Starting Load Kernel Modules...
         Mounting Debug File System...
         Starting udev Coldplug all Devices...
         Starting Journal Service...
[  OK  ] Started Journal Service.
[  OK  ] Reached target Slices.
[  OK  ] Mounted Debug File System.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
         Mounting Configuration File System...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Mounted Configuration File System.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Apply Kernel Variables.
         Starting Copy rules generated while the root was ro...
         Starting LSB: Set preliminary keymap...
[  OK  ] Started Copy rules generated while the root was ro.
[  OK  ] Started LSB: Set preliminary keymap.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Reached target Remote File Systems.
         Starting Trigger Flushing of Journal to Persistent Storage...
         Starting LSB: Set console font and keymap...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started LSB: Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started udev Coldplug all Devices.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Starting /etc/rc.local Compatibility...
         Starting Login Service...
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
         Starting Permit User Sessions...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Login Service.
[  OK  ] Started Permit User Sessions.
         Starting Light Display Manager...
         Starting Getty on tty2...
[  OK  ] Started Getty on tty2.
         Starting Getty on tty3...

[  OK  ] Started Getty on tty3.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Getty on tty4...
[  OK  ] Started Getty on tty4.
         Starting Console Getty...
[  OK  ] Started Console Getty.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Light Display Manager.
         Starting mflinger client for X11...
[  OK  ] Started mflinger client for X11.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 8 jessie console

jessie login: maru
Password:

--------------------------------------------------------

And in jessie.log is :
------------------------------------------------------------------------------------
lxc-start 1420563302.848 ERROR    lxc_conf - external/lxc/src/lxc/conf.c:mk_devtmpfs:1354 - /dev/.lxc is not setup - taking fallback
------------------------------------------------------------------------------------------


I see this data :

Failed to insert module 'autofs4'
Set hostname to <jessie>.
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented

and :

Failed to insert module 'autofs4'
Set hostname to <jessie>.
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented

They are from container startup , but I do not know if they are normal errors

Georgian Chituc

unread,
Dec 1, 2016, 5:14:19 PM12/1/16
to Maru OS dev
I had to remove this line from container config , because he sai can not find this file .

# Common configuration
lxc.include = /data/maru/lxc/share/lxc/config/debian.common.conf

So maybe the login problem is because I removed this

What this file must contain?

Georgian Chituc

unread,
Dec 1, 2016, 5:23:15 PM12/1/16
to Maru OS dev
I added all from debian.default.conf.in  from xlc source dir , and my conf is :

-------------------------------------------
lxc.network.type = none
lxc.rootfs = /data/maru/containers/jessie/rootfs


lxc.pivotdir = lxc_putold

lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
lxc.mount.entry = sysfs sys sysfs defaults 0 0
lxc.mount.entry = /sys/fs/fuse/connections sys/fs/fuse/connections none bind,optional 0 0

lxc.tty = 4
lxc.pts = 1024

lxc.cgroup.devices.deny = a

lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = b *:* m

lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm

lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 5:1 rwm

lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 1:9 rwm

lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 136:* rwm

lxc.cgroup.devices.allow = c 254:0 rm

lxc.cgroup.devices.allow = c 10:229 rwm

lxc.cgroup.devices.allow = c 10:200 rwm

lxc.cgroup.devices.allow = c 1:7 rwm

lxc.cgroup.devices.allow = c 10:228 rwm

lxc.cgroup.devices.allow = c 10:232 rwm

lxc.seccomp = @LXCTEMPLATECONFIG@/common.seccomp


lxc.mount = /data/maru/containers/jessie/fstab

lxc.utsname = jessie
lxc.arch = armhf
lxc.autodev = 1
lxc.kmsg = 0
lxc.mount.entry = /sys/fs/selinux sys/fs/selinux none bind,ro
lxc.mount.entry = /dev/input dev/input none bind,ro,create=dir
lxc.mount.entry = /sdcard mnt/sdcard none bind,optional,rw,create=dir


--------------------------

But same login problem .Also mperspective and mflinger is running in adroid , HDMI atatched but on monitor screen I have still the android screen , not debian  , but this must be because X11 is not started?

Preetam

unread,
Dec 1, 2016, 5:35:38 PM12/1/16
to Maru OS dev
I am not sure about the login problem because I have never run into it before.

I have tested the arm64-workaround branch and as long as you have built it correctly all the files, including debian.common.conf, should be in the right places. Note that the files are shipped on /system/maru on the final image, but they need to all be transferred over to /data/maru on runtime. There is a little script called mcprepare that takes care of this on the first boot. So perhaps you are missing some config files in /data/maru, but they are correctly installed in /system/maru. I'm not sure if this is related to your login issue though.

As for HDMI, there could be many reasons it fails. There are patches in frameworks in Maru OS that are needed too. There is one thing to try though--can you get me the output of this while the container is running and you are connected to HDMI?

    root# dumpsys SurfaceFlinger

I can at least check if the desktop buffers are being allocated or not.

It would be best to get the login to work first so we can debug from within the container.

Georgian Chituc

unread,
Dec 1, 2016, 5:40:53 PM12/1/16
to Maru OS dev
WHen i do lxc-start I see this line :
Failed to insert module 'autofs4'

and then i can not log in , do you have this error too ?
Maybe it try to insert into my kernel this module , autofs4 ?
also when i run :

lxc-attach -n jessie
# w
/bin/sh: 1: w: not found
# ls
/bin/sh: 2: ls: not found
# ps
/bin/sh: 3: ps: not found


nothing works , does lxc-attach -n jessie  , let you run any command ?
For me nothing works , they say mut be a shell inside container

Georgian Chituc

unread,
Dec 1, 2016, 5:42:49 PM12/1/16
to Maru OS dev
here is also dumpsys log
dumpsys

Georgian Chituc

unread,
Dec 1, 2016, 5:55:27 PM12/1/16
to Maru OS dev
my /system/maru miss lxc folder . I put it now from N5 phone , and try again

Preetam

unread,
Dec 1, 2016, 6:03:41 PM12/1/16
to Maru OS dev
Here is a known good startup log: https://groups.google.com/d/msg/maru-os-dev/3negNBhQCu4/55XBPxn-AQAJ

lxc-attach does not work for hammerhead due to some issues with PID namespaces in the kernel branch, but this is device kernel dependent--it may or may not work on the G4 depending on your kernel.

I do not see desktop buffers being allocated in your dumpsys so either mflinger or mclient has an issue. But I suspect if we solve the login issue we can easily figure it out.

Georgian Chituc

unread,
Dec 1, 2016, 6:24:01 PM12/1/16
to Maru OS dev
I took /system/maru from real N5 and replaced in my G4 , deleted /data/maru , rebooted

It populated again /data/maru , now I see also the dirs /data/maru/lxc  that was missing before , but same problem with the login . I also deleted the pass for user maru . Still I can not log in .

I still have that message about autofs module can not be loaded but I do not knwo if this is the cause .


lxc-start -n jessie                                          
lxc-start: external/lxc/src/lxc/conf.c: mk_devtmpfs: 1354 /dev/.lxc is not setup - taking fallback
systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
Detected virtualization 'lxc'.
Detected architecture 'arm'.

Welcome to Debian GNU/Linux 8 (jessie)!

Failed to insert module 'autofs4'

Georgian Chituc

unread,
Dec 1, 2016, 6:29:58 PM12/1/16
to Maru OS dev
I'm curious if you do lsmod inside debian if you see this module : autofs4


Georgian Chituc

unread,
Dec 1, 2016, 7:10:00 PM12/1/16
to Maru OS dev
i copied the btmp from G4 debian , it ocntains failure of logins .
It get populated

I downloaded it from phone and run last -f btmp and it show :

maru     console                       Fri Dec  2 02:06    gone - no logout
root     console                       Fri Dec  2 02:06 - 02:06  (00:00)
UNKNOWN  console                       Fri Dec  2 01:56 - 02:06  (00:10)
root     console                       Fri Dec  2 01:56 - 01:56  (00:00)
root     console                       Fri Dec  2 01:55 - 01:56  (00:00)
maru     console                       Fri Dec  2 01:55 - 01:55  (00:00)

So it counts the failures of log in . But why it fail .I see ssh running etc , but I can not just log in .

if you run the ./bash   from adb from /data/maru ..../rootfs/bin/bash  , it works for you?

Georgian Chituc

unread,
Dec 1, 2016, 7:46:05 PM12/1/16
to Maru OS dev
Can you please do this commands in adb ?:

rm /data/maru/containers/jessie.log

lxc-start -n jessie -l DEBUG

and please get me the file from /data/maru/containers/jessie.log ?It has the debug startup .

I got some warning s at startup when DEBUG .

------------------------
lxc-start 1480639204.524 WARN     lxc_confile - external/lxc/src/lxc/confile.c:config_personality:986 - unsupported personality 'armhf'
      lxc-start 1480639204.524 WARN     lxc_log - external/lxc/src/lxc/log.c:lxc_log_init:316 - lxc_log_init called with log already initialized
      lxc-start 1480639204.526 WARN     lxc_cgfs - external/lxc/src/lxc/cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuacct unknown to /data/maru/containers jessie
      lxc-start 1480639204.526 WARN     lxc_cgfs - external/lxc/src/lxc/cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpu unknown to /data/maru/containers jessie
      lxc-start 1480639204.527 WARN     lxc_cgfs - external/lxc/src/lxc/cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup cpuset unknown to /data/maru/containers jessie
      lxc-start 1480639204.527 WARN     lxc_cgfs - external/lxc/src/lxc/cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup devices unknown to /data/maru/containers jessie
      lxc-start 1480639204.527 WARN     lxc_cgfs - external/lxc/src/lxc/cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup freezer unknown to /data/maru/containers jessie
      lxc-start 1480639204.527 WARN     lxc_cgfs - external/lxc/src/lxc/cgfs.c:lxc_cgroup_get_container_info:1100 - Not attaching to cgroup bfqio unknown to /data/maru/containers jessie
---------------------------------------------------------------------

Preetam

unread,
Dec 1, 2016, 9:03:09 PM12/1/16
to Maru OS dev
I believe the autofs4 error is harmless since I have it in my log too.

The cgroup warnings should be harmless too.

Attaching my full log so you can compare.
jessie-lxcstart-good.log.txt

Georgian Chituc

unread,
Dec 1, 2016, 9:26:30 PM12/1/16
to Maru OS dev
Thank you very much .

I found on google lxc needs those :

CONFIG_USER_SCHED=n

CONFIG_CGROUPS=y

CONFIG_CGROUP_SCHED=y

CONFIG_CGROUP_DEBUG=y

CONFIG_CGROUP_NS=y

CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y

CONFIG_CPUSETS=y

CONFIG_PROC_PID_CPUSET=y

CONFIG_CGROUP_CPUACCT=y

CONFIG_RESOURCE_COUNTERS=y

CONFIG_NAMESPACES=y

CONFIG_UTS_NS=y

CONFIG_IPC_NS=y

CONFIG_USER_NS=y

CONFIG_PID_NS=y

CONFIG_NET_NS=y

CONFIG_VLAN_8021Q=y

CONFIG_VLAN_8021Q_GVRP=n

CONFIG_MACVLAN=y

CONFIG_VETH=y

CONFIG_DEVPTS_MULTIPLE_INSTANCES=y

CONFIG_SECURITY_FILE_CAPABILITIES=y

CONFIG_FAIR_GROUP_SCHED=y

CONFIG_RT_GROUP_SCHED=n

CONFIG_BLK_CGROUP=n

CONFIG_MACVTAP=n

CONFIG_CFS_BANDWIDTH=y

CONFIG_NETPRIO_CGROUP=y


I'm locking now into your kernel version to see what you have and what you dnt have from these .


I saw you have CONFIG_AUTOFS4_FS=y and I did nto ahd this till now . But I do not know if is that , so first I will have to make sure i have all kernel things selected .

Just to be sure is not kernel.


Georgian Chituc

unread,
Dec 1, 2016, 9:41:21 PM12/1/16
to Maru OS dev
If my kernel will succed to compile using all that seected , and lxc will still now work , I think I will try a different lxc version I see thre is already https://linuxcontainers.org/downloads/lxc/lxc-1.1.5.tar.gz  .

Or maybe get 1.0.9 stable source from debian and compile that .

Is very strange this error . I was thinked also maybe I miss some permissions in /dev  or maybe some kernel flags in ramdisk , I do not know .Very strange .

Georgian Chituc

unread,
Dec 1, 2016, 9:45:21 PM12/1/16
to Maru OS dev
Any way I have to try all I can , I can not just this let away in this stage.

After tons of lost nights trying to have a android source that compile and works good for h815 ,now I face the lxc problem . So I must to try to pass over this too .
It must work in a way ,God will help :)
It is loading more messages.
0 new messages