您尚未登录。

楼主 # 2021-08-05 11:16:16

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

我也来试一试编译 A33 android sdk,编译环境Ubuntu18.04,make版本v4.1

cube@ubuntu:/opt/a33/a33_android_sdk/android$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_x86-eng
     3. aosp_mips-eng
     4. vbox_x86-eng
     5. aosp_hammerhead-userdebug
     6. aosp_mako-userdebug
     7. vstar-eng
     8. vstar-user
     9. astar_y3-eng
     10. astar_y3-user
     11. aosp_manta-userdebug
     12. aosp_deb-userdebug
     13. aosp_grouper-userdebug
     14. aosp_tilapia-userdebug
     15. aosp_flo-userdebug
     16. mini_x86-userdebug
     17. mini_mips-userdebug
     18. mini_armv7a_neon-userdebug

Which would you like? [aosp_arm-eng] 7
build/core/config.mk:365: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.

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

cube@ubuntu:/opt/a33/a33_android_sdk/android$

Error: could not find jdk tools.jar, please install JDK6

出师不利, 开局就暴击, A33 android sdk 编译出现 jdk 相关错误的问题。

离线

楼主 #1 2021-08-05 11:22:24

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: 我也来试一试编译 A33 android sdk,编译环境Ubuntu18.04,make版本v4.1

1. 下载 jdk-6u45-linux-x64.bin,解压到 /usr/java/ 目录

2. 导出环境变量:

export ANDROID_JAVA_HOME="/usr/java/jdk1.6.0_45"
export JAVA_HOME="/usr/java/jdk1.6.0_45"

搞定:

cube@ubuntu:/opt/a33/a33_android_sdk/android$ lunch

You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_x86-eng
     3. aosp_mips-eng
     4. vbox_x86-eng
     5. aosp_hammerhead-userdebug
     6. aosp_mako-userdebug
     7. vstar-eng
     8. vstar-user
     9. astar_y3-eng
     10. astar_y3-user
     11. aosp_manta-userdebug
     12. aosp_deb-userdebug
     13. aosp_grouper-userdebug
     14. aosp_tilapia-userdebug
     15. aosp_flo-userdebug
     16. mini_x86-userdebug
     17. mini_mips-userdebug
     18. mini_armv7a_neon-userdebug

Which would you like? [aosp_arm-eng] 7

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=vstar
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-80-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=out
============================================

离线

楼主 #2 2021-08-05 11:27:41

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: 我也来试一试编译 A33 android sdk,编译环境Ubuntu18.04,make版本v4.1

cube@ubuntu:/opt/a33/a33_android_sdk/android$ make
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: *  You are using version 4.1 of make.
build/core/main.mk:47: *  Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: *  see https://source.android.com/source/download.html
build/core/main.mk:49: ********************************************************************************
build/core/main.mk:50: *** stopping.  Stop.

修改 build/core/main.mk

ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.81))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.82))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 4.1))

插入一行

离线

楼主 #3 2021-08-05 11:47:44

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: 我也来试一试编译 A33 android sdk,编译环境Ubuntu18.04,make版本v4.1

make 出现错误:

including ./sdk/hierarchyviewer/src/Android.mk ...
including ./sdk/monitor/Android.mk ...
including ./sdk/sdklauncher/Android.mk ...
including ./system/core/Android.mk ...
including ./system/extras/Android.mk ...
including ./system/media/audio_route/Android.mk ...
including ./system/media/audio_utils/Android.mk ...
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
No private recovery resources for TARGET_DEVICE vstar
build/core/main.mk:945: *** missing 'endif'.  Stop.

解决方案:
在 build/core/main.mk 945 行插入: endif



正在愉快地编译:

