How to pair a Wireless Xbox 360 Controller and fix Camera Spin - Nexus 7 General

Video that demonstrates the setup, show an example of the problem, the steps to solve the problem, and the working solution!!!
http://www.youtube.com/watch?v=9czISrLGXNI&hd=1
So first lets just talk about the Hardware Setup.
Xbox 360 Wireless Controller
OTG Cable.
Xbox 360 Wireless Dongle (This is meant for the PC but also works on the Android, and quite lovely on emulators)
This setup alone works well for allot of the emulators out there, however some of the games are not working with the controller, for instance GTA3 , Dead Trigger, Shadowgun and others. So by reading the logcat I was able to figure out a solution. Snippet of logcat below
--------------------
07-22 19:55:48.039 350 405 D EventHub: No input device configuration file found for device 'Xbox 360 Wireless Receiver'.
07-22 19:55:48.059 350 405 I EventHub: New device: id=4, fd=269, path='/dev/input/event3', name='
360 Wireless Receiver', classes=0x80000341, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false, usingSuspendBlockIoctl=true, usingClockIoctl=false
<6>[ 117.819812] usb 2-1: new full speed USB device number 2 using tegra-ehci
<6>[ 117.873142] usb 2-1: New USB device found, idVendor=045e, idProduct=0719
<6>[ 117.873219] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 117.873337] usb 2-1: Product: Xbox 360 Wireless Receiver for Windows
<6>[ 117.873403] usb 2-1: Manufacturer: ©Microsoft
<6>[ 117.873518] usb 2-1: SerialNumber: FE425DB0
-------------------
So when i searched through the /system/usr/keylayout/ I saw there was a profile for the xbox 360 wired controller so I thought why not copy the profile and name it a wireless xbox controller. This idea worked. You name keylayouts by Vendor ID and Product ID which I also was able to get from the logcat. What is nice about this is I think we can use this to solve issues with other controllers as well, but I don't know of any that are also having problems.
For this solution a rooted Nexus 7 is required. I already have a step by step video on rooting if you need the help on the nexus 7. but after obtaining root you need to enter into the Android Shell (i was using Terminal Emulator for Android on the Nexus 7 downloaded from the google play store ) . I entered this commands to get this all setup.
su
cd /system/usr/keylayout/
mount -o remount,rw /system
cp Vendor_045e_Product_0291.kl Vendor_045e_Product_0719.kl
chmod 644 Vendor_045e_Product_0291.kl
chmod 644 Vendor_045e_Product_0719.kl
exit
exit
Restart System and Enjoy!!!!
UPDATE 2
I attached the Key Character Mapping file as well. This is found in /system/usr/keychars . For nexus 7 users this isn't necessary but some other devices have different generic .kcm so this is needed (in the process of being confirmed) PLEASE NOTE THE .KCM Extension
UPDATE
Some of you do not have the Keylayout file for even the USB Xbox Controller, I am attaching the file (it needs to be unzipped), you will need to paste it into the /system/usr/keylayout/ folder. You also could rename this to the Wireless Xbox Controller Vendor and Product ID and copy it 'Vendor_045e_Product_0719' .
Update 2: When copying the file you still need to mount the Systems folder using the command listed above: "mount -o remount,rw /system" and also remember to modify its priveledges using the
"chmod 644 Vendor_045e_Product_0291.kl"
PLEASE NOTE THE .KL EXTENSION FOR THIS FILE

Good work!

Nice. If I didn't already use PS3 controllers I'd check it out.
Sent from my Nexus S using xda premium

So does it have to be the pc version of the xbox controller? Or a regular xbox controller?
Sent from my One X using xda premium

Is Vendor_045e_Product_0291.kl created when you sync your wireless controller? because I don't have such file on my keylayout folder.

Cybore said:
Is Vendor_045e_Product_0291.kl created when you sync your wireless controller? because I don't have such file on my keylayout folder.
Click to expand...
Click to collapse
Are you using a Rom? I was doing this with a rooted verion of stock 4.1.1.
I'm not at my Nexus 7 for the rest of the night but can upload the file tomorrow if you don't have it. But yes Vendor_045e_Product_0291.kl should be for this to work. In the case its not we will have to push the file to the folder and then set the permission for it.

ptesmoke said:
So does it have to be the pc version of the xbox controller? Or a regular xbox controller?
Sent from my One X using xda premium
Click to expand...
Click to collapse
There is no specific controllers to PC or Xbox. A wired controller works with both PC and 360 due to it being a USB connection. A wireless controller still can work with PC if you purchase a wireless adapter. That is what I do: sync up with this PC adapter when I want to play PC games with a controller, and sync the same controller up to my 360 on the off chance I want to play some Halo or something.
Anyway, I assume the same method of hooking up a wired 360 controller to an Android device is applicable as it uses the same drivers as the wireless one, just requires one less piece of equipment.

ptesmoke said:
So does it have to be the pc version of the xbox controller? Or a regular xbox controller?
Sent from my One X using xda premium
Click to expand...
Click to collapse
The controller itself is a regular xbox 360 controller. The dongle is just used on the PC so it can communicate with the controller like a xbox 360 does.

sleeplessninja said:
Are you using a Rom? I was doing this with a rooted verion of stock 4.1.1.
I'm not at my Nexus 7 for the rest of the night but can upload the file tomorrow if you don't have it. But yes Vendor_045e_Product_0291.kl should be for this to work. In the case its not we will have to push the file to the folder and then set the permission for it.
Click to expand...
Click to collapse
Nope, rooted stock 4.1.1 as well. Please upload the file if you get a chance.

So during cinematics like in Dead Trigger when the Zack gets too close, do you drop the controller and have to touch the screen?
I suck at this game, so that happens to me a LOT.

Updated OP with Attachment
Cybore said:
Nope, rooted stock 4.1.1 as well. Please upload the file if you get a chance.
Click to expand...
Click to collapse
Sorry for the delay. I appreciate you bringing this up and I updated the original post to include the attachment. Please let me know how it works out for you.
eawooten said:
So during cinematics like in Dead Trigger when the Zack gets too close, do you drop the controller and have to touch the screen?
I suck at this game, so that happens to me a LOT.
Click to expand...
Click to collapse
Yes, as far as i know you can't use the controller, i'd imagine the developers would change this to fix it though. But I was only showing the game to demonstrate the issue not so much discuss its gameplay with the xbox controller. I think there is a thread on here that is discussing this and might even direct you to a petition to Madfinger (developer of dead trigger) to request it to be changed.

Thanks for the up, I'll give it a go once my otg cable arrives. I wanted to get my n7 ready to sync once it got here.

Sweet. Thanks for posting the file.

I did not have the file either so I downloaded it to my nexus. When I try to copy the file after unzipping it it always says copy failed. I've tried Astro, ES, and File Manager with the same results. I've even moved it from my pc to my Nexus after unzipping and still having the same problem. Any ideas?

vzwty said:
I did not have the file either so I downloaded it to my nexus. When I try to copy the file after unzipping it it always says copy failed. I've tried Astro, ES, and File Manager with the same results. I've even moved it from my pc to my Nexus after unzipping and still having the same problem. Any ideas?
Click to expand...
Click to collapse
Are you mounting the Systems folder using the command " mount -o remount,rw /system " Just like in the instructions for copying the file, you need to mount the folder with write privledges using that command. I'm not sure if the file manager after remounting will allow you to still move it, you might need to use a command to move the file yourself. But let me know how it works out with the file manager first.

So I just got a chance to test it and it worked for me. I renamed the file to "Vendor_045e_Product_0719" and used root explorer to copy it into the keylayout folder. Just make sure to Mount r/w which should enable to set permissions as well.

any app for touch mapping? like the sixaxis controller one

sleeplessninja said:
Video that demonstrates the setup, show an example of the problem, the steps to solve the problem, and the working solution!!!"
Click to expand...
Click to collapse
It works great! Thanks!

Good work sleeplessninja! If only I had rooted my Nexus 7 already I'd be playing right now
Do you think getting wireless xbox controllers will become simpler in the near future through updates (preferably without rooting, not for me but for other who have no desire to root)? Also, can anyone comment on how much the wireless receiver drains the battery?

burntcustard said:
Good work sleeplessninja! If only I had rooted my Nexus 7 already I'd be playing right now
Do you think getting wireless xbox controllers will become simpler in the near future through updates (preferably without rooting, not for me but for other who have no desire to root)? Also, can anyone comment on how much the wireless receiver drains the battery?
Click to expand...
Click to collapse
I'd have to look at the spec of the reciever to figure out battery drain. But I haven't noticed any substantial drain for the limited time i've used it.
I actually can become simpler. We should all submit a ticket to Asus or Google. Because its somethign as simple as including the file in their next OTA. That way we wouldn't need to root to add it ourselves. Anyone submit a ticket before and know how to go about it? I can look it up myself but in case you find the page before me please let us all know.

Related

Internet Tethering via USB??

