wolpi / prim-ftpd

FTP server app for android
Other
649 stars 81 forks source link

Unable to download anything when using Super user mode #366

Open Traace opened 4 months ago

Traace commented 4 months ago

Hi, when I enable Super user mode I'm unable to download any files due to access denied

How to reproduce:

  1. Install prim-ftpd (from F-Droid)
  2. Grant Storage and Notification permissions in App Settings (within Android)
  3. Start prim-ftpd and enable Super use mode
  4. A popup for the root request appears. Grant permissions anytime
  5. Open a FTP / SFTP Application, try to download any file on internal storage.
  6. Get the following error message: '/storage/emulated/0/Android/data/org.primftpd/files/root-copy/9c4286d5-b854-4c3b-b4ae-53d55d0926bc/MYFILE.jpg: open failed: EACCES (Permission denied)'

Device Infos: Device: Redmi Note 9 Pro (miatoll) Rom: Infinity-X v1.3 Android: 14 Magisk: 27.0 (with Zygote)

wolpi commented 3 months ago

Interesting to hear. How did you root your device? Can you share logs?

hamidsafdari commented 2 months ago

I could root my Android emulator but couldn't find out what IP to access the FTP server on from the host.

Here's how I rooted the Anrdoid 8 emulator using https://gitlab.com/newbit/rootAVD. The instructions indicate as if you have to run all the commands but I only needed to run the first one. System images are located in your Android SDK directory. For me it was:

~/apps/android-sdk/system-images/android-26/google_apis_playstore/x86/ramdisk.img

The emulator needs to be running when executing the script:

./rootAVD.sh ~/apps/android-sdk/system-images/android-26/google_apis_playstore/x86/ramdisk.img

You will then need to cold boot the emulator and open Magisk. It will ask you to reboot the emulator. Click OK and you will have root after the emulator is started again.

lmagyar commented 2 months ago

couldn't find out what IP to access the FTP server on from the host

I use sg. like adb forward tcp:12345 tcp:1234, 1234 is the port of the server inside the emulator, 12345 is the port on the host. You can then access the ftpd through 127.0.0.1:12345.