Giter Club home page Giter Club logo

Comments (13)

687766616e avatar 687766616e commented on June 19, 2024

Linux localhost 4.4.78-perf-ge57b3e5 #1 SMP PREEMPT Thu Mar 14 04:05:42 CST 2019 aarch64 Android
android 8.0.0
https://play.google.com/store/apps/details?id=com.termux
https://gitlab.com/st42/termux-sudo
https://github.com/termux/unstable-packages
https://github.com/termux/termux-root-packages

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

It looks like your environment doesn't pull Android ifaddrs.h automatically.
Download ifaddrs.h from here:
https://github.com/morristech/android-ifaddrs
copy ifaddrs.h to include/android-ifaddrs/
and try it again.

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

I assume that you did a fresh git clone of hcxdumptool:
git clone https://github.com/ZerBea/hcxdumptool
and prepared the clone for Android:
cd hcxdumptool
git submodule init
git submodule update
before you run make

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

From the README.md:
Compile for Android

You need:

  • Android NDK installed in your system and in path variable

  • This repository cloned with all submodules (--recursive flag in git clone or git submodules update command run)

Just run ndk-build - built executables for some architectures should be created inside libs directory.
Copy it to your phone and enjoy.

from hcxdumptool.

687766616e avatar 687766616e commented on June 19, 2024
$ make
cc -O3 -Wall -Wextra -std=gnu99  -o hcxdumptool hcxdumptool.c
In file included from hcxdumptool.c:24:
./include/android-ifaddrs/ifaddrs.c:89:9: warning: unused variable 'l_result'
      [-Wunused-variable]
    int l_result;
        ^
./include/android-ifaddrs/ifaddrs.c:291:15: warning: unused variable 'l_rtaData'
      [-Wunused-variable]
        void *l_rtaData = RTA_DATA(l_rta);
              ^
./include/android-ifaddrs/ifaddrs.c:376:15: warning: unused variable 'l_rtaData'
      [-Wunused-variable]
        void *l_rtaData = RTA_DATA(l_rta);
              ^
hcxdumptool.c:221:20: warning: unused function 'debugprint' [-Wunused-function]
static inline void debugprint(int len, uint8_t *ptr)
                   ^
hcxdumptool.c:233:20: warning: unused function 'debugprint2' [-Wunused-function]
static inline void debugprint2(int len, uint8_t *ptr, int len2, uint8_t *ptr2)
                   ^
5 warnings generated.
$ sudo make install
cc -O3 -Wall -Wextra -std=gnu99  -o hcxdumptool hcxdumptool.c
In file included from hcxdumptool.c:24:
./include/android-ifaddrs/ifaddrs.c:89:9: warning: unused variable 'l_result' [-Wunused-variable]
    int l_result;
        ^
./include/android-ifaddrs/ifaddrs.c:291:15: warning: unused variable 'l_rtaData' [-Wunused-variable]
        void *l_rtaData = RTA_DATA(l_rta);
              ^
./include/android-ifaddrs/ifaddrs.c:376:15: warning: unused variable 'l_rtaData' [-Wunused-variable]
        void *l_rtaData = RTA_DATA(l_rta);
              ^
hcxdumptool.c:221:20: warning: unused function 'debugprint' [-Wunused-function]
static inline void debugprint(int len, uint8_t *ptr)
                   ^
hcxdumptool.c:233:20: warning: unused function 'debugprint2' [-Wunused-function]
static inline void debugprint2(int len, uint8_t *ptr, int len2, uint8_t *ptr2)
                   ^
5 warnings generated.
install -m 0755 -D hcxdumptool /usr/local/bin/hcxdumptool
install: cannot create directory '/usr': Read-only file system
make: *** [Makefile:38: install] Error 1

from hcxdumptool.

687766616e avatar 687766616e commented on June 19, 2024

i can't!!... t.t

from hcxdumptool.

687766616e avatar 687766616e commented on June 19, 2024

/data/data/com.termux/files/usr/bin/???...

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

Ok, now we have several different issues:

  1. I fixed this 2 warnings by latest commit:
    41c4547

hcxdumptool.c:221:20: warning: unused function 'debugprint' [-Wunused-function]
static inline void debugprint(int len, uint8_t *ptr)
^
hcxdumptool.c:233:20: warning: unused function 'debugprint2' [-Wunused-function]
static inline void debugprint2(int len, uint8_t *ptr, int len2, uint8_t *ptr2)

  1. I can't fix that warnings, because the source code is not part of hcxdumptool. This Android source code is pulled from here: https://github.com/morristech/android-ifaddrs
    ./include/android-ifaddrs/ifaddrs.c:89:9: warning: unused variable 'l_result'
    [-Wunused-variable]
    int l_result;
    ^
    ./include/android-ifaddrs/ifaddrs.c:291:15: warning: unused variable 'l_rtaData'
    [-Wunused-variable]
    void *l_rtaData = RTA_DATA(l_rta);
    ^
    ./include/android-ifaddrs/ifaddrs.c:376:15: warning: unused variable 'l_rtaData'
    [-Wunused-variable]
    void *l_rtaData = RTA_DATA(l_rta);

That are just warnings, but you can report that issue here:
https://github.com/morristech/android-ifaddrs

  1. You are running into a broken Android environment and you have to fix that.
    Is Android NDK properly installed on your system and in path variable?
    Did you run ndk-build to build the envirnonment?
    Running simple "make" without building Android environment before isn't enough!
    Get more information here:
    https://developer.android.com/ndk/guides/ndk-build

from hcxdumptool.

687766616e avatar 687766616e commented on June 19, 2024

From the README.md:
Compile for Android

You need:

  • Android NDK installed in your system and in path variable
  • This repository cloned with all submodules (--recursive flag in git clone or git submodules update command run)

Just run ndk-build - built executables for some architectures should be created inside libs directory.
Copy it to your phone and enjoy.

git submodule(s) update?

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

By git submodules update you make sure, that external parts are loaded before you compile the source code. That can be done with git clone recursive flag or if the clone allready exists on your local system, with git submodule init and git submodule update.
At this point you finished the hcxdumtool part.
Next step is to build your Android environment for your phone, so that you are able to compile it:
Make sure, you understand this: https://developer.android.com/ndk/guides/ndk-build
than run ndk-build

Android NDK and ndk-build are not part of hcxtools/hcxdumptool, so you must read all about this here:
https://developer.android.com

I only support Arch Linux!

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

Ok, I think we are talking about different things. The make file is for Linux only. It doesn't work on an Android device.

Here are the basic steps you have to do:

  1. you need a Linux system

  2. do a git clone of hcxdumptool on that Linux system, either with recursive flag
    or cd to hcxtools and run git submodule init and git submodule update

  3. Install Android NDK using the packaging system of your distribution or by hand
    Read more here:
    https://stackoverflow.com/questions/26967722/how-to-install-android-ndk-in-linux
    https://wiki.appcelerator.org/display/guides2/Installing+the+Android+NDK
    https://www.xda-developers.com/understanding-cross-compiling-and-how-it-relates-to-android/

do not try to do this on a live system, because that are several GB!
do not try to do this on a penetration testing system like KALI - you will run into dependency trouble

  1. cd to hcxdumptool directory and run ndk-build

  2. if the make process finished without errors, copy the binary to your phone

from hcxdumptool.

ZerBea avatar ZerBea commented on June 19, 2024

Closed this issue, because it is related to missing Android NDK.

from hcxdumptool.

kamesh413 avatar kamesh413 commented on June 19, 2024

showing
cc -O3 -Wall -Wextra -std=gnu99 -o hcxpioff hcxpioff.c
cc -O3 -Wall -Wextra -std=gnu99 -o hcxdumptool hcxdumptool.c
install -m 0755 -D hcxpioff /usr/local/bin/hcxpioff
install -m 0755 -D hcxdumptool /usr/local/bin/hcxdumptool
rm -f hcxpioff
rm -f hcxdumptool
rm -f *.o *~

from hcxdumptool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.