Getting AllShare Cast working on modified devices

TheCyber

Member
Jun 19, 2008
15
0
0
Well, i've hacked libWFD_ENGINE.so some time ago for my own needs. The way i've able to make it work only by disabling HDCP. So, this hacked version uses clear data without HDCP to talk with AllShareCast dongle.
I don't know if generic miracast dongles will accept data without HDCP as i don't have such device.

Included version for I9500 works with I9500XWUBMG1, I9500XXUBMG9, I9500UBUBMH1. Probably, it's compatible with other firmware versions.

P.S.: Since it's developers forum, you should know how to replace the file.
P.P.S: You can use this patched version in any ROM you want, but please give a credit to me.
My tv use Miracast and my S4 not work with this patch... please help me :(
 

mrmrmrmr

Senior Member
Jan 14, 2007
2,533
251
0
Hi,

I had made the patch for Note8 successfully but with the recent update to the S3 (4.3) , my S3 had the same issue.

Unfortunately I can't find the pattern for the 3rd patch in the lib file.
Can anyone help with this ?
 

yrv_13

Senior Member
Feb 1, 2011
117
31
0
Is it flashable and does It works on GTN 7100?
Edit: im sorry. What i meant to ask was if it works on GT-N7100 stock 4.1. But i already tried and it does not.
Sent from my GT-N7100
 
Last edited:

mrmrmrmr

Senior Member
Jan 14, 2007
2,533
251
0
@MohammadAG , you've done a great job by updating the first post. Thanks.
I believe we should refer to this thread from device specific threads because there are many users who are using modified roms and have no solution for Allshare Cast dongle issues...
 
  • Like
Reactions: alexdr1 and mazbot

yrv_13

Senior Member
Feb 1, 2011
117
31
0
Hello again, I have this mod installed On Ditto Rom V3 hoping It would work but it didnt. now im getting an error msg telling me TV does not support screen mirroring. Is there Any work around? tv is a Samsung Smart C5 Series

Sent from my GT-N7100 using XDA Premium 4 mobile app
 

Ricky Divjakovski

Recognized Developer / Recognized Contributor
Feb 4, 2013
5,214
7,595
263
25
Sydney
I've thought Cydia Substrate gives something special, but after quick look i've found it providing not more than XPosed already provides. You cannot make patch for this using Cydia Substrate because the only thing you can do by this is to hook JNI functions called from Dalvik code (you can do the same in Xposed). You cannot hook internal lib functions where the "magic" happens.
The only way is to replace the whole lib i've provided so far.
thats pretty obvious no offence to anyone who thought different,if you read the cydia substrate is basically xposed in a different form, if you read up on xposed it modifies app_processes file file to allow you to modify code through the dalvik(thats how i added xposed with preinstalled modules in one of my roms), cydia substrate works somewhat the same as i understand? but patching C++ in no easy task at all :( im not sure if we will ever be able to do that without actually touching the actual file itself..
 

da.trute

Senior Member
Jul 22, 2011
770
110
0
Hi, I am wondering what it would take to extend this to other devices and maybe even make an app. I have a tesco HUDL which I bought as a present for someone for xmas, they have a brand new samaung TV, it would be great to get this working. After enabling screen mirroring on the HUDL it tried to connected and exhibited identical problems as my S3 did before this fix, it connected then dropped reporting a hardware problem. This suggests to me this fix could work for any device with wifi direct screen mirroring.

What is required to write a fix for the HUDL, what changes need to be made to the S3 fix?
 

studentjunk

Senior Member
Sep 24, 2007
640
201
0
I don't know about the hudl. This method circumvents the security checks the app uses. So it needs to initially work on the unrooted device. Decompiling the lib files and searching for the modifications mentioned might be enough to extend to other Samsung devices. All of the details are above my head. Otherwise I would have tackled it already.

Sent from my SPH-L710 using Tapatalk
 

madmike593

Member
Jan 16, 2011
30
3
0
London
Hi all,

Im having a similar issue with allshare cast myself and was wandering if anyone can help.

Firstly when i select the screen mirroring quick toggle my settings immediately FC. I can however access the screen mirroring options direct from the settings menu, i am able to connect to the dongle for about 3-4 seconds then it disconnects itself.

Im running 4.3 rooted but on stock kernel, the logcat for the toggle error is below:

D/STATUSBAR-AllShareCastQuickSettingButton( 2781): onClick() - state : true
D/STATUSBAR-AllShareCastQuickSettingButton( 2781): WFD activate
E/AndroidRuntime(15827): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.wfd.WfdPickerDialog}: android.content.res.Resources$NotFoundException: File res/raw/allshare_confirm.ogg from drawable resource ID #0x7f080000
E/AndroidRuntime(15827): Caused by: android.content.res.Resources$NotFoundException: File res/raw/allshare_confirm.ogg from drawable resource ID #0x7f080000

I would really appreciate it if anyone can help me out.

Thanks

Mike
 

mrmrmrmr

Senior Member
Jan 14, 2007
2,533
251
0
Hi,

I keep receiving PMs saying "how did you do it?" about the patch.
First of all, I am not the developer who made this patch. I am just copying modifications made by him.

Here is a short description of steps to follow if you want to do the same for other devices:

1. download and install IDA Pro
2. download and install WinHEx
3. download and install any text compare util
4. Open patched and unpatched version lib file of the same device (any device) with IDA
5. get text output of both files to the text compare utility
6. find the 3 differences. analyze where they are in the file (look for seacrhable text patterns)
7. open YOUR device's unpacthed lib file with IDA pro
8. find the correspondances found on step 6 in your own file.
9. note the line number (hex address) of each 3 correspondances
10. now open all 3 files on Winhex
11. jump to the noted hex addresses and change the bytes according to the difference of 2 files of the same device.
12. make the change on your own file and save.

I hope it helps some of you..