I've embedded the Apache ftpserver in my Android application and I'm able to upload and download files to/from my phone using Ubuntu FTP client (Nautilus). I've a small question though. Is it possible to configure the embedded FTP server so that a client could be connected with root privileges to my device, so that I could remotely access Android system directory with read/write permissions? My Android device is rooted with su and busybox installed.
I've written the following snippet to gain read/write access to my SD card:
SharedPreferences getPrefs=PreferenceManager.getDefaultSharedPreferences(getBaseContext()); boolean rwaccess = getPrefs.getBoolean("rwaccess", true); List<Authority> authorities = new ArrayList<Authority>(); if (rwaccess) authorities.add(new WritePermission()); authorities.add(new ConcurrentLoginPermission(0, 0)); authorities.add(new TransferRatePermission(0, 0)); testUser.setAuthorities(authorities); anonUser = new BaseUser(testUser); anonUser.setName("anonymous");
Thanks a lot for your help!