Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding the latest fork of Superuser #283

Open
unforgettableid opened this issue Aug 26, 2015 · 25 comments
Open

Regarding the latest fork of Superuser #283

unforgettableid opened this issue Aug 26, 2015 · 25 comments

Comments

@unforgettableid
Copy link

Dear @phhusson:

In reply to this comment of yours:

Thank you for working on your fork of Superuser!

A) Does your fork work fine on Android 5.0 "Lollipop"?

B) Is it ready for use by the general public?

C) If so, I wonder if you could please do the following?:

  1. Release a .apk file on a personal website of yours.
  2. Email Koush. A few times if necessary. You can also contact him by other means such as Twitter. Include something noticeable like "[TAKEOVER REQUEST]" in the email subject line. Ask him if he would be willing to please make your Superuser fork the new GitHub network root.
  3. If you're making a new release of Superuser for the first time in years, there are bound to be new bugs. Once you've squashed most of these, ask Koush to transfer ownership of the Superuser app in the Google Play Store to you. Here's how.

If you try contacting Koush three or four times, and wait one or two weeks in between each try, then that means Koush is uncontactable. If this is so, it would be good if you could please change the name of your fork to something new — to a name which is less common and easier to Google for. A name different than ChainsDD picked ("Superuser") and a name different than Koush picked ("Superuser"). May I suggest the name "AndAuthenticate", which is a name reminiscent of the Mac OS X "Authenticate" privilege authorization feature.

@phhusson
Copy link

Thanks for your consideration

A) I haven't tested it extensively, but yes it works
B) There is still some work to do(though nothing complicated), to pack the Superuser in a flashable update.zip
C) Thanks for the advises. I'll see when the time comes

@jeekajoo
Copy link

@phhusson If I have a documentation for that, I can make sure the project is regularly built into flashable update.zip available on the web. so let me know if I can help.

@ildar
Copy link

ildar commented Aug 26, 2015 via email

@phhusson
Copy link

@jeekajoo That would be great.
Are you currently able to build placeholder and su?
Or would you have rather me have build those ?

@jeekajoo
Copy link

jeekajoo commented Sep 1, 2015

git clone https://github.com/phhusson/Superuser.git
cd Superuser
git clone https://github.com/koush/Widgets.git
docker run --rm -t -i -v $PWD:/data jeekajoo/android /bin/bash
docker> cd /data/Superuser
docker>  gradle

(...)
FAILURE: Build failed with an exception.

* Where:
Build file '/data/Widgets/Widgets/build.gradle' line: 48

* What went wrong:
A problem occurred evaluating project ':Widgets'.
> Cannot get property 'user' on extra properties extension as it does not exist

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

BUILD FAILED

Total time: 22.051 secs

@phhusson : I guess I'm not far.
Maybe it would be nice to fork Widgets aswell.
to avoid the weird stuff we have in Widgets/Widgets/build.gradle line: 48

@phhusson
Copy link

phhusson commented Sep 1, 2015

Sorry, you need to use my own Widgets, https://github.com/phhusson/Widgets/

@jeekajoo
Copy link

jeekajoo commented Sep 1, 2015

Thanks, I have Lint errors:

git clone https://github.com/phhusson/Superuser.git
cd Superuser
git clone https://github.com/phhusson/Widgets.git
docker run --rm -t -i -v $PWD:/data jeekajoo/android /bin/bash
docker> cd /data/Superuser
docker> gradle
...
BUILD SUCCESSFUL
...
docker> gradle build
...
14:53:46.011 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :compileLint (Thread[main,5,main]) started.
14:53:46.011 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :compileLint
14:53:46.012 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':compileLint'
14:53:46.012 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':compileLint' is up-to-date
14:53:46.012 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':compileLint' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
14:53:46.012 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':compileLint'.
14:53:46.012 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':compileLint'
14:53:46.013 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :compileLint (Thread[main,5,main]) completed. Took 0.002 secs.
14:53:46.013 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :lint (Thread[main,5,main]) started.
14:53:46.013 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :lint
14:53:46.013 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':lint'
14:53:46.013 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':lint' is up-to-date
14:53:46.014 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Executing task ':lint' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
14:53:46.014 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':lint'.
14:53:48.883 [QUIET] [system.out] Ran lint on variant debug: 117 issues found
14:53:48.884 [QUIET] [system.out] Ran lint on variant release: 117 issues found
14:53:48.919 [QUIET] [system.out] Wrote HTML report to file:/data/Superuser/build/outputs/lint-results.html
14:53:48.925 [QUIET] [system.out] Wrote XML report to /data/Superuser/build/outputs/lint-results.xml
14:53:48.929 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':lint'
14:53:48.929 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :lint FAILED
14:53:48.929 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :lint (Thread[main,5,main]) completed. Took 2.916 secs.
14:53:48.930 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 3.366 secs, idle: 0.028 secs
14:53:48.936 [ERROR] [org.gradle.BuildExceptionReporter] 
14:53:48.937 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
14:53:48.937 [ERROR] [org.gradle.BuildExceptionReporter] 
14:53:48.937 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
14:53:48.937 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':lint'.
14:53:48.937 [ERROR] [org.gradle.BuildExceptionReporter] > Lint found errors in the project; aborting build.
14:53:48.937 [ERROR] [org.gradle.BuildExceptionReporter]   
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]   Fix the issues identified by lint, or add the following to your build script to proceed with errors:
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]   ...
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]   android {
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]       lintOptions {
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]           abortOnError false
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]       }
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]   }
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter]   ...
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter] 
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
14:53:48.938 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 
14:53:48.939 [LIFECYCLE] [org.gradle.BuildResultLogger] 
14:53:48.939 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
14:53:48.940 [LIFECYCLE] [org.gradle.BuildResultLogger] 
14:53:48.940 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 8.355 secs
14:53:48.944 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
14:53:48.945 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
14:53:48.945 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin Resolution Cache (/root/.gradle/caches/2.5/plugin-resolution) was closed 0 times.
14:53:48.946 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (/root/.gradle/caches/modules-2/metadata-2.15/artifact-at-repository.bin)
14:53:48.946 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (/root/.gradle/caches/modules-2/metadata-2.15/module-metadata.bin)
14:53:48.947 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/root/.gradle/caches/modules-2).
14:53:48.947 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for settings file '/data/Superuser/settings.gradle' (/root/.gradle/caches/2.5/scripts/settings_1wo518zn57bbb1l4d1wgod52p/SettingsScript/buildscript).
14:53:48.947 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for settings file '/data/Superuser/settings.gradle' (/root/.gradle/caches/2.5/scripts/settings_1wo518zn57bbb1l4d1wgod52p/SettingsScript/no_buildscript).
14:53:48.948 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file '/data/Superuser/build.gradle' (/root/.gradle/caches/2.5/scripts/build_2wgjxfdobour9sqw5566w1s3q/ProjectScript/buildscript).
14:53:48.948 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/data/Superuser/build.gradle' (/root/.gradle/caches/2.5/scripts/build_2wgjxfdobour9sqw5566w1s3q/ProjectScript/no_buildscript).
14:53:48.948 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on buildscript class cache for build file '/data/Widgets/Widgets/build.gradle' (/root/.gradle/caches/2.5/scripts/build_315273e3bl97sck6fvgdj08fl/ProjectScript/buildscript).
14:53:48.948 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on no_buildscript class cache for build file '/data/Widgets/Widgets/build.gradle' (/root/.gradle/caches/2.5/scripts/build_315273e3bl97sck6fvgdj08fl/ProjectScript/no_buildscript).
14:53:48.949 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFileStates.bin (/data/Superuser/.gradle/2.5/taskArtifacts/outputFileStates.bin)
14:53:48.949 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileSnapshots.bin (/data/Superuser/.gradle/2.5/taskArtifacts/fileSnapshots.bin)
14:53:48.949 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskArtifacts.bin (/data/Superuser/.gradle/2.5/taskArtifacts/taskArtifacts.bin)
14:53:48.949 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (/data/Superuser/.gradle/2.5/taskArtifacts/fileHashes.bin)
14:53:48.949 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (/data/Superuser/.gradle/2.5/taskArtifacts).
14:53:48.950 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 14 (avg: 0.0 secs, total: 0.012 secs)
14:53:48.950 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolved configuration cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
14:53:48.950 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.001 secs
14:53:48.950 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedRepositoryFactory] In-memory dependency metadata cache closed. Repos cached: 6, cache instances: 2, modules served from cache: 0, artifacts: 0

@phhusson
Copy link

phhusson commented Sep 1, 2015

The appropriate command is assembleRelease or assembleDebug
Though thanks for making see lint errors

@jeekajoo
Copy link

jeekajoo commented Sep 1, 2015

right.. thanks :D

...
BUILD SUCCESSFUL

Total time: 17.36 secs

This build could be faster, please consider using the Gradle Daemon: http://gradle.org/docs/2.5/userguide/gradle_daemon.html
root@e708718a94c7:/data/Superuser# find . -name "*apk"
./build/outputs/apk
./build/outputs/apk/Superuser-debug-unaligned.apk
./build/outputs/apk/Superuser-release-unsigned.apk
./build/outputs/apk/Superuser-debug.apk

@phhusson
Copy link

phhusson commented Sep 1, 2015

You still need to build placeholder and su, by doing an AOSP-like build in Superuser/ (running mma in this folder after a lunch should do the trick)

