配置ADB网络调试

在GDK8虞城版本的安卓镜像内,是没有ADB网络调试这个功能的。考虑到使用ADB的USB调试功能时,USB线并不是太能保证稳定性,有时候会出现识别不到ADB设备或ADB设备断开的情况。所以格蠹的小伙伴们还是考虑把ADB网络调试的功能给加上,方便学习安卓的同学去使用GDK8。

build.prop

build.prop位于/system/目录下,用于记录系统的设置,可以把build.prop看作是Windows的注册表。

rk3328_box:/ # ls system
ls system
apex  bin         etc    framework  lib64     product     usr     xbin
app   build.prop  fonts  lib        priv-app  system_ext  vendor
rk3328_box:/ #

GDK8的build.prop文件中的内容如下所示。

# begin common build properties
# autogenerated by build/make/tools/buildinfo_common.sh
ro.system.build.date=Mon Mar 14 16:03:32 CST 2022
ro.system.build.date.utc=1647245012
ro.system.build.fingerprint=Rockchip/rk3328_box/rk3328_box:11/RP1A.201105.002/yanzi03141603:userdebug/release-keys
ro.system.build.id=RP1A.201105.002
ro.system.build.tags=release-keys
ro.system.build.type=userdebug
ro.system.build.version.incremental=eng.yanzi.20220314.094449
ro.system.build.version.release=11
ro.system.build.version.release_or_codename=11
ro.system.build.version.sdk=30
ro.product.system.brand=Rockchip
ro.product.system.device=rk3328_box
ro.product.system.manufacturer=Rockchip
ro.product.system.model=rk3328_box
ro.product.system.name=rk3328_box
# end common build properties
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=RP1A.201105.002
ro.build.display.id=rk3328_box-userdebug 11 RP1A.201105.002 eng.yanzi.20220314.094449 release-keys
ro.build.version.incremental=eng.yanzi.20220314.094449
ro.build.version.sdk=30
ro.build.version.preview_sdk=0
ro.build.version.preview_sdk_fingerprint=REL
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=11
ro.build.version.release_or_codename=11
ro.build.version.security_patch=2020-11-05
ro.build.version.base_os=
ro.build.version.min_supported_target_sdk=23
ro.build.date=Mon Mar 14 16:03:32 CST 2022
ro.build.date.utc=1647245012
ro.build.type=userdebug
ro.build.user=yanzi
ro.build.host=yanzi-ws
ro.build.tags=release-keys
ro.build.flavor=rk3328_box-userdebug
# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,
# use ro.product.cpu.abilist instead.
ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=armeabi-v7a,armeabi
ro.product.cpu.abilist64=arm64-v8a
ro.wifi.channels=
# ro.build.product is obsolete; use ro.product.device
ro.build.product=rk3328_box
# Do not try to parse description or thumbprint
ro.build.description=rk3328_box-userdebug 11 RP1A.201105.002 eng.yanzi.20220314.094449 release-keys
# end build properties

#
# from device/rockchip/rk3328/rk3328_box/system.prop
#
#
# system.prop
#

#rild.libpath=/system/lib/libreference-ril.so
#rild.libargs=-d /dev/ttyUSB2
# Default ecclist
ro.ril.ecclist=112,911
wifi.interface=wlan0
rild.libpath=/system/lib/libril-rk29-dataonly.so
rild.libargs=-d /dev/ttyACM0
persist.tegra.nvmmlite = 1
persist.sys.boot.check=false
ro.audio.monitorOrientation=true

#NFC
debug.nfc.fw_download=false
debug.nfc.se=false

#add Rockchip properties here
ro.rk.screenoff_time=2147483647
ro.rk.screenshot_enable=true
ro.rk.def_brightness=200
ro.rk.homepage_base=http://www.google.com/webhp?client={CID}&source=android-home
ro.rk.install_non_market_apps=false
vendor.hwc.compose_policy=6
sys.wallpaper.rgb565=0
sf.power.control=8847360
sys.rkadb.root=0
ro.sf.fakerotation=false
ro.sf.hwrotation=0
ro.rk.MassStorage=false
ro.rk.systembar.voiceicon=true
ro.rk.systembar.tabletUI=false
ro.rk.LowBatteryBrightness=true
ro.tether.denied=false
sys.resolution.changed=false
ro.default.size=100
persist.sys.timezone=
ro.product.usbfactory=rockchip_usb
ro.support.lossless.bitstream=true
wifi.supplicant_scan_interval=15
ro.factory.tool=0
ro.adb.secure =0
vendor.hwc.enable=1
#set wifi contry code
ro.boot.wificountrycode=CN
#set for video optimize
sys.video.netBuffer=20
sys.video.refFrameMode=0
ro.nrdp.modelgroup=NEXUSPLAYERFUGU
ro.build.shutdown_timeout=1
persist.sys.rotation.enable=true
persist.sys.forced_orient=2
persist.sys.app.rotation=force_land
service.adb.tcp.port=5555
# end of device/rockchip/rk3328/rk3328_box/system.prop

#
# ADDITIONAL_BUILD_PROPERTIES
#
ro.treble.enabled=true
persist.debug.dalvik.vm.core_platform_api_policy=just-warn
dalvik.vm.lockprof.threshold=500
net.bt.name=Android

添加ADB网络调试服务

找到build.prop,在文件内添加service.adb.tcp.port=5555

如果想要查看系统内更多的属性信息,可以通过getprop这条命令去查看,也可以直接找到build.prop文件,查看里面的内容。

查询安卓版本
rk3328_box:/ # getprop ro.build.version.release
getprop ro.build.version.release
11
rk3328_box:/ #
查询手机品牌
rk3328_box:/ # getprop ro.product.brand
getprop ro.product.brand
Rockchip
rk3328_box:/ #
rk3328_box:/ # getprop | grep 5555
getprop | grep 5555
[service.adb.tcp.port]: [5555]
rk3328_box:/ #
作者:Taylor  创建时间:2022-03-16 17:42
最后编辑:Taylor  更新时间:2024-09-14 11:25