• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. android面試調(diào)試技巧

        時(shí)間:2022-12-08 06:31:07 如何面試 我要投稿
        • 相關(guān)推薦

        android面試調(diào)試技巧

          1. Android adb shell 啟動(dòng)java程序

        android面試調(diào)試技巧

          (1) 進(jìn)入shell

          C:\Documents and Settings\mawenjian>adb shell

          (2) 看一下命令的幫助

          # am -help

          am -help

          Error: Unknown command: -help

          usage: am [start|instrument]

          am start [-a ] [-d ] [-t ]

          [-c [-c ] ...]

          [-e [-e ...]

          [-n <:COMPONENT>] [-D] []

          am instrument [-e ] [-p ]

          [-w] <:COMPONENT>

          (3) 好了,試一下啟動(dòng)瀏覽器

          # am start -n com.google.android.browser/com.google.android.browser.BrowserActivity

          am start -n com.google.android.browser/com.google.android.browser.BrowserActivity

          Starting: Intent { comp={com.google.android.browser/com.google.android.browser.BrowserActivity} }

          (4) ok,成功了, 大家試試下面的命令吧:

          # am start -a android.intent.action.VIEW -d http://mwjian.javaeye.com

          am start -a android.intent.action.VIEW -d http://mwjian.javaeye.com

          Starting: Intent { action=android.intent.action.VIEW data=http://mwjian.javaeye.com }

          # am start -a android.intent.action.CALL -d tel:88888888

          am start -a android.intent.action.CALL -d tel:88888888

          Starting: Intent { action=android.intent.action.CALL data=tel:88888888 }

          # am start -a android.intent.action.ALL_APPS

          am start -a android.intent.action.ALL_APPS

          Starting: Intent { action=android.intent.action.ALL_APPS }

          # am start -a android.intent.action.VIEW geo:0,0?q=shanghai

          am start -a android.intent.action.VIEW geo:0,0?q=shanghai

          Starting: Intent { action=android.intent.action.VIEW data=geo:0,0?q=shanghai }

          2. adb mount ,push的使用

          Android 的主要調(diào)試工具adb(Android debuging bridge),ddms是一個(gè)在adb基礎(chǔ)上的一個(gè)圖形化工具。 這里主要講解Android adb,它是一個(gè)命令行工具。而ddms功能與adb相同,只是它有一個(gè)圖形化界面。對(duì)不喜歡命今操作方式的人來(lái)說(shuō)是一個(gè)不錯(cuò)的選擇。這些命令在 Android sdk下的tools目錄下。這些命令在linux和window中都可運(yùn)行

          (1) 首先確定本機(jī)上有一個(gè)模擬器已啟動(dòng)。確定是否有模擬器已啟動(dòng)可以使用命令:

          adb devices

          List of devices attached

          emulator-5554 device

          emulator-5556 device

          返回一個(gè)5554的模擬器。

          (2) 給模擬器安裝一個(gè)應(yīng)用程序,使用命令 adb install

          adb install /home/myname/test.apk

          t在Android adb中,test.apk是一個(gè)打包好的應(yīng)用程序。

          安裝好的程序可以在用adb shell 命令在模擬器目錄/system/app中找到,文件名字都和安裝的一樣。

          (3) 文件傳輸:pc機(jī)與模擬機(jī)之間的文件傳輸可以使用adb pull 和adb push

          adb pull是把文件從模擬機(jī)上復(fù)制到pc機(jī)上,使用方法如下

          adb pull < remote> < local>

          其中remote代表模擬機(jī)文件路徑,local為pc機(jī)文件路徑。

          如:adb pull /system/app/test.apk /home/myname/test.apk

          adb push則相返,是把文件從pc機(jī)上復(fù)制到模擬機(jī)上,push可以把任務(wù)文件都復(fù)制到模擬機(jī)上,如果是把一個(gè)apk文件上傳到/system/app/下則和adb install作用一樣。使用方法

          adb push < local> < remote>

          大家都明白Android是一個(gè)操作系統(tǒng)平臺(tái),啟動(dòng)一個(gè)模擬器就啟動(dòng)了一個(gè)操作系統(tǒng)。可以使用Android adb連接到這個(gè)操作系統(tǒng),并運(yùn)行一些系統(tǒng)命令,就像平時(shí)大家用終端訪問(wèn)一臺(tái)遠(yuǎn)程linux/unix服務(wù)器。可以使用adb shell。如下進(jìn)行shell后運(yùn)行l(wèi)s命令,在該shell下可運(yùn)行l(wèi)inux下一些常用的命令,注意:adb shell是只啟動(dòng)一個(gè)模擬器(emulator)的情況,如果啟動(dòng)了多個(gè)模擬器,如剛才使用的adb devices命令返回了兩個(gè)模擬器,如果要連接其中一個(gè)則加參數(shù)-s:使用如:adb -s emulator-5554 shell

          adb shell

          # ls

          sqlite_stmt_journals

          cache

          sdcard

          etc

          init

          init.goldfish.rc

          init.rc

          data

          sys

          system

          proc

          default.prop

          sbin

          root

          dev

          #

          (4) Android adb刪除文件,如果使用adb shell直接進(jìn)入用rm命令刪除文件是刪不掉的。在adb shell命令前運(yùn)行adb remount

          $adb remount;

          $adb shell

          #

        【android面試調(diào)試技巧】相關(guān)文章:

        華為android面試題07-30

        面試的技巧12-16

        面試技巧01-11

        面試的技巧10-14

        面試技巧11-09

        面試的技巧03-18

        經(jīng)典的面試技巧03-17

        面試技巧心得范文與技巧07-07

        面試技巧之面試禮儀11-10

        流利面試英語(yǔ)面試技巧07-31

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 激情六月激情网久久 | 伊伊久久综在合线视 | 中文字幕永久在线中文免费 | 中文字幕一级二级 | 五月婷婷88亚洲 | 亚洲综合精品一区 |

            android面試調(diào)試技巧

              1. Android adb shell 啟動(dòng)java程序

            android面試調(diào)試技巧

              (1) 進(jìn)入shell

              C:\Documents and Settings\mawenjian>adb shell

              (2) 看一下命令的幫助

              # am -help

              am -help

              Error: Unknown command: -help

              usage: am [start|instrument]

              am start [-a ] [-d ] [-t ]

              [-c [-c ] ...]

              [-e [-e ...]

              [-n <:COMPONENT>] [-D] []

              am instrument [-e ] [-p ]

              [-w] <:COMPONENT>

              (3) 好了,試一下啟動(dòng)瀏覽器

              # am start -n com.google.android.browser/com.google.android.browser.BrowserActivity

              am start -n com.google.android.browser/com.google.android.browser.BrowserActivity

              Starting: Intent { comp={com.google.android.browser/com.google.android.browser.BrowserActivity} }

              (4) ok,成功了, 大家試試下面的命令吧:

              # am start -a android.intent.action.VIEW -d http://mwjian.javaeye.com

              am start -a android.intent.action.VIEW -d http://mwjian.javaeye.com

              Starting: Intent { action=android.intent.action.VIEW data=http://mwjian.javaeye.com }

              # am start -a android.intent.action.CALL -d tel:88888888

              am start -a android.intent.action.CALL -d tel:88888888

              Starting: Intent { action=android.intent.action.CALL data=tel:88888888 }

              # am start -a android.intent.action.ALL_APPS

              am start -a android.intent.action.ALL_APPS

              Starting: Intent { action=android.intent.action.ALL_APPS }

              # am start -a android.intent.action.VIEW geo:0,0?q=shanghai

              am start -a android.intent.action.VIEW geo:0,0?q=shanghai

              Starting: Intent { action=android.intent.action.VIEW data=geo:0,0?q=shanghai }

              2. adb mount ,push的使用

              Android 的主要調(diào)試工具adb(Android debuging bridge),ddms是一個(gè)在adb基礎(chǔ)上的一個(gè)圖形化工具。 這里主要講解Android adb,它是一個(gè)命令行工具。而ddms功能與adb相同,只是它有一個(gè)圖形化界面。對(duì)不喜歡命今操作方式的人來(lái)說(shuō)是一個(gè)不錯(cuò)的選擇。這些命令在 Android sdk下的tools目錄下。這些命令在linux和window中都可運(yùn)行

              (1) 首先確定本機(jī)上有一個(gè)模擬器已啟動(dòng)。確定是否有模擬器已啟動(dòng)可以使用命令:

              adb devices

              List of devices attached

              emulator-5554 device

              emulator-5556 device

              返回一個(gè)5554的模擬器。

              (2) 給模擬器安裝一個(gè)應(yīng)用程序,使用命令 adb install

              adb install /home/myname/test.apk

              t在Android adb中,test.apk是一個(gè)打包好的應(yīng)用程序。

              安裝好的程序可以在用adb shell 命令在模擬器目錄/system/app中找到,文件名字都和安裝的一樣。

              (3) 文件傳輸:pc機(jī)與模擬機(jī)之間的文件傳輸可以使用adb pull 和adb push

              adb pull是把文件從模擬機(jī)上復(fù)制到pc機(jī)上,使用方法如下

              adb pull < remote> < local>

              其中remote代表模擬機(jī)文件路徑,local為pc機(jī)文件路徑。

              如:adb pull /system/app/test.apk /home/myname/test.apk

              adb push則相返,是把文件從pc機(jī)上復(fù)制到模擬機(jī)上,push可以把任務(wù)文件都復(fù)制到模擬機(jī)上,如果是把一個(gè)apk文件上傳到/system/app/下則和adb install作用一樣。使用方法

              adb push < local> < remote>

              大家都明白Android是一個(gè)操作系統(tǒng)平臺(tái),啟動(dòng)一個(gè)模擬器就啟動(dòng)了一個(gè)操作系統(tǒng)。可以使用Android adb連接到這個(gè)操作系統(tǒng),并運(yùn)行一些系統(tǒng)命令,就像平時(shí)大家用終端訪問(wèn)一臺(tái)遠(yuǎn)程linux/unix服務(wù)器。可以使用adb shell。如下進(jìn)行shell后運(yùn)行l(wèi)s命令,在該shell下可運(yùn)行l(wèi)inux下一些常用的命令,注意:adb shell是只啟動(dòng)一個(gè)模擬器(emulator)的情況,如果啟動(dòng)了多個(gè)模擬器,如剛才使用的adb devices命令返回了兩個(gè)模擬器,如果要連接其中一個(gè)則加參數(shù)-s:使用如:adb -s emulator-5554 shell

              adb shell

              # ls

              sqlite_stmt_journals

              cache

              sdcard

              etc

              init

              init.goldfish.rc

              init.rc

              data

              sys

              system

              proc

              default.prop

              sbin

              root

              dev

              #

              (4) Android adb刪除文件,如果使用adb shell直接進(jìn)入用rm命令刪除文件是刪不掉的。在adb shell命令前運(yùn)行adb remount

              $adb remount;

              $adb shell

              #

            【android面試調(diào)試技巧】相關(guān)文章:

            華為android面試題07-30

            面試的技巧12-16

            面試技巧01-11

            面試的技巧10-14

            面試技巧11-09

            面試的技巧03-18

            經(jīng)典的面試技巧03-17

            面試技巧心得范文與技巧07-07

            面試技巧之面試禮儀11-10

            流利面試英語(yǔ)面試技巧07-31