Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Euclid's Brother
Old
#11  
Euclid's Brother's Avatar
Senior Member
Thanks Meter 247
Posts: 888
Join Date: May 2011
Location: Dallas, TX

 
DONATE TO ME
Quote:
Originally Posted by GloriousDJ View Post
I flashed Lightspeed_4_beta3 after that came out and I finally made the time to try and update to the newest version 4.3 today, but I can't get into recovery, I have Acer Recovery app and I re-installed CWM but it still wont load recovery... any ideas why? and how to fix it?
Had you ever flashed the stock ics leak? It sounds like you may have the ics bootloader. Does it say "0.03.11-ICS" in the upper left corner when you boot up? If so, that may be whey thor recovery wasn't booting. (just checking)
Epic 4G Touch VeNuM EL13 beta (EK02 modem)
Acer Iconia A500 - Taboonay

Follow me on Twitter

Contact me on GTalk: euclidsbrother is my gmail contact
Donate to my Root Beer fund
 
liftman-
Old
#12  
Senior Member
Thanks Meter 58
Posts: 412
Join Date: Nov 2011
Quote:
Originally Posted by eppeP View Post
Unless I have misinterpreted something, this should not be that much of a problem. Maybe a bit inconvenient if you don't know USB programming though.

If you can get the device into APX mode it will answer the first read request with the UID.
So if you open the device (955:7820) and initiate a bulk transfer on endpoint 0x81 and you should get 8 bytes that is the UID.

Something like:
Code:
#include <libusb-1.0/libusb.h>
#include <stdio.h>
#include <stdint.h>

int main(void)
{
    unsigned char data[64];
    int received_length;
    int r = 1;
    libusb_context* ctx = NULL;
    libusb_device_handle* dev_handle = NULL;

    libusb_init(&ctx);
    dev_handle = libusb_open_device_with_vid_pid(ctx, 0x0955, 0x7820);
    if(dev_handle)
    {
        r = libusb_bulk_transfer(dev_handle, 0x81, data, sizeof(data), &received_length, 10000);
        if (r == 0)
        {
            if(received_length == 8)
            {
                printf("uid: %#016lx\n", *(uint64_t*)data);
            }
            else
            {
                r = 1;
                printf("Error: We got %d bytes of data insetad of the 8 bytes we expected...\n", received_length);
            }
        }
        else
        {
            printf("Error: USB read failed!\n");
        }
        libusb_release_interface(dev_handle, 0);
    }
    else
    {
        printf("Error: Failed to open device!\n");
    }
    libusb_exit(ctx);
    return r;
}
First thanks
having a hard time compiling in ubuntu
output is:

lr@lr:~/a500$ gcc -Wall -W -Werror apx.c -o apx
/tmp/ccNiYNxr.o: In function `main':
apx.c.text+0x36): undefined reference to `libusb_init'
apx.c.text+0x4c): undefined reference to `libusb_open_device_with_vid_pid'
apx.c.text+0x82): undefined reference to `libusb_bulk_transfer'
apx.c.text+0xec): undefined reference to `libusb_release_interface'
apx.c.text+0x104): undefined reference to `libusb_exit'
collect2: ld returned 1 exit status

any ideas for me?
 
lcd047
Old
#13  
Junior Member
Thanks Meter 9
Posts: 14
Join Date: Nov 2011
Quote:
Originally Posted by liftman- View Post
First thanks
having a hard time compiling in ubuntu
output is:

lr@lr:~/a500$ gcc -Wall -W -Werror apx.c -o apx
/tmp/ccNiYNxr.o: In function `main':
apx.c.text+0x36): undefined reference to `libusb_init'
apx.c.text+0x4c): undefined reference to `libusb_open_device_with_vid_pid'
apx.c.text+0x82): undefined reference to `libusb_bulk_transfer'
apx.c.text+0xec): undefined reference to `libusb_release_interface'
apx.c.text+0x104): undefined reference to `libusb_exit'
collect2: ld returned 1 exit status

any ideas for me?
Try linking against libusb-1.0:
Code:
gcc apx.c -o apx -lusb-1.0
 
