Proxmark developers community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

#1 2018-02-16 20:27:54

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Proxmark3 on Termux

FYI, I recently built proxmark3 (both official and iceman's fork), from source, on Termux. I'm working on submitting a package to the repositories, so it's available from a simple "pkg install proxmark3", but it's taking some time to figure out their packaging scripts.

In the mean time, you can compile it ON-DEVICE (it only takes 2 - 3 minutes), only external dependency is termcap -- I have a PR for ncurses to include libtinfo => termcap linking, but they're taking forever to merge it.

Building from source is probably the easiest way to get up to date builds without having to rely on a package maintainer. I will try and set the package to use the git master branch as the source.

Offline

#2 2018-02-16 21:09:32

iceman
Administrator
Registered: 2013-04-25
Posts: 4,854
Website

Re: Proxmark3 on Termux

cool.   What is termux?  I am no familiar with Android.


冰人

modhex(hkhehghthbhudcfcdchkigiehgduiehg)

Offline

#3 2018-02-21 23:29:33

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Re: Proxmark3 on Termux

It's similar to a chroot, but it's not an actual chroot. It's a native app with a full "GNU" userland, package manager similar to apt, and even some access to Android APIs.

Very cool stuff, and you can run proxmark3 in it natively. Compiling firmware doesn't work, but that's no big deal.

Offline

#4 2018-08-22 18:10:13

bogito
Contributor
Registered: 2017-10-18
Posts: 38

Re: Proxmark3 on Termux

@cocoahooves, any update on the "pkg install proxmark" ?
Does it require root for the build?

Offline

#5 2018-08-23 15:56:02

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Re: Proxmark3 on Termux

So, PR is still not merged => https://github.com/termux/termux-packages/pull/2131 and I've kind of given up on it and figuring out their build system since it's gotten no action.

For the time being, I will provide an ncurses package with linkable termcap and you can just compile on device. https://file.io/z8lmRZ

FYI, latest stock proxmark3 from repository builds fine, but the iceman one requires -fPIC during building, so will need a patch.

Offline

#6 2018-08-23 22:29:42

bogito
Contributor
Registered: 2017-10-18
Posts: 38

Re: Proxmark3 on Termux

Ha! I actually came in to write about the successful build of the iceman fork on my Android device.
Indeed the -fPIC flag is needed in the client Makefile. Also, at least in my device, I had to install the following termux packages: make, clang, clang++, readline-dev, libclang-dev, libc++.
Additionally, as you mentioned, I had to manually build your ncurses package (which I got from https://github.com/h4waii/termux-packages) and then install it in termux using "dpkg -i ncurses.deb"
After that, issuing "make client" under the extracted pm3 iceman source does the trick.
Now I only need to find out what is the serial port that my pm3 uses when connected to my Android device in order to test it out. tongue

Offline

#7 2018-08-23 22:31:43

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Re: Proxmark3 on Termux

Should be a similar location to and regular Linux distribution, mine was /dev/ttyACM0 but you should see it come up in dmesg or syslog.

Where did you add the -fPIC flag? Is there an CFLAGS/CXXFLAGS variable that is used?

Last edited by cocoahooves (2018-08-23 22:35:56)

Offline

#8 2018-08-23 22:48:31

bogito
Contributor
Registered: 2017-10-18
Posts: 38

Re: Proxmark3 on Termux

After I was getting an error about the linker, I appended it in the CFLAGS variable of the client/Makefile (line 30).

No /dev/ttyACM0 available in my device. And since my device is not rooted, I have no access to dmesg or /dev directory sad

I can see the pm3 under "lsusb" and /sys/bus/usb/devices but no serial port to run the client with.

Last edited by bogito (2018-08-23 22:51:35)

Offline

#9 2018-08-23 22:55:33

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Re: Proxmark3 on Termux

Gotcha.

Yeah, I have to invoke with root in order to get access to /dev/ttyACM0. I think that might be the only way. All the "proper" Android apps grab it at a higher level in the USB subsystem after requesting permissions.

Just root your damn device! smile

Offline

#10 2018-09-05 10:34:22

bogito
Contributor
Registered: 2017-10-18
Posts: 38

Re: Proxmark3 on Termux

Ok, I did root my device, but unfortunately there is still no /dev/ttyACMX...
This means that I need to somehow include the cdc_acm module into my kernel in order to enable the serial port device.
I tried compiling the cdc-acm module from the closest linux kernel (3.18) source on the device using termux, but there are lots of missing headers and/or dependencies. So, no luck.
Any thought?

Offline

#11 2018-09-05 19:48:31

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Re: Proxmark3 on Termux

What device are you using? I'm assuming stock ROM and kernel?

I can recommend LineageOS, I believe cdc_acm is included in the default kernel that it ships with -- but depending on your device, there may be third party kernels with more features. I'd have to revert to the stock one to confirm, but I'm almost positive it's supported.

Last edited by cocoahooves (2018-09-05 19:49:07)

Offline

#12 2018-09-08 10:31:03

bogito
Contributor
Registered: 2017-10-18
Posts: 38

Re: Proxmark3 on Termux

Currently I own a Xiaomi Redmi Note 4 with stock ROM.
I was trying to find a suitable module for my kernel, but I ended up compiling the cdc-acm module from the closest kernel version I could find. Xiaomi, for some reason, does not provide the kernel source for my phone.
After being unsuccessful to insmod the compiled module, I found out that the stock ROM has no support for loadable kernel modules at all... Fail!
So, at some point I'm gonna flash another ROM. Until then, no native serial port for me in Android tongue

Offline

#13 2018-09-10 02:39:23

cocoahooves
Contributor
Registered: 2018-02-07
Posts: 8

Re: Proxmark3 on Termux

Heh. I have the same device (mido), but running LineageOS 15.1 and a custom kernel. Highly recommend it.

Offline

#14 2018-09-11 10:29:39

bogito
Contributor
Registered: 2017-10-18
Posts: 38

Re: Proxmark3 on Termux

Sadly, I have the nikel one (Mediatek). So, as far as I have seen, there is no decent LineageOS ROM for it yet to try on. sad
I will keep an eye on XDA and see if I find something interesting.

Offline

Board footer

Powered by FluxBB