yashsingh1/xdaforums huggingface dataset:
[Android Software Development] evilvoice:
So I guess I should explain and then you can decide if you want to build it or not (either is fine, I was just asking if you would - not demanding).

For the past 4 years I've been building a very customized, very personal ROM. I have a Note 3 and the ROM is based on the last system firmware (5.0, not even 5.01). I've removed everything that I didn't need on this backup phone that only plays games and a few other things that it does. From a 1.6 GB Odin image, it sits around 450 MB. I really don't want to use Tasker, but since I removed Samsung's wallpaper picker, and there is no real information on how to set an image as a wallpaper through a shell script, it's what I'm using to auto set a wallpaper every day. Termux requires a lot of set up from what I'm seeing and the plug-in would require another app when I'm trying to reduce the amount of apps installed

So this is what I'm using those 2 binaries for (I have old versions that I found after A LOT of searching), I use curl to pull a png file from wttr.in for my weather. I then use magick to rotate the image so it fits on my desktop. I run both within Tasker so that it sets the wallpaper every day at 1 am. I'd really like to find the command to set the wallpaper so I don't have to use Tasker and then I'd do it through cron.

All that works, but I'd like updated binaries and it seems nobody builds curl or imagemagick anymore. Most curl projects on GitHub are libcurl to be used through an app and not command line. The website for curl for Android leads to a 404 and it's a couple of releases behind, so I think the person that was building it just quit. Imagemagick doesn't have a maintainer so it's just based on what the latest version someone has built which isn't kept up to date (though it's closer to latest than curl).

I'd really like to use Tasker to actually get a weather display that doesn't pull just 1 day and that doesn't use my method, but everything that I've found uses an API that doesn't exist anymore or isn't free.

I wrote all this to explain what I'm trying to do in the hopes someone more knowledgeable than me in this thread can help. This isn't to derail the thread, just for context.

Thanks for letting me explain
[Android Software Development] Ultramanoid:
Found the explanation fascinating myself, thank you. Shows how 'old' hardware can be perfectly useful and personalized with creative thinking and clever use of a couple of binaries.

If this isn't on topic on this thread, I don't know what is.
[Android Software Development] DualJoe:
Some launchers react on replacing /data/system/users/0/wallpaper. Some might need a reboot though.

You can also try intents to set the wallpaper:

https://stackoverflow.com/a/51505820/3943137

Termux does come with crond if i see it right and it will provide you with latest binaries. I think the best solution would be to find a way with this on the long run.
[Android Software Development] xdan8r:
Thanks for the suggestions. After doing this, I still got the same result (i.e. root ok, but not non-root). I think the problem is that the ownership and permissions of the mount point are changed by encfs so the chmod 777 is ineffective. After playing around with mount options and mount points, I finally got it working. I think the 3 keys for this to work are:

invoke su with -M so the mount point is global (I'm using the magisk su -- don't know if all su versions support this)

use a mount point rooted somewhere in /mnt (e.g. mount points rooted in /storage don't work -- don't know the exact reason for this, but maybe has to do with bind mount restrictions you were mentioning)

change the group of the mount point to the "everybody" group via -ogid=9997 option

If you don't do any one of these, it doesn't seem to work. For anyone else interested, I put it all together in a termux widget using:

su -M -c 'encfs --public -o gid=9997,nonempty,noatime,noexec,nodev,nosuid /mnt/media_rw/mysdcard/efs /mnt/runtime/default/emulated/0/efs'

Note that I used the magisk module that [MENTION=5765352]TechnoSparks[/MENTION] provided (thanks!) so that encfs is in the default path. You'll probably need to give a full path for encfs otherwise. I have my encfs dir on my sdcard and put the mount point under the equivalent of /storage/emulated/0 so change the src/dst paths as desired (keeping in mind it must be under /mnt).

The corresponding umount widget would be:

su -M -c 'umount /mnt/runtime/default/emulated/0/efs'

Here, change the path to the dst path of first command you use. Anyway, it works great now. Thanks for providing all these binaries. Very useful!
[Android Software Development] DualJoe:
Yes, it's changed by the mount (derived from source folder). I will change it 000 so it's blocked if the mount doesn't work.

You must be on FUSE then. Nowadays, sdcardfs only works on /data/media/0 for stacked mounts afaik.
[Android Software Development] xdauser'17:
[MENTION=4293606]DualJoe[/MENTION]

Hello, sir

Can you please also compile Coreutils for android? I much prefer standard Linux commands rather than busybox's cut-down version.

tbh I've tried it by myself some weeks ago, it gave me some errors about "uptime" (sorry, not pretty sure, forgot) while compiling with ndk. on the other hand, it passed the compilation with a generic aarch64 toolchain, and seems to be able to work in android. However, the toolchain isn't for android, I'm not sure if there will be some issues.

Hope you can give me some help. Thank you.
[Android Software Development] DualJoe:
I don't use the Android NDK either (musl cross). One of the differences i know is that busybox and similar tools are capable of showing UIDs as Android users names.

You can look up patches and configurations (build.sh) in Termux repo:

https://github.com/termux/termux-packages/tree/master/packages/coreutils

Beside that your builds should be fine.
[Android Software Development] xdauser'17:
Thanks for the info! You're right, it can't show user names. I'll give that patch a try later.

My current build (aarch64, GNU's source non-modified, symlink mode) is in the attachment, in case someone is interested. :)
[Android Software Development] ccchan234:
is lineageos 14.1+kenzo's kernel got fuse enabled?

is lineageos 14.1+kenzo's kernel got fuse enabled?

really new bie for this, thanks
[Android Software Development] DualJoe:
You already posted the way how to test it:

~# grep -i fuse /proc/filesystems
fuseblk
nodev	fuse
nodev	fusectl
[Android Software Development] DualJoe:
Maybe try the Termux version. They also provide build instructions and support on IRC.

https://github.com/termux/termux-packages/blob/master/packages/libcurl/build.sh

*.a files are 'archive' files (from 'ar' archiver). They only contain static library files and must be linked with the main executable first to be of use. You're probably just missing the last 'linking' step that glues all pieces together.
[Android Software Development] Rom:
So that's enough to get an executable binary file output ready to be executed on a phone?

How to designate the targeted cpu architecture?

Okay, that would mean I'm on the right track, but what would be the final step and how do I get there?
[Android Software Development] DualJoe:
Usually you don't have to care about this as most toolchains/make-scripts automate this process. You are using a custom environment (Crystax) with custom make scripts i'm not familiar with so i cannot help you there. My recommendation is to start with a Termux build environment (scroll down for setup instructions).
[Android Software Development] buengeut:
Hi [MENTION=4293606]DualJoe[/MENTION]

Can you help me again to build FIM

Thanks.
[Android Software Development] DualJoe:
I can give it a shot. But what do you intend it to do? Showing ASCII Art images? There is no framebuffer, SDL or Xorg access for any graphical output.
[Android Software Development] buengeut:
Is /dev/graphics/fb0 not a framebuffer device?

Framebuffer device:

Linux ---> /dev/fb0

Android ---> /dev/graphics/fb0
[Android Software Development] DualJoe:
Sure, but it's occupied by Android graphic subsystem already. I don't think shared access is possible. So it probably would run only outside Android anyway (if its still based on linux framebuffer standard at all. On Android you never know.). Recently, i compiled default alsa-utils and it only worked partially as most direct hardware communication (from additional vendor drivers) is missing. Kernel complained about 'ES325 not ready' (that is the additional noise cancellation chip).

Beside that, FIM doesn't compile with musl (missing _regex.h that seems a glibc only header) even though the config says its using a POSIX library but obviously it is not (or at least not musl compatible).

# lsof |grep fb0
surfaceflinger 506 system 13u CHR 29,0 0t0 8720 /dev/graphics/fb0
surfaceflinger 506 system 16r REG 0,13 4096 12653 /sys/devices/virtual/graphics/fb0/vsync_event
surfaceflinger 506 system 17r REG 0,13 4096 12674 /sys/devices/virtual/graphics/fb0/show_blank_event
mdss_fb0 659 root cwd DIR 0,1 0 1 /
mdss_fb0 659 root rtd DIR 0,1 0 1 /
mdss_fb0 659 root txt unknown /proc/659/exe (readlink: No such file or directory)
[Android Software Development] nelvinchi:
eCryptfs - add ecryptfs-recover-private

[MENTION=4293606]DualJoe[/MENTION]

First off, kudos for your great work!

People like you are the lifeblood of the community....

Would it be possible for you to include ecryptfs-recover-private in your crypttools build?

Many thanks, and keep up the great work!
[Android Software Development] DualJoe:
What kernel do you use that works with ecryptfs? As far as i can remember i've omitted specific tools that didn't work properly or needed patching. I guess this is one of it. Ecryptfs also doesn't work stable anymore with my current LineageOS 3.4 kernel.
[Android Software Development] Zackptg5:
[MENTION=4293606]DualJoe[/MENTION]

How'd you get progress to cross-compile? I kept hitting different snags
[Android Software Development] DualJoe:
Look at more than one cross-compile tutorial and try to figure out what's really needed.
[Android Software Development] Ultramanoid:
https://github.com/termux/termux-app/issues/1072

A real Linux smartphone can't come soon enough. Sigh.
[Android Software Development] ptosch:
Hello,

thanks for all the binaries so far, great work.

I wonder if it is possible to compile gnu screen for aarch64:

https://www.gnu.org/software/screen/
[Android Software Development] DualJoe:
What's wrong with Termux screen?
[Android Software Development] ptosch:
Nothing is wrong with Termux.

Unfortunately Termux != gnu screen.
[Android Software Development] DualJoe:
Termux != tmux

Find it on F-Droid or Playstore.

$ screen -v
Screen version 4.06.02 (GNU) 23-Oct-17
[Android Software Development] VR25:
Could [MENTION=4293606]DualJoe[/MENTION] or anyone here compile tar statically for all archs (especially ARM and x86)?

It'd be great to have such a powerfully tool to clone attributes and perform advanced data backups.

The standard Android tar is too limited, AFAIK.
[Android Software Development] mirfatif:
Download screen, tmux, tar

screen_static_aarch64_v4.99.0

tmux_static_aarch64_v3.0-rc

tar_static_aarch64_v1.29

tar_static_arm_v1.29

tar_static_x86_v1.29

tar (gnu)_static_aarch64_v1.32_selinux-xattrs-acls

bsdtar_static_aarch64_v3.4.1_selinux-xattrs-acls

[MENTION=1455952]ptosch[/MENTION]

[MENTION=5228676]VR25[/MENTION]
[Android Software Development] ptosch:
[MENTION=4293606]DualJoe[/MENTION]:

Thank you so much! I didn't realize there is a screen alternative "tmux".

I am using it now rather than "screen" because screen produces the following message after start:

getpwuid() can't identify your account!

But with tmux I am really happy. Thanks for the binaries, mirfatif!
[Android Software Development] DualJoe:
That shouldn't happen with Termux screen but might happen with custom builds easily indeed as there's no proper linux environment like /etc/passwd on Android.
[Android Software Development] mirfatif:
And I don't relaize such problems exist because I login to a minimal Linux environment when I launch Termux.
[Android Software Development] buengeut:
[MENTION=4293606]DualJoe[/MENTION]

Please build httpfs2

Thanks.
[Android Software Development] DualJoe:
Done.
[Android Software Development] mirfatif:
VeraCrypt

Only for those who don't like closed-source paid apps.

Simple tests work:

~# veracrypt --create test.hc --size 100M --password mypassword --hash sha512 --encryption AES -k "" --pim 0 --filesystem fat --volume-type normal -m nokernelcrypto --random-source=/dev/urandom
~# mkdir test
~# export TMPDIR=/data/local/tmp
~# veracrypt --mount --password mypassword -k "" --pim 0 --protect-hidden=no -m nokernelcrypto test.hc test
~# veracrypt -d test.hc

Mount option "nokernelcrypto" forces to not use kernel's native cryptographic services. But you may face speed lag for larger volumes.

With "nokernelcrypto" only FAT container can be created. When creating other filesystems (ext2/3/4, NTFS, exFAT) "nokernelcrypto" is ignored. Mounting with "nokernelcrypto" works for all filesystems.

In order to use kernel's native cryptographic services, VeraCrypt uses dmsetup tool. So you must have the binary on $PATH.

But the problem with "dmsetup" is that it uses sysV IPC to trigger udev so that nodes in /dev/mapper/ are updated when creating, renaming or removing devices. However Android uses neither "sysV IPC" nor "udev". So we have to update nodes manually. As a workaround see "dmsetup" shell script along with "dmsetup.bin" binary file.

Decrypted loop file is created in $TMPDIR using FUSE, which then requires "dmsetup" or losetup binary to create block device.

VeraCrypt uses mkfs.* binaries to create filesystems, except FAT. mount and umount are required for obvious reason. If invoked without root, VeraCrypt will look for sudo binary.

For more details see documentation.

Download:

veracrypt_static_aarch64_v1.24-b5

dmsetup_static_aarch64_v1.02.158
[Android Software Development] mirfatif:
Dislocker; decrypt Bitlocker (FAT, exFAT, NTFS)

Make sure your kernel is built with FUSE support (it must be):

~# grep -wE 'fuse|fuseblk' /proc/filesystems

When connecting USB OTG to Android, check "dmesg" output to see the block device created for partition on USB stick. In my case it's "/dev/block/sda1".

A working approach on Android 6+ to let non-root apps access the mounted filesystem:

~# DIR=/mnt/runtime/write/emulated/0/USB
~# mkdir $DIR
~# dislocker -u -V /dev/block/sda1 -- $DIR
~# mount -t exfat -o gid=9997,dmask=0007,fmask=0117 $DIR/dislocker-file $DIR

See this answer for details on values of "gid", "dmask" and "fmask".

First command creates an unencrypted loop file dynamically (using FUSE) which can then be mounted as a normal filesystem. Access mounted filesystem from any app at "/sdcard/USB".

Depending on the type of filesystem, you can use different drivers. Linux/Android kernel does have native support for NTFS, exFAT and FAT. Check with:

~# grep -E 'fat|ntfs' /proc/filesystems

Native NTFS is read-only and is reported to be unstable. "exfat" works fine. sdfat is latest development from Samsung which supports exFAT, FAT12/16/32, "exfat" was also contributed by Samsung. "vfat" works fine for FAT12/16/32. Prefer "exFAT" filesystem, as it's going to remain the default choice in near future, with possibly big advancements.

Or you may use FUSE drivers for NTFS (ntfs-3g) and exFAT (mount.exfat-fuse) (binaries for both attached here). But FUSE over FUSE may reduce performance notably for larger data transfers.

A few filesystem options which can be helpful:

uid, gid, umask (or fmask, dmask): exfat, sdfat, vfat, FUSE

namecase: exfat, sdfat

symlink: sdfat

shortname: FAT

default_permissions, allow_other: FUSE (See man for further options)

user_xattr, hide_dot_files, windows_names: ntfs-3g

See relevant documentations for how/when/why to use them.

NOTE:

When USB OTG is inserted into the device, "vold" detects the filesystem (FAT or exFAT) and mounts it, though the contents are encrypted. Un-mount it before removing USB to avoid any data loss.

Don't forget to un-mount twice.

Download:

dislocker_static_aarch64_v0.7.1

ntfs-3g_static_aarch64_v2017.3.23-FUSE27

mount.exfat-fuse_static_aarch64_v1.2.8
[Android Software Development] arunsai123:
[MENTION=4293606]DualJoe[/MENTION] Could you cross-compile latest f2fs-tools?. I tried compiling it with NDK and I'm getting too many errors.
[Android Software Development] mirfatif:
[MENTION=4797498]arunsai123[/MENTION]

Built with musl.

Use AOSP code if you want to build with NDK: https://android.googlesource.com/platform/external/f2fs-tools

Download:

f2fs-tools_static_aarch64_v1.12.0
[Android Software Development] m33mt33n:
REQUEST FOR LINKS OR ALREADY MADE BINARIES:

I have request for these binaries, for ARM.

1- espeak (no termux and independent)

2- nconvert (image editor)

3- ftpfs

can someone port them, or share link if they already existed.
[Android Software Development] Ultramanoid:
You probably already know, but just in case; ImageMagick is available through Termux. ( FFmpeg and OptiPNG as well. )
[Android Software Development] m33mt33n:
Thanks for reply [MENTION=4004386]Ultramanoid[/MENTION].

ya I know that ImageMagick is available via termux, and also by other sources at git. and I am currently using ImageMagick convert, but in my opinion nconvert is much easier to use for a normal user, for routine tasks, earlier mentioned is bit advance.
[Android Software Development] DualJoe:
espeak - Too complex. Probably needs audio bridge to Android subsystem.

nconvert - Not open-source

ftpfs - Horribly old...

Not much i can do... sry.
[Android Software Development] m33mt33n:
[MENTION=4293606]DualJoe[/MENTION]

thank you very much for your reply, and its ok.

do you know if any modern alternative available for ftpfs?
[Android Software Development] DualJoe:
Why do you need FTP as filesystem in the first place? There are userspace tools like Mixplorer that can handle it. If you need a transparent filesystem i would go for CIFS or NFS (needs custom kernel).
[Android Software Development] DualJoe:
HSTR v2.2.0 updated

I've put in the bash_completion files as well (for Termux). Dependencies updated (gcc 9.2.0, musl 1.1.24, ncurses-6.1-20191221, readline 8.0.1).

Edit: 20191225 - Testdisk, PhotoRec v7.2-wip-dec2019 updated
[Android Software Development] alecxs:
[MENTION=7805402]mirfatif[/MENTION] i am afraid tar_static_arm_v1.29.zip is not working, needs to be recompiled

./tar --selinux --xattrs --acls -vcpf test.tar .
./tar: POSIX ACL support is not available
./tar: SELinux support is not available
./tar: XATTR support is not available
./
./tar
./tar: ./test.tar: file is the archive; not dumped
[Android Software Development] mirfatif:
Works without "--xattrs --selinux --acls"? I think I built with buildroot, will build again with changed configuration.

On Android we only need XATTRs (for a few binaries on "/system" with file capabilities) and SELinux (can be compensated with "restorecon" post-restore). Stock Android doesn't use ACLs.

May be this one supports XATTRs and SELinux: https://github.com/Magisk-Modules-Repo/gnu
[Android Software Development] DualJoe:
Usually its not needed for Android. Even Termux doesn't provide these options. But you can take this one.
[Android Software Development] alecxs:
[MENTION=7805402]mirfatif[/MENTION] yeah acls not really needed (it's for windows only?) however the [MENTION=6037748]Zackptg5[/MENTION] build comes with xattrs but no selinux

[MENTION=4293606]DualJoe[/MENTION] thx for the fresh build, it's working. is there a thread somewhere the link is just attachment..

i built tar some time ago i really needed selinux flag for proper restoring files of twrp backup, and so far it's the closed solution to re-create twrp files
[Android Software Development] mirfatif:
It's useful when backing up whole filesystem. Added aarch64 binaries (GNU and BSD) here. In addition to modification timestamp, permission mode, owner, group, extended attributes including "user.*" namespace, ACLs (system.posix_acl_access) and SELinux context (security.selinux), "bsdtar" also preserves inode flags (lsattr), Linux capabilities ("security.capabilities" xattr) and other manually set xattrs including "security.*" and "trusted.*", both on ext4 and f2fs.

They are (not very widely) used on Linux to extend owner users and groups, helpful in complex situations like on shared servers.
[Android Software Development] DualJoe:
No, the link is from 1st post of this thread.
[Huawei Mate 10  Questions & Answers] Shady282:
My mate 10 came with empty battery, i pressed on power button, it didn't turn on.

I had to put it on charger and it gave me a red notification light. and i left it on charge. and after about an 40 mins or so, it gave me that is was 97% charged.. i left it till 100% and then it booted up, when i pressed the power button.

Should i be worried ? never had a phone that came with empty battery :(
[Huawei Mate 10  Questions & Answers] ivan552:
mine did too, no problems
[Huawei Mate 10  Questions & Answers] amonrei:
It depends i guess. Mine came at 34%.
[Huawei Mate 10  Questions & Answers] alec66:
same here
[Huawei Mate 10  Questions & Answers] Gryphie:
Mine was completely dead. After 2 minutes of charging it showed 1%.
[Huawei Mate 10  Questions & Answers] toto6.0:
moi aussi zéro de chez zéro
[Huawei Mate 10  Questions & Answers] guztavo1:
I had the exact same thing. And the box was opened so i didnt want to buy it at first it was suspicious. But it was the only one they had in the store and it was an emergency because my phone broke, so i bought it anyway. But now the battery seems to be fine :)
[Samsung Galaxy Note 8 Questions and Answers] roseyhead:
I've got a Telstra-branded S8+ (code TEL according to Sammobile) and I want to flash regular unbranded firmware onto it but I'm a little confused by all this talk of CSCs and so on. Is it safe to download the Australia (XSA) firmware and simply flash the HOME_CSC file over the top of what's already there, or is there more to it than that? Do I need to worry about this tripping Knox/breaking Safetynet/disabling OTAs/etc?
[Samsung Galaxy Note 8 Questions and Answers] Kaniba:
I have had no issues with flashing XSA on my Singapore model Note 8. As long as it is the official firmware this will not trip Knox.

Though your original CSC will appear in the Software Information as the third CSC. Mine currently shows XSA/XSA/XSP (XSP is Singapore)
[Android Q&A, Help & Troubleshooting] rubobaquero:
Hi,

I have a new Xiaomi Redmi Note 4X. When i bought it a week ago, i was able to connect it to my MacBook Pro and also was able to install one of my apps using Android Studio.

After requesting unlock code and waiting 72 hours, I have been able to unlock de bootloader with the Xiaomi utility on a Windows 7 computer, flash TWRP (twrp-3.1.1-0-santoni.img from twrp.me) using fastboot from my Mac OSX and install SuperSU 2.82 via TWRP.

The problem is that after rebooting the phone, it is impossible to connect to it via adb. It never appears in adb devices list. Things that i have tried:

Add to adb_usb.ini with these vendor Ids (0x8087,0x2080,0x2717)

Enable / disable developer options

Enable / disable USB debugging

Clear list of USB debug authorizations

Try to modify USB settings to MTP/PTP mode (it always connect as "charge only" mode, if i try to switch it it doesn't change).

Update platform tools to version 0.26 via Android Studio

Connect it to different USB ports

When i connect it to my USB, the phone didn't asks me permissions to allow USB debugging for the RSA key of the computer. It just shows the message about USB charging only mode. If I connect one of my other two phones (Huawei P8 Lite 2017 and Vernee Apollo Lite) they appear without problems on the adb devices list.

Do you have any ideas of what can be the problem? Thanks in advance for your help!