yashsingh1/xdaforums huggingface dataset:
[Pixel C Q&A, Help & Troubleshooting] julz24:
Hi,

Is there a ADB command line that would revert the recent menu in a card style menu? Instead of the limited 8 apps only?

I tried looking for it but i might not be searching correctly. I have change this in the past (I think) but i can't remember if it was a custom ROM feature or a ADB command line...

Thanks for any feedback
[Pixel C Q&A, Help & Troubleshooting] julz24:
To answer my own question...

In the build.prop, the line we need to change in order to have the recent apps in a card style instead of the 8 only recent apps.

ro.recents.grid=true

Change true to false

Is there a way to edit that line through an Adb command without Root permissions?
[Verizon Galaxy S 5 Q&A, Help & Troubleshooting] ballackc4t:
Hello people, first of all i've got an g900v with that specification

I have some questions :

- the phone it's from usa, i live in europe, so i guess isnt option available to make 4g working over here ? i live in romania, and i use vodafone.

- what's the last android for this? what do you suggest me to use for a smooth working ?

- i have some problem, everytime it's lagging in the last period of time and almost everytime it's saying i had no space. I clear cache, and some application data and i still get that info.

Last time when i flash my phone, its was long time ago, with a lg optimus one. hope it's the same procedure with that.

Thanks for help, have a nice day ^_^
[Google Pixel XL Questions & Answers] TotoBerto02:
Hello, first of all I would like to apologize for my English. I created this thread to know if it would be possible to bring the new features of the google pixel xl 2 cameras to our google pixel because according to google everything was done through software, would there be any way to bring it to our phone?
[Google Pixel XL Questions & Answers] ithehappy:
What features exactly? The DoF/Bokeh is not only software, it has to do with the dual pixel tech Pixel 2 has, it's hardware, even it's somehow implemented on Pixel 2016s it'll never be as good.

Don't know of any other strikingly different feature other than that.
[Google Pixel XL Questions & Answers] hooks024:
There's an app somewhere on here that has the pixel 2 camera APK. If you're on the 8.1 DP 1, you have to clone the APK and install it to run alongside the stock camera, because it was originally made for 8.0.
[P3300, MDA Compact III  upgrading etc.] tildesley:
hi all,

have been flashing for about 6 months now but have only recently ran into a problem.

im using vista (like always) and now when the artemis goes into that boot mode where it flashes; on the the pc it now says installing new device and it looks like it blocks the flash.

it never used to do this before i started active syncing using bluetooth. i have set my computer backup removing bluetooth & running activesync thru the wire; but with no success :(

any ideas; whats changed & how to fix it? i like flashing :)

thanks to all

JT
[P3300, MDA Compact III  upgrading etc.] j3roen:
Which Windows Mobile Device Center do you use? 6.1?

You can download it from the microsoft site.

Are you running USPL of so you must download the USB interface (old style) drivers found on this sit.

Let me know what it is.
[P3300, MDA Compact III  upgrading etc.] tildesley:
im using vanilla 2.0 which is 6.0 based at present; was looking at other roms & changing the splash screen etc etc.

i downloaded the old style usb drivers when i first got vista & it worked fine; no problems; in fact all my flashing is done under vista. im starting to think that vista may have auto updated these to the new version as i have vista set to auto update downloads from windows updates.

any ideas?
[Android Software Development] DualJoe:
Compression tools added.

Next are crypttools (ecryptfs-utils, cryptsetup).
[Android Software Development] buengeut:
Please add ecryptfs-simple

xyne.archlinux.ca/projects/ecryptfs-simple

Thanks.
[Android Software Development] DualJoe:
Ecryptfs-simple is not POSIX compliant. It relies on an argv interface (to parse command-line parameters) that is a GNU extension that musl doesn't support.

The original eCryptFS is simple enough anyway (and its the upstream project). I will provide a quickstart example and a one button GUI controlled solution (Termux widget) to handle it.
[Android Software Development] buengeut:
Please to add gifsicle,

http://github.com/kohler/gifsicle

Thanks.
[Android Software Development] DualJoe:
I only have gifsicle. The other ones are too complex for my setup atm.
[Android Software Development] buengeut:
Thank you very much.
[Android Software Development] buengeut:
Please help me again to build giflossy (fork of gifsicle).

I really need it to compress (--lossy=N) the Gif file to be smaller.

https://github.com/kornelski/giflossy

Thanks.
[Android Software Development] DualJoe:
Do you use them directly on your phone for web postings or something? What's your use case to not prefer a desktop system for this?
[Android Software Development] buengeut:
I use it directly on the phone, for learning purposes.

Using it on the phone is so handy that it can be easily used anywhere.

Thanks.
[Android Software Development] buengeut:
Please help me again to build lbzip2

http://lbzip2.org/

Thanks.
[Android Software Development] DualJoe:
Here it is.
[Android Software Development] buengeut:
When will Crypttools be released.
[Android Software Development] DualJoe:
I've waited for the major update of cryptsetup. Its out now indeed. I should get it up this week.
[Android Software Development] DualJoe:
Crypttools and quickstart tutorials added.
[Android Software Development] buengeut:
Mountpoint is not writable (eCryptfs)

Can't write to mountpoint.

# touch /sdcard/pics/test

touch: /sdcard/pics/test: Permission denied

# cp file /sdcard/pics

cp: can't create '/sdcard/pics/file': Permission denied
[Android Software Development] DualJoe:
What are your permissions?

# stat /data/media/0/pics
Access: (775/drwxrwxr-x)	Uid: (1023/media_rw)	Gid: (1023/media_rw)

# stat /data/media/0/efs
Access: (775/drwxrwxr-x)	Uid: (1023/media_rw)	Gid: (1023/media_rw)

# stat /data/media/0/efs/pics
Access: (775/drwxrwxr-x)	Uid: (1023/media_rw)	Gid: (1023/media_rw)

How does your mount look like?

# mount |grep pics
/data/media/0/efs/pics on /data/media/0/pics type ecryptfs (rw,relatime,ecryptfs_fnek_sig=56b1f3c519fb3412,ecryptfs_sig=56b1f3c519fb3412,ecryptfs_cipher=aes,ecryptfs_key_bytes=16)

Is /sdcard linked?

# ls -l /sdcard
lrwxrwxrwx 1 root root 21 May 10 1973 /sdcard -> /storage/self/primary

What Android version and kernel do you have?
[Android Software Development] buengeut:
Android 6.0 kernel 3.18.14

/sdcard is symlink to /mnt/sdcard, i changed /sdcard to /mnt/sdcard

# mount -t ecryptfs
/mnt/sdcard/efs/pics on /mnt/sdcard/pics type ecryptfs (rw,relatime,ecryptfs_fnek_sig=1b77138d91206e66,ecryptfs_sig=1b77138d91206e66,ecryptfs_cipher=aes,ecryptfs_key_bytes=16)

# stat /mnt/sdcard/pics
Access: (775/drwxrwxr-x)	Uid: (1000/ system)	Gid: (1015/sdcard_rw)

# stat /mnt/sdcard/efs
Access: (775/drwxrwxr-x)	Uid: (1000/ system)	Gid: (1015/sdcard_rw)

# stat /mnt/sdcard/efs/pics
Access: (775/drwxrwxr-x)	Uid: (1000/ system)	Gid: (1015/sdcard_rw)

# touch /mnt/sdcard/pics/test
touch: /mnt/sdcard/pics/test: Permission denied
[Android Software Development] DualJoe:
What about the permissions of /data/media/0 folders? That's the most important part.

If your sdcard is not at /data/media/0 you probably don't have a multiuser environment (older phone?) and /mnt/sdcard is probably a real partition. This is early Kitkat partition layout (/sdcard and /data have separate partitions). On later systems both are on /data partition and /sdcard is abstracted by a FUSE file system that would automatically set the proper permissions whenever you write something to it (even as root).

In case you are on an old layout you would need to set proper permissions to /sdcard/pics and /sdcard/efs yourself. Just take a look at the other folders with 'ls -l /mnt/sdcard' and set accordingly. You would also need to change /data/media/0 to /mnt/sdcard in the script.

What do you get with this?

# mount |grep sdcard
# mount |grep storage

What phone is it? Kernel 3.18 doesn't sound all too old.

Edit: Another theory is your internal sdcard is scardfs or something. If so, it might break "stacking" folders (mount over). Try to use /data/pics and /data/efs/pics as a test.
[Android Software Development] buengeut:
It works in Permissive mode (setenforce 0)

I need Busybox with SELinux-enabled and use it to set it to Permissive mode

# busybox getenforce
Enforcing

# busybox setenforce 0
# busybox getenforce
Permissive

And then execute the efs-pics.sh and test it

# cp file /mnt/sdcard/pics ; echo $?
[b]0[/b]

# ls /mnt/sdcard/pics
[b]file[/b]

Horreee.... it Works.
[Android Software Development] Zackptg5:
how'd you get selinux enabled?
[Android Software Development] mirfatif:
Use configuration option "--with-selinux" and make "libselinux" available. "bsdtar" doesn't require "libselinux".
[Android Software Development] Zackptg5:
But wouldn't you need to cross compile selinux? I've tried doing that in past (libsepol and libselinux) and couldn't get them to compile
[Android Software Development] mirfatif:
Yes libsepol is dependency of libselinux. I used gcc with musl libc on void Linux (aarch64).
[Android Software Development] Zackptg5:
Ah, maybe that had something to do with it. I use ndk
[Android Software Development] mirfatif:
I avoid cross compiling because I hate compiler errors. Knowing nothing about coding, it's hard for me to debug. Android's "selinux" is changed from upstream. Though many changes are now merged to upstream. There are some Android specific build options, I think.
[Android Software Development] alecxs:
same trouble here, i ended up with Fedora (Linux Deploy) on device itself, but i never managed cross-compiling for android
[Android Software Development] mirfatif:
Void Linux is love. I do keep Ubuntu and ArchLinux images. But Ubuntu (and other Debian offshoots) often gets into trouble when static linking (NSS and all that) while ArchLinux doesn't have static libraries in development packages. For cross-compiling buildroot is a better option.
[Android Software Development] boklan:
I maintain repo with precompiiled static bins for android

https: // github.com / bol-van/bins

Most I built myself, others got from the net
[Android Software Development] m33mt33n:
grep 3.4 (tested on Android 4.1.2)
[Android Software Development] m33mt33n:
And also a request, can anyone compile xinetd? or already have one or know link of it, plz share.
[Android Software Development] afridi.shahriar:
[MENTION=7805402]mirfatif[/MENTION]

sir, can u plz compile the latest gocryptfs (1.7.1) binary for arm64?
[Android Software Development] mirfatif:
Updated: https://xdaforums.com/showpost.php?p=76462538&postcount=68
[Android Software Development] afridi.shahriar:
sir, can u plz update to the latest cryptsetup version 2.3.2 ?

https://gitlab.com/cryptsetup/cryptsetup/-/wikis/home

[MENTION=4293606]DualJoe[/MENTION]

---------- Post added at 05:37 PM ---------- Previous post was at 05:33 PM ----------

thanks, sir. btw, is the gocryptfs stable enough for using in Android? or, encfs is more stable? (if I'm gonna relying on it for important files, without backup)

as u said "can't rectify bugs", in the gocryptfs post.

btw, which one is most stable and has least chance of data corruption among : luks, encfs, gocryptfs ?

(regardless of encryption quality)

thnks again.
[Android Software Development] mirfatif:
I'm no way an expert in cryptography. I'm just an ordinary user. There are many resources available on internet which may help you decide what is better in what aspect. E.g. see https://askubuntu.com/questions/813290 and https://github.com/vgough/encfs/issues/314.

As a side note, while EncFS and GoCryptFS are comparable, LUKS is a different use case.
[Android Software Development] afridi.shahriar:
yes sir, i read all the threads.

thank you.

btw, can u plz build cryptsetup latest arm64 2.3.2 ?
[Android Software Development] mirfatif:
Not tested.

cryptsetup_static_aarch64_v2.3.2
[Android Software Development] Stay Puft:
smbnetfs share not visible in apps

smbnetfs working in termux but not apps following instructions.
[Android Software Development] DualJoe:
[MENTION=4827981]Stay Puft[/MENTION]:

Check file/folder permissions (others read permission) or maybe needs 'global mountspace' in Magisk.

[MENTION=7805402]mirfatif[/MENTION]:

You're compiling on-device (arm) with void linux? Via chroot on mobile?
[Android Software Development] Stay Puft:
[MENTION=4293606]DualJoe[/MENTION] Global Mountspace in Magisk worked. Any idea why write performance is terrible?
[Android Software Development] DualJoe:
Not sure if its an individual issue of smbnetfs but as far as i can tell (old) CIFS/SMB versions always had issues with asymmetrical speeds (server/client pull/push). I use kernel CIFS (SMBv1) and have different speeds as well (5MB/s to the phone <> 2MB/s if i pull to my server). You could try a tmpfs folder, maybe its faster. Or maybe try to tweak page cache (write cache) on these: "find /proc/sys/vm/dirty* -type f | xargs tail -n +1".
[Android Software Development] mirfatif:
Yes, most of the times.
[Android Software Development] Stay Puft:
I'd like to transfer large files but I'm low on internal memory. Can I use sdcard or external usb write cache?
[Android Software Development] DualJoe:
I don't know. This were just some general ideas.

[MENTION=7805402]mirfatif[/MENTION]:

Did you patch musl in any way regarding cpu hotplug issue?
[Android Software Development] mirfatif:
Thanks for letting me know there's something named "CPU hotplug issue". I have hardly learnt "configure && make" :D
[Android Software Development] DualJoe:
I stumbled upon that problem when i noticed that the default 'xz' binary (toolbox?) wasn't capable of multicore compression (xz -T0). It always compressed on one core only so i decided to compile a proper multicore capable binary myself and tested it again. The results were somewhat disappointing. Sometimes it compressed at 4 cores, sometimes at 2 or 3 cores only.

The reason for that are the powersave modes on mobile phones that disable/enable cpu cores permanently. This CPU hotplugging is a problem for musl as it only polls the value of the currently enabled cores not the real count. As most binaries poll this value only once at program start they reside at that value and if its just 2/4 cores the whole process remains at that stage.

That's where the musl patch (from 1st post) kicks in. Instead of using the musl/posix standard method (that just gets the momentary cpu core count) it polls a different value of the linux environment that reliably provides the real cpu core count no matter how many cores are enabled. With that the 'xz' binary (and all other tools) properly run at max cores always.
[Android Software Development] DualJoe:
Cryptsetup v2.3.2:

https://androidfilehost.com/?fid=4349826312261807690 (2.7MB)

Edit: Version 2. Added the /dev/loop patch and changed from LibreSSL to OpenSSL. Its much faster.

There also is another static binary in the root repo of Termux now.

cryptsetup232.armv7.aarch64.static.20200513-2.tar.xz
└── [ 80] cryptsetup
├── [ 160] aarch64
│ ├── [2.7M] cryptsetup-reencrypt.static
│ ├── [2.8M] cryptsetup.static
│ ├── [472K] 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
├── [329K] dmsetup.static
├── [ 14] dmstats -> dmsetup.static
├── [1.9M] integritysetup.static
└── [1.9M] veritysetup.static
[Android Software Development] mirfatif:
That's a wonderful piece of information. I played a little bit with cgroups to control background execution of native processes, but never noticed how it behaves in PowerSave mode.
[Android Software Development] afridi.shahriar:
yeah. its working fine.

btw , can u plz compile fscrypt binary for arm64?

(which is used for ext4/f2fs encryption)
[Android Software Development] DualJoe:
File attached. Please report back how far you've made it.

Edit: File contains tune2fs and keyctl.

- needs kernel 4.1+

And that's how it ends here as the last working Google full-arm emulator (android-24-arm64-v8a) just has kernel 3.10.
[Android Software Development] afridi.shahriar:
how to check whether my kernel has support for fscrypt?

I have 4.14.179 kernel, and, my phn supports ice,wrapped key encryption. so, i think fscrypt must have been added.

when I'm trying to setup fscrypt, it gives me an error after every command:

[ERROR] fscrypt setup: user: lookup userid 0:

no such file or

directory

do i also need the fscryptctl? (may be)!
[Android Software Development] DualJoe:
Just run it. That's the simplest way. The critical point might not be the kernel but libpam. Not sure if that will work or if you have to create more files later. I've posted an 'strace' binary for that that will show you which files are requested/missing (strace -vf -o strace.log fscrypt [...]). Read the log from bottom to top and look out for the error message and file access errors.

If i get it right Android's vold already supports this encryption thus the kernel might be prepared already. You could also check the kernel config.

/etc/passwd is missing. See my example how to fix this.
[Android Software Development] mirfatif:
4.1+ is required in case of mainline kernel. In case of Android filesystem encryption was added to 3.18 because Google wanted it badly and in fact they initiated the project. If I remember correctly I built fscrypt binary without PAM and made a quick testing with both F2FS and EXT4 when I wrote this. And it worked with kernel 3.18, though with some issues.
[Android Software Development] DualJoe:
That's interesting. I thought it's mandatory. Maybe there's a special android release or a compile option i was missing. I will look into it again later. It probably would be much better to omit pam completely.
[Android Software Development] afridi.shahriar:
working everything!! (setup, unlock, lock).

but, i can't write to that dir even while its unlocked, even with root access.

it says:

1|:/oem # fscrypt unlock /oem/1 --user=root

Enter custom passphrase for protector "name": "/oem/1" is now unlocked and ready for use.

:/oem # mkdir -p /oem/1/7

mkdir: '1/7': Required key not available
[Android Software Development] DualJoe:
Try 'fscrypt --verbose', 'strace' or check the issue tracker.

Other than that there's not much i can do. I have no valid Android environment to get to that point. A loose guess is that the key is not properly loaded into keyring. There are some talks on the issue tracker that the v1 implementation has some drawbacks.
[Android Software Development] afridi.shahriar:
fscrypt --verbose isn't giving much info , and,

strace binary isn't available for me.

btw, what if i use e2crypt or f2fscrypt binaries?

are they also depended on fscrypt?
[Android Software Development] afridi.shahriar:
what's the use of integritysetup and veritysetup ?

can these binary be used with luks encrypted partitions?

can these reduce the risk of dats corruption/loss of luks partitions?
[Android Software Development] mirfatif:
They don't depend on fscrypt but lag in development. Even some very basic features are missing. Actually fscrypt was originally based on e4crypt but now the former has come far ahead. At the moment the most stable implementation is AOSP's built-in filesystem encryption.

---------- Post added at 01:32 PM ---------- Previous post was at 01:28 PM ----------

dm-verity and dm-integrity are to prevent accidental or malicious data corruption. So is fs-verity. E.g. veritysetup is used to setup what Android's Verified Boot does to /system, /vendor etc. to prevent any modifications.
[Android Software Development] DualJoe:
I've just put them in for completeness. Probably useless for end-users.

strace binaries are in the first post.

If 'fscrypt --verbose' doesn't provide any information about the keyring i can post a 'keyctl' binary for debugging. It will show if the key was properly assigned to your user/session if i reckon correctly.

Edit: Added 'keyctl' to the fscrypt archive here.
[Android Software Development] afridi.shahriar:
sir, any ways to use the AOSP's built-in filesystem encryption for encrypt/decrypt dirs on ext4/f2fs filesystem manually for a directory??

can dm-verity or dm-integrity be used with luks to prevent accidental or malicious data corruption? (i.e. luks header corruption)

---------- Post added at 04:03 AM ---------- Previous post was at 03:49 AM ----------

strace outpur for fscrypt unlock /oem/1

and,

mkdir /oem/1/test

https://pastebin.com/GbzhEjYX

------

i dont understand how to use "keyctl". keyctl show shows 1key always, whether i lock/unlock that dir (/oem/1)

-------

can u plz make f2fs-tools latest (1.13.0) ?
[Android Software Development] DualJoe:
Is /oem ext4 and properly set up? Did you check with tune2fs that 'encrypted' feature is enabled?

I'm not sure why you want to go the hard way but Android supports fscrypt functionality out of the box. Just search the net for Android encryption.
[Android Software Development] afridi.shahriar:
yea, it set up properly.

CODE:

su

mke2fs -t ext4 -O encrypt /dev/block/by-name/cust

mount -t ext4 /dev/block/by-name/cust /oem

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

what do u mean? are u talking about FBE (File based encryption)?

android encryption will encrypt all the files inside /data .

But i don't wanna encrypt my userdata partition.

rather, I oonly want to encrypt a few files.

gocryptfs is very slow.

so, i wanna use fscrypt on either ext4 or f2fs
[Android Software Development] DualJoe:
I would try the commands below. I've also added fscryptctl to the post for debugging purpose.

If it doesn't work try EncFS. It should be much easier.
[Android Software Development] buengeut:
If your kernel supports ecryptfs then try it. It's fast.
[Android Software Development] buengeut:
[MENTION=4293606]DualJoe[/MENTION], Could you help to build p7zip (7z binary) for armv7.

Thanks.
[Android Software Development] Ultramanoid:
In case it helps, that's already available through Termux.
[Android Software Development] alecxs:
or here with HugeFiles=on [Q] 7zip for Android?
[Android Software Development] DualJoe:
Seems to be a fork (v17.01) whereas Termux is v16.02. It supports some more formats (ZSTD, LZ4).

The '7z' binary just has additional rar support but its externally linked that is a problem for static linking (so this is '7za').
[Android Software Development] mirfatif:
Find attachment. Works with v0.2.8:

make bin/fscrypt LDFLAGS='-static'
[Android Software Development] DualJoe:
Yes, but i think if you compile it without 'libpam.so' or omit it so its not found at runtime it runs without pam out of the box without any custom patches in the first place (at least for shared compiles). The protectors are dynamically iterated at runtime indeed. I guess the problem is rather static building and the makefile always links the library.

I haven't looked too closely though as i think the v1 implementation is probably too faulty anyway.
[Android Software Development] afridi.shahriar:
can't we use f2fs-encryption with keyctl?

btw, can u plz make parted 3.3 ?
[Android Software Development] DualJoe:
Sorry, don't know.

Attached below.

Edit: 'parted -l' fixed. (libparted/arch/linux.c - "/dev/" -> "/dev/block/")
[Android Software Development] afridi.shahriar:
thanks Sir.

u seems to be so helpful
[Android Software Development] buengeut:
[MENTION=4293606]DualJoe[/MENTION], Could you help to build fxz 1.1.0alpha for armv7.

Thanks.
[Android Software Development] DualJoe:
Here it is. :)
[Android Software Development] gewone:
Aaaawergh, Is it possible to get a re-up on these static binaries?

I'm actually not aiming a smartphone, but a Raspberry Pi, but it's ARM as ARM, I suppose! ;)
[Android Software Development] mirfatif:
The link is up, just tested. But I don't have 32-bit binary ATM, only ARM64.
[Android Software Development] DualJoe:
Maybe this is working.