Internet Tethering over USB? Is that something that was added with 1.6 or is that Eclair functionality? I notice it is in the CyanogenMod latest builds.
How does it work in comparison to bluetooth or wifi tether?
Does it require root?
TIA
What do you mean work in comparison, it's wired and the others are wireless. Speeds shouldn't depend on connection.
If you install cyanogen's build, then you have root so it shouldn't matter as you have it already. There is an application wired tether for root users, name explains.
I don't think it is in the AOSP build, so it was added by him or whoever he gives credit to.
There are 2 different Tethers for root users
Wired - Means u gotta connect your usb to your computer
Wireless - This will create an Ad Hoc wireless connection to your computer (no cable required)
This was added by cyanogen and is not part of eclair
nephron said:
There are 2 different Tethers for root users
Wired - Means u gotta connect your usb to your computer
Wireless - This will create an Ad Hoc wireless connection to your computer (no cable required)
This was added by cyanogen and is not part of eclair
Click to expand...
Click to collapse
What I was originally asking I guess was if the Wired USB tethering was now standard issue in Android 1.6 or 2.0 and as such was available to non-root users. From your response, I understand that is incorrect, and that wired tethering via USB was added by CM in the CM builds and therefore implicitly requires root.
Thanks for clarifying that for me!
If you wanted a non rooted version, search the market -there are several that don't require root.
so...
how is this done exactly on cyanogens rom? i cant find anything about it after searching for about an hour...
mr_brain said:
how is this done exactly on cyanogens rom? i cant find anything about it after searching for about an hour...
Click to expand...
Click to collapse
Yeah me and some people on another thread figured it out......
But first things first you need Windows XP service pack 3 or Windows Vista or Windows 7... I dont know about Mac.....
but Windows Xp is different than Vista or 7 because you need to download HTC sync to get the drivers for your G1 to be reconized as a modem..... Do not mount your G1..... once you have HTC sync installed you do not need to run it..... but now when you connect your G1 just check the internet tethering box and it should work(unless I missed a step)...
OK With Vista and Windows 7 the drivers are preloaded into the OS s do NOT need to download HTC synce... You just need to connect your phone do NOT mount and check the tehtering box... it should work....
is there a certain version for the G1 that I need?
Reverse tether g1 to pc network over usb cable
My android os is CyanogenMod 4.2.14.1,
1.Enable "Settings\Wireless controls\Internet tethering"
2.Install HTC Remote NDIS based Device driver(View attachment 277122)
3.Set the HTC adapter as: IP:192.168.2.1, Mask:255.255.255.0
4.Set the PC ethercard as shared connection
5.Run these codes in terminal:
su
ifconfig usb0 192.168.2.2 netmask 255.255.255.0
busybox route delete default
iptables -F
iptables -F -t nat
busybox route add default gw 192.168.2.1
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
6.Now your g1 could open browser to view any web pages on the internet, and update apps in the Market.
for diyism
just wanted to say that
This works on Nexus One as well!
The routing stuff disuse posted, I mean.
The only problem is that I can't download stuff from the market yet. But hopefully I'll find a solution to this soon.
Thanks a lot! I've been looking for this for like a whole week.
I think I'll write an app which will just run this as a shell script.
thanks again!
XBOX PS3 Wii anyone????
can someone please tell us or provide a step-by-step on how to have gaming consoles tether the device's web connectivity...or in other words how to make my xbox 360 connect to the web by tethering my device's internet....PLEASE PLEASE...I SWEAR I BUY BEER...I BUY BEER !!!
Reverse tethering not working with Play Store
GuShPaNdA said:
This works on Nexus One as well!
The routing stuff disuse posted, I mean.
The only problem is that I can't download stuff from the market yet. But hopefully I'll find a solution to this soon.
Thanks a lot! I've been looking for this for like a whole week.
I think I'll write an app which will just run this as a shell script.
thanks again!
Click to expand...
Click to collapse
Sure, I've seen before two attempts of reverse tethering with this approach with the same problem: Play Store stays "Downloading" or "Waiting for network" but It doesn't work. I've tried also my own method with the same results: Play Store is not working.
I think this has something to do with the way Play Store app is testing for Internet conectivity. Since it doesn't know if you've got one, it doesn't let you download nothing.
Maybe there is some Android SDK API call to flag the system that Internet connection is up? Any other clue?

Guide: Using Android Without a Data Plan - Getting Apps, Moving Contacts, and More