eppeP
Old
#14  
Member
Thanks Meter 54
Posts: 94
Join Date: Nov 2011
Quote:
Originally Posted by lcd047 View Post
Try linking against libusb-1.0:
Code:
gcc apx.c -o apx -lusb-1.0
That should work, -Wall -pedantic -lusb-1.0 is what I used when I tested it.
 
liftman-
Old
(Last edited by liftman-; 13th June 2012 at 10:38 PM.)
#15  
Senior Member
Thanks Meter 58
Posts: 412
Join Date: Nov 2011
thanks for the help!
got it
 
jecee
Old
#16  
Junior Member
Thanks Meter 4
Posts: 12
Join Date: Jul 2012
Quote:
Originally Posted by eppeP View Post
Unless I have misinterpreted something, this should not be that much of a problem. Maybe a bit inconvenient if you don't know USB programming though.

If you can get the device into APX mode it will answer the first read request with the UID.
So if you open the device (955:7820) and initiate a bulk transfer on endpoint 0x81 and you should get 8 bytes that is the UID.

Something like:
Code:
#include <libusb-1.0/libusb.h>
#include <stdio.h>
#include <stdint.h>

int main(void)
{
    unsigned char data[64];
    int received_length;
    int r = 1;
    libusb_context* ctx = NULL;
    libusb_device_handle* dev_handle = NULL;

    libusb_init(&ctx);
    dev_handle = libusb_open_device_with_vid_pid(ctx, 0x0955, 0x7820);
    if(dev_handle)
    {
        r = libusb_bulk_transfer(dev_handle, 0x81, data, sizeof(data), &received_length, 10000);
        if (r == 0)
        {
            if(received_length == 8)
            {
                printf("uid: %#016lx\n", *(uint64_t*)data);
            }
            else
            {
                r = 1;
                printf("Error: We got %d bytes of data insetad of the 8 bytes we expected...\n", received_length);
            }
        }
        else
        {
            printf("Error: USB read failed!\n");
        }
        libusb_release_interface(dev_handle, 0);
    }
    else
    {
        printf("Error: Failed to open device!\n");
    }
    libusb_exit(ctx);
    return r;
}
Hi, eppeP,
I downloaded the drivers for lib Usb and installed, I am missing something definately as I dont know how to read the CPUID after installing the drivers
Please help....
 
srbeen
Old
#17  
Junior Member
Thanks Meter 22
Posts: 6
Join Date: Sep 2010
I just did this in ubuntu with no problem. with tablet in APX mode, start an elevated command prompt (Run as admin) then run the EXE file.
it will spit back an error or the UID.
Very simple.
 
eppeP
Old
#18  
Member
Thanks Meter 54
Posts: 94
Join Date: Nov 2011
Quote:
Originally Posted by jecee View Post
Hi, eppeP,
I downloaded the drivers for lib Usb and installed, I am missing something definately as I dont know how to read the CPUID after installing the drivers
Please help....
Since you write drivers I assume you are using windows.
In that case you want the libusb 0.1 version, the quoted code is for libusb 1.0 which is not available for windows.
Code and a visual studio project can be found here. This thread may be of use as well.

If using Linux (or any other platform for which libusb 1.0 exist) you should be able to build the quoted code as described earlier in this thread.
 
t_r_j
Old
#19  
Member
Thanks Meter 12
Posts: 72
Join Date: Apr 2012
Default Thanks so Much!!!

Thanks so Much!!!
THIS WORKED GREAT!!!!!!!
 
cavagnaro
Old
#20  
cavagnaro's Avatar
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Sep 2008
Hi,
Question why (955:7820) ?? Should we modify it according to our device?

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

App Analytics, or the Death of the Independent App Developer

This is entry number one in a series of articles about tools for app developers, … more

Serajr Power Toggles Brings Settings to the Small App World

Ever since the introduction of multi-window with things like Cornerstone and … more

Gear Up Because it’s Time to Save Earth

*Cue Dramatic Music*Put on your red and blue latex overalls and cape because it’s time to … more