Comments (12)
This would be great. Also planning on adb over wifi (mostly for Android TV). Do you think wifi could replace Bluetooth or do we need both?
from androidtool-mac.
Not all Wear devices will get WiFi support so supporting bluetooth too would be better. Not sure there would even be a difference though since they're both just going over TCP/IP from adb's perspective
from androidtool-mac.
I was wondering why the app wasn't working at all. I was using adb via tcp. I think it's pretty common and should be supported.
from androidtool-mac.
This should be fairly easy to implement:
diff --git a/AndroidTool/DevicePickerViewController.swift b/AndroidTool/DevicePickerViewController.swift
index d83cb81..ea385a9 100644
--- a/AndroidTool/DevicePickerViewController.swift
+++ b/AndroidTool/DevicePickerViewController.swift
@@ -30,7 +30,7 @@ class DevicePickerViewController: NSViewController, NSTableViewDelegate, NSTable
}
func installApkOnDevice(device:Device){
- let serial = device.serial!
+ let adbIdentifier = device.adbIdentifier!
for subview in view.subviews {
var s = subview as! NSView
@@ -41,7 +41,7 @@ class DevicePickerViewController: NSViewController, NSTableViewDelegate, NSTable
spinner.style = NSProgressIndicatorStyle.SpinningStyle
spinner.frame.origin.x = view.bounds.maxX/2 - spinner.bounds.size.width/2
- let args = ["\(serial)",
+ let args = ["\(adbIdentifier)",
"\(apkPath)"]
//["\(serial) install -r \"\(apkPath)\""]
Tested over WiFi (and USB), works well.
I noted some more problems related to using the device's serial instead of the ADB identifier. For example:
// Device.swift:82
ShellTasker(scriptFile: "getResolutionForSerial").run(arguments: ["\(self.serial!)"], isUserScript: false) { (output) -> Void in
let res = output as! String
if res.rangeOfString("Physical size:") != nil {
self.resolution = self.getResolutionFromString(output as! String)
} else {
println("Awkward. No size found. What I did find was \(res)")
}
}
Which consequently logs:
+error: device not found
Awkward. No size found. What I did find was
is nil
is nil
Perhaps self.adbIdentifier
should be used instead of self.serial
here as well?
If you want I can prepare a PR but I don't feel too comfortable changing so many parts (basically every place where ShellTasker
is called). What do you think?
from androidtool-mac.
Here's a diff that makes it work over WiFi: master...jlhonora:master
Tested APK install, screenshot, video recording and bug report script.
- Can anyone try it with a Bluetooth device? I don't have any at hand.
- @mortenjust , I couldn't find any contribution guidelines. Are there any? Does this fit as a pull request?
from androidtool-mac.
@jlhonora Thanks for your patch, it works fine with Moto 360 via bluetooth debug, including screenshot, recording(need tiny changes in the processing script) and bug report.
from androidtool-mac.
@Dibel Great! Could you elaborate on the changes for the processing script?
from androidtool-mac.
@jlhonora Yeah, but the change is for Moto 360's resolution (320x320). I don't know why the original command can't work.
diff --git a/AndroidTool/startRecordingForSerial.sh b/AndroidTool/startRecordingForSerial.sh
index 04f6d5a..cf80486 100644
--- a/AndroidTool/startRecordingForSerial.sh
+++ b/AndroidTool/startRecordingForSerial.sh
@@ -18,7 +18,7 @@ chara=$($adb -s $serial shell getprop ro.build.characteristics)
if [[ $chara == *"watch"* ]]
then
echo "Recording from watch..."
- $adb -s $serial shell screenrecord --o raw-frames /sdcard/screencapture.raw
+ $adb -s $serial shell screenrecord --size 320x320 --o raw-frames /sdcard/screencapture.raw
else
echo "Recording from phone..."
from androidtool-mac.
If anyone wants to contribute with a pull request that can solve this for all Android Wear screen sizes, I'd be happy to merge it in. Thanks!
from androidtool-mac.
Great. @Dibel, I have some changes that I'd like you to try in a real device, if that's possible. Let's talk via email (joseluishonorato at gmail) and I'll walk you through. Thanks in advance.
from androidtool-mac.
@mortenjust @jlhonora Tested OK on El Capitan with Moto 360. And I also migrated the app to Swift 2 to compile it on Xcode 7.
I've created a pull request #67, but please double-check it due to the huge changes.
from androidtool-mac.
Thanks! Went into 1.3.
from androidtool-mac.
Related Issues (20)
- Pause screen record
- same in here
- Android Tool starts blank. HOT 4
- using a built-in out-of-date version of 'adb' HOT 4
- a small suggestion
- recording never starts but screenshot works HOT 2
- Command line options?
- Video Screen Recording Limited (to 2 minutes)? HOT 1
- Is this maintained/dead? HOT 2
- Make it work for Android TV
- Showing black UI on MacOS 10.14 HOT 8
- MacOS 10.13.6 and Android Pie (9) Record screen not work.
- Support for 64-bit HOT 1
- [Feature Request] Screenshot with scroll HOT 1
- usb connected iphone6 10.3.1, mac os x Mojave 10.14.3, xcode Version 10.1 (10B61) could not launch
- Update homebrew cask to reference fork?
- Screen Recording Limit upto 3 minutes
- Question: Is there a way to use my ADB installation? HOT 3
- Recoded Video using this tool is not working
- shows up empty even though i have an android device connected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from androidtool-mac.