Skip to content

Commit e32e3e0

Browse files
committed
Tweak for use with ADB launch
1 parent 7c2da99 commit e32e3e0

5 files changed

Lines changed: 84 additions & 84 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
jcenter()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:3.2.1'
7+
classpath 'com.android.tools.build:gradle:3.5.0-alpha06'
88
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
99
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
1010
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Nov 09 13:15:43 CET 2018
1+
#Wed Apr 17 14:06:41 EDT 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip

librootjava/build.gradle

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.library'
2-
apply plugin: 'com.github.dcendents.android-maven'
3-
apply plugin: 'com.jfrog.bintray'
2+
//apply plugin: 'com.github.dcendents.android-maven'
3+
//apply plugin: 'com.jfrog.bintray'
44

55
android {
66
compileSdkVersion 26
@@ -65,78 +65,78 @@ ext {
6565
bintrayName = artifact
6666
}
6767

68-
task installMavenLocal(type: Upload) {
69-
repositories.mavenInstaller {
70-
configuration = configurations['archives']
71-
pom.project {
72-
packaging 'aar'
73-
groupId = publishedGroupId
74-
artifactId = artifact
75-
version = libraryVersion + '-SNAPSHOT'
76-
}
77-
}
78-
}
68+
//task installMavenLocal(type: Upload) {
69+
// repositories.mavenInstaller {
70+
// configuration = configurations['archives']
71+
// pom.project {
72+
// packaging 'aar'
73+
// groupId = publishedGroupId
74+
// artifactId = artifact
75+
// version = libraryVersion + '-SNAPSHOT'
76+
// }
77+
// }
78+
//}
7979

8080
// Workaround bintray bug ignoring these from pom and bintray settings
8181
version = libraryVersion
8282
group = publishedGroupId
8383

84-
bintray {
85-
Properties properties = new Properties()
86-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
87-
user = properties.getProperty('bintray.user')
88-
key = properties.getProperty('bintray.apikey')
89-
90-
configurations = ['archives']
91-
dryRun = false
92-
publish = true
93-
pkg {
94-
repo = bintrayRepo
95-
name = libraryName
96-
desc = libraryDescription
97-
websiteUrl = siteUrl
98-
issueTrackerUrl = issueTrackerUrl // doesn't actually work?
99-
vcsUrl = gitUrl
100-
//githubRepo = gitUrl // some more bintray weirdness here, breaks upload
101-
//githubReleaseNotesFile = 'README.md'
102-
licenses = allLicenses
103-
publicDownloadNumbers = true
104-
version {
105-
name = libraryVersion
106-
released = new Date()
107-
}
108-
}
109-
}
110-
111-
install {
112-
repositories.mavenInstaller {
113-
pom.project {
114-
packaging 'aar'
115-
groupId = publishedGroupId
116-
artifactId = artifact
117-
name libraryName
118-
version = libraryVersion
119-
url siteUrl
120-
licenses {
121-
license {
122-
name licenseName
123-
url licenseUrl
124-
}
125-
}
126-
developers {
127-
developer {
128-
id developerId
129-
name developerName
130-
email developerEmail
131-
}
132-
}
133-
scm {
134-
connection gitUrl
135-
developerConnection gitUrl
136-
url gitUrl
137-
}
138-
}
139-
}
140-
}
141-
142-
bintrayUpload.dependsOn install
84+
//bintray {
85+
// Properties properties = new Properties()
86+
// properties.load(project.rootProject.file('local.properties').newDataInputStream())
87+
// user = properties.getProperty('bintray.user')
88+
// key = properties.getProperty('bintray.apikey')
89+
//
90+
// configurations = ['archives']
91+
// dryRun = false
92+
// publish = true
93+
// pkg {
94+
// repo = bintrayRepo
95+
// name = libraryName
96+
// desc = libraryDescription
97+
// websiteUrl = siteUrl
98+
// issueTrackerUrl = issueTrackerUrl // doesn't actually work?
99+
// vcsUrl = gitUrl
100+
// //githubRepo = gitUrl // some more bintray weirdness here, breaks upload
101+
// //githubReleaseNotesFile = 'README.md'
102+
// licenses = allLicenses
103+
// publicDownloadNumbers = true
104+
// version {
105+
// name = libraryVersion
106+
// released = new Date()
107+
// }
108+
// }
109+
//}
110+
111+
//install {
112+
// repositories.mavenInstaller {
113+
// pom.project {
114+
// packaging 'aar'
115+
// groupId = publishedGroupId
116+
// artifactId = artifact
117+
// name libraryName
118+
// version = libraryVersion
119+
// url siteUrl
120+
// licenses {
121+
// license {
122+
// name licenseName
123+
// url licenseUrl
124+
// }
125+
// }
126+
// developers {
127+
// developer {
128+
// id developerId
129+
// name developerName
130+
// email developerEmail
131+
// }
132+
// }
133+
// scm {
134+
// connection gitUrl
135+
// developerConnection gitUrl
136+
// url gitUrl
137+
// }
138+
// }
139+
// }
140+
//}
141+
142+
//bintrayUpload.dependsOn install

librootjava/src/main/java/eu/chainfire/librootjava/RootIPC.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public TimeoutException(String message) {
4242
}
4343
}
4444

45-
private final String packageName;
46-
private final IBinder userIPC;
47-
private final int code;
45+
protected final String packageName;
46+
protected final IBinder userIPC;
47+
protected final int code;
4848

4949
private final Object helloWaiter = new Object();
5050
private final Object byeWaiter = new Object();
@@ -84,7 +84,7 @@ public RootIPC(String packageName, IBinder ipc, int code, int connection_timeout
8484
this.packageName = packageName;
8585
userIPC = ipc;
8686
this.code = code;
87-
broadcastIPC();
87+
// broadcastIPC();
8888

8989
if (connection_timeout_ms < 0) connection_timeout_ms = 30 * 1000;
9090
if (connection_timeout_ms > 0) {
@@ -239,7 +239,7 @@ private Connection getConnection(IBinder.DeathRecipient deathRecipient) {
239239
* Our own wrapper around the supplied Binder interface, which allows us to keep track of
240240
* non-root process' state and connection state.
241241
*/
242-
private final IBinder binder = new IRootIPC.Stub() {
242+
protected final IBinder binder = new IRootIPC.Stub() {
243243
@Override
244244
public void hello(IBinder self) {
245245
// incoming connection from the non-root process

librootjava/src/main/java/eu/chainfire/librootjava/RootIPCReceiver.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ public abstract class RootIPCReceiver<T> {
7272
*/
7373
public abstract void onDisconnect(T ipc);
7474

75-
static final String BROADCAST_ACTION = "eu.chainfire.librootjava.RootIPCReceiver.BROADCAST";
76-
static final String BROADCAST_EXTRA = "eu.chainfire.librootjava.RootIPCReceiver.BROADCAST.EXTRA";
77-
static final String BROADCAST_BINDER = "binder";
78-
static final String BROADCAST_CODE = "code";
75+
public static final String BROADCAST_ACTION = "eu.chainfire.librootjava.RootIPCReceiver.BROADCAST";
76+
public static final String BROADCAST_EXTRA = "eu.chainfire.librootjava.RootIPCReceiver.BROADCAST.EXTRA";
77+
public static final String BROADCAST_BINDER = "binder";
78+
public static final String BROADCAST_CODE = "code";
7979

8080
private final HandlerThread handlerThread;
8181
private final Handler handler;

0 commit comments

Comments
 (0)