Code Monkey home page Code Monkey logo

awutils's People

Contributors

ithamar 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

Watchers

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

awutils's Issues

MALLOC_CHECK_=0 ./awimage img.dump

With a freshly unpacked, not modified image I received as follows:

*** glibc detected *** ./awimage: double free or corruption (!prev): 0x0000000000bbc250 ***

After

export MALLOC_CHECK_=0

it works fine and puts out a file the same size as original. Haven't flashed so not sure.
If you're interested I compiled awimage with -g again and could post the gdb and other output ...

[Compile Error] usb.h - awflash.c

cc -Wall -o log2bin log2bin.c
cc -Wall -o awimage awimage.c parsecfg.c twofish.c rc6.c
awimage.c: In function ‘decrypt_image’:
awimage.c:371:43: warning: variable ‘firmware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:30: warning: variable ‘hardware_id’ set but not used [-Wunused-but-set-variable]
awimage.c:371:25: warning: variable ‘vid’ set but not used [-Wunused-but-set-variable]
awimage.c:371:20: warning: variable ‘pid’ set but not used [-Wunused-but-set-variable]
twofish.c: In function ‘tf_init’:
twofish.c:405:33: warning: variable ‘mo_key’ set but not used [-Wunused-but-set-variable]
twofish.c:405:22: warning: variable ‘me_key’ set but not used [-Wunused-but-set-variable]
cc -Wall -o awflash awflash.c -lusb
awflash.c:115:10: error: unknown type name ‘libusb_device_handle’
awflash.c:178:13: error: unknown type name ‘libusb_device_handle’
awflash.c:315:20: error: unknown type name ‘libusb_device_handle’
awflash.c: In function ‘main’:
awflash.c:338:2: error: unknown type name ‘libusb_device_handle’
awflash.c:374:11: warning: assignment from incompatible pointer type [enabled by default]
awflash.c:379:2: warning: passing argument 1 of ‘usb_set_configuration’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:309:5: note: expected ‘struct usb_dev_handle ’ but argument is of type ‘int *’
awflash.c:383:2: warning: passing argument 1 of ‘usb_claim_interface’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:310:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘int *’
awflash.c:387:2: warning: passing argument 1 of ‘usb_set_altinterface’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:312:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘int *’
awflash.c:392:2: warning: implicit declaration of function ‘aw_get_version’ [-Wimplicit-function-declaration]
awflash.c:396:3: warning: implicit declaration of function ‘fex_command’ [-Wimplicit-function-declaration]
awflash.c:413:3: warning: implicit declaration of function ‘fex_write_file’ [-Wimplicit-function-declaration]
awflash.c:423:20: error: ‘AWL_FEL_1_EXEC’ undeclared (first use in this function)
awflash.c:423:20: note: each undeclared identifier is reported only once for each function it appears in
make: *
* [awflash] Error 1

Running Ubuntu 12.04 with
libusb-dev (2:0.1.12-20)
libusb-1.0-0-dev (2:1.0.9~rc3-2ubuntu1)

Compile errors in 3f1cbb2c67, okay in 150f25f1d9

awflash.c:115: error: expected ‘)’ before ‘*’ token
awflash.c:178: error: expected ‘)’ before ‘*’ token
awflash.c:315: error: expected ‘)’ before ‘*’ token
awflash.c: In function ‘main’:
awflash.c:338: error: ‘libusb_device_handle’ undeclared (first use in this function)
awflash.c:338: error: (Each undeclared identifier is reported only once
awflash.c:338: error: for each function it appears in.)
awflash.c:338: error: ‘usb’ undeclared (first use in this function)
awflash.c:392: warning: implicit declaration of function ‘aw_get_version’
awflash.c:396: warning: implicit declaration of function ‘fex_command’
awflash.c:413: warning: implicit declaration of function ‘fex_write_file’
awflash.c:423: error: ‘AWL_FEL_1_EXEC’ undeclared (first use in this function)
make: *** [awflash] Error 1

I'm using Squeeze (oldstable) with libusb-dev=0.1.12-16

User manual

Hi,

can you please explain what is the offset option for?

while testing, some error logs :(using verbose mode)

cmd write failed (-110/32)

however device is found

thank you !

Compile issue on Ubuntu

Hi There, had the following compile issue on a clean checkout;

$ make
cc -Wall -o log2bin log2bin.c
cc -Wall -o awimage awimage.c parsecfg.c twofish.c rc6.c
cc -Wall -o awflash awflash.c -lusb
awflash.c:115:31: error: expected ‘)’ before ‘’ token
awflash.c:178:34: error: expected ‘)’ before ‘
’ token
awflash.c:315:41: error: expected ‘)’ before ‘’ token
awflash.c: In function ‘main’:
awflash.c:338:2: error: ‘libusb_device_handle’ undeclared (first use in this function)
awflash.c:338:2: note: each undeclared identifier is reported only once for each function it appears in
awflash.c:338:24: error: ‘usb’ undeclared (first use in this function)
awflash.c:392:2: warning: implicit declaration of function ‘aw_get_version’
awflash.c:396:3: warning: implicit declaration of function ‘fex_command’
awflash.c:413:3: warning: implicit declaration of function ‘fex_write_file’
awflash.c:423:20: error: ‘AWL_FEL_1_EXEC’ undeclared (first use in this function)
make: *
* [awflash] Error 1

I am running the libusb-dev (2:0.1.12-17) usb libraries.

unable to comple awutils

root@ma-Vostro-1015:/home/ma/AndroidImage/awutils# make
cc -Wall -o awflash awflash.c -lusb
awflash.c: In function ‘fex_xfer’:
awflash.c:140:2: warning: passing argument 1 of ‘usb_bulk_write’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:289:5: note: expected ‘struct usb_dev_handle ’ but argument is of type ‘struct libusb_device_handle *’
awflash.c:142:3: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat]
awflash.c:147:3: warning: passing argument 1 of ‘usb_bulk_read’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:291:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘struct libusb_device_handle *’
awflash.c:149:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
awflash.c:153:3: warning: passing argument 1 of ‘usb_bulk_write’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:289:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘struct libusb_device_handle *’
awflash.c:155:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
awflash.c:160:2: warning: passing argument 1 of ‘usb_bulk_read’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:291:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘struct libusb_device_handle *’
awflash.c: In function ‘main’:
awflash.c:376:11: warning: assignment from incompatible pointer type [enabled by default]
awflash.c:381:2: warning: passing argument 1 of ‘usb_set_configuration’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:305:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘struct libusb_device_handle *’
awflash.c:385:2: warning: passing argument 1 of ‘usb_claim_interface’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:306:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘struct libusb_device_handle *’
awflash.c:389:2: warning: passing argument 1 of ‘usb_set_altinterface’ from incompatible pointer type [enabled by default]
/usr/include/usb.h:308:5: note: expected ‘struct usb_dev_handle *’ but argument is of type ‘struct libusb_device_handle *’
awflash.c:394:2: warning: implicit declaration of function ‘aw_get_version’ [-Wimplicit-function-declaration]
awflash.c:415:3: warning: implicit declaration of function ‘fex_write_file’ [-Wimplicit-function-declaration]
awflash.c: At top level:
awflash.c:317:1: warning: ‘aw_fel_get_version’ defined but not used [-Wunused-function]
/tmp/ccsYFvkT.o: In function main': awflash.c:(.text+0xc8c): undefined reference toaw_get_version'
awflash.c:(.text+0xca1): undefined reference to aw_get_version' awflash.c:(.text+0xd2b): undefined reference toaw_get_version'
awflash.c:(.text+0xe5c): undefined reference to fex_write_file' awflash.c:(.text+0xf44): undefined reference tofex_write_file'
collect2: ld returned 1 exit status
make: *
* [awflash] Error 1

Not a issue but a tip...

The build require libusb-dev to avoid that:

shine@shine:~/android/build/awutils$ make
cc -Wall -o awflash awflash.c -lusb
awflash.c:23:17: fatal error: usb.h: No such file or directory
compilation terminated.
make: *** [awflash] Error 1

Can you add the library requirement on documentation ?

sudo apt-get install libusb-dev

Best regards

A31

Does not work on new allwinner A31 images

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.