Ubuntu设置

Android WiFI操作

关闭wifi

复制代码
adb shell cmd wifi set-wifi-enabled disabled

打开wifi

复制代码
adb shell cmd wifi set-wifi-enabled enabled

扫描wifi

复制代码
adb shell cmd wifi start-scan

查看扫描结果

复制代码
adb shell cmd wifi list-scan-results

连接wifi

复制代码
adb shell cmd wifi connect-network XJMZ-Phone wpa2 12345678

查看连接状态

复制代码
adb shell cmd wifi status

车机有线adb

复制代码
adb root
ifconfig eth2 up
ifconfig eth2 10.10.107.108 netmask 255.255.255.0
adb shell ip route add default via 10.10.107.1
adb connect 10.10.107.108:5544

固件编译

默认开启无线adb

复制代码
vi /home/wjs/xxx/src/aosp/device/xxxx/xxx/xxxx/system.prop
service.adb.tcp.port=5544

默认开启wifi

复制代码
/home/wjs/xxx/src/aosp/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
#修改
<bool name="def_wifi_on">true</bool>
<bool name="def_wifi_display_on">true</bool>

默认apk路径

复制代码
./src/aosp/vendor/xxxx/app_artifacts/cache/xxxx/system/xxx/xxxx.apk

#将pk8转pem

复制代码
openssl pkcs8 -in platform.pk8 -inform DER -outform PEM -out platform.priv.pem -nocrypt

#将公钥pem加密为pk12

复制代码
openssl pkcs12 -export -in platform.x509.pem -inkey platform.priv.pem -out platform.pk12 -name wangjiasheng -password pass:812330500

#生成jks

复制代码
keytool -importkeystore -deststorepass 812330500 -destkeypass 812330500 -destkeystore sign.jks -srckeystore platform.pk12 -srcstoretype PKCS12 -deststoretype PKCS12 -srcstorepass 812330500 -alias wangjiasheng

#生成keystore

复制代码
keytool -importkeystore -deststorepass 812330500 -destkeypass 812330500 -destkeystore sign.keystore -srckeystore platform.pk12 -srcstoretype PKCS12 -deststoretype PKCS12 -srcstorepass 812330500 -alias wangjiasheng

使用方法

复制代码
signingConfigs {
        getByName("debug") {
                enableV1Signing =true
                enableV2Signing =true
                enableV3Signing =true
                enableV4Signing =true
                storeFile = file("sign.jks")
                storePassword = "812330500"
                keyAlias = "wangjiasheng"
                keyPassword = "812330500"
        }
        register("release") {
                enableV1Signing =true
                enableV2Signing =true
                enableV3Signing =true
                enableV4Signing =true
                storeFile = file("sign.jks")
                storePassword = "812330500"
                keyAlias = "wangjiasheng"
                keyPassword = "812330500"
        }
}

打开设置

复制代码
adb shell am start -n com.android.car.settings/.Settings_Launcher_Homepage

adb shell am start -a android.settings.SETTINGS

查看CC

复制代码
adb shell getprop | findstr carconfig466

查看系统分区使用情况

复制代码
dh -f

查看当前目录大小

复制代码
du -sh

查看当前目录中的文件大小

复制代码
ls -sh
FWK设置多个仓库
复制代码
File->Settings->Version Control->Directory Mappings

FWK ASFP多个TAB显示多行

复制代码
File_Settings->Editor->General->Editor Tabs->#Multiplerows

右侧Toolbar显示Debug

复制代码
点击Toolbar 
右键-> customize toolbar...->选择合适的位置->
点击add按钮->输入Attach to Android Process...

设置系统DNS

复制代码
sudo vi /etc/systemd/resolved.conf

linux不能播放视屏的问题

复制代码
sudo apt-get remove totem

查看需要安装的用户

复制代码
adb shell pm list users

无线adb

复制代码
persist.adb.tcp.port=5555

git 设置

复制代码
git config --global url.ssh://xxx.pushInsteadOf ssh://xxx

root

复制代码
adb shell
busybox telnet 192.168.8.1
root
gri2655888=
/mnt/scripts/qvb_switch.sh off
reset

dd if=/mnt/scripts/qvb_switch_img/mifs_hyp_la.img of=/dev/disk/uda4 bs=4096 seek=1070 count=16384 conv=sync
dd if=/mnt/scripts/qvb_switch_img/mifs_hyp_la.img of=/dev/disk/uda5 bs=4096 seek=1096 count=16384 conv=sync
reset

下载虚拟机

Home - Support Portal - Broadcom support portal - Support Portal