[DEV] [SMALI] A Few Custom Views - Android Software/Hacking General [Developers Only]

Hey XDA,
I've been making a number of custom Views for my own use, and figured I'd share a few of them, in case anyone else finds them useful. These are all ready-made smali files, that can be dropped into any app you'd like to use them in, no IDs or anything needed. You're welcome to use them for personal use, but if you use any of them in any other release, please send me a PM with a link to the release, and be sure to give appropriate credit.
Anyway, what's included:
CPUFrequency
Extends TextView.
Shows current CPU frequency and unit (MHz or GHz, depending on the current value).
Updates once per second.
CPUTemperature
Extends TextView.
Shows current CPU temperature and unit.
Click to toggle between Fahrenheit and Celsius.
Updates once per second.
BatteryVoltage
Extends TextView.
Shows current battery voltage in mV.
Updates once per second.
BatteryTemperature
Extends TextView.
Shows current battery temperature and unit.
Click to toggle between Fahrenheit and Celsius.
Updates once per second.
CurrentNetwork
Extends TextView.
Shows SSID of currently connected WiFi network.
If WiFi is off or disconnected, shows carrier name.
If no WiFi or mobile network is connected, shows "Network Unavailable".
Updates whenever connection status changes.
This View requires two permissions: android.permission.ACCESS_WIFI_STATE and android.permission.ACCESS_NETWORK_STATE (These permissions already exist in framework-res andSystemUI).
SelfAnimatingImageView
Extends ImageView.
Automatically begins any XML frame animation or vector animation (set with android:src) when they come into focus, without any additional code required.
These Views only animate/update themselves while the screen is on and they are visible/in focus, so there shouldn't be any memory leaks or anything. The above descriptions pretty much explain them, but if you want to see them, you can download a sample app here:
sample.apk
md5: 9225d2ad828830de2bfd45f936fb3352
Click to expand...
Click to collapse
***Note: The sample apk asks for two permissions. These are for the CurrentNetwork View, as explained above. Also, it is for Lollipop only, due to the inclusion of an animated-vector example.
Usage
To use, simply copy the smali files into your decompiled apk (preserving the folder structure), and use them in any layout, like this:
Code:
<com.android.morningstar.NameOfCustomView android:layout_width="wrap_content" android:layout_height="wrap_content" etc... />
All standard TextView and ImageView attributes still work, though for the extended TextViews, android:text isn't needed.
Here's part of a layout where I'm using all the TextViews ('thumper' is the WiFi SSID):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Download
All of the Views are in a single zip file, and any that you don't use can be deleted.
Custom Views.zip
md5: 80c2cd01fd65a7733e538303a5ecab60
Click to expand...
Click to collapse

Morningstar said:
Hey XDA,
I've been making a number of custom Views for my own use, and figured I'd share a few of them, in case anyone else finds them useful. These are all ready-made smali files, that can be dropped into any app you'd like to use them in, no IDs or anything needed. You're welcome to use them for personal use, but if you use any of them in any other release, please send me a PM with a link to the release, and be sure to give appropriate credit.
Anyway, what's included:
CPUFrequency
Extends TextView.
Shows current CPU frequency and unit (MHz or GHz, depending on the current value).
Updates once per second.
CPUTemperature
Extends TextView.
Shows current CPU temperature and unit.
Click to toggle between Fahrenheit and Celsius.
Updates once per second.
BatteryVoltage
Extends TextView.
Shows current battery voltage in mV.
Updates once per second.
BatteryTemperature
Extends TextView.
Shows current battery temperature and unit.
Click to toggle between Fahrenheit and Celsius.
Updates once per second.
CurrentNetwork
Extends TextView.
Shows SSID of currently connected WiFi network.
If WiFi is off or disconnected, shows carrier name.
If no WiFi or mobile network is connected, shows "Network Unavailable".
Updates whenever connection status changes.
This View requires two permissions: android.permission.ACCESS_WIFI_STATE and android.permission.ACCESS_NETWORK_STATE (These permissions already exist in framework-res andSystemUI).
SelfAnimatingImageView
Extends ImageView.
Automatically begins any XML frame animation or vector animation (set with android:src) when they come into focus, without any additional code required.
These Views only animate/update themselves while the screen is on and they are visible/in focus, so there shouldn't be any memory leaks or anything. The above descriptions pretty much explain them, but if you want to see them, you can download a sample app here:
***Note: The sample apk asks for two permissions. These are for the CurrentNetwork View, as explained above. Also, it is for Lollipop only, due to the inclusion of an animated-vector example.
Usage
To use, simply copy the smali files into your decompiled apk (preserving the folder structure), and use them in any layout, like this:
All standard TextView and ImageView attributes still work, though for the extended TextViews, android:text isn't needed.
Download
All of the Views are in a single zip file, and any that you don't use can be deleted.
Click to expand...
Click to collapse
Any chance you could make them into xposed modules?

Tired Storeman said:
Any chance you could make them into xposed modules?
Click to expand...
Click to collapse

@Morningstar
I can't stop laughing at the picture above.
I don't see a usage example

evilvoice said:
@Morningstar
Can you make these for Windows 3.11?
[emoji6]
Click to expand...
Click to collapse
Sure! Let me dig out my old 486/DX and I'll get right on that.
[emoji57]

Great job man

Nice mate!

evilvoice said:
@Morningstar
I can't stop laughing at the picture above.
I don't see a usage example
Click to expand...
Click to collapse
Fixed. Stupid Tapatalk removes anything inside code tags every time you edit a post...Stupid Tapatalk...

Morningstar said:
Fixed. Stupid Tapatalk removes anything inside code tags every time you edit a post...Stupid Tapatalk...
Click to expand...
Click to collapse
LOL yea. I have issues with it from time to time...makes me so mad.
Anyways, I am trying to add Current Network. I created the folder structure (the attachment on xda has no folders, but figure it out with the first line in one of the smali files. I wanted to add this to the device information I already have, so I tried to show Current Network above Device Info with this in status_bar_expanded
Code:
<RelativeLayout android:gravity="center" android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.android.morningstar.CurrentNetwork android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom|center" android:id="@id/network" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<com.potato.statusbar.deviceInfo.Information android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom|center" android:id="@id/device_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/network"/>
</LinearLayout>
</RelativeLayout>
But that causes a fc in SystemUI
This is what it was originally
Code:
<LinearLayout android:gravity="center" android:layout_gravity="bottom|center" android:id="@id/device_info" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.potato.statusbar.deviceInfo.Information android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Can you tell me what I did wrong/how to fix? Thanks!!!

Morningstar said:
Hey XDA,
I've been making a number of custom Views for my own use, and figured I'd share a few of them, in case anyone else finds them useful. These are all ready-made smali files, that can be dropped into any app you'd like to use them in, no IDs or anything needed. You're welcome to use them for personal use, but if you use any of them in any other release, please send me a PM with a link to the release, and be sure to give appropriate credit.
Anyway, what's included:
CPUFrequency
Extends TextView.
Shows current CPU frequency and unit (MHz or GHz, depending on the current value).
Updates once per second.
CPUTemperature
Extends TextView.
Shows current CPU temperature and unit.
Click to toggle between Fahrenheit and Celsius.
Updates once per second.
BatteryVoltage
Extends TextView.
Shows current battery voltage in mV.
Updates once per second.
BatteryTemperature
Extends TextView.
Shows current battery temperature and unit.
Click to toggle between Fahrenheit and Celsius.
Updates once per second.
CurrentNetwork
Extends TextView.
Shows SSID of currently connected WiFi network.
If WiFi is off or disconnected, shows carrier name.
If no WiFi or mobile network is connected, shows "Network Unavailable".
Updates whenever connection status changes.
This View requires two permissions: android.permission.ACCESS_WIFI_STATE and android.permission.ACCESS_NETWORK_STATE (These permissions already exist in framework-res andSystemUI).
SelfAnimatingImageView
Extends ImageView.
Automatically begins any XML frame animation or vector animation (set with android:src) when they come into focus, without any additional code required.
These Views only animate/update themselves while the screen is on and they are visible/in focus, so there shouldn't be any memory leaks or anything. The above descriptions pretty much explain them, but if you want to see them, you can download a sample app here:
***Note: The sample apk asks for two permissions. These are for the CurrentNetwork View, as explained above. Also, it is for Lollipop only, due to the inclusion of an animated-vector example.
Usage
To use, simply copy the smali files into your decompiled apk (preserving the folder structure), and use them in any layout, like this:
Code:
<com.android.morningstar.NameOfCustomView android:layout_width="wrap_content" android:layout_height="wrap_content" etc... />
All standard TextView and ImageView attributes still work, though for the extended TextViews, android:text isn't needed.
Here's part of a layout where I'm using all the TextViews ('thumper' is the WiFi SSID):
Download
All of the Views are in a single zip file, and any that you don't use can be deleted.
Click to expand...
Click to collapse
Nice work bro. [emoji12]
Cowboy from Hell on a twisted trail.
Koffed From my Big Ass Outlaw Phone.

Awesome work!

evilvoice said:
LOL yea. I have issues with it from time to time...makes me so mad.
Anyways, I am trying to add Current Network. I created the folder structure (the attachment on xda has no folders, but figure it out with the first line in one of the smali files. I wanted to add this to the device information I already have, so I tried to show Current Network above Device Info with this in status_bar_expanded
Code:
<RelativeLayout android:gravity="center" android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.android.morningstar.CurrentNetwork android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom|center" android:id="@id/network" android:layout_width="wrap_content" android:layout_height="wrap_content"/>
<com.potato.statusbar.deviceInfo.Information android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom|center" android:id="@id/device_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/network"/>
</LinearLayout>
</RelativeLayout>
But that causes a fc in SystemUI
This is what it was originally
Code:
<LinearLayout android:gravity="center" android:layout_gravity="bottom|center" android:id="@id/device_info" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.potato.statusbar.deviceInfo.Information android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Can you tell me what I did wrong/how to fix? Thanks!!!
Click to expand...
Click to collapse
Oops. I'll reupload when I get home and include the folders, so it's jot confusing for others. Thanks for pointing that out.
Your XML looks fine to me, can you pull a logcat of the FC? Also, check your SystemUI's manifest and make sure it has the two permissions mentioned in the OP. Both of the ones I tested it on already had those, but maybe not all do?

Nice job bro! But can you tell me how to do this?
I can't seem to load these modules? I can haz custom views?

Looks cool! Can we see some screenshots so we know just what we're getting into?

So, I went back and looked at my log and it had nothing to do with these, so I decompile the last working version and made the edits again. It works, but one issue. How can I get it above the device information like I wanted?
Edit: so I've decided to try and get these custom views to exist beside device info. For some reason, all the custom views print on the exact same line instead of on top of each other. I'll post code in a minute, but any ideas how to get it all on separate lines?
Code:
<RelativeLayout android:gravity="center" android:layout_gravity="bottom|center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<LinearLayout android:gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.android.morningstar.CPUFrequency android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:id="@id/cpufreq" android:layout_width="wrap_content" android:layout_height="wrap_content" />
<com.android.morningstar.CPUTemperature android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:id="@id/cputemp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/cpufreq" />
<com.android.morningstar.BatteryVoltage android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:id="@id/battvolt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/cputemp" />
<com.android.morningstar.BatteryTemperature android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:id="@id/batttemp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/battvolt" />
<com.android.morningstar.CurrentNetwork android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:id="@id/network" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/batttemp" />
<com.potato.statusbar.deviceInfo.Information android:textSize="10.0sp" android:textColor="#ffffffff" android:gravity="center" android:id="@id/device_info" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/network" />
</LinearLayout>
</RelativeLayout>

@Morningstar you also need to add "Name of Custom View" to ids.xml. I had an error when not adding them to that xml file.

For someone who already did this mod to system ui can I get your apk

evilvoice said:
@Morningstar you also need to add "Name of Custom View" to ids.xml. I had an error when not adding them to that xml file.
Click to expand...
Click to collapse
It depends on how you're using it. The smali files don't reference any IDs, so they'd only be needed if you've added them to the View in your XML (for positioning in a RelativeLayout, for example). If you don't need to position the View relative to something else, no ids are necessary.
malbert16442 said:
For someone who already did this mod to system ui can I get your apk
Click to expand...
Click to collapse
What exactly do you need out of it?

Morningstar said:
It depends on how you're using it. The smali files don't reference any IDs, so they'd only be needed if you've added them to the View in your XML (for positioning in a RelativeLayout, for example). If you don't need to position the View relative to something else, no ids are necessary.
What exactly do you need out of it?
Click to expand...
Click to collapse
I just want to see the layout of system ui of someone who applied the views their
Sent from my SM-G900T using Tapatalk

?
Sent from my SM-G900T using Tapatalk

Related

make WM6 voip working

First of all, I'm sorry for my poor english.
I have try a lot of time to make the WM6 voip working with my operator.
Now, it works fine for me so I will share my experience with you.
The tools :
WM6 PEE or Phil's ROM
For other Roms WM6voip
Download and install my patch to correct earing problems : View attachment registry_voip.cab
Configure Voip thanks to eluth's post here
To make your cab config you can also use View attachment cabpack.zip ( with mszip option
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
)
If your phone says "operator:Selected" you are OK
To make a voip call tape the phone number in international format like "00xxyyyyyy.." where xx is the country number and yyyyyy... the local phone number.
I'm working to redirect the sound to the internal speaker. I have seen that somebody makes it work on a pda.
It's my first post in this forum so tell me if something is wrong in my explanation.
Hope I can help you !
What does the patch "registry_voip.cab" do?
I have PEE Rom and have already set up VoIP with the built-in Voipiser tool - works nice, except the sound coming from the speaker. Also the main flaw is that my phonebook consists from numbers starting with "+", for example +74951234567. But for VoIP i have to manually dial the number without the "+", for example 74951234567. That means i can't use my phonebook and have to manually dial each number.
registry_voip.cab correct sound earing problems due to codec parameters used by lots voip operators.
If you store contact's phone number in international format like 003474951234567 then sip dialing is ok.
You can also search for local ipdialplan.xml.
Just wanted to know why when i am connected to wifi, i got VoipStunt: No Service and when connected to GPRS i got VoipStunt: Selected.
wifi issue
hizad said:
Just wanted to know why when i am connected to wifi, i got VoipStunt: No Service and when connected to GPRS i got VoipStunt: Selected.
Click to expand...
Click to collapse
See the firewall rules or the port redirections of your wifi access point. Have you try with more than one wifi connection ?
gandou63 said:
See the firewall rules or the port redirections of your wifi access point. Have you try with more than one wifi connection ?
Click to expand...
Click to collapse
May I know now you configure your VoIPStunt, do you use VoIPIser or manual editing of the xml files ?
gandou63 said:
See the firewall rules or the port redirections of your wifi access point. Have you try with more than one wifi connection ?
Click to expand...
Click to collapse
Thanks for advise. How can check on them?
Karhoe
Search previous threads under Solved Voip as for the settings go to www.voipstunt.com/en/sipp.html and configurations using setup.xml
xml file
karhoe said:
May I know now you configure your VoIPStunt, do you use VoIPIser or manual editing of the xml files ?
Click to expand...
Click to collapse
your xml file will be :
<wap-provisioningdoc>
<characteristic type="VoIP">
<parm name="SIPSettings"
value="<provision key='1232ab01' name='voipstunt'>
<provider name='voipstunt' />
<user account='user' password='pass***'
uri='sip:[email protected]'
allowedauth='digest'/>
<sipsrv addr='sip.voipstunt.com:5060' protocol='UDP' role='proxy'>
<session party='First' type='pc2pc' />
<session party='First' type='pc2ph' />
</sipsrv>
<sipsrv addr='sip.voipstunt.com:5060' protocol='UDP' role='registrar'/>
</provision>" />
</characteristic>
</wap-provisioningdoc>
Click to expand...
Click to collapse
xml file
karhoe said:
May I know now you configure your VoIPStunt, do you use VoIPIser or manual editing of the xml files ?
Click to expand...
Click to collapse
your xml file will be :
<wap-provisioningdoc>
<characteristic type="VoIP">
<parm name="SIPSettings"
value="<provision key='1232ab01' name='voipstunt'>
<provider name='voipstunt' />
<user account='user' password='pass***'
uri='sip:user@voipstunt.com'
allowedauth='digest'/>
<sipsrv addr='sip.voipstunt.com:5060' protocol='UDP' role='proxy'>
<session party='First' type='pc2pc' />
<session party='First' type='pc2ph' />
</sipsrv>
<sipsrv addr='sip.voipstunt.com:5060' protocol='UDP' role='registrar'/>
</provision>" />
</characteristic>
</wap-provisioningdoc>
Click to expand...
Click to collapse
thx for the info.
having 1 problem.
getting "operator:Selected"
but when I dail, I get 3 fast tut,tut,tut and then it disconnect.
i can see that iam connectet when i logon to my voip provider.
what have i done wrong?
I think the phone number format is wrong. try to manual dialing in international format. other way try short international format like +yyxxxxxxxx (+34123456789)
I'm working to redirect the sound to the internal speaker. I have seen that somebody makes it work on a pda
Click to expand...
Click to collapse
Any News??
i'm looking to this solution : here
Make your internal speaker work with AGEphone Mobile 2 Speakerphone Edition! For now we support only a limited range of phones, but support for more devices is in the pipe

PSXPERIA: How to increase compatibility of the native emulator with more games

With the new PSXPERIA tool we have the ability to run other games on the native emulator. However, it has not been as compatible with as many games as most had hoped.
However, there are ways to increase games compatibility by changing certain settings within the native emulator.
Games are stored in /sdcard/Android/data
When the games are run for the first time on your phone, a folder called "ucc" is created containing another folder with a unique name with xml files located inside. There should be:
metadata.xml
preferences.xml
If preferences.xml is not there, you can get it from your Crash "ucc" folder. Also, changing settings in the settings menu of a game (like changing video settings to full screen) will automatically generate the preferences.xml file.
The file structure should look like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is what my Star Ocean: Second Story file structure looks like:
This is what is inside the preferences.xml
Code:
<boolean name="Up-rendering" value="true" />
<string name="Screen Orientation">Landscape</string>
<boolean name="FPS-counter" value="false" />
<boolean name="SW-render" value="false" />
<boolean name="On Screen Controller" value="false" />
<string name="On Screen Controller Type Landscape">Type 1</string>
<string name="On Screen Controller Type Portrait">Type 1</string>
<string name="On Screen Controller Color Landscape">Color 1</string>
<string name="On Screen Controller Color Portrait">Color 1</string>
<boolean name="On Screen Controller Vibrator" value="true" />
<string name="On Screen Controller Transparency 0" value="100" />
<string name="On Screen Controller Transparency 1" value="100" />
<string name="On Screen Controller Transparency 2" value="50" />
<string name="On Screen Controller Scale 0" value="100" />
<string name="On Screen Controller Scale 1" value="100" />
<string name="On Screen Controller Scale 2" value="100" />
<string name="On Screen Controller Scale 3" value="100" />
<string name="Button Mapping">Type 1</string>
<string name="Screen Mode">Normal</string>
<string name="Save Progress">Off</string>
<boolean name="Frame Skipping" value="false" />
<string name="Controller Port" value="1" />
<boolean name="Analog Mode" value="true" />
What we want to pay attention to is
<boolean name="SW-render" value="false" />
<boolean name="Up-rendering" value="true" />
Up-rendering seems to only have a small affect on graphics, but I don't know what it does exactly.
By setting the SW-render to "true", many of the glitches in some games no longer happen because it is being emulated through software rather than hardware optimization.
The result is more stability, at the cost of some speed and slightly different graphics.
Here are some examples:
Star Ocean: Second Story
With default settings Star Ocean is unplayable due to constant graphic errors and continuous flickering:
Default options:
Here is with SW-render set to true:
The game is playable and runs almost perfectly.
You can see between the two sets of pictures that the graphics do appear slightly different because of the different rendering methods.
Here is another example:
Tekken 3:
With default options Tekken 3 is very playable with only a few slight graphical glitches.
Defualt options:
Here is with SW-render set to true:
While the glitch is fixed, it does not run as fast as it does without SW-render.
The graphics appear different as well.
Default graphics
SW-render graphics:
So the key is to play around with the options to see what works best for your individual game.
Some games from the other thread that were thought unplayable have been playable with SW-render set to true. I have tried:
R4 (works great but appears a little slower than with hardware ops on)
FF7 (no more slowdowns and sound distortions in my short playtime)
Final Fantasy Tactics (no more glitches and flickering)
Legend of Mana (FMV's still have issues but other graphic glitches fixed)
Chrono Cross (still won't work, main menu screen is high res which I suspect the emulator won't support)
FF7 running with SW-render set to true
About Memory Cards:
The memory cards of FPSE and PSXPERIA are interchangeable, just rename them to the proper names and put them in the proper path. (ie. rename 0.raw to slot1.mcd and vice versa.)
Compatibility List:
Continually updated
https://github.com/yifanlu/PSXperia/wiki/Compatibility
Amazing results. Now is it possible to set sw render to be true by defult?
Sent from my R800i using XDA Premium App
So when you go to SW render it is like it turns off all the shaders?
Great trick
XDA is the best !!!!!!!!!!
Btw the Problem is when you change this settings it make jo result! After change you will Start the game the settings will reset! From true to false. Can any One say what i make wrong?
Sent from my R800i using XDA App
If your going to use software rendering then you might want to enable frame skip as well. alot of games will run very slowly with software rendering and frameskip will give you that well needed speed boost
I wonder if this will also fix games that freeze before the game engine even loads, will have to try tonight.
Interesting. I've also found out, in the zPak, there is a file named params.bin and in the data folder, there is a file (that doesn't exist) named options.txt. I think they may be used to tweak the emulator. However, I havent figured out the format yet.
Wow hairdewx...awesome stuff...thanks so much for figuring this out!
Tony hawk pro skater fixed some graphic bugs in character select, but the character still looks bad and still crashes when entering a map.
Marvel vs Capcom had serious issues with the graphics when char selecting and playing, they're gone 100% as far as I can tell, but it became a little bit slower when playing, but still very playable and much better than the graphics bug. Now if frame skipping would fix that... hehe
Thanks a lot for this trick!
Scorbion said:
Amazing results. Now is it possible to set sw render to be true by defult?
Sent from my R800i using XDA Premium App
Click to expand...
Click to collapse
Not at the moment, but possibly if we can figure out how it generates the unique folder name in the ucc folder. Then it would be a matter of updating the tool.
markphyton said:
Btw the Problem is when you change this settings it make jo result! After change you will Start the game the settings will reset! From true to false. Can any One say what i make wrong?
Sent from my R800i using XDA App
Click to expand...
Click to collapse
Are you manually changing the preferences.xml file on your sd card after you run the game for the first time? The settings are not resetting for me... That's how I was getting screen shots of my games
bubblegumballon said:
If your going to use software rendering then you might want to enable frame skip as well. alot of games will run very slowly with software rendering and frameskip will give you that well needed speed boost
Click to expand...
Click to collapse
I only enabled it for Tekken 3, but I didn't notice any speed differences. Maybe the hardware optimization is making it run faster than normal, making the SW-render seem slow?
hairdewx said:
Maybe the hardware optimization is making it run faster than normal, making the SW-render seem slow?
Click to expand...
Click to collapse
Sounds like a reasonable explanation.
I just converted KOF '97 and had minor graphic glitched (still very playable) but this just fixed it completely. Also making it seem slower, but again that's comparing it to before. So maybe it's the way it's supposed to be.
hairdewx said:
I only enabled it for Tekken 3, but I didn't notice any speed differences. Maybe the hardware optimization is making it run faster than normal, making the SW-render seem slow?
Click to expand...
Click to collapse
This seems to make sense. I have Air Combat running on my phone and I noticed the music in the game seemed to be a touch faster than I remember it, but admittedly its been a long time.
Is it possible to add these options via PSXPERIA or will we have to manually edit each game?
Very very interesting.
subcu1ture said:
Is it possible to add these options via PSXPERIA or will we have to manually edit each game?
Click to expand...
Click to collapse
Looks like that now is only possible manually.
This is awesome! I'm going to re-test a bunch of games that make heavy use of sprites that were unplayable before. 3D graphics seem fine, but 2D is more problematic. There was far too much screen flickering, and I suspect it was because the sprites were being used as textures on polygons for scaling and rotation effects or to put them over 3D backgrounds. Perhaps the hardware-renderer just doesn't know how to deal with them?
EDIT:
Also, could the "Up-rendering" be upscaling? Many PSX games only had a resolution of 320x240 and it topped out at 640x512. The Xperia Play's screen is 854x480. Perhaps this setting is related to some sort of filtering after it scales the graphics?
Question: would Chainfire3D drivers help performance?
Just to confirm the playability of a couple games I just recently tested.
Along with the OP, Final Fantasy VII now plays flawless, with perfect sound. I have yet to run into any slowdown, including any in battle.
Retested Suikoden II also. Seems to have eliminated the transition or zone graphic glitch. Game seems to run perfect so far.
EDIT: found that returning to the game from state save, causes a screen glitch on the left side. Simply going into the settings, zooming in, and then putting it back on normal fixes the problem.
I believe what is actually being done is that all the sprites and stuff are handled as normal, but instead of rendering the updated framebuffer by flipping video buffers, they're rendering the screen out as a texture mapped to a single, full-screen polygon. This also gives them a very quick and easy way to support user changing of screen size/zoom by just manipulating the single polygon. I could be wrong though.
awfulrofl said:
Just to confirm the playability of a couple games I just recently tested.
Along with the OP, Final Fantasy VII now plays flawless, with perfect sound. I have yet to run into any slowdown, including any in battle.
Retested Suikoden II also. Seems to have eliminated the transition or zone graphic glitch, but has been replaced with a strange glitchy border, albeit very small. This could also be from a bad iso, so this may be an issue on my end.
Click to expand...
Click to collapse
Re FF VII: I thought multi disc games don't work? Are you just playing the first disc?

[Q] how to make a select all check box

hi, i am trying to make a check all check box and i didnt know how to do that, i cant really explain it that well so i will just show you the code:
xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<CheckBox
android:id="@+id/cbAll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="25"
android:text="Select All"
android:checked="true" />
<CheckBox
android:id="@+id/cb1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:checked="true" />
<CheckBox
android:id="@+id/cb2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:checked="true" />
<CheckBox
android:id="@+id/cb3"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:checked="true" />
<CheckBox
android:id="@+id/cb4"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:checked="true" />
<CheckBox
android:id="@+id/cb5"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:checked="true" />
java:
Code:
CheckBox cb1, cb2, cb3, cb4, cb5, cbAll;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
cb1 = (CheckBox) findViewById(R.id.cb1);
cb2 = (CheckBox) findViewById(R.id.cb2);
cb3 = (CheckBox) findViewById(R.id.cb3);
cb4 = (CheckBox) findViewById(R.id.cb4);
cb5 = (CheckBox) findViewById(R.id.cb5);
cbAll = (CheckBox) findViewById(R.id.cbAll);
cbAll.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
if (cbAll.setChecked(true)){
cb1.setChecked(true);
cb2.setChecked(true);
cb3.setChecked(true);
cb4.setChecked(true);
cb5.setChecked(true);
}else{
cb1.setChecked(false);
cb2.setChecked(false);
cb3.setChecked(false);
cb4.setChecked(false);
cb5.setChecked(false);
}
}
});
what i am asking is, is this part right, and if not can you tell me the right way to do it please:
Code:
cbAll.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
if (cbAll.setChecked(true)){
cb1.setChecked(true);
cb2.setChecked(true);
cb3.setChecked(true);
cb4.setChecked(true);
cb5.setChecked(true);
}else{
cb1.setChecked(false);
cb2.setChecked(false);
cb3.setChecked(false);
cb4.setChecked(false);
cb5.setChecked(false);
}
}
});
thank you.
Your problem is this line...
Code:
if (cbAll.setChecked(true)) {
...
You're setting the value of the cbAll checkbox, not getting it. You should use...
Code:
if (cbAll.isChecked()) {
...
Archer said:
Your problem is this line...
Code:
if (cbAll.setChecked(true)) {
...
You're setting the value of the cbAll checkbox, not getting it. You should use...
Code:
if (cbAll.isChecked()) {
...
Click to expand...
Click to collapse
Thank you!
I also have one more question, how can you have a button that when its clicked it brings me to another activity? Like if you click the button it goes to com.example.example.Example. How would I do that?
steineronie said:
Thank you!
I also have one more question, how can you have a button that when its clicked it brings me to another activity? Like if you click the button it goes to com.example.example.Example. How would I do that?
Click to expand...
Click to collapse
No worries mate. Have a look here...
http://www.dotnetexpertsforum.com/how-to-open-a-new-activity-from-button-click-in-android-t1322.html
I'm not being dismissive when I say this, like I often am with people on xda who ask how to do things that are heavily documented, but googling is a VERY useful tool for development work. I use it heavily on a daily basis. You just need to get good at searching with it and there's very little you can't find.
Eg. for your query I just googled for android button open new activity.
I'm happy to help, as I'm sure others on here are also happy to help, but sometimes Googling will get you a quicker answer.
Good luck mate
Edit: Forgot to mention, there's also a dedicated Android dev forum on here...
http://forum.xda-developers.com/forumdisplay.php?f=524
Archer said:
No worries mate. Have a look here...
http://www.dotnetexpertsforum.com/how-to-open-a-new-activity-from-button-click-in-android-t1322.html
I'm not being dismissive when I say this, like I often am with people on xda who ask how to do things that are heavily documented, but googling is a VERY useful tool for development work. I use it heavily on a daily basis. You just need to get good at searching with it and there's very little you can't find.
Eg. for your query I just googled for android button open new activity.
I'm happy to help, as I'm sure others on here are also happy to help, but sometimes Googling will get you a quicker answer
.
Good luck mate
Edit: Forgot to mention, there's also a dedicated Android dev forum on here...
http://forum.xda-developers.com/forumdisplay.php?f=524
Click to expand...
Click to collapse
Sorry for not looking on google, i will next time, and thank you again.
steineronie said:
Sorry for not looking on google, i will next time, and thank you again.
Click to expand...
Click to collapse
Don't worry about it mate - glad to help.

[Guide} [Basic] App development basics and first android app fully functional

This is basic guide to start to off app development for android..........
This is just a basic guide and not a comprehensive one which covers the whole lot of it but a rather a guide to get a basic simple app of your own running without any issues
Requirements
A bit of java
linux , darwin or a windows 7 machine
internet connection
basic idea of how programming works
sdk with atleast one api installed and configured path
Part 1 setting up everthing and explaining used variables and terms
Now let's get started
[windows}
Download eclipse as any other software and install it by the .exe file and follow the instructions
(linuc macosx )
if you are on a older ditribution of linux the minimum required version of eclipse 3.6 is not supplied via ubuntus main repository ....
so you need to download it from the eclipse official website and install it....
[common}
Installing ADT(Android developer tools) plugin
open up eclipse
Start Eclipse, then select Help > Install New Software.
Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse/
Click OK.
If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
In the next window, you'll see a list of the tools to be downloaded. Click Next.
Read and accept the license agreements, then click Finish.
If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
When the installation completes, restart Eclipse.
Configure the ADT Plugin
Once Eclipse restarts, you must specify the location of your Android SDK directory:
In the "Welcome to Android Development" window that appears, select Use existing SDKs.
Browse and select the location of the Android SDK directory you recently downloaded.
Click Next.
If you haven't encountered any errors, you're done setting up ADT and can continue to Next Steps.
the path to the sdk is case sensitive and absolute so be careful guys....
Now you have virtually everything set up to start building apps
go to file>new>project>android>android application project
something like this will pop up
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
now
the first three fields are yours to choose
now the second part
The build sdk is the sdk that you are targeting in laymans words its like building a building on a certain specific site.....
the minimum required sdk
now if choose this as froyo(api 8) your app will run on froyo os and above and will be compatible with older flavours of android....
once you are done creating a new project hit finish
now you will see something like this
now the calculator is my app name the name that you gave a few minutes ago will be yours...
Now the android is basically divided into three main things
The android manifest
The src folder
The xml
The android manifest basically is a traffic police in lay mans words
it determines which activity comes first when it ends etc...
note:i will be referring the xml to a activty
the src folder contains all of your java
xml's are the skeltel system of android they define the size layout colour or the whole look of your android project....
Note: dont tinker with the gen folder you alone will be responsible for your mistakes
in this tutorial you will be working with only src,res and xml's as i cant dig deeper into it because its a subject too broad to teach....
now lets get started
navigate to res > layout double click on main_activty.xml
below the screen click on activty_main.xml next to graphical layout...
something like this will appear
HTML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
this is the text appearing to you
Note this is auto generated....
now i will explain each line of it with my limited knowledge
HTML:
]<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
This is the auto generated refernce by eclipse yours may vary and might not be same as mine
HTML:
android:layout_width="match_parent"
android:layout_height="match_parent"
now you can see that the layout is set to match_parent by deafult
match_parent utilizes the whole screen into your layout...
and observe this guys the
HTML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
the relative layout has started with <relativelayout and ended with > anything code started should be finished up by > or />
both are literally same
now the next junk of code to deal with
HTML:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
Textview is basically a method by google to display some text on the screen...
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
These two lines suggest that your app has both vertcal and horizontal layout
android:text="@string/hello_world"
this is the text being displayed on your graphical layout
now go to layout > values > strings.xml
double click it
you will see something like this
now basically strings are resource files used to show text on display...
the string name cant have any spaces if it has then u will see errors
but the value of the string can have spaces
Activity
change the text in value field and see the result in graphical layout of the xml
now you basically need to use strings for each and every text that has to be displayed.......
End of part 1
Part 2
Adding of buttons and modifying them
now guys lets add some buttons to our project
navigate to src
in that you will find a java file open it (.java)
you will find something like this
HTML:
package com.exmple.addandsubract;
import android.R;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class Layout extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_item);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_layout, menu);
return true;
}
}
now you might be wondering what is this crap code ...
now lets add buttons
navigate into layout open up the xml
your screen will show up this
HTML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
now within the closing of relative layout
copy paste this
HTML:
<Button
android:id="@+id/bsub"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="79dp"
android:text="@string/sub" /
every button must have an id for our convenience we have added a bsub as our program is to add and subtract a number
HTML:
android:layout_width="match_parent"
the layout width specifies the size of the width of the button
as i have said before match_parent is to occupy the whole screen..if you want it smaller you can set it in dp(density pixels)
HTML:
android:text="@string/sub"
you cant hard code stuff into the button u need to refernce it to a string i have referred it to the string sub
for this to work it requires you to add a string by the name sub in strings.xml
now do the same code again for button add
after this you will have something like this showing up
now that we have our button's set up we need to make this work (in real add java to it)
to accomplish this we need to link xml's to java
this may sound like greek and latin but guys stick with it u will understand everything
now below
HTML:
public class Layout extends Activity {
type this
HTML:
int counter=0;
Button add,sub;
TextView display;
as u may all know we should define a variable before we use them
as we are working with number (basically integars we use integar to define them
now we basically define display as textview
now coming to the real java part
HTML:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_item);
after this chunk of code
type
HTML:
counter=0;
the counter is the number which should be displayed on the screen for us
i have decided to start with 0 you can set it to any number that you prefer
now type this
HTML:
add = (Button) findViewById(R.id.badd);
sub = (Button) findViewById(R.id.bsub);
what this basically says is that add is a button and its id(in the xml) is badd.. findviewbyid is the method for referencing
now its the same for sub button too
HTML:
display = (TextView) findViewById(R.id.textView1);
this will set our display to textview1 which is our activity.xml this may sound as bloat to you but its handy when working with many xmls
now type
HTML:
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
display.setText("Your total is " + counter );
}
});
sub.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
display.setText("Your total is " + counter );
}
});
i will explain what this does
HTML:
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
display.setText("Your total is " + counter );
}
});
type add. then all lists will popup select onclicklistener(this makes the button clickable)
within the brackets of onclicklistener type new(as its a new button) leave a space type view.onlclicklistener(again you will see popups
now what is between this two brackets is what happens when the button is clicked now add this in between these brackets
HTML:
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
counter=counter+1;
display.setText("Your total is " + counter );
}
});
sub.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
counter=counter-1;
display.setText("Your total is " + counter );
}
});
HTML:
counter=counter-1;
this decrements the counter value by 1
after the counter is decremented we need to change the display to show the value of it
we do that by typing this
HTML:
counter=counter-1;
display.setText("Your total is " + counter );
now do this for both buttons test the app on emulator
Have doubts comment below
liked the thread rate it that gives me moral confidence and motivation
1st reserved op has plans of increasing
reservation
2nd
one final one for the day... :cyclops:
thanks! :good:
its to the point and very precise!
View attachment HelloWorld.apk
how do i add an icon? mine is the default andy.
And is it possible to open an app (eg launcher pro) in eclipse and mod it as per my wish?
Harryhades said:
thanks! :good:
its to the point and very precise!
View attachment 1401833
how do i add an icon? mine is the default andy.
And is it possible to open an app (eg launcher pro) in eclipse and mod it as per my wish?
Click to expand...
Click to collapse
There are two ways to add icon after giving the package name in the next menu you can change the icon....or go re drawabl-hdpi and replace the icon.png by the one that u want it should be case sensitive and it should be the same text....
For the 2nd question
yes you can mod these apps i have tried adw from cm'r repo but it should work with launhcer pro to btw the app has to deodexed.....
Thanks
Thanks bro i have started developing one :good:
completing the guide this sunday
I realize this is a few years old but I'm new to developing apps and I been trying to get this to work so that I can add a number to a number stored in a database. The number is put in the database via "edittext". When I try this my number gets replaced with "false" when I hit the add button.
Sent from my LG-LS995 using XDA Free mobile app

[Guide] How to disable AGC/Noise Cancellation for Redmi 5

Hello guys! This is my first tutorial here and I hope to bring more to help y'all in what I can do.Well, I tried many tutorials before, but nothing happened. So I tried changing and adding fluence values into build.prop. So I did it and then I followed the steps by Robse. I got a good result, but the Instagram camera wasn't affected and I had some issues with WhatsApp voice clip using my earphones. So I found the solution by chdloc and I replace the first step by Robse. I didn't add any values on build.prop anymore after that.
First of all you need:
*Redmi 5 (Rosy) rooted
*Es File Explorer (or any app to explore and edit internal files)
P.s.: Do a backup of these files before you edit, okay?
------- Disabled the noise cancellation -------
1 - Go to /system/etc and:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
open audio_plataform_info.xml, find the line <device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="4"/> and change the value to 89. Save and exit.
------- Increase the bit rate -------
(This step is for a good audio quality in your videos.)
2 - Back to /system/etc folder again and:
open media_profiles.xml and find the line <AudioEncoderCap name = "aac" enabled = "true" then change the value 96000 to 128000 or 156000.
------- Increase the volume for recorded videos -------
(Your videos will get a low volume after the step 2. So the third step is to increase the volume when recording your videos.)
3 - Still in /system/etc folder:
open mixer_paths_mtp.xml and find these lines
<Path name="handset-mic">
<Path name="adc1" />
and below <ctl name="MI2S_TX Channels" value="Two" /> add these lines :
<ctl name="DEC1 Volume" value="96" />
<ctl name="DEC2 Volume" value="96" />
3.1 - Still into mixer_paths_mtp.xml find the line
<Path name = "handset-stereo-dmic-ef">
<Path name = "speaker-dmic-endfire" />
</ Path>
and above </ Path> add these lines:
<ctl name="DEC1 Volume" value="96" />
<ctl name="DEC2 Volume" value="96" />
-----------------------------------------------------------------------------
I hope to help y'all. If you have some issues, let me know.
Credits to:
chdloc (https://forum.xda-developers.com/showpost.php?p=68378869&postcount=1139) for showing which line could change the value and disabled noise cancellation.
Robse (http://4pda.ru/forum/index.php?showtopic=793497&st=360#entry57205432) for teaching how we could increase the volume and bit rate.
If you publish in another place, please credit me with chdloc and Robse, okay? I fixed the problem mixing their solution.
MrDavidVeiga said:
Hello guys! This is my first tutorial here and I hope to bring more to help y'all in what I can do.Well, I tried many tutorials before, but nothing happened. So I tried changing and adding fluence values into build.prop. So I did it and then I followed the steps by Robse. I got a good result, but the Instagram camera wasn't affected and I had some issues with WhatsApp voice clip using my earphones. So I found the solution by chdloc and I replace the first step by Robse. I didn't add any values on build.prop anymore after that.
First of all you need:
*Redmi 5 (Rosy) rooted
*Es File Explorer (or any app to explore and edit internal files)
P.s.: Do a backup of these files before you edit, okay?
------- Disabled the noise cancellation -------
1 - Go to /system/etc and:
open audio_plataform_info.xml, find the line <device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="4"/> and change the value to 89. Save and exit.
------- Increase the bit rate -------
(This step is for a good audio quality in your videos.)
2 - Back to /system/etc folder again and:
open media_profiles.xml and find the line <AudioEncoderCap name = "aac" enabled = "true" then change the value 96000 to 128000 or 156000.
------- Increase the volume for recorded videos -------
(Your videos will get a low volume after the step 2. So the third step is to increase the volume when recording your videos.)
3 - Still in /system/etc folder:
open mixer_paths_mtp.xml and find these lines
<Path name="handset-mic">
<Path name="adc1" />
and below <ctl name="MI2S_TX Channels" value="Two" /> add these lines :
<ctl name="DEC1 Volume" value="96" />
<ctl name="DEC2 Volume" value="96" />
3.1 - Still into mixer_paths_mtp.xml find the line
<Path name = "handset-stereo-dmic-ef">
<Path name = "speaker-dmic-endfire" />
</ Path>
and above </ Path> add these lines:
<ctl name="DEC1 Volume" value="96" />
<ctl name="DEC2 Volume" value="96" />
-----------------------------------------------------------------------------
I hope to help y'all. If you have some issues, let me know.
Credits to:
chdloc (https://forum.xda-developers.com/showpost.php?p=68378869&postcount=1139) for showing which line could change the value and disabled noise cancellation.
Robse (http://4pda.ru/forum/index.php?showtopic=793497&st=360#entry57205432) for teaching how we could increase the volume and bit rate.
If you publish in another place, please credit me with chdloc and Robse, okay? I fixed the problem mixing their solution.
Click to expand...
Click to collapse
As far as i know the procedure in redmi 5 and redmi 5 plus is the same regarding this matter. But i don't think the same method will work for miui10/oreo so i didn't try. Do you know if it works on oreo or not? This issue along with the touch problem is really, really getting frustrating.
Archeronn said:
As far as i know the procedure in redmi 5 and redmi 5 plus is the same regarding this matter. But i don't think the same method will work for miui10/oreo so i didn't try. Do you know if it works on oreo or not? This issue along with the touch problem is really, really getting frustrating.
Click to expand...
Click to collapse
I need to update this post. I made it when we only had Nougat.
I tried to use the flashable file and edit the build.prop, but I didn't get a huge result. I almost can't see the difference.
Kindly, how to do the same for Realme 6 pro?
Never came upon such disgusting quality of audio in recorded videos, as in my new Realme 6 pro. Not Pro at all! Can someone help me to remove noise cancellation during video-recording?! And a recorded sound volume too needs to be increased.

Categories

Resources