[Q] Please help with logcat (w/sensors) - General Questions and Answers

Hello,
I had a first look at the Logcat of my Asus Fonepad (Atom SOC with Android 4.4.2) and found that there are numerous (once a second) warnings in the form:
W/Sensors ( 730) Cannot open file: /data/ACCEL.conf -1
W/Sensors ( 730) Cannot open file: /data/COMPS.conf -1
W/Sensors ( 730) Cannot open file: /data/GYRO.conf -1
I would like to stop these warnings.
I fount at least ACCEL.conf and COMPS.conf in the /data/sensors subdir, the content look to be Chinese.
I tried to copy ACCEL.conf and COMPS.conf to the /data dir, but now I get the following error:
E/Sensors ( 730) Cannot initialize inotify!
Is W/Sensors an Android system routine or a problem with an app?
What's the purpose of these .conf files and what is the usual content?
Any help or explanation is very appreciated, thanks!
Regards
Juergen

Related

A Working mkyaffs ?!

Hi everybody
I have searched all over the internet for a working mkyaffs.exe I found one (attached below) but it's not working with me, it does create the output it should create, but:
1. it's 14MB larger than the one CWM Created.
2. unyaffs returns error when trying to unyaffs the file I created via mkyaffs
The error that is produced is:
Code:
0 [main] unyaffs 768 exception::handle: Exception: STATUS_ACCESS_VIOLATION
624 [main] unyaffs 768 open_stackdumpfile: Dumping stack trace to unyaffs.ex
e.stackdump
The stackdump is:
Code:
Exception: STATUS_ACCESS_VIOLATION at eip=6112A143
eax=00000000 ebx=00000004 ecx=00002400 edx=00000000 esi=20028390 edi=00000000
ebp=0028ABE8 esp=0028ABE4 program=C:\Users\Omar\Desktop\New folder (2)\unyaffs.exe, pid 768, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0028ABE8 6112A143 (00000000, 0040DC70, 00000200, 00000000)
0028AC28 004010BF (0028ACA9, 00000000, 20028280, 00401333)
0028AC58 004013AF (00000002, 0028AC80, 20028280, 0028ACA0)
0028AD08 61007535 (00000000, 0028CD88, 61006B20, 00000000)
End of stack trace
Thanks in advance

Flashtool :: Android on Sony

Hi all,
I am trying to use the Flashtool (had a link to the homepage here but forum doesn't allow it) to flash a newly bought Sony Xperia S to Android 4.
I am stuck on a java error that I can not see anyone else having. I have tried on an OpenSuse 12.1 system (running java-1_6_0-openjdk-1.6.0.0_b24.1.11.3-9.1.x86_64) and an Ubuntu system running java 7 (liveCD).
The same error occurs:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: foxtrot/Job
Caused by: java.lang.ClassNotFoundException: foxtrot.Job
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: gui.FlasherGUI. Program will exit.
I have found the foxtrot.jar library but putting that in the same path as the Flashtool or the JAVA_HOME/lib did not help at all.
It doesn't seem to be a needed step anyway.
So I am unsure what I am missing in regards to this foxtrot library.
I can't see anything on the wiki over on github.
Any advice appreciated.
Thanks
DaveQB1 said:
Hi all,
I am trying to use the Flashtool (had a link to the homepage here but forum doesn't allow it) to flash a newly bought Sony Xperia S to Android 4.
I am stuck on a java error that I can not see anyone else having. I have tried on an OpenSuse 12.1 system (running java-1_6_0-openjdk-1.6.0.0_b24.1.11.3-9.1.x86_64) and an Ubuntu system running java 7 (liveCD).
The same error occurs:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: foxtrot/Job
Caused by: java.lang.ClassNotFoundException: foxtrot.Job
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: gui.FlasherGUI. Program will exit.
I have found the foxtrot.jar library but putting that in the same path as the Flashtool or the JAVA_HOME/lib did not help at all.
It doesn't seem to be a needed step anyway.
So I am unsure what I am missing in regards to this foxtrot library.
I can't see anything on the wiki over on github.
Any advice appreciated.
Thanks
Click to expand...
Click to collapse
Ok I ran an strace on this and found this line
Code:
[pid 23778] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/foxtrot-core-4.0.jar", 0x7f1e22081ec0) = -1 ENOENT (No such file or directory)
I found "foxtrot-core-4.0.jar" and downloaded it.
Now I am getting a different error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: se/marell/libusb/UsbSystem
at gui.FlasherGUI.main(FlasherGUI.java:173)
Caused by: java.lang.ClassNotFoundException: se.marell.libusb.UsbSystem
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 1 more
This looks libusb related though, so I will pursue that.
DaveQB1 said:
Ok I ran an strace on this and found this line
Code:
[pid 23778] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/foxtrot-core-4.0.jar", 0x7f1e22081ec0) = -1 ENOENT (No such file or directory)
I found "foxtrot-core-4.0.jar" and downloaded it.
Now I am getting a different error:
Code:
Exception in thread "main" java.lang.NoClassDefFoundError: se/marell/libusb/UsbSystem
at gui.FlasherGUI.main(FlasherGUI.java:173)
Caused by: java.lang.ClassNotFoundException: se.marell.libusb.UsbSystem
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 1 more
This looks libusb related though, so I will pursue that.
Click to expand...
Click to collapse
Ok got back to this and again ran and strace on the FlashTool process and all of it's children. I found this error interesting:
Code:
[pid 28274] stat("/home/david/Android/SonyXperia/FlashTool/se/marell/libusb/UsbSystem.class", 0x7fa78baf2b60) = -1 ENOENT (No such file or directory)
In fact doing an strace on file calls only we get this sub section of calls that might be of interest:
[pid 28512] stat("/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/flavormap.properties", {st_mode=S_IFREG|0644, st_size=3835, ...}) = 0
[pid 28512] stat("/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/flavormap.properties", {st_mode=S_IFREG|0644, st_size=3835, ...}) = 0
[pid 28512] open("/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/flavormap.properties", O_RDONLY) = 21
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/se/marell/libusb/UsbSystem.class", 0x7f4e6b663b60) = -1 ENOENT (No such file or directory)
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/jna.jar", 0x7f4e6b662a90) = -1 ENOENT (No such file or directory)
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/jopt-simple-4.3.jar", 0x7f4e6b662a90) = -1 ENOENT (No such file or directory)
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/libusb.jar", 0x7f4e6b662a90) = -1 ENOENT (No such file or directory)
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/log4j-1.2.16.jar", 0x7f4e6b662a90) = -1 ENOENT (No such file or directory)
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/platform.jar", {st_mode=S_IFREG|0644, st_size=913475, ...}) = 0
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/platform.jar", {st_mode=S_IFREG|0644, st_size=913475, ...}) = 0
[pid 28512] open("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/platform.jar", O_RDONLY) = 27
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/rsyntaxtextarea.jar", 0x7f4e6b662a90) = -1 ENOENT (No such file or directory)
[pid 28512] stat("/home/david/Android/SonyXperia/FlashTool/x10flasher_lib/x10flasher-res.jar", 0x7f4e6b662a90) = -1 ENOENT (No such file or directory)
Exception in thread "main" java.lang.NoClassDefFoundError: se/marell/libusb/UsbSystem
at gui.FlasherGUI.main(FlasherGUI.java:173)
Caused by: java.lang.ClassNotFoundException: se.marell.libusb.UsbSystem
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 1 more
I feel like my downloaded Flashtool is missing a bunch of extra libraries that x10flasher.jar binary is expecting.
Ok maybe this is what I am having issue with
"Apply the latest update (each update is cumulative)
Updates will not be functionnal if full 0.9.2.0 is not installed"
So I only downloaded 9.3.0 as it said above it:
Full install :
Click to expand...
Click to collapse
Looking at the previous release tabs I only see 9.0.0 as the most previous release version. Hmmmmm
I work in IT, I wouldn't have thought this would be so challenging to me.
DaveQB1 said:
Ok maybe this is what I am having issue with
"Apply the latest update (each update is cumulative)
Updates will not be functionnal if full 0.9.2.0 is not installed"
So I only downloaded 9.3.0 as it said above it:
Looking at the previous release tabs I only see 9.0.0 as the most previous release version. Hmmmmm
I work in IT, I wouldn't have thought this would be so challenging to me.
Click to expand...
Click to collapse
PS the md5sum of my download of 9.3.0 checks out ok.
Ok don't mind me.
Something must have gone wrong in the untarring.
Code:
[email protected]: ~/Android/SonyXperia/FlashTool#
find x10flasher_lib -type f | wc -l
1475
[email protected]: ~/Android/SonyXperia/FlashTool#
find ../FlashTool.orig/x10flasher_lib -type f | wc -l
655

wifi problem

Hello,
i own a RK3188 device (T-R42 with board version B351 V1.1)
I flashed a custom rom and since then i am no more able to reactivate the wifi
I tried many other custom roms and stock roms, but i have always the same behavior:
When from the settings i try to turn it on, it stays on for a few seconds ( no wireless network is shown ), and then it goes off
This is the logcat that is printed when i try to turn my wifi on:
(using command adb logcat on terminal emulator session)
D/WifiHW ( 368): Read wifi chip type OK ! wifi_chip_type = RK901
D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko, DRIVER_MODULE_ARG =
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/WifiService( 368): setWifiEnabled: true pid=870, uid=1000
D/AudioHardwareALSA( 109): Audio exiting sandby will open audio device
D/AudioHardwareALSA( 109): AudioStreamOutALSA::standby().....
D/WifiHW ( 368): wifi_load_driver: driver load failed
D/WifiHW ( 368): Unable to unload driver module "wlan": No such file or directory
E/WifiStateMachine( 368): Failed to load driver!
E/WifiStateMachine( 368): DriverFailedState
i checked that under system/lib/modules do exist these files:
rkwifi.ko
wlan.ko
both with owner 'root', group 'root' and permissions 644
Can someone give me some hints on what is the possible cause of this error,
and how to discover the right wifi drivers for my device?
Thank you!
Try reflashing the baseband again, I was having the same problem with a kernel, and a custom rom, I flashed the stock baseband and reflash the custom rom and my wifi started working again, or check the kernel that you are using, that could be the problem. Hope this helped out a bit, I know its a real headache when this happens, hope you made a backup too.
Vicolodo said:
Hello,
i own a RK3188 device (T-R42 with board version B351 V1.1)
I flashed a custom rom and since then i am no more able to reactivate the wifi
I tried many other custom roms and stock roms, but i have always the same behavior:
When from the settings i try to turn it on, it stays on for a few seconds ( no wireless network is shown ), and then it goes off
This is the logcat that is printed when i try to turn my wifi on:
(using command adb logcat on terminal emulator session)
D/WifiHW ( 368): Read wifi chip type OK ! wifi_chip_type = RK901
D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko, DRIVER_MODULE_ARG =
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/WifiService( 368): setWifiEnabled: true pid=870, uid=1000
D/AudioHardwareALSA( 109): Audio exiting sandby will open audio device
D/AudioHardwareALSA( 109): AudioStreamOutALSA::standby().....
D/WifiHW ( 368): wifi_load_driver: driver load failed
D/WifiHW ( 368): Unable to unload driver module "wlan": No such file or directory
E/WifiStateMachine( 368): Failed to load driver!
E/WifiStateMachine( 368): DriverFailedState
i checked that under system/lib/modules do exist these files:
rkwifi.ko
wlan.ko
both with owner 'root', group 'root' and permissions 644
Can someone give me some hints on what is the possible cause of this error,
and how to discover the right wifi drivers for my device?
Thank you!
Click to expand...
Click to collapse
Do you have stock firmware/rom of your device? If yes then you need to flash(patch) all the files in lib/modules.
Also in updater-script add this code:
symlink("rkwifi.ko", "/system/lib/modules/wlan.ko");
then flash it via cwm
MgudFrn said:
Do you have stock firmware/rom of your device? If yes then you need to flash(patch) all the files in lib/modules.
Also in updater-script add this code:
symlink("rkwifi.ko", "/system/lib/modules/wlan.ko");
then flash it via cwm
Click to expand...
Click to collapse
Ok thank you,
yes, the seller gave me some links for the stock firmware, but he is not sure on which is the original stock firmware
(for T-R42 there are a lot of different board versions with different chipsets...)
i can extract the components with a tool (perhaps i need only system.img and unpack it)
and build a zip to patch the system/lib/modules
by the way, why i have to add that symlink?
i checked that RK901 information is under the sys folder,
the file system under this folder is built dynamically by the kernel, i am right?
do you think that RK901 is hard-coded into the kernel?
because opening the board i checked that i have a different chipset... wifi is managed by chip AP6210
Thank you!
kidkree1 said:
Try reflashing the baseband again, I was having the same problem with a kernel, and a custom rom, I flashed the stock baseband and reflash the custom rom and my wifi started working again, or check the kernel that you are using, that could be the problem. Hope this helped out a bit, I know its a real headache when this happens, hope you made a backup too.
Click to expand...
Click to collapse
Thank you too
The strange thing i see on the settings is that the wifi mac address is not set (unknown)...perhaps this happens because wifi driver cannot be loaded?
The second strange thing i see is that the file
/sys/class/rkwifi/chip
(this is the file used by the wifi driver loader procedure to know which is the wifi chip of the board)
contains RK901
i read somewhere that this chip is used on rk3066 boards, instead i have a rk3188 board
Besides that, i opened my tv box and i saw that i have the chip AP6210...
By the way, this is the link to an example driver loader procedure
https://github.com/gripped/MK808-he...lob/master/RK30_MT5931_MT6622/wifi/wifi.c.new
I found it googling one of the strings that is reported by the logcat
'D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko',
this string is contained in the c source file
so also the driver load procedure seems done for other device (rk3066)...
or perhaps rk3066 and rk3188 share the same procedures... i dont know...
Vicolodo said:
Ok thank you,
yes, the seller gave me some links for the stock firmware, but he is not sure on which is the original stock firmware
(for T-R42 there are a lot of different board versions with different chipsets...)
i can extract the components with a tool (perhaps i need only system.img and unpack it)
and build a zip to patch the system/lib/modules
by the way, why i have to add that symlink?
i checked that RK901 information is under the sys folder,
the file system under this folder is built dynamically by the kernel, i am right?
do you think that RK901 is hard-coded into the kernel?
because opening the board i checked that i have a different chipset... wifi is managed by chip AP6210
Thank you!
Click to expand...
Click to collapse
Previously I faced same problem with my mt6575 chipset and that was resolved by this method. I know mine and yours chipset is totally different but the logcat that I got was same as yours mentioning 'loading drivers failed'. So you can give it a try. but plz do a nandroid backup first.
Driver problem??
Vicolodo said:
Hello,
i own a RK3188 device (T-R42 with board version B351 V1.1)
I flashed a custom rom and since then i am no more able to reactivate the wifi
I tried many other custom roms and stock roms, but i have always the same behavior:
When from the settings i try to turn it on, it stays on for a few seconds ( no wireless network is shown ), and then it goes off
This is the logcat that is printed when i try to turn my wifi on:
(using command adb logcat on terminal emulator session)
D/WifiHW ( 368): Read wifi chip type OK ! wifi_chip_type = RK901
D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko, DRIVER_MODULE_ARG =
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/WifiService( 368): setWifiEnabled: true pid=870, uid=1000
D/AudioHardwareALSA( 109): Audio exiting sandby will open audio device
D/AudioHardwareALSA( 109): AudioStreamOutALSA::standby().....
D/WifiHW ( 368): wifi_load_driver: driver load failed
D/WifiHW ( 368): Unable to unload driver module "wlan": No such file or directory
E/WifiStateMachine( 368): Failed to load driver!
E/WifiStateMachine( 368): DriverFailedState
i checked that under system/lib/modules do exist these files:
rkwifi.ko
wlan.ko
both with owner 'root', group 'root' and permissions 644
Can someone give me some hints on what is the possible cause of this error,
and how to discover the right wifi drivers for my device?
Thank you!
Click to expand...
Click to collapse
The last few line sof your logcat show that there is some driver error...try a full wipe, then (as already suggested) flash a stock ROM for your device.
(<--Remember to Thank me if this helps)
Vicolodo said:
Thank you too
The strange thing i see on the settings is that the wifi mac address is not set (unknown)...perhaps this happens because wifi driver cannot be loaded?
The second strange thing i see is that the file
/sys/class/rkwifi/chip
(this is the file used by the wifi driver loader procedure to know which is the wifi chip of the board)
contains RK901
i read somewhere that this chip is used on rk3066 boards, instead i have a rk3188 board
Besides that, i opened my tv box and i saw that i have the chip AP6210...
By the way, this is the link to an example driver loader procedure
https://github.com/gripped/MK808-he...lob/master/RK30_MT5931_MT6622/wifi/wifi.c.new
I found it googling one of the strings that is reported by the logcat
'D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko',
this string is contained in the c source file
so also the driver load procedure seems done for other device (rk3066)...
or perhaps rk3066 and rk3188 share the same procedures... i dont know...
Click to expand...
Click to collapse
Vicolodo,
Were you able to get your wifi working again? I am having a similar issue on RK3066 aftermarket GPS car unit and can really use some advice.
Thanks!
P340

why wifi not working? here there is the answer...

hello,
i open this thread to collect informations about a common problem that happens after flashing new roms
this thread has generic purpose, and is not intended for a specific board...
- suggestions on how to discover the cause of the problem
- suggestions on how to fix the problem
anyone that think to have some useful informations on this issue can insert his post
i am not an expert ( and still my wifi is not working )
but i collected some informations, and i would like to share them
The first thing is:
what happens when from the settings i click on wifi to turn it on
to see this, i opened a terminal emulator session
and i have written this:
adb logcat > 'some file name on a writable directory' (for example , i redirected the output to the external sd card)
here is what was written on the file (extracting from the file only the last part, that is the output related to my action of wifi activation):
D/WifiHW ( 368): Read wifi chip type OK ! wifi_chip_type = RK901
D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko, DRIVER_MODULE_ARG =
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/WifiService( 368): setWifiEnabled: true pid=870, uid=1000
D/AudioHardwareALSA( 109): Audio exiting sandby will open audio device
D/AudioHardwareALSA( 109): AudioStreamOutALSA::standby().....
D/WifiHW ( 368): wifi_load_driver: driver load failed
D/WifiHW ( 368): Unable to unload driver module "wlan": No such file or directory
E/WifiStateMachine( 368): Failed to load driver!
E/WifiStateMachine( 368): DriverFailedState
Searching on the web this string: "Read wifi chip type OK ! wifi_chip_type"
i found this:
https://github.com/aloksinha2001/pi****u-3.0.8-alok/blob/master/RK30_MT5931_MT6622/wifi/wifi.c
into procedure check_wifi_chip_type() i saw exactly this part:
else if (0 == strncmp(buf, "RK901", strlen("RK901")) )
{
wifi_chip_type = RK901;
ALOGD("Read wifi chip type OK ! wifi_chip_type = RK901");
}
here is compared the value of string buf with "RK901"
the string buf is read from this file: "/sys/class/rkwifi/chip"
(so i suppose that this file has been written before by some other procedure)
so, i searched the caller procedure of check_wifi_chip_type():
in the same source i find this caller:
int wifi_load_driver()
{
#ifdef WIFI_DRIVER_MODULE_PATH
char driver_status[PROPERTY_VALUE_MAX];
int count = 100; /* wait at most 20 seconds for completion */
int type;
char path[64];
if (is_wifi_driver_loaded()) {
return 0;
}
strcpy(path, DRIVER_MODULE_PATH);
type = check_wifi_chip_type();
if((type == RK901) || (type == RK903) || (type == BCM4330)) {
strcpy(path, "/system/lib/modules/rkwifi.ko");
} else if (type == RTL8188CU) {
....
this procedure as first step checks if the driver is already loaded,
if not:
the driver module path is set by default to "/system/lib/modules/wlan.ko"
Then basing on the chip type is got a more specific path:
for example, for RK901/RK903/BCM4330 the path is set to : "/system/lib/modules/rkwifi.ko"
Then, is checked if the file does exist, and if not the path is seth to the default DRIVER_MODULE_PATH,
that is "/system/lib/modules/wlan.ko"
// judge if the KO file exist, if not, insmod wlan.ko
if (access(path, F_OK) < 0) {
ALOGD("DRIVER_MODULE_PATH = %s (Not such file)...", path);
strcpy(path, DRIVER_MODULE_PATH);
}
Then,
is called insmod (insert module),
to load the driver file in 'memory' (a new module into the kernel, i suppose):
if (insmod(path, DRIVER_MODULE_ARG) < 0) {
ALOGD("%s: driver load failed", __FUNCTION__);
wifi_unload_driver();
if(retry_count-- > 0) goto retry_load_driver;
return -1;
}
Looking the logcat above,
the flow in my case stops here, with : wifi_load_driver: driver load failed
so something happened in insmod:it is not able to load the file /system/lib/modules/rkwifi.ko in memory or initialize it
(the file is found, else the process should stop before, when checking access to the file)
The insmod function does this:
allocates memory for the structure name (type utsname) :
memset(&name, 0, sizeof(name));
and load the file on this area:
module = load_file(filename_release, &size);
Then is checked if the file has been loaded
if (!module)
return -1;
and finally
the module is 'initialized':
ret = init_module(module, size, args);
One of this two events went wrong, because insmod returned -1
My investigation stops here... i am not able to proceed more...
but i am open to all suggestions and hints
Thank you!!
Vicolodo said:
The first thing is:
what happens when from the settings i click on wifi to turn it on
to see this, i opened a terminal emulator session
and i have written this:
adb logcat > 'some file name on a writable directory' (for example , i redirected the output to the external sd card)
here is what was written on the file (extracting from the file only the last part, that is the output related to my action of wifi activation):
D/WifiHW ( 368): Read wifi chip type OK ! wifi_chip_type = RK901
D/WifiHW ( 368): wifi_load_driver: DRIVER_MODULE_PATH = /system/lib/modules/rkwifi.ko, DRIVER_MODULE_ARG =
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/BluetoothAdapterService(1097373104)( 811): getState(): mAdapterProperties: [email protected] 4168aef0
D/WifiService( 368): setWifiEnabled: true pid=870, uid=1000
D/AudioHardwareALSA( 109): Audio exiting sandby will open audio device
D/AudioHardwareALSA( 109): AudioStreamOutALSA::standby().....
D/WifiHW ( 368): wifi_load_driver: driver load failed
D/WifiHW ( 368): Unable to unload driver module "wlan": No such file or directory
E/WifiStateMachine( 368): Failed to load driver!
E/WifiStateMachine( 368): DriverFailedState
Searching on the web this string: "Read wifi chip type OK ! wifi_chip_type"
i found this:
https://github.com/aloksinha2001/pi****u-3.0.8-alok/blob/master/RK30_MT5931_MT6622/wifi/wifi.c
into procedure check_wifi_chip_type() i saw exactly this part:
else if (0 == strncmp(buf, "RK901", strlen("RK901")) )
{
wifi_chip_type = RK901;
ALOGD("Read wifi chip type OK ! wifi_chip_type = RK901");
}
here is compared the value of string buf with "RK901"
the string buf is read from this file: "/sys/class/rkwifi/chip"
(so i suppose that this file has been written before by some other procedure)
so, i searched the caller procedure of check_wifi_chip_type():
in the same source i find this caller:
int wifi_load_driver()
{
#ifdef WIFI_DRIVER_MODULE_PATH
char driver_status[PROPERTY_VALUE_MAX];
int count = 100; /* wait at most 20 seconds for completion */
int type;
char path[64];
if (is_wifi_driver_loaded()) {
return 0;
}
strcpy(path, DRIVER_MODULE_PATH);
type = check_wifi_chip_type();
if((type == RK901) || (type == RK903) || (type == BCM4330)) {
strcpy(path, "/system/lib/modules/rkwifi.ko");
} else if (type == RTL8188CU) {
....
this procedure as first step checks if the driver is already loaded,
if not:
the driver module path is set by default to "/system/lib/modules/wlan.ko"
Then basing on the chip type is got a more specific path:
for example, for RK901/RK903/BCM4330 the path is set to : "/system/lib/modules/rkwifi.ko"
Then, is checked if the file does exist, and if not the path is seth to the default DRIVER_MODULE_PATH,
that is "/system/lib/modules/wlan.ko"
// judge if the KO file exist, if not, insmod wlan.ko
if (access(path, F_OK) < 0) {
ALOGD("DRIVER_MODULE_PATH = %s (Not such file)...", path);
strcpy(path, DRIVER_MODULE_PATH);
}
Then,
is called insmod (insert module),
to load the driver file in 'memory' (a new module into the kernel, i suppose):
if (insmod(path, DRIVER_MODULE_ARG) < 0) {
ALOGD("%s: driver load failed", __FUNCTION__);
wifi_unload_driver();
if(retry_count-- > 0) goto retry_load_driver;
return -1;
}
Looking the logcat above,
the flow in my case stops here, with : wifi_load_driver: driver load failed
so something happened in insmod:it is not able to load the file /system/lib/modules/rkwifi.ko in memory or initialize it
(the file is found, else the process should stop before, when checking access to the file)
The insmod function does this:
allocates memory for the structure name (type utsname) :
memset(&name, 0, sizeof(name));
and load the file on this area:
module = load_file(filename_release, &size);
Then is checked if the file has been loaded
if (!module)
return -1;
and finally
the module is 'initialized':
ret = init_module(module, size, args);
One of this two events went wrong, because insmod returned -1
My investigation stops here... i am not able to proceed more...
but i am open to all suggestions and hints
Thank you!!
Click to expand...
Click to collapse
Interesting... Yesterday i was trying to solve this problem caused by a cwm recovery flashing during about 8 hours with my mk809ii. I let my pc downloading about 10 different roms from other similar devices, and this morning i stay to try one by one. Finally i found "mk808B bob finless 2.1 room (jb4.2.2) with wifi APxxxx" (APxxxx is my wifi chip, i can't remember the xxxx just now) fix both wifi and bluetooth.
You did a good research, i will save your post on case i get the error again, but i think the best thing to do is to search for a compatible rom and try, with same both cpu and wifi chipset. Also now after read your post i am going to save a backup of system /lib and system /etc directories, maybe changing the wifi library files fix the error without needing of flash and reflash...
Thanks, i liked your post!
Enviado desde mi GT-P7510 usando Tapatalk 2

How to extract data from ADB/twrp (.ab) backup?

Hi guys,
i made a backup using ADB and TWRP, no i have a backup.ab that i cant do anything with. I've been searching for a while and i cant unpack, split, or extract the backup. I tried using windows 10, ubuntu bash (on winows10), and virtual linux.
so far, windows and virtual linuxmint 18 give me about the same error.
I used :
Code:
java -jar abe.jar unpack backup1.ab nexus745544.tar
To unpack it, but i get the following error (both windows and linux):
Code:
Invlaid Magic: TWRPtwstreamheaderöâS·TWRPtwfilename€ÌøÔñ£â/data/media/0/TWRP/BACKUPS/0117111846320501/2017-12-17--02-02-18_NRD90MN920PVPS3DQK1/system.ext4.winTWRPtwdatablockDÝíº/app/00407550000000000000000000000062132154162340010533xustar rootroot50 RHT.security.selinux=u:object_r:system_file:s0
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid Magic TWRPtwstreamheaderöâS·TWRPtwfilename€ÌøÔñ£â/data/media/0/TWRP/BACKUPS/0117111846320501/2017-12-17--02-02-18_NRD90MN920PVPS3DQK1/system.ext4.winTWRPtwdatablockDÝíº/app/00407550000000000000000000000062132154162340010533xustar rootroot50 RHT.security.selinux=u:object_r:system_file:s0
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:502)
at org.nick.abe.Main.main(Main.java:128)
... 5 more
Caused by: java.lang.IllegalArgumentException: Invalid Magic TWRPtwstreamheaderöâS·TWRPtwfilename€ÌøÔñ£â/data/media/0/TWRP/BACKUPS/0117111846320501/2017-12-17--02-02-18_NRD90MN920PVPS3DQK1/system.ext4.winTWRPtwdatablockDÝíº/app/00407550000000000000000000000062132154162340010533xustar rootroot50 RHT.security.selinux=u:object_r:system_file:s0
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:332)
... 6 more
other commands i tried:
Code:
dd if=backup1.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" > backup11.tar
This command creates a backup11.tar (with 0 bytes) but the terminal just hangs.
Code:
dd if=backup1.ab bs=24 skip=1|openssl zlib -d > mybackup7668.tar
This command also creates the .tar file with 0 bytes but the terminal throws error:
Code:
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
which i'm still trying to fix this error, maybe it fixes it.
if you have any more questions, let me know.
Any help is appreciated. Thanks.
Same problem here,
I think TWRP backups are in some way different from others .ab files.
Just wanted to also say I have the exact same problem as the other two people in the thread.
Only, I also have my efs partitions in there and now when I need them my phone is essentially a tablet.
Same problem here. It is hard to believe that the answer to this question is so hard to find. After all, one only needs to be able to read the source code to find the answer (unfortunately, that's not what I am qualified to do)
For anyone else in trouble, more information can be found here:
github.com/TeamWin/Team-Win-Recovery-Project/issues/898

Categories

Resources