Skip to content

Commit

Permalink
Merge branch 'master' into playstore
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuele-f committed Oct 15, 2024
2 parents 7722c7d + caced7d commit e061f66
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Releases available at https://github.com/emanuele-f/PCAPdroid/releases

## [1.7.4] - 2024-10-16
- Fix root capture start in some non-magisk su binaries (credits: jackyzy823)
- The mitm addon now uses mitmproxy 11
- Include the package name in the CSV output (credits: Chris Vanstone)

## [1.7.3] - 2024-09-07
- Allow setting the app language from the system (for Android 13+)
- Mitm addon v1.2: allow public files write, fix enabled addons reset, fix addons reload
Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ android {
minSdkVersion 21
compileSdk 34
targetSdk 34
versionCode 76
versionName "1.7.3"
versionCode 77
versionName "1.7.4"

// only include full translations
// NOTE: keep in sync with locales_config.xml
Expand Down Expand Up @@ -90,12 +90,12 @@ dependencies {
// AndroidX
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.fragment:fragment:1.8.2'
implementation 'androidx.fragment:fragment:1.8.4'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation "androidx.navigation:navigation-fragment:2.7.7"
implementation "androidx.navigation:navigation-ui:2.7.7"
implementation "androidx.navigation:navigation-fragment:2.8.2"
implementation "androidx.navigation:navigation-ui:2.8.2"

// Google
implementation 'com.google.android.material:material:1.12.0'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/emanuelef/remote_capture/MitmAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
import java.lang.ref.WeakReference;

public class MitmAddon {
public static final long PACKAGE_VERSION_CODE = 19;
public static final String PACKAGE_VERSION_NAME = "1.2";
public static final long PACKAGE_VERSION_CODE = 20;
public static final String PACKAGE_VERSION_NAME = "1.3";
public static final String REPOSITORY = "https://github.com/emanuele-f/PCAPdroid-mitm";
private static final String TAG = "MitmAddon";
private final Context mContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ public String dumpConnectionsCsv() {
builder.append(conn.dst_port); builder.append(",");
builder.append(conn.uid); builder.append(",");
builder.append((app != null) ? app.getName() : ""); builder.append(",");
builder.append((app != null) ? app.getPackageName() : ""); builder.append(",");
builder.append(conn.l7proto); builder.append(",");
builder.append(conn.getStatusLabel(mContext)); builder.append(",");
builder.append((conn.info != null) ? conn.info : ""); builder.append(",");
Expand Down
17 changes: 16 additions & 1 deletion app/src/main/jni/common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,22 @@ int start_subprocess(const char *prog, const char *args, bool as_root, int* out_

close(in_p[0]);

// write "su" command input
// write "su"/"sh" command input
if(as_root) {
// Some su implementations (e.g. Android-x86) change the PWD when activated,
// cd to the cache dir to ensure that the UNIX socket can be found by pcapd
char* cwd = getcwd(NULL, 0);
if (cwd) {
log_d("start_subprocess[%d]: cd %s", pid, cwd);
write(in_p[1], "cd \"",4);
write(in_p[1], cwd, strlen(cwd));
write(in_p[1], "\"\n", 2);
free(cwd);
} else
log_w("start_subprocess[%d]: getcwd failed[%d]: %s - non-magisk 'su' may fail",
pid, errno, strerror(errno));
}

log_d("start_subprocess[%d]: %s %s", pid, prog, args);
write(in_p[1], prog, strlen(prog));
write(in_p[1], " ", 1);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- App icon by <a href="https://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">flaticon</a>\n\n
- SourceCodePro font: <a href="https://github.com/adobe-fonts/source-code-pro/blob/release/LICENSE.md">OFL-1.1</a>\n\n
</string>
<string name="connections_csv_fields" translatable="false">IPProto,SrcIP,SrcPort,DstIp,DstPort,UID,App,Proto,Status,Info,BytesSent,BytesRcvd,PktsSent,PktsRcvd,FirstSeen,LastSeen</string>
<string name="connections_csv_fields" translatable="false">IPProto,SrcIP,SrcPort,DstIp,DstPort,UID,App,PackageName,Proto,Status,Info,BytesSent,BytesRcvd,PktsSent,PktsRcvd,FirstSeen,LastSeen</string>
<string name="unlock_token" translatable="false">Unlock token</string>
<!-- Localized -->
<string name="start_button">Start</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- App icon by <a href="https://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">flaticon</a>\n\n
- SourceCodePro font: <a href='https://github.com/adobe-fonts/source-code-pro/blob/release/LICENSE.md'>OFL-1.1</a>\n\n
</string>
<string name="connections_csv_fields" translatable="false">IPProto,SrcIP,SrcPort,DstIp,DstPort,UID,App,Proto,Status,Info,BytesSent,BytesRcvd,PktsSent,PktsRcvd,FirstSeen,LastSeen</string>
<string name="connections_csv_fields" translatable="false">IPProto,SrcIP,SrcPort,DstIp,DstPort,UID,App,PackageName,Proto,Status,Info,BytesSent,BytesRcvd,PktsSent,PktsRcvd,FirstSeen,LastSeen</string>
<string name="unlock_token" translatable="false">Unlock token</string>

<!-- Localized -->
Expand Down

0 comments on commit e061f66

Please sign in to comment.