redirect Q home screen to a launcher - Nexus Q General

By default, the Q has no launcher, and instead uses 'broker' as the default launcher, which has no interface, only loads up the visualizer. You cannot change this with a home switcher or any other app capable of changing the launcher. I haven't been able to find how exactly the Q is doing this, but I did find a workaround.
This assumes you are already rooted, you have a controller connected via OTG cable and have Nova launcher installed. This will work with other launchers but you will have to write your own app to launch something else.
For me, the solution consists of:
- Connect a controller of your choosing (logitech K400), and install Nova launcher
- Identify the Scan Code of the button you would like to use as a 'Home' key (KeyTool.apk attached to help find it easily if not a standard home button)
- Remap the 'CALL' action to the button you want to use. (I chose CALL since is of no use to the Q.)
- Install a small app to intercept the 'CALL' intent and fire up your launcher
1) To connect a controller, you will need a OTG cable. I wont go into this since others have already covered this in detail. Here's a good example: http://davidnhutch.com/sandbox/blog/connect-a-mouse-and-keyboard-via-usb/
2) If your controller already has a home button, and it is already kicking you to the visualizer, the scan code you're looking to intercept is probably 172. If not, you can install KeyTest.apk (attached credits solarbanjo at mobileread.com forums) on the Q and it will tell you the scancode when you press each button.
3) Now, you need to edit the Q's keylayout file (found in /system/usr/keylayout/Generic.kl) and point that key declaration to 'CALL' instead of 'HOME'. Find the number that cooresponds to your scan code, and change the action to CALL.
BTW There are probably multiple key layout files in this folder. I've attached my Generic.kl for reference, but if you're not using the same keyboard this might not be useful. Compare to yours and change accordingly.
Note: If you edit Generic.kl it will change the default action for any new device that is connected. The *proper* way to do this is to create a device specific key layout, but I didn't bother because I'm lazy.
You can find more detail about this part here: http://chris.boyle.name/2010/08/android-keymaps and here: http://www.mobileread.com/forums/showthread.php?t=159538
4) Install HijackDialer.apk (attached). This app is simple, all it does is received the dial intent and launches Nova. No need to run as service since its the only app registered to the dialer intent. Ideally, this would allow you to choose your launcher but this works for now.
I also mapped My F1 - F11 Keys to other actions like BACK, FORWARD, POWER etc. Now my keyboard can control the Q completely and I can get to my launcher without having to send adb commands. All I'm missing now is a 'close' button to kill locked up apps that don't behave on the Q.
I'm sure I may have glossed over some details but hope this helps someone.

Great work. I'll try this out this week.
Sent from my Nexus 7

I know this was posted some time ago but everytime I tried to change the Value an press sabe it say error can save. same thing happen trying to put the tablet xml also trying to change the dpi value is there something I have to do to edit system stuff
Forget it found my mistake need to be root to edit files just download Rom toolbox

Related

Quick hacked up app to create soft menu/back keys - SoftKeys v3.06

SoftKeys provides on screen keys for menu/home/back/search for devices that don't have those keys in hardware.
SoftKeys is also available in the Android Market
If you want to make themes for SoftKeys you will need the tools to build apks (eclipse/android sdk/etc) and the template from the git repository.
http://git.hoopajoo.net
Changelog:
2011/01/11 - 3.06 - Fix notification keys, boot straight to launcher on system startup
2011/01/11 - 3.05 - Fix notification softkeys <b>broken release</b>
2011/01/10 - 3.04 - Adds dpad and up to 6 custom keys, ability to put device
to sleep, improved performance for key injection, built in documentation, bugfixes
2010/12/23 - 3.00 - Most of the layout code has been rewritten to allow for theming, couple of bug fixes, SoftKeys is now gpl3
-----
Old Changelog (I'm too lazy to reorder this newest to oldest):
2010/12/04 - 1.01 - added launcher selector and remembers last launcher
2010/12/04 - 1.02 - added themes layouts from nemith, looks more like his screenshots but the spinner text is still black so the launcher chooser is hard to read, hopefully I'll have some time to fiddle with that soon
2010/12/04 - 1.03 - My fingers are too fat, I made everything in to image buttons and moved the launcher config to a prefs screen, if anyone has nicer icons let me know these are repurposed from generic android icons
2010/12/05 - 1.04 - Added alternate long-press soft home key for secondary launcher like if you want to use the built-in nook home, added configurable options for what to do if you tap or double tap the nook button while in the softkeys screen, long press on menu/back sends an extra back to the app before sending the requested button for apps that bring up pause screens or something when you move them to the background (angry birds, etc)
2010/12/05 - 1.05 - Integrated the dark theme from nemith, you can choose it in prefs now. Added options to disable the "exit" and "configure" buttons. If you disable "configure" you can still get to the preferences using the "menu" button in the notification bar (e.g. the normal menu button)
2010/12/05 - 1.06 - fix broken key handling, menu and back didn't work, don't use 1.05
2010/12/06 - 1.07 - add recent applications to top of the screen since we don't have a long-press-home recent apps dialog, looking in to re-ordering the buttons next
2010/12/07 - 1.08 - This release adds options to re-order the softkeys, insert soft keys in to the notification area, disable the recent apps list, long press the background to configure if you lost the configure button, and some options for changing the background to dim/blurred/none (note: the notification soft keys show up in the notification area, not in the main status bar like the nook menu/back, I can't put things there as an application you would need to modify system jars to get this effect)
2010/12/07 - v1.09 - Default to non-blurred background and added note about slowness, added option to return to softkeys after pressing back button
2010/12/08 - v1.10 - Selecting "SoftKeys" for your single-press home action will make it so if you launch softkeys, it will go to the launcher unless you hit home again, e.g. single-press home to go to launcher anywhere, double-press home to go to softkeys
2010/12/13 - v2.00 - This adds a new service overlay that is displayed above all apps allowing softkeys to be sent without having to mess with the home button. Default home key behavior has changed to be single click home from anywhere goes to your default launcher, double click home to get to the old softkeys interface. I'm still fiddling with service panel layouts and ideas so things will probably change, I just wanted to get some testing with something simple.
2010/12/17 - v2.01 - The service panel can now be dragged around the screen, you can change it from horizontal to vertial by long pressing it, you can adjust the transparency of the panel and the icon size, and also control if it closes after sending key events. If you don't want the dialog background on the panel you can disable it to just have floating buttons. NOTE: the signing certificate has changed to a release cert, you will need to uninstall the old softkeys before installing this one
2010/12/17 - v2.02 - Now you can move the button that brings up softkeys service, slightly better handling for switching horizontal/vertical layout by long press
veeerrry nice man!
Thanks! I agree with you - I didn't want to permanently re-assign the volume buttons, as I use them in some apps.
One request, if possible ) - Is there any way to make it go to launcher pro (or whatever you want as default) when pressing "Home" in the app? Right now, it asks me to "Pick Home" every time.
ddenson said:
Thanks! I agree with you - I didn't want to permanently re-assign the volume buttons, as I use them in some apps.
One request, if possible ) - Is there any way to make it go to launcher pro (or whatever you want as default) when pressing "Home" in the app? Right now, it asks me to "Pick Home" every time.
Click to expand...
Click to collapse
I never personally use the "home" button, I use the quick drawer thing in the notification bar, so I don't really use a launcher. I could probably quickly add a button just for an alternate home or use last home I guess/choose new home I guess. I'll see what I can do. I've also though about adding arrow soft keys, for using in like connectbot, is there any interest in that?
There are also other minor irritating things, like apps that exit when they are not in focus will not work with this hack. For example, monkey kick (a game my son loves to play) will exit if it's not in focus so it never receives the soft keys. I suppose it doesn't matter though since it doesn't use the screen completely anyway, so he just gets to play on my old g1
bpk said:
I never personally use the "home" button, I use the quick drawer thing in the notification bar, so I don't really use a launcher. I could probably quickly add a button just for an alternate home or use last home I guess/choose new home I guess. I'll see what I can do. I've also though about adding arrow soft keys, for using in like connectbot, is there any interest in that?
There are also other minor irritating things, like apps that exit when they are not in focus will not work with this hack. For example, monkey kick (a game my son loves to play) will exit if it's not in focus so it never receives the soft keys. I suppose it doesn't matter though since it doesn't use the screen completely anyway, so he just gets to play on my old g1
Click to expand...
Click to collapse
Thanks again. Using the last home would be great, if that's possible. I don't personally have any use for additional buttons, but maybe someone else can comment? Rgds.
Awesome.
Code would be cool it would be nice to have them popup at the bottom of the screen like when you press the menu button in an app.
Also to take a screen shot you hold the 'n' button and tap the Vol - button. If you have as much trouble as I did with this method, you can also install drocap2 (root required) which does nice job.
awesome app. its perfect! great replacement until someone does the sidebar buttons like the ones available for the archos
nice work... now if you can make this pop up on the bottom of the screen with a black background like the archos tablets it would be awesome...
thank you, this is a great work around
I put the source up at
http: // git.hoopajoo.net
(take out the spaces I can't post links apparently)
That page has a list of my public git urls available, the last one is SoftKeys
if anyone wants to check it out, I'm currently looking at remembering the last launcher picked and defaulting to that for people that use launchers.
-- the rest of this is just for people looking in to the source, to provide some background to why I did it this way and alternate ideas I had --
If any devs look at it I thought I'd post some of my reasons for doing it this way:
1) I looked at creating a custom init service bound to a keycode at first, this would have made it so you didn't need superuser but would have required modifying your ramdisk. Even just making a daemon and communicating through some kind of pipe would require modifying the ramdisk to get it in init. In the end I abandoned the idea because it seemed easier for most normal people to just install an apk.
2) I looked at binding this to the camera button and remapping it in the keylayout, that would preserve the default home screen selections, but would require modifying a file in your /system/ so people would need to adb their stuff. Again I thought an apk would be easier and adding in shell commands would just complicate things for people and I'm not very good at support
3) I spent a LOT of time looking through git repos from aosp to find out if there was some way to bind to the long-press home and take over the recent apps list, since it doesn't even work. This would preserve your home settings and not even remove an existing function. After several hours grepping through the core.git stuff I decided this was just easier to do. If figured good enough is usually good enough. Though if someone can figure this out it would be sweet.
4) I really was hoping that we could just pull whatever archos is doing since that seems ideal, completely soft buttons. However after downloading the aos firmware I found it was encrypted and apparently currently can only be decrypted by the devices using the public key stored on them somewhere and I'm not aware of anyone having dumped their system images yet.
Also I've been looking through the superuser source to see how they handle the popups, they do a good job of not killing the running app and being all around unobtrusive, doing it their way for the popup buttons would be really sweet since it never seems to break the currently running app.
Great except one thing!
I have LauncherPro so when I click the home button, it always gives me a choice between LauncherPro and the original home. Can you make it so I can set a default? I want to just go straight to launcher pro then I select home.
Pinesal said:
Great except one thing!
I have LauncherPro so when I click the home button, it always gives me a choice between LauncherPro and the original home. Can you make it so I can set a default? I want to just go straight to launcher pro then I select home.
Click to expand...
Click to collapse
The thread is one page long and your question was already discussed.
One page was too much reading?
How about double click home button for menu and hold the button for back? Just my 2 cents.
I have taken the source code and modified it to a be a row across the bottom of the screen, I think this looks a little bit better
Note the bar at the bottom of both. Ignore that ghosting on the second image.
If anyone is good at graphics I can use some images to create a fancier looking bottom bar.
kabi said:
How about double click home button for menu and hold the button for back? Just my 2 cents.
Click to expand...
Click to collapse
I am going to play to play with doing stuff like this. For example. Press Home for the menu. Press Home again to make the meny disappear. Double tap home for menu. Long Press for back.
I think next on my plate is setting a default launcher application to use when you hit the soft Home button.
Here is the github respository for anyone interested: https://github.com/bennetb01/SoftKeys
I can't get this to install. The first one instaled fine but when I kick this off it says it will replace the first version then "application not installed" should I remove the first one manually?
Great work BTW. Thanks
lovelacer said:
I can't get this to install. The first one instaled fine but when I kick this off it says it will replace the first version then "application not installed" should I remove the first one manually?
Great work BTW. Thanks
Click to expand...
Click to collapse
You can uninstall the first one via the following:
Code:
adb uninstall net.hoopajoo.android.SoftKeys
Install the second one normally via:
Code:
adb install SoftKeys.apk
Interestingly enough the adb uninstall command resulted in a failure as well. I just uninstalled via long press at my app screen and was able to install via root explorer on the nook.
Thanks for the help though.
I do like those buttons, I'm not much for making things look nice, typically I just do back end stuff. If you want to rebase against head and post your git repo I'll merge those changes in to main.
I started using launcher pro and realized it does suck way too much to have to select your launcher every time. It's just 1 button press but I'm too lazy.
And for people re-installing, from adb you have to do:
adb install -r <APK>
Also to remove packages I use appremover, or you can use astro file manager with the package manager under the menu.
nemith said:
I have taken the source code and modified it to a be a row across the bottom of the screen, I think this looks a little bit better
Note the bar at the bottom of both. Ignore that ghosting on the second image.
If anyone is good at graphics I can use some images to create a fancier looking bottom bar.
Click to expand...
Click to collapse
Thanks very much for this, sir.
About those images: what size do ya need? i can do them right now.
-K
I didn't want to start a new thread for this piece of information, so this looks like a good place to discuss it. My wife noticed that you can always access the back button by swiping from right to left across the notification toolbar. This worked on her non-root NC as well as my rooted one. Pretty cool!

Couple of themeing questions.

I'm currently using launcher pro plus and while I'm aware that there is no shortcut support (unless you are using froyo) I had read that it was possible to switch the dock functions by first setting their gesture, then opening a different launcher and editing a file with root explorer then rebooting.
Every time I do this, launcher pro still edits the file (located in /data/data/come.fede.launcher/shared_prefs). If anyone knows of a different way to do this, or if I am just missing something I'd like to know.
Also, I have been working on an application for a while that was a hybrid of google gesture search and the gestures in dolphin browser, I finally got the app to be able to map not only application openings but functions like volume up and down and back and menu.
A) is there a way to give this app a perma-soft key similar to the one in dolphin
B) is there a way to make the notification bar disappear when this app is running, so that in all other apps the notification bar is also gone.
C) I'd actually prefer to a softkey a long home press to open it up...maybe...or the option to pick. I cant for the life of me make the nook respond to a long n click...and I dont really wanna remap the volume buttons.
I am considering just mapping a button from soft keys to the app as of now, and then try to make it not so bandaided...but hell doing anything on the autonook is just kinda lame.
There was a suggestion a while back to install launcher pro on an android phone and set it up accordingly. Afterward, back your launcher pro settings. Launcher pro will back up to sd card and you can transfer to the nook
Sent from my Nook Color (zoom2) using Tapatalk
I actually did everything suggested in that thread, and the only thing that came close to working was pulling it from my phone, but even that resets after a reboot...my ONLY thought is that it may have something to do with the kernel I'm running...maybe...maybe?

Keyboard and Mouse shortcuts/Commands?

Can anyone list or link me to a list of keyboard and mouse commands for our tablet?
I have a bluetooth mini keyboard* with a built in mouse and I would like to be able to control my tablet from my couch while it is connected to my TV's HDMI. However, I cannot figure out how to do basic tasks with the keyboard.
* The keyboard is this type:http://compare.ebay.com/like/400254296761?var=lv&ltyp=AllFixedPriceItemTypes&var=sbar&_lwgsi=y&cbt=y
Also, I'm not sure if the commands are tablet-specific, Android specific, or if they even exist at all. (I have searched XDA and Google, but because I do not know exactly what keywords to use, I am coming up without answers!)
Shortcuts I mainly need:
1-3) The three icons in the lower left of taskbar (they don't appear through HDMI): Back, Home, and the Prev Apps
4) Change homescreens/swipe left and swipe right (I can long click and move the mouse to do this, but it is difficult to do with my mouse since it is a knob type)
5) Long hold
6) Any other commands... heck, let's make a database if it doesnt exist already!
In case it matters: I am using ICS 4.0.3 stock (with root).
Ok, wait, I kinda figured some things out, but I still need help I think:
1) Back = (correction) RClick for some apps.
2) Prev Apps =
3) Still don't know Home EXACTLY, but while in an app, Right Click seems to exit to Homescreen... but if on a different Homescreen, pressing RClick will not bring you back to your default Screen. RClick does NOT seem to act like Back at all though.
Correction: RClick seems to act as Back in SOME apps.
4) I found that I can change Homescreens two ways:
a) Move mouse to far R/L side and click
b) Use the scrollbar for the mouse (the one used to scroll through webpages, etc); Downward = Left and Upward = Right
If there are any other methods, please list them.
5) Long Hold = Long Click
... *facepalm* I shouldve guessed this one from the start!!!!
6) Still, if anyone can fill in the blanks and list any others, it would be helpful to myself and I am sure many others.
I have a Bluetooth keyboard that I use and pressing the escape button on it seems to act as a universal back button in every app.
Sent from my DROID RAZR Maxx using XDA Premium

[Q] How to access core Android functions like app switching

Is there any way to access core Android functions like app switching (holding down the Home button for a few seconds), to be used in other contexts? Similar to how you can access Activities from the apps installed and use them as Shortcuts.
What I'd like to do is this:
press Home -> bring up app switching interface
long-press Home -> go to Home screen
Basically I want to reverse the two functions that short and long pressing the Home button does.
If not that, I'm also interested in being able to access the "app switching interface" via a Shortcut (like a Shortcut you place on your Home screen), or via an app.
For example, you can long-press on the Home screen and add a Shortcut (different than adding a shortcut to an App) which basically includes various context functions of some of the apps you have installed. I want to be able to do this - add a Shortcut - in which the Shortcut I add launches the "app switching interface" that you normally get by long-pressing the Home button. That way I can put that Shortcut in Wavelauncher or wherever else I want to be able to app switch without the annoyance of having to long-press something.
Maybe this kind of thing requires root and hacking, but that's why I'm here! I'd be grateful for any advice and help; thank you!
As far as I know you'll need a custom rom like cyanogenmod or aokp to do things like that.Being able to do that in a stock rom would compose of alot of work within the framework-res.apk, systemUI.APK, and button maps. To flash a custom rom require root and clockworkmod. I want to help you but first what type of device do you have?
eugeneeaster18 said:
As far as I know you'll need a custom rom like cyanogenmod or aokp to do things like that.Being able to do that in a stock rom would compose of alot of work within the framework-res.apk, systemUI.APK, and button maps. To flash a custom rom require root and clockworkmod. I want to help you but first what type of device do you have?
Click to expand...
Click to collapse
I'll be getting my new LG Optimus G Pro in a few days. I was hoping, if I can't reverse the functionality on the Home button, that I could maybe assign the "app switching interface" to the programmable button on the side. Thanks for helping out by the way.
Is your device rooted? Also thank me with the button
eugeneeaster18 said:
Is your device rooted? Also thank me with the button
Click to expand...
Click to collapse
I don't have it yet, but I would be willing to root it. I'm using my good ol' GS2 Skyrocket for the next few days until it arrives.
Well I have my Optimus G Pro and I've been using it for a few days. I saw an app by the makers of Tasker that allows you to build your own app. Could I possibly use that to accomplish what I want (build an app whose function is to show the "app switching interface" )? Or would I really need to root it (and if so, what then?)?

Unable to access hidden menu on VZW.

So I go into the dialer app, press *#0*# and nothing happens.
I decide to press call, it does, and I get a Verizon recording.
Tried a couple other codes I've found through google with the same result. What am I not understanding about the process?
Edit: It seems Verizon has a hand in this as well. Is there a VZW workaround or are we **** out of luck?
All those screens accessed via dialler codes can still be run if you have root (and some don't even need root). Which code did you want?
EDIT: The *#0*# code opens HwModuleTest.
If you adb or even a terminal app on your phone:
Code:
su
am start -n com.sec.android.app.hwmoduletest/.HwModuleTest
com.sec.android.app.hwmoduletest is the name of the package whilst .HwModuleTest is the name of the activity you want to run. Replace these with others you want to run (some don't even need root).
EDIT2: If the activity doesn't need root (for example the camera firmware check) it's even easier (quoting from my earlier post):
Do you mean you want to check which version of sensor you have? As in Samsung or Sony Sensor?
There are several ways, you don't even need root. The most user friendly way is via one of the many custom launchers on the Play Store.
Any launcher that allows you to run activities will do.
As an example I'll use the most popular one, Nova Launcher:
1) Long press on the homescreen.
2) Press on Widgets
3) Press on Activities
4) Scroll down to Camera Test
5) Press on CameraFirmware Standard (com.sec.android.app.camerafirmware.CameraFirmware ). If you long press it'll open up instead of creating a shortcut on the homescreen
6) Once open, click on ISP VER CHECK to check the version. The Rear Camera will start with SONY if a Sony sensor or SLSI if a Samsung sensor. The front camera will always be a Samsung so it'll start with SLSI.
Click to expand...
Click to collapse
much easier than doing
Code:
am start -n com.sec.factory.camera/com.sec.android.app.camerafirmware.CameraFirmware

Categories

Resources