[Nexus 6  General] nicholseric:
Once I can build superuser.apk and su from source without eclipse, I will flash the boot.img with that su and test as you suggest with rebooting between boot.img's.

In the meantime, I am making progress on #./gradlew assembleDebug --info

At first I got nowhere with this error:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/havealoha/android/Superuser/Superuser/build.gradle' line: 33

* What went wrong:
A problem occurred evaluating root project 'Superuser'.
> Neither path nor baseDir may be null or empty string. path='null' basedir='/home/havealoha/android/Superuser/Superuser'

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

To fix that, I edited Superuser/Superuser/build.gradle line 33 to read

storeFile file('keystore')

Then I got this far:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Superuser'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

To fix this, I created Superuser/Superuser/local.properites with

sdk.dir=/home/havealoha/adt/sdk

Then I got this far:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Superuser'.
> failed to find target android-22 : /home/havealoha/adt/sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

To fix that, I edited all the build.gradle's to match the versions of the SDK Platform tools I have:

compileSdkVersion 23
buildToolsVersion '23.0.1'

defaultConfig {
File f = new File("packageName")
minSdkVersion 14
targetSdkVersion 23

Then I was able to get this far and am currently stuck, even with adding --continue to :

Successfully started process 'command '/home/havealoha/adt/sdk/build-tools/23.0.1/aapt''
Position 2 : Tag <manifest> attribute package has invalid character ' '.

:processDebugResources FAILED
:processDebugResources (Thread[main,5,main]) completed. Took 0.13 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/havealoha/adt/sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1

I have tried adding lint options to

android {

lintOptions {

abortOnError false

}

and to

defaultConfig {

lintOptions {

abortOnError false

}

http://stackoverflow.com/questions/19389982/how-to-ignore-invalid-characters-in-androids-manifest

Finally I did a ./gradlew clean and that finished building but I dont find an apk anywhere.

As far as su goes, I build it and it is tiny compared to your binary and it does not work:

[havealoha@CentOS7-DELL9020 Superuser]$ ndk-build clean
[x86] Clean : selinux [x86]
[x86] Clean : sepol [x86]
[x86] Clean : stdc++ [x86]
[x86] Clean : su [x86]
[armeabi] Clean : selinux [armeabi]
[armeabi] Clean : sepol [armeabi]
[armeabi] Clean : stdc++ [armeabi]
[armeabi] Clean : su [armeabi]
[mips] Clean : selinux [mips]
[mips] Clean : sepol [mips]
[mips] Clean : stdc++ [mips]
[mips] Clean : su [mips]
[havealoha@CentOS7-DELL9020 Superuser]$ ls -l ./li
libs/ lint.xml
[havealoha@CentOS7-DELL9020 Superuser]$ ls -l ./libs/armeabi/
total 312
-rwxr-xr-x 1 havealoha havealoha 315980 Oct 30 14:51 su