How to build Android P SDK
#1
Hi,

I found Android P SDK on Wiki.
Who was already downloaded and build it?

https://wiki.pine64.org/index.php/ROCKPr...ndroid_SDK

If someone tried it, i want to know how to build and burn to sd card.
#2
(06-19-2019, 06:25 PM)licux Wrote: Hi,

I found Android P SDK on Wiki.
Who was already downloaded and build it?

https://wiki.pine64.org/index.php/ROCKPr...ndroid_SDK

If someone tried it, i want to know how to build and burn to sd card.

Please follow this thread: https://forum.pine64.org/showthread.php?tid=7595
#3
I was trying to build with the following config:

#!/bin/bash
ARCH=arm64
LUNCH=rk3399_box-userdebug
UBOOT_DEFCONFIG=rk3399
KERNEL_DEFCONFIG=rockchip_defconfig
KERNEL_DTS=rk3399-rockpro64
JOBS=4


And I get the following exception:

make[2]: Entering directory '/home/lineageos/external/rk_tee_user/ta/testapp'
/home/lineageos/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-gcc /home/lineageos/external/rk_tee_user/ta/testapp/testapp_ta.o
/home/lineageos/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-gcc /home/lineageos/external/rk_tee_user/ta/testapp/user_ta_header.o
CPP /home/lineageos/external/rk_tee_user/ta/testapp/ta.lds
LD /home/lineageos/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.elf
OBJDUMP /home/lineageos/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.dmp
OBJCOPY /home/lineageos/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.stripped.elf
SIGN /home/lineageos/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.ta
SIGN KEY /home/lineageos/external/rk_tee_user/export-user_ta/keys/oem_privkey.pem
Traceback (most recent call last):
File "/home/lineageos/external/rk_tee_user/export-user_ta/scripts/sign.py", line 80, in <module>
main()
File "/home/lineageos/external/rk_tee_user/export-user_ta/scripts/sign.py", line 40, in main
from Crypto.Signature import PKCS1_v1_5
ImportError: No module named Crypto.Signature
/home/lineageos/external/rk_tee_user/export-user_ta/mk/link.mk:65: recipe for target '/home/lineageos/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.ta' failed
make[2]: *** [/home/lineageos/external/rk_tee_user/ta/testapp/8cccf200-2450-11e4-abe20002a5d5c52c.ta] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/lineageos/external/rk_tee_user/ta/testapp'
Makefile:37: recipe for target 'ta' failed
make[1]: *** [ta] Error 2
make[1]: Leaving directory '/home/lineageos/external/rk_tee_user/ta'
Makefile:27: recipe for target 'ta' failed
make: *** [ta] Error 2
make: Leaving directory '/home/lineageos/external/rk_tee_user'
[ 2% 2330/92547] //external/f2fs-toolsConfusedload_f2fs clang fsck/xattr.c [linux_glibc]
ninja: build stopped: subcommand failed.
21:43:51 ninja failed with: exit status 1


Any ideas on what that would be?
#4
Here are the steps I've followed:

Download SDK here:

https://wiki.pine64.org/index.php/ROCKPr...ndroid_SDK

copy build_box.sh from here to root directory:

https://github.com/a9rock64/rk_device_ro...ild_box.sh

Contents of build_box.sh

lineageos@ba44581f91b1:~$ cat build_box.sh

Code:
#!/bin/bash
ARCH=arm64
LUNCH=rk3399_mid-userdebug
UBOOT_DEFCONFIG=rk3399
KERNEL_DEFCONFIG=rockchip_defconfig
KERNEL_DTS=rk3399-rockpro64
JOBS=4

usage()
{
    echo "USAGE: build [-ovj]"
    echo "-o                    -Generate ota package"
    echo "-v                    -Set build version name for output image folder"
    echo "-j                    -Build jobs"
    exit 1
}

# check pass argument
while getopts "ovj:" arg
do
    case $arg in
        o)
            echo "will build ota package"
            BUILD_OTA=true
            ;;
        v)
            BUILD_VERSION=$OPTARG
            ;;
        j)
            JOBS=$OPTARG
            ;;
        ?)
            usage ;;
    esac
done

source device/rockchip/common/build_base.sh -a $ARCH -l $LUNCH -u $UBOOT_DEFCONFIG -k $KERNEL_DEFCONFIG -d $KERNEL_DTS -j $JOBS


In terminal in the base directory of the project do the following:

. build/envsetup.sh
./build_box.sh

I made a docker image with the required build environment dependencies:

https://cloud.docker.com/repository/dock...-rockpro64

The docker setup was borrowed from a lineage project and the instructions can be found here:

https://github.com/darran-kelinske-fives...-rockpro64
#5
Had a successful build today:


Code:
Build android ok!
make and copy android images
TARGET_BOARD_PLATFORM=rk3399
TARGET_PRODUCT=rk3399_mid
TARGET_HARDWARE=rk30board
TARGET_BUILD_VARIANT=userdebug
BOARD_SYSTEMIMAGE_PARTITION_SIZE=2684354560
BOARD_USE_SPARSE_SYSTEM_IMAGE=true
TARGET_BASE_PARAMETER_IMAGE==
HIGH_RELIABLE_RECOVERY_OTA=false
BOARD_AVB_ENABLE=false
system filesysystem is ext4
create dtbo.img....
BOARD_AVB_ENABLE is false,use default dtbo.imgdone.
create boot.img....
BOARD_AVB_ENABLE is false, make boot.img from kernel.
done.
create recovery.img....
BOARD_AVB_ENABLE is false, make recovery.img from kernel && out.
done.
create system.img.... in=/home/lineageos/out/target/product/rk3399_mid/system.img out=/home/lineageos/out/target/product/rk3399_mid/system.img.out align=1024
Total of 655360 4096-byte output blocks in 22 input chunks.
Generating optimized sparse image done,total_chunk=17.
done.
create vbmeta.img.... BOARD_AVB_ENABLE is false,use default vbmeta.imgdone.
create vendor.img...in=/home/lineageos/out/target/product/rk3399_mid/vendor.img out=/home/lineageos/out/target/product/rk3399_mid/vendor.img.out align=1024
Total of 131072 4096-byte output blocks in 12 input chunks.
Generating optimized sparse image done,total_chunk=8.
done.
create oem.img...in=/home/lineageos/out/target/product/rk3399_mid/oem.img out=/home/lineageos/out/target/product/rk3399_mid/oem.img.out align=1024
Total of 131072 4096-byte output blocks in 12 input chunks.
Generating optimized sparse image done,total_chunk=8.
done.
create misc.img.... done.
create uboot.img...done.
create trust.img...done.
create loader...done.
create resource.img...done.
create kernel.img...done.
create parameter...done.
Make image ok!
Make update.img
start to make update.img...
Android Firmware Package Tool v1.62
------ PACKAGE ------
Add file: ./package-file
Add file: ./Image/MiniLoaderAll.bin
Add file: ./Image/parameter.txt
Add file: ./Image/trust.img
Add file: ./Image/uboot.img
Add file: ./Image/misc.img
Add file: ./Image/boot.img
Add file: ./Image/dtbo.img
Add file: ./Image/vbmeta.img
Add file: ./Image/recovery.img
Add file: ./Image/system.img
Add file: ./Image/vendor.img
Add file: ./Image/oem.img
Add CRC...
Make firmware OK!
------ OK ------
********RKImageMaker ver 1.63********
Generating new image, please wait...
Writing head info...
Writing boot file...
Writing firmware...
Generating MD5 data...
MD5 data generated successfully!
New image generated successfully!
Making update.img OK.
Make update image ok!
/home/lineageos
cwcw/home/lineageos
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/device/rockchip/rk3399/0001-set-lcd_density.patch
Generate patch for device/rockchip/rk3399 done
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/hardware/rockchip/libgralloc/0001-close-AFBC_LAYER.patch
Generate patch for hardware/rockchip/libgralloc done
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/kernel/0001-add-rockpro64-configs.patch
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/kernel/0002-for-tp-gt911-fw.patch
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/kernel/0003-generate-ethernet-MAC-address-form-cpuid.patch
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/kernel/0004-for-rockpro64-codec.patch
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/kernel/0005-add-sdcard-boot.patch
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/kernel/0006-set-boot_devices-sdhci.patch
Generate patch for kernel done
Generate patch for u-boot done
/home/lineageos/IMAGE/RK3399-ROCKPRO64_9_20190718.1752_RELEASE_TEST/PATCHES/vendor/rockchip/common/0001-rk3399-vpu-use-mpp-for-mpeg2.patch
Generate patch for vendor/rockchip/common done


Possibly Related Threads…
Thread Author Replies Views Last Post
  Android images for RockPro64 BitAnnihilator 5 1,520 06-04-2024, 11:05 PM
Last Post: tllim
  Difficulty installing Android on Rockpro64 spammycheese 0 3,068 02-17-2023, 05:31 AM
Last Post: spammycheese
  Using Android and the Playstore grobbs 0 2,866 06-04-2022, 12:18 AM
Last Post: grobbs
  Android TV miguelangelaj 2 3,631 06-03-2022, 11:23 AM
Last Post: miguelangelaj
  Control Fan in Android miguelangelaj 2 3,030 06-03-2022, 11:22 AM
Last Post: miguelangelaj
  Slash TV Android for RockPro64 Wizzard 12 12,895 04-24-2022, 08:13 AM
Last Post: Rocklobster
  DRM support in Android Wizzard 2 3,155 02-03-2022, 09:16 PM
Last Post: Johnmo89
  Install Playstore on Android 8.1.0 Domo 14 27,089 04-16-2021, 02:13 AM
Last Post: Wizzard
  Install Playstore on Android 7.1.2 Domo 6 15,587 04-16-2021, 02:10 AM
Last Post: Wizzard
  Kodi crashing in Android 9 Wizzard 2 4,434 04-16-2021, 02:03 AM
Last Post: Wizzard

Forum Jump:


Users browsing this thread: 1 Guest(s)