• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[GUIDE] How to enable Chromecast Mirroring on Lollipop for the N7 2012

Search This thread

matt_runs_a_lot

New member
Dec 4, 2014
1
1
Still no luck on the 2012 Nexus 7

I know this isn't the place to be advertising my own stuff, but anyone who wants to test v7 of #MirrorEnabler (compatible with Lollipop), send me a PM and I'll send you a link.

R3pwn,

I installed your MirrorEnabler V7 (instead of using this code) and it does not seem to be working with my Nexus 7. Do all 3 options need to be enabled? Am I missing something else? Any help would be greatly appreciated!

---------- Post added at 05:46 AM ---------- Previous post was at 05:08 AM ----------

R3pwn,

I installed your MirrorEnabler V7 (instead of using this code) and it does not seem to be working with my Nexus 7. Do all 3 options need to be enabled? Am I missing something else? Any help would be greatly appreciated!

Never mind, I just did not enable the middle option and rebooted the Nexus 7 2012. It works now. Thanks
 
  • Like
Reactions: r3pwn

outcubus

Senior Member
Aug 25, 2011
115
18
followed the steps but when i cast i get - cast to chrome cast has ended after a few secs please help
Same here. The TV goes black and nothing happens. 1 second later my nexus shows a message telling me that "casting screen to Chromecast has ended" and my TV goes back to wallpaper. I've tried MirrorEnabler V7 app with no luck.

Sent from my Nexus 7 using Tapatalk
 

donpippo

Senior Member
Jan 6, 2012
141
20
Hi, I installed chromecast app yesterday
https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.app
version 1.9.7

Seems that is now supported
6ZPVBys.png
RNtfxJr.png

Just a warning message saying: your device is not optimized

Problem is that:
15Cci4J.png
D2J62NP.png

04tBqNq.png


from settings/drop down quick-menu/whatever doesn't work.
This hack enable settings/drop down quick-menu/ access?

thanks
 

JGoldz75

Senior Member
Jul 4, 2012
193
39
Noob Alert:
I'm trying this method because I would like to be able to access chromecast from the quicktile settings in lollipop.
However, once I access adb shell, I get all sorts of "blah blah not found" errors. See below:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
[email protected]:/ # [email protected]:/ $ su
[email protected]:/ $ su
/system/bin/sh: [email protected]:/: not found
127|[email protected]:/ # [email protected]:/ # setenforce 0
[email protected]:/ # setenforce 0
/system/bin/sh: [email protected]:/: not found
127|[email protected]:/ # [email protected]:/ $ su
[email protected]:/ # setenforce 0
[email protected]:/ # getenforce
Permissive
[email protected]:/ #[email protected]:/ $ su
/system/bin/sh: [email protected]:/: not found
127|[email protected]:/ # [email protected]:/ # setenforce 0
/system/bin/sh: [email protected]:/: not found
127|[email protected]:/ # [email protected]:/ # getenforce
/system/bin/sh: [email protected]:/: not found
127|[email protected]:/ # Permissive
/system/bin/sh: Permissive: not found
127|[email protected]:/ # [email protected]:/ # am force-stop com.google.android.gsf
per:/ #[email protected]:/ # am force-stop com.google.android.gsf
/system/bin/sh: [email protected]:/: not found

Is this because I'm using the minimal ADB and Fastboot tool instead of the full SDK package? What am I doing wrong here?

Edit: Nevermind. I'm just a silly goose.
 
Last edited:

donpippo

Senior Member
Jan 6, 2012
141
20
Hi, thanks for the guide. This is how I did it
All you need is a terminal emulator and sqlite3[1]
Code:
cd /sdcard/
cp /data/data/com.google.android.gsf/databases/gservices.db ./

su

sqlite3 gservices.db "insert into overrides (name, value) VALUES ('gms:cast:mirroring_enabled', 'true');"
sqlite3 gservices.db "insert into overrides (name, value) VALUES ('gms:cast:remote_display_enabled', 'true');"
sqlite3 gservices.db "select * from overrides;"

cp gservices.db /data/data/com.google.android.gsf/databases/gservices.db 

am force-stop com.google.android.gsf
am force-stop com.google.android.gms
am force-stop com.google.android.apps.chromecast.app

exit
I didn't use setenforce and it worked.

[1]You can find sqlite3 android PIE binary in /data/data/com.keramidas.TitaniumBackup/files/sqlite3 (you need titanium backup)

thanks.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    So this doesn't work outright on the new Lollipop build for the N7, but it can easily be made to work. Unfortunately the MirrorEnabler app doesn't work on Lollipop yet, and the SQLite Installer app that would make it work hasn't caught up; it installs a non-executable binary that even when set with the correct permissions doesn't run. Credit goes to @r3pwn for finding the initial method for doing this.

    UPDATE: MirrorEnabler had been updated for 5.0, and i've seen reports it works now. You can try it Here. Don't forget to thank @r3pwn if it works for you! Otherwise, this method still works, so take your pick. [emoji2]

    UPDATE 2: The update of the crhomecast app supposedly supports this natively now on ALL devices, so this may not even be needed anymore. If someone who has not applied this fix can test that out (Has to be chromcast v 1.9.6 or higher) and report back in this thread, that'd be great.

    So because I wanted my screen mirroring back, I dove in and made it work. Yes, there are 20 steps, but they are all outlined precisely. If done correctly this shouldn't take more than 5 minutes.

    Here's how:

    1) Be rooted on Android 5.0 (L)
    2) Install chromecast app from play store - Link
    3) Open the chromecast app and set up your chromecast device
    4) Install busybox (I prefer sterricson version) - Link
    5) Open Busybox app and click Install.
    6) Install SQLite Editor (not free, but works great on L and worth the money if you like to tinker) - Link
    7) get adb shell and issue the commands:
    Code:
    [email protected]:/ $ su
    [email protected]:/ # setenforce 0
    [email protected]:/ # getenforce
    Permissive
    [email protected]:/ #
    DO NOT EXIT ADB YET!
    8) Open SQLite Editor on your device and navigate to "Google Services Framework"
    9) Under google services Framework, select "gservices.db"
    10) In gservices.db select "overrides"
    11) Click "+ NEW RECORD"
    12) In the name field put (exactly as shown):
    Code:
    gms:cast:mirroring_enabled
    13) In the value field put (exactly as shown):
    Code:
    true
    14) Click Save
    15) Click "+ NEW RECORD" again
    16) In the name field put (exactly as shown):
    Code:
    gms:cast:remote_display_enabled
    17) In the value field put (exactly as shown):
    Code:
    true
    18) Click Save
    19) Exit SQLite Editor
    20) In your adb shell ( you didn't close it, right? :p):
    Code:
    [email protected]:/ # am force-stop com.google.android.gsf
    [email protected]:/ # am force-stop com.google.android.gms
    [email protected]:/ # am force-stop com.google.android.apps.chromecast.app
    [email protected]:/ #
    If it worked you won't see any output from these three commands; You can now exit adb and disconnect your device.
    If you see this:
    Code:
    Error type 2
    android.util.AndroidException: Can't connect to activity manager; is the system running?
    at com.android.commands.am.Am.onRun(Am.java:298)
    at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
    at com.android.commands.am.Am.main(Am.java:99)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
    You didn't do step 7 correctly. Repeat step 7 and then try this step again.


    That's it! NO reboot required! You should now be able to stream screen mirror to a chromecast device from your N7(2012) using Lollipop! :)

    To test it, you should now be able to use your quick settings "Cast Screen" button, or the "Cast Screen" option from within the chromecast app.

    Enjoy!
    2
    I know this isn't the place to be advertising my own stuff, but anyone who wants to test v7 of #MirrorEnabler (compatible with Lollipop), send me a PM and I'll send you a link.
    1
    Nice guide ! :)

    Gesendet von meinem GT-I9195 mit Tapatalk
    1
    Nice guide.

    Can confirm after following this guide casting from settings pull down is indeed working on lollipop N7 2012!!

    Cheers! :D
    1
    Its works great! thank you!
    I think Mirror Enabler only set the first one row, and it is the reason it stopped working on this tablet