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

Moved the exploit from UI thread to its own thread (among other changes) #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

natinusala
Copy link

@natinusala natinusala commented May 1, 2018

I moved the exploit to an AsyncTask in USBHandlerActivity - it uses a weak reference to the activity to prevent leaks.

This unlocks the UI thread and allowed me to add a little bit of magic when running the exploit
(∩ ͡° ͜ʖ ͡°)⊃━☆゚

Be warned that I noticed an exploit success rate of ~50% when using the app (failures to send payload, black screens, corrupted payloads), I don't know if it comes from the changes I made or not.

I also took the liberty to :

  • move every hardcoded string into string resources so that the app can be easily translated (if you want a baguette translation ask me)
  • replace some hardcoded strings to Java constants (like the Logger intent action string for instance)
  • fix all the warnings (I think)

I let you try my fork and tell me what you think of those changes ! Don't forget to update the README if merging.

@DavidBuchanan314
Copy link
Owner

DavidBuchanan314 commented May 1, 2018

Thanks for the contribution :)

First commit looks good.

I don't really like the log messages being stored in strings.xml, personally I find them useful when reading the code to see what's going on. (I know this isn't really considered best practise).

editor.commit();
Logger.log(this, "[*] Payload reset to default (fusee.bin)");
editor.remove(PREFERENCE_PAYLOAD_NAME);
editor.apply();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure apply() works properly? I think I had issues with synchronisation between Activities when I tried it, although maybe that is fixed with MODE_MULTI_PROCESS. (i.e. the changes would not get picked up by the usb handler activity until the app was relaunched)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that when editing the code - I will put commit back

@natinusala
Copy link
Author

Well it's as you want - I don't know if you saw but Android Studio replaces the getString in the code by the actual string behind : https://puu.sh/Ae3aK/5a4de8e34e.png

@DavidBuchanan314
Copy link
Owner

@natinusala ah ok, in that case the strings are good :)

I'm kinda busy right now, but I'll get this tested and merged soon

@Dreamersoul
Copy link

If I am going to make changes should I pull from this PR or work on the master?

@UInt2048
Copy link

UInt2048 commented Feb 17, 2020

I'm kinda busy right now, but I'll get this tested and merged soon

@DavidBuchanan314 How was "soon" going? It's been 1.5 years, and some merge conflicts!

@deathzombee
Copy link

Probably more interesting things for them came up, and this app gets the job done alright enough to move along the exploit chain. If you want to work on it fork it, and start your own builds. Github project evolution pretty much c'est la vie.

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

Successfully merging this pull request may close these issues.

None yet

5 participants