Jump to content

[Android] LibInjector (Write Mods To An App At Runtime)


Jbro129

342 posts in this topic

Recommended Posts

On 7/4/2018 at 11:40 AM, TheArmKing said:

 

Alright so now that main activity goes under /androidinject right. And Also i noticed that its written /lib/libil2cpp.so but under /lib there is no il2cpp.so, there are folders like armv7 and x86 so should it be /lib/armv7/il2cpp.so

No, the path is relative to the phone's internal data, not to the apk and  it's correct.

On 7/4/2018 at 1:47 AM, AlphaSpark said:

@Sbenny@TheArmKing I built the missing file (MainActivity) from the source. Gonna have to put it on pastebin >>> https://pastebin.com/NDt798RY

So kind of you, thank you so much!

Link to comment
Share on other sites

We're close. 

 

On my side, the game launches, but I can easily notice from the logs that something went wrong as it didn't inject anything.

 

java.io.FileNotFoundException: /data/app-lib/com.example/libexample.so: open failed: EACCES (Permission denied)

 

It looks like the game doesn't have the required permissions to write to that path, (I replaced the folder and the file name in the example above, but the path is correct) so the game simply runs without injecting into the lib.

 

Once again, thanks to @AlphaSpark for his help which helped us a lot. Hopefully we'll soon make this script work properly!

Updated by Sbenny
Link to comment
Share on other sites

On 7/5/2018 at 8:25 PM, Sbenny said:

We're close. 

 

On my side, the game launches, but I can easily notice from the logs that something went wrong as it didn't inject anything.

 

java.io.FileNotFoundException: /data/app-lib/com.example/libexample.so: open failed: EACCES (Permission denied)

 

It looks like the game doesn't have the required permissions to write to that path, (I replaced the folder and the file name in the example above, but the path is correct) so the game simply runs without injecting into the lib.

 

Once again, thanks to @AlphaSpark for his help which helped us a lot. Hopefully we'll soon make this script work properly!

Try adding this to manifest.xml:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

 

Probably useless, but hey.

Link to comment
Share on other sites

On 7/7/2018 at 10:43 PM, Ted2 said:

Try adding this to manifest.xml:


<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

 

Probably useless, but hey.

Thanks for the help, but I spent over 48 hours try to find a solution and this has been one of the first ideas I had, unfortunately it didn't work. (the concept is right, as WRITE_EXTERNAL_STORAGE gives the app permissions to write also in the Internal Storage, as soon as the files you're dealing with are app's internal files, but unfortunately this doesn't seem to fix the issue for some reasons)

 

I guess the smali code is lacking some kind of permissions check before executing the commands which probably caused the issue I experienced.

Link to comment
Share on other sites

4 minutes ago, Sbenny said:

Thanks for the help, but I spent over 48 hours try to find a solution and this has been one of the first ideas I had, unfortunately it didn't work. (the concept is right, as WRITE_EXTERNAL_STORAGE gives the app permissions to write also in the Internal Storage, as soon as the files you're dealing with are app's internal files, but unfortunately this doesn't seem to fix the issue for some reasons)

 

I guess the smali code is lacking some kind of permissions check before executing the commands which probably caused the issue I experienced.

The thing is, you shouldn't be able to access data folder without root. HOWEVER if you access it from your own app, you shoul be able to. His code, is pasted inside the original app, so it SHOULD work. But f*** knows why it doesn't. I've tried it too, with my own code. But without any luck.

  • Like 1
Link to comment
Share on other sites

21 minutes ago, Sbenny said:

I'm glad to see many people interested in this thread, hopefully the author will "enlighten" us soon as it looks like I'm not the only one having issues :)

 

Thanks for the help, @Ted2 and good luck!

He said he had to fix it to me, but he never said if he was gonna fix it or when he will :p

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines