Android 9 Source Code

@mo123
Thank you. It’s work.

@Terry
Please, update your gapps. You can download they here.

1 Like

We all downloaded and compiled all OK, now only you have a problem, maybe not downloaded completely.

@Terry
Does Khadas EDGE (android 9) has sleep mode with low power mode like VIM1/2?

You are right. The EDGE has sleep mode with low power.

@Terry
I don’t understand how to enter on low power mode?

@Terry
How to activate UART1 ?

Activated, connected to the serial port can be used.

1 Like

@goenjoy
No, it is not activate.
Need to activate &uart2 in rk3399-khadas-edge.dtsi

Name is ttyS2

@Terry
Why EDGE does not start if uart1 is connected?
How to fix it?

This UART2 has two functions: serial port printing debugging function and common serial port.

The two config are as follows:

FIQ debugging function config of UART2:

&uart2 {
	status = "disabled";
};

Common serial port config of UART2:

&uart2 {
	status = "okay";
};

&fiq_debugger {
	rockchip,serial-id = <0xffffffff>;
	status = "okay";
};
1 Like

@goenjoy
It does not work.


EDGE does not start if uart1 is connected.
How to fix it?

Please describe in more detail the phenomena and steps of the problem, and what is the serial device you are connected to?

@goenjoy
I connected Gps receiver.
Vim1 and vim2 work perfect. EDGE does not boot…

image
First confirm the voltage matching, 3.3V level is needed.

In addition, read and write permission for this serial port is required:

chmod 777 /dev/ttyS2

uart tool test download




To sum up, UART2 should be used as a common serial port. The following modifications are required:

  • Firstly, confirm whether the voltage of serial device matches or not.
  • uart2 config:
&uart2 {
	status = "okay";
};

&fiq_debugger {
	rockchip,serial-id = <0xffffffff>;
	status = "okay";
};
  • read and write permission for this serial port is required
--- a/init.rk30board.rc
+++ b/init.rk30board.rc
@@ -229,7 +229,9 @@ on boot
     chmod 0666 /sys/class/wol/rst_mcu
        #add for buzzer
        chmod 0666 /sys/class/w25q128fw/buzzer
-
+       
+       #add for ttyS2
+       chmod 777 /dev/ttyS2
        #add for mac_addr
1 Like

@goenjoy
No no, voltage and other is correct, I use 3.3V on EDGE header.
I mean that:

  1. If EDGE was start firstly and then I connect GPS on uart1, GPS works good, I can see all data on uart1.
  2. If I connect GPS on uart1 firstly, and then push power button on EDGE, EDGE does not boot. It shows rockchip logo only.

Please describe the problem clearly later. Add the following modifications:
u-boot/

--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -212,6 +212,8 @@ static int __abortboot(int bootdelay)
 {
        int abort = 0;
        unsigned long ts;
+       
+       return abort;
3 Likes

It fixes my issue.
Thank you!

One question.: how to repack img form out folder?

1 Like

https://docs.khadas.com/edge/BuildAndroid.html

$ cd PATH_YOUR_PROJECT
$ source build/envsetup.sh
$ lunch rk3399-userdebug
$ ./mkimage.sh
$ ./pack_image.sh

Yes, I try it, but is works strange. If I add new files in out folder or modif some files, then repack img with commands “. /mkimage.sh” and “. /pack_image.sh”. Sometime ROM don’t contain new files, sometime contain.
I don’t understand why it happens…
May be need something more?