9

Android开发常用命令备忘

 3 years ago
source link: https://blog.bihe0832.com/android_command_during_developping.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

apkTool

  •   cd /d D:\apk & java -jar D:/apk/apktool.jar -f d D:\apk\AGSDKDemo.apk
      cd ~/temp & java -jar ~/lib/apktool_2.0.0rc2.jar d -f  ~/temp/MSDKDemo.apk
  • 重新打包:

      cd /d D:\apk & java -jar D:/apk/apktool.jar b D:/apk/a
      cd ~/temp & java -jar ~/lib/apktool_2.0.0rc2.jar b  ~/temp/MSDKDemo

Javah生成native头文件

  • cd /d E:\MSDK_SVN\trunk\android\OpenId\MSDK\bin\MSDKDemo\bin\classes & javah -classpath E:\MSDK_SVN\trunk\android\OpenId\MSDK\bin\msdk.jar;"D:\Program Files\adt-bundle-windows-x86-20131030\sdk\platforms\android-8\android.jar";. com.example.wegame.PlatformTest
    
    cd ~/msdk/trunk/android/TMGS/MSDKDemo/bin/classes/ & javah -jni com.example.wegame.MSDKApiNative
    	
    javah -classpath ../../../MSDK/bin/msdk.jar:$ANDROID_HOME/platforms/android-8/android.jar:. com.example.wegame.PlatformTest
  • monkey:

      adb shell monkey -p com.example.agsdkdemo 10000 -s500 -v
  • robotium:

      adb shell am instrument -w com.example.agsdkdemo.test/android.test.InstrumentationTestRunner
  • screencap:

      adb shell screencap -p /sdcard/screen.png && adb pull /sdcard/screen.png /tmp/ && adb shell rm /sdcard/screen.png && open file:/tmp/screen.png
  • 获取设备型号,厂商,CPU等信息:

      adb shell getprop | grep product
  • 通过scheme带参数拉起应用:

      adb -d shell am start -d msdkmainactivity://test -a android.intent.action.VIEW



About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK