Gapps and SU on SOC?

I sent on email.
Thanks.

I saw the log file but did’t find the error information.
I noticed the date of log file 20170327, If you send the wrong file?
You can download the u-boot.bin to check the value of EnableSelinux .
About how to load u-boot.bin into the device, see here

I compiled on vmware, it still has the old date after resume.

Please, tell. How to clean completely the system to perform the compile again?

You can execute below command:

$ cd <path-your-project>
$ source build/envsetup.sh
$ lunch 9
$ make clean
$ make otapackage -j8

I try it soon.
Thanks.

I try root for nougat

It is availd for Android7.1.1 Root
You can follow below step to root

Step

  1. Make sure the selinux is permissiv

check the file uboot/board/khadas/configs/kvim.h
make sure the value of EnableSelinux is permissive and not enforcing

  1. Download the root file from github

$ cd
$ cd vendor/amlogic
$ git clone GitHub - khadas/supersu: SuperSU -b nougat “root”
3) Configure the build for Root

<1> modify ‘device/khadas/kvim/kvim.mk’:
BUILD_WITH_ROOT_CONFIG :=true
<2> modify ‘device/khadas/kvim/product/product.mk’
ifeq ($(BUILD_WITH_ROOT_CONFIG),true)
$(call inherit-product, vendor/amlogic/root/root.mk)
endif

  1. Build your rom again

$ cd
$ make installclean
$ make -jN otapackage

I rebuilded the u-boot after modify the file ‘uboot/board/khadas/configs/kvim.h’

$ cd u-boot
$ make distclean
$ make CROSS_COMPILE=aarch64-linux-gnu- kvim_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-

but again error like mmallow

kvim:/ $ getenforce
Enforcing

I use ubuntu after GEEKBOX. May be need new system.
I install new ubuntu 14.04 for Khadas Project. But I have the problem.

Please provider the kernel log for me. Thanks.

I sent full log on your email: terry@szwesion.com

I mean the printing log not build log

I sent kernel log on your email.

terry, please tell why

on android M6: make sure the value of EnableSelinux is disabled and not enforcing
on android N7: make sure the value of EnableSelinux is permissive and not enforcing

What is right?

“EnableSelinux=permissive\0”
or
“EnableSelinux=disabled\0”\

The value of EnableSeLinux is Disabled more better than Permissive.But the Android Nougat has a bug that it don’t set the EnableSeLinux as Disabled.

1 Like

I Understand.

But root does not work on my android M & N… I don’t know why…

I am at home.you can check the printing log.
Make sure the value of android.bootselinux in cmd line is permissive

Yes, I checked my log

androidboot.selinux=permissive

But then:
[ 4.940795@0] init: (Initializing SELinux enforcing took 0.28s.)

because

shell@Vim:/ $ getprop ro.build.type
user

but we need eng or userdebag for desable selinux

1 Like

Didn’t you lunch the userdebug?Oh my god,Yes,You need to lunch eng or userdebug

The instructions say:

For Andriod Marshmallow: lunch kvim-user-32
For Andriod Nougat: lunch kvim-user-64

Problem is solved. I added “user” on Android.mk and root was work on Marshmallow!

Are You used “userdebug” on your Vim_Marshmallow_Root_170121?

PS: I rebuild nougat after to added “user” on Android.mk. Root is work on Nougat too!!!

Yes,That is good news

Sorry to invade discussion but i’m trying to add SU on Marshmallow AOSP rombuild.
I’m using user build and enabled selinux permissive on it.
i have made also ro.secure=0 ro.debuggable=1 and security.perf_harden=0 (Not sure if needed)
I have also modified to change the su permissions in fs_config.c
I managed to get this work with this guide so that when flashing rom SuperSu ask for updating su binary and after that su works.
I then cleaned work area to verify build by deleting out dir and recompiled. No go anymore.