Skip to content

Commit

Permalink
Merge pull request #29 from KuhakuPixel/feature
Browse files Browse the repository at this point in the history
Finished initial version of Apk
  • Loading branch information
KuhakuPixel authored Jun 1, 2023
2 parents 218ed2e + e419836 commit d7fd3a5
Show file tree
Hide file tree
Showing 34 changed files with 726 additions and 320 deletions.
8 changes: 4 additions & 4 deletions ACE/engine/intro.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
R"(
ACE Engine, a game hacking tools for linux and android
ACE Engine, a game hacking tool for linux and android

Copyright (C) 2022 AceEngineSoftware@gmail.com
Copyright (C) 2023 AceEngineSoftware@gmail.com
Author: Kuhaku Pixel (https://github.com/KuhakuPixel)

For update news, feature request and discussion regarding
For update news, features request and discussions regarding
Ace Engine
Discord Server: https://discord.com/invite/MhrFwpYm
Discord Server: https://discord.gg/8fJh9tPVXb
================= IMPORTANT ==============================
before using this software type `license` command and enter
to view the license of the software.
Expand Down
6 changes: 3 additions & 3 deletions ACE/engine/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void ace_main() {
// display_icon();
if (getuid() != 0) {
frontend_print(
"Device not rooted, without root most feautres will be broken\n");
"Device not rooted, without root most features will be broken\n");
} else {
frontend_print("You are rooted, all feautres will work\n");
frontend_print("You are rooted, all features will work\n");
}

display_intro();
Expand All @@ -112,7 +112,7 @@ void attach_pid_cmd_handler(int pid, int port) {

int main(int argc, char **argv) {
/* parse args passed to program*/
CLI::App main_app{"ACE Engine, a game hacking tools for linux and android\n"
CLI::App main_app{"ACE Engine, a game hacking tool for linux and android\n"
"By Kuhaku Pixel"};

//
Expand Down
2 changes: 1 addition & 1 deletion ATG/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".ui.overlaybutton.service.FloatingService" />
<service android:name=".ui.overlay.service.FloatingService" />

</application>

Expand Down
19 changes: 9 additions & 10 deletions ATG/app/src/main/java/com/kuhakupixel/atg/ui/HackingScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.navigation.compose.rememberNavController
Expand All @@ -18,36 +15,38 @@ import com.kuhakupixel.atg.ui.menu.AddressTableMenu
import com.kuhakupixel.atg.ui.menu.MemoryMenu
import com.kuhakupixel.atg.ui.menu.ProcessMenu
import com.kuhakupixel.atg.ui.menu.SettingsMenu
import com.kuhakupixel.atg.ui.util.WarningDialog
import com.topjohnwu.superuser.Shell
import com.kuhakupixel.atg.ui.overlay.service.OverlayComposeUI.OverlayManager


@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun HackingScreen() {
fun HackingScreen(overlayManager: OverlayManager) {
val navController = rememberNavController()
var globalConf: GlobalConf = GlobalConf(LocalContext.current)


// ============================ each menu in bottom nav ===================
val menus = listOf(
BottomBarMenu(
route = "Process",
title = "Process",
iconId = R.drawable.ic_process,
content = { ProcessMenu(globalConf) },
content = { ProcessMenu(globalConf, overlayManager = overlayManager) },
),

BottomBarMenu(
route = "Memory",
title = "Memory",
iconId = R.drawable.ic_memory,
content = { MemoryMenu(globalConf) },
),
content = { MemoryMenu(globalConf, overlayManager = overlayManager) },

),

BottomBarMenu(
route = "Address Table",
title = "Address Table",
iconId = R.drawable.ic_table,
content = { AddressTableMenu(globalConf) },
content = { AddressTableMenu(globalConf, overlayManager = overlayManager) },
),

BottomBarMenu(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.MutableState
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.snapshots.SnapshotStateList
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
Expand All @@ -17,8 +14,8 @@ import com.kuhakupixel.atg.backend.ACE
import com.kuhakupixel.atg.backend.ACE.MatchInfo
import com.kuhakupixel.atg.backend.ACE.NumType
import com.kuhakupixel.atg.ui.GlobalConf
import com.kuhakupixel.atg.ui.overlay.service.OverlayComposeUI.OverlayManager
import com.kuhakupixel.atg.ui.util.CreateTable
import com.kuhakupixel.atg.ui.util.InputValueDialog

class AddressInfo(val matchInfo: MatchInfo, val numType: NumType) {
}
Expand All @@ -30,7 +27,7 @@ fun AddressTableAddAddress(matchInfo: MatchInfo, numType: NumType) {
}

@Composable
fun AddressTableMenu(globalConf: GlobalConf?) {
fun AddressTableMenu(globalConf: GlobalConf?, overlayManager: OverlayManager?) {

val ace: ACE = globalConf!!.getAce()
Column(
Expand All @@ -44,10 +41,17 @@ fun AddressTableMenu(globalConf: GlobalConf?) {
.weight(0.8f)
.padding(16.dp),
savedAddressList = savedAddresList,
ace = ace
ace = ace,
onAddressClicked = { address: String ->
overlayManager!!.InputDialog(
title = "Edit value of $address",
onConfirm = { input: String ->

ace.WriteValueAtAddress(address, input)
}
)
}
)

}
}

Expand All @@ -56,21 +60,17 @@ fun SavedAddressesTable(
modifier: Modifier = Modifier,
savedAddressList: SnapshotStateList<AddressInfo>,
ace: ACE,
onAddressClicked: (address: String) -> Unit
) {

var address: MutableState<String> = remember { mutableStateOf("") }
var showWriteToAddressDialog: MutableState<Boolean> = remember { mutableStateOf(false) }

CreateTable(
modifier = modifier,
colNames = listOf("Address", "Value Type", "Value"),
colWeights = listOf(0.3f, 0.3f, 0.3f),
itemCount = savedAddressList.size,
minEmptyItemCount = 50,
onRowClicked = { rowIndex: Int ->
address.value = savedAddressList[rowIndex].matchInfo.address
showWriteToAddressDialog.value = true

onAddressClicked(savedAddressList[rowIndex].matchInfo.address)
},
drawCell = { rowIndex: Int, colIndex: Int, cellModifier: Modifier ->
if (colIndex == 0) {
Expand All @@ -86,20 +86,11 @@ fun SavedAddressesTable(
}
)

if (showWriteToAddressDialog.value) {
InputValueDialog(
title = "Edit value of ${address.value}",
onClose = { showWriteToAddressDialog.value = false },
onConfirm = { inputValue: String ->
ace.WriteValueAtAddress(address.value, inputValue)
},
)
}

}

@Composable
@Preview
fun AddressTablePreview() {
AddressTableMenu(null)
AddressTableMenu(null, null)
}
7 changes: 3 additions & 4 deletions ATG/app/src/main/java/com/kuhakupixel/atg/ui/menu/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import com.kuhakupixel.atg.ui.GlobalConf
import com.kuhakupixel.atg.ui.overlaybutton.INTENT_COMMAND
import com.kuhakupixel.atg.ui.overlaybutton.INTENT_COMMAND_OVERLAY_BUTTON_CREATE
import com.kuhakupixel.atg.ui.overlaybutton.service.FloatingService
import com.kuhakupixel.atg.ui.overlay.INTENT_COMMAND
import com.kuhakupixel.atg.ui.overlay.INTENT_COMMAND_OVERLAY_BUTTON_CREATE
import com.kuhakupixel.atg.ui.overlay.service.FloatingService
import com.kuhakupixel.atg.ui.util.ConfirmDialog
import com.kuhakupixel.atg.ui.util.InfoDialog


@Composable
Expand Down
Loading

0 comments on commit d7fd3a5

Please sign in to comment.