FORUMS

[NATIVE][ARM]Linux binaries for Android (EncFS, Cryptsetup, PhotoRec, SMBNetFS..)

2,035 posts
Thanks Meter: 925
 
By DualJoe, Senior Member on 24th November 2017, 12:29 AM
Post Reply Email Thread
24th January 2018, 01:12 AM |#11  
Member
Thanks Meter: 16
 
More
Please help me again to build lbzip2
http://lbzip2.org/

Thanks.
24th January 2018, 10:13 PM |#12  
DualJoe's Avatar
OP Senior Member
de
Thanks Meter: 925
 
More
Here it is.
Attached Files
File Type: gz lbunzip25.tar.gz - [Click for QR Code] (82.5 KB, 104 views)
The Following 2 Users Say Thank You to DualJoe For This Useful Post: [ View ] Gift DualJoe Ad-Free
30th January 2018, 12:46 PM |#13  
Member
Thanks Meter: 16
 
More
Quote:
Originally Posted by DualJoe

Compression tools added.
Next are crypttools (ecryptfs-utils, cryptsetup).

When will Crypttools be released.
31st January 2018, 08:58 PM |#14  
DualJoe's Avatar
OP Senior Member
de
Thanks Meter: 925
 
More
I've waited for the major update of cryptsetup. Its out now indeed. I should get it up this week.
The Following User Says Thank You to DualJoe For This Useful Post: [ View ] Gift DualJoe Ad-Free
5th February 2018, 01:26 AM |#15  
DualJoe's Avatar
OP Senior Member
de
Thanks Meter: 925
 
More
Crypttools and quickstart tutorials added.
The Following 3 Users Say Thank You to DualJoe For This Useful Post: [ View ] Gift DualJoe Ad-Free
5th February 2018, 09:00 AM |#16  
Member
Thanks Meter: 16
 
More
Mountpoint is not writable (eCryptfs)
Quote:
Originally Posted by DualJoe

Crypttools and quickstart tutorials added.

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
5th February 2018, 02:01 PM |#17  
DualJoe's Avatar
OP Senior Member
de
Thanks Meter: 925
 
More
Quote:
Originally Posted by buengeut

touch: /sdcard/pics/test: Permission denied

What are your permissions?
Code:
# 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?
Code:
# 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?
Code:
# ls -l /sdcard
lrwxrwxrwx    1 root     root            21 May 10  1973 /sdcard -> /storage/self/primary
What Android version and kernel do you have?
The Following User Says Thank You to DualJoe For This Useful Post: [ View ] Gift DualJoe Ad-Free
5th February 2018, 04:14 PM |#18  
Member
Thanks Meter: 16
 
More
Quote:
Originally Posted by DualJoe

What are your permissions?

Code:
# 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?
Code:
# 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?
Code:
# ls -l /sdcard
lrwxrwxrwx    1 root     root            21 May 10  1973 /sdcard -> /storage/self/primary
What Android version and kernel do you have?

Android 6.0 kernel 3.18.14

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

Code:
# 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)
Code:
# 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)
Code:
# touch /mnt/sdcard/pics/test
touch: /mnt/sdcard/pics/test: Permission denied
5th February 2018, 04:47 PM |#19  
DualJoe's Avatar
OP Senior Member
de
Thanks Meter: 925
 
More
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?
Code:
# 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.
The Following User Says Thank You to DualJoe For This Useful Post: [ View ] Gift DualJoe Ad-Free
6th February 2018, 07:16 AM |#20  
Member
Thanks Meter: 16
 
More
It works in Permissive mode (setenforce 0)
I need Busybox with SELinux-enabled and use it to set it to Permissive mode

Code:
# busybox getenforce
Enforcing

# busybox setenforce 0
# busybox getenforce
Permissive
And then execute the efs-pics.sh and test it
Code:
# cp file /mnt/sdcard/pics ; echo $? 
0 

# ls /mnt/sdcard/pics
file
Horreee.... it Works.
The Following User Says Thank You to buengeut For This Useful Post: [ View ] Gift buengeut Ad-Free
6th February 2018, 10:51 PM |#21  
Junior Member
Thanks Meter: 2
 
More
Hi! Could you maybe add a short guide on how you compile those binaries? I need to compile something as trivial as:

Code:
#include <sys/reboot.h>

int main() {
    reboot(RB_AUTOBOOT);
    return 0;
}
(Needs to be fully static and able to run from initramfs.)

I tried using the Linaro toolchain, but the binaries either aren't static or the linking fails with duplicate symbol errors.

A few pointers could help me a long way.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes