File tree Expand file tree Collapse file tree 2 files changed +109
-0
lines changed
Expand file tree Collapse file tree 2 files changed +109
-0
lines changed Original file line number Diff line number Diff line change 11# Droid-NDK-Extractor
22Android NDK Extractor - Extract ARM native bridge translations for use in any Android derivative.
3+
4+ System Requirements:
5+
6+ ```
7+ p7zip
8+ binwalk
9+ git
10+ ```
11+
12+ ` ./android-extract-ndk.sh `
13+
14+ ``` bash
15+
16+ #! /bin/bash
17+ # Author: sickcodes
18+ # Contact: https://twitter.com/sickcodes
19+ # Repo: https://github.com/sickcodes/Droid-NDK-Extractor
20+ # Copyright: sickcodes (C) 2021
21+ # License: GPLv3+
22+
23+ ARCH=" ${1} "
24+ ARCH=" ${ARCH:= " x86_64" } "
25+
26+ mkdir ./working
27+
28+ cd ./working
29+
30+ git clone https://gitlab.com/android-generic/android_vendor_google_emu-x86.git
31+
32+ yes | ./android_vendor_google_emu-x86/download-files.sh " ${ARCH} "
33+
34+ yes | unzip " ${ARCH} -*-linux.zip"
35+
36+ 7z e x86_64/system.img
37+
38+ binwalk -e \
39+ --depth 1 \
40+ --count 1 \
41+ -y ' filesystem' \
42+ super.img # only search for filesystem signatures
43+
44+ # 1048576 0x100000 \
45+ # Linux EXT filesystem, blocks count: 234701, \
46+ # image size: 240333824, rev 1.0, ext2 filesystem data, \
47+ # UUID=31e7cd0f-5577-515b-bea5-c836952b952b, volume name "/"
48+
49+ mkdir extracted
50+ cd extracted
51+
52+ yes | 7z x ../_super.img.extracted/100000.ext
53+
54+ find system \( -name ' libndk_translation*' -o -name ' *arm*' -o -name ' ndk_translation*' \) | tar -cf native-bridge.tar -T -
55+
56+ pwd
57+
58+ stat native-bridge.tar
59+
60+ echo " ${PWD} /native-bridge.tar"
61+
62+ # move native-bridge.tar somewhere, and remove the ./working folder as it is no longer required.
63+
64+ ```
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Author: sickcodes
3+ # Contact: https://twitter.com/sickcodes
4+ # Repo: https://github.com/sickcodes/Droid-NDK-Extractor
5+ # Copyright: sickcodes (C) 2021
6+ # License: GPLv3+
7+
8+ ARCH=" ${1} "
9+ ARCH=" ${ARCH:= " x86_64" } "
10+
11+ mkdir ./working
12+
13+ cd ./working
14+
15+ git clone https://gitlab.com/android-generic/android_vendor_google_emu-x86.git
16+
17+ yes | ./android_vendor_google_emu-x86/download-files.sh " ${ARCH} "
18+
19+ yes | unzip " ${ARCH} -*-linux.zip"
20+
21+ 7z e x86_64/system.img
22+
23+ binwalk -e \
24+ --depth 1 \
25+ --count 1 \
26+ -y ' filesystem' \
27+ super.img # only search for filesystem signatures
28+
29+ # 1048576 0x100000 \
30+ # Linux EXT filesystem, blocks count: 234701, \
31+ # image size: 240333824, rev 1.0, ext2 filesystem data, \
32+ # UUID=31e7cd0f-5577-515b-bea5-c836952b952b, volume name "/"
33+
34+ mkdir extracted
35+ cd extracted
36+
37+ yes | 7z x ../_super.img.extracted/100000.ext
38+
39+ find system \( -name ' libndk_translation*' -o -name ' *arm*' -o -name ' ndk_translation*' \) | tar -cf native-bridge.tar -T -
40+
41+ pwd
42+
43+ stat native-bridge.tar
44+
45+ echo " ${PWD} /native-bridge.tar"
46+
47+ # move native-bridge.tar somewhere, and remove the ./working folder as it is no longer required.
You can’t perform that action at this time.
0 commit comments