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

Starting the Main #12

Closed
carlfm01 opened this issue Oct 8, 2017 · 2 comments
Closed

Starting the Main #12

carlfm01 opened this issue Oct 8, 2017 · 2 comments

Comments

@carlfm01
Copy link

carlfm01 commented Oct 8, 2017

How I can start the main and get the methods by reflectiong to start injecting events?

@omerjerk
Copy link
Owner

omerjerk commented Oct 11, 2017

Copying the email here in case someone wants the answer -

I'm assuming you read my blog post before emailing me. The command to start Main class is already listed in my other blog post -
https://omerjerk.in/index.php/2015/10/16/execute-android-java-code-as-a-root-user/

It's basically as follows:

su -c "CLASSPATH=/data/app/in.omerjerk.remotedroid.app/base.apk /system/bin/app_process32 /system/bin in.omerjerk.remotedroid.app.Main optionalArgs"

In my case, I needed to execute the code as root. However, if you just need to create touch events, you can replace su with sh. If you are starting your Main class from outside using adb, you can do the following -

adb shell <above command>

@carlfm01
Copy link
Author

carlfm01 commented Oct 11, 2017

Thanks @omerjerk It worked, I just removed the 32 from app_process.

Get the CLASSPATH by running adb shell pm path {package name}

My command without root looks like
adb shell sh -c 'CLASSPATH=/data/app/neoxzim.com.adbtest-1.apk /system/bin/app_process /system/bin neoxzim.com.adbtest.Main'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants