I am trying to kill Android Auto when it is plugged into a car through the command line so that different substratum options are applied when android auto restarts.
I have tried using:
pkill -l9 -f com.google.android.projection.gearhead
Which works on the desktop-head-unit emulator, but when the phone is plugged into my car, this does not stop and restart android auto.
I am trying to do this so that a 2nd screen using AAExtras by Shmykelsa can be re-sized (through a screen-mirroring app and Tasker to apply the appropriate overlays from substratum lite to scale the 2nd window "on-the-fly" from 100% (1/2 screen) down to 0% (single window) depending on functions desired (whether 2-windows are required, a portion of a second window for navigation while other apps are on the main window, or a single-dedicated window is desired).
Basically, since the overlays require a disconnection of the usb cable and then reconnection of the usb cable, I am trying to automate this so that it will execute a restart of Android Auto on the car's screen.
Any assistance is greatly appreciated.
Edit: figured out how to kill the usb port using tasker. Now when a widget on my home screen is pressed, it updates which overlay to use, kills the usb port, waits, and then reenables the usb port so no disconnection of the cable is needed and AA automatically restarts. It does stop music or audio out, but it works great if I need to change configurations.
I will post screenshots later to show the layouts and how the buttons work.
Cheers,
B.D.
Related
Wanted a Programmer for a small program to switch on/off the data/3g/btooth/wifi when the phone is plugged in/unplugged
why? my diamond lasts ages on the battery with all connections disabled but when i'm at work it stays plugged in and i need bt on
all options must be able to be overidden by commanager
changing profile (connecting/disconnecting power) then changes all settings to on/off
maybe a small program where there are no settings, it justs runs in the background, if launched a 2nd time popup box to switch off, all you do is set up your bt/wifi/data/3g in commanager without plugged in then connect power make changes, and the program remembers the last state of the settings and switches them back when changed
maybe a profile for each usb connection state, Async/disk drive/AC charge/ internet shareing
I think this would help everybody who has a diamond with battery issues
Hey Guys,
question is as simple as that. I'm using HTC's original cradle for charging and syncing. Means, the phone is getting charged over USB. So whenever I dock the device, Windows Mobile Center kicks in. No problem by itself but the Diamond's screen backlight won't turn off when connected to AS. It just only dims into energy saving mode.
Is there a way either to completely turn the display off when syncing -or- to disconnect from AS without disconnecting from USB? The former could also be helpful for TomTom which also only dims the screen but won't switch it off.
Thanks,
Falk
First solution
Put the diamond in the cradle.
Wait for a complete sync.
Push diamond's power button.
The diamond will still be charging through USB, the screen will be completely off.
Of course, in this case, Active Sync is disabled and you won't be able to sync or access the device through your PC.
Second solution
Use a tool to toggle the screen off while not affecting the diamond power state
Some applications provide such built-in features, like Windows Media Player which has a toggle screen shortcut which allows you to listen to music with the screen off
You may find such a tool here or here
In this case, everything will be functionnal (sync and charging) with screen off
Hope this helps.
Cheers,
Yes, of course... that really is the simplest solution So simple I even didn't think of it. Merci b'coup!
I put the screen off util on the Take Call hardware button. Now the best would be if this app could also reactivate the screen as I now need to push the on/off button that seems to disable GPS.
Bitte sehr...
What you actually need is a "toggle screen" command line tool and not a simple screen off tool....
Interesting.
If I think of something, i'll let you know
mysterd said:
What you actually need is a "toggle screen" command line tool and not a simple screen off tool....
Click to expand...
Click to collapse
Yep
eg this one http://forum.xda-developers.com/showthread.php?t=326103 which perfectly does the job when assigned to a hardware button
Thx again for your help!
You're welcome.
Viel Spass.
Myster-D
There is another option. If you do not use AS or WMDC to snyc with the PC you can disable it all together. In WMDC, open the Device Center with the device disconnected. The only Flash menu you will see is "Mobile Device Settings". Roll your mouse over & you will see "Connection Setting". Click on it, & disable the Checkbox next to "Allow USB Connections". After you do this the Computer will no longer try to sync with the device, but it still connects as an external device {allowing you to veiw your device in explorer}.
After you have disable the syncing, you need to adjust the power settings on your device. Set the device to sleep while on external power.
Personally I use the screen toggle alot. I use my device with Inet sharing when I can't get a WiFi signal on my laptop. I have SPB Pocket Plus installed, which includes a screen toggle.
Thanks for your reply. I'm actually using WMDC however thanks for showing up this possibility.
I installed pBar 1.5 a few days ago which also features a screen toggle button.
Apart from that I'm quite happy with Myster-D's solution.
Whats up XDA.
So I have a galaxy tab sch-i800 running on cyanogenmod 9. I plan to fit my tablet into the dashboard of my car, I have everything worked out except how I'm going to turn it on and off. since I won't be able to access the power button I need a way for it to power on/off by its self, that way its not occasionally dead when I start my car.
At first I planed to use tasker to turn the tablet on when plugged in (or when I start my car, it turns on). and then turn off after an hour of inactivity (or an hour after I've turned off my car).
But now that I'm looking at tasker it won't let me use the command "turn on" (even though I'm rooted) and I don't see a turn off command.
Is there any apps out there that can help do exactly what I want?
I have noticed that 4.2+ automatically boots when it is plugged in, I'm on 4.0, would upgrading screw up cyanogenmod?
Thanks!
Auto On/OFF
Carson-TL said:
Whats up XDA.
So I have a galaxy tab sch-i800 running on cyanogenmod 9. I plan to fit my tablet into the dashboard of my car, I have everything worked out except how I'm going to turn it on and off. since I won't be able to access the power button I need a way for it to power on/off by its self, that way its not occasionally dead when I start my car.
At first I planed to use tasker to turn the tablet on when plugged in (or when I start my car, it turns on). and then turn off after an hour of inactivity (or an hour after I've turned off my car).
But now that I'm looking at tasker it won't let me use the command "turn on" (even though I'm rooted) and I don't see a turn off command.
Is there any apps out there that can help do exactly what I want?
I have noticed that 4.2+ automatically boots when it is plugged in, I'm on 4.0, would upgrading screw up cyanogenmod?
Thanks!
Click to expand...
Click to collapse
To Switch ON
I think you may have to rewrite the Bootloader code to switch ON the Tab when Charging starts instead on that Large Green Battery Animation. Search it ..
Hint : I have seen it(the code) somewhere while I was looking for OTG in P1000.
To Switch OFF
Try these apps and do post their results
MarcroDroid
Carson-TL said:
Whats up XDA.
So I have a galaxy tab sch-i800 running on cyanogenmod 9. I plan to fit my tablet into the dashboard of my car, I have everything worked out except how I'm going to turn it on and off. since I won't be able to access the power button I need a way for it to power on/off by its self, that way its not occasionally dead when I start my car.
At first I planed to use tasker to turn the tablet on when plugged in (or when I start my car, it turns on). and then turn off after an hour of inactivity (or an hour after I've turned off my car).
But now that I'm looking at tasker it won't let me use the command "turn on" (even though I'm rooted) and I don't see a turn off command.
Is there any apps out there that can help do exactly what I want?
I have noticed that 4.2+ automatically boots when it is plugged in, I'm on 4.0, would upgrading screw up cyanogenmod?
Thanks!
Click to expand...
Click to collapse
What you hope to accomplish with it turning on from a full power off is not possible without rewriting the bootloader or somehow rewriting the power switch (open the tab, solder wires to the switch terminals, and use an external relay or transistor to short the wires).
I've made car install of the Nexus 7 (Citroën DS5 French car, here is one dedicated topic).
My installation is Nexus 7 2012 with Timur USB Rom + USB camera for rear view.
When I start the car, the tablet is going back from sleep mode and all the USB are also powered on the same time.
The consequence is few seconds after going back from standby, an automatic prompt appears asking if "USB Camera Pro" is the right application to launch as the USB camera is detected. If I click on 'Ok' and choose by default, as soon as the tablet goes back from standby, the Camera app launches.
And I don't want this. I prefer being able to start the application manually.
Do you know if there is possibility to disable this?
Thank you for help.
Hi,
I have discovered one problem (in my phone, stock ROM 5.1) with AA: When I start one voice command... after some time without using AA (some minutes driving with the car), sometimes the AA don't responds. The mic is stalled and the voice command isn't recognized. I discovered that the problem is that the phone is "Deep Sleep" mode... Then if I touch the power button, and the Lock Screen appears, then the voice commands restores normal behaviour.
So, I ask: It's a way to maintain the LockScreen on when AA is connected? I feel the power ins't a problem as the device is connected with the USB port.
Disable screen timeout ? Or enable "Stay Awake" in developer options ?
Or just unlock the screen and leave it at the dark "android auto" screen ? For bonus points, hit Recents, then Home to switch to the usual home screen.
AA puts the phone into car mode, which is usually enough to keep the screen on.
SmartLock
Look into "SmartLock" . Mark your car radio as a trusted connection and the phone will not lock as long as it is plugged into it.
BPryde said:
Look into "SmartLock" . Mark your car radio as a trusted connection and the phone will not lock as long as it is plugged into it.
Click to expand...
Click to collapse
Yes, thank you! I know, but I don't like to do this at all! Why? I don't like to "auto unlock" my phone... this is completly unsecure. I have a secure PIN and I like to use it all the time. So the problem, isn't the "lock" of the device, the problem is that it can enter in "deep sleep" or similar state when AA is running. I like to forbird this without unlock the phone.
Some other idea?