@jeekajoo
Copy link

jeekajoo commented Sep 2, 2015

I'm trying with last NDK version (android-ndk-r10e-linux-x86_64.bin). Is it supposed to be working with it ?

git clone https://github.com/phhusson/Superuser.git
cd Superuser
git clone https://github.com/phhusson/Widgets.git
docker pull jeekajoo/android
docker run --rm -t -i -v $PWD:/data jeekajoo/android /bin/bash
docker> echo $NDK_PROJECT_PATH
/data
docker> cd /data/
docker> ls
Android.mk  LICENSE  README.md  Superuser  Widgets  build.gradle  executables  gradle  gradlew  gradlew.bat  init.superuser.rc  local_manifest.xml  settings.gradle
docker> ndk-build
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /data/jni/Android.mk    
/opt/android-ndk-r10e/build/core/add-application.mk:199: *** Android NDK: Aborting...    .  Stop.

Looks likes it is expecting to have something in jni dir that doesn't exist.
$NDK_PROJECT_PATH is supposed to be the directory where we have Android.mk. Right? (I'm a n00b regarding all of this android stuff building.).

My docker file: https://github.com/jeekajoo/docker-android/blob/master/Dockerfile
uptodate Image available on Dockerhub registry: https://hub.docker.com/r/jeekajoo/android/

Thanks

@jeekajoo
Copy link

jeekajoo commented Sep 2, 2015

@phhusson

The Android.mk file resides in a subdirectory of your project's jni/ directory, and describes your sources and shared libraries to the build system. It is really a tiny GNU makefile fragment that the build system parses once or more. The Android.mk file is useful for defining project-wide settings that Application.mk, the build system, and your environment variables leave undefined. It can also override project-wide settings for specific modules.

https://developer.android.com/ndk/guides/android_mk.html

The Application.mk file is really a tiny GNU Makefile fragment that defines several variables for compilation. It usually resides under $PROJECT/jni/, where $PROJECT points to your application's project directory. Another alternative is to place it under a sub-directory of the top-level $NDK/apps/ directory. For example: $NDK/apps/<myapp>/Application.mk

https://developer.android.com/ndk/guides/application_mk.html

@phhusson
Copy link

phhusson commented Sep 2, 2015

This can't be built with ndk
It can only be built in an android source tree itself.

@wiewo
Copy link

wiewo commented Sep 5, 2015

@phhusson Thank you very much for continuing the work on superuser!
Does your fork also work with SElinux in enforcing mode?

@phhusson
Copy link

phhusson commented Sep 5, 2015

That's actually the goal of my fork, and yes it works.

@koush
Copy link
Owner

koush commented Sep 5, 2015

This was NDK compatible, but may not be with newer versions of hte NDK. Probably needs build script fixes.

@phhusson
Copy link

phhusson commented Sep 5, 2015

Yes sorry, we were speaking about my fork of your Superuser :)

@unforgettableid
Copy link
Author

Dear @jeekajoo:

Like phhusson wrote, you need to build Superuser in an Android source tree.

If you want to check out the Android "master" branch including all history, https://source.android.com/source/downloading.html offers instructions:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
repo init -u https://android.googlesource.com/platform/manifest
repo sync

If you plan to ever send in Android patches to Google, then you should tell repo init your real name and email address when it asks.

The first time you run repo sync, it may take half a day or more, and I assume it will cause dozens of gigabytes to be downloaded.

If you want to save time, you can do a Git "shallow clone". See here for instructions.

@phhusson
Copy link

Erm sorry
I actually fixed it to be buildable with NDK/SDK again :)

@jeekajoo
Copy link

@unforgettableid yes thanks. I was able to build it thanks to @phhusson 's fixes/help 6 days ago https://github.com/jeekajoo/docker-android/commit/f81e5aff18f74ddd21ea8a5c3d7a39747ef06f66
Now I need to find time to make a flashable zip from it and test it..

@AndyLiu008
Copy link

When I use new Android SDK and Eclipse to build the project, it has a trouble and can not generate the R file. It hints error: Error retrieving parent for item: No resource found that matches the given name '@style/AppDarkTheme'.
I have try a log time to fix it, but it doesn't work. If anyone can run the project in his new Android SDK(like api19 or newer).Please send your project to me. My email is [email protected]. thanks!!

@phhusson
Copy link

Perhaps stop talking about my fork in this bug tracker, rather use mine, and open specific issues.

@jeekajoo
Copy link

@phhusson problem is that we can't report issue in your fork :) I can't see issue tab

@phhusson
Copy link

Oh thanks. Fixed.

@unforgettableid
Copy link
Author

To get to the phhusson/Superuser issue tracker, simply follow this link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants