[Q] How to DEBUG KERNEL when porting? - Android Q&A, Help & Troubleshooting

Hey,guys. I go for an android kernel porting for my SAMSUNG MSM8X55 phone, similar to GT-i9001. But I don’t know the fundamental technique of kernel debugging.
In addition, without any instruments, I can’t connect to UART. Trying to port kernel based on GT-i9001 cyanogen sources, then I compiled CWM recovery, but it couldn’t boot, and I can’t get any kernel log.
Any one has idea?

uppppppppppppp

Related

[Q] Two annoying Samsung bugs in firmwares

Hi,
Up to 2.2 samsung roms there are still 2 annoying bugs present. Please fix them Samsung
- Powermanagemet widget doesn't get the "GPS state changed" event
(it does get the BT and Wi-Fi state changed events)
- ecompass (mmc31xx) device driver in kernel is still not correct / erratic.
The ecompass device driver is in the kernel (boot.img) and two drivers are
/dev/mmc31xx
/dev/ecompass_ctrl
I also have tried to remove /data/misc/sensors/ecs_nvm and rebooted, but
that didn't fix it. Error is in the kernel.
I know MadTeam have corrected erratic behaviour in a boot.img but it would be nice
if we could fix it afterwards in any kernel (or Samsung must fix it in the kernel)
You can view it's state by dialing *#0*# (compass should be callibr. with value "3")
Enable Accel. calibration by dialing *#4736767*738#
I even odin-ed the boot.img from I5500LUYJPE (2.2.1) but no avail.
The only thing working for Froyo 2.2 roms is boot-img-test6.tar.rar from MadTeam (http://www.multiupload.com/VXXROHWR2R)
Cheers
Does anyone knows how to get the magnetic device driver (mmc31xx) from
a working compass 2.1 firmware (boot.img flashed in /dev/bml?)
Is it possible to use that device driver as android 2.2 driver? Overwriting it on the root partition? Or linking to it somehow from a writable partition?
I am not that familiar with linux device drivers.
Thanks

A13 Boxchip CM9/CM10 Development

I now know the Allwinner A13 is a stripped down version of the Allwinner A10, to be clearer the specifications of my Tablet (from UniFlash and AnTuTu Benchmark) are as follows:
Manufacturer: None
Brand: softwinners
CPU hardware: sun5i
CPU model: ARMv7 Processor (VFPv3, NEON)
CPU frequency: 60.0 ~ 1008.0 MHz
Screen resolution: 800 x 444
GPU vendor: Mali-400 MP
GPU version (OpenGL): OpenGL ES 2.0
RAM size: 512 MB DDR2 RAM
Knowing this, I used UniFlash to make a backup of the firmware bt after using UniFlash to try and load a CM9 Rom on to the Tablet, the Tablet died. After alot of googling I discovered AllWinner based chipsets use Live Suite (sometimes called LiveSuit) to flash firmwares on to the device.
To Flash firmware on to the device you need to follow the attached instructions ((http://dragondevs.com/viewtopic.php?f=159&t=390):
Download LiveSuite (http://www.softpedia.com/get/System/System-Miscellaneous/Live-Suit-Pack.shtml)
Install Live Suite
Start Live Suite
Select the Live Suite image file (folder icon
Turn device off (to be sure hold power button for 12 - 20 seconds)
Hold "Volume Up" button down
Connect the device to your PC (while still holding "Volume Up" down)
Start pressing the power button (you may need to do this once a second for 5/6 seconds)
If you haven't installed windows will ask to install a driver for a device (Dive Id will be something like Vf73465789123465435_Id, if the device is in the right mode, A13-MID, ADB-Interface indicates the tablet has connected in anouther mode).
Once this has finished LiveSuite will detect the device and a wizard will flash the firmware for you.
I have found a working firmware which according to AnTuTU Benchmark gives my tablet a rating of 3047 (see firmware section), this is on the higher end of reported A13-MID tablets
I have found out how to install CWM on to the device via SaussageMod (http://www.slatedroid.com/topic/29916-scriptmod-for-allwinner-a1x-platforms/). This solution is untested, further more it may be unnessary futher investigation has shown this website (https://www.miniand.com/forums/forums/2/topics/73) has developed a way of create Live Suite images. This is simplier than installing clockworkmod recovery,
I tried to load the following images on to my tablet and failed completely: http://forum.xda-developers.com/showthread.php?p=31043317 It didn't work and forced me to do a firmware refresh.
My other step for the day was to create Ubuntu 10.10 installation then I began following this guide to construct an Xperia Play CM9 Rom/Kernel. once I have created a working ROM (I own an Xperia Play). I'm hoping to be able to modify the kernel to include the relevent A13 drivers, but one step at a time.
TODO
Create Ubuntu Partition
Follow Xperia Play CM9 Rom/Kernel Guide and create working rom (test on my Xperia Play)
Download CT repository (https://github.com/christiantroy) and compare with Xperia Play CM9 rom
Find the relevent drivers from https://github.com/amery/linux-allwinner leaked source
Retrieve offical MALI 400 MP drivers (parts of it have been released) compare with leaked source
Use UniFlash backup of original Rom along with LiveSuite image creation to try and restore original firmware (see If I understand it properly)
Examine Build.prop find out why original firmware displayed ina phone layout and new one is in tablet mode (potentially reference CM supported Tablets).
Attempt to compile a A13 (Sun5i) based rom
Create a google code page to hold all of these thoughts properly.
Left blank will include rom/firmwares here for future reference
Firmware
https://www.dropbox.com/sh/bzjt7mzuftwz79f/nt7mRMPDj1 - My public Dropbox
http://www.azhuo.net/en/products_A13B_Allwinner-A13_7_inch_Android_4.0_Upgrade.html - password is: tabletpc
http://dragondevs.com/viewtopic.php?f=159&t=390 - McPad F1 firmware
Novo 7 Tools
https://dl.dropbox.com/u/74970692/Novotools_v1.0.apk
SausageMod
http://www.slatedroid.com/topic/29916-scriptmod-for-allwinner-a1x-platforms
Gapps - http://goo.im/gapps/
I have the same tablet and it would be very cool if you succeeded in your attempt to create a CM9 rom for it. I tried ROM made by Tragidy from this thread but there is a problem with touchscreen driver, ROM booted successfully but I could not even unlock the screen cause touchscreen did not work. I finaly flashed rom DCPAD2121.zip using livesuite which I belive is the original ROM that came with tablet and it worked.
I installed clockwordmod using sausagemod successfully, but there is a big problem - no hardware "back" key and only volume up works.
novo7tools.apk works OK for reboot, reboot to recovery or shutdown.
syncing
Thanks, it's slow going at the moment, I only spending ~1 hour each day on it and at the moment trying to sync the CM9 source is painful (it keeps timing out, due to "remote side corruption").
I figure I would start there as all the firmware images I can find are ICS roms (meaning the drivers must be ICS).
Hi, I have the same tablet but I cannot find the firwmare DCPAD2121.zip
Could you upload it please? From dropbox has been deleted
Thanks
You should check this topic:
http://forum.xda-developers.com/showthread.php?t=1861445
WillingMagic said:
You should check this topic:
http://forum.xda-developers.com/showthread.php?t=1861445
Click to expand...
Click to collapse
I tried that ROM, on my tablet after flashing the ROM it got stuck in a boot loop. It might be an idea to steal the config he created. The ROM is pre CM9 release. The A10 Flash kitchen software seems to work. I was hoping on producing a complete Live Suit image that people could flash (figuring our what CT has done on the A10 took a while).
Still having fun trying to sync the repositories, given up on trying to use a Debian VM, I'll will install full Ubuntu on a drive tomorrow, hopefully that will help fix things. It doesn't help most of the guides I can find are out of date and I keep having to make corrections.
I've also uploading all firmware I can find to my dropbox (at 200mb each they will take a while), I won't with tools simply because others ask you not too.
The Dropbox firmware was out of date when I tried to download it sun5i_android_a13-pfdq88_en_D06 firmware worked well for me, the firmwares are located at: https://www.dropbox.com/sh/bzjt7mzuftwz79f/nt7mRMPDj1
Cyanogenmod 9 in not working for you. Did you made data and cache wipe? Can you send me logcat and dmesg output?
You can`t steal my config, you have to remember about credits, and other stuff.
Creating a wiki is useless, there is already wiki for allwinner products, so better update info on it.
Github is better than google code to keep sources.
Using Livesuit=Windows, I hate dual booting just for flashing, Clockwork Recovery or modified SDcard with uboot is better solution.
Current kernel is not working well, with sun5i.
Using VM is stupid, because building rom takes a lot of time on quad core pc without it.
WillingMagic said:
Cyanogenmod 9 in not working for you. Did you made data and cache wipe? Can you send me logcat and dmesg output?
You can`t steal my config, you have to remember about credits, and other stuff.
Creating a wiki is useless, there is already wiki for allwinner products, so better update info on it.
Github is better than google code to keep sources.
Using Livesuit=Windows, I hate dual booting just for flashing, Clockwork Recovery or modified SDcard with uboot is better solution.
Current kernel is not working well, with sun5i.
Using VM is stupid, because building rom takes a lot of time on quad core pc without it.
Click to expand...
Click to collapse
I wiped the caches I couldn't send a logcat or dmesg as the device simply boot looped.
I've been providing links to threads whenever I come across others work, I'm new to android rom development for me this is a research effort which will hopefully produce something cool for my £50 tablet. Basically my day job has switched to developing UI's and I am looking for something new to learn (instead of why is Vaadin, Guice, SWT, Javascript, etc... is putting that button there).
Said dev career has also made me hate Git with a passion (not as bad as perforce but still) since Git integrates poorly with Visual Studio and Eclipse and you end up getting everyone overwriting each others changes. The idea of google code is simply because it makes a good platform for projects and you can use things like git with it. I didn't know about an Allwinner wiki, with all of my Googling I haven't come across it, where is it?
I don't care about build times I'm just researching, alas Debian has caused me enough problems so I've installed ubuntu on to a old disk I had lying around. Considering I've just tried to install Ubuntu via a Net install CD and it has screwed up the GRUB installation (nicely taking out my windows partition as well) can you blame me?
The reason for nabbing the config (and the Xperia Play and Christian Troys) is to understand how they work. Over the years I've found most Open Source software documentation is poor unless you have a set level of knowledge about it already.
Lastly I like automation, I want things to just work. Livesuit does that since I am normally a windows user, I as hoping in the distant future once I understand the build process to set up a Jenkins server to do it and create the whole lot automatically (via the Allwinner flash kitchen). In the even longer term I would like to update FlashTool to do what LiveSuit does. In the near term (next couple of months) I just want to be able to build a CM9 image.
All android and kernel source are keep on git, so changing it is stupid.
This is allwinner wiki: http://rhombus-tech.net/allwinner_a10 you can also update http://elinux.org/Hack_A10_devices
Everyone use CWM and it's standard for unofficial firmware/ROMS
brandonlee2 said:
Hi, I have the same tablet but I cannot find the firwmare DCPAD2121.zip
Could you upload it please? From dropbox has been deleted
Thanks
Click to expand...
Click to collapse
Here's my upload, I packed it in rar format: http://www.mediafire.com/?we4zhgop29bg3dj
I also found it here: https://docs.google.com/open?id=0BzQuMwoMQqvba1VtQ1p1ZWJkR2M
from this forum post: http://www.slatedroid.com/topic/35314-a13-generic-tablet/page__view__findpost__p__421128
I built a CM10 rom for A13 from sources. It boots fine but hangs either at the Android setup wizard or sometimes even at the CM animation.
myfluxi said:
I built a CM10 rom for A13 from sources. It boots fine but hangs either at the Android setup wizard or sometimes even at the CM animation.
Click to expand...
Click to collapse
Mind sharing your repo ?
Trying 4.1.2
Hi all,
So I've tried compiling from 4.1.2 source for my A13 Emgeton Consul 3
It boots up and gets to the CM10 boot animation but it doesn't get past it.
I can adb at first boot until adb stops.
logcat from boot attempt:
http://pastebin.com/gLTrieHm
My build.prop:
http://pastebin.com/Ap9M1tjW
Any pointers as to why it doesn't get past the boot animation?
Hello guys! I know it's not he proper place here to pose my question, but I am definitely at loss!
Do you happen to know if there is a way of rooting this tablet? And if so, does everything work properly after that?
phoivos86 said:
Hello guys! I know it's not he proper place here to pose my question, but I am definitely at loss!
Do you happen to know if there is a way of rooting this tablet? And if so, does everything work properly after that?
Click to expand...
Click to collapse
Mine came pre-rooted.
Just received my MID A13 Tablet. Is this thread dead?
koodiifin said:
Just received my MID A13 Tablet. Is this thread dead?
Click to expand...
Click to collapse
I've gone a bit quiet on the development front, setting up a file/media server & samba domain server to power my home network is eating up my time.
My dropbox contains every image I could find for the tablet, as mentioned previously you can root the device using saussage mod, although my device and every one of those images is already rooted. You can prove this by installing super user.
Sassage mod's clockworkmod recovery doesn't work for me and I was looking at the backup tool in order to generate my own one. If you are aimed at any development, let me know and I will update the main thread
Many have said that they have "lost" "forget" to take backup from original rom. So, i'd like to have backup from my original to go back if/when something goes wrong. How do i do that? What software i need. Do i need to root?
This is from my info sheet:
Model TWD_MID
android version 6.0.1 ?????
Baseband 1.5
Kernel 3.0.8+
Buildnumber: nuclear_evb-eng6.0.1 IMM76D 20120917 test keys
I am in a desperate need for some help:
My tablets specs are these:
Phone model: A13-MID
Brand: softwinners
CPU hardware: sun5i
CPU model: ARMv7 Processor (VFPv3.NEON)
CPU frequency: 60.0 - 1008.0 MHz
Screen Resolution: 800 x 444
GPU vendor: ARM
GPU render: Mali-400 MP
GPU version (OpenGL): OpenGL ES 2.0
Memory size: 353.5 MB
Android version: 4.0.4
Build number: nuclear_pfdq88c-eng 4.0.4 IMM76D 20120821 test-keys
Kernel: Linux version 3.0.8+
I just installed OpenVPN installer and installed the OpenVPN binary in the system/xbin
After that I tried to connect to my university's VPN but when it tried to connect, the tablet lost wifi connection and ever since it doesnt connect to any available wifi network!! I manually deleted the OpenVPN binary, but problem remains!
Do you know where could I find the stock ROM for this tablet in order to re-flash it?
Do you have any other proposals? Anything will help!
Thank you very much!!

[DEV] Lets start developing for the M4

The lack of custom roms for our device is depressing, there aren't enough developers for the M4 aqua and while some have moved on to other devices, others don't share their REAL sources and fixes. So what i propose is that we all join forces and do it ourselves, the more people the better it brings different points of view and consequently faster fixes, so for those that are interested here are the prerequisites:
1. A computer
2. A linux distro (most guides will advice you to go for ubuntu or a buntu based distro personally its not my cup of tea, i use gentoo but linux is about choice you choose what suits you. Also if you want to keep your windows you can either dual boot(recommended) or just use a virtual machine which depending on specs it can be slloooww).
3. A starting point (most people don't even try to compile android because they wont even know where to start from, thankfully sony isn't as bad as others and even provides detailed information on how to compile android for their devices, so i suggest to start here http://developer.sonymobile.com/kno...aosp-marshmallow-for-unlocked-xperia-devices/ )
4. Time (compiling times can take very looonnnggg)
5. Patience ( yeah a hell lotta of it)
Still interested?
We can use this thread to post compiling errors , bugs, errors and any android developing related questions, if instead of aosp you want to jump straight to cyanogenmod the instructions are very similar just replace "repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r10" with "repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0" xda also has some very useful threads we can use here are a few:
1. Compiling roms:
CM - http://forum.xda-developers.com/showthread.php?t=2060017
PAC - http://forum.xda-developers.com/showthread.php?t=2662325
2. Debug
Create logs - http://forum.xda-developers.com/showthread.php?t=2185929
Understand them - http://forum.xda-developers.com/showthread.php?t=2274119
Every great dev had to start at some point this might be start of some great devs (we need them), so lets start compiling and bring the marshmallow to the tulip!!!
We have a few custom roms that just need bug fixes. We will get better as time goes on. And would we see a rom of yours anytime soon?
I don't find the m4 binaries in this page http://developer.sonymobile.com/knowledge-base/open-source/open-devices/list-of-devices-and-resources/
Hello guys, as much of you know, I tried so many times to compile roms for our device, but never had success. My device for now enter in a "bricked fastboot" mode, and in flashmode Flashtool say that the device have debugging off. Totally bricked. But, I will never give up with my work for this device. I will make roms for you guys and for my experience, also if I cannot test. So, I installed Ubuntu in my PC, I am syncing the sources and this time I will try very hard! Thanks CarDGee for your post, it will be helpful for errors.
So, what would be our requirements knowledge wise? What programming language base, etc?
Any kind of knowledge of programming language can be useful, but is not needed.
alby_var said:
Hello guys, as much of you know, I tried so many times to compile roms for our device, but never had success. My device for now enter in a "bricked fastboot" mode, and in flashmode Flashtool say that the device have debugging off. Totally bricked. But, I will never give up with my work for this device. I will make roms for you guys and for my experience, also if I cannot test. So, I installed Ubuntu in my PC, I am syncing the sources and this time I will try very hard! Thanks CarDGee for your post, it will be helpful for errors.
Click to expand...
Click to collapse
I think at this point it would be smart to collaborate on a custom rom (probably CM 12.1 because it is closest to stable) so we have a base to develop more roms.
For now I'm working to build AOSP 5.0
I followed the instructions to build AOSP at developer.sonymobile.com
At point 4. it say
Find the software binaries for the device you want to use on Sony’s AOSP for Xperia devices
Click to expand...
Click to collapse
Now i have downloaded the binaries for the M2. It have the Kanuti and Tulip folder inside.
Can i use it for build or do i have to extract the files from the device?
Second question is. I can remove other devices from local_manifests.xml right?
You can also use GitHub sources and put them into android sources with git clone, with this method also if you edit files, you'll not have problems with repo sync.
@dani020110 download the Z5 ones inside the zip you will have kanuti and tulip folders as well.
@alby_var what do you mean "bricked fastboot" is it constantly with blue led on? have you tried holding powerbutton + vol up until it vibrates 3 times?
@jefins although its a plus to know C java etc.. its not a requirement i am a strong believer that you learn by doing it.
@jtg01 yes use the ones from the zip also take a look at this repo https://github.com/SonyAosp you can find the binaries there under platform_vendor_sony and platform_vendor_qcom.
Now i regret not having done one of those "Reserved" on the second post.....
@alby_var what do you mean "bricked fastboot" is it constantly with blue led on? have you tried holding powerbutton + vol up until it vibrates 3 times?
..
Click to expand...
Click to collapse
The device , on a pc without drivers is recognized as qhsusb_bulk. It is recoverable, but any tool doesn't recognize the smartphone.
On a pc with all drivers it is recognized sometimes as SOMC FLASH DEVICE, other times in SEMC FLASH DEVICE. Also this is recoverable, but Flashtool says that the device have debugging mode off. (I cannot boot to the rom to activate it.)
And the only led that the device show is red, it bright up 3 times only when the battery is at 0%
alby_var said:
The device , on a pc without drivers is recognized as qhsusb_bulk. It is recoverable, but any tool doesn't recognize the smartphone.
On a pc with all drivers it is recognized sometimes as SOMC FLASH DEVICE, other times in SEMC FLASH DEVICE. Also this is recoverable, but Flashtool says that the device have debugging mode off. (I cannot boot to the rom to activate it.)
And the only led that the device show is red, it bright up 3 times only when the battery is at 0%
Click to expand...
Click to collapse
Do you have the correct flash and adb drivers on your pc? My second phone is a xperia E4.i had the same problem with SEMC and SOMC.i thought that it was bricked but the problem solved when i installed adb and flash drivers from the flashtool drivers file.
I installed all drivers that is on the Flashtool Folder trought the exe, but Flashtool not start flashing...
So i compiled the sources and got a system.img and a userdata.img in out/target/product/generic ?
I think there have to be a boot.img. Do i have to compile the kernel as well? Cause instructions on sony developer say the repos contain a precompiled kernel.
@alby_var: which version of flashtool do you use? Had also problems to flash firmware on newest version. So i installed Flashtool Version 0.9.19.7. With that it worked fine.
@alby_var try the linux version of flashtool
@jtg01 there must be something wrong because it should be out/target/product/e2303 or out/target/product/tulip did you choose our device after source build/envsetup.sh && lunch? because i believe you just compiled generic android.
Compiled android 6 for 2303, attached the Make log Below. (Pure Sony AOSP)
yet to flash the images and check.
made a small change, the userdata.img is for 16GB as i have a M4 Aqua Dual (E2363) the device should be able to boot up, will add logcat when i have it.
Lots of warnings but was able to make successfully
open the log in notepad++
Edit: First attempt to boot, loops at Sony logo.
will make fresh and check again
@jtg01 there must be something wrong because it should be out/target/product/e2303 or out/target/product/tulip did you choose our device after source build/envsetup.sh && lunch? because i believe you just compiled generic android.
Click to expand...
Click to collapse
Yeah there was a problem. Now it compiled all img's . But userdata.img has only 70 Mb. System is 900 Mb.
Should i flash this?
Edit:
Flashed it got bootloop. Can't take a logcat cause it restart at Sony logo.
But i get a kernel_boot_log. There are multible errors. Maybe someone can help me with that.
Guys I not know how to adapt device sources to the rom for that I am building.. Can anyone please help me?
@RohitBopnna and @jtg01 for some strange reason newest firmware doesnt allow you to flash custom firmware you will have to downgrade to .128 and then flash your roms i am sure it will boot, follow the instructions on Jeffreyvh aosp thread http://forum.xda-developers.com/m4-aqua/development/aosp-6-0-e2303-t3271380
@alby_var I think you should start by compiling something we already have the sources see how it goes, and then move on

cannot boot compiled kernel with a patch using fastboot

Hi,
I'm trying to compile the kernel for my android device with android keyboard gadget patch ( raw. githubusercontent. com/pelya/android-keyboard-gadget/master/kernel-3.10-jiayus3.patch), the patch is applied to the source without errors and the compile process,besides some warnings, was done with success, in the end i got zImage and Image files, that AFAIK are the kernel files, knowing this i tried to use fastboot to try the new kernel but no success , i used "fastboot boot /path/to/zImage" and it sayed that the image was sent to the phone and a text confirming that was shown on the phone screen (something like USB Transfer OK ), but on computer it was stuck saying "booting..."
Dont know if it matters but this is my phone kernel (the one given by manufacturer): github. com/bq/aquaris-E5FHD/
What can it be, i dont see any error messages
(also posted this on general forum, but i dont think i'll get answer there, if i cant do this please delete one of the posts )

[HELP] Debugging

I'm trying to debug a CyanogenMod ROM I'm testing on my device, however, it hasn't gotten far enough into boot where I could logcat, and last_kmsg is only a bootloader log; it's useless. What can I do to figure out what's wrong?

Categories

Resources