Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

* * * * *
17 votes

Timur's Kernel - USB ROM - Most popular thread on Rootzwiki

  • This topic is locked

jayman488

jayman488

Member

Posted 04 May 2013 - 07:49 AM #2321

In order to sync media to my hard drive, I am going to have tasker switch the N7 into OTG mode so it powers the drive from battery. Then when the sync is done, switch back to FI mode and everything shuts off. Testing this, I realized the N7 doesn't provide enough power to spin up the HDD. So I started thinking of a way to have the car battery power the USB hub when the N7 is in OTG mode. Now, I'm no electrical engineer, but here's what I came up with:


Posted Image

- When the IGN switch is open (car is off), the battery doesn't power anything.
- When the IGN switch is on, the top relay closes, allowing 12v battery power to the 5v converter, and on to the USB hub and the N7 (via the bottom switch of the top relay).
- When the IGN switch is off, and the N7 is put into OTG mode, it powers the coil on the bottom relay, which closes and allows battery power to flow to the 5v converter and the USB hub. Note that the N7 is not powering the USB hub, just the bottom relay coil. The car battery is the only thing powering the USB hub.
- When syncing is done, N7 switches back to FI mode, the bottom relay opens and 12v power is cut off.

Anyone see any problems with this?
  • 0 Likes

snake212

snake212

Member

  • 10 posts

Posted 04 May 2013 - 04:25 PM #2322

Hello guys, Anybody notice Google Voice Search not working or is it just me?
  • 0 Likes

Statts

Statts

Android Lover

  • 140 posts

Posted 04 May 2013 - 05:04 PM #2323

Hello guys, Anybody notice Google Voice Search not working or is it just me?


Are you using a language other than English (US)? I found a work around with regards to it crashing on opening and it had to do with Language settings. I'll find it when I'm on my PC and post it
  • 0 Likes

Statts

Statts

Android Lover

  • 140 posts

Posted 04 May 2013 - 06:15 PM #2324

Trouble shooting time. I have my 1TB HDD (NTFS formatted) connected via my 4 port hub, and it isn't presenting files to MX Player, Apollo, etc, however it does show up as a connected device under USB ROM Settings. Where should I start looking for the root of the problem?
  • 0 Likes

BarberAE

BarberAE

Android Lover

Posted 04 May 2013 - 06:30 PM #2325

Trouble shooting time. I have my 1TB HDD (NTFS formatted) connected via my 4 port hub, and it isn't presenting files to MX Player, Apollo, etc, however it does show up as a connected device under USB ROM Settings. Where should I start looking for the root of the problem?


Do you have a .nomedia file on the drive? Showing up with a file manager?
  • 0 Likes

Beakfire

Beakfire

Average Android

  • 4 posts

Posted 04 May 2013 - 06:48 PM #2326

In order to sync media to my hard drive, I am going to have tasker switch the N7 into OTG mode so it powers the drive from battery. Then when the sync is done, switch back to FI mode and everything shuts off. Testing this, I realized the N7 doesn't provide enough power to spin up the HDD. So I started thinking of a way to have the car battery power the USB hub when the N7 is in OTG mode. Now, I'm no electrical engineer, but here's what I came up with:


Posted Image

- When the IGN switch is open (car is off), the battery doesn't power anything.
- When the IGN switch is on, the top relay closes, allowing 12v battery power to the 5v converter, and on to the USB hub and the N7 (via the bottom switch of the top relay).
- When the IGN switch is off, and the N7 is put into OTG mode, it powers the coil on the bottom relay, which closes and allows battery power to flow to the 5v converter and the USB hub. Note that the N7 is not powering the USB hub, just the bottom relay coil. The car battery is the only thing powering the USB hub.
- When syncing is done, N7 switches back to FI mode, the bottom relay opens and 12v power is cut off.

Anyone see any problems with this?


Keep in mind a relay is essentially an electrical short in a DC circuit. It'll represent a high resistance at first when power is applied to it due to the change in voltage on the line, but milliseconds later it's a dead short with the magnetic field around it that will keep the switch closed.

I have my USB hub externally powered from the car, here's a schematic of what I did. My Nexus 7 does still apply power to the hub, I wasn't sure if it was necessary or not for the hub to work, but the hub also has a 5VDC @ 5A input on it to power the devices. I've noticed when I plug USB devices into it USB-ROM does not state that the Nexus 7 is powering slave devices, so I'm assuming the hub is.

To accomplish this I just cut the AC power adapter that came with the hub. Since it was a 115VAC to 5VDC @ 3A converter I just cut the cord on the DC end and soldered it in to my chinese car P/S.

I am having an issue though, it seems as though my Nexus 7 is continuing to power the USB Hub when I shut off the car and is draining my Nexus 7 battery. The power light on the USB hub goes out once car power is removed (it'll come on from either USB OTG power or the chinese 12-24VDC to 5VDC converter), but it continues to slowly draw power from my nexus.

Right now I have it unplugged and just have the Nexus 7 plugged into power, I'm running my audio from 3.5mm to a stereo input, but planning on swapping over to USB DAC soon.

For what it's worth, this will get you 5V power to your hub, just not sure if my cable is creating the problem I have (doubt it) or the hub is retaining some state and slowly leaching some power.

I'm planning on updating to the 5/3 USB-ROM once it's released and hopefully it'll be fixed or I'll have to figure out if its the hub or my cable by allowing the N7 to power the hub by itself and see if it retains the same problem


Almost forgot, the 12V I wired into on the car is on my ACC fuse which is switched by the ignition.

Attached Thumbnails

  • My setup.jpg

Edited by Beakfire, 04 May 2013 - 06:52 PM.

  • 0 Likes

RED ZMAN

RED ZMAN

Founder - Soulhamsters.com

Posted 04 May 2013 - 09:14 PM #2327

Thanks mate. :)
I will release the flashable bootanimations as soon as Timur publicly releases the latest beta.

What do you mean by "multi-colored"? What do you have in mind?

I should make something clear though. The version included in the USBROM is the oficial one... unless Timur decides otherwise. I'm thinking of making a few custom ones though. But I'll start a dedicated thread for it. Maybe tomorrow. Maybe... I haven't decided on this yet.


Oh, I guess you didn't see the thread I posted with all the other colors of the boot animation...

http://forum.xda-dev...d.php?t=1886317

I've seen these in different sizes in different threads on different sites, but the multi color one is awesome. Would be better with your USB ROM logo on it.

Posted Image

Others would let folks put one on that matches their interior lighting, whether ricer lighting or just OEM lighting. LOL

Feel free to post them in my thread in the Themes section. I'm hoping to mess with this boot animation factory soon. Do you have some files you can share for the USB Rom logo part of the animation?

I think everything is good other than the boot animation for me now. I'm going to finally mount this in my dash on Monday.
  • 0 Likes
Owner/Founder - http://www.soulhamsters.com
The greatest Kia Soul Community online, 'Get in the Cage!'
2010 Kia Soul "Project Nexus" In Dash - USB ROM
Posted Image

RED ZMAN

RED ZMAN

Founder - Soulhamsters.com

Posted 04 May 2013 - 09:20 PM #2328

Few other sizes...

http://forum.xda-dev...d.php?t=1850894
  • 0 Likes
Owner/Founder - http://www.soulhamsters.com
The greatest Kia Soul Community online, 'Get in the Cage!'
2010 Kia Soul "Project Nexus" In Dash - USB ROM
Posted Image

OP Timur

Timur

Android Master

Posted 05 May 2013 - 12:46 AM #2329

I have extracted the interesting info (packagename, type and repeatInterval) and brought it into a more readable format. Type 0 and 2 are the events, that will actually wake a device from deep sleep, afaict.

android type=0 when=+2h0m16s263ms repeatInterval=0
android type=0 when=+56m53s514ms repeatInterval=3835337
android type=2 when=+11h27m1s847ms repeatInterval=0
android type=2 when=+1h57m38s637ms repeatInterval=0
android type=2 when=+40m21s507ms repeatInterval=1800000
com.google.android.apps.maps type=2 when=+23h55m52s933ms repeatInterval=0
com.google.android.apps.maps type=2 when=+12h26m5s100ms repeatInterval=0
com.google.android.apps.maps type=2 when=+25m21s507ms repeatInterval=900000
com.google.android.apps.maps type=2 when=+2m19s428ms repeatInterval=0
com.google.android.googlequicksearchbox type=0 when=+2d2h56m31s836ms repeatInterval=0
com.google.android.googlequicksearchbox type=2 when=+27m5s120ms repeatInterval=1837809
com.google.android.googlequicksearchbox type=2 when=+11m33s257ms repeatInterval=906124
com.google.android.googlequicksearchbox type=2 when=+11m5s264ms repeatInterval=0
com.google.android.gsf type=0 when=+10h58m4s172ms repeatInterval=39707000
com.google.android.gsf type=2 when=+11m45s408ms repeatInterval=0
com.google.android.gsf type=0 when=+26m17s274ms repeatInterval=1800000
com.google.android.location type=2 when=+23h57m34s638ms repeatInterval=0
com.google.android.location type=2 when=+23h47m55s275ms repeatInterval=0
com.google.android.gms type=0 when=+9h56m5s128ms repeatInterval=86400000
com.google.android.gms type=0 when=+3h29m24s569ms repeatInterval=0
com.google.android.partnersetup type=0 when=+6d23h56m3s629ms repeatInterval=0
com.google.android.apps.plus type=0 when=+2s374ms repeatInterval=0
com.android.vending type=0 when=+23h56m44s798ms repeatInterval=0
com.android.providers.calendar type=0 when=+21h57m43s544ms repeatInterval=0
com.levelup.beautifulwidgets type=0 when=+26m19s879ms repeatInterval=1800000
com.cyanogenmod.lockclock type=0 when=+26m9s212ms repeatInterval=0
com.mega.n64.emulator type=0 when=+10m21s535ms repeatInterval=14400000
com.espn.score_center type=2 when=+11m7s96ms repeatInterval=900000


Q: Why do users not get a chance to see / control any of this?



excludeCreatorPackagesFromSoftEvents lets you control this now

In order to prevent a set of specific wake-up events from firing, you can do this:

su
echo "(com.levelup.beautifulwidgets)(com.mega.n64.emulator)(com.espn.score_center)" > /data/excludeCreatorPackagesFromSoftEvents

Or you can do the following, to prevent practically all wake-up events from firing:

su
echo "(com.google.android.apps.maps)(com.google.android.googlequicksearchbox)(com.google.android.gsf)(com.google.android.location)(com.google.android.gms)(com.google.android.partnersetup)(com.google.android.apps.plus)(com.android.vending)(com.levelup.beautifulwidgets)(com.mega.n64.emulator)(com.espn.score_center)" > /data/excludeCreatorPackagesFromSoftEvents

It doesn't matter how long the list of package names is. Please note that wake-up events with package name "android", "com.android.providers.calendar" and "com.cyanogenmod.lockclock" should not be disabled. (They do provide useful functionality.) Also note, that the device will need to be rebooted, for changes to /data/excludeCreatorPackagesFromSoftEvents to take effect. This is because wake-up events are usually registered during the boot process.

Edit: You can verify the effectiveness of this configuration by again running "adb shell dumpsys alarm > dump.txt" post reboot. If anything goes wrong, just remove the file to revert to default:

su
rm /data/excludeCreatorPackagesFromSoftEvents

Implementation details

"Firm sleep" is a kernel functionality. "Firm sleep" (when activated) will prevent all wake-up events from firing, while the device is in deep sleep mode.

"ExcludeCreatorPackagesFromSoftEvents" works on the API level. It will prevent the given wake-up events from being registered. These wake-up events will then not appear in "dumpsys alarm" and will therefor not fire at all (sleep or wake).

The two features can be combined. You can activate "Firm sleep" to prevent all wake-up events while in deep sleep mode. And you can configure additional events to also not fire when the device is awake.

I found this interesting read about "Android Alarm Timers": https://lwn.net/Articles/429925/

If you use "ExcludeCreatorPackagesFromSoftEvents" to disable specific wake-up events from firing, please provide feedback about any disadvantages you experience. And also, if you do not experience any disadvantages. Thanks.

Edited by Timur, 05 May 2013 - 11:42 AM.

  • 0 Likes

Statts

Statts

Android Lover

  • 140 posts

Posted 05 May 2013 - 04:40 AM #2330

Finally got my anti-glare screen protector on, and finished mounting up. So happy with the outcome, and of course none of this would have been possible without the hard work of Timur and invaluable help and contributions of this thread's regulars.

Thanks again

Posted Image
  • 1 Likes