host C: libcrypto-host <= external/openssl/crypto/des/rpc_enc.c
host C: libcrypto-host <= external/openssl/crypto/des/set_key.c
host C: libcrypto-host <= external/openssl/crypto/des/str2key.c
host C: libcrypto-host <= external/openssl/crypto/des/xcbc_enc.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_ameth.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_asn1.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_check.c
external/openssl/crypto/dh/dh_ameth.c:500:2: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dh/dh_ameth.c:500:2: warning: (near initialization for 'dh_asn1_meth.old_priv_decode') [-Wmissing-field-initializers]
host C: libcrypto-host <= external/openssl/crypto/dh/dh_depr.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_err.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_gen.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_key.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_lib.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_pmeth.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_ameth.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_asn1.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_depr.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_err.c
external/openssl/crypto/dsa/dsa_ameth.c:650:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:650:3: warning: (near initialization for 'dsa_asn1_meths[0].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:656:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:656:3: warning: (near initialization for 'dsa_asn1_meths[1].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:662:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:662:3: warning: (near initialization for 'dsa_asn1_meths[2].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:668:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:668:3: warning: (near initialization for 'dsa_asn1_meths[3].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:702:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:702:3: warning: (near initialization for 'dsa_asn1_meths[4].item_verify') [-Wmissing-field-initializers]
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_gen.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_key.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_lib.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_ossl.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_pmeth.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_prn.c

离线

楼主 #5 2021-08-05 18:47:54

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: 我也来试一试编译 A33 android sdk,编译环境Ubuntu18.04,make版本v4.1

test0001 说:

大佬sdk哪里下载的

链接: https://pan.baidu.com/s/1wWYHReHEUaYoES_EBDrE6Q
提取码:waku
--来自百度网盘超级会员V1的分享

离线

楼主 #6 2021-08-05 18:50:03

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: 我也来试一试编译 A33 android sdk,编译环境Ubuntu18.04,make版本v4.1

编译成功:

aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'zu_ZA' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'am_ET' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'hi_IN' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'en_XA' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'ar_XB' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'fr_CA' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'xlarge' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'hdpi' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'xhdpi' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'large' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'nodpi' in packages/apps/Settings/res
Install: out/target/product/vstar/system/app/Gallery2.apk
Install: out/target/product/vstar/system/priv-app/Settings.apk
target Symbolic: libwebviewchromium (out/target/product/vstar/symbols/system/lib/libwebviewchromium.so)
target Strip: libwebviewchromium (out/target/product/vstar/obj/lib/libwebviewchromium.so)
Install: out/target/product/vstar/system/lib/libwebviewchromium.so
Install: out/target/product/vstar/system/framework/webviewchromium.jar
Install: out/target/product/vstar/fake_packages/webview-timestamp
build/tools/generate-notice-files.py  out/target/product/vstar/obj/NOTICE.txt  out/target/product/vstar/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" out/target/product/vstar/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Installed file list: out/target/product/vstar/installed-files.txt
Target system fs image: out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img
Running:  mkuserimg.sh -s out/target/product/vstar/system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 805306368 out/target/product/vstar/root/file_contexts
+ echo 'in mkuserimg.sh PATH=out/host/linux-x86/bin/:/usr/java/jdk1.6.0_45/bin:/usr/local/gnu-mcu-eclipse/riscv-none-gcc/7.2.0-4-20180606-1631/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/a33/a33_android_sdk/android/out/host/linux-x86/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.7/bin:/opt/a33/a33_android_sdk/android/development/emulator/qtools:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/development/scripts:/opt/a33/a33_android_sdk/android/prebuilts/devtools/tools:'
in mkuserimg.sh PATH=out/host/linux-x86/bin/:/usr/java/jdk1.6.0_45/bin:/usr/local/gnu-mcu-eclipse/riscv-none-gcc/7.2.0-4-20180606-1631/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/a33/a33_android_sdk/android/out/host/linux-x86/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.7/bin:/opt/a33/a33_android_sdk/android/development/emulator/qtools:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/development/scripts:/opt/a33/a33_android_sdk/android/prebuilts/devtools/tools:
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 6 -ne 5 -a 6 -ne 6 ']'
+ SRC_DIR=out/target/product/vstar/system
+ '[' '!' -d out/target/product/vstar/system ']'
+ OUTPUT_FILE=out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=system
+ SIZE=805306368
+ FC=out/target/product/vstar/root/file_contexts
+ case $EXT_VARIANT in
+ '[' -z system ']'
+ '[' -z 805306368 ']'
+ '[' -n out/target/product/vstar/root/file_contexts ']'
+ FCOPT='-S out/target/product/vstar/root/file_contexts'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system'
+ echo make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system
make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system
+ make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system
Creating filesystem with parameters:
    Size: 805306368
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 3072
    Label:
    Blocks: 196608
    Block groups: 6
    Reserved block group size: 47
Created filesystem with 1596/49152 inodes and 87533/196608 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/vstar/system.img
out/target/product/vstar/system.img+out/target/product/vstar/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=822163584 blocksize=4224 total=349827018 reserve=8308608
cube@ubuntu:/opt/a33/a33_android_sdk/android$

打包成功:

cube@ubuntu:/opt/a33/a33_android_sdk/android$ pack
copying tools file
copying configs file
copying boot resource
copying boot file
packing for android
normal
/opt/a33/a33_android_sdk/lichee/tools/pack/pctools/linux/eDragonEx/
/opt/a33/a33_android_sdk/lichee/tools/pack/out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=4bec00Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=b09000Add partion system.fex SYSTEM_FEX000000
Add partion very system.fex SYSTEM_FEX000000
FilePath: system.fex
FileLength=14b64864Add partion recovery.fex RECOVERY_FEX0000
Add partion very recovery.fex RECOVERY_FEX0000
FilePath: recovery.fex
FileLength=dd1000Add partion diskfs.fex DISKFS_FEX000000
Add partion very diskfs.fex DISKFS_FEX000000
FilePath: diskfs.fex
FileLength=200sys_config.fex Len: 0xf8df
config.fex Len: 0x9c24
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xf0a
boot0_nand.fex Len: 0x8000
boot0_sdcard.fex Len: 0x8000
u-boot.fex Len: 0xbc000
fes1.fex Len: 0x1fc0
usbtool.fex Len: 0x20600
aultools.fex Len: 0x25d92
aultls32.fex Len: 0x2295a
cardtool.fex Len: 0x14000
cardscript.fex Len: 0x6ea
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0x2ed88
boot-resource.fex Len: 0x4bec00
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0xb09000
Vboot.fex Len: 0x4
system.fex Len: 0x14b64864
Vsystem.fex Len: 0x4
recovery.fex Len: 0xdd1000
Vrecovery.fex Len: 0x4
diskfs.fex Len: 0x200
Vdiskfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------

/opt/a33/a33_android_sdk/lichee/tools/pack/sun8iw5p1_android_vstar.img

pack finish
cube@ubuntu:/opt/a33/a33_android_sdk/android$

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn