Golang iDevice CLI

Overview

Golang-iDevice-CLI

license

Installation

https://github.com/electricbubble/gidevice-cli/releases

Devices

$ gidevice list

DeveloperDiskImage

$ gidevice mount -l
# gidevice mount -l -u=39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7
$ gidevice mount -d=/path/.../DeviceSupport/14.4/
$ gidevice mount /path/.../DeviceSupport/14.4/DeveloperDiskImage.dmg /path/.../DeviceSupport/14.4/DeveloperDiskImage.dmg.signature

App

$ gidevice applist
$ gidevice applist -t=all -u=39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7

$ gidevice launch com.apple.Preferences
$ gidevice kill com.apple.Preferences

$ gidevice install /path/.../WebDriverAgentRunner-Runner.ipa
$ gidevice uninstall com.leixipaopao.WebDriverAgentRunner.xctrunner

$ gidevice ps

Forward

# Default port local=8100 remote=8100
$ gidevice forward
$ gidevice forward -l=9100 -r=9100 -u=39xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7

XCTest

" --contains="Running tests..." --contains="Built at" ">
$ gidevice xctest com.leixipaopao.WebDriverAgentRunner.xctrunner
# Only the logs contained in the text are displayed
$ gidevice xctest com.leixipaopao.WebDriverAgentRunner.xctrunner --contains="ServerURLHere->" --contains="Running tests..." --contains="Built at"

Syslog

$ gidevice syslog

CrashReport

$ gidevice crashreport /path/.../local/dir/ -e -k

Thanks

About
libimobiledevice/libimobiledevice A cross-platform protocol library to communicate with iOS devices
anonymous5l/iConsole iOS usbmuxd communication impl iTunes protocol
alibaba/taobao-iphone-device tidevice can be used to communicate with iPhone device
electricbubble/gidevice communicate with iOS devices implemented with Golang

Thank you JetBrains for providing free open source licenses

Issues
  • Requesting to show console logs only when added --debug

    Requesting to show console logs only when added --debug

    Requesting to show logs only when executed command with argument --debug

    gidevice -u $UDID xctest com.facebook.WebDriverAgentRunner.xctrunner --debug

    opened by krishtoautomate 5
  • Panic during cobra call

    Panic during cobra call

    The info command works, but most other commands fail. What is wrong?

    gidevice applist --udid G6TZ8H5GN70F panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x38 pc=0x127e62a]

    goroutine 1 [running]: github.com/electricbubble/gidevice-cli/cmd.glob..func1(0x164c820?, {0x133369e?, 0x2?, 0x2?}) C:/Users/gyama/go/pkg/mod/github.com/electricbubble/gidevice-cli/gidevice-cli/cmd/applist.go:22 +0xaa github.com/spf13/cobra.(*Command).execute(0x164c820, {0xc0000860e0, 0x2, 0x2}) C:/Users/gyama/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x663 github.com/spf13/cobra.(*Command).ExecuteC(0x164cfa0) C:/Users/gyama/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x39c github.com/spf13/cobra.(*Command).Execute(...) C:/Users/gyama/go/pkg/mod/github.com/spf13/[email protected]/command.go:897 github.com/electricbubble/gidevice-cli/cmd.Execute() C:/Users/gyama/go/pkg/mod/github.com/electricbubble/gidevice-cli/gidevice-cli/cmd/root.go:26 +0x25 main.main() C:/Users/gyama/go/pkg/mod/github.com/electricbubble/gidevice-cli/gidevice-cli/main.go:8 +0x17 PS C:\Users\gyama\go\pkg\mod\github.com\electricbubble\gidevice-cli\gidevice-cli>

    opened by grecky-goo 3
  • Change port in wda with cli is not working

    Change port in wda with cli is not working

    below command is not changing the port and still selecting default port 8100

    gidevice -u $UDID xctest com.facebook.WebDriverAgentRunner.xctrunner —port 8200 —mjpeg-server-port 9200

    opened by krishtoautomate 2
  • receive packet: InvalidService

    receive packet: InvalidService

    run on windows 10 with usbmuxed built by myself.

    PS D:\workplace\gidevice-cli> .\gidevice-cli.exe list 8a8358e12e0306cc804f4367d9152fb795e3b561 8a8358e12e0306cc804f4367d9152fb795e3b561: receive packet: InvalidService

    手机信息为iPhoneX,系统版本14.0.1。 iConsole没有这个问题。对比了一下,代码里对14版本以上的手机调整了通信的服务导致错误。

    InstrumentsSecureProxyServiceName = "com.apple.instruments.remoteserver.DVTSecureSocketProxy"
    

    lockdown.go里

    func (c *lockdown) InstrumentsService() (instruments Instruments, err error) {
    	service := libimobiledevice.InstrumentsServiceName
    	if DeviceVersion(c.iOSVersion...) >= DeviceVersion(14, 0, 0) {
    		service = libimobiledevice.InstrumentsSecureProxyServiceName
    	}
    
    	var innerConn InnerConn
    	if innerConn, err = c._startService(service, nil); err != nil {
    		return nil, err
    	}
    	instrumentsClient := libimobiledevice.NewInstrumentsClient(innerConn)
    	instruments = newInstruments(instrumentsClient)
    
    	if service == libimobiledevice.InstrumentsServiceName {
    		_ = innerConn.DismissSSL()
    	}
    
    	if err = instruments.notifyOfPublishedCapabilities(); err != nil {
    		return nil, err
    	}
    
    	return
    }
    
    opened by prife 2
  • mount crash

    mount crash

    $ ./gidevice-cli mount ../tmp/14.0/DeveloperDiskImage.dmg ../tmp/14.0/DeveloperDiskImage.dmg.signature
    panic: runtime error: index out of range [2] with length 2
    
    goroutine 1 [running]:
    github.com/electricbubble/gidevice-cli/cmd.glob..func6(0x174db60, 0xc00005c640, 0x2, 0x2)
    	/Users/prife/workplace/iOS/gidevice-cli/cmd/mount.go:59 +0x9c5
    github.com/spf13/cobra.(*Command).execute(0x174db60, 0xc00005c5e0, 0x2, 0x2, 0x174db60, 0xc00005c5e0)
    	/Users/prife/workplace/iOS/gidevice-cli/vendor/github.com/spf13/cobra/command.go:856 +0x2c2
    github.com/spf13/cobra.(*Command).ExecuteC(0x174dde0, 0x10014d0, 0x0, 0x0)
    	/Users/prife/workplace/iOS/gidevice-cli/vendor/github.com/spf13/cobra/command.go:960 +0x375
    github.com/spf13/cobra.(*Command).Execute(...)
    	/Users/prife/workplace/iOS/gidevice-cli/vendor/github.com/spf13/cobra/command.go:897
    github.com/electricbubble/gidevice-cli/cmd.Execute()
    	/Users/prife/workplace/iOS/gidevice-cli/cmd/root.go:26 +0x2d
    main.main()
    	/Users/prife/workplace/iOS/gidevice-cli/main.go:8 +0x25
    FAIL: 2
    

    mount.go

    59: dmgPath, signaturePath = args[1], args[2]
    

    should be

    dmgPath, signaturePath = args[0], args[1]
    
    opened by prife 1
  • Service limit

    Service limit

    Some times i am getting these error:-

    2021/07/13 20:17:41 receive packet: ServiceLimit

    or

    panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x20 pc=0x728275]

    goroutine 24 [running]: github.com/electricbubble/gidevice/pkg/libimobiledevice.(*dtxMessageClient).startReceive.func1(0xc00037a3c0) /home/runner/go/pkg/mod/github.com/electricbubble/[email protected]/pkg/libimobiledevice/client_dtxmessage.go:323 +0x35 created by github.com/electricbubble/gidevice/pkg/libimobiledevice.(*dtxMessageClient).startReceive /home/runner/go/pkg/mod/github.com/electricbubble/[email protected]/pkg/libimobiledevice/client_dtxmessage.go:320 +0x46

    opened by shashank2086 1
Releases(v0.8.0)
Owner
雷系泡泡
雷系泡泡
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Dipto Chakrabarty 2 Jan 2, 2022
Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Elm 4 Jan 8, 2022
CLI to run a docker image with R. CLI built using cobra library in go.

BlueBeak Installation Guide Task 1: Building the CLI The directory structure looks like Fastest process: 1)cd into bbtools 2)cd into bbtools/bin 3)I h

Aniruddha Chattopadhyay 0 Dec 20, 2021
A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode.

aliyun-dns A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode. Installation Install aliyun-cli. Usage $ aliyun-dns -h A wra

许嘉华 0 Dec 21, 2021
Cli-algorithm - A cli program with A&DS in go!

cli-algorithm Objectives The objective of this cli is to implement 4 basic algorithms to sort arrays been Merge Sort Insertion Sort Bubble Sort Quick

Leonardo Brombilla Antunes 0 Jan 2, 2022
Nebulant-cli - Nebulant's CLI

Nebulant CLI Website: https://nebulant.io Documentation: https://nebulant.io/docs.html The Nebulant CLI tool is a single binary that can be used as a

Develatio 2 Jan 11, 2022
News-parser-cli - Simple CLI which allows you to receive news depending on the parameters passed to it

news-parser-cli Simple CLI which allows you to receive news depending on the par

Maxym 0 Jan 4, 2022
Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Pete Robinson 0 Jan 13, 2022
Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Aleksandr Baryshnikov 11 Jun 16, 2022
Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Katz 1 Jan 12, 2022
bcrypt-cli is the CLI tool for hashing passwords with bcrypt.

bcrypt-cli bcrypt-cli is the CLI tool for hashing passwords with bcrypt. Install go install github.com/ryicoh/bcrypt-cli Usage It can be used like bas

Ryuichiroh Ikeuchi 0 Jan 27, 2022
Gobby-cli - CLI application to debug gobby applications

go(bby) Interactive debugging tool for gobby applications Usage Coming soon™ Ins

Qwiri 0 Feb 8, 2022
GTDF-CLI - The official CLI tool to operate with Getting Things Done Framework

This is the official CLI tool to operate with Getting Things Done Framework. How

akrck02 1 Feb 14, 2022
Golang library with POSIX-compliant command-line UI (CLI) and Hierarchical-configuration. Better substitute for stdlib flag.

cmdr cmdr is a POSIX-compliant, command-line UI (CLI) library in Golang. It is a getopt-like parser of command-line options, be compatible with the ge

hz 109 Jun 28, 2022
A CLI tool implemented by Golang to manage `CloudComb` resource

CloudComb CLI tool: comb Get Started comb is a CLI tool for manage resources in CloudComb base on cloudcomb-go-sdk. Support Mac, Linux and Windows. We

Bingo Huang 22 Jan 4, 2021
A collection of terminal-based widgets for richer Golang CLI apps.

Flinch A collection of terminal-based widgets for richer Golang CLI apps. Ships with a library to build your own widgets/TUIs too. Warning: This modul

Liam Galvin 34 Jun 28, 2022
Got: Simple golang package and CLI tool to download large files faster 🏃 than cURL and Wget!

Got. Simple and fast concurrent downloader. Installation ❘ CLI Usage ❘ Module Usage ❘ License Comparison Comparison in cloud server: [[email protected]

Mohamed El Bahja 561 Jun 18, 2022
A golang CLI tool to download malware from a variety of sources.

mlget _____ _____ _____ _____ _____ /\ \

null 84 Jun 15, 2022