所以我正在嘗試使用memfetch從我的Samsung Galaxy Nexus轉儲特定進程的內存。用Android安裝Memfetch Samsung Galaxy Nexus
下載memfetch使用下面的命令中提煉出來的內容:
tar -xvf memfetch.tgz
然在我memfetch目錄中ls
:
ls
COPYING Makefile memfetch.c mffind.pl README
在這個階段,我應該運行make命令來獲取我的memfetch可執行文件。
編輯memfetch.c
文件,我刪除了#include page.h
線
所以首先我下載了Android ARM架構它用下面的命令。這對於靜態交叉編譯的memfetch:
apt-get install gcc-arm0-linux-gnueabi
然後我編輯Makefile
在以下幾個方面:
FILE = memfetch
CFLAGS = -Wall -09 -static
CC = arm-linux-gnueabi-gcc
那麼成功,我有我的memfetch可執行:
make
arm-linux-gnueabi-gcc -Wall -09 -static memfetch.c -o memfetch
ls
COPYING Makefile memfetch memfetch.c mffind.pl README
然後我將memfetch可執行文件推入我的Android手機:
adb push memfetch /sdcard/memfetch
現在從這裏我從我的手機工作。我跑執行adb shell
命令,並創建一個目錄來存儲memfetch exectable,最好從那裏運行它:
adb shell
su
cd /sdcard
mkdir tmp
mount -t tmpfs tmpfs tmp
cp memfetch tmp
cd tmp
chmod 6755 memfetch
現在,這裏是哪裏出了問題來了。當我執行memfetch,我居然也得到了以下錯誤:
./memfetch 1197
memfetch 0.05b by Michal Zalewski <[email protected]>
Usage ./memfetch [ -sawn ] [ -S xxx ] PID
-s - wait for fault signal before generating a dump
-a - skip non-anonymous maps (libraries etc)
-w - write index file to stdout instead of mfetch.lst
-m - avoid mmap(), helps to prevent hanging on some 2.2 boxes
-S xxx - dump segment containing address xxx (hex) only
無論我企圖把什麼PID,我總是得到同樣的錯誤。我甚至嘗試了各種標誌組合,但他們沒有工作:(在先進的任何幫助
謝謝你,讓我知道是否需要任何額外的信息。
在純Linux環境中也有所幫助。 – Joqn