• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Android » Android forum » adb can not push with file greater than 405 bytes
Share
Android
  • Forum
Options
  • Subscribe via RSS

adb can not push with file greater than 405 bytes

adb can not push with file greater than 405 bytes

This question is answered
Nont Banditwong
Posted by Nont Banditwong
on Aug 25 2011 03:11 AM
Prodigy80 points

I'm porting Android rowboat Gingerbread 2.3.4 to work on TAM-3517 Twister,

I can use adb shell connect to device and able to use adb pull to get file from device properly but

adb install and adb push is not working, adb push can not work on file size greater than 405 bytes,

I don't know how to debug adb please advice, thanks.

 

adb push failed, needed to unplug and replug usb adb back to operation (able to adb shell).

 

$ ADB_TRACE=1 adb push 406b.bin /data/local
_adb_connect: host:version
writex: fd=3 len=4: 30303063  000c
writex: fd=3 len=12: 686f73743a76657273696f6e  host:version
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
4f4b4159  OKAY
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
30303034  0004
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
30303161  001a
_adb_connect: sync:
writex: fd=3 len=4: 30303132  0012
writex: fd=3 len=18: 686f73743a7472616e73706f72742d61  host:transport-a
Switch transport in progress
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
4f4b4159  OKAY
Switch transport success
writex: fd=3 len=4: 30303035  0005
writex: fd=3 len=5: 73796e633a  sync:
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
4f4b4159  OKAY
writex: fd=3 len=8: 535441540b000000  STAT....
writex: fd=3 len=11: 2f646174612f6c6f63616c  /data/local
readx: fd=3 wanted=16
readx: fd=3 wanted=16 got=16
53544154f9410000a803000049d4554e  STAT.A......I.UN
writex: fd=3 len=8: 53454e441a000000  SEND....
writex: fd=3 len=20: 2f646174612f6c6f63616c2f34303662  /data/local/406b
writex: fd=3 len=6: 2c3333313838  ,33188
writex: fd=3 len=4068: 44415441dc0f00000000000000000000  DATA............
writex: fd=3 len=8: 444f4e45a7d1554e  DONE..UN
readx: fd=3 wanted=8

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
usb freeze after this line, unplug and replug usb adb back to operation (able to adb shell).


