Troubleshooting random reboot problems on S2 exynos5433 tablet ONLY discussion for users running any version of Android 10 - Galaxy Tab S2 Q&A, Help & Troubleshooting

The gnss hwbinder patch have been incorporated into the Aug 25 17.1 builds.
Please take 10 minutes to read all of post #1 and #2. DO NOT USE this thread to report any other problems, it's only for troubleshooting random reboots or reboots into TWRP for S2 exynos5433 tablet users. If this is unreasonable, then stop reading. Thank you.
If you cannot provide the logs below, please do not participate in this thread. Thank you.
I will take a look at all logs uploaded. The more the better to help find root cause or causes.
At this point, I have no solution to fix random reboots, but gathering data that might help narrow down which app or process is causing this.
Instructions
1. If you are experiencing random reboot or reboot into TWRP, you MUST supply tombstone logs. It's super easy and simple to do. Connect your device to PC using micro usb cable.
Make sure adb debugging is enabled in developer options. To enable developer options, tap settings, about tablet, build number 7 times until it says developer options unlocked. Go back to settings, system, advanced, developer options, enable android debugging and rooted debugging.
Bash:
adb root
adb shell
cd data/tombstones
ls -al
# if you see files tombstone_00, tombstone_01, etc then
exit
mkdir t
cd t
adb pull data/tombstones/
Zip all the files and upload here. Alternatively, you can send me the zipped logs via xda PM.
2. The better log would be adb logcat of the problem (random reboot, stuck at boot animation due to random restart) that just happened or happening.
Bash:
adb logcat > crash.txt
# wait 30 seconds then hit ctrl-c to stop capture
Please zip the .txt file before uploading. For some reason, I cannot see .txt files here.
FAQ
Q1. When will this random reboot be solved?
A1. Set your expectations that it will never be solved. At this point, I'm only gathering data to try and help. There may never be a fix if it's due to a proprietary Samsung blob that can never be updated. DO NOT ask when or if this can be fixed. It is not productive and I will completely ignore the question. Thank you.
Q2. Will you provide updates?
A2. I will only provide updates if I think we have found a solution. Otherwise, assume I'm not working on this problem because like you, I have other responsibilities and interests in life.
Q3. What will you do with the logs?
A3. I will look at every uploaded log and try to find a common pattern among them. If I find something that I think it's worth reporting, then I will post it here. If I need more information, I will revise the instructions and ask for more.
Q4. Why are you doing this?
A4. Let me be clear. I'm not experiencing any random reboots myself, I'm just trying to help if I can. The more logs you can provide, the more likely we can narrow down the problem. No logs from the commuity means the random reboot problems will never be fixed.
Let me be clear again, DO NOT ask when or if this can be fixed. Thank you.

Reserved.

Hi @retiredtab,
thanks for your offer to analyze the crash-logs!
I'm using a T810 Tab (gts210wifi) and are experiencing random reboots since updating to lineage-17.1 (ripee).
The reboots itself are of different types:
1) Stuck at bootanimation - only exit by three-button-reset.
2) Reboot to unlock-screen, but after unlock-code endless other unlock-screens come up - only exit by three-button-reset.
3) Reboot to unlock-screen, but after unlock-code the screen is empty and after some time (few minutes) it resets and ends in the same sequence - only exit by three-button-reset.
4) Reboot to unlock-screen, everything ok after unlocking.
For most of the reboots it was my observation, that there was an event, which did wakeup the tablet from deeper sleep (plugin to charger, switching on the screen, alarm, ...).
That caused me to write a small Tasker-app profile, which is pinging my dns-server all 2mins (to prevent a deeper sleep). With that profile active I did not experience any reboot for at least 2 months. Before that I had about one reboot per day.
To support your analysis, I disabled that Tasker-profile and the reboots are back.
During the last 24hours I had two reboots of type 4, and I was capturing the logcat and tombstones afterwards.
Looking into the captured data I got the impression that it might contain sensitive data (found my server-names, calender-events and so on) so I'm unsure if it can contain even more sensitive data like login-information or wifi-passwords.
So I'm hesitating to upload them to this public forum.
Would you agree to receive the zipped logs by PM instead?

Yogi555 said:
I'm using a T810 Tab (gts210wifi) and are experiencing random reboots since updating to lineage-17.1 (ripee).
The reboots itself are of different types:
1) Stuck at bootanimation - only exit by three-button-reset.
2) Reboot to unlock-screen, but after unlock-code endless other unlock-screens come up - only exit by three-button-reset.
3) Reboot to unlock-screen, but after unlock-code the screen is empty and after some time (few minutes) it resets and ends in the same sequence - only exit by three-button-reset.
4) Reboot to unlock-screen, everything ok after unlocking.
For most of the reboots it was my observation, that there was an event, which did wakeup the tablet from deeper sleep (plugin to charger, switching on the screen, alarm, ...).
That caused me to write a small Tasker-app profile, which is pinging my dns-server all 2mins (to prevent a deeper sleep). With that profile active I did not experience any reboot for at least 2 months. Before that I had about one reboot per day.
To support your analysis, I disabled that Tasker-profile and the reboots are back.
During the last 24hours I had two reboots of type 4, and I was capturing the logcat and tombstones afterwards.
Click to expand...
Click to collapse
Hi, @Yogi555.
Your reboot types 2 and 3 are interesting - I haven't seen them happen with my device. I only get types 1 and (occasionally) 4.
And type 5: reboot to TWRP. On my device this has happened more often than type 4, but both are much less common than type 1.
It does sound like the device waking from deep sleep could be triggering these events. Certainly, my device most often goes into type 1 when it's been left alone for a while, such as overnight (so my workaround has been to turn it off at night).
But I've also seen it drop into type 1 while I was actively using it, so waking up mustn't be the only trigger.

Hi, @Ipedia,
Maybe types 2 and 3 are somehow related to the individual homescreen app - I'm using Nova Launcher. Only guessing here.
Regarding type 5: Yes I did see it as well sometimes - but I'm not sure if it is a type of it's own. If I remember correctly type 1 - 3 are rebooting itself after some time of stalling. And - not sure here - after some unsucessful reboots in sequence we end up in TWRP. (In the embedded business where I'm working, it is the desired behaviour to jump to a flashing-bootloader after a number of resets within a certain time).
I've seen the reboots while busy using it as well some time ago, rare, but it happened - but when I activated my described tasker-profile, they were gone as well. I've no explanation for that.
At the moment I'm only facing type 4 resets. I did many changes, since I saw type 1 - 3 (update to latest 17.1 linageos, latest Magisk, exchange of the wifi-blobs) so not sure if any of this solved these reboots, or if they are yet to popup ...

Yogi555 said:
Would you agree to receive the zipped logs by PM instead?
Click to expand...
Click to collapse
@Yogi555 , you can send zipped logs using PM. Thank you.

can you help me to get logs? I receive this error message
Code:
c:\adb>adb root
c:\adb>adb shell
gts210ltexx:/ $ cd data/tombstones
gts210ltexx:/data/tombstones $ ls -al
ls: .: Permission denied

Max_C said:
ls: .: Permission denied
Click to expand...
Click to collapse
Maybe have a look how my adb root problems were solved in this thread: https://forum.xda-developers.com/t/...-version-of-andriod-10.4308193/#post-85353551
Worth a try, but maybe your issue is different

Yogi555 said:
Maybe have a look how my adb root problems were solved in this thread: https://forum.xda-developers.com/t/...-version-of-andriod-10.4308193/#post-85353551
Worth a try, but maybe your issue is different
Click to expand...
Click to collapse
i see, my device not rooted. I need install Magisk first, then enable rooted debugging. I have no rooted debugging in developer options

Magisk is hiding the option - without magisk you should see it - even with an unrooted device

Yogi555 said:
Magisk is hiding the option - without magisk you should see it - even with an unrooted device
Click to expand...
Click to collapse
oh. i see. I have no "rooted debugging" option in my developer settings in Havoc OS
another problem is i have old Android SDK on my PC. I installed latest one, and got this
Code:
c:\adb>adb root
ADB Root access is disabled by system setting - enable in Settings -> System -> Developer options

I had exactly the same issue with magisk being the one hiding the setting. Are you sure that you are not having magisk installed? Don't know Havoc ...

Max_C said:
oh. i see. I have no "rooted debugging" option in my developer settings in Havoc OS
Click to expand...
Click to collapse
Boot into TWRP then. You can get the same data/tombstones from TWRP using the same commands.
If you have the SM-T710, you will need my TWRP in order for adb to work. The official ones posted on twrp.me don't work with adb or mtp.
retiredtab - Browse /SM-T710/TWRP at SourceForge.net
sourceforge.net
Mine works, but it takes 10 seconds before mtp and adb work after the TWRP home screen is shown.

retiredtab said:
You can get the same data/tombstones from TWRP using the same commands.
Click to expand...
Click to collapse
thanks! got it, please check attached

I have downloaded them, but will examine tomorrow. It's been a long day and it's 12:40 AM. Time for sleep.

After 17 days of gathering data and troubleshooting, we think we may have solved the random reboots. Huge thanks to @lpedia, @CuckooPenguin and @Yogi555 for testing the various gnss patches until we finally figured out the hwbinder solution.
Details at
https://github.com/universal5433/android_device_samsung_gts2-common/pull/4
If you are one of those people who experienced random reboots, it's not too late to submit your data/tombstones or check them yourself for the error message that I listed above. In particular, you are looking for
Code:
#0 pc 00056baa /system/lib/[email protected] (android::hardware::gnss::V1_0::BsAGnssRilCallback::requestSetIdCb(unsigned int)+450) (BuildId: 30ee8b14270ae2b3ae675a7f9b4de136)
#1 pc 0000e8dd /system/vendor/lib/hw/[email protected] (android::hardware::gnss::V1_0::implementation::AGnssRil::requestSetId(unsigned int)+32) (BuildId: d0033c7cb8d0d1a2c99f977719d0d967)
#2 pc 0000fb05 /system/vendor/lib/hw/gps.default.so (broadcom::GpsiClient::marshal_agps_ril_request_setid(broadcom::IpcIncomingMessage&)+160) (BuildId: fe39be024fc2f98450c8d2fc07cda956)
Once the git pull requested is approved, this patch should make it into the next August security patch build for all flavours of the tab S2 including all the variant OS.
Finally, a huge thanks to @ananjaser1211 for tips, suggestions, code and acting as a sounding board for ideas.

retiredtab said:
this patch should make it into the next August security patch build for all flavours of the tab S2 including all the variant OS
Click to expand...
Click to collapse
sorry, I'm not sure i understand how it works... Should I wait when my HavocOS ROM will be updated in this thread? Or there is another way how to apply the patch

Max_C said:
sorry, I'm not sure i understand how it works... Should I wait when my HavocOS ROM will be updated in this thread? Or there is another way how to apply the patch
Click to expand...
Click to collapse
We tried modifying the manifest.xml directly, but the results were inconsistent. On my t710 the instructions below worked, but 2 people with the t810 it resulted in a system not booting properly. These 2 had to reflash the rom to get a working system back. On the t810, the below changed had to be compiled into the code.
If you want to try, backup your data first and be ready to reflash the old rom in case it fails. If it fails, you will have to wait for a new Havoc build or build it yourself.
Bash:
# Turn off gps in OS before booting into TWRP
# boot into TWRP
adb root
# touch mount, system
adb pull /system/vendor/etc/vintf/manifest.xml
# use a text editor and look for this section of code
<hal format="hidl">
<name>android.hardware.gnss</name>
<transport arch="32">passthrough</transport>
<version>1.0</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
</interface>
<fqname>@1.0::IGnss/default</fqname>
</hal>
# change passthrough to hwbinder like so
<transport arch="32">passthrough</transport>
to
<transport>hwbinder</transport>
# save text file
# now push file
adb push manifest.xml /system/vendor/etc/vintf/manifest.xml
# verify that line manifest.xml has changed in the gnss section
adb shell cat /system/vendor/etc/vintf/manifest.xml | more
# Important. Wipe dalvik/art cache and cache
# reboot into OS, enable GPS and make sure GPS works
# Note you may have to go into your setting, apps and wipe cache data as well if GPS doesn't work.

retiredtab said:
We tried modifying the manifest.xml directly, but the results were inconsistent. On my t710 the instructions below worked,
Click to expand...
Click to collapse
Thanks, on my SM-T815 all working fine, I followed your instructions, pushed revised manifest.xml, GPS is working fine. I will test if it helped to solve the problem and leave message here with result in several days.

Max_C said:
Thanks, on my SM-T815 all working fine, I followed your instructions, pushed revised manifest.xml, GPS is working fine. I will test if it helped to solve the problem and leave message here with result in several days.
Click to expand...
Click to collapse
Well, I'm surprised it worked on the t815 when it failed on the t810. That's why I stated it was inconsistent.
So if you were getting daily random reboots due to gnss crashing, then the gnss hwbinder fixes that. We have now had 2 testers go > 150 hours uptime with this patch. Before, they were getting daily reboots/crashes due to gnss (as shown in adb logcat and tombstones).
At first, we thought going 72 hours without a reboot would qualify as a successful fix, but we decided to extend it > 100 hours.
Again, the data/tombstones and adb logcats will show you which process/app is crashing. That's why it's important to view and share them otherwise we would have never figured this out.
Please report back if/when your device reaches 100 hours of uptime.

Related

[FIXES] Milestone Latest WIFI Module for 02_36 kernel

Latest and stable Wifi Driver for Android 2.1, Build SHOLS_U2_02.36.0
Build for the kernel "2.6.29-omap1"
** Stable and without any Wifi drop problem, which is compiled from the latest source from Google Android Repository. **
I recently found out that the Wifi driver of the latest Froyo 2.2.1 of Milestone that released by G.O.T. team is a new build and very stable. Therefore, I tried to pull the latest TIWLAN Wifi driver source code from the Google Android Source Repository (http://android.git.kernel.org/?p=platform/hardware/ti/wlan.git;a=summary), and compile it for the ROM build "SHOLS_U2_02.36.0", kernel "2.6.29-omap1".
I succeeded to compile as "tiwlan_drv.ko", and use it with the latest firmware "fw_wlan1271.bin" from the Froyo 2.2.1 build, and finally uses on the "SHOLS_U2_02.36.0", and the result is very stable wifi connection with the proprietary power saving feature .
I am using the ROM South Asia SHOLS_U2_02.36.0, I am not sure if it can be used with any other ROM, but normally should work on any kernel which have the version "2.6.29-omap1".
I did it because that the latest Froyo 2.2.1 beta ROM is not stable enough and the battery drain fast, but it have the stable wifi connection, so I compiled it for 2.1.
Enhancement:
Much more stable WIFI connection, no more connection drop within good signal environment.
No more WIFI freeze occur, will auto re-connect to AP if back to the signaled environment.
Much much much more battery saving (IT IS THE MOST IMPORTANT), can also feel that impressively in using "android-wireless-tether".
!!! Use it at YOUR OWN RISK !!!
Make a backup of "/system/lib/modules/tiwlan_drv.ko" and "/system/etc/wifi/fw_wl1271.bin".
Copy the file "tiwlan_drv.ko" to "/system/lib/modules/", and copy the file "fw_wl1271.bin" to "/system/etc/wifi/".
** WARNING **
Normally should work on any ROM which have the kernel version "2.6.29-omap1", BUT I didn't test it for any ROM other than SHOLS_U2.02.36.0, so USE IT AT YOUR OWN RISK!!!
It may result in bootloop in case if you did something wrong or not compatible with your ROM (need to revert back to the old driver with OpenRecovery + adb).
Therefore, it is only for advanced users, and ALWAYS MAKE FULL BACKUP of your milestone.
Download link:
http://www.sendspace.com/file/ln3xm7
Ooooo nice! The leaked rom did have superb wifi performance...
I'll give this a try on Telus' U2_03.11.0
[EDIT]What does fw_tiwlan_ap.bin do?
And the instruction for fw_wlan1271.bin is just a bit wrong... it's adb push fw_wlan1271.bin /system/etc/wifi/
[EDIT2]Woo! Works!
Lollipop_Lawlipop said:
Ooooo nice! The leaked rom did have superb wifi performance...
I'll give this a try on Telus' U2_03.11.0
[Edit]What does fw_tiwlan_ap.bin do?
And the instruction for fw_wlan1271.bin is just a bit wrong... it's adb push fw_wlan1271.bin /system/etc/wifi/
Click to expand...
Click to collapse
"fw_tiwlan_ap.bin" is the firmware required for the Froyo 2.2.1 to use Wifi Hotspot, it did nothing on Android 2.1, so just simply ignore it.
and Thanks for pointing out the location of placing the "fw_wlan1271.bin" file, I will modify it.
Lollipop_Lawlipop said:
Ooooo nice! The leaked rom did have superb
[EDIT2]Woo! Works!
Click to expand...
Click to collapse
Congratulation !!
You can use "dmesg" to see the new TIWLAN driver version
How can I copy and paste to the system?
Thanks!
royshum said:
Congratulation !!
You can use "dmesg" to see the new TIWLAN driver version
Click to expand...
Click to collapse
Thanks for your work!
I'll be putting it to the test on Monday when I get to my school campus. Stock 2.1 drivers never worked there and only 2.2.1 drivers work. Fingers crossed! Thanks for the info about the hotspot. Guess it's not very useful for 2.1 users...
How can I copy and paste to the system?
Thanks!
Click to expand...
Click to collapse
As long as you have adb setup, it's an easy task.
First, restart to recovery and do a backup:
Code:
adb pull /system/lib/modules/tiwlan_drv.ko tiwlan_drv.ko.bak
adb pull /system/etc/wifi/fw_wlan1271.bin fw_wlan1271.bin.bak
Then, unzip the files into your AndroidSDK/tools/ folder and push:
Code:
adb push fw_wlan1271.bin /system/etc/wifi/fw_wlan1271.bin
adb push tiwlan_drv.ko /system/lib/modules/tiwlan_drv.ko
adb shell reboot
Lollipop_Lawlipop said:
Thanks for your work!
I'll be putting it to the test on Monday when I get to my school campus. Stock 2.1 drivers never worked there and only 2.2.1 drivers work. Fingers crossed! Thanks for the info about the hotspot. Guess it's not very useful for 2.1 users...
As long as you have adb setup, it's an easy task.
First, restart to recovery and do a backup:
Code:
adb pull /system/lib/modules/tiwlan_drv.ko tiwlan_drv.ko.bak
adb pull /system/etc/wifi/fw_wlan1271.bin fw_wlan1271.bin.bak
Then, unzip the files into your AndroidSDK/tools/ folder and push:
Code:
adb push fw_wlan1271.bin /system/etc/wifi/fw_wlan1271.bin
adb push tiwlan_drv.ko /system/lib/modules/tiwlan_drv.ko
adb shell reboot
Click to expand...
Click to collapse
failed to copy - read only!
chungtau said:
failed to copy - read only!
Click to expand...
Click to collapse
You must have a rooted milestone in order to process.
Before you using adb push, try to remount your /system partition first.
Or you can try the following commands.
Ensure your wifi is turned off first.
*** Remember to make FULL BACKUP for your milestone before proceeding the following commands. ***
Code:
C:\android-sdk-windows\tools>adb push tiwlan_drv.ko /sdcard/tiwlan_drv.ko
C:\android-sdk-windows\tools>adb push fw_wl1271.bin /sdcard/fw_wl1271.bin
C:\android-sdk-windows\tools>adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock6 /system
# cd /system/lib/modules
# mv tiwlan_drv.ko tiwlan_drv.ko.bak
# cp /sdcard/tiwlan_drv.ko ./tiwlan_drv.ko
# chmod 644 tiwlan_drv.ko
# cd /system/etc/wifi
# mv fw_wl1271.bin fw_wl1271.bin.bak
# cp /sdcard/fw_wl1271.bin ./fw_wl1271.bin
# chmod 644 fw_wl1271.bin
# mount -o ro,remount -t yaffs2 /dev/block/mtdblock6 /system
And now, you can try turning on your wifi.
In case if there is any problem occurred, you may reboot into OpenRecovery, revert the drivers from "tiwlan_drv.ko.bak" and "fw_wl1271.bin.bak".
I want to make a quick update and say that this indeed solves my campus wifi issues I have had with 2.1-based drivers.
I'm not 100% sure about the stability of the drivers though - I'm having a little trouble with maintaining a steady connection with SwiFTP.
[EDIT]I must stress, however, that in no way does this mean the new drivers are of any blame. Until I have the time to investigate deeply into this issue, it is an isolated incident that is only occurring within my network and is of no indication of the fault of the new drivers.
I have 2.2.1 milestone but it didnt work with me proper, I installed everything properly but i got error when i try to open wifi. then i restore my back up files but it still gives me eeror
Lollipop_Lawlipop said:
I want to make a quick update and say that this indeed solves my campus wifi issues I have had with 2.1-based drivers.
I'm not 100% sure about the stability of the drivers though - I'm having a little trouble with maintaining a steady connection with SwiFTP.
[EDIT]I must stress, however, that in no way does this mean the new drivers are of any blame. Until I have the time to investigate deeply into this issue, it is an isolated incident that is only occurring within my network and is of no indication of the fault of the new drivers.
Click to expand...
Click to collapse
It is glad to hear that the new driver solved your wifi issues .
Besides, are you still having the problem even after setting the "Wifi Sleep Policy" to "Never"?
In my experience, although the new driver is much more stable, but due to the highly power saving, it may still become instable (just in weak signal, not freeze nor wifi hang) if the AP have far distance to your mobile. In this case, you may try "WifiPowerSavingOff" from market to turn off the power saving feature.
But if you turned off the power saving feature for this connection session, it may drain your battery much much faster, so just use it in some trouble network .
hagizma said:
I have 2.2.1 milestone but it didnt work with me proper, I installed everything properly but i got error when i try to open wifi. then i restore my back up files but it still gives me eeror
Click to expand...
Click to collapse
You haven't read the instructions carefully. It is the latest wifi driver for "2.1", not "2.2.1", as it is supposed to compile the driver from "2.2.1" down to "2.1".
So for 2.2.1, by default, you are already have the latest wifi driver (at least a stable wifi driver), it is no clue for using it.
royshum said:
It is glad to hear that the new driver solved your wifi issues .
Besides, are you still having the problem even after setting the "Wifi Sleep Policy" to "Never"?
In my experience, although the new driver is much more stable, but due to the highly power saving, it may still become instable (just in weak signal, not freeze nor wifi hang) if the AP have far distance to your mobile. In this case, you may try "WifiPowerSavingOff" from market to turn off the power saving feature.
But if you turned off the power saving feature for this connection session, it may drain your battery much much faster, so just use it in some trouble network :
Click to expand...
Click to collapse
Yeah, it's always set to never ever ever turn off wifi unless I explicitly shut it off. For me, it seems like wifi is transferring in bursts or in intervals. After a while (roughly 5 minutes of heavy wifi activity like FTPing stuff), the phone will freeze up and it won't even automatically reboot. Of course, a quick battery pull and the problem is solved, but nonetheless the issue is still here. It *may* be my sdcard, since I've made a swap from a class 6 4GB to a class 2 16GB, but I'm not going to jump to conclusions just yet until I do some testing here and there.
Btw, CM6 uses the file name fw_wlan1271.bin. I'm guessing stock Android from Moto looks for fw_wl1271.bin (just guessing... can't exactly prove it since I'm not running stock Android), which was why I was trying to correct you (although it seems to me both of us are right).
hagizma said:
I have 2.2.1 milestone but it didnt work with me proper, I installed everything properly but i got error when i try to open wifi. then i restore my back up files but it still gives me eeror
Click to expand...
Click to collapse
If you're running 2.2.1-CM6 you can extract the files from the update zip and adb push them into the phone. That is, if you're on CM6. If not, well... you can either upgrade to CM6 or go into fastboot and restore the sbf again.
Lollipop_Lawlipop said:
Yeah, it's always set to never ever ever turn off wifi unless I explicitly shut it off. For me, it seems like wifi is transferring in bursts or in intervals. After a while (roughly 5 minutes of heavy wifi activity like FTPing stuff), the phone will freeze up and it won't even automatically reboot. Of course, a quick battery pull and the problem is solved, but nonetheless the issue is still here. It *may* be my sdcard, since I've made a swap from a class 6 4GB to a class 2 16GB, but I'm not going to jump to conclusions just yet until I do some testing here and there.
Click to expand...
Click to collapse
Very interesting what you are saying. I had the same suspicion due the fact that the sdcard is often not accessible, this again causes multiple attempts to write and fills the buffer.
Concerning the battery pull, you can reboot and wipe the protected storage area with a script, so that you don't need to pull out the battery (which at the end does nothing else but losing voltage, resulting in loss of temp data
MenoDev said:
Very interesting what you are saying. I had the same suspicion due the fact that the sdcard is often not accessible, this again causes multiple attempts to write and fills the buffer.
Click to expand...
Click to collapse
Yes, I have the same suspicion as well.
MenoDev said:
Concerning the battery pull, you can reboot and wipe the protected storage area with a script, so that you don't need to pull out the battery (which at the end does nothing else but losing voltage, resulting in loss of temp data
Click to expand...
Click to collapse
Can you go into a bit of detail on that? I'm interested
I've also had problems with the cell signal for 2.2-CM6. Again, I'm not sure the cause of it, but it's a very very serious issue that strikes at the wrong time. It seems like the cell radio freezes up even after a reboot with zero prior warning. So when I try to make a call, it doesn't go through. It's super frustrating, especially when there's really no good alternative to 2.2-CM6 right now. The only way to resolve this issue is to push the Telus baseband files again, but after a while it'll freeze up again. Ugh.
At least the Wifi works.
[EDIT]It seems like the cell problem is at least reported in the thread and acknowledge by other users. It seems to be fixed on 2.2.1-CM6, but since that's a little meh right now I'll have to dig around and see just what's causing the freeze.
[EDIT2]In fact, it seems like the problem is pretty widespread. Anything 2.2-CM6 based (that includes MotoFrenzy, Cronos...) has this problem.
works flawless, extreme improvement, thank you very much!
Lollipop_Lawlipop said:
Yes, I have the same suspicion as well.
Can you go into a bit of detail on that? I'm interested
Well, I use to code similar stuff but I am complete new to android so i have to read the dev guide, if I had no guide I'd probably create a dump, see according the file descriptor where the tables and storage are are located, then set a "write" flag on the file system and flush it to avoid a manual battery pull. but i'm sure there's more elegant ways.
I've also had problems with the cell signal for 2.2-CM6. Again, I'm not sure the cause of it, but it's a very very serious issue that strikes at the wrong time. It seems like the cell radio freezes up even after a reboot with zero prior warning. So when I try to make a call, it doesn't go through. It's super frustrating, especially when there's really no good alternative to 2.2-CM6 right now. The only way to resolve this issue is to push the Telus baseband files again, but after a while it'll freeze up again. Ugh.
At least the Wifi works.
[EDIT]It seems like the cell problem is at least reported in the thread and acknowledge by other users. It seems to be fixed on 2.2.1-CM6, but since that's a little meh right now I'll have to dig around and see just what's causing the freeze.
[EDIT2]In fact, it seems like the problem is pretty widespread. Anything 2.2-CM6 based (that includes MotoFrenzy, Cronos...) has this problem.
Click to expand...
Click to collapse
I made a little research and found a working solution, tested it myself.
Apparently it can happen that the resolved DNS can not be stored under certain circumstances, (in order to trace those, i try to avoid the "out of the box" mods, even though the guys make a tremendous job, but i feel more secure and have a higher learning curve by doing stuff myself).
In order to avoid random disconnects from network or wifi, or worst case both, add the following lines of code to /system/default.prop
net.dns1=8.8.8.8
net.dns2=8.8.4.4
net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
These are the google dns, most probably the best choice. You can find this out if you fire up the "getprop" command.
I've seen that most Recovery tools such as the G.O.T one, have implemented the DNS fix, but personally I prefer to just fire up a terminal from the phone and add these lines manually with some comment, so i know what and why I'm doing stuff.
Hope this helps, let me know.
Please help! I succesfully copied both files using root explorer, but now I can't turn on wifi. Then I have restored the original files but it didn'tsolve the issue. I could do a nandroid restore but I really don't want to (last backup is quite old). I have a german milestone running 2.1 build SHOLS_U2_02.36.0
b787 said:
Please help! I succesfully copied both files using root explorer, but now I can't turn on wifi. Then I have restored the original files but it solve the issue. I could do a nandroid restore but I really don't want to (last backup is quite old). I have a german milestone running 2.1 build SHOLS_U2_02.36.0
Click to expand...
Click to collapse
If you followed the instruction you should have to *.bak files that you previously pulled, so no need to do a "panic rollback".
Did you turn of wifi before copying the kernel objects and made a reboot before turning on wifi as described in the howto ?
MenoDev said:
If you followed the instruction you should have to *.bak files that you previously pulled, so no need to do a "panic rollback".
Did you turn of wifi before copying the kernel objects and made a reboot before turning on wifi as described in the howto ?
Click to expand...
Click to collapse
I did turn off wifi before copying any files. However, I didn't rebooted before I tried to start wifi, only after I noticed it doesn't work.
Fix for 2.2.1 Possible?
I have the same issue with my home WIFI network on 2.1 and 2.2.1: namely the connection drops during large transfers (such as a Market app download) and I have to turn WIFI off and on again to have connectivity again.
I wonder if 2.2.1 really has the latest firmware baked in...how would I compile the TI firmware for 2.2.1?

[Reference] How to get useful logs

We're on a development site - at least in theory.
To help out development without actually having some knowledge it's really important to know how and when to get logs.
Lately more and more people in this section do grab appropriate logs, which is a good thing and has already helped in fixing a bunch of bugs.
To stop (especially new) people from constantly asking how to get logcats I decided to hand out a quick reference on how to grab logs efficiently via adb / terminal / app.
There is an app which can export apps (see the end of this post), but you should learn how to get logs via adb anyways, as a dmesg is often crucial in case of debugging bsods.
I won't post instructions in how to get adb working - you can use Google or take this CM wiki entry as a starting point.
The three most important log types are:
logcat: the logoutput of the Android system
radio logcat: the log outpur ot your System / BB / RIL communication
kernel log (kmsg / dmesg): the kernel messages
Additionally there's the last_kmsg which is a dump of the kernel log until the last shutdown.
Normal Logcat:
Code:
adb logcat -v time -d > logcat.log
Radio Logcat:
Code:
adb logcat -b radio -v time -d > logcat_radio.log
Note: Cyanogenmod (based) ROMs require the following setting to export kernel logs via adb:
Settings - Developer Options - Root access - choose: "Apps and ADB"
Kernel Log:
Code:
adb shell su -c dmesg > dmesg.log
Last_kmsg:
Code:
adb shell su -c "cat /proc/last_kmsg" > last_kmsg.log
For getting the logs via the Terminal Emulator app the commands differ a little:
Get logs via Terminal Emulator:
Normal Logcat:
Code:
logcat -v time -d > /sdcard/logcat.log
Radio Logcat:
Code:
logcat -b radio -v time -d > /sdcard/logcat_radio.log
Kernel Log:
Code:
su -c dmesg > /sdcard/dmesg.log
Last_kmsg:
Code:
su -c "cat /proc/last_kmsg" > /sdcard/last_kmsg.log
Notes:
-v time will include timestamps in the logcats
-d will export the complete log.
If you want to save a continuous log you can remove the -d parameter - then you need to cancel the logging process via CTRL+C.
To export a continuous kernel log use adb shell su -c "cat /proc/kmsg" > dmesg.log (and cancel it via CTRL+C again).
Exporting logs with an app:
I used to recommend Lumberjack for grabbing logs, but it doesn't work with Jellybean properly anymore and fails to export the dmesg.
I googled for a while and found a great (and fully open sourced) alternative to export logs: SysLog
With this great app there are no more excuses - at least open the app, export all 4 log types and attach the zip file from /sdcard/SysLog to your bug report.
Before anyone asks (duh!), Kernel log = dmesg, Last kernel log= last_kmsg, main log = logcat, modem log = radio log.
Lumberjack still is great to have a look at logs on the phone, but for exporting you probably should use SysLog as it does it quickly and reliable
SysLog (source):
​
When to post which kind of logs:
If you got any kind of ROM problems - especially problems with Apps like force closes, attach a logcat.
If there are problems while calling or with your signal attach a radio logcat to the normal logcat.
In kernel threads or on issues which might be kernel related (from A as auto brightness to Z as ZRAM) you need a kernel log
If you had a sudden reboot attach a last_kmsg, then we can check if it's been kernel related
As our phone has always been on the edge of bsod's and freezes, some special notes about them as well:
If you had a bsod and/or freeze a logcat dmesg after rebooting is useless, as it doesn't show anything from before the reboot
There are two things you can do:
While the phone's screen is black connect the cable to your computer and check if the device is accessable via adb (check e.g. with "adb devices").
If it is export the dmesg like explained above. If not go on to step 2:
Note that two of the bsod problems of the ICS/CM kernel have been fixed by pengus by the logs I managed to get while the phone has been in a bsod - which means this is crucial!
Pull the battery and insert it again as quickly as possible. Why? The phone does hold a so called last_kmsg in RAM.
It's non-permanent memory, which means it doesn't survive a loss of power - sometimes we're in luck by a quick pull though.
If we're not in luck the file will be empty or contain scrambled characters.
Last but not least some general remarks:
If you don't provide useful logs we can not help you in 95% of the cases in case we can't reproduce it.
Buf even if we could reproduce it - let's assume one of YOUR apps is force closing. Why should we install the app to reproduce the problem and get the logs ourselves.
YOU want help, so YOU should provide the log.
Every real dev with some coding knowledge will need logs to fix the bugs.
This site is called xda-developers - which means that the initial intention of this forum is the actual development itself - and not "making your phone cool".
The least you can (and must) do is to provide useful help with a clear problem description and attached logs when you run into some issues
Choose 1 or 2:
1:
What developers like:
{
"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"
}
What developers don't like:
2:
Great, an other useful thread from you
Such a great and useful post, should be stickied ...
thank you so much for this tonyp.. i've been trying with lumberjack for a while and couldn't ever get any last_kmsg even with a quick battery pull.. i will try the syslog export
besho2222 said:
Such a great and useful post, should be stickied ...
Click to expand...
Click to collapse
It is stickied
Awesome, thank you.
Just a small update, I added "su" requests to the kernel log commands in post 1.
This ensures you won't run into permission denied problems.
My ParanoidAndroid ROM is a eng-build so you won't need that there, but on most other CM10 / CM10.1 ROMs you'll probably need to ask about superuser rights.
Root shouldn't be disabled at Settings - Developer Options - Root access of course.
How to get the last kernel log?
I have tried several times now; I can't find the last kernel log:
in SysLog last kernel log option is greyed out, and
with adb as described above response is
sh: cat: /proc/last_kmsg: No such file or directory
Click to expand...
Click to collapse
What I am doing wrong? Do I have to put some check mark?
I have checked root access for apps and adb...
oneearleft said:
I have tried several times now; I can't find the last kernel log:
in SysLog last kernel log option is greyed out, and
with adb as described above response is
What I am doing wrong? Do I have to put some check mark?
I have checked root access for apps and adb...
Click to expand...
Click to collapse
Do a reboot, is the file there then? It won't be there every time, just if the kernel manages to save it properly (reboot, usually oops and panic).
tonyp I am having RAPID restarts with your PA ROM.. everything is fine, battery life , smoothness, performance but this restarts are so annoying .. I am talking and oooopsss big X in the screen... then NO network... i am going to Lumberjack last kmsp and nothing file is empty, go to logsys there is no check on karnel log.. ;( I am so depressed i am having restarts even when i am using Chat clients like "Whats app" or "Viber" ... When network is busy phone is restarting.. :/ I dont like moving to another ROM but i cant see other escape. Please tell me how to get those stupid logs ;( ;( i tried everything :/ I made 3-4 full wipes but nothing happends .. everything is like usual ... restart restart no network restart.. :/ ;( ;(
Here is what i got from Logsys just a minute ago (after another restart and removing battery) but there is no last kmsg log again :/
http://speedy.sh/GjmDH/2013-04-05-16.12.zip
dargon91 said:
tonyp I am having RAPID restarts with your PA ROM.. everything is fine, battery life , smoothness, performance but this restarts are so annoying .. I am talking and oooopsss big X in the screen... then NO network... i am going to Lumberjack last kmsp and nothing file is empty, go to logsys there is no check on karnel log.. ;( I am so depressed i am having restarts even when i am using Chat clients like "Whats app" or "Viber" ... When network is busy phone is restarting.. :/ I dont like moving to another ROM but i cant see other escape. Please tell me how to get those stupid logs ;( ;( i tried everything :/ I made 3-4 full wipes but nothing happends .. everything is like usual ... restart restart no network restart.. :/ ;( ;(
Here is what i got from Logsys just a minute ago (after another restart and removing battery) but there is no last kmsg log again :/
http://speedy.sh/GjmDH/2013-04-05-16.12.zip
Click to expand...
Click to collapse
Well you aren't doing anything wrong, it seems like the logs just aren't there.
As you're the only one with these issues and can't produce logcats you have to figure this out yourself, I'm afraid.
I'd suggest to use NVFlash / AIOToolkit and start fresh. Do NOT restore data with TitaniumBackup or similiar apps.
I have no idea what's up with your phone, maybe it's the hardware. If it only affects my ROM then move to another one.
And please remember that this is not the PA thread.
I know sorry for offtopic but i am so depressed i want get those logs cuz my phone is messed up .. :/ and i cant well i will think of formating everything it would be the last choise :/
Consider adding a link to this tool right here: AIOlog
Don't mind the screenshot in that thread, it will detect & write Device Model: LG P990 automatically when it is connected.
That tool makes the simple things even more simple
Great
Thank you for this little tutorial, you helped a lot. But I am thinking about if its not possible to watch phone logs live on you pc, while your phone is connected via USB.
Vippo321 said:
Thank you for this little tutorial, you helped a lot. But I am thinking about if its not possible to watch phone logs live on you pc, while your phone is connected via USB.
Click to expand...
Click to collapse
Just type adb logcat (without the "arrow" to save the logs and the -d parameter), then you'll see it in the console.
Or if you got the android developer kit installed use the included ddms.bat or eclipse to have a nice logcat viewer.
Sent from my LG-P990 using xda app-developers app
Tony/pengus/anyone else, do you use Android SDK to adb logcat or normal command prompt on Windows? because lets say my phone is stuck on the LG logo, am I wrong to think that the PC won't detect the phone? I have been trying with Android SDK but I just haven't been able to adb logcat when it is stuck on LG logo or even bootamination. Actually, I did get to adb logcat when it was stuck on bootamination once, but I have no idea what I did lol.
Seriously need help, especially when its stuck on LG logo, got no idea how to logcat in such case.
Note: I am on Windows 7.
Thanks a lot!
natalya said:
Tony/pengus/anyone else, do you use Android SDK to adb logcat or normal command prompt on Windows? because lets say my phone is stuck on the LG logo, am I wrong to think that the PC won't detect the phone? I have been trying with Android SDK but I just haven't been able to adb logcat when it is stuck on LG logo or even bootamination. Actually, I did get to adb logcat when it was stuck on bootamination once, but I have no idea what I did lol.
Seriously need help, especially when its stuck on LG logo, got no idea how to logcat in such case.
Note: I am on Windows 7.
Thanks a lot!
Click to expand...
Click to collapse
Okay, here's the deal.
You probably didn't do anything wrong. There are different kind of bootloops - sometimes the phone initializes correctly and manages to bring up the adb interface before it loops - but sometimes the error happens before that, then there's nothing you can do.
Just check if the device is online with "adb devices" - if there's no serial number you don't have adb access to the phone.
I'm trying to generate a logcat through Terminal Emulator but keep getting an error msg : -c not found. Any idea please?

[Universal] [Flashable] [Logcat] [Guide] So your test ROM build didn't boot

Hello all,
I've noticed the lack of a guide for pulling ADB logs for developers. Being a developer, I wanted a quick link to send people to, rather than reexplaining.
If you are looking for a GENERAL explanation on how to get a logcat, or setup your computer for pulling a logcat, look at this amazing guide here:
http://forum.xda-developers.com/showthread.php?t=2274119
Consider this guide an extension for the above thread, making an easy how-to for developers to point people to.
What this guide is NOT:
- A guide on how to pull a logcat in general
- A guide on how to setup adb on a computer
This guide is/will:
-Assume you know how to connect via adb
-Assume you have installed drivers and adb
-A way to show common users to get the logs the developers need
So I personally build for devices I don't own. A LOT. So, should it bootloop(specifically this) or not boot at all, I NEED these logs to help fix the problem. Most users are willing to do so..... as long as you teach them. So this is my one-size-fits-all guide to this.
Note: Later, I will do a write-up on how to pull kernel logs as an extension to this in the second post
To pull a logcat during a bootloop, you need to have adb permissive. This can be done several ways. I have added to the build.prop manually before but that was in TWRP and is a pain to guide users on. It's SUPPOSED to be done with the ramdisk, but I can't ask users to pull their ramdisk and edit it and reflash. So I have made a flashable zip to extract ramdisk and add a permissive adb property to default.prop
The zip will be in the downloads below, all you need to do is flash it when you see a ROM is bootlooping.
Note: Some kernels may not work with this, and it's based off of Anykernel. If the zip fails, don't worry, it has a fallback that it will add same thing to build.prop, and that should usually work.
After flashing, hook the phone/tablet up to your computer and run this in your Terminal:
On Linux:
Code:
adb logcat > ~/log.txt
That will store logcat into your home folder.
On Windows:
Code:
adb logcat > %UserProfile%/Desktop/log.txt
That will store logcat on your Desktop.
How do I stop logging?
You can either stop logging by hitting [CTRL] + C in the terminal or by unplugging device.
How do I know when to stop logging?
Usually, you can safely stop logging after about one minute for MOST problems, BUT I believe 5 minutes of logging would be the best bet to stop logging, so all the errors are caught.
How do I get the log to the developer?
You can get a log to a developer by Dropbox, Google Drive, or a file sharing site, but personally I like pasting sites like hastebin.com, pastebin.com, or paste.ubuntu.com. This is a developers/users personal preference though. Personally, I really, really like hastebin. For a pasting site, just open it in your browser and open the log with notepad or equivalent, and do [CTRL] + A and [CTRL] + C to copy the whole log, then paste onto the site. Then share the link the site gives you with the developer.
How do I get the log, when I didn't even get to the boot animation?
Usually, this is a kernel problem, and is almost deserving of it's own write-up, and instructions will be available in the second post.
Thank you all, and should you see a problem, or need more questions answered, please tell me so in replies.
Keep it cool,
Jacob(USA-RedDragon)
So your kernel didn't boot. Well dang. This can be one of the worst problems. So, I'm going to HOPE you have TWRP, since CWM is pretty much dead.
This is more advanced, because you have to use Terminal command in TWRP.
Now, don't be daunted by this, since it's terminal commands, it's quite easy.
As a general rule of thumb(there are different devices with different kernel logs, though), 3.10 kernels(pretty much anything in the last 2 years) have a log in /sys/fs/pstore/console-ramoops and 3.4 and prior kernels have /proc/last_kmsg.
You can see kernel version in Settings -> About Phone
So to pull these logs, you need to be in TWRP DIRECTLY after a failed boot.
Go to Advanced->Terminal Command and type these commands in. One will fail the other will work. Should both of them fail, restart and try to boot again, then go back to TWRP.
Code:
cp /proc/last_kmsg /sdcard/kernellog.txt
Code:
cp /sys/fs/pstore/console-ramoops /sdcard/kernellog.txt
Now you can restore your backup and boot normally. Once you've booted up, you can either share the files with Google Drive or Dropbox or whatever in Android, or you can pull them to your computer with these Terminal commands:
On Linux:
Code:
adb pull /sdcard/kernellog.txt ~/kernellog.txt
That will store log into your home folder.
On Windows:
Code:
adb pull /sdcard/kernellog.txt %UserProfile%/Desktop/kernellog.txt
That will store log onto your Desktop.
Then share log like you would in the above post
FAQs:
None at this time
when I execute the command, it says waiting for device.
I have a galaxy s5
and the monitor, my device is offline
@Gayos24 what command did you type??? OP and 2ND post show numerous commands. Nobody can help if you don't give details.
The monitor says device offline...is the screen turned on??
HasH_BrowN said:
@Gayos24 what command did you type??? OP and 2ND post show numerous commands. Nobody can help if you don't give details.
The monitor says device offline...is the screen turned on??
Click to expand...
Click to collapse
i type this command adb logcat > %UserProfile%/Desktop/log.txt
yes the screen turning on.
@Gayos24 you use that AFTER you run a logcat, there is a link in the OP on how to do that.
HasH_BrowN said:
@Gayos24 you use that AFTER you run a logcat, there is a link in the OP on how to do that.
Click to expand...
Click to collapse
yes
I flashed logcatflasher zip via twrp and connected my device. I wrote command for windows but there was no logging in the terminal
But the adb via usb need an authorization to enable,how to get pass when bootloop?
Sent from my MI 2C using XDA-Developers mobile app
Sun Shower said:
But the adb via usb need an authorization to enable,how to get pass when bootloop?
Sent from my MI 2C using XDA-Developers mobile app
Click to expand...
Click to collapse
use adbd
Gayos24 said:
use adbd
Click to expand...
Click to collapse
Thank you to answer me,is there any thread or guide can help me,I don't know how to use it.
Sun Shower said:
Thank you to answer me,is there any thread or guide can help me,I don't know how to use it.
Click to expand...
Click to collapse
just donwload the file and extract adbd in system/xbin (rom)
and the command is the same as normal logcat
sorry for my english
awsome, just awsome
what command did you type?
I am currently testing out Custom ROMs for DEVs and I cannot find how to take a Log if I cannot Boot the device or get into TWRP. With newer devices, for example, I am currently working on a OnePlus 6, with A/B Partitions. If the device does not boot on A, it is supposed to Boot on B, so with this application, how to take a Log before the device switches Partitions and Boots on the Partition that CAN Boot?
I tried the adbd archive but there is no xbin folder for me, I just put in sbin folder. I cant get a logcat from boot because it says waiting for device the code i'm trying is this one adb logcat > logcat.txt
USA-RedDragon said:
So your kernel didn't boot. Well dang. This can be one of the worst problems. So, I'm going to HOPE you have TWRP, since CWM is pretty much dead.
This is more advanced, because you have to use Terminal command in TWRP.
Now, don't be daunted by this, since it's terminal commands, it's quite easy.
As a general rule of thumb(there are different devices with different kernel logs, though), 3.10 kernels(pretty much anything in the last 2 years) have a log in /sys/fs/pstore/console-ramoops and 3.4 and prior kernels have /proc/last_kmsg.
You can see kernel version in Settings -> About Phone
So to pull these logs, you need to be in TWRP DIRECTLY after a failed boot.
Go to Advanced->Terminal Command and type these commands in. One will fail the other will work. Should both of them fail, restart and try to boot again, then go back to TWRP.
Code:
cp /proc/last_kmsg /sdcard/kernellog.txt
Code:
cp /sys/fs/pstore/console-ramoops /sdcard/kernellog.txt
Now you can restore your backup and boot normally. Once you've booted up, you can either share the files with Google Drive or Dropbox or whatever in Android, or you can pull them to your computer with these Terminal commands:
On Linux:
Code:
adb pull /sdcard/kernellog.txt ~/kernellog.txt
That will store log into your home folder.
On Windows:
Code:
adb pull /sdcard/kernellog.txt %UserProfile%/Desktop/kernellog.txt
That will store log onto your Desktop.
Then share log like you would in the above post
Click to expand...
Click to collapse
sorry but in my device wasn't have this "/sys/fs/pstore/console-ramoops" I was browse, and did not found it... only have "sys/fs/..." if I try, still work it or not?
I have a couple of questions and I'm hoping that this forum can provide a response.
1. adb logcat not found
I have a linux laptop and have installed platform tools and have used fastboot, adb sideload quite a bit. But adb logcat just does not work.
see below while inside TWRP
5x $ adb devices
List of devices attached
00ca0a5e7fe31c03 recovery
5x $ adb logcat
/sbin/sh: exec: line 1: logcat: not found
5x $ adb shell
~ # logcat
/sbin/sh: logcat: not found
whats missing?
2. When should adb logcat be run if I wanted to capture logs when my phone keeps spinning on google animation? Can i run adb logcat > foo while I'm in recovery and then reboot from recovery or is there a different method?
thanks
I was hoping that someone could respond to the right way to capture logs during bootloop.
My problem:
Trying to capture logs on a bootloop of andrid 10 pixel experience on nexus 5x.
What I have do so far?
Flashed the ROM and zip and rebooted. No logcat seen.
My specific question.
OP says this.
After flashing, hook the phone/tablet up to your computer and run this in your Terminal:
On Linux:
Code:
adb logcat > ~/log.txt
My problem is that when the phone is rebooting, adb devices does not show anything and thus adb logcat always displays a <waiting for device> message. Thus, how can any log be captured to debug the problem?

[ROM][Lollipop 5.1.1] UnOfficial LineageOS for Otter2

Hi all,
Found my old Kindle Fire2 lying around so thought i'd have a go at building whatever I can for it. Seems like there was already source code in the repo's for CM 12.1 but nobody had built it. Well I've built it and it seems to work fine!
Only had to fix a script which had broken since CM 11 for wifi and all seems good.
NOTE RE MAC ADDRESS
FYI your MAC address will now get randomly generated at first boot. If keeping your existing MAC address is important, don't flash this.
I can't take any responsiblity for this, I've purely built it and fixed a couple of issues. Please thank whoever contributed to the source in the repo's.
I've only installed from a complete wipe. Don't try it unless you're prepared to wipe your device.
Enjoy...
ROM
cm-12.1-20170728-UNOFFICIAL-otter2.zip
Open Gapps pico for 5.1
http://opengapps.org/?download=true&arch=arm&api=5.1&variant=pico
Going to have a go at building CM13 next. Tried 14.1 but got hung up on selinux issues so going to take a step back to CM13.
Original link fixed
I need to fix the wifi script at boot. Currently if you install the rom you'll need to open a terminal and run:
/system/bin/fix-mac.sh
Wifi should start shortly after...
works perfect.
also perfect timing. i picked the otter2 yesterday from my dads house, who didnt use it anymore, because he switched to an galaxy tab long time ago.
I am currently having trouble with the Wi-Fi
It just hangs at Turning on Wi-Fi!
I have tried to clear cache and dalvik cache after installing gapps and lineage
I also performed a full wipe before flashing the rom
EDIT: Sorry didn't read further down
I am having an interesting problem with this ROM. It appears stable until I install any app, either from APK or play store. afterward everything force closes and will not work again until data is wiped or permissions repaired. when the permissions are repaired, any installed apps from APK or play store vanish like they were never installed. copying anything to /system/app works fine, but that is not a long term solution.
Raised a couple of threads about the wifi issue for a bit of help but nobody had replied. I'll have another look when I have time. Can't say i had any issues after installing app's though.
Think I might have fixed the selinux policy as i misread the neverallow rule and didn't realise it actually excludes sdcards from remount, so I can explicitly allow it.
Hopefully new fixed build to come soon.
Hi, I know a few people have asked about the Wi-Fi issue, but im not aware of how to open a terminal once everything is installed. the only terminal I can find is in the recovery mode but it wont find the file you mentioned
I just flashed and executed /system/bin/fix-mac.sh after installing "super su", but still WIFI does not start. Any additional hints? Thank you very much for the efforts.
Found a working solution:
1. Activate terminal in settings
2. Install latest SuperSU
3. Open terminal and execute "su 0 setenforce 0"
4. Execute "/system/bin/fix-mac.sh" afterwards
--> WIFI should start and "stay alive"
guys do you have the latest twrp for kf2? all links are dead on other threads.
Apologies if this is obvious - but how did you install the latest SuperSU without Wi-Fi? Is it a case of downloading the apk and transferring via adb?
Is the build working otherwise? The old CM one is beyond repair - works for a couple days and then gets itself into boot loop.
Thanks!
androidbenutzer said:
Found a working solution:
1. Activate terminal in settings
2. Install latest SuperSU
3. Open terminal and execute "su 0 setenforce 0"
4. Execute "/system/bin/fix-mac.sh" afterwards
--> WIFI should start and "stay alive"
Click to expand...
Click to collapse
---------- Post added at 09:30 AM ---------- Previous post was at 09:21 AM ----------
[/COLOR]
androidbenutzer said:
Found a working solution:
1. Activate terminal in settings
2. Install latest SuperSU
3. Open terminal and execute "su 0 setenforce 0"
4. Execute "/system/bin/fix-mac.sh" afterwards
--> WIFI should start and "stay alive"
Click to expand...
Click to collapse
not work:crying:
rapmen said:
---------- Post added at 09:30 AM ---------- Previous post was at 09:21 AM ----------
[/COLOR]
not work:crying:
Click to expand...
Click to collapse
Same here... all steps ok, but Wi-Fi still won't turn on. Heart-breaking! Build working fine otherwise...
nebula_rider said:
Same here... all steps ok, but Wi-Fi still won't turn on. Heart-breaking! Build working fine otherwise...
Click to expand...
Click to collapse
I bricked my Otter2 today, so I had to restart all over:
1. Flash the Android-Image in TWRP
2. Flash the GAPPS-Pico-Image in TWRP
3. Flash the SuperSU-Image in TWRP
4. Allow the Terminal in the Android developer settings
5. Open the terminal and execute "su 0 setenforce 0"
6. Allow "root" in the appearing popup.
7. Execute "/system/bin/fix-mac.sh"
8. Activate WIFI
9. Done
This works!
androidbenutzer said:
I bricked my Otter2 today, so I had to restart all over:
1. Flash the Android-Image in TWRP
2. Flash the GAPPS-Pico-Image in TWRP
3. Flash the SuperSU-Image in TWRP
4. Allow the Terminal in the Android developer settings
5. Open the terminal and execute "su 0 setenforce 0"
6. Allow "root" in the appearing popup.
7. Execute "/system/bin/fix-mac.sh"
8. Activate WIFI
9. Done
This works!
Click to expand...
Click to collapse
Ok so I gave this another go - thanks for the encouragement androidbenutzer! - and can confirm that it does, indeed, work!
My problem was with step number 7. This is going to sound so so lame, but I was just typing "system/bin/fix-mac/sh" on Terminal (without the quotes). It looked like Android was trying to run fix-mac.sh, but failing to mount something. For the fellow rookies out there, you first need to navigate to /system/bin. I'm sure there's a very simple way to do this, but since I know no better, this is how I did it:
cd\
cd system
cd bin
THEN type "fix-mac.sh" (without the quotes).
Wi-Fi switched on and remained on.
Thanks dom_b and androidbenutzer! So glad to have the wee otter2 up and running again!
nebula_rider said:
Ok so I gave this another go - thanks for the encouragement androidbenutzer! - and can confirm that it does, indeed, work!
My problem was with step number 7. This is going to sound so so lame, but I was just typing "system/bin/fix-mac/sh" on Terminal (without the quotes). It looked like Android was trying to run fix-mac.sh, but failing to mount something. For the fellow rookies out there, you first need to navigate to /system/bin. I'm sure there's a very simple way to do this, but since I know no better, this is how I did it:
cd\
cd system
cd bin
THEN type "fix-mac.sh" (without the quotes).
Wi-Fi switched on and remained on.
Thanks dom_b and androidbenutzer! So glad to have the wee otter2 up and running again!
Click to expand...
Click to collapse
I tried all the steps, and still no luck.
pakidermo5000 said:
I tried all the steps, and still no luck.
Click to expand...
Click to collapse
Actually you wouldn't get too far even if you could turn the wi-fi on. The build is plagued with the "Trebuchet has stopped" error, which apparently is common in CM. I tried every fix recommended online, without success.
I didn't read the entire thread but here's a super easy way to fix the wifi issue. Connect a USB cable from the Otter2 to your computer. Make sure you have adb installed. Open a command prompt and type:
adb.exe /devices
Now look at the security message on the tablet. Click yes
adb.exe shell
At the shell prompt, type the following:
[email protected]:/ # /system/bin/fix-mac.sh
---------- Post added at 02:42 PM ---------- Previous post was at 02:05 PM ----------
SuperSu is here:
http://rootmygalaxy.net/download-latest-supersu-v2-82/

[GUIDE] [NOOB-FRIENDLY] Fix random "screen off" - problem

I had the problem, that my device started to turn off the screen randomly.
Sometimes 5 times in 15 seconds !
So i post this GUIDE for anybody with the same Problem.
Disclaimer:​This is not my brainwork, i just put the pieces together as a Guide.
All knowlegde for this came from:
@ThE_MarD (from this forum)
and
LuK1337 (from the LinageOS IRC channel)
Thank you both very much !!!!!!
This Guide has 2 parts:
1. Check the logcat -or- figure out if this Guide is for you
( You can skip this Part, because this fix is easy to revert)
2. The fix !
############################################
1. Check the logcat:​
You need to fetch a logcat while the random screen off happens.
There are official ways :
How to capture logs | LineageOS Wiki
wiki.lineageos.org
The first of this seems to work without rooting your device.
But you have to have your device connected and the PC while the "random screen off" happens.
I opted for another "easy" logcat solution: Install aLogcat from the f-droid.org store on your rooted device.
https://f-droid.org/en/packages/org.jtb.alogcat/
And when the "screen off" happens just turn the screen on (unlock the device) , open the app , start it (if not allready running)
by tapping the "PLAY button" and save the log (just in case something goes wrong).
Then pause logging.
Which logcat path you gonna follow is your choise, but then you have to look for a line like this one in the log:
I/PowerManagerService( 1456): Going to sleep due to lid_switch (uid 1000)...
Click to expand...
Click to collapse
The important part is marked in bold letters.
If you find this line, then somehow the (magnetic) hall sensor (which normally gets triggerd by a small magnet in the
lid of the phone-case) got triggerd.
In this case the following (reversable) workaround should help!
If this is not the case you could try it anyway
#############################################
2. the fix !​( Turn off the anoying sensor ! )
You could compile a new kernel with the hall sensor deactivated !!
But: I never figured out how to do so, because there is also an easy road to follow:
If you have mysteriously not installed adb , just do it:
How to Install ADB on Windows, macOS, and Linux : https://www.xda-developers.com/install-adb-windows-macos-linux/
And enable USB-Debugging in "{} Developer options" as well(also use the ADB guide)
The "Developer options" is kinda hidden in LinageOS18.1, follow this route:
Settings -> System -> Advanced -> {} Developer options
Click to expand...
Click to collapse
Connect the Phone via USB-Cable with your PC.
On your PC:
Check if the devices gets recognized using:
adb devices
Click to expand...
Click to collapse
When your device shows up use this one*:
(*This tip was given to me in the LinageOS IRC channel. After half a day messing around with setting
up a new Ubuntu 20.4 Build enviroment for compiling a new kernel i was glad that i got this hint.)
adb shell settings put global lid_behavior 0
Click to expand...
Click to collapse
Thats is it. You are done. Everything should be fine from now on !
If you want to reverse the change (for whatever reason) just use the magic:
adb shell settings put global lid_behavior 1
Click to expand...
Click to collapse
I am not sure but i suppose this should also survive a System-Update !

Categories

Resources