This is an Android app that extends the built in File Manager to support connecting to SMB file shares.
This app is built on top of Samba 4.5.1.
Android SDK and NDK r23b or above are required to build this app. Android Studio is highly recommended.
This build guide is only tested on Ubuntu. Please see the Mac section below for how to build on a mac. Changes to make it build on other platforms are welcome.
git clone --recurse-submodules https://github.com/mauricelam/samba-documents-provider.git
cd samba-documents-provider/samba
- ** If building on non-Linux devices, see the section below **
- Modify configure.sh to change $NDK to point to your NDK folder.
- Uncomment corresponding flags in configure.sh to compile for different architecture. Uncomment flags for ARMv7 in addition to 32-bit ARM to compile it for ARMv7.
- Run
configure.sh
to configure Samba project. - Run
compile.sh
to compile libsmbclient.so. - Run
install_android.sh
. - Change directory to the root of Samba source code and run
make distclean
. - Repeat step 6-12 for all desired ABI's.
- Make sure to change app's
build.gradle
to include only ABI's that Samba was built for in previous steps. - Compile SambaDocumentsProvider using Android Studio.
Building on Macs is not natively supported, but a VM / Multipass can be used to compile. Here are steps for multipass that worked on an Intel mac.
- Follow the setup steps on https://multipass.run/
- Creata new instance:
multipass launch --name ndk --disk 10G
multipass shell
- Copy the download link of the Linux SDK on https://developer.android.com/ndk/downloads,
and use
wget
to download it, and thenunzip
it - Set
$NDK
to the unzipped path:export NDK=$PWD/
sudo apt install python-is-python2
git clone https://github.com/mauricelam/samba && git checkout android
- Follow the build steps above
Please go to our Google group to discuss any issues.