Ghost Commander plugins for SMB and SFTP are only usable up to GhostCommander 1.51b6
(1.51b6 got meanwhile archived.)
The main app seems to be built from nearly the current revision (r445) from svn at sf.net. But when the plugins are build an old revision (r390) from the main app is retrieved for the plugin interface specifications.
I was able to make debug builds of all 3 apks with these revisions und could successfully use it:
- ghost commander: r450
(needed a small change in one string in res/values-de/strings.xml -> seems an upstream issue)
- samba plugin: r111
(with custom_rules.xml and jcifs-1.3.17.jar from fdroiddata.git)
- sftp plugin: r30
(with custom_rules.xml and ganymed-ssh2-build210.jar from fdroiddata.git)
This interface in r390 was as long working as to ghost commander main app version 1.51b6. Probably the plugins can be built in newer revisions with specifying a newer main app revision in the metadata files (metadata/com.ghostsq.commander.{samba,sftp}.txt):
- srclibs=GhostCommander@390
+ srclibs=GhostCommander@450
Kind regards, Bernhard
These were the steps taken to compile the (almost) current versions:
mkdir gc-svn; cd gc-svn
export HOME=$PWD
#get fdroiddata
git clone https://gitlab.com/fdroid/fdroiddata.git
#build main app and interface lib gc.jar
svn co svn://svn.code.sf.net/p/ghostcommander/code/ ghostcommander-code
#Ausgecheckt, Revision 450.
cd ghostcommander-code
/home/build/android-sdk-linux/tools/android update project -p . -t android-19 -n com.ghostsq.commander
sed -i 's/Ghost Commander v%s/Ghost Commander vs/g' res/values-de/strings.xml
# [aapt] /home/build/ghostcommander/gc-svn/ghostcommander-code/res/values-de/strings.xml:199: error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?
ant debug
jar c -C bin/classes/ com > gc.jar
cd ..
# --> builds successfully
#build plugin smb
svn co https://svn.code.sf.net/p/gc-samba/code gc-samba
#Ausgecheckt, Revision 111.
cd gc-samba/
install -D ../ghostcommander-code/gc.jar libs/gc.jar
cp -a ../fdroiddata/build/extlib/custom_rules.xml ../fdroiddata/build/extlib/jcifs/jcifs-1.3.17.jar libs/
mv libs/custom_rules.xml .
/home/build/android-sdk-linux/tools/android update project -p . -t android-19 -n com.ghostsq.commander.samba
ant debug
cd ..
# --> builds successfully and was able to list a remote directory
#build plugin sftp with ganymed-ssh library from fdroiddata
svn co https://svn.code.sf.net/p/gc-sftp/code/trunk gc-sftp -r 30
cd gc-sftp
install -D ../ghostcommander-code/gc.jar libs/gc.jar
cp -a ../fdroiddata/build/extlib/custom_rules.xml ../fdroiddata/build/extlib/ganymed-ssh/ganymed-ssh2-build210.jar libs/
sed 's/jcifs-1.3.17/ganymed-ssh2-build210/' libs/custom_rules.xml > custom_rules.xml
#build210 is from 2006 due to http://mvnrepository.com/artifact/ch.ethz.ganymed/ganymed-ssh2/
/home/build/android-sdk-linux/tools/android update project -p . -t android-19 -n com.ghostsq.commander.sftp
ant debug
cd ..
#r34,r33,r32,r31 fails to build: SFTPFileInputStream.java:6: error: cannot find symbol [javac] import ch.ethz.ssh2.SFTPClient;
# --> r30 builds successfully and was able to list a remote directory
##build ganymed-ssh library as included in http://sourceforge.net/p/gc-sftp/code/HEAD/tree/trunk/ganymed-ssh-2.zip
## seems to be the same as revision 155 from http://ganymed-ssh-2.googlecode.com/svn/trunk/ except 6 files deleted and some changes to ChannelManager.java
# svn co https://svn.code.sf.net/p/gc-sftp/code/trunk gc-sftp
# #Ausgecheckt, Revision 34.
# svn checkout http://ganymed-ssh-2.googlecode.com/svn/trunk/ ganymed-ssh-2-r155 -r 155
# cd ganymed-ssh-2-r155
# #zip contains only source path from r155 with missing auth/ServerAuthenticationManager.java server/ServerConnectionState.java ServerAuthenticationCallback.java ServerConnection.java transport/ServerKexManager.java transport/ServerTransportManager.java and some changes in channel/ChannelManager.java)
# rm src/main/java/ch -rf
# (cd src/main/java/; unzip ../../../../gc-sftp/ganymed-ssh-2.zip)
# mvn package -Dmaven.repo.local=$HOME/.m2/repository
# cd ..
##build plugin sftp with ganymed-ssh library from trunk at http://ganymed-ssh-2.googlecode.com/svn/trunk/
# cd gc-sftp
# install -D ../ghostcommander-code/gc.jar libs/gc.jar
# cp -a ../fdroiddata/build/extlib/custom_rules.xml ../ganymed-ssh-2-r155/target/ganymed-ssh2-263-SNAPSHOT.jar libs/
# sed 's/jcifs-1.3.17/ganymed-ssh2-263-SNAPSHOT/' libs/custom_rules.xml > custom_rules.xml
# tar -zxf ../fdroiddata/build/extlib/jzlib/jzlib-1.0.7.tar.gz
# mv jzlib-1.0.7/com/jcraft src/com/
# /home/build/android-sdk-linux/tools/android update project -p . -t android-19 -n com.ghostsq.commander.sftp
# ant debug
# cd ..
# # --> builds successfully and was able to list a remote directory (failed on very first attempt after installation, but following are succeeding)
##build ganymed-ssh library from trunk
# svn checkout http://ganymed-ssh-2.googlecode.com/svn/trunk/ ganymed-ssh-2-trunk
# #Ausgecheckt, Revision 161.
# cd ganymed-ssh-2-trunk
# mvn package -Dmaven.repo.local=$HOME/.m2/repository
# cd ..
##build plugin sftp with ganymed-ssh library from trunk at http://ganymed-ssh-2.googlecode.com/svn/trunk/
# svn co https://svn.code.sf.net/p/gc-sftp/code/trunk gc-sftp
# #Ausgecheckt, Revision 34.
# cd gc-sftp
# install -D ../ghostcommander-code/gc.jar libs/gc.jar
# cp -a ../fdroiddata/build/extlib/custom_rules.xml ../ganymed-ssh-2-trunk/target/ganymed-ssh2-263-SNAPSHOT.jar libs/
# sed 's/jcifs-1.3.17/ganymed-ssh2-263-SNAPSHOT/' libs/custom_rules.xml > custom_rules.xml
# /home/build/android-sdk-linux/tools/android update project -p . -t android-19 -n com.ghostsq.commander.sftp
# ant debug
# cd ..
# #compiles but fails to connect (logcat): E/SFTPAdapter(11948): ch.ethz.ssh2.PacketFormatException: Illegal packet size (745041249)
##build plugin sftp with ganymed-ssh-262 library from http://mvnrepository.com/artifact/ch.ethz.ganymed/ganymed-ssh2/
# svn co https://svn.code.sf.net/p/gc-sftp/code/trunk gc-sftp -r 29
# cd gc-sftp
# install -D ../ghostcommander-code/gc.jar libs/gc.jar
# cp -a ../fdroiddata/build/extlib/custom_rules.xml libs/
# (cd libs/; wget http://central.maven.org/maven2/ch/ethz/ganymed/ganymed-ssh2/262/ganymed-ssh2-262.jar)
# sed 's/jcifs-1.3.17/ganymed-ssh2-262/' libs/custom_rules.xml > custom_rules.xml
# /home/build/android-sdk-linux/tools/android update project -p . -t android-19 -n com.ghostsq.commander.sftp
# ant debug
# cd ..
# #r34,r33,r32,r31 fails to build: SFTPFileInputStream.java:6: error: cannot find symbol [javac] import ch.ethz.ssh2.SFTPClient;
# #r30,r29 fails to build: SFTPEngineBase.java:39: error: incompatible types [javac] Vector<SFTPv3DirectoryEntry> dir_entries = sftp.ls( full_fn );
# # same for the version before ganymed-ssh-261
/home/build/android-sdk-linux/platform-tools/adb uninstall com.ghostsq.commander
/home/build/android-sdk-linux/platform-tools/adb uninstall com.ghostsq.commander.samba
/home/build/android-sdk-linux/platform-tools/adb uninstall com.ghostsq.commander.sftp
/home/build/android-sdk-linux/platform-tools/adb install ./ghostcommander-code/bin/com.ghostsq.commander-debug.apk
/home/build/android-sdk-linux/platform-tools/adb install ./gc-samba/bin/com.ghostsq.commander.samba-debug.apk
/home/build/android-sdk-linux/platform-tools/adb install ./gc-sftp/bin/com.ghostsq.commander.sftp-debug.apk