yashsingh1/xdaforums huggingface dataset:
[Android Software Development] ErbDroid:
Just here to say **THANK YOU** [MENTION=4293606]DualJoe[/MENTION] !!! these are amazing! But I was wondering, have you not put this project on Github yet?

- This project would get alot of attention/downloads! (its pretty quiet here!)

- Binaries that you have had to compile with certain flags etc would be documented clearly, showing diffs clearly between different versions.

- More hands can be lighter work, you may even get pull requests adding other binaries people have made, if you want to add them that is.

- Debugging/testing/help from others.

Also, have you considered putting these into a Magisk module?

Injecting these binaries systemless-ly, yet with priviliged permissions. Would get alot more attention that way too (zackptg has a module called 'ccbins' that does the same, a small interactive bash script run from any terminal emulator on your phone like Termux, you pick your binaries, it installs it, includes a lot of great binaries, you can check it out here on XDA).

Also if this was on Git/hub/lab whatever, you could also make your own unofficial Termux repo too (just like 'its-pointless-repo' on Github, we can then add your repo to Termux and download/update your binaries as if they were standard ones found in Termux with `apt install`/`apt update` etc, that way not needing root to run the binaries at all (obviously some of these NEED root, but not all).

(Thats a both a solution for rooted & non-rooted users, both making the update process a lot easier for the user as both Magisk & Termux have package managers that search your repo for updates, plus Magisk being systemless, doesn't touch the system so keeps Over-The-Air updates from vendors).

Just a thought, from a fan of this project!

**THANK YOU AGAIN!**
[Android Software Development] Borovets:
my binary collection.

drive.google.com/drive/folders/1LfmUkCuTuWFCprhBdzyjL6i7-WZurbTw?usp=sharing
[Android Software Development] misterhsp:
I have tried gocryptfs once and it works. But when I go to the directory with a file manager I don't see anything of the files, it is empty. With the terminal it is not so, everything is there. Do I have to do something there?

Thanks...
[Android Software Development] mirfatif:
You need to be in root mount namespace. Use "su -mm" or "nsenter -t1 -m".

Details:

https://android.stackexchange.com/a/200449/218526

https://xdaforums.com/showpost.php?p=75721227&postcount=9

https://android.stackexchange.com/a/217936/218526
[Android Software Development] misterhsp:
I have entered the following as root.

nsenter -t1 -m gocryptfs /path/to/crypt /path/to/plain

But it does not work. You can give an example, maybe I did something wrong?

thanks
[Android Software Development] misterhsp:
I have now got it right.

Is it also possible to mount to the internal storage (storage/emulated/0/foobar)? Because that does not work.

thanks...
[Android Software Development] arunsai123:
Is it possible to compile micro text editor and bat (colorful cat output)?
[Android Software Development] afridi.shahriar:
Sir, can u please update the cryptsetup to v2.3.4 ?

(it contains a lot of bugfix)
[Android Software Development] misterhsp:
The last posts here have disappeared.......

...
[Android Software Development] afridi.shahriar:
its bcz xda is being updated to xenforo. it will be back soon.
[Android Software Development] afridi.shahriar:
@DualJoe @mirfatif sir, can u plz tell me , how to format a partition as plan dmcrypt, using cryptsetup.

cryptsetup luksFormat --type plain /path/disk isn't working, simply it's not giving any output, not even any error!!

and, can u plz update cryptsetup to v2.3.4?
[Android Software Development] misterhsp:
@Borovets

Can you update the link to your collection, it does not work anymore.

thanks...
[Android Software Development] catx33:
Please can someone help me with an android 4.4.2 compatible version of ddrescue ?

Extract an image of a corrupted Android partition bit-to-bit

How can I extract an image of the corrupted Android partition mmcblk0 bit-to-bit? With adb pull, it says remote I/O error after a few megabytes.

android.stackexchange.com

I was directed to go here after asking the question in the link above
[Android Software Development] DualJoe:
This tools are in Termux repo now. I think that's the better choice.

Try Termux version. Complete silence, though, could be a critical dependency issue (e.g. kernel). 'strace' is your best friend here to analyze that.

I will update my toolchain and give it a try.
[Android Software Development] misterhsp:
@DualJoe

It would still be nice if cryptsetup would be updated to v2.3.4. I don't need all the other stuff from Termux that comes with it.

Thanks...
[Android Software Development] DualJoe:
ddrescue v1.25:

ddrescue125.armv7.static.20201212.tar.gz | by DualJoe for Utilities

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

www.androidfilehost.com

Cryptsetup v2.3.4:

cryptsetup234.armv7.aarch64.static.20201212.tar.xz | by DualJoe for Utilities

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

www.androidfilehost.com

cryptsetup234.armv7.aarch64.static.20201212.tar.xz
└── [ 80] cryptsetup
├── [ 160] aarch64
│ ├── [2.7M] cryptsetup-reencrypt.static
│ ├── [2.8M] cryptsetup.static
│ ├── [476K] dmsetup.static
│ ├── [ 14] dmstats -> dmsetup.static
│ ├── [2.7M] integritysetup.static
│ └── [2.7M] veritysetup.static
└── [ 160] armv7
├── [1.9M] cryptsetup-reencrypt.static
├── [1.9M] cryptsetup.static
├── [333K] dmsetup.static
├── [ 14] dmstats -> dmsetup.static
├── [1.9M] integritysetup.static
└── [1.9M] veritysetup.static
[Android Software Development] afridi.shahriar:
wow. thnk u sir
[Android Software Development] misterhsp:
@DualJoe

I have tested cryptsetup 2.3.4 and it works, could not find any errors.

Thank you very much for providing :)
[Android Software Development] misterhsp:
You should also update post no. 1 about Cryptsetup 2.3.4.

I'm not allowed to do that :)

...
[Android Software Development] DualJoe:
I cannot because of this.
[Android Software Development] osm0sis:
Try disabling the WYSIWYG editor by editing a different post and tapping the cog to show bbcode, then save. Now edit the OP and see if you can update it.
[Android Software Development] DualJoe:
Worked, thanks!
[Android Software Development] afridi.shahriar:
cryptsetup isn't available in temux repo.

i have entered

pkg install cryptsetup

but, nothing found
[Android Software Development] misterhsp:
apt/pkg install root-repo && apt/pkg install cryptsetup

...
[Android Software Development] misterhsp:
Is it possible to update gocryptfs (arm64) to the current version (v1.8.0)?

Thanks...
[Android Software Development] jixt3r:
where do i put parted files? (parted and partprobe)
[Android Software Development] DualJoe:
Maybe @mirfatif can help. Never did something with go.

Wherever you want and can set it +x. I usually drop my custom binaries into /data/local/bin and put that in Termux PATH.

In TWRP you have to manually navigate to that folder and start it with './parted'.

What do you intend to do with it? Its one of the more dangerous tools.
[Android Software Development] jixt3r:
@DualJoe I want to study understanding things on Android, maybe help someone repartition the phone too.
[Android Software Development] jixt3r:
My phone doesn't have /data/location/bin, where do I put it to use by termux?
[Android Software Development] DualJoe:
You can create folders and PATHs as you like. It doesn't matter where it resides. You should be familiar with basic Linux Shell.

I wouldn't try to repartition the phone. It has potential to brick it completely. 'Parted' might be useful to split/partition external sdcards to limit adoptable storage (and similar things).
[Android Software Development] jixt3r:
@DualJoe if I do everything right to repartition?
[Android Software Development] DualJoe:
Why do you want to repartition at all? On what device?

I doubt that the MBR/GPT is writable at all on recent devices. Other than that you can't be sure 'parted' creates a compatible structure. Android is neither Posix, Linux or GNU. It might break the trustchain or confuse the bootloader.
[Android Software Development] jixt3r:
I don't want to repartition, it's just interest, but if there's no way, then I won't insist,
[Android Software Development] afridi.shahriar:
sir, can u plz update f2fs-tools to the latest v 1.14.0?

(as it has compression support available)
[Android Software Development] Borovets:
tar 1.33 aarch64 [my build 2021.01.08]
[Android Software Development] DualJoe:
Be my guest.

f2fs-tools_v1.14.0_aarch64_static_20210113.tar.gz | by DualJoe for Utilities

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

www.androidfilehost.com
[Android Software Development] mirfatif:
@misterhsp

Updated the links: https://xdaforums.com/showpost.php?p=76462538&postcount=68
[Android Software Development] mirfatif:
gocryptfs at the moment doesn't support setting fixed permissions which is a requirement to mount in /storage/emulated/0. I've requested the feature: https://github.com/rfjakob/gocryptfs/issues/523
[Android Software Development] afridi.shahriar:
the latest f2fs-tools 1.14 u have shared.

is there any difference/ instability if it's made with musl than aosp code?

thanks
[Android Software Development] DualJoe:
The differences between NDK/bionic<>musl should be neglectable here. The NDK mainly allows communication with the Android OS and its java runtime (apps). That's not necessary here. The f2fs-tools of the mainline kernel (v1.14.0) might be ahead of the Android kernels though so not all features might be supported on Android yet. There shouldn't be any major differences in the f2fs implementation itself though i guess. F2fs should be the same on all systems.
[Android Software Development] afridi.shahriar:
ye

yeah, thanks.

btw i discovered something!

that it:

to hide kernel name inside f2fs partition while formatting (when u format f2fs partition, the ugly name of the kernel embeds there, which is not possible to remove/change)

# doing this will change yr kernel name & version to "" (null)
su
touch /sdcard/emptyfile
mount /sdcard/emptyfile /proc/version

now if any f2fs partition is created, there won't be any kernel name embedded!
[Android Software Development] Borovets:
my, some build packages... (aarch64)
[Android Software Development] Borovets:
can someone compile libseliux? i'm needed in binaries rectorecon, ckcon ...
[Android Software Development] DualJoe:
I guess you mean restorecon. Never heard of ckcon.

Here is the static selinux lib for aarch64. Should allow to compile further selinux tools.

AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

www.androidfilehost.com
[Android Software Development] Borovets:
sorry for my lang...

senk for static lib. ... I couldn't generate.

I mean https://github.com/SELinuxProject/selinux

during compilation, I have a lot of errors ... in the field of compilation I am new, so I will be grateful if anyone can help build this...
[Android Software Development] Borovets:
adding bin static aarch64
[Android Software Development] lebigmac:
EDIT: nevermind. Problem already solved. Thank you!
[Android Software Development] DualJoe:
I just have a armv7 LOS18.1 compiled tree that wouldn't help you.

Compiling the partition tools as part of the official AOSP tree should be covered by the official documentation. I also wouldn't expect the resulting binaries to be portable if that's one of your requirements.
[Android Software Development] alecxs:
@munjeni can you please share static binary superunpack.arm64_pie
[Android Software Development] lebigmac:
@Alecxs The superunpack is really easy to build. Even I managed to do it! And I'm only an amateur. LOL! Hey if I can do it then so can you ;)
[Android Software Development] munjeni:
I'm upaded my thread https://xdaforums.com/t/tool-win-lin-and-darw-super-image-unpack-tool.4120963/post-82890385 and included now prebuilts. Pie is a shared object and can't buid natively as a static binary, but I have build static arm64 binary and hex edited it to pie so you should try use superunpack_arm4_fake_pie (static -fake) or use shared pie binary.
[Android Software Development] alecxs:
check page 10 here

edit: be careful with typos ;)
[Android Software Development] lebigmac:
Thanks for the reply DualJoe. I already solved the problem. I somehow managed to build the required binaries for the aarch64 platform as well as the armeabi v7. I was missing like 3 GB worth of source code LOL hence the compiling difficulties!