adb push working properly if file size is lower than 406 bytes.
$ ADB_TRACE=1 adb push 405b.bin /data/local
_adb_connect: host:version
writex: fd=3 len=4: 30303063  000c
writex: fd=3 len=12: 686f73743a76657273696f6e  host:version
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
4f4b4159  OKAY
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
30303034  0004
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
30303161  001a
_adb_connect: sync:
writex: fd=3 len=4: 30303132  0012
writex: fd=3 len=18: 686f73743a7472616e73706f72742d61  host:transport-a
Switch transport in progress
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
4f4b4159  OKAY
Switch transport success
writex: fd=3 len=4: 30303035  0005
writex: fd=3 len=5: 73796e633a  sync:
readx: fd=3 wanted=4
readx: fd=3 wanted=4 got=4
4f4b4159  OKAY
writex: fd=3 len=8: 535441540b000000  STAT....
writex: fd=3 len=11: 2f646174612f6c6f63616c  /data/local
readx: fd=3 wanted=16
readx: fd=3 wanted=16 got=16
53544154f9410000a8030000e1d4554e  STAT.A........UN
writex: fd=3 len=8: 53454e441a000000  SEND....
writex: fd=3 len=20: 2f646174612f6c6f63616c2f34303562  /data/local/405b
writex: fd=3 len=6: 2c3333313838  ,33188
writex: fd=3 len=4058: 44415441d20f00000000000000000000  DATA............
writex: fd=3 len=8: 444f4e4585d1554e  DONE..UN
readx: fd=3 wanted=8
readx: fd=3 wanted=8 got=8
4f4b415900000000  OKAY....
95 KB/s (4050 bytes in 0.041s)
writex: fd=3 len=8: 5155495400000000  QUIT....
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Aug 25 2011 03:33 AM
    Genius9550 points

    Please provide the logcat output from your device to help us debug this.

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nont Banditwong
    Posted by Nont Banditwong
    on Aug 25 2011 10:08 AM
    Prodigy80 points

    No log generated on both push 405 and 406 bytes to device, only log below when plug usb. How do I setup to open more debug message ?

    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    D/Vold    (  875): USB disconnected
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    D/Vold    (  875): USB connected
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    D/Vold    (  875): USB disconnected
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    D/Vold    (  875): USB connected
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    D/Vold    (  875): USB disconnected
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    W/Vold    (  875): Ignoring unknown switch 'usb_connected'
    D/Vold    (  875): USB connected
    
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Aug 25 2011 23:57 PM
    Genius9550 points

    You can change the logging level by modifying init.rc. You need to modify the below line and change 3 to 4 or above to get more logs:

    loglevel 3

    ...

    Also, just a thought... are you seeing this issue only on your board or on AM3517evm too. Can you build and run the kernel uImage for AM3517evm from the same sources and check?

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nont Banditwong
    Posted by Nont Banditwong
    on Aug 26 2011 03:02 AM
    Prodigy80 points

    changing loglevel to 8 not help, no log print out from adb push or any adb operation.

    This board is not AM3517evm but TAM-3517 Twister, I use source code from  rowboat Gingerbread 2.3.4 port to this board.

    using strace to adbd, this problem might from adbd itself

     

    output from strace -p <adb pid> shown below,

    using adb push 405b.bin /data/local (successful) vs. adb push 406b.bin /data/local (fail)

    below is interesting system call

       write(76, "/data/local/405b.bin,33188DATA�\17"..., 4092) = 4092

    vs. adb push 406b.bin

    write(76, "/data/local/406b.bin,33188DATA�\17"..., 4096) = 4096

    from adb source (rowboat-android/system/core/adb/*) I saw most buffer size is 4096 bytes may be something wrong around here, and found a few stuff in source code,

    changing loglevel might not help.

     

    Thank you for your kind help,


    $ adb push 405b.bin /data/local
    ) = 1 (in [28])
    read(28, "�\34\3\0", 4)                 = 4
    socketpair(PF_UNIX, SOCK_STREAM, 0, [76, 77]) = 0
    fcntl64(76, F_SETFD, FD_CLOEXEC)        = 0
    fcntl64(77, F_SETFD, FD_CLOEXEC)        = 0
    mmap2(0x10000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_
    NORESERVE, -1, 0) = 0x40144000
    mprotect(0x40144000, 4096, PROT_NONE)   = 0
    clone(child_stack=0x40243f00, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND
    |CLONE_THREAD|CLONE_SYSVSEM|CLONE_DETACHED) = 2142
    fcntl64(76, F_SETFD, FD_CLOEXEC)        = 0
    fcntl64(76, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "H�\2\0", 4)                   = 4
    write(76, "STAT\v\0\0\0", 8)            = 8
    write(28, "H�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "p�\2\0", 4)                   = 4
    write(76, "/data/local", 11)            = 11
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [76])
    read(76, "STAT�A\0\0(\1\0\0k?WN", 4096) = 16
    read(76, 0x2fca4, 4080)                 = -1 EAGAIN (Try again)
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74], [], [], NULL) = 1 (in [28])
    read(28, "H�\2\0", 4)                   = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "p�\2\0", 4)                   = 4
    write(76, "SEND\32\0\0\0", 8)           = 8
    write(28, "H�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "\230\f\3\0", 4)               = 4
    write(76, "/data/local/405b.bin,33188DATA�\17"..., 4092) = 4092
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [76])
    read(76, "OKAY\0\0\0\0", 4096)          = 8
    read(76, 0x2fc9c, 4088)                 = -1 EAGAIN (Try again)
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74], [], [], NULL) = 1 (in [28])
    read(28, "H�\2\0", 4)                   = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "p�\2\0", 4)                   = 4
    write(76, "QUIT\0\0\0\0", 8)            = 8
    write(28, "H�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 2 (in [28 76])
    read(28, "\230\f\3\0", 4)               = 4
    write(28, "H�\2\0", 4)                  = 4
    close(76)                               = 0
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74], [], [], NULL



    $ adb push 406b.bin /data/local
     
    ) = 1 (in [28])
    read(28, "�\34\3\0", 4)                 = 4
    socketpair(PF_UNIX, SOCK_STREAM, 0, [76, 77]) = 0
    fcntl64(76, F_SETFD, FD_CLOEXEC)        = 0
    fcntl64(77, F_SETFD, FD_CLOEXEC)        = 0
    mmap2(0x10000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_
    NORESERVE, -1, 0) = 0x40144000
    mprotect(0x40144000, 4096, PROT_NONE)   = 0
    clone(child_stack=0x40243f00, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND
    |CLONE_THREAD|CLONE_SYSVSEM|CLONE_DETACHED) = 2220
    fcntl64(76, F_SETFD, FD_CLOEXEC)        = 0
    fcntl64(76, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "H�\2\0", 4)                   = 4
    write(76, "STAT\v\0\0\0", 8)            = 8
    write(28, "H�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "p�\2\0", 4)                   = 4
    write(76, "/data/local", 11)            = 11
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [76])
    read(76, "STAT�A\0\0(\1\0\0y?WN", 4096) = 16
    read(76, 0x2fca4, 4080)                 = -1 EAGAIN (Try again)
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74], [], [], NULL) = 1 (in [28])
    read(28, "H�\2\0", 4)                   = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "p�\2\0", 4)                   = 4
    write(76, "SEND\32\0\0\0", 8)           = 8
    write(28, "H�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL) = 1 (in [28])
    read(28, "\230\f\3\0", 4)               = 4
    write(76, "/data/local/406b.bin,33188DATA�\17"..., 4096) = 4096
    write(28, "p�\2\0", 4)                  = 4
    select(77, [4 5 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 36 4
    0 44 48 52 56 60 62 64 66 68 70 72 74 76], [], [], NULL
    
    
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Aug 26 2011 04:24 AM
    Genius9550 points

    Thanks for the info.

    We will look into this and get back to you.

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nont Banditwong
    Posted by Nont Banditwong
    on Sep 13 2011 21:03 PM
    Verified Answer
    Verified by Nont Banditwong
    Prodigy80 points

    Hi,

     

    This problem solved already,

    I think some of kernel config is wrong, I've reviewed mine with am3517_evm_android_defconfig some of them difference such as disable DMA

    CONFIG_MUSB_PIO_ONLY=y

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Christian Richter
    Posted by Christian Richter
    on Mar 15 2012 08:31 AM
    Intellectual340 points

    Hi all,

    sry for asking on answered post...

    Can you tell me how to get ADB-connection to TAM3517 on Twisterboard???

    Cause if I check for devices with command "adb devices" I always get an empty list....

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vishveshwar Bhat
    Posted by Vishveshwar Bhat
    on Mar 16 2012 00:58 AM
    Genius9550 points

    A few things to check:

    - is adb platform support added to your board file?
    - is adb enabled in your kernel build?
    - do you see adb_init or similar logs in kernel boot log?
    - do you see any logs when you attach or detach the adb usb cable?

    Please start a new topic the next time and not hijack an existing thread.

    ---------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use