Code Monkey home page Code Monkey logo

autoadb's People

Contributors

npes87184 avatar rom1v avatar skaldebane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoadb's Issues

cargo build --release issue

i need to install autoadb but when i use this command on cargo build --release directory is says
'cargo' is not recognized as an internal or external command,
operable program or batch file.
and
even adb is connected
it says
adb.exe: unknown command cargo
please help me

how

how to use autoadb?? newbie here

autoadb with systemd; adb not found(?)

I have trouble automatically start autoadb. I know that the error is possibly in my systemd config, but all the error messages come from autoadb, and I hope that you could explain what the error messages exactly mean, to diagnose the issue.

zoltan@aprosag ~/.config/systemd/user $ systemctl --user status autoadb
● autoadb.service - autoadb
   Loaded: loaded (/home/zoltan/.config/systemd/user/autoadb.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-09-02 17:19:49 CEST; 4min 52s ago
 Main PID: 6427 (autoadb)
   CGroup: /user.slice/user-1000.slice/[email protected]/autoadb.service
           └─6427 /home/zoltan/git_repos/autoadb/target/release/autoadb scrcpy -s {}

Sep 02 17:19:49 aprosag systemd[2360]: Started autoadb.
Sep 02 17:19:49 aprosag autoadb[6427]: Detected device 73QDU17107002001
Sep 02 17:19:49 aprosag autoadb[6427]: INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
**Sep 02 17:19:49 aprosag autoadb[6427]: exec: No such file or directory**
Sep 02 17:19:49 aprosag autoadb[6427]: ERROR: Command not found: [/usr/bin/adb], [-s], [73QDU17107002001], [push], [/usr/local/share/scrcpy/scrcpy-server], [/data/local/tmp/scrcpy-server.jar]
Sep 02 17:19:49 aprosag autoadb[6427]: ERROR: (make 'adb' accessible from your PATH or define its fullpath in the ADB environment variable)
Sep 02 17:19:49 aprosag autoadb[6427]: INFO: You may download and install 'adb' from https://developer.android.com/studio/releases/platform-tools
Sep 02 17:19:49 aprosag autoadb[6427]: ERROR: Could not execute "adb push"
zoltan@aprosag ~/.config/systemd/user $ adb --version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5~18.04
Installed as /usr/lib/android-sdk/platform-tools/adb
zoltan@aprosag ~/.config/systemd/user $ /usr/bin/adb --version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5~18.04
Installed as /usr/lib/android-sdk/platform-tools/adb
zoltan@aprosag ~/.config/systemd/user $ cat autoadb.service
[Unit]
Description=autoadb

[Service]
Type=simple
Environment=ADB="/usr/bin/adb"
ExecStart=/home/zoltan/git_repos/autoadb/target/release/autoadb scrcpy -s '{}'

[Install]
WantedBy=default.target

What is strange to me, that there is no /usr/local/share/scrcpy/scrcpy-server file in my system.

zoltan@aprosag ~/.config/systemd/user $ ll /usr/local/share/scrcpy/scrcpy-server
ls: cannot access '/usr/local/share/scrcpy/scrcpy-server': No such file or directory

Starting autoadb from the command line works.

Could you help me pin-pointing what is the issue? autoadb detects the ID of the device, isn't it done with adb? Is the error clearly 'just' that the systemd unit does not find the command even with absolute path?

HOWTO: autoadb scrcpy - hide/show from Windows system tray and auto start at boot.

Big ups @rom1v for autoadb and scrcpy. I've been getting RSI from holding my phone too much swiping on the tinders and now I can control it remotely when at my desk all day haha jokes to the tinder part ;). Thank you!!

Before
image

After
image

Now, to business. Here's how to launch autoadb and scrcpy @ system boot and hidden to system tray to lessen the clutter of autoadb always running in taskbar.

  1. download an icon to your autoadb/scrcpy folder and make sure it's called "android.ico", i choose one similar to what scrcpy uses for the phone display window (https://www.iconspedia.com/icon/android-icon-37831.html)
  2. download free autohotkey (https://www.autohotkey.com/)
  3. in your autoadb/scrcpy folder create a new autohotkey file (right click > new AutoHotKey script) e.g ahk-autoadb-scrcpy-launch-to-tray.ahk
  4. paste this all in to the script over anything else that was there by default. Save the file.
#NoTrayIcon
#Persistent

global hAutoadb

/* Setup Tray icon and add item that will handle
 * double click events
 */
Menu Tray, Icon
Menu Tray, Icon, android.ico
Menu Tray, Add, Show / Hide autoadb, TrayClick
Menu Tray, Default, Show / Hide autoadb

;// Run autoadb hidden
DetectHiddenWindows On
Run autoadb.exe scrcpy.exe --always-on-top --turn-screen-off --stay-awake --show-touches,, Hide, PID
WinWait ahk_pid %PID%
hAutoadb := WinExist()
DetectHiddenWindows Off
return

TrayClick:
OnTrayClick()
return

;// Show / hide Autoadb on double click
OnTrayClick() {
	if DllCall("IsWindowVisible", "Ptr", hAutoadb) {
		WinHide ahk_id %hAutoadb%
	
	} else {
		WinShow ahk_id %hAutoadb%
		WinActivate ahk_id %hAutoadb%
	}
}
  1. right click your script and " send to > desktop (create shortcut)"
  2. cut this shortcut and paste it in
    • for user
      C:\Users<userid>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
      or - for all users
      C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
  3. PROFIT from these for amazing tools (figuratively ;)) auto launching at start and hiding the autoadb window

autodb only for predefined devices

Is there any configuration options to issue a command only for a predefined (set of) device(s)? Like a config file in ~/.autoadb/?
I would like to use scrcpy with it, but I would like to connect only to my own phone, and not other devices or someone's else phone, which is connected only for charging.

I know that most people does not have the developers options enabled in their phone, and probably any other device also won't react to adb or scrcpy, but I don't want to accidentally interact with another device.

Also for different devices, there could be different commands to execute.

Build failed: non-ident macro paths are experimental

Hello,
I try to install autoadb but command cargo build --release failed with:

warning: unused manifest key: package.edition
   Compiling byteorder v1.3.2
   Compiling log v0.4.8
error: non-ident macro paths are experimental (see issue #35896)
    --> /home/<user>/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.8/src/lib.rs:1422:1
     |
1422 | / cfg_if! {
1423 | |     if #[cfg(all(not(debug_assertions), feature = "release_max_level_off"))] {
1424 | |         const MAX_LEVEL_INNER: LevelFilter = LevelFilter::Off;
1425 | |     } else if #[cfg(all(not(debug_assertions), feature = "release_max_level_error"))] {
...    |
1447 | |     }
1448 | | }
     | |_^
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

error: Could not compile `log`.
warning: build failed, waiting for other jobs to finish...
error: build failed

how to use it ?!!!

i have debain system
I'm using scrcpy and i found this tool to make device connecting automatic
i follow all steps but when reach to this path ~/.cargo/config not found Config file so i make one I'm not sure is it the right way ?
and after finish everything what i shall i do ?

How to run autoadb on Linux ?

When i run this command

autoadb scrcpy -s '{ }' 

answer:

bash: autoadb: command not found

I already install rust enviroment from https://www.rust-lang.org/tools/install

and type this command

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

and successfully install

i type cargo --version display below

cargo 1.61.0 (a028ae4 2022-04-29)

then download autoadb-master.zip

extract zip

and type comman below in folder which extract by zip autoadb-master.zip

cargo build --release

and it generated the binary in target/release/autoadb

Did i miss something in the process?

Can't install AutoADB

Hello there!

I'm a newbie and want to use this AutoADB tool with scrcpy but when I triy to install AutoADB I got some problems.

So I installed this rust environment that I downloaded from here: https://www.rust-lang.org/tools/install. After that, I downloaded the AutoADB project and extracted its files from the archive. Then I opened the folder and then ran Windows PowerShell there and put this command: cargo build --release

But after entered that command it showed me some errors:
image

What do I need to do?

Hangs

When typing autoadb printf 'Device connected\n' it just hangs with no output. Same for the rest of the commands. What am I doing wrong. Cheers

Error when plug device

Scrcpy work fine when started manually, but with autoadb scrcpy -sW '{}' I get :

Detected device b73e81b9 ERROR: Unexpected additional argument: b73e81b9

Windows version

Is it possible to put compiled windows autoadb here?

Thanx

scrcpy: dyld: Library not loaded on macOS Catalina

Hi.

I compiled the latest version of this repo using cargo on macOS Catalina.
I have two devices: An AVD (Emulator) and a physical Android device (Samsung Galaxy J5 (2017) w/ Android 9.0).
When I start autoadb with scrcpy as you mentioned, the emulator shows up, but the phone doesn't. Showing this error:

Deteted device 5200b231bc27549d
2020-05-31 23:56:48.742 scrcpy[54954:174355] INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/local/Cellar/scrcpy/1.12.1/share/...shed. 3.2 MB/s (26202 bytes in 0.008s)
bind: Address already in use

This is very common and I usually fix it by killing adb.

When I unplug it and plug it again, it shows the following message:

Deteted device 5200b231bc27549d
dyld: Library not loaded: /usr/local/opt/libffi/lib/libffi.6.dylib
  Referenced from: /usr/local/opt/p11-kit/lib/libp11-kit.0.dylib
  Reason: image not found

Any explanations, fixes, or workarounds?
(btw, I kept your typo 'deteted'. Consider merging my pull request)

noconsole option for Windows?

Is there a way to run autoadb.exe without the console opening?

I have autoaudb set as a startup process and set to run scrcpy-noconsole.exe when I plug in my phone. That works great, but of course I still end up stuck with the console window open from autoadb running.

Is there any way to just run it in the background, without the console having to stay open, or can you release a noconsole.exe version like you did with scrcpy?

Thank You,
Zeagar

Needs some (or better) documentation

Instructions are assuming many things:

  • user has rustup installed
  • user knows how to install rustup
  • user knows how to use the binary file once it's built (I get command not found : autoadb when I try to run it)

It would also be nice to know how to use autoadb and also how to configure it away from the 3 examples given:

For example, to execute printf on device connection:

autoadb printf 'Device connected\n'
{} replaces the serial of the device detected:

autoadb printf 'Device %s connected\n' '{}'
It may be used to start scrcpy:

autoadb scrcpy -s '{}'

Questions:

  1. Is this supposed to run in the shell and keep a window help up while it is monitoring?
  2. What's the syntax for usage as I don't run scrcpy I run scrcpy --bit-rate 2M --max-size 800 -w --max-fps 15 --lock-video-orientation 0 --always-on-top -S --shortcut-mod=lalt,ralt
    is it autoadb <command to run> <options to run on the command> <autoadb options> or is it autoadb
  3. What are the other options other than -s?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.