aa
thanks for the guide! ive been looking all over for something like this
its totally worth switching to android now with the market apps
Guide Stuck! Thanks for this.
usb outlook sync
here's a possible usb sync solution for outlook users; it's pretty expensive though ($40, 15 day trial version), and I haven't tried it since my vouge is not activated atm.
http ://www .companionlink.com/androidusb/ol-android-usb.html
(spaces in link for newbie post)
Would this work with the vogue's usb driver?? I know i've read about issues with only parts of the usb driver being implemented.
Anyway there's a trial if anyone's interested. I'm still holding out for a "reverse tethering" solution so I can access the internet on my vogue over usb or bluetooth. There's another thread on here about that.
Great work on the guide. I'm sure I might be using it when I upgrade to a new phone in the near future
this is a great guide, thanks. i am due for upgrade around december and think that i will keep my 6900 in service- not sure as to what she will do,but ill figure out something
this gives me the opportunity to keep her at full service.
thanks again
What are you guys doing for a calendar.
Was there ever a way discovered to use the google calendar?
aa
I'm having trouble with Titanium Backup. It keeps on saying that the emulator needs to be rooted to be used, so how would I get it to work?
th3lolz said:
In the comments on my site trackstarboi said that this was good, but I have yet to try it:
http://www.androlib.com/android.application.jp-co-johospace-jorte-iwqp.aspx
Click to expand...
Click to collapse
I recently found ancal http://code.google.com/p/ancal/wiki/AnCal
and it seems to be working for me. I've tried jorte, didn't care for it.
It would still be ideal to use the google calendar, because of the widgets it has etc.
th3lolz said:
6. The apps you backup will be backed up to /sdcard/backups/apps/
7. You can use one of the following adb commands to pull these files from the emulator:
adb pull /sdcard/backups/apps/ /AndApps
This will download all of your backed up apps to a folder on your root drive called AndApps
or
adb pull /sdcard/backups/apps/<NAME OF APK>.apk /AndApps/<NAME OF APK>.apk
This will copy a single apk of your choosing to /AndApps/
Click to expand...
Click to collapse
I don't quite get this part, where do i put in adb pull /sdcard/backups/apps/ /AndApps
my emulator is stuck on the boot screen....im running the one from the accessmarket.rar
If anyone is using this on a Mac, I would love to know how you go about setting it up and using this accessmarket.avd
I can run the emulator but I can't seem to be able to figure out how to Import? this package
aa
aa
aa
aa
Good work
Thanks for the guide. Very helpful.
th3lolz said:
You have to place it in the directory stated by the sdk documentation for Mac:
If it works for you, post it here and I'll update the guide for mac users too. I'm not really sure what you'd do with the .ini though, perhaps a mac user can tell you that (or you could create an avd through SDK setup and upload your avd folder so I can look at it)
Click to expand...
Click to collapse
Thank you for the reply. I did copy the avd to my .android folder on Mac, but the emulator doesn't see it. I am a fairly new Mac user as well, so not too much help from here
aa

WiFi printing using PrinterShare

So, I figured that I would post a confirmation that states that while using my NC and PrinterShare from the market I can print documents over my WiFi connection at home!
I was not sure if this would work, and it took the NC a bit to see the WiFi printer, but it works. I am going to purchase the full version now that I know that it works.
This NC gets cooler and cooler, day after day!
I am wondering if something can develop a way to auto-print documents that have been waiting in a queue. For example if I am at work, select 4 documents that need printing, and then the NC would send them to the printer once I connect to my home WiFi?
There is a hack that can send documents from any device to any online printer.
It's not too complicated - as long as both are linked to the same Dropbox account. You would just need to install a script in your Dropbox, then any documents you want to print would be uploaded to that folder.
I don't have the link (sorry) but I'll look for it... I'll post it when I find it .-)
Ok - found it... I think it might be windows only.
(These are just links that I've found... All credit goes to the original author)
First, you need a dropbox account. You would need to have it linked to your Nook and your computer with a printer.
If you don't already have one, feel free to use my link: http://db.tt/1lAXHf7
(There's all sorts of other things you can do with Dropbox, but this is one of the better ones for the Nook... as far as I can tell)
Here's the link to show you how to install the script:
http://www.labnol.org/internet/print-from-mobile-phones/17827/
I attached the zip file with the script, hope it helps!
This works (dropbox option). Just printed a document. Thanks for sharing.
Thanks, the application works for me, I opted for the wrz version.
The dropbox version works for mac and linux too, you just need the script. I can not find the link now but I Googled dropbox printing and found a page that links to the mac and linux scripts. I tried the linux one.
thanks for the dropbox method it worked.
u can find the mac script here http://www.labnol.org/tech/print-files-on-remote-mac/17838/. and the linux script here http://www.labnol.org/software/print-files-on-linux/17841/
Printershare works on my Droid2 but not my nc
nootered said:
So, I figured that I would post a confirmation that states that while using my NC and PrinterShare from the market I can print documents over my WiFi connection at home!
I was not sure if this would work, and it took the NC a bit to see the WiFi printer, but it works. I am going to purchase the full version now that I know that it works.
This NC gets cooler and cooler, day after day!
I am wondering if something can develop a way to auto-print documents that have been waiting in a queue. For example if I am at work, select 4 documents that need printing, and then the NC would send them to the printer once I connect to my home WiFi?
Click to expand...
Click to collapse
I was wondering if you or anyone could help me troubleshoot my setup. I have a brother mfc-j270w that is listed as a supported device on the printershare home page. I also have a rooted nc with no overclock and only modified location service files. It will see the printer and even show that the printing has been spooled and completed. The printer shows receiving the job, feeds the paper, but prints nothing.
I would assume that the printer firmware isn't compatible with the printershare drivers, but I've ran the same test from my Droid 2 and it works like a charm.
Any ideas?
whoatemyshat said:
I was wondering if you or anyone could help me troubleshoot my setup. I have a brother mfc-j270w that is listed as a supported device on the printershare home page. I also have a rooted nc with no overclock and only modified location service files. It will see the printer and even show that the printing has been spooled and completed. The printer shows receiving the job, feeds the paper, but prints nothing.
I would assume that the printer firmware isn't compatible with the printershare drivers, but I've ran the same test from my Droid 2 and it works like a charm.
Any ideas?
Click to expand...
Click to collapse
Maybe select a different option in Options-->Printout Mode?
breebauer said:
Ok - found it... I think it might be windows only.
(These are just links that I've found... All credit goes to the original author)
First, you need a dropbox account. You would need to have it linked to your Nook and your computer with a printer.
If you don't already have one, feel free to use my link: http://db.tt/1lAXHf7
(There's all sorts of other things you can do with Dropbox, but this is one of the better ones for the Nook... as far as I can tell)
Here's the link to show you how to install the script:
http://www.labnol.org/internet/print-from-mobile-phones/17827/
I attached the zip file with the script, hope it helps!
Click to expand...
Click to collapse
Awesome! Thanks!
racks11479 said:
Maybe select a different option in Options-->Printout Mode?
Click to expand...
Click to collapse
Ok, so I think I've figured it out. It had to have been an IP address conflict. I set the printer to a static IP address and it seems to be working fine now. Also, the setup I'm striving for involves networking through wireless tether on my Droid 2. I have to make sure that I connect the nc immediately after starting the wireless tether app so that su is still active. For some reason, the su permissions seem to time out after a bit, but it never causes any interruption in wifi service. I can also get it to refresh the su permission and allow the nc to connect just by turning the screen back on. Is this normal?
cmcdaniel said:
Ok, so I think I've figured it out. It had to have been an IP address conflict. I set the printer to a static IP address and it seems to be working fine now. Also, the setup I'm striving for involves networking through wireless tether on my Droid 2. I have to make sure that I connect the nc immediately after starting the wireless tether app so that su is still active. For some reason, the su permissions seem to time out after a bit, but it never causes any interruption in wifi service. I can also get it to refresh the su permission and allow the nc to connect just by turning the screen back on. Is this normal?
Click to expand...
Click to collapse
The fact that the su privilege seems to come back when the screen is turned back on makes me think it may have something to do with the Superuser app being cached/inactive by Android (after some inactivity)?
You could check the Superuser Log and see if it shows another "allowed" entry after waking the screen?
Just throwing out ideas.

[MOD] Basic HDMI mirroring

I played a little bit with the scripts starting the X server used for the webtop. That X server is what prevents the HDMI mirroring (which is there out of the box) from working.
Wrapping it all up in some (rather quick & dirty) app - and there we go: HDMI mirroring.
Disclaimer
If you choose to perform this installation, I cannot be held responsible if you brick your device, damage it otherwise, blowup your monitor or create SkyNet.
Install perquisites
Your phone is rooted
You have ADB installed and know how to use it
You are aware that this is rather a hack than a polished product
You have read the disclaimer
How to install
All the manual script work is now unnecessary. Just install the APK, the app will do the rest.
Edit the /system/build.prop file and set ro.hdmi.mirror.enable to true
Code:
su
mount -o remount,rw /dev/block/mmcblk0p12 /system
sed -ie s/ro.hdmi.mirror.enable=false/ro.hdmi.mirror.enable=true/g /system/build.prop
mount -o remount,ro /dev/block/mmcblk0p12 /system
Modify /etc/init.d/startXServer.sh to introduce some sort of a semaphore:
Code:
su
cd /etc/init.d
cp startXServer.sh startXServer.bak
(head -n 40 startXServer.bak; echo "if [ ! -e /var/run/noWebtop ]; then"; tail -n 12 startXServer.bak; echo "fi") > startXServer.sh
Install hdmimirroring.apk
Code:
adb install hdmimirroring.apk
Known Issues
While HDMI mirroring is enabled, starting webtop will freeze your screen (pull out HDMI cable to get a working screen again)
Once HDMI mirroring was enabled, webtop might not start smoothly anymore
Enabling HDMI mirroring might break your webtop session (The X server is killed in the process, thus all applications depending on the X display are likely to be killed as well. Let alone those started by xinit)
Auto rotation does not rotate the HDMI image (always in portrait mode)
Can't manually select the resolution or other parameters
Update/Edit
I reupploaded the app which no does all the setup on its own - so the procedure above is no unnecessary
All my digging (deep) in the guts of what runs on the Atrix suggests that there is no easy way of getting rotation to work. Someone might have to write a deamon which grabs the framebuffer image and draws it on the HDMI port (as GLES client). That's pretty much what they did on the Evo (someone correct me if I'm wrong). But not only is that a painful task, but also is the performance going to be rather bad (esp. compared to how good it is out of the box)
Can you PLZ get landscape working. This single handedly has made me buy the atrix! Please get landscape working. I Love android Devs. YAY OPEN SOURCE!
wow very nice, thanks weichel!
horizontal mode is def the next step!
great work
whats the point of mirroring..?
if u wanna watch vids/ pics u can use the multimedia via HDMI out anyways
enlighten me
SS2006 said:
whats the point of mirroring..?
if u wanna watch vids/ pics u can use the multimedia via HDMI out anyways
enlighten me
Click to expand...
Click to collapse
Playing games on the big screen is one thing. Some of the struggles I went through were whenever I go on the webtop mode is that it's hard for me to use it as a mirror when the touchscreen gets turned into a mouse (not everyone has a bluetooth mouse). Some people might not like that and want straight up mirroring, like how the Optimus 2X does it.
You might wanna check out ExtDispService. It relates to HDMI.
SS2006 said:
whats the point of mirroring..?
if u wanna watch vids/ pics u can use the multimedia via HDMI out anyways
enlighten me
Click to expand...
Click to collapse
mirroring is so much better than motorola's crappy entertainment app. For one, its not limited to filetypes. You can use rockplayer to play x264s among others.
Secondly, as mentioned before, games. Especially emulation... Playing fullscreen via the webtop did not work well for 2 reasons. Native android games would require you to use the touchscreen, impossible with the webtop. Secondly, there would be a lot of framerate drops in the webtop environment, while there isn't any noticeable drop during mirroring.
Techcruncher said:
Can you PLZ get landscape working. This single handedly has made me buy the atrix! Please get landscape working. I Love android Devs. YAY OPEN SOURCE!
Click to expand...
Click to collapse
The 2nd pic looks like it's working. Please advise!
rozzco said:
The 2nd pic looks like it's working. Please advise!
Click to expand...
Click to collapse
no, thats still portrait mode, even if he were to flip the phone, it would stay in portrait mode
I'm going to try to make a script (one that can be run from the phone) to swap the stock buildprop file with the modified one to make it easier and work well with the webtop. Will post later tonight if I'm successful.
can't wait to try this when i get my atrix. =)
any news on horizontal mirroring?
Unfortunately I don't have access to an HDMI capable monitor at the moment, as mine is broken. But still looking into landscape view ...
Hi! Did you manually create HDMIMirroring.apk or was this file pulled from somewhere?
Would it be possible to get the source code? Maybe we can put everything in there so that the app does everything automatically and no manual intervention has to be done...
weichel said:
Unfortunately I don't have access to an HDMI capable monitor at the moment, as mine is broken. But still looking into landscape view ...
Click to expand...
Click to collapse
I wrote the hdmirroring app myself (it's rather quick and dirty, but gets the job done).
There is an update available. Now the app does all the work, as Beach_Head suggested. See the first post for details.
There is also:
All my digging (deap) in the guts of what runs on the Atrix suggests that there is no easy way of getting rotation to work. Someone might have to write a deamon which grabs the framebuffer image and draws it on the HDMI port (as GLES client). That's pretty much what they did on the Evo (someone correct me if I'm wrong). But not only is that a painful task, but also is the performance going to be rather bad (esp. compared to how good it is out of the box)
Click to expand...
Click to collapse
So you can use the full multitouch screen and accelerometer to play games and operate your device. Webtop doesn't mirror your inputs. It just converts phone's screen into a laptop touchpad.
Sent from my MB860 using XDA Premium App
I have enable superuser right,but got erro message .
HDMI mirroring is not avalibal.Possible resons are:This application has no superuser rights.The ro.hdmi mirror enable poperty is not set.
It's very likely that something's wrong with the superuser rights, because if the ro.hdmi.mirror was not set, the application would try to set it.
Did you tick the "Remember" checkbox when you gave the application superuser rights the first time?
ANDY12001 said:
I have enable superuser right,but got erro message .
HDMI mirroring is not avalibal.Possible resons are:This application has no superuser rights.The ro.hdmi mirror enable poperty is not set.
Click to expand...
Click to collapse
Same for me I uninstalled it and made sure I clicked "allow" and still gave me the same error
Sent from my MB860 using XDA App

[SOLVED] How do I enable Nexus 7 USB tether on Jelly Bean?

Is there a way compile the JB source so USB tether is enabled?
I made the following modification to frameworks/base/core/res/res/values/config.xml but the Nexus 7 with JB doesn't bring up any USB network interface or show the tethering option in the menu
Code:
<!-- List of regexpressions describing the interface (if any) that represent tetherable
USB interfaces. If the device doesn't want to support tething over USB this should
be empty. An example would be "usb.*" -->
<string-array translatable="false" name="config_tether_usb_regexs">
<item>"usb0"</item>
</string-array>
Not to be 'that guy', but could you please add a question mark to the title of your thread? I came in here hoping for a solution, not a question
I asked a similar question http://forum.xda-developers.com/showthread.php?t=1822788
a 3rd-party app may be able to help, but the kernel apparently has to be compiled with CONFIG_NETFILTER/CONFIG_IP_NF_IPTABLES and/or RNDIS
espionage724 said:
I asked a similar question http://forum.xda-developers.com/showthread.php?t=1822788
a 3rd-party app may be able to help, but the kernel apparently has to be compiled with CONFIG_NETFILTER/CONFIG_IP_NF_IPTABLES and/or RNDIS
Click to expand...
Click to collapse
I tried using android-wired-tether with a custom kernel that includes netfilter, iptables, and rndis. This still did not work since the application tries to access usb0 directly and the Nexus 7 never creates that interface even with a customized config.xml
I was able to get the USB tethering, Wi-Fi hotspot, and Bluetooth tethering options to come up in the menu on the Nexus 7 using the attached overlay placed in device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml
The Wi-Fi hotspot and Bluetooth tethering options appear to work.
However, the USB tethering option unchecks itself after a second when I try to activate it.
I get the following error in logcat:
Code:
09-13 13:10:41.820: E/UsbDeviceManager(331): Failed to switch USB config to rndis,adb
I am happy to announce I got native USB tethering working on the Nexus 7
I had to make the changes to the config.xml as shown in the previous post and also had to modify out/target/product/grouper/root/init.usb.rc by adding the following
Code:
on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 4e23
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/bDeviceClass 224
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 4e24
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/bDeviceClass 224
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
I'm also using a modified tegra kernel with RNDIS options activated...not sure if this is required (I'm assuming it is). I will try the stock kernel later.
That is good news indeed
Props to You!
cbdonohue said:
I was able to get the USB tethering, Wi-Fi hotspot, and Bluetooth tethering options to come up in the menu on the Nexus 7 using the attached overlay placed in device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml
The Wi-Fi hotspot and Bluetooth tethering options appear to work.
However, the USB tethering option unchecks itself after a second when I try to activate it.
I get the following error in logcat:
Code:
09-13 13:10:41.820: E/UsbDeviceManager(331): Failed to switch USB config to rndis,adb
Click to expand...
Click to collapse
Nice work and quick as well, I do like those overlays, there is plenty of nice tweaks to be had out of them if folks are willing to put the effort in.
I built my own overlay earlier on after you planted the seed and was quite surprised to get Wifi-Hotspot for free. It does work, well my HTC Sensation connects to it, which is quite amusing as Cm10 on the sensation doesn't have a working WifiHotspot :laugh: I think a bit of cross device hacking is in order there
cbdonohue said:
I'm also using a modified tegra kernel with RNDIS options activated...not sure if this is required (I'm assuming it is). I will try the stock kernel later.
Click to expand...
Click to collapse
I think this is my missing link, I was going to have a proper look at some point and you've saved me a job there, I'll build myself a fresh kernel now and see if it is the case.
:good:
So does this require both a modified (before compile) Kernel and ROM?
espionage724 said:
So does this require both a modified (before compile) Kernel and ROM?
Click to expand...
Click to collapse
After talking with trevd, I am pretty confident you need to modify the .config created by "make tegra3_android_defconfig" so the RNDIS driver is in the kernel. I won't be able to compare the stock kernel to my modified one until the weekend (I only have one Nexus 7 and have to do other testing with it). The .config file I used for my modified tegra kernel is attached.
So yes, modify the kernel and Jelly Bean source. I can certainly help anyone if they run into trouble.
I plan on putting up flashable images when I can and submitting a patch to cyanogen.
cbdonohue said:
I was able to get the USB tethering, Wi-Fi hotspot, and Bluetooth tethering options to come up in the menu on the Nexus 7 using the attached overlay placed in device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml
The Wi-Fi hotspot and Bluetooth tethering options appear to work.
However, the USB tethering option unchecks itself after a second when I try to activate it.
I get the following error in logcat:
Code:
09-13 13:10:41.820: E/UsbDeviceManager(331): Failed to switch USB config to rndis,adb
Click to expand...
Click to collapse
Would love to use your overlay.
Where exactly do I find the above mentioned path?
When I connect Nexus 7 to my Mac and see the file structure, it is missing the device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml
retfeg said:
Would love to use your overlay.
Where exactly do I find the above mentioned path?
When I connect Nexus 7 to my Mac and see the file structure, it is missing the device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml
Click to expand...
Click to collapse
You need to modify the files in the Jelly Bean source code and recompile the operating system.
@cbdonohue:
Hey! Do you think you could upload your kernel/framework files to use in the mean time?
I'm very curious and I have asked this so many times and no one has answered me.
Why would you want to tether your device? your device cant and does note generate its own Mobile internet service like a 3G/4G device. its wifi only so why would you want to share your devices wireless connectivity?
the only thing I can think of is if you have a desktop or laptop that does NOT have a wireless card and you want to use your Nexus 7 as a wireless card essentially and then plugging it in via USB to your desktop/laptop?
what other reason could you have for wanting to share your devices wireless connectivity?
nextelbuddy said:
I'm very curious and I have asked this so many times and no one has answered me.
Why would you want to tether your device? your device cant and does note generate its own Mobile internet service like a 3G/4G device. its wifi only so why would you want to share your devices wireless connectivity?
the only thing I can think of is if you have a desktop or laptop that does NOT have a wireless card and you want to use your Nexus 7 as a wireless card essentially and then plugging it in via USB to your desktop/laptop?
what other reason could you have for wanting to share your devices wireless connectivity?
Click to expand...
Click to collapse
You can reverse-tether a device in order to get connectivity from your PC. This is what I'm looking to accomplish with my device while I'm at work so I can access the company intranet.
ObsidianX said:
You can reverse-tether a device in order to get connectivity from your PC. This is what I'm looking to accomplish with my device while I'm at work so I can access the company intranet.
Click to expand...
Click to collapse
^ This.
ObsidianX said:
@cbdonohue:
Hey! Do you think you could upload your kernel/framework files to use in the mean time?
Click to expand...
Click to collapse
1. Download the tegra kernel branch android-tegra3-grouper-3.1-jb-fr2 and compile using the attached defconfig. (This enables the RNDIS driver)
2. Download grouper branch android-4.1.1_r1.1 and copy the compiled tegra kernel into it.
3. Modify the following grouper file with the attached config.xml (This allows the 'Tether to USB' option to come up in the settings')
device/asus/grouper/overlay/frameworks/base/core/res/res/values/config.xml
4. Compile grouper
5. Modify the following file with the attached init.usb.rc (This allows the OS to enable RNDIS USB tethering)
out/target/product/grouper/root/init.usb.rc
6. Flash to device.
At some point in the future I can make a flashable image or patch that will make this easier. In the mean time these steps should do it. Let me know if you have any issues.
nextelbuddy said:
I'm very curious and I have asked this so many times and no one has answered me.
Why would you want to tether your device? your device cant and does note generate its own Mobile internet service like a 3G/4G device. its wifi only so why would you want to share your devices wireless connectivity?
the only thing I can think of is if you have a desktop or laptop that does NOT have a wireless card and you want to use your Nexus 7 as a wireless card essentially and then plugging it in via USB to your desktop/laptop?
what other reason could you have for wanting to share your devices wireless connectivity?
Click to expand...
Click to collapse
One reason would be If you wanted to communicate between a PC and an Android device without being wireless. This could be to hide the connection or reduce the impact of RF interference. Not all applications need internet access...it might be just to send data between two end points.
USB interface and addressing specifics
For those of you who are interested...
If the Nexus 7 is acting as a USB device you can turn USB tethering on from the settings menu. The Android device automatically assigns its USB interface a hard coded IP address and starts DHCP server to hand out an address to the USB host at the other end.
If you want to change the IP address that the Android assigns itself you can modifiy the USB_NEAR_IFACE_ADDR constant in following file:
frameworks/base/services/java/com/android/server/connectivity/Tethering.java
If you want to disable the DHCP server, you can simply remove the address space you are using from the mDhcpRange array in the same file.
If the Nexus 7 is acting as a USB host (using USB OTG) then you must manually bring up the USB interface (ifconfig rndis0 x.x.x.x) since the USB menu settings will not do anything.
As an aside, am I the only one surprised to find hard coded IP addresses deep in the Android code?! haha
I've found some other gems like "shoud not get here" lines and c/c++ goto statements.
Hey folks,
I took cbdonohue's modifications and built them into CM10 and it works like a charm! I took the liberty of uploading the ZIP to dev-host:
http://d-h.st/KIr
All credit goes to cbdonohue for finding and creating the modification. I just built it

Categories

Resources