yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] redeyedjedi:
Every recovery for nexus 7 needs to be modified to account for all the Google spyware/bloat. /system needs to be bigger than 650mb cause the only thing we know for sure about Google is more spyware and more bloat and more apple is all we got coming. I say minimal gapps, ALWAYS for PRIVACY. Then I'd say start with cm11 or some other user friendly base.

Starting from scratch......If you flash mkernel first, then my kernel....you will have a suitable ramdisk and kernel. If coming from cm11 or anything else, a lot of this is already taken care of. Remember, a stock install is full SELinux, NO root, NO R/w access to system, etc. I'd HIGHLY recommend starting with something other than stock because stock is so counteractive. The other thing is gapps......kitkat is 150mb and for you guys who run out of room and can't fit 97mb of modules......this means that gapps alone are consuming over 403mb of your /system...... I don't even knw what gapps package that is but it's almost three times the size of your OS......and I AM ABSOLUTELY sure that most people dontneedmost of the junk in there.

I almost guarantee problems using a stock kitkat based ROM.

To Mugga: I dunno what to say, I'm out of ideas. It works for me. I flashed smoothrom, then my kernel and module script, reboot, install carcam, IT WORKS. I haven't ran a stock ROM on my tablet for more than five minutes the entire time I've had my nex7......but in smoothrom, cm11, purity, and usbrom, my ESCAP is tested and working on all 4.

If those terminal commands didn't work, do you even have root?? I fail to see how those commands didn't work. I'd like to see a logcat after trying with mkernel ramdisk, that permission error should be gone. I guess I'd have to say to go post in the carcam thread that you have an EzcaP at /dev/video0 but no picture. It sounds like an app issue with carcam now. The modules are WORKING..... But kitkat isn't playing nice. I'm sure he could help you more than me if you show him an error log from the app. Sorry.....I like to see others have success but you got my ideas all tapped out for now.
[Nexus 7 Android Development] BowDown:
Anyone else having Bluetooth Internet issues?

I paired the tablet with my phone. Bluetooth tethering is enabled on the phone.. the tablet sees the phone, but even though the "Use this connection for internet" checkbox is selected on the tablet it does not use my phone. For that matter I can not deselect and reselect this option. It stays checked no matter what. I know my phone/tablet setup worked with USBROM. Any ideas on how to fix this?

Kernel is installed on 4.3 after MKernel.
[Nexus 7 Android Development] _crue_:
Glad to represent :) to you all my new app

http://xdaforums.com/showthread.php?t=2635159

An manager for resistive buttons (remote steering wheel controls) connected to arduino controller (tested only on arduino).

but should works with any usb serial device :)
[Nexus 7 Android Development] NoXXX:
Oh, you'd better do a patcher for USB DAC with volume support :)

By the way, I made arduino-based adapter for Skoda/VW/Seat/Audi cars :)
[Nexus 7 Android Development] redeyedjedi:
I dunno.....every cm11 after jan20 has broken Bluetooth. Are you on another rom? I don't know how I could test this...... I don't have tethering on my phone. I can say Bluetooth is working for me but I cannot verify tethering. Cm11 has USB tethering built in but as far as Bluetooth I'm hearing people say to roll back to at least jan 20.

Selinux is disabled so on the kernel end you should be set. If I hear or see anything else about it I'll let you know.
[Nexus 7 Android Development] BowDown:
Ah, I am on 1/31... I will try downgrading.
[Nexus 7 Android Development] redeyedjedi:
For DAC on boot.......did you use small/backsmali to patch all that in?? I'm trying to manually patch services.jar for a couple of the more popular ROMs so people can just download services.jar and have full DAC support.
[Nexus 7 Android Development] _crue_:
patch is ready :) but only for manual installation

app for that (windows app) not useful

maybe if I have a mood I will write android app, but this will takes a time

in zip files for patching services.jar (WiredAccesoryMemenger) and framework.jar (Audio....)

Do not use with old patcher app

only for manual install
[Nexus 7 Android Development] NoXXX:
Well, maybe you'll share it with me? I want DAC on boot and hot-plug and volume and charging at once NAO!!!1 :)

Really, pls, share it with me, please please please!
[Nexus 7 Android Development] _crue_:
I've added it it prev post.

but your adapter :)

Does your adapters support app running, tasks, media and 2 button states click and hold? :)
[Nexus 7 Android Development] NoXXX:
Eeerg ... what should I do with all these smali files? :(

My adapter supports media buttons and 2 states of each button (except of volume - only one state). But it is preconfigured.
[Nexus 7 Android Development] _crue_:
this is the patch :) somewhere here was a link on a thread with good description how to install it manually
[Nexus 7 Android Development] redeyedjedi:
use backsmali to decompile services.jar and framework.jar and replace old files with new ones.....then recompile. this is what the jacknorris patcher does. we do it manually with timur files and we'll have dac on boot and hotplug dac and otg charging......

you would need volume control too......but I have that file already that I can share....but its useless without the rest of the patch.
[Nexus 7 Android Development] Mugga:
[MENTION=4035939]redeyedjedi[/MENTION]

I now reverted to cm11 build with micro gapps, mkernel, and after that your kernel. And now I got CarCam working. Thx for you help.

[MENTION=5546006]_crue_[/MENTION]

I got a question related to your PowerEventMgr: The firm sleep is not working reliable for me. I tried several versions of your apk and different roms. All with more or less the same issues. Sometimes the tablet goes to sleep, sometimes the counter starts, and then aborts, and sometimes there is nothing happening.

I've read that you did a tasker plugin. How can I send the tablet to sleep via tasker? When I create and action over the plugin section, and hit configure, I can only choose "skip countdown", thats everything.
[Nexus 7 Android Development] _crue_:
The firm sleep - is a kernel feature.

1. try to re-install PowerEventMgr, delete it first .

2. make sure you are using kangaroo kernel

3. install PowerEventMgr, go in settings and sweep fixed_install mode to on/off - to grand root permissons (will appears dialog from SU)

4. after permissions is granted set all settings you want, firm sleep, fixed install mode etc.

5. close the app, open notification bar, press sleep button, table should go to sleep

6. using with tasker - create new task, select in plugins PowerEventMgr, press edit, check box used for control count down screen appearing or not. press save button is action bar. use the task as you want.

in app nothing extra special, just code of ui :) for managing kernel settings and putting table in sleep (putting in sleep done in some way as if you press power button)
[Nexus 7 Android Development] NetFluke:
Fix for charge in deep sleep

[MENTION=4035939]redeyedjedi[/MENTION]

Please find attached file resolving deep sleep charge issue. Took a while to find this bug...

Fix is commented with my nik.

Thanks for your great work!

Update: sorry, this patch did not work, so I deleted it. Must test kernel only on minimal ROM setup, otherwise other apps affect deep sleep.

Will continue...
[Nexus 7 Android Development] redeyedjedi:
thank YOU too. this looks good. I will test it and make sure it doesnt affect anything else and push it to git. Im not doubting you for a second tho..... this should allow charging to go faster.
[Nexus 7 Android Development] redeyedjedi:
I would much appreciate if you can find this link or perhaps try and recall how you did it. Im no good at this stuff with backsmali..... Im just trying to figure out a method to do this, all my attempts have failed.

I will be sure to update OP with info about your resistive button app. I plan to buy an arduino board to play test this myself. If you need any updated or additional serial drivers let me know.

Could the opposite be achieved?? could an arduino be used to send variable resistance signals to an OEM deck/ or adapter and aftermarket deck??
[Nexus 7 Android Development] NetFluke:
One issue still remains - if you plug in USB cable connected to PC in deep sleep, device will not charge (but MTP/ADB will work fine). This one is infrequent and will be hard to trace - I had to leave device untouched for 15 min. Sorry.
[Nexus 7 Android Development] _crue_:
Actually arduino can send changed voltage, but with limits to it's own onboard (this will simulate resistance). You have to do own researches.

I dont know :) you can try to split wire to interact with both. I know arduino can also snif can bus. But how it shoul be done ans what arduino board should to be used i don't know. Basicly everything what related to arduino is up to you, I've provided an example where you can check what to sent by serial from arduino to android to get click and hold action.

I dont neeed any drivers I,m using an soft libruary for communicating with arduino. I'ts supports 4 types of serial usb devices, I hope It will be enought, otherwise I will need to update libruary code. But now no need in this, all arduino devices shuld be handled as well
[Nexus 7 Android Development] redeyedjedi:
I was thinking about literally using fixed resistors and switch functions of the arduino......many different models should work.. interesting stuff to try when I get time.

ive been lookin for info about patching those jar files and still cant find anything. are smali and backsmali all I need? im trying with apktool but my recompile jar files are actually "classes.dex" and when I use dex2jar to convert them the new jar files are way different size than the original.....and I got bootloop. I still cant figure this stuff out. I saw where jacknorris was gonna post manual instructions but couldnt find them.
[Nexus 7 Android Development] _crue_:
Smali and backsmali should 1.4.1. This vesrion was used for creating a patch
[Nexus 7 Android Development] redeyedjedi:
ok....so with those versions and a little tinkering a made a patch successfully for the 1/29 version of purity rom. Dac hotplug works and volume control works, but no dac on boot. TO get dac on boot, I dont have to unplug my otg-y cable from the tablet, and I dont have to unplug the sound card from the otg y-cable, but I do have to remove power once and re-aaply, then the DAC does work......so in a car install this would mean that upon reboot, youd have to briefly turn the ignition off then back on...... I am curious, is this how it worked for you?? or do you have full dac on boot immediately with the patch (4.4.zip) you uploaded? im pretty sure this is minor but Id like to know how it is for you.
[Nexus 7 Android Development] _crue_:
it works on boot fine, just on boot it takes more time (rom onboot triggered very late)

I will release in few days (approx. on weekend) android app for patching

I've already started working on it.

If you have a time just wait on it.

I've found a bug in usb host.

step to reproduce.

1. re-boot tables (with plugged OTG). afrer boot everyhitng works fine

2. unplug OTG

3. plug OTG (missed some devices)

4. unplug OTG

5. plug it again (everything works fine)

all next plug/unplug don't give issues
[Nexus 7 Android Development] redeyedjedi:
OK thanks, Ill wait longer and see if it works. Ive figured out how to patch the files now....but this would be useful to many others.

With respect to the bug.... I will try and re-produce it and see what the dmesg shows......You on kitkat? which rom?

thanks again.
[Nexus 7 Android Development] _crue_:
stock ROM kitkat
[Nexus 7 Android Development] redeyedjedi:
ok I will see what i can find
[Nexus 7 Android Development] redeyedjedi:
just waited five minutes, no dac on boot...... pull power from otg-y cable for 1 second and replug....dac works. again, in a fixed install this shouldnt be an issue, just turn key off for one second and back on and ONLY the first time the tablet boots up, not again ever after that except once whenever tablet is rebooted...but still I guess not really dac on boot. not an issue for me, but just not quite perfect either.
[Nexus 7 Android Development] _crue_:
strange? I will test it again? but I've tested it a few times and everhyting works fine on boot for me.

did you patched original files or patched before?
[Nexus 7 Android Development] redeyedjedi:
used the ones you upload in 4.4.zip....is there a newer one?? I was thinking maybe purity had something different from stock kitkat, but I dunno.......i guess it could be my dac, its got pcm2704 but its not anything fancy or expensive. If you are going to make a patcher that can also do the framework JAR, Ill just wait.

Ill have a look at that bug you just reported.
[Nexus 7 Android Development] redeyedjedi:
Nevermind....I am a complete IDIOT!!!! Once i set fixed install mode to "ON" dac on boot worked just fine!!!! your patch is good, I just forgot that one important detail! so on the 1/29 purity release it is all working like it should......great news!!!

I unplugged and replugged the otg cable many times, and my dac was still working, so i did not have an issue with recognizing my otg devices on the second try. I will download a stock version of kitkat and see if I have any problems... but at least on the same 1/29 purity build, I did not have the otg problem you are describing. Ill get back to you after I test a stock rooted rom.

I just looked to see if this patch would work for 4.3, but the audioservice is way different than the kitkat version....

any chance you could make this patch for 4.3??
[Nexus 7 Android Development] _crue_:
I hvae mutiple devices plugged, DAC, OBD, Arduino, maybe the issues in count?
[Nexus 7 Android Development] redeyedjedi:
i dunno..... Ill fill up my usb hub and retest and let you know.
[Nexus 7 Android Development] flamand:
Cifs doesn't seem to be implemented in your kernel. I've tried different ways to create mount points but none of them work. If you'd like to include cifs, may be you should have a look at what mkasick says:

http://xdaforums.com/showthread.php?t=2106480​

I know it's possible because vorcers kernel has working cifs.
[Nexus 7 Android Development] redeyedjedi:
I've never tested it but the module is there and selinux is disabled. So, there is something else I've missed somewhere. My next release In gonna use a ramdisk finally, ill make sure to include the needed bits. In the meantime you can flash vorcers kernel first then mine and using his ramdisk maybe it will work. I will have to do some digging on github and see if there is something else. If you try and it does end up working please let me know. Consider this on the to do list.
[Nexus 7 Android Development] Ssyyddii:
Please excuse my ignorance but how do I flash this patch on my nexus 4 cm11 ?
[Nexus 7 Android Development] _crue_:
Usb Audio Patcher updated.

- added new version of patch for 4.4 > ROM (support plug on boot, volume, added extra volume levels)

- replaced some tools (from now adb should be installed and added to the windows path)

- changed some functionality responsible for odexing patched files

backup files and patched files could be found in /data/afp-tmp/(original/patched)

PLEASE: do not apply patch twice (restore original files first)
[Nexus 7 Android Development] _crue_:
patch for CM11 will be ready in a few days
[Nexus 7 Android Development] redeyedjedi:
This patcher only works on stock/odexed ROMs. Most people wont find it useful....but the patch within can be applied to ANY kitkat rom with smali/baksmali and it does work. Ive tested on purity rom and cyanogenmod........ if crue is unable to get this to work I will post instructions on how to do this "the hard way". Much props to crue tho.......he really is a coding maniac!
[Nexus 7 Android Development] _crue_:
Actually this patcher could be applied to odexed or deodexed Rom, not only for odexed.

but tested only on odexed .

will be good If some one could try it on deodexed Rom.
[Nexus 7 Android Development] redeyedjedi:
I tested on cm11 and purity...... it errors out.... does not work. I was thinking it shouldnt matter but I remember you saying it prolly wouldnt work on deodexed. I guess you fixed it. When I get home later I will post a pastebin log of the errors that pop up when I run it......
[Nexus 7 Android Development] NetFluke:
SMALI from CM11 OTG

[MENTION=5546006]_crue_[/MENTION]

As you requested - taken from latest Zeljko1234's ROM.
[Nexus 7 Android Development] _crue_:
my patch is for stock based ROM's

for CM11 based use patched added by NetFluke

thanks :)
[Nexus 7 Android Development] redeyedjedi:
just got done with some initial testing and I finally got the rtl2832 drivers backported from the latest on linuxtv git. GOOD NEWS!!!!! the r820t tuner is working. I dont live in an area where I can use it for tv but I did run the droidtv app and it did scan properly i just didnt find any channels. The tuner I used was a newsky dvb28t i think, 15 bucks on fleabay.... but the r820t did successfully initialize. I went ahead and pushed all the new driver files to git...... and when i get a chance I will upload the new modules, but they are buildable from git. Now I will try to figure out cifs shares, and I also want to make a ramdisk that will support ezcap devices regardless of ROM (if this is possible) then my next release will be ready.
[Nexus 7 Android Development] _crue_:
could I try this drivers :) please.

but I can not build them myself from git (I have no environment for that)

but :) it's really good news :) thanks a lot for this
[Nexus 7 Android Development] redeyedjedi:
yes sir.... Ill upload kangv2 with the new modules..... THEY WORK!!!!!

EDIT: HERE YA GO!

KANG V2 with support for new rt2832 devices including r820t tuners:

http://d-h.st/F0M
[Nexus 7 Android Development] redeyedjedi:
Edit
[Nexus 7 Android Development] redeyedjedi:
Let me know how it works for you......I'd like to confirm it.

This is the init.d script I use. Notice the renaming of the rtl2832.ko module:

d-h.st/NIE
[Nexus 7 Android Development] _crue_:
looks like I'm doing something wrong

looks like :) my fail? I've tried on old kernel, there must be other linux version :)

with installed kernel :) everything works perfect :)))))))))

thanks

---------- Post added at 12:39 AM ---------- Previous post was at 12:03 AM ----------

strange, it's scanning but nothing found :(
[Nexus 7 Android Development] redeyedjedi:
sweet, it was detected by droidtv and is scanning... good to know. As far as getting channels, I dont think I can help becaue Im in the U.S. we dont have dvbt. I can use my stick for radio and it does work for me. the antenna included is really weak tho....maybe thats your problem....I would enjoy seeing a picture of video received with an r820t but I cannot do that where Im at.

there is source code for droidtv and it has occurred to me that for kitkat it may need elevated permissions. The carcam app used for easycap devices works in cm11 but not stock or purity rom and I still have not figured out what permissions allow it to work in cm11 and not work in other kitkat roms. I think maybe droidtv app could have the same problem..... it needs elevated permissions to access the video stream.

The manifest may need to have the camera/video input access permissions added to it. I dont know, Im just excited that the drivers compiled and are working. If i can fix permission problems with a ramdisk, Ill figure it out. If you want the source code for droidtv is on github somewhere... Ive got a copy of it.
[Nexus 7 Android Development] Mugga:
Hmm, I really tried everything but its not relabily working. I really dont know what could be the problem, I tried several rom versions. Regarding tasker, I tried an older version of the PowerEventMgr and with that sending the tablet to sleep was working. I think for me the last 2 versions before your last update were broken.

[MENTION=4035939]redeyedjedi[/MENTION]

I've read that you are interested in the arduino thing, here is what I've been doing with an Arduino + Bluetooth module + Can-Bus shield:

http://www.youtube.com/watch?v=7hGU7GLSBEs&feature=youtu.be

I'm reading all the data directly from the can bus (instead of using and OBD2 adapter), and my Arduino is sending the data directly to the Nexus, were my own written app is reading these values. This way I could for example use my steering wheel controls.
[Nexus 7 Android Development] _crue_:
You are the first one who has such problems.

I don't know what to suggest to you, there actually everything so simple,

Could you make a video?

:) You are not a first one :)

http://xdaforums.com/showthread.php?t=2635159

here is my app for communicating with Arduino :)
[Nexus 7 Android Development] Mugga:
At the moment I switched back to timurs usb rom, but I will give it another try. Maybe it's because I got the 3G version and I have to use 3G roms.

Regarding the arduino:

Impressive work you did there. Sadly I couldn't get my arduino talking via usb with my nexus. I tried several apps and libraries, but nothing. This is the reason why I switched to bluetooth.

I'm not really sure I got it right with your setup. Are you connecting the steering wheel buttons to the arduino and the arduino is sending the data to the android device. Or are you simulating key presses via the arduino to control in car systems?
[Nexus 7 Android Development] _crue_:
I have resistive controls (for can bus you have to use different sketch), directly connected to arduino, arduino receives button event and buttons resistance and send via serial to android, where my app listening it and doing that was set up for this button and event.

I've checked your video, what app are you using for showing OBD information? looks really nice, and very nice installation.

RE. PowerEventMgr.

if your kernel setting files (usbhost_fixed_install_mode, .....) placed not in "/sys/kernel/usbhost" PowerEventMgr will not works.

you could try to make hard link from your folder to "/sys/kernel/usbhost"

I didn't know that this kernel works with 3G devices?
[MENTION=4035939]redeyedjedi[/MENTION] is it?
[Nexus 7 Android Development] andrew9292:
Update/correction

1. Actually dont need to patch as the DAC is hot-plugable on PA3.99 RC2 without the patch, just install the kernel and it all works :highfive:

2. Plug on boot doesnt work as i mentioned earlier. You must start it up, then connect your DAC at any point. Bad for fixed install folks. My bad, probably moved my otg cable and it refreshed the connection earlier. Got a new tight virgin one today to reconfirm all tests.lol :cool:

3. Unplugging DAC stops/pauses playback too, at least tested on Google Play Music and Youtube. You can then press play again and it will resume thru the jack or speakers.

4. Heads up there is a catch tho, while running DAC the volume will either be 100% or nothing. Usefull if you have means of volume control down the chain or on your dac. Volume patch for /system/lib/hw/audio_policy.default.so by jacknorris does not work, it will break all audio in the rom. Hence this may still be a long journey as both kernel and rom must have the proper stuffs for full support.

I retract my previous statement on bad PA performance. After a couple reboots it's pretty snappy. Gonna relax for awhile.

Next stop, smoothrom. Any tips or pointers, do's or dont's? How to flash that hotplug mod tho? AFAIK it supports up to 4.2.1 and wont do anything above it...