NXLoader icon indicating copy to clipboard operation
NXLoader copied to clipboard

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

Open natinusala opened this issue 6 years ago • 6 comments

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.

natinusala avatar May 01 '18 13:05 natinusala

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).

DavidBuchanan314 avatar May 01 '18 16:05 DavidBuchanan314

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

natinusala avatar May 01 '18 16:05 natinusala

@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

DavidBuchanan314 avatar May 01 '18 19:05 DavidBuchanan314

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

Dreamersoul avatar May 15 '18 05:05 Dreamersoul

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!

UInt2048 avatar Feb 17 '20 16:02 UInt2048

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.

deathzombee avatar Apr 04 '20 04:04 deathzombee