/ / AGCC-o dump dump.c / / Adb push dump / data / local / tmp / dump / / Adb shell su-c '/ data / local / tmp / dump> dump.bin

# Include # Include <stdlib.h> # Include <fcntl.h> # Include <sys/mman.h>

SRAM_BASE 0x40000000 # define SRAM_SIZE 0x00100000 # define

int main (int argc, char * argv) { int fd = open (”/ dev / mem”, O_RDONLY); if (fd <0) { perror (”/ dev / mem”); exit (-1); }

unsigned char * map_base; map_base = mmap (0, SRAM_SIZE, PROT_READ, MAP_SHARED, fd, (off_t) SRAM_BASE); if (map_base == MAP_FAILED) { perror (“mmap failed”); exit (-1); }

write (1, map_base + 0x14000, 0x7000);

munmap (map_base, SRAM_SIZE); close (fd); return 0; }

 
motorola_milestone/boot_chain.txt · Last modified: 2011/01/04 23:07 by pallapar
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki