Fix Huawei G9 Plus accelerometer tilt - Huawei Nova/Nova Plus Guides, News, & Discussion

Fix accelerometer tilt​
{
"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"
}
Video of issue https://yadi.sk/i/fPoYgs3O3N5ssc​In russian language, with history of finding way to manage http://4pda.ru/forum/index.php?showtopic=846874&view=findpost&p=66664464
The instruction for editing the X-axis, similarly can be corrected Y, Z axis too
1. Turn on logcat, it's more convenient through the computer
2. Run any program that uses an accelerometer, wait few secconds
3. Stop the logcat, and look for something like this in it:
10-16 21:30:03.124: I/qti_sensors_hal(1396): read from oem info: data_readback
10-16 21:30:03.124: I/qti_sensors_hal(1396): 0xb3, 0x71, 0x4f, 0xbf
10-16 21:30:03.124: I/qti_sensors_hal(1396): 0x66, 0x92, 0xed, 0x3d
10-16 21:30:03.124: I/qti_sensors_hal(1396): 0xbf, 0xa0, 0x7f, 0x3f
10-16 21:30:03.124: I/qti_sensors_hal(1396): 0x55, 0x0, 0x0, 0x0
10-16 21:30:03.124: I/qti_sensors_hal(1396): 0x0, 0x0, 0x0, 0x0
10-16 21:30:03.124: E/qti_sensors_hal(1396): read from oem info: data_valid_flag=0x55
10-16 21:30:03.124: E/qti_sensors_hal(1396): read from oem info: x_offset=-0.810329, y_offset=0.116002, z_offset=0.998547
10-16 21:30:03.124: E/qti_sensors_hal(1396): Final value: x_offset=-0.810329, y_offset=0.116002, z_offset=0.998547
Click to expand...
Click to collapse
4. Open file /dev/block/platform/soc/7824900.sdhci/by-name/oeminfo through "hex редактор" https://play.google.com/store/apps/details?id=tuba.tools.hexfull&hl=ru
5. Looking for hex values from logcat in oeminfo, in my case this is: b3 71 4f
6. Find right hex values - change, save, start the logcat look at the line E/qti_sensors_hal(1396): Final value: x_offset=-0.810329, if there is a change in the right way - more / less, depending on the nature of accelerometer tilt error of your phone, then continue to change the value until you achieve desired values of x_offset. You can use values from the neighboring Y, Z axes if you think they are right for you. For example, first I inserted values from the line 0x66, 0x92, 0xed, 0x3d and got x_offset about 0.1. But I needed x_offset = 0.0 for this I go further and found out that is b3 39 0 0 is x_offset = 0.0 for me.
7. Enjoy that now you have accelerometer that show correct level
​

Related

Help: How to extract the compressed files from XIP?

Hi all, I'm doing sth. to O2 XDA Stealth rom.
But I found that the "files" (not "modules") in XIP are all compressed, boot.hv looks just 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"
}
I compared the file with some other compressed files, and considered that the file was probabily compressed by LZX arithmetic.
So I tried to decompress the file with cecompr_nt.dll, and here is some codes:
Code:
HMODULE hDll= LoadLibrary(_T("G:\\Projects\\TestCompCE\\cecompr_nt.dll"));
if (hDll==NULL || hDll==INVALID_HANDLE_VALUE) {
printf("ERROR - Can not load the cecompr_nt library\n");
return -1;
}
FILE * hTest = NULL;
_tfopen_s(&hTest,_T("boot.hv"),_T("rb"));
int iSize =0;
fseek(hTest,0,SEEK_END);
iSize = ftell(hTest);
fseek(hTest,0,SEEK_SET);
BYTE * pBuf1 = (BYTE *)malloc(iSize);
BYTE * pBuf2 = (BYTE *)malloc(iSize);
fread_s(pBuf1,iSize,iSize,1,hTest);
fclose(hTest);
ZeroMemory(pBuf2,iSize);
FNCompressOpen CompressOpen= NULL;
FNCompressConvert CompressConvert= NULL;
FNCompressClose CompressClose= NULL;
CompressOpen= (FNCompressOpen)GetProcAddress(hDll, ("LZX_DecompressOpen"));
CompressConvert= (FNCompressConvert)GetProcAddress(hDll, ("LZX_DecompressDecode"));
CompressClose= (FNCompressClose)GetProcAddress(hDll, ("LZX_DecompressClose"));
if (CompressOpen==NULL || CompressConvert==NULL || CompressClose==NULL) {
printf("ERROR - Can not find the compression functions in the library\n");
FreeLibrary(hDll);
return -2;
}
DWORD stream = CompressOpen(0x10000, iSize, Compress_AllocFunc, Compress_FreeFunc, 0);
if (stream == NULL || stream==0xFFFFFFFF) {
printf("ERROR - CompressOpen");
return 14;
}
DWORD res=CompressConvert( stream, pBuf1,0x1AFF,pBuf2,iSize);//Compressed size of boot.hv is 0x1AFF
return 0;
But the CompressConvert function always returns 0 or -1 (i.e. failed)
So can anyone please tell me what's wrong with it? Is it not a LZX compressed file? Does I use wrong decompress function? Or there is no way to decompress it at all?
I found quite a number of ROMs have compressed files in XIP, such as O2 XDA Stealth, ASUS P525, ASUS P535 etc... So if we can decompress it, we should have much more stable and useful ROMs.
Thanks for your help and reading my post, and I appologize for my poor English.

Scariping HTML - problems with non english characters

Hey guys
Really hope some friendly soul out there can help me.
Trying to build an app that uses DownloadStringAsync to download a HTML page. The problem is that Swedish characters (å, ä, ö) doesn't show up and just appear as a black diamond with a white questionmark in it.
{
"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"
}
I guess it ahs to do with unicode or the lack of unicode but have no clue on how to fix it. I'm really new to this.
Please help, thanks in advance.
Edit: Of course I had to spell the title wrong... should be scraping
Have you tried setting the encoding to Unicode?
WebClient wc = new WebClient ();
wc.Encoding = System.Text.Encoding.UTF8;
williammel said:
Have you tried setting the encoding to Unicode?
WebClient wc = new WebClient ();
wc.Encoding = System.Text.Encoding.UTF8;
Click to expand...
Click to collapse
Thank you for your response!
Yes, I have tried it but maybe not exactly the way you suggested. But it didn't help.
This is what I get when debugging:
calendarItems = "R�sta nu\r\n"
Only other thing which you probably tried if you typed that in is
WebClient wc = new WebClient ();
wc.Encoding = System.Text.Encoding.Unicode;
You should post this on the create.msdn.com forums. Since it's run by Microsoft there's Microsoft employees and other people who are very helpful.
Try the HTML Agility pack. The latest version on codeplex has a sample WP7 library, which I found works very well. It should make your scraping easier, plus it'll probably be more flexible around encoding.
http://htmlagilitypack.codeplex.com/
Yes, this works perfectly with Unicode characters. HTML scrapping made easy with this.
Can someone post up the pre-compiled version and a short tutorial on how to use it properly?

[MOD] [Launcher-Theme] TW4.5 Glass-Blue

Hi Guys
Today i want present you my new Launcher-Theme.
Features:
Themed TW4.5 Launcher
Themed Dialer - Icon
Themed Contacts - Icon
Themed- Messeging - Icon
Installation:
Just download it and install it over CWM!
Download:
Only for JVP deodexed:
http://db.tt/bJflsMZ
Screenshots:
{
"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"
}
Credits:
Fr4gg0r
Swiftwork
I am working on it, its not finished yet.
Have fun!
Waiting ...
Thanks anyway
Please use the integrated theming mechanism instead of modding the .apk, launcher will be updated later this evening so you can theme more icons.
Attached is an test version with more theming capabilities.. would be nice if you would try it and report back.
The following possibilities are added to the existing ones:
case Id.Menu.cancel: name = Settings.currentThemeDir+"menu_cancel.png"; break;
case Id.Menu.discard: name = Settings.currentThemeDir+"menu_discard.png"; break;
case Id.Menu.edit: name = Settings.currentThemeDir+"menu_edit.png"; break;
case Id.Menu.preferences: name = Settings.currentThemeDir+"menu_preferences.png"; break;
case Id.Menu.save: name = Settings.currentThemeDir+"menu_save.png"; break;
case Id.Menu.search: name = Settings.currentThemeDir+"menu_search.png"; break;
case Id.Menu.share: name = Settings.currentThemeDir+"menu_share.png"; break;
case Id.Menu.wallpaper: name = Settings.currentThemeDir+"menu_wallpaper.png"; break;
case Id.Menu.settings: name = Settings.currentThemeDir+"menu_settings.png"; break;
case Id.Folder.icon: name = Settings.currentThemeDir+"folder_icon.png"; break;
case Id.Folder.icon_mainmenu: name = Settings.currentThemeDir+"folder_icon_mainmenu.png"; break;
case Id.Folder.open: name = Settings.currentThemeDir+"folder_open.png"; break;
case Id.Add.folder: name = Settings.currentThemeDir+"add_folder.png"; break;
case Id.Add.shortcut: name = Settings.currentThemeDir+"add_shortcut.png"; break;
case Id.Add.wallpaper: name = Settings.currentThemeDir+"add_wallpaper.png"; break;
case Id.Add.widget: name = Settings.currentThemeDir+"add_widget.png"; break;
and
"pageIndicator.png"
Click to expand...
Click to collapse
I think that should be quite self explanatory..
Nice!
Will test it...
Sent from my GT-I9000 using Tapatalk
any easy way to install tw themes
hi sir i flash this theme on galaxy xxjvp very good relaible and speedy but i have 1 prob. message background is black and message cant read plz help me

[Q] Setting for minimum RAM before closing background apps?

From my experience, AOKP ROMs often snappier than CM ones.
Yesterday I did a check and found out that Free RAM in AOKP is just about 10MB (somtime even 1MB) so it allows me to run 2 to 3 apps on the KF at the same time.
Meanwhile, CM10 Free RAM is always about 50 MB, so I hardly can run 2, 3 apps without reopen them.
So my question is: Is there any setting in CM 10 TO change minimum Free RAM to a lower value? I've checked Performance Setting with no luck.
Sent from my Amazon Kindle Fire using Tapatalk 2
Tried dalvik settings in build.prob, still wouldn't work.
{
"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"
}
Sent from my Amazon Kindle Fire using Tapatalk 2
linktohack said:
Tried dalvik settings in build.prob, still wouldn't work.
View attachment 1432313
Sent from my Amazon Kindle Fire using Tapatalk 2
Click to expand...
Click to collapse
The difference is more likely caused by aokp's kernel parameters set in /system/etc/sysctl.conf:
Code:
vm.dirty_ratio = 90
vm.dirty_background_ratio = 55
vm.min_free_kbytes = 2048
vm.oom_kill_allocating_task = 0
vm.swappiness = 0
vm.vfs_cache_pressure = 20
twa_priv said:
The difference is more likely caused by aokp's kernel parameters set in /system/etc/sysctl.conf:
Code:
vm.dirty_ratio = 90
vm.dirty_background_ratio = 55
vm.min_free_kbytes = 2048
vm.oom_kill_allocating_task = 0
vm.swappiness = 0
vm.vfs_cache_pressure = 20
Click to expand...
Click to collapse
Thanks, @twa_priv, I'll definitely give it a try.
And I guess there is no such setting then?
Sent from my iPad using Tapatalk HD

SP Flash tool : Scatter file loading problem ( no noob )

Hi guys,
! If you know where my topic will have more success, please tell me, there are too many forums on XDA !
I have a Jiayu S2 MT6592. I wanted to make a full backup of my rom. (system + cache + user data etc..)
With the new version of SP Flashtool ( SP_Flash_Tool_exe_Windows_v5.1416.00 ), I did it !
I also made files for SP Flashtool thanks to MTKDroidtool.
You can find the full scatter here : http://pastebin.com/vBP89vjB
For the backup, I stopped to FAT partition.
Code:
for userdata
linear_start_addr: 0x 4580 0000
physical_start_addr: 0x 4580 0000
partition_size: 0x1 0000 0000
FAT
linear_start_addr: 0x 1 4580 0000
My files :
{
"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"
}
You see, I have every files and the scatter is correct.
But when I load the scatter into SP Flashtool, Flashtool isnt able to load my data.img with correct adresses ...
I already tried to load manually but it doesnt work.
I think it's because of the length of the address (9digits, 0x 1 0000 0000) instead of 8 for other partitions/blocks.
SPFT cant load the data.img with a size > 4GB maybe...
I can't contact the developers then I post here.
Could you help me ?
I really would like to backup and restore my whole phone with all data. ( really FULL backup )
Thank you very much.

Categories

Resources