Related
Here is my second attempt at including the collection of (what I understand them to be) fixes for the A2DP sound/function issue. I don't have a stereo BT device, so I'm depending on you guys to tell me if it works or not.
If it's good, I'll update the kitchen. If not, I'll go back and keep trying.
This is dogfood - so it's what I use. Don't like it? Don't use it.
This one is right outta the original InGeNeTiCs 318 rom base dump. It was a virgin when I got it
Included apps:
Camera 3.0
Windows Media Player
Features:
8-Button Touch Comm Manager
Black keyboard like T2 and Black Dymond
Here's the post-flash numbers after cleaning nearly everything from startup:
Storage: 45.29
Program: 30.29
There is no compression in this one, so I would think with some playing, the program number could get a little better.
Oh, and it's damn fast too
Please let me know how it works.
Thoughts/FAQ:
Q: Why not add the latest Touch software?
A: The today plugin is slow, and after the novelty wears off, it would be nice to be able to remove it. The dialpad installs easier via the cab.
Q: What is the page pool size?
A: 6 meg.
Q: Why not release more flavors like you usually do?
A: I'm focusing on finding answers, not providing end-user product. I'm happy to share what I use and find, it's just not my priority right now.
Q: Is this a "Pandora" release?
A: No. It's just a 'polished' test rom to verify A2DP function.
Download link:
http://rapidshare.com/files/37693920/Bare_2nd_Try.zip
And if you absolutly MUST have a more "fulfilling" rom, here's my personal config:
http://rapidshare.com/files/37696107/Full_2nd_Try.zip
At the moment WiMax isn't properly working here (we are almost getting flooded, has been raining for a week), maybe i download it tomorrow...
You should inform the community that you are using the latest build (5.2.318, including a new bluetooth stack, at least more up to date than the one Faria used for his ROM), there are still a lot members using 5.2.1413 apparently slower and a higher battery drain. Looking foward to try your new kitchen...
Got skipping at 320kbps, retried the original InGeNeTiCs and got no skipping on the same song and what sounds like better stereo separation. Can anyone else confirm this? Let me know if I can do anything to help mattk_r
o/t... is there a way to force my custom extended rom to run on a pre-cooked rom? would make my life a bit easier
I've got skipping with 320kbits as well while using the sd battery fix, after change the registry entry the skipping was gone...
Hmmm. I didn't do the 'SD Battery Fix' specifically because of the skipping issues, so that shouldn't be the issue.
raventec, you clearly see a difference? If so, there's a couple more things I can do... but it's uncharted territory
You know you're at this a bit too much when you put out a rom and then spend the rest of the night having nightmares that you didn't have speed search working in the dialer...
There's definitely a difference on my end with my Bluespoon Spider's. I flashed back over to this one again and the skipping came back and it seemed to sound a bit muddy and less separation. I didn't install a bunch of stuff so that's not the reason. I hadn't installed anything the first trial at all. heheh didn't notice the speed search problem. I'd probably never be able to tell, since it's not a feature I tend do use I'll fiddle with this rom for a bit. Let's see what else I can break! Hopefully come Monday we can get more responses regarding the A2DP.
if it isnt related to the sd card power management it must be somehow a performance issue. I used Con. Pocket Player 3.2 and had skipping problems until i changed the player priority, it cant actually be the stack. Something else, just try to change the driver priority, lets say to 60
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\BtA2dpSnd\ Priority256=60
regards,
sorry cant test the rom, still operating on dial up connection speed...
4irm said:
if it isnt related to the sd card power management it must be somehow a performance issue. I used Con. Pocket Player 3.2 and had skipping problems until i changed the player priority, it cant actually be the stack. Something else, just try to change the driver priority, lets say to 60
HKEY_LOCAL_MACHINE\Drivers\BuiltIn\BtA2dpSnd\ Priority256=60
regards,
sorry cant test the rom, still operating on dial up connection speed...
Click to expand...
Click to collapse
nice tip, but do you know if this is active as a service, or only when the BT is connected? I'm just concerned that it could impact other operations when it's not in use by capitalizing on the CPU priority.
ok, I'm gonna post a new test rom that should be a good one, based on feedback from this and other setups. I'll update the first post once it's done, probably within an hour.
I just looked in the registry and it's already set to 60. HKEY_LOCAL_MACHINE\Drivers\BuiltIn\BtA2dpSnd\ Priority256=60
dammit, whats about ...software\microsoft\bluetooth\audiogateway\capability... i am running on 69.
additionally y can try to go a bit down with the BitPool (lets say around 55) and the MaxBitRate (around 70).
Btw, does the intensity of the skipping depend on the distance (device - headset)?
cheers.
That registry setting is 69 here as well 4irm. I'll keep the BitPool and MaxBitRate in mind and fiddle with them when I get a chance. Wasn't able to check to see if the skipping intensified the farther I moved away from the Wizard. I tested the same way with both rom's freshly loaded and reset after flashing without any added applications and no overclocking, same song which is a straight 320kbps without VBR to give as close of a test bed as I could. I'll snag the next one, see what happens and post what I can find.
Okay, there's the new file in the first post. It's very different than the base I had been using - so I'm hopeful that this will show some good results.
Thanks again for checking this out - I know it can be a pain to keep configuring your phone after every flash!
mattk_r said:
Okay, there's the new file in the first post.
Click to expand...
Click to collapse
this one cuts out. i'm about to install bs to see if that helps...
EDIT ...and it distorts the bass (i think that may be a bit rate setting?)
EDIT ...again ...bs and a soft reset didn't help, it still distorts the bass and cuts out at distances greater than 2-3 feet
question how did u intergrate this feature to the rom the A2DP
ANTC said:
question how did u intergrate this feature to the rom the A2DP
Click to expand...
Click to collapse
A2DP is already there - at least in this base rom. I added these registry settings, you might try changing them to see if the performance improves/changes:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Settings]
"MaxBitPool"=dword:55
"BitPool"=dword:46
"SampleRate"=dword:bb80
"UseJointStereo"=dword:1
If these settings really don't help, please remove then and try again. Damn, I gotta get a headset...
mattk_r said:
A2DP is already there - at least in this base rom. I added these registry settings, you might try changing them to see if the performance improves/changes:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Settings]
"MaxBitPool"=dword:55
"BitPool"=dword:46
"SampleRate"=dword:bb80
"UseJointStereo"=dword:1
Click to expand...
Click to collapse
when i used a tweak app to improve the A2DP i have these registries:
for GOOD:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Settings]
"BitPool"=30
"UseJointStereo"=dword:0
Maxbitpool and Sample Rate missed
Click to expand...
Click to collapse
for Excellent:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Bluetooth\A2DP\Settings]
"BitPool"=3a
"UseJointStereo"=dword:0
Maxbitpool and Sample Rate also missed
Click to expand...
Click to collapse
Off topic somewhat, but what's a good headset? I'm looking at either the Southwing SA505 or the Motorola S9.
No Matt I mean how can I add this to my rom ect how were you able to install it into your rom
I need the mind of a good hacker. Somebody who knows the ins and outs of all these programs and how to make them work better.
My question is this:
Would it be at all possible to have an apk file that can extract necessary files on to the SD card to boot up as a temporary "recovery boot mode" that runs outside but next to your ROM?
Then how about adding a function on your phone (widget or an app) that will bring you to the "2nd operating system"? I guess that's what it'd be right? The thing that controls all the deleting and installing of new zip's... Anyways, make this 2nd operating system a lot more visually functional than the (clockworkmod recovery, xionia, etc..) other rec. modes.
I mean we're working with tiny laptops. These are computers, not "phones". They just make phone calls too. Why would you LEAVE a program in "MS DOS" mode? Spice it up, give it pictures...
Anyways... Bad rant but valid.
Let's wrap all of these up in one program. One "App". This app will scan what firmware you're using, use that info to disregard some roms from your selection and only allow you to flash a rom that will work with your phone or was made for your phone. Browse through working models of some of the mods (actually test function and design by looking at 1 to 4 interactive pages of the phone design (lock screen, how it looks when you rotate the rotary to unlock but does nothing else).
I have some ideas how this can be "realistically" done, but not the programming knowledge to know how to actually do any of this.
The thing is, if you can do this - I will bankroll you. Just making up for the time you spend doing this though. I'm not going to pay you like your boss does so don't quit. I mean we can work it out. 50 bucks a month or something. Just something so you can tell your friends and loved ones "I'm getting paid, let me get on the computer".
If it is possible to do and it gets done... **** man, I'll give you a thousand or something. We'll see how much I have at the time.
Let me know if you're interested so we can work out how much you will need.
Also, sorry whatever mod is reading this and about to ban me (I read the warning. sorry.)
I defend myself by saying that in no other forum could I find the specific target group for this question. This is exactly the people I need to ask this because this clearly isn't a question related to "Live wallpaper Deadmau5" as in the "Android Software Development" forum.
Anyways, if this idea even just gets done... that's the important part. Progress in technology. What a ****ing thrill...
*Disclaimer*
Seriously, if you take this idea and make money off of it... Well, just change your IP address so it doesn't match up with your current one and hope this site doesn't tell that you were on this page. Reading my post. That is time and date stamped. That will hold up in court that you did this idea after you read this post. Plus how long after you read this did you do it and is that about the time it takes to start right after you're done reading.
On a lighter note - You know this will make money. I'm already going to pay you. But if it's such a great idea, shouldn't I get at least half of the cut this makes on the market? You wouldn't be doing it if I didn't have this great ****ing idea.
TL;DR:
Can we flash a rom without rebooting first?
Uhh...you want a dual boot? I'm confused
sent from my epic 4g. with the key skips.
It is possible, at least on the HTC devices, or especially threw Desire HD:
We got Ubuntu running from a boot.img and if we flash something like that into the recovery partition, simply a boot.img as recovery-system, then it should boot and maybe we can build a simple Linux from scratch for it and enable fastboot somehow to get the simple features.
And maybe we can get something more out of it.
Or we just use a small Android.
But isn't the ROM Manager a little like your idea?
You can choose device-specific ROMs, flash them, do backups, you just got to reboot.
That's the only difference to your idea, isn't it?
Hi - NaN (not a noob) to software and hacking but new to this device.
I have a rooted TF101 and wonder if anyone's hacked the device so that the front camera becomes the rear and the rear camera becomes the front.
Really just curious before I go ahead and brick my device. I'm thinking about mv /dev/ov5640 and /dev/tegra_camera but that sounds far too easy (and dangerous)...
Why would You be interested in swapping the cameras anyways? Seems to be a biit pointless to me as every app ive used with cameras it had support to use front or back.
Sent from my Transformer TF101 using xda premium
I agree
kenshin1388 said:
Why would You be interested in swapping the cameras anyways? Seems to be a biit pointless to me as every app ive used with cameras it had support to use front or back.
Sent from my Transformer TF101 using xda premium
Click to expand...
Click to collapse
I agree to this, there is no point to make the change.
Well for starters Opera 12, which includes support for getUserMedia() WebRTC extensions uses the first webcam it comes across, the rear. If I wanted to even make a mock up of a video call I would need the front camera (granted this is only good for the lab, not production).
But really I was trying to understand how the underlying media device capability works. If you simply exchange using mv /dev/mi1040 (the front camera device) and /dev/ov5640 (back camera) then it goofs the images to any app that uses cameras.
There must therefore be other layer(s) determining device capabilities, codecs, etc.
There's a file /etc/nvcamera.conf but that only seems to affect the main camera app. I swapped 1 and 0 and front and back tags, although admittedly haven't yet swapped the device ID whilst leaving the front/back tags the same.
And there's a whopping /etc/media_profiles.xml defining all the camera capabilities.
Do I need a reason? Isn't anyone even just curious doing something to push the device and learn more about the platform???
There was a point where Yahoo IM would use the back camera (when it was avaiable native to the TF). There was a member "droidx" he modified some files and got the front camera working with it. You're better off looking at modifying files as oppose to rewiring cameras.
More info here
http://forum.xda-developers.com/showthread.php?t=1087769
How to swap the cameras so Opera 12 uses front camera for getUserMedia()
Ok, here's how I did it.
Essentially you only need to swap the tags 'front' and 'back' in the file /etc/nvcamera.conf
The change is permanent across reboots, but messes the orientation/mirror image of the cameras, so the rear camera becomes a mirror image, not the front. This messes all portrait shots as the camera pic becomes upside down.
Device needs to be rooted.
Need to make /system directory read/write:
# mount -o rw,remount /system
# vi /etc/nvcamera.conf# format, cameraName=device,direction,orientation,type
This is the file before mods
# type can be 'stereo' for stereo capable, 'mono' for not stereo capable,
# 'usb' to enable searching for a usb device and where to put it in the list
# if found. Lines must be shorter then 256 characters
version=1
camera0=/dev/ov5640,back,0,mono
#camera1=/dev/ov5650,back,0,mono // 2nd camera for stereo once supported
camera1=/dev/mi1040,front,0,mono
#camera4=/dev/ov5650,back,0,stereo // virtual stereo device once supported
Change this line:
camera0=/dev/ov5640,back,0,mono
to:
camera0=/dev/ov5640,front,0,mono
And this line:
camera1=/dev/mi1040,front,0,mono
to:
camera1=/dev/mi1040,back,0,mono
Save and it works.
Please remove :/
No keep it, that's a good thing to have available to see or as a project. I love to learn things like this.
Thing O Doom said:
No keep it, that's a good thing to have available to see or as a project. I love to learn things like this.
Click to expand...
Click to collapse
I second doom. It's about pushing the limits of the device.
Good on ya for doing this.
Sent from my SCH-I500 using Tapatalk 2
I also agree. as some may not understand the reasoning, obviously oblonsky has a reason for doing this, just because everyone doesnt understand or agree with him is no reason to cut him off and remove his post... anything anyone learns or attempts to learn about android or the transformers code will progress understanding of the platform and the device. I vote let it stay and continue your endeavor fellow androidian.....
Yes, thanks guys. I'm already wondering now whether it may be possible to add new cameras, or disable cameras - do more useful stuff than swap cameras. Also I took the time to post the answer to my own question just in case it was useful to anyone else - so it would seem odd to want to remove the information that just *might* be useful to others at some point.
will this work on nougat......if not how to do it on nougat
Here is a reason to make the front camera the default camera: After getting in a terrible rain, my main camera on the back is not working anymore.
When starting a camera apps, it just quits with kind of a "connection to camera no possible" message.
Here's another reason to make the front camera as the default
I have a phone that's about 5 years old. It's been through heavy and rough usage. Hence, the connection between the motherboard and camera module are fried.
Now, when I have to login into WhatsApp Web or the WhatsApp App for Windows, I cannot because it needs a QR code scanned - which triggers the back camera.
So, I'm going to go ahead and try this, kudos!
Thanks for posting!
This was useful. Thanks. Please keep experimenting for no reasons.
SHUR1KEN said:
I have a phone that's about 5 years old. It's been through heavy and rough usage. Hence, the connection between the motherboard and camera module are fried.
Now, when I have to login into WhatsApp Web or the WhatsApp App for Windows, I cannot because it needs a QR code scanned - which triggers the back camera.
So, I'm going to go ahead and try this, kudos!
Click to expand...
Click to collapse
Uhm did it work?
Unfortunately, no, it didn't. Apparently, WhatsApp has gotten rid of the gate that used to allow for the "exploit" to happen before. I have heard of users doing it 2 years ago.
Anyway, what I had to do in my case was, I had to maintain pressure at the point on the camera module where it connects to the motherboard, while navigating to WhatsApp Web and scanning the QR code, all without even the most minute of movements. Otherwise the phone would fail to detect the camera module all over again, demanding me to repeat the whole thing again + a manual camera driver reset from my ROM settings.
Tried it like 20+ times. Succeeded in 1/20 of them... **** was tough, bro.
I finally managed to do this on my Redmi Note 5. This is probably applicable to most other devices as well.
Remount the system partition as writable:
Code:
$ su -c mount -o rw,remount /system
Edit /system/vendor/etc/camera/camera_config.xml and swap all
Code:
<Position>BACK</Position>
to
Code:
<Position>FRONT</Position>
and vice versa.
Reboot.
Do you think this will still work?
If I unroot after modifying the file, will the change persist?
Many thanks for your excellent work.
TheSnowpup said:
Do you think this will still work?
If I unroot after modifying the file, will the change persist?
Many thanks for your excellent work.
Click to expand...
Click to collapse
It still works for me at least. I think it will persist after unrooting, but I don't know how rooting works under the hood right now, so this may be incorrect.
If you try it, please report back your results!
Hello,
I've had enough of this bull****. The volume level is unacceptable on Xperia J. The sound is not loud enough on any phones to me, the same for my friend so that disqualifies broken phone. Some sort of audio compressor (software) is lowering the volume level on the device on purpose, I don't know if it's EU laws, or programmers fault, equalizer, musicfx app or whatever, someone should be able to hack it somehow.
Someone please modify the framework.odex or framework.jar to set higher volume levels please, I cannot do this because of odexed file and I don't know how to deodex it correctly.
None of the volume boost apps (including BeatsAudio) work on the stock rom (they just either don't work or brake the whole sound alltogether).
I'm offering $20 to however makes a volume boost level modification for the stock rom. I don't care about CM10 as it's not stable.
Thank you!
stranded.eu said:
Hello,
I've had enough of this bull****. The volume level is unacceptable on Xperia J. The sound is not loud enough on any phones to me, the same for my friend so that disqualifies broken phone. Some sort of audio compressor (software) is lowering the volume level on the device on purpose, I don't know if it's EU laws, or programmers fault, equalizer, musicfx app or whatever, someone should be able to hack it somehow.
Someone please modify the framework.odex or framework.jar to set higher volume levels please, I cannot do this because of odexed file and I don't know how to deodex it correctly.
None of the volume boost apps (including BeatsAudio) work on the stock rom (they just either don't work or brake the whole sound alltogether).
I'm offering $20 to however makes a volume boost level modification for the stock rom. I don't care about CM10 as it's not stable.
Thank you!
Click to expand...
Click to collapse
Uhhh...you know that Sony has XLOUD that is supposed to increase sound of speakers.
But I agree, even when calling sound on my Miro is really,really low. But I think it is not due to software, maybe hardware.
My old Sony Ericsson K810i is much better xD
xLoud is for the speaker. Not headphones. It does not affect headphones in anyway. Please everyone who thinks otherwise stop posting lies.
Service menu does not have this option on Xperia J. And I'm not lazy I've tried, check the questions subforum for my volume boost thread.
CM10 is fully stable now, apart from the radio not working fully yet.
I guess you don't understand what fully means then. I'm sorry but I need a stable device for work, I will never get a totally custom rom, I'm done with this.
Steam. - are you... cmon FULLY stable mean FULLY stable without broken things. CM7/8/9/10 was always broken... (eg. camera, radio, wifi... random crashes... )
Who said I'm angry? I am not angry I'm just saying how it is. And shahkam thanks, you were very helpful. The device is fine, the software has a restricted volume for some stupid reason.
djisgod
this is fairly easy to do if you spend a little time looking and learning
Click to expand...
Click to collapse
Believe me I've tried, soft-bricked the phone twice so far. I just know that people posting around here are far more superior in Android modding than me.
stranded.eu said:
Who said I'm angry? I am not angry I'm just saying how it is. And shahkam thanks, you were very helpful. The device is fine, the software has a restricted volume for some stupid reason.
djisgod
Believe me I've tried, soft-bricked the phone twice so far. I just know that people posting around here are far more superior in Android modding than me.
Click to expand...
Click to collapse
I noticed that xperia phones outside canada suffers from this issue I had an x10 and my friend another xperia pro and none of us had an low volume while everyone on the forum had it ..
Sent from my SGH-T999 using xda premium
That's because of European Union's law prohibiting manufacturers from using more than 90 dB I think. Anyway it has something to do with stupid EU law and devices here have lowered volume by default.
Cleaned thread,
Lets please stay on topic and be civil. This thread is only 2 pages, and has already gotten out of control.
The OP is looking for something that could be a problem for a lot of users. Lets not make a mess of the thread again please
Thanks
chalenge accepted.
you can try this several step to increase your volume. first of all I have to tell you that this mod didn't work on sony's stock music player and the radio since both of these app doesn't support any sound effect app (there is a little method to use eq app on this app but it doesnt give optimum result). you need to use 3rd party app like google music player or sony's walkman player to activate the effect. here are the required step:
1. install clearbass enhancement mod from me (the link is in my sig)
2. follow the guide to activate sony's clearbass on that thread
3. select musicfx as your sound effect app. >setting>sound>sound effect>musicfx.
3. install the beat bass app from my zip file. skip this step if you're already using it.
4. reboot your phone
5. if you're using google music player, go to equalizer setting. set all the eq to maximum. turn off the bass bost setting and set the slider at minimum.
6. open any music file with your music player
7. open the beat bass app. carefully set the eq to your desire. (be carefull. it could be very loud. you might want to use only half of your volume).
8. press home to save your eq setting. if you press back the beats app will be closed and you'll lost your eq setting
EDIT:
btw, I don't have working paypal account. if you found that this trick really work you don't have to pay me. you can give that $20 to any orphanage, social foundation, or anyone you think deserve to get that money.
There is a option in build prop that says "hearingprotection" not sute if its the cause for low volumes. You'll going to need root access to modify it. Will post screenshot soon.
Sent from my Xperia Miro
ARVolutionz said:
There is a option in build prop that says "hearingprotection" not sute if its the cause for low volumes. You'll going to need root access to modify it. Will post screenshot soon.
Sent from my Xperia Miro
Click to expand...
Click to collapse
Just checked it, volume is still lowered after about 0.5/1sec
@kurotsugi
I don't want to interfere with software that much by putting files from totally different phone to mine, I want this stock rom modified so that it removes the dB restriction. I even know where is it but I can't access it because it's odexed. It's simple as that.
@ARVolutionz
This does nothing, I've already tried that.
stranded.eu said:
@kurotsugi
I don't want to interfere with software that much by putting files from totally different phone to mine, I want this stock rom modified so that it removes the dB restriction. I even know where is it but I can't access it because it's odexed. It's simple as that.
@ARVolutionz
This does nothing, I've already tried that.
Click to expand...
Click to collapse
Search for a deodex method ?
Sent from my SGH-T999 using xda premium
I did and I don't know how to odex it back again to make it work. If it differs from the original file the system won't boot (I guess).
and btw. we must deodex framework file ;/
well...all the files in my zip file is taken from sony's stock rom. if you only want to install clear bass you only need to copy soundfx libs, conf file in /vendor/etc and the. all these files are from sony and doesn't break anything in your system. you can even uninstall it by simply delete the config file in /vendor/etc. my trick above is actually exploit a bug under sony's lib which is conflicted with android native's lib. the sounds got louder since there's two eq app working at same time. thus, made the volume alot louder than before.
anyway, it seems that you're know better than me. if you tell me which file need to be modified and the detail about which line should be modified I might do it for you. I have all stock app files already deodexed in my laptop.
EDIT: I forgot that you're using J. if you could give me the app with the odex file I'll try to deodex it.
You can find it here: http://forum.xda-developers.com/showpost.php?p=36557930&postcount=41
On Joying headunits with CAN Bus, it is not possibile to use resistor based USWC: this thread aims to overcome the limitation by using an Arduino MICRO connected to the receiving unit of the USWC and to the headunit via USB to simulate a hardware keyboard.
reserved 1
Github repository: https://github.com/MobeedoM-opensource/android-auto
reserved 2
reserved 3
surfer63 said:
In your code you also use the BOOT_COMPLETED broadcast. You know that with the Joying deep-sleep option, you will see that only on rare occasions? This is: only on reboots or power (dis)connects?
Click to expand...
Click to collapse
Yes i know thank you, i noticed that for some strange reason the firmware deactivates the accessibility service even at reboot (at true boot not only with ACC_OFF).
You use the "com.fyt.boot.ACCON" intent filter in your services. If it doesn't have serious consequences please also add the "com.glsx.boot.ACCON" for those users on Sofia that might want to start using your app as well. But this in turn would also require the "minSdkVersion 23" instead of "minSdkVersion 24" like you have now. My PX5 is on 8 so I have api level 26, but my old Sofia on the bench is on 6.0.1 and it would be handy to test there first. (I tried to build your code, but there are many "hurdles" in your app/build.gradle, so I need to dive a little deeper into it)
Click to expand...
Click to collapse
Yes of course i'll add the intent filter, but please note that the current version of the app doesn't use those intents on api level 26+ (my headunit), because of the background execution limits (the implicit intent is simply not received).
The only intent that i was able to trap, but i still need to investigate because it doesn't always work and I haven't figured out why yet, is the android.hardware.usb.action.USB_DEVICE_ATTACHED.
For the build.gradle, if you tell me what are the hurdles maybe i can help, also via PM if you prefere.
You have the method startAccessibilityService with the rooted system call: What does that actually do? Is it for the user to give access? Or the system to give access (as it is rooted)? Is it for the root_preference "OnlyBroadcast"?
Click to expand...
Click to collapse
An accessibility service cannot be started programmatically in android, the user must manually activate it with the switch in the accessibility services section.
That command is used to simulate the behavior of the user who changes the state of the switch, it requires root and it is not granted to work on all roms.
You use the "getCurrentForegroundPackage()". I guess this still works if your have (for example) your navi app in the foreground and your media player in the background and you want to skip to the NEXT, as you automatically come to the last "if" statement in your MediaKeysMapper. But does this also work when your navi app is the foreground program and you are listening to the radio or some "generic_syu" program in the background?
Click to expand...
Click to collapse
Yes you are right, the last use case is not covered. To manage it correctly you need to know which app is currently playing, maybe it is possbile to distinguish syu apps by non syu apps by checking the android AudioManager which i think is only used by non-syu apps.
bambapin said:
Yes of course i'll add the intent filter, but please note that the current version of the app doesn't use those intents on api level 26+ (my headunit), because of the background execution limits (the implicit intent is simply not received).
The only intent that i was able to trap, but i still need to investigate because it doesn't always work and I haven't figured out why yet, is the android.hardware.usb.action.USB_DEVICE_ATTACHED.
For the build.gradle, if you tell me what are the hurdles maybe i can help, also via PM if you prefer.
Click to expand...
Click to collapse
I know about the implicit intents, but on a Sofia on Android 6.0.1 (api level 23) they should still work.
W.r.t. the build.gradle.
I had to remove the private.gradle import statement, some signing statements, defProd and the like, and finally (also literally in time) upgrade my sdk from 27 to 29 to be able to do a simple "./gradlew assembleDebug".
So no issues anymore.
(Of course I had set compile version to 27 in the build.gradle, but I ran into "missing" xmls, which I first blamed on being not committed to the repo (your fault, not mine of course ), but which turned out to be part of sdk 28 and up, so still my fault ).
surfer63 said:
W.r.t. the build.gradle.
I had to remove the private.gradle import statement, some signing statements, defProd and the like, and finally (also literally in time) upgrade my sdk from 27 to 29 to be able to do a simple "./gradlew assembleDebug".
Click to expand...
Click to collapse
Ah yes, the private.gradle... it contains my private keys passwords so i preferred not to publish them on the internet .
Indeed that file must be placed next to the app build.gradle with this content:
Code:
ext {
my_keyAlias = 'YOUR_KEY_ALIAS'
my_keyPassword = 'YOUR_KEY_PASSWORD'
my_storeFileName = 'YOUR_KEYSTORE_FILEPATH'
my_storePassword = 'YOUR_KEYSTORE_PASSWORD'
}
bambapin said:
Yes you are right, the last use case is not covered. To manage it correctly you need to know which app is currently playing, maybe it is possbile to distinguish syu apps by non syu apps by checking the android AudioManager which i think is only used by non-syu apps.
Click to expand...
Click to collapse
Maybe I insult you with providing this link , but anyway: here it is: https://developer.android.com/guide/topics/media-apps/mediabuttons
And the image in post #1. How is red and black connected, and to what?
surfer63 said:
Maybe I insult you with providing this link , but anyway: here it is: https://developer.android.com/guide/topics/media-apps/mediabuttons
And the image in post #1. How is red and black connected, and to what?
Click to expand...
Click to collapse
No insults at all don't worry and even if it were i hardly get offended
Actually i'm not expert on this particular topic, at the beginning i tried to use the standard Android MediaControllers but it seemed to me that when it came to "syu" APPS everything was bypassed, but if you think it's a viable way i'll try again.
The photo is the final version that is now installed in the car.
I noticed that there was enough room inside the SWC receiver to insert the arduino, i made a little hole for the usb socket and i connected the arduino directly (yes i admit, i soldered to save the space of dupont ).
What you see is the inside of the receiver + the arduino. The black and red cables are the power supply of the receiver, the orange and blue are KEY1 and KEY2 (the white and gray of the video). The arduino is simply glued with a removable glue (patafix).
@surfer63 i was thinking again about the autostart after the ACCON.
In the end i managed to make the intent android.hardware.usb.action.USB_DEVICE_ATTACHED always work so the accessibility service is always restarted, but i'm still looking for a better alternative (using the navi app would work but it interfere with the audio mixing level).
I looked again at the code of syu.ms and saw that when the unit wakes up, a series of apps are always launched with hard-coded package names: eg. "com.yh.devicehelper" and "com.cpsdna.mirror" which i don't seem to find installed in the headunit.
Do you have any idea what they are?
If they are never installed, perhaps it is enough to create an app with one of those package names and the system will take care of starting it at ACCON.
bambapin said:
No insults at all don't worry and even if it were i hardly get offended
Actually i'm not expert on this particular topic, at the beginning i tried to use the standard Android MediaControllers but it seemed to me that when it came to "syu" APPS everything was bypassed, but if you think it's a viable way i'll try again.
The photo is the final version that is now installed in the car.
I noticed that there was enough room inside the SWC receiver to insert the arduino, i made a little hole for the usb socket and i connected the arduino directly (yes i admit, i soldered to save the space of dupont ).
What you see is the inside of the receiver + the arduino. The black and red cables are the power supply of the receiver, the orange and blue are KEY1 and KEY2 (the white and gray of the video). The arduino is simply glued with a removable glue (patafix).
Click to expand...
Click to collapse
I do indeed think that the SYU apps do nothing according standard Android rules, so the MediaController would only be helpful for any other app. I do think you need to check if "some" SYU app is active by using something like "this" or by checking the com.syu.ms apk (via jadx(-gui)) or so, because that one also checks on several places whether one of its own SYU app is active or not, and on top or not.
So the bottom side of of the plate with the red led and condensator (or so), is the bottom of the SWC controller circuit?? If so, the image now makes sense.
surfer63 said:
So the bottom side of of the plate with the red led and condensator (or so), is the bottom of the SWC controller circuit?? If so, the image now makes sense.
Click to expand...
Click to collapse
Yes, it is the bottom, when it is inserted it rests on the 4 pillars and leaves enough space below, there will be almost 1cm from the arduino.
The only negative thing i noticed is that with the arduino so close to the antenna the reception distance of the buttons is a little lower than before, but they still work.
bambapin said:
@surfer63 i was thinking again about the autostart after the ACCON.
In the end i managed to make the intent android.hardware.usb.action.USB_DEVICE_ATTACHED always work so the accessibility service is always restarted, but i'm still looking for a better alternative (using the navi app would work but it interfere with the audio mixing level).
I looked again at the code of syu.ms and saw that when the unit wakes up, a series of apps are always launched with hard-coded package names: eg. "com.yh.devicehelper" and "com.cpsdna.mirror" which i don't seem to find installed in the headunit.
Do you have any idea what they are?
If they are never installed, perhaps it is enough to create an app with one of those package names and the system will take care of starting it at ACCON.
Click to expand...
Click to collapse
It worked!!! :laugh:
The app attached is automatically launched by the syu.ms at ACC_ON.
I used the package name "com.cpsdna.mirror", i have no idea what the original app was supposed to do, but now we have a real autorunner at our disposal.
bambapin said:
It worked!!! :laugh:
The app attached is automatically launched by the syu.ms at ACC_ON.
I used the package name "com.cpsdna.mirror", i have no idea what the original app was supposed to do, but now we have a real autorunner at our disposal.
Click to expand...
Click to collapse
:good: Very nice.
There are many apps in this ms.apk that no longer exist. Some are hardcoded called inside the app, some are called via the text files in the assets/property, but no longer exist.
I assume it is related to http://www.cpsdna.com/solutions1.html and a previous "mirrorlink" application. zlink is now by another company.
What I would do (and did in the past) is making a "micro starter app" (11~16Kb) , that only starts the app you want. So the "com.cpsdna.mirror" started by ACC_ON, starts your "com.mobeedom.android.auto.jyhuremote".
If Joying/FYT updates their list of started apps, you can simply take another "old" app and still call your own app without having to rewrite all the packages inside your own code.
(And please don't use the appcompat for such a microstarter . It explodes your code from ~11-16Kb to 1.5MB. I really hate how Studio always adds that to your project even if you target APIs that don't need it, or your app as such doesn't need it)
It would only need something like:
Code:
PackageManager pManager = context.getPackageManager();
Intent intent = pManager.getLaunchIntentForPackage("com.mobeedom.android.auto.jyhuremote");
if (intent != null) {
context.startActivity(intent);
}
surfer63 said:
:good: Very nice.
There are many apps in this ms.apk that no longer exist. Some are hardcoded called inside the app, some are called via the text files in the assets/property, but no longer exist.
I assume it is related to http://www.cpsdna.com/solutions1.html and a previous "mirrorlink" application. zlink is now by another company.
What I would do (and did in the past) is making a "micro starter app" (11~16Kb) , that only starts the app you want. So the "com.cpsdna.mirror" started by ACC_ON, starts your "com.mobeedom.android.auto.jyhuremote".
If Joying/FYT updates their list of started apps, you can simply take another "old" app and still call your own app without having to rewrite all the packages inside your own code.
(And please don't use the appcompat for such a microstarter . It explodes your code from ~11-16Kb to 1.5MB. I really hate how Studio always adds that to your project even if you target APIs that don't need it, or your app as such doesn't need it)
It would only need something like:
Code:
PackageManager pManager = context.getPackageManager();
Intent intent = pManager.getLaunchIntentForPackage("com.mobeedom.android.auto.jyhuremote");
if (intent != null) {
context.startActivity(intent);
}
Click to expand...
Click to collapse
Ok ok, no AppCompat
Maybe i could also put a minimum of parameterization with the ability to choose what to launch, maybe even more than one app.
Do you think something like this could be useful in your JET?
bambapin said:
Ok ok, no AppCompat
Maybe i could also put a minimum of parameterization with the ability to choose what to launch, maybe even more than one app.
Do you think something like this could be useful in your JET?
Click to expand...
Click to collapse
I don't see it yet. What would be useful to start from my Jet apk? Can you explain?
Please also note that when I started the JET apk I knew absolutely nothing about java (and didn't want to know anything about java) and started in appinventor/thunkable, as that was easy enough. But it is a big mess of all kind of shell scripts called from my app using the "rootexec" plugin, because that was the only way to make it work.
If I would start again I would rewrite it immediately in java.
So perhaps your own app would be a much better basis than my JET apk.
Please don't think I'm against it, but I do not understand (yet?) why that would be useful.
surfer63 said:
I don't see it yet. What would be useful to start from my Jet apk? Can you explain?
Please also note that when I started the JET apk I knew absolutely nothing about java (and didn't want to know anything about java) and started in appinventor/thunkable, as that was easy enough. But it is a big mess of all kind of shell scripts called from my app using the "rootexec" plugin, because that was the only way to make it work.
If I would start again I would rewrite it immediately in java.
So perhaps your own app would be a much better basis than my JET apk.
Please don't think I'm against it, but I do not understand (yet?) why that would be useful.
Click to expand...
Click to collapse
Don't know, i thought of your JET because i see it as a great collection of tools dedicated to Joying head units.
Given that on android 8 the intents ACC_ON and ACC_OFF are not usable, it could be an additional tool that allows you to schedule actions to be performed on wakeup without without the need to set Tasker as an NAVI app and without Xposed, since it still doesn't work on SC9853i.
BTW about Xposed i am also afraid, but i really hope i'm wrong, that with the code obfuscation of the firmwware, the maintenance of the Xposed modules will become increasingly difficult.
However, i will make a mini app with a list of apps to launch at ACC_ON (in my case the Accessibility Service, Poweramp and the NAVI), the code will be available if you change your mind .
bambapin said:
Given that on android 8 the intents ACC_ON and ACC_OFF are not usable, ...
Click to expand...
Click to collapse
Based on your work on USB, I also started to work on that idea again and built a "UsbReceiver" in my FytHWOneKey. It works great on my old sofia (6.0.1), but the usb event (""android.hardware.usb.action.USB_DEVICE_ATTACHED"") is never triggered on my 8.0.0 PX5. It doesn't work there.
Does this USB still work for you on 8.1.0?
bambapin said:
BTW about Xposed i am also afraid, but i really hope i'm wrong, that with the code obfuscation of the firmwware, the maintenance of the Xposed modules will become increasingly difficult.
However, i will make a mini app with a list of apps to launch at ACC_ON (in my case the Accessibility Service, Poweramp and the NAVI), the code will be available if you change your mind .
Click to expand...
Click to collapse
Xposed will no longer be feasible indeed when you look at the code obfuscation.
Your list of apps to be started: An internal list or external list (ascii config/ini file?), or preferences list?
surfer63 said:
Based on your work on USB, I also started to work on that idea again and built a "UsbReceiver" in my FytHWOneKey. It works great on my old sofia (6.0.1), but the usb event (""android.hardware.usb.action.USB_DEVICE_ATTACHED"") is never triggered on my 8.0.0 PX5. It doesn't work there.
Does this USB still work for you on 8.1.0?
Click to expand...
Click to collapse
Yes, it's the intent i'm still using to re-activate the accessibility service. It seems strange to me that it is not triggered at all, do you have any other app installed that could "steal" it? Torque for example?
EDIT: did you fetch the last version from github? i added a .xml with the filtered devices, it could be required (it depends on the firmware implementation)
Xposed will no longer be feasible indeed when you look at the code obfuscation.
Your list of apps to be started: An internal list or external list (ascii config/ini file?), or preferences list?
Click to expand...
Click to collapse
Internal, stored in the shared preferences.
bambapin said:
Yes, it's the intent i'm still using to re-activate the accessibility service. It seems strange to me that it is not triggered at all, do you have any other app installed that could "steal" it? Torque for example?
EDIT: did you fetch the last version from github? i added a .xml with the filtered devices, it could be required (it depends on the firmware implementation)
Click to expand...
Click to collapse
No other apps, only my own FytHWOneKey.
I did see the xml, but did not understand it and wanted to ask later. Those vendor id's / product id's: Are those from your usb devices or are they from (internal) Joying devices?
I can only find one vendor-id in the USB device database.