The title speaks for itself - I am wondering why there isn't a larger move towards rooting this thing? It's a development board; yet there is no root available for this system. Maybe we could research as a whole how to get this done?

v8dave wrote:If you build the source and choose the USERDEBUG version (default), you have full root access.

This does not seem to be true. I have userdebug enabled on my build (I built following the instructions so I have a default build, I also checked in "about this phone, it says userdebug in the build number). None of the apps I have installed that require root seem to think they have root access...

Unfortunately it didn't help much. Seems like the info is too old to work with Nougat.

You know the odd thing about all this is I can use Magisk just fine to root a FireFly RK3399 based board but it does not recognize the boot image format for the NanoPC. It seem that the NanoPC uses an older format than what RockChip supports now, and the FireFly uses UEFI boot.

Basically friendlyelec needs to modernize the boot process for their boards and follow the new rockchip way of doing things with uefi and things would just work fine...

Too bad, somehow I am stuck ..I compiled a boot-image including kernel, and it works.When installing Magisk I can create a patched-boot-image, but here my problems start:How do I install it?I tried to go into 'fastboot mode' by 'adb reboot bootloader', and by pressing the boot-button when switching on the device, but all I see is a black screen, and fastboot tells me 'waiting for device'.I tried flashing the patched-boot-image with the RKDevTool, but end up in Recovery mode.

The steps are:1. Put the downloaded files into /vendor/root (make sure that you also copy the hidden file!)2. Change root.mk: replace "vendor/amlogic/root" by "vendor/root"3. Add also the line "vendor/root/su:system/xbin/su \"4. Add "PRODUCT_PACKAGES += SuperSU" at the end of that file5. Now go into the folder "SuperSU" and change "LOCAL_CERTIFICATE := PRESIGNED" to "LOCAL_CERTIFICATE := PLATFORM" inside "Android.mk"6. Modify "/device/rockchip/rk3399/nanopc_t4.mk" by adding "$(call inherit-product-if-exists, vendor/root/root.mk)"

And then recompile (you don't need to clear the entire output directory).I hope I did not miss anythink.

When compiling there was in issue with: "ninja: error: 'build/target/product/security/PLATFORM.pk8', needed by 'out/target/product/nanopc-t4/obj/APPS/SuperSU_intermediates/package.apk', missing and no known rule to make it". I copied the existing 'build/target/product/security/platform.pk8' to 'build/target/product/security/PLATFORM.pk8'. With the same for PLATFORM.x509.pem and PLATFORM.pem.

After these changes compilation went smoothly.

When running SuperSu it's asking to update the su-binary, which is not working. But this does not cause any problems.

"Should not be root, I don't know why you want to root, if you need to access hardware resources, you can actually do it without root, you can check it out here: http://wiki.friendlyarm.com/wiki/index. ... for_RK3399"and"Because this violates the rules of android and will make your device unsafe."

You have access to the Andoird and Android Linux source so you can potentially do anything you want right there. You can add in any SU apk and have this as part of the build. Make other changes for security etc.

I recently needed a way to shutdown the Android device from code and I made changes to the source to bypass the security level that only allowed SYSTEM APPS to do this and now I can shutdown the system from a standard app. As the device is for a fixed product, this works well. I also added double tap to wake for Android 5.1 on the Nano PC T3 Plus as part of the Linux kernel.

I've downloaded and can build the RK3399 Android 8 and already making some changes to the OS to support double tap to wake as I did with the above Nano PC t3 Plus.

If you don't know how to build the source, it's not too hard if you follow the instructions on the wiki. I use a laptop with Ubuntu 12.04 but you can also build within a VM running 12.04 too.

The steps are:1. Put the downloaded files into /vendor/root (make sure that you also copy the hidden file!)2. Change root.mk: replace "vendor/amlogic/root" by "vendor/root"3. Add also the line "vendor/root/su:system/xbin/su \"4. Add "PRODUCT_PACKAGES += SuperSU" at the end of that file5. Now go into the folder "SuperSU" and change "LOCAL_CERTIFICATE := PRESIGNED" to "LOCAL_CERTIFICATE := PLATFORM" inside "Android.mk"6. Modify "/device/rockchip/rk3399/nanopc_t4.mk" by adding "$(call inherit-product-if-exists, vendor/root/root.mk)"

And then recompile (you don't need to clear the entire output directory).I hope I did not miss anythink.

You have really led me onto trying this. However, I have some questions.

1. When you say /vendor/root, my "vendor" folder doesn't have root. Do I make the folder? This is a fresh download of the source.2. When you say copy the hidden file as well, I enabled hidden files and there is no hidden file there. Am I missing something or is there just not one there? I went to SuperSU and downloaded the zip folder and I have the files that extracted from that.

Daitaro wrote:1. When you say /vendor/root, my "vendor" folder doesn't have root. Do I make the folder? This is a fresh download of the source.

- Yes, just create it. You can actually use any folder you want it just has to be referenced correctly inside "/device/rockchip/rk3399/nanopc_t4.mk".

Daitaro wrote:2. When you say copy the hidden file as well, I enabled hidden files and there is no hidden file there. Am I missing something or is there just not one there? I went to SuperSU and downloaded the zip folder and I have the files that extracted from that.

- The file ".installed_su_daemon" is invisible by default. Make sure it is also present in your directory.

Daitaro wrote:I'll try your responses and ask anything else I need help with.Thank you so much for your tip on getting root!

raimo wrote:- Yes, just create it. You can actually use any folder you want it just has to be referenced correctly inside "/device/rockchip/rk3399/nanopc_t4.mk".

You have been most helpful! Thank you!

- I've made the folder and added the files, but I have another couple of questions (answer them as it's convenient for you, as I'm really extremely grateful).

I've downloaded supersu 2.82. The zip folder from chainfire.

1) You mention being able to make any folder instead of /vendor/root, as long as I reference it in "/device/rockchip/rk3399/nanopc_t4.mk". Does this mean that /vendor/root has to be referenced as well, or is it fine without it as long as I use /vendor/root? I couldn't find it within that file. If so, how would I add it?

2) I'm not sure I'm copying over the correct files, as in my SuperSU folder, there's no Android.mk, as you specify. Also, I have found root.mk under the build/make/core folder. Is this correct? My root.mk is essential empty with a bold caution not to edit the file. Again, this is all off of a fresh android 8.1 image from friendlyelec.

I will do every bit of legwork to get this working, as I originally started this thread. Thank you so much for the help, and I hope you don't mind me piecing more questions in here!

The instructions I posted are referring to the SuperSU version from https://github.com/khadas/supersu. There all files I mentioned should be present and you don't need any additional files.

1) You mention being able to make any folder instead of /vendor/root, as long as I reference it in "/device/rockchip/rk3399/nanopc_t4.mk". Does this mean that /vendor/root has to be referenced as well, or is it fine without it as long as I use /vendor/root? I couldn't find it within that file. If so, how would I add it?

The folder does not matter, just the location of the makefile "root.mk". This has to be specified by adding the line "$(call inherit-product-if-exists, vendor/root/root.mk)" to "/device/rockchip/rk3399/nanopc_t4.mk". There you could also adjust the directory.

2) I'm not sure I'm copying over the correct files, as in my SuperSU folder, there's no Android.mk, as you specify. Also, I have found root.mk under the build/make/core folder. Is this correct? My root.mk is essential empty with a bold caution not to edit the file. Again, this is all off of a fresh android 8.1 image from friendlyelec.

If you use the files from the repository mentioned above the "Android.mk" file is inside the folder SuperSU.

The title speaks for itself - I am wondering why there isn't a larger move towards rooting this thing? It's a development board; yet there is no root available for this system. Maybe we could research as a whole how to get this done?

I can use Magisk just fine to root a FireFly RK3399 based Onlinesbisudokuincometaxindiaefiling board but it does not recognize the boot image format for the NanoPC. It seem that the NanoPC uses an older format than what RockChip supports now, and the FireFly uses UEFI boot.

Last edited by eluzerkharix on Mon Nov 04, 2019 3:22 am, edited 1 time in total.

The case of "PLATFORM" is relevant, if you change to "platform" there is no need to duplicate the certificates with an uppercase name. Or, you could change "PLATFORM" to "SuKludge" and then copy the platform* certificates to SuKludge* in /build/target/product/security so that your SuperSu has its (own copy of the platform) certificates.

The instructions I posted are referring to the SuperSU version from https://hawkbets.com/. There all files I mentioned should be present and you don't need any additional files.

1) You mention being able to make any folder instead of /vendor/root, as long as I reference it in "/device/rockchip/rk3399/nanopc_t4.mk". Does this mean that /vendor/root has to be referenced as well, or is it fine without it as long as I use /vendor/root? I couldn't find it within that file. If so, how would I add it?

The folder does not matter, just the location of the makefile "root.mk". This has to be specified by adding the line "$(call inherit-product-if-exists, vendor/root/root.mk)" to "/device/rockchip/rk3399/nanopc_t4.mk". There you could also adjust the directory.

2) I'm not sure I'm copying over the correct files, as in my SuperSU folder, there's no Android.mk, as you specify. Also, I have found root.mk under the build/make/core folder. Is this correct? My root.mk is essential empty with a bold caution not to edit the file. Again, this is all off of a fresh android 8.1 image from friendlyelec.

If you use the files from the repository mentioned above the "Android.mk" file is inside the folder SuperSU.