What exactly do you mean the resulting binaries won't be portable? Will they not work on other modern smartphones? I thought pretty much all modern smartphones running Android 10 and newer are compatible with armeabi v7 as well as armeabi v8a x64 (I guess this is the same thing as aarch64)...
[Android Software Development] DualJoe:
This was just a guess. Theory was that the ABI might not be consistent across all the different roms and Android versions. But maybe this is completely wrong. Just test it on some devices and see for yourself. Good to see you had success in the end.
[Android Software Development] TechnoSparks:
I think I missed a lot since the last time i was here researching how to deal with encfs. Thanks to a lot of your resources @mirfatif I have a very eye-opening understanding on how Android emulates the sdcardfs

Also not to forget @DualJoe for the very beneficial and very useful binaries too. Noobs like me will never get my head wrapped around building for cross-arch!
[Android Software Development] misterhsp:
@DualJoe

Can you please update cryptsetup ti the latest version 2.3.5 (arm64)?

Thanks a lot
[Android Software Development] DualJoe:
Here it is:

cryptsetup235.aarch64.static.20210413.tar.xz | by DualJoe for Utilities

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

androidfilehost.com
[Android Software Development] misterhsp:
Thanks a lot DualJoe.
[Android Software Development] misterhsp:
@DualJoe

Can you provide instructions on how to build cryptsetup-static yourself for arm64 on an x86_x64 machine? I would like to try this myself.

Thanks...
[Android Software Development] DualJoe:
There's a tutorial already on the 1st post (for EncFS). That's the general procedure.
[Android Software Development] misterhsp:
It all looks very complicated, I don't understand it all. I don't think I'll get it right.

...
[Android Software Development] misterhsp:
I failed on the howto :(

...
[Android Software Development] misterhsp:
@DualJoe

Can you give me a hint. With the build of the device-mapper the linux/types.h is not found, although the kernel-headers are there. If the device-mapper has built I could try cryptsetup. Otherwise everything has worked fine so far.

Thanks...

sorry for my crap english :)
[Android Software Development] DualJoe:
I guess you're compiling v3. Try v2 instead.
[Android Software Development] misterhsp:
It is version LVM2.2.02.187, which is also in Alpine-repo.

...
[Android Software Development] DualJoe:
Did you check if the file (linux/types.h) is actually in your sysroot (or include path)?
[Android Software Development] misterhsp:
find . | grep linux/types.h

./usr/include/linux/types.h
[Android Software Development] misterhsp:
Here the error

In file included from ../include/libdevmapper.h:29, from ../in - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com
[Android Software Development] DualJoe:
I will look up my notes once I'm back on my desktop system. I know, lvm2 is complicated.
[Android Software Development] misterhsp:
Thanks. I will try when I have time.

...
[Android Software Development] misterhsp:
Now cryptsetup does not build and crashes pretty much at the end.

CCLD libcrypto_backend.la CCLD libcryptsetup.la CCLD veritys - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com
[Android Software Development] DualJoe:
Its not finding the dependencies/libs. You need archive files (*.a) not shared libraries (*.so). You have to compile them first and place them into your $SYSROOT folder or 'include' path.
[Android Software Development] misterhsp:
already done...
[Android Software Development] DualJoe:
But the linker says otherwise. It either doesn't find or rejects them. Maybe check with 'file mylib.a', 'objdump -f mylib.a' or 'rabin2 -I mylib.a' or any other elf info tool if format/architecture is correct. It's possible that they are compiled as x86-64 if something's wrong with your toolchain/setup.
[Android Software Development] misterhsp:
I've done something completely different now. I have set up a build-vm with qemu-system-aarch64 (alpine). Everything worked right away. The crypsetup static-build works on my androidphone.

@DualJoe

Thanks again for your help and patience. Let's see if I can do gocryptfs there too. I hope that I can ask you again if I have problems :)

...
[Android Software Development] misterhsp:
Where is the download link on page 1 for ecryptfs? Either I am blind or it is really missing.

...
[Android Software Development] DualJoe:
It's in 'Crypttools'. This was one of the first releases and consolidated with other tools.

eCryptFS once worked for me with a custom CAF kernel. When i switched to LOS kernel it had weird errors.
[Android Software Development] misterhsp:
ecryptfs does not work with Lineage 18.1. Lots of errors. Just as infomation.

...
[Android Software Development] DualJoe:
It maybe just needs recompilation against current dependencies and kernel headers. But Android support is probably too risky anyway.
[Android Software Development] misterhsp:
Should also just be an information. I have already deleted this again. But gocryptfs works.

...
[Android Software Development] misterhsp:
@DualJoe

Can you give me your recipe for cmake? The following error:

The variable CC is set.

---------------------------------------------

CMake 3.20.2, Copyright 2000-2021 Kitware, Inc. and Contributors

---------------------------------------------

Error when bootstrapping CMake:

Cannot find appropriate C compiler on this system.

Please specify one using environment variable CC.

See cmake_bootstrap.log for compilers attempted.
[Android Software Development] DualJoe:
I have nothing for cmake. But you can look up corresponding build scripts for ARM platforms, e.g. on Alpine Linux or Termux.

cmake « main - aports - Alpine packages build scripts

git.alpinelinux.org

termux-packages/packages/cmake at master · termux/termux-packages

A package build system for Termux. Contribute to termux/termux-packages development by creating an account on GitHub.

github.com
[Android Software Development] misterhsp:
I have already looked at Alpine. Termuxbuild I can not find
[Android Software Development] misterhsp:
This does not help me. bootstrap sticks to its message.
[Android Software Development] DualJoe:
Either unset CC or set it as in my env script. If that doesn't help post the log mentioned.
[Android Software Development] misterhsp:
@DualJoe

You have included libgcrypt as build-dep in your recipe for cryptsetup. What is that good for? In the APKBUILD at Alpine is not in it. Cryptsetup builds for me without libgcrypt.

Thanks...
[Android Software Development] misterhsp:
I just realized that my first cross-build of cryptsetup does not work.
[Android Software Development] DualJoe:
Same behavior with my binary?

If not, check with 'strace' and search for '/dev/loop' or something. It probably has a wrong hardcoded path for the loopback devices. Then configure it correspondingly.
[Android Software Development] misterhsp:
Yours work.
[Android Software Development] misterhsp:
I have no idea about strace. Strange is the builds that are built in the qemu-system-aarch64 VM with Alpine work. The build from the cross-build it comes to this error.
[Android Software Development] DualJoe:
I guess the loopdevice path is determined during 'configure' stage and differs on your host system compared to the target system. It can probably be set manually that should fix it.

'strace' is easy. Just start it like 'strace -f -v -o /sdcard/strace.log cryptsetup <options>'. Then check the log for '/loop'. It probably will have an entry somewhere that mocks about file not found or similar with the wrong path.

Regarding libgcrypt, there is an alternative (optional) in 'configure'. GnuPG or something. It probably falls back to this then.
[Android Software Development] misterhsp:
Here is the strace.log. From line 13918 it says something about /dev/loop1. As far as I know the loopdevice for Android is /dev/block/loopX.

13918 execve("/data/local/bin/cryptsetup.static", ["cryptsetup.static", "open", - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

Thanks...

/edit

With the other builds, /dev/block/loopX is actually used, just tried with strace.
[Android Software Development] DualJoe:
Search the sourcecode for '/loop' and check the 'configure --help' options. Also check the libc source.
[Android Software Development] misterhsp:
Searching for loop results in lots of hits, which overwhelms me. I am at my wit's end there. The cross-build does not work. The build from the aarch64 VM works.

...
[Android Software Development] DualJoe:
You did not apply the patches.

https://git.alpinelinux.org/aports/tree/main/cryptsetup?h=master

https://github.com/termux/termux-root-packages/tree/master/packages/cryptsetup

The Termux one fixes that issue in 'lib/utils_loop.c':

Put the *.patch files in the cryptsetup source folder and execute:
[Android Software Development] misterhsp:
Thanks DualJoe, now it works. But what I don't understand is: Why do the builds from the aarch64-alpione-vm work without the patch? Very strange.
[Android Software Development] DualJoe:
You can check with 'strace' what's going on.
[Android Software Development] misterhsp:
I tried around, but why it works with the builds from aarch64-vm without the patch is still a mystery to me.
[Android Software Development] misterhsp:
In Lineage 18.1, images cannot be created with --type luks2 (default) using cryptsetup, which worked in Lineage 17.1. With --type luks1 it works. Anybody have an idea why? I ran this once with strace.

5458 execve("/data/local/bin/cryptsetup", ["cryptsetup", "luksFormat", "/storag - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

pastebin.com

...
[Android Software Development] DualJoe:
You have several 'ENOSYS' errors.

https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html

Check your binary with 'file cryptsetup' to make sure it's statically compiled. If so, your kernel might not support that function. Does my binary work?
[Android Software Development] misterhsp:
With your build is the same problem. I think this is due to Lineage 18.1, because in 17.1 it works. Maybe the kernel or something.
[Android Software Development] DualJoe:
This works for me on LOS18.1:

truncate -s 20m image.img
sudo cryptsetup234 luksFormat --type luks2 image.img

Did you try with sudo?
[Android Software Development] misterhsp:
I have cryptsetup 2.3.5. Yes, my device is rooted.
[Android Software Development] DualJoe:
Of course sudo needs root but did you actually use it? Its about this: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1872056

If so, your kernel is probably not configured for this. You would need to recompile the kernel.
[Android Software Development] misterhsp:
I think it's because of the ROM I'm using. It is this one, maybe someone sees something.

GitHub - synt4x93/local_manifests

Contribute to synt4x93/local_manifests development by creating an account on GitHub.

github.com