npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sie-js/siemens-memory-dumper

v1.0.9

Published

RAM memory dumper using CGSN patch.

Downloads

9

Readme

NPM Version

SUMMARY

Console utility for reading RAM memory inside Siemens phones (SGold/SGold2 platform).

Works on all OS: Linux, OSX, Windows

Read more about memory dumping.

Web memory dumper (using WebSerial in Google Chrome).

INSTALL

First you need to install the CGSN patch to the phone.

Linux & OSX

  1. Install the latest version of NodeJS.

  2. Install siemens-memory-dumper package:

    npm install -g @sie-js/siemens-memory-dumper@latest

    Alternatively, you can use a siemens-memory-dumper without installation:

    # Just replace "siemens-memory-dumper" to "npx @sie-js/siemens-memory-dumper"
    npx @sie-js/siemens-memory-dumper list
    
    # Or use inside cloned repo
    git clone https://github.com/siemens-mobile-hacks/siemens-memory-dumper && cd siemens-memory-dumper && npm i
    node bin/siemens-memory-dumper.js list

Windows

Download prebuilt siemens-memory-dumper.exe from releases.

Alternatively, you can install nodejs on windows and use instruction for OSX/Linux.

TIPS & TRICKS

  1. You can achieve maximum speed using a DCA-540 or DCA-510 data cables.
  2. Bluetooth is also possible, but has the worst speed.
  3. It is better to read memory before ArmDebugger is used.
  4. Usually, you don't need to specify PORT, because it is detected automatically (by USB ID).

USAGE

Usage: siemens-memory-dumper [options] [command]

CLI memory dumper for Siemens phones.

Options:
  -p, --port <port>              serial port name (default: "/dev/ttyUSB0")
  -b, --baudrate <baudrate>      limit maximum baudrate (0 - use maximum) (default: "0")
  -h, --help                     display help for command

Commands:
  read <addr> <size> [file|dir]  Read memory region by address and size and save to file.
  read-region <name> [file|dir]  Read memory region by name and save to file.
  read-all [dir]                 Read all available memory regions from phone and save to dir.
  list                           List available memory regions for dump.
  list-ports                     List available serial ports.
  help [command]                 display help for command

List all available memory regions

siemens-memory-dumper -p PORT list
$ siemens-memory-dumper -p /dev/ttyUSB0 list
Connecting to phone using port /dev/ttyUSB0...
Connected using 921600 baudrate.
Detected phone SIEMENS C81v51
╔══════════╤════════════╤════════════════════╤════════════════════════════════════════════════════╗
║ Name     │ Address    │ Size               │ Description                                        ║
╟──────────┼────────────┼────────────────────┼────────────────────────────────────────────────────╢
║ BROM     │ 0x00400000 │ 0x00008000 (32 kB) │ Built-in 1st stage bootloader firmware.            ║
╟──────────┼────────────┼────────────────────┼────────────────────────────────────────────────────╢
║ TCM      │ 0x00000000 │ 0x00004000 (16 kB) │ Built-in memory in the CPU, used for IRQ handlers. ║
╟──────────┼────────────┼────────────────────┼────────────────────────────────────────────────────╢
║ SRAM     │ 0x00080000 │ 0x00018000 (96 kB) │ Built-in memory in the CPU.                        ║
╟──────────┼────────────┼────────────────────┼────────────────────────────────────────────────────╢
║ RAM      │ 0xA8000000 │ 0x01000000 (16 Mb) │ External RAM.                                      ║
╟──────────┼────────────┼────────────────────┼────────────────────────────────────────────────────╢
║ VMALLOC1 │ 0xAC000000 │ 0x00E00000 (14 Mb) │ Virtual memory for malloc().                       ║
╚══════════╧════════════╧════════════════════╧════════════════════════════════════════════════════╝

Dump all available memory regions

siemens-memory-dumper -p PORT read-all
siemens-memory-dumper -p PORT read-all OUTPUT_DIR
$ siemens-memory-dumper -p /dev/ttyUSB0 read-all /tmp/C81
Connecting to phone using port /dev/ttyUSB0...
Connected using 921600 baudrate.
Detected phone SIEMENS C81v51

[1/5] Reading BROM 00400000 ... 00407FFF (32 kB)
 [========================================] 100% | ETA: 467s | 65.98 kB/s
File saved to: /tmp/C81/C81v51-BROM-00400000_00008000.bin

[2/5] Reading TCM 00000000 ... 00003FFF (16 kB)
 [========================================] 100% | ETA: 460s | 66.95 kB/s
File saved to: /tmp/C81/C81v51-TCM-00000000_00004000.bin

[3/5] Reading SRAM 00080000 ... 00097FFF (96 kB)
 [========================================] 100% | ETA: 456s | 67.42 kB/s
File saved to: /tmp/C81/C81v51-SRAM-00080000_00018000.bin

[4/5] Reading RAM A8000000 ... A8FFFFFF (16 Mb)
 [========================================] 100% | ETA: 212s | 67.51 kB/s
File saved to: /tmp/C81/C81v51-RAM-A8000000_01000000.bin

[5/5] Reading VMALLOC1 AC000000 ... ACDFFFFF (14 Mb)
 [========================================] 100% | ETA: 0s | 67.65 kB/s
File saved to: /tmp/C81/C81v51-VMALLOC1-AC000000_00E00000.bin

Dump memory region by name

siemens-memory-dumper -p PORT read-region SRAM
siemens-memory-dumper -p PORT read-region SRAM ./SRAM.bin
$ siemens-memory-dumper -p /dev/ttyUSB0 read-region SRAM
Connecting to phone using port /dev/ttyUSB0...
Connected using 921600 baudrate.
Detected phone SIEMENS C81v51
Reading memory 00080000 ... 00097FFF (96 kB)

 [========================================] 100% | ETA: 0s | 39.3 kB/s

File saved to: ./C81v51-SRAM-00080000_00018000.bin

Dump any custom memory region by address and size

siemens-memory-dumper -p PORT read 0xA0000000 128k
siemens-memory-dumper -p PORT read 0xA0000000 128k ./bootcore.bin
siemens-memory-dumper -p PORT read 0xA0000000 0x20000 ./bootcore.bin
$ siemens-memory-dumper -p /dev/ttyUSB0 read 0xA0000000 128k
Connecting to phone using port /dev/ttyUSB0...
Connected using 921600 baudrate.
Detected phone SIEMENS C81v51
Reading memory A0000000 ... A001FFFF (128 kB)

 [========================================] 100% | ETA: 0s | 67.23 kB/s

File saved to: ./C81v51-A0000000_00020000.bin