Giter Site home page Giter Site logo

adbdocumentation's People

Contributors

cstyan avatar filmaj avatar gmaclennan avatar janickic avatar kaluluosi avatar metalex201 avatar pkill37 avatar shrestha-pranav 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

adbdocumentation's Issues

FAIL path too long when trying to pull a file

After I define the file I want to pull,

val remoteFile = "data/local/tmp/app.apk"

I want to send the path:

stream.write(remoteFile.toByteArray())

But when I read, it returns FAIL������path too long and stream closes with IOException. I already applied this fix, but it makes no difference.

Any clue of what's going on or any workaround?

Thanks in advance.

language translations

@kaluluosi I see that you've translated the documentation to Chinese, I'd love to include your translation here in this repo if you'd like to open a PR

Is running adb commands from microcontroller possible?

I recently posted a question on Android Stack Exchange, and while researching a possible solution, I came across this GitHub repository. My question is whether it is feasible to execute simple adb shell commands on an Android device from a microcontroller. To provide a simple example, I am interested in running the adb reboot command periodically as a simple task in a loop for an old android tablet that freezes sometimes.

Thank you for your attention and assistance!

A question about "shell:" stream

I wanted to ask a question about usage of "shell:" stream in ADB (when you don't write the command in the stream name, but interact with the stream later with WRITE, OKAY and receiving other messages).
Sometimes after I send the command I also need to send empty line (well, it's actually ASCII 13 and ASCII 0) to get output of it:

SEND: AdbMessage(cmd=cmdConnect, arg0=16777216, arg1=4096, data="0x7f560b34e0a8"host::\0"")
RECV: AdbMessage(cmd=cmdConnect, arg0=16777216, arg1=4096, data="0x7f560b3540d0"device::ro.product.name=NV310WAC;ro.product.model=NV310WAC;ro.product.device=NV310WAC;\0"")
SEND: AdbMessage(cmd=cmdOpen, arg0=12345, arg1=0, data="0x7f560b34e238"shell:\0"")
RECV: AdbMessage(cmd=cmdOkay, arg0=577, arg1=12345)
RECV: AdbMessage(cmd=cmdWrite, arg0=577, arg1=12345, data="0x7f560b359058"shell@NV310WAC:/ $ "")
ls /
Input: 0x7f560b354328"ls /"
SEND: AdbMessage(cmd=cmdWrite, arg0=12345, arg1=577, data="0x7f560b34e490"ls /\13\0"")
RECV: AdbMessage(cmd=cmdOkay, arg0=577, arg1=12345)
SEND: AdbMessage(cmd=cmdOkay, arg0=12345, arg1=577)
RECV: AdbMessage(cmd=cmdWrite, arg0=577, arg1=12345, data="0x7f560b34e6c0"ls /\13\13\10"
""")

Input: ""
SEND: AdbMessage(cmd=cmdWrite, arg0=12345, arg1=577, data="0x7f560b34e8a0"\13\0"")
RECV: AdbMessage(cmd=cmdOkay, arg0=577, arg1=12345)
SEND: AdbMessage(cmd=cmdOkay, arg0=12345, arg1=577)
RECV: AdbMessage(cmd=cmdWrite, arg0=577, arg1=12345, data="0x7f560b35c058"acct\13\10"
"cache\13\10"
"config\13\10"
"d\13\10"
"data\13\10"
"default.prop\13\10"
"dev\13\10"
"etc\13\10"
"favicon.ico\13\10"
"init\13\10"
"init.brcm_dhd.rc\13\10"
"init.goldfish.rc\13\10"
"init.rc\13\10"
"init.trace.rc\13\10"
"init.usb.rc\13\10"
"mnt\13\10"
"proc\13\10"
"restore\13\10"
"sbin\13\10"
"sdcard\13\10"
"storage\13\10"
"sys\13\10"
"system\13\10"
"tmp\13\10"
"ueventd.goldfish.rc\13\10"
"ueventd.rc\13\10"
"vendor\13\10"
"ws_home.html\13\10"
"shell@NV310WAC:/ $ \7\13\13\10"
"shell@NV310WAC:/ $ \7"")

But sometimes I don't need to:

SEND: AdbMessage(cmd=cmdConnect, arg0=16777216, arg1=4096, data="0x7f6d7b1b00a8"host::\0"")
RECV: AdbMessage(cmd=cmdConnect, arg0=16777216, arg1=4096, data="0x7f6d7b1b60d0"device::ro.product.name=NV310WAC;ro.product.model=NV310WAC;ro.product.device=NV310WAC;\0"")
SEND: AdbMessage(cmd=cmdOpen, arg0=12345, arg1=0, data="0x7f6d7b1b0238"shell:\0"")
RECV: AdbMessage(cmd=cmdOkay, arg0=574, arg1=12345)
RECV: AdbMessage(cmd=cmdWrite, arg0=574, arg1=12345, data="0x7f6d7b1bb058"shell@NV310WAC:/ $ "")
ls /
Input: 0x7f6d7b1b6328"ls /"
SEND: AdbMessage(cmd=cmdWrite, arg0=12345, arg1=574, data="0x7f6d7b1b0490"ls /\13\0"")
RECV: AdbMessage(cmd=cmdOkay, arg0=574, arg1=12345)
SEND: AdbMessage(cmd=cmdOkay, arg0=12345, arg1=574)
RECV: AdbMessage(cmd=cmdWrite, arg0=574, arg1=12345, data="0x7f6d7b1bd058"ls /\13\13\10"
"acct\13\10"
"cache\13\10"
"config\13\10"
"d\13\10"
"data\13\10"
"default.prop\13\10"
"dev\13\10"
"etc\13\10"
"favicon.ico\13\10"
"init\13\10"
"init.brcm_dhd.rc\13\10"
"init.goldfish.rc\13\10"
"init.rc\13\10"
"init.trace.rc\13\10"
"init.usb.rc\13\10"
"mnt\13\10"
"proc\13\10"
"restore\13\10"
"sbin\13\10"
"sdcard\13\10"
"storage\13\10"
"sys\13\10"
"system\13\10"
"tmp\13\10"
"ueventd.goldfish.rc\13\10"
"ueventd.rc\13\10"
"vendor\13\10"
"ws_home.html\13\10"
"shell@NV310WAC:/ $ \7"")

Do you know what I might be doing wrong? Maybe wrong order of commands or I need to add some special ASCII characters? I didn't find anything useful in the internet in the relation to that "shell:" stream sadly. (I'm trying to implement ADB protocol in Nim, I hope the SEND/RECV logs will be enough, the HEX number is the address of the string, you can ignore it)

Question: AUTH RSA Public Key Format

Hi,

Thanks for the documentation. This clarify some important things about ADB protocol. However im still stuck at the adb auth type 3 (RSAPUBLICKEY) about the public key format to send to the device. Same question has been asked here for more details. Do you know what is the correct format of adb public key?

Thanks.

list (adb ls) size is not always 4 bytes???

image
I'm trying to create an android library (for kotlin) that has every adb functionality i could get working, and i realised that files over 4 gigs wont fit into the size int limit of 4 bytes and for some reason it doesnt seem to appear to be any indication in a packet that it would be over the limit and i tried looking at packets and i couldnt find the last bit
for example heres a result from adb ls with a 4.95gb file
000081a4 1270e1b11 65f76bf2 test.zip
the packet that is returned when i do a list and get the dent for this specific file
a4810000111b0e27f26bf76508000000
Dent -> 44454e54
filetype -> a4810000 (big endian : 000081a4 as in the result from adb ls)
size -> 111b0e27 (MISSING THE LAST BIT -> 1)

test zip is 1270e1b11 (from adb ls result) little endian version is 111b0e271 <- extra bit here that is nowhere to be found in the packet.

Am i'm missing something here? or maybe i'm reading the packets in an incorrect way?

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.