diff --git a/lib/units/app/index.js b/lib/units/app/index.js index e5d3cd29..50d13a91 100644 --- a/lib/units/app/index.js +++ b/lib/units/app/index.js @@ -35,7 +35,7 @@ module.exports = function(options) { }) app.use('/static/docs', markdownServe.middleware({ - rootDirectory: pathutil.resource('docs') + rootDirectory: pathutil.root('node_modules/stf-docs') , view: 'docs' })) diff --git a/res/app/views/docs.jade b/res/app/views/docs.jade index 3b94cad8..a9621364 100644 --- a/res/app/views/docs.jade +++ b/res/app/views/docs.jade @@ -4,10 +4,10 @@ block content .col-md-10.col-md-offset-1 .widget-container.fluid-height .stf-docs-navigation - button.btn.btn-primary-outline.docs-back(ng-click='goBack()') + button.btn.btn-primary-outline.docs-back.transparent-border(ng-click='goBack()') i.fa.fa-chevron-left.fa-fw //span Back - button.btn.btn-primary-outline.docs-home(ng-click='goHome()') + button.btn.btn-primary-outline.docs-home.transparent-border(ng-click='goHome()') i.fa.fa-home.fa-fw //span Home .widget-content.padded diff --git a/res/docs/en/index.md b/res/docs/en/index.md deleted file mode 100644 index 092d3364..00000000 --- a/res/docs/en/index.md +++ /dev/null @@ -1,18 +0,0 @@ -# STF Documentation - -- Usage - - Getting Started - - [Remote Debugging](/#!/docs/en/remote-debug) - - - Remote Shell - - Browser Navigation - - App Uploading - - Automation - - Appium - - Others - - -- Documentation - -- License -- Contributing \ No newline at end of file diff --git a/res/docs/en/remote-debug.md b/res/docs/en/remote-debug.md deleted file mode 100644 index e3a9fade..00000000 --- a/res/docs/en/remote-debug.md +++ /dev/null @@ -1,94 +0,0 @@ -# Remote Debugging - -## Before starting - -To be able to use the device locally you need to have installed the [Android SDK Tools](https://developer.android.com/sdk/index.html). - - -## Debugging - -To be able to debug the remote device on a local machine, you need to do the following: - -1. On STF, after controlling a device, go to the **Dashboard** tab -> **Remote Debug** panel. - -2. There will be a text field with content like `adb connect ...`. Click and copy that text. - -3. Paste it and run it your command line. - -This will connect the device locally. - -You can check it worked, by going to your command line and typing: -```bash -adb devices -``` - - -### Android Studio - -You should be able to debug the device, however the IDE still has some bugs when using the debugger. - - -### Eclipse - -You should be able to debug the device as-is. - - - -### Chrome - -#### On the device - -On Chrome 32 and newer, you don't need to do anything on the device. - -On Chrome 32 and earlier, you need to enable USB remote debugging inside *Chrome Settings*: - -1. Open **Chrome**. -2. Go to **Settings** -> **Developer Tools**. -3. Enable **USB debugging**. - -#### On your desktop browser - -1. Open a new tab -2. Go to `chrome://inspect/#devices` on the address bar. -3. Enable **Discover USB devices** by clicking the checkbox. - -It should show a list of pages opened inside the Device's Chrome browser and WebViews. - -Now you can debug any page by clicking on **inspect**. - -See more on the [Remote Debugging on Android with Chrome](https://developer.chrome.com/devtools/docs/remote-debugging) docs. - - -### Firefox - -#### On the device - -1. Open **Firefox**. -2. Go to **Settings** -> **Developer tools**. -3. Enable **Remote debugging**. - -#### On your command line - -Go to your command line, and type: - -``` -adb forward tcp:6000 tcp:6000 -``` - -If you are using Firefox OS, type: - -``` -adb forward tcp:6000 localfilesystem:/data/local/debugger-socket -``` - - -#### On your desktop browser - -1. On the **Web Developer** menu, select **Connect**. -2. This will go to `chrome://browser/content/devtools/connect.xhtml`. -3. Press the **Connect** button. -4. On the device it will ask you to accept an **Incoming Connection**, press **OK**. - -This should show a list of pages opened inside the Device's Firefox browser and WebViews. - -See more on the [Remotely Debugging Firefox for Android](https://developer.mozilla.org/docs/Tools/Remote_Debugging/Firefox_for_Android) docs. diff --git a/res/docs/ja/index.md b/res/docs/ja/index.md deleted file mode 100644 index 1e4c574b..00000000 --- a/res/docs/ja/index.md +++ /dev/null @@ -1,4 +0,0 @@ -# STF ドキュメント - -- 利用 - - [リモートシェル](/#!/docs/ja/remote-shell) \ No newline at end of file diff --git a/res/docs/ja/remote-shell.md b/res/docs/ja/remote-shell.md deleted file mode 100644 index 1cc28de6..00000000 --- a/res/docs/ja/remote-shell.md +++ /dev/null @@ -1,110 +0,0 @@ -# リモート・シェル参照 - -### ファイル一覧 -``` -ls -la -``` -シェル起動直後はディレクトリはルートです。 - - -### パッケージ名列挙 - -``` -pm list packages -``` -インストールされてるアプリのパッケージ名が列挙される。 - -パッケージ名を一部しか覚えていないときに `pm list packages [パッケージ名]` のようにフィルタリングすることができる。 - - -### パッケージ削除 - -``` -pm uninstall [パッケージ名] -``` - -その他のパッケージ・マネジャーのコマンドは [ADB pm | Android Developers](http://developer.android.com/tools/help/adb.html#pm) を参照。 - - -### ファイルの中身 - -``` -cat /sdcard/hoge.txt -``` - -読み込み権限のあるファイルの中身を簡単に確認するときに使う。 - - -### アプリの起動 - -**Activityの起動 (ACTION_VIEW + URL)** - -``` -am start -a android.intent.action.VIEW -d http://google.com -``` - -**Activityの起動(クラス名を指定)** - -``` -am start -n com.hoge.app/.FugaActivity -``` - -**サービスの起動** - -``` -am startservice ... # Intentの指定方法はActivityと同じ -``` - -**ブロードキャストの送信** - -``` -am broadcast ... # Intentの指定方法はActivityと同じ -``` - - -### キーイベント送信 - -``` -input keyevent 3 # HOMEキー -``` - -数値でキーコードを指定する。 - -キーコードは[KeyEvent | Android Developers](http://developer.android.com/reference/android/view/KeyEvent.html)を参照。 - -### 画面録画 (KitKat4.4より) - -最大3分操作情報を録画できる。 - -``` -pre screenrecord [options] -``` - -[options]は[ADB screenrecord | Android Developers](http://developer.android.com/tools/help/adb.html#screenrecord)を参照。 - -`filename`には端末側のパスを指定する。 - -``` -screenrecord /sdcard/movie/sample.mp4 -``` - -### メモリ専有状況 - -``` -dumpsys procstats [パッケージ名] -``` - -例: `dumpsys procstats com.android.chrome` - ---- - - -### その他のシェルコマンド -実行可能なシェルコマンドの一覧を取得するのに、下記のコマンドを実行する。 - -``` -ls /system/bin -``` - - -もっと詳しいリファレンスは[こちら](https://github.com/jackpal/Android-Terminal-Emulator/wiki/Android-Shell-Command-Reference)。