forked from BryanGIG/PADumper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 86ac917
Showing
73 changed files
with
1,656 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build Debug APK | ||
run: ./gradlew assembleDebug | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: apk-debug | ||
path: app/build/outputs/apk/debug/app-debug.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea | ||
app/release | ||
app/keystore.jks | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# PAD (Process Android Dumper) | ||
This dumper is made for il2cpp game but you can use it in any app you want | ||
|
||
## How To Use | ||
- Run the process | ||
- Open PADumper | ||
- Put process name manually or you can click `Select Apps` to select running apps | ||
- Put the ELF Name or you can leave it with default name `libil2cpp.so` | ||
|
||
- [**Optional**] UnCheck `Check flag address` if you want to skip check address permission (**r-xp**) | ||
- [**Optional**] Check `Fix ELF` if you want fix the ELF | ||
- [**Optional**] Check `global-metadata.dat` if you want dump unity metadata from memory | ||
- Dump and wait until finish | ||
- Result will be in `/sdcard/PADumper/[Process]/[startAddress-endAddress-file]` | ||
|
||
## Credits | ||
- [**libsu**](https://github.com/topjohnwu/libsu) | ||
- [**SoFixer**](https://github.com/F8LEFT/SoFixer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
id 'kotlin-parcelize' | ||
} | ||
|
||
android { | ||
compileSdk 33 | ||
namespace "com.dumper.android" | ||
|
||
defaultConfig { | ||
applicationId "com.dumper.android" | ||
minSdk 21 | ||
targetSdk 33 | ||
versionCode 1 | ||
versionName "0.0.1" | ||
} | ||
|
||
signingConfigs { | ||
debug { | ||
storeFile file("keystore.jks") | ||
keyAlias "PADumper" | ||
storePassword "012345" | ||
keyPassword "012345" | ||
} | ||
release { | ||
storeFile file("keystore.jks") | ||
keyAlias "PADumper" | ||
storePassword "012345" | ||
keyPassword "012345" | ||
} | ||
} | ||
|
||
buildTypes { | ||
debug { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
signingConfig signingConfigs.debug | ||
} | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
signingConfig signingConfigs.release | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_11 | ||
targetCompatibility JavaVersion.VERSION_11 | ||
} | ||
|
||
buildFeatures { | ||
viewBinding true | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '11' | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
//Ui | ||
implementation 'androidx.core:core-ktx:1.9.0' | ||
implementation 'androidx.fragment:fragment-ktx:1.5.4' | ||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' | ||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1' | ||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1' | ||
implementation 'com.google.android.material:material:1.7.0' | ||
implementation "com.afollestad.material-dialogs:core:3.3.0" | ||
implementation 'androidx.navigation:navigation-fragment:2.5.2' | ||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2' | ||
|
||
//Root | ||
def libsuVersion = '5.0.3' | ||
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}" | ||
implementation "com.github.topjohnwu.libsu:service:${libsuVersion}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:name=".core.App" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:theme="@style/Theme.PADumper"> | ||
<activity | ||
android:name=".core.SplashActivity" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity android:name=".core.MainActivity" /> | ||
</application> | ||
|
||
</manifest> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.dumper.android.core | ||
|
||
import android.app.Application | ||
import android.content.Context | ||
import com.dumper.android.BuildConfig | ||
import com.topjohnwu.superuser.Shell | ||
|
||
class App : Application() { | ||
override fun attachBaseContext(base: Context?) { | ||
super.attachBaseContext(base) | ||
|
||
Shell.enableVerboseLogging = BuildConfig.DEBUG | ||
Shell.setDefaultBuilder( | ||
Shell.Builder.create().setFlags(Shell.FLAG_MOUNT_MASTER) | ||
) | ||
} | ||
|
||
} |
114 changes: 114 additions & 0 deletions
114
app/src/main/java/com/dumper/android/core/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
package com.dumper.android.core | ||
|
||
import android.content.Intent | ||
import android.content.Intent.ACTION_VIEW | ||
import android.net.Uri | ||
import android.os.* | ||
import android.view.Menu | ||
import android.view.MenuItem | ||
import androidx.activity.viewModels | ||
import androidx.appcompat.app.AppCompatActivity | ||
import androidx.navigation.fragment.NavHostFragment | ||
import androidx.navigation.ui.AppBarConfiguration | ||
import androidx.navigation.ui.setupActionBarWithNavController | ||
import androidx.navigation.ui.setupWithNavController | ||
import com.dumper.android.R | ||
import com.dumper.android.core.RootServices.Companion.IS_FIX_NAME | ||
import com.dumper.android.core.RootServices.Companion.IS_FLAG_CHECK | ||
import com.dumper.android.core.RootServices.Companion.LIBRARY_DIR_NAME | ||
import com.dumper.android.core.RootServices.Companion.LIST_FILE | ||
import com.dumper.android.core.RootServices.Companion.MSG_DUMP_PROCESS | ||
import com.dumper.android.core.RootServices.Companion.MSG_GET_PROCESS_LIST | ||
import com.dumper.android.core.RootServices.Companion.PROCESS_NAME | ||
import com.dumper.android.databinding.ActivityMainBinding | ||
import com.dumper.android.dumper.Fixer | ||
import com.dumper.android.messager.MSGConnection | ||
import com.dumper.android.messager.MSGReceiver | ||
import com.dumper.android.ui.console.ConsoleViewModel | ||
import com.topjohnwu.superuser.ipc.RootService | ||
|
||
class MainActivity : AppCompatActivity() { | ||
lateinit var binding: ActivityMainBinding | ||
|
||
var remoteMessenger: Messenger? = null | ||
private val receiver = Messenger(Handler(Looper.getMainLooper(), MSGReceiver(this))) | ||
private lateinit var dumperConnection: MSGConnection | ||
|
||
val console: ConsoleViewModel by viewModels() | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
binding = ActivityMainBinding.inflate(layoutInflater) | ||
setContentView(binding.root) | ||
setNavigationController() | ||
initService() | ||
} | ||
|
||
private fun setNavigationController() { | ||
|
||
val navController = | ||
binding.navHostFragmentActivityMain.getFragment<NavHostFragment>().navController | ||
|
||
val appBarConfiguration = | ||
AppBarConfiguration(setOf(R.id.nav_memory_fragment, R.id.nav_console_fragment)) | ||
|
||
setupActionBarWithNavController(navController, appBarConfiguration) | ||
binding.navView.setupWithNavController(navController) | ||
} | ||
|
||
private fun initService() { | ||
Fixer.extractLibs(this) | ||
if (remoteMessenger == null) { | ||
dumperConnection = MSGConnection(this) | ||
val intent = Intent(applicationContext, RootServices::class.java) | ||
RootService.bind(intent, dumperConnection) | ||
} | ||
} | ||
|
||
fun sendRequestAllProcess() { | ||
val message = Message.obtain(null, MSG_GET_PROCESS_LIST) | ||
message.replyTo = receiver | ||
remoteMessenger?.send(message) | ||
} | ||
|
||
fun sendRequestDump( | ||
process: String, | ||
dump_file: Array<String>, | ||
autoFix: Boolean, | ||
flagCheck: Boolean | ||
) { | ||
val message = Message.obtain(null, MSG_DUMP_PROCESS) | ||
|
||
message.data.apply { | ||
putString(PROCESS_NAME, process) | ||
putStringArray(LIST_FILE, dump_file) | ||
putBoolean(IS_FLAG_CHECK, flagCheck) | ||
if (autoFix) { | ||
putBoolean(IS_FIX_NAME, true) | ||
putString(LIBRARY_DIR_NAME, "${filesDir.path}/SoFixer") | ||
} | ||
} | ||
|
||
message.replyTo = receiver | ||
remoteMessenger?.send(message) | ||
} | ||
|
||
override fun onCreateOptionsMenu(menu: Menu?): Boolean { | ||
super.onCreateOptionsMenu(menu) | ||
menuInflater.inflate(R.menu.appbar_menu, menu) | ||
return true | ||
} | ||
|
||
override fun onOptionsItemSelected(item: MenuItem): Boolean { | ||
super.onOptionsItemSelected(item) | ||
if (item.itemId == R.id.github) { | ||
startActivity( | ||
Intent( | ||
ACTION_VIEW, | ||
Uri.parse("https://github.com/BryanGIG/PADumper") | ||
) | ||
) | ||
} | ||
return true | ||
} | ||
} |
Oops, something went wrong.