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

Upgrade libsuperuser 1.0.0 -> 1.1.1 #370

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions primitiveFTPd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}

apply plugin: 'com.android.application'
Expand Down Expand Up @@ -98,7 +98,7 @@ dependencies {
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
implementation 'androidx.preference:preference:1.2.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'eu.chainfire:libsuperuser:1.0.0.201704021214'
implementation 'eu.chainfire:libsuperuser:1.1.1'
implementation 'org.apache.httpcomponents.client5:httpclient5:5.0'
implementation ('me.dm7.barcodescanner:zxing:1.9.8') {
exclude group: 'com.android.support'
Expand Down
15 changes: 12 additions & 3 deletions primitiveFTPd/src/org/primftpd/filesystem/RootFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,16 @@ public List<T> listFiles() {
final List<LsOutputBean> beans = new ArrayList<>();
shell.addCommand("ls -la " + escapePath(absPath), 0, new Shell.OnCommandLineListener() {
@Override
public void onLine(String s) {
public void onSTDOUT(String s) {
LsOutputBean bean = parser.parseLine(s);
if (bean != null) {
beans.add(bean);
}
}
@Override
public void onSTDERR(String s) {
}
@Override
public void onCommandResult(int i, int i1) {
}
});
Expand Down Expand Up @@ -340,7 +343,10 @@ protected boolean runCommand(String cmd) {
final Boolean[] wrapper = new Boolean[1];
shell.addCommand(cmd, 0, new Shell.OnCommandLineListener() {
@Override
public void onLine(String s) {
public void onSTDOUT(String s) {
}
@Override
public void onSTDERR(String s) {
}
@Override
public void onCommandResult(int i, int i1) {
Expand All @@ -358,11 +364,14 @@ protected String readCommandOutput(String cmd) {
public void onCommandResult(int i, int i1) {
}
@Override
public void onLine(String s) {
public void onSTDOUT(String s) {
if (s != null) {
sb.append(s);
}
}
@Override
public void onSTDERR(String s) {
}
});
shell.waitForIdle();
String result = sb.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ protected LsOutputBean findFinalLinkTarget(LsOutputBean bean, final LsOutputPars
while (tmp.isLink()) {
shell.addCommand("ls -lad \"" + tmp.getLinkTarget() + "\"", 0, new Shell.OnCommandLineListener() {
@Override
public void onLine(String s) {
public void onSTDOUT(String s) {
wrapper[0] = parser.parseLine(s);
}
@Override
public void onSTDERR(String s) {
}
@Override
public void onCommandResult(int i, int i1) {
}
});
Expand Down
Loading