[Q] I built a custom kernel for my phone, but how do I test it? - Android Q&A, Help & Troubleshooting

I'm trying to make a custom kernel for the Samsung Gravity SMART using sources from the unofficial CM9 port for the Gio/Ace (which both use very similar hardware to the Gravity Smart). What I've succeeded at so far:
1) Acquiring the source, both for the CM9 kernel and for the stock Froyo kernel
2) Searching for the device-dependent references in the stock kernel
3) Porting those changes over to the CM9 kernel
4) Getting everything to actually compile
5) Acquiring the stock CM7.2 source
6) Creating device makefiles (i.e. BoardConfig.mk, etc)
7) Building CM7.2 using kernel built in step #4
8) Putting the various img files into an Odin-compatible .tar.md5
9) Actually flashing to the phone.
And for all that work, I got.. a soft-bricked phone (fortunately, I have an Odin file for stock firmware). The phone boots to a SAMSUNG logo (not flashing/throbbing).
So my question is: how the heck do I figure out what's actually failing? Is there a bootloader to unlock, and if so how do I unlock it?

I strongly suspect I'm dealing with a bootloader problem. If I unpack the stock boot.img, edit init.rc with a commented line, repack the boot.img and try flashing it, I get the same behavior (stuck at SAMSUNG).
Any tips for unlocking the bootloader?

The good news is that it doesn't seem to be a locked bootloader--at least, I figured out how to flash a customized boot.img that contains a stock kernel and a modified ramdisk.
The bad news is that my kernel STILL doesn't boot, and I still have no idea how to approach troubleshooting/debugging it. Any tips?

Connect your phone to USB, go in the SDK folder and start ddms.bat. Let it load the GUI, then start your phone. At this point it should come up in the dalvik debug monitor.
Select your device on the left side and see in real time what errors it pops-up

DeuXGod said:
Connect your phone to USB, go in the SDK folder and start ddms.bat. Let it load the GUI, then start your phone. At this point it should come up in the dalvik debug monitor.
Select your device on the left side and see in real time what errors it pops-up
Click to expand...
Click to collapse
thats a nice piece of info, can you elaborate some more?

{
"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"
}
That's pretty much it. You can also request screenshots, explore files inside on the phone, request logcats and explore process logs.
It's a nifty tool

Thanks for suggesting DDMS, unfortunately it doesn't provide any useful information. It looks like it's just not booting the kernel at all.
I think the problem has to do with the bootloader--researching other, similar phones, the boot loader firmware is tightly coupled with the kernel, particularly the modules that actually interact with the flash filesystem. Since those modules are Samsung-proprietary, my only choice is to either back-port as many features from newer kernels into the stock kernel source, or figure out how to hack the boot loaders to work with a newer revision kernel. It would be a lot simpler if Samsung released a GB update, but fat chance of that ever happening.

Related

[RECOVERY] [APPS] ROM Manager and Clockwork Recovery Image v1.6 3/8/2010

Hi everyone, I've written a brand spanking new recovery with a Android application front end!
To install my ROM Manager and recovery, simply download ROM Manager from the Market!
ROM Manager:
{
"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"
}
ClockworkMod Recovery:
ClockworkMod Recovery is based off the eclair recovery image. Features include Nandroid backup, adb shell, advanced update.zip options (ignore asserts and signature checks), and file browser for choosing update.zips (you can now organize your stuff by directory).
1.6.0
Bug fixes.
File list now scrolls in recovery.
Added hooks for ROM Manager.
1.4.2
Initial public release.
For a manual installation of the recovery, you can download it from my website:
http://www.koushikdutta.com/2010/02/clockwork-recovery-image.html
Are there any new options that are not available in Amon_RA's recovery image?
Interested to know also. What about this would make me switch? Sell me......annnnnd go.
Nice work. How to flash this?
Thanks.
Oohh! I'm liking the idea of being able to store zip's in directories then being able to browse to those directories in the recovery rom to flash them. I can't tell you how many times I've had to boot out of recovery and use Astro to move a zip from my downloads folder when I wasn't near a computer that I could use ADB to do that with.
Yeah that's the best feature there
I hate how everything is played out on my SD card now
I'll wait for Amon_RA to make the file browser feature. That's the only feature that Amon_RA recovery (cyanogen recovery) is missing to make it MORE perfect.
How about some screenshots?
prettyboy85712 said:
How about some screenshots?
Click to expand...
Click to collapse
Check the link, he has 'em posted on his blog.
While everyone is putting forth their feature requests, I'd might as well offer my $0.02 ... any chance we could get a feature to boot a custom kernel image or even an option to dual-boot from a zImage ala Debian?
This is very nice.
Just flashed it.
Love how you can folderise everything
Going have folders now with Themes,roms and keyboards...etc.
One of the main gripes I have is how much crap my SDcard has that I can't 'file'.... plays havoc with my OCD
Lancealot said:
While everyone is putting forth their feature requests, I'd might as well offer my $0.02 ... any chance we could get a feature to boot a custom kernel image or even an option to dual-boot from a zImage ala Debian?
Click to expand...
Click to collapse
I STRONGLY second that notion!
I'd live to see the ability to compress/decompress nandroid backups as well as rename them.
I find your lack of carebears disturbing.
Need a new link...
Just having the ability to use any update zip from any folder is enough for me to jump on this one. Thanks!!!
can some one reupload please.
Casao said:
I find your lack of carebears disturbing.
Click to expand...
Click to collapse
+1 Agreed!
This message was deleted by its author
I got it. Thanks

[GUIDE] How to root Gingerbread

When I got my i9100, I didn't have any guides or tutorials to learn about root access. It was a trial and error process that I went through to further understand the process of flashing ROM's and gaining root. I have a little Linux experience so the term root wasn't new to me, but it is to the many users that flock here. In this guide I'll show you how to root Gingerbread using CF-Root.
Before I decided to write this guide, I was using CyanogenMod 9 but wanted to help the users of XDA, with the amount of threads I've seen asking for help rooting.
GINGERBREAD ROOT:
I'm using the stock ROM's for my country, Trinidad, rooting with CF-Root. That's to show people having all sorts of trouble finding a CF-Root kernel that even though where I live there's a kernel to use. It's not difficult.
Files used:
GT-I9100_TTT_I9100UHKI2_I9100UHKI1_I9100UUBKI2.tar
CF-Root-SGS2_XW_INU_KL1-v5.0-CWM5.tar
Odin3 v1.85.exe
Go to: CF-Root 5.5
- On your phone, dial *#1234#
- You'll see PDA, PHONE, CSC, pay attention to PDA and the last characters. In my case it's KL1.
- Using CF-Root's thread, look for a kernel matching those three digits (CTRL+F the search function).
- Download the matching kernel, flash using Odin.
HOW TO FLASH KERNEL USING ODIN:
1. Put the device into Download Mode, the device will accept anything that can be flashed using Odin.
To do this, hold down the following key combination:
Volume Down + Home + Power
Samsung KIES, does not need to be installed for Odin to recognise your device. However, the Samsung USB Drivers needs to be installed.
Once you've put the device into Download Mode, where it's ready to accept whatever you can throw at it, Odin needs to see it. When you plug the device into the computer, it will show up in the Message box saying 'Added!'.
For example:
{
"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"
}
Click PDA, select the CF-Root kernel you've deemed appropriate. Make sure to unzip the file or else Odin wouldn't be able to see it. It'll see the tar file though. It will not see the zImage inside the tar file.
This image is showing you where to put the CF-Root kernel to be flashed.
Start the process, it'll take less than ten seconds.
You've successfully rooted your device and replaced the stock recovery with ClockworkMod Recovery.
thanks for the info but i think you should move it to the general forum

[Q] Dual-Boot with Siyah and Different Kernel?

I was wondering if I setup my i9300 for dual-boot with the Siyah kernel, can I have the secondary ROM use a different kernel?
Thanks!
Heatshiver said:
I was wondering if I setup my i9300 for dual-boot with the Siyah kernel, can I have the secondary ROM use a different kernel?
Thanks!
Click to expand...
Click to collapse
the kernel is managing the dual boot...what happens when you flash a different kernel? dual boot gone
Heatshiver said:
I was wondering if I setup my i9300 for dual-boot with the Siyah kernel, can I have the secondary ROM use a different kernel?
Thanks!
Click to expand...
Click to collapse
To enable the dual booting, the Siyah Kernel does not other that duplicate some system areas that are fundamental to the operation of a rom. In particular, in order to be able to accommodate a rom secondary, creates a new /system inside the hidden partition /dev/block/mmcblk0p9 , and new folders /date and /cache into the free space existing in the internal memory ( /sdcard/ .secondrom).
The kernel, the folder /efs, the same internal memory, any microsd and all the rest remain rather shared is perfectly visible from both the rom that you decided to install.
The secondary rom is not a rom installed normally (odin or clockworkmod) and then copied using the appropriate options in the Siyah Kernel (see image below), in the areas of system duplicated.
{
"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"
}
Can be installed in both original firmware Samsung that cooked rom.
The kernel must always remain the Siyah, therefore it must be reinstalled as soon as you flash a rom that does not provide for it.
To be able to enter the secondary rom, during the boot phase it is necessary to press the home key (when viewing the message). Do not remove the folder ,second rom inside the /sdcard. It is the one that contains a part of the rom secondary. Not all options dual-boot in recovery are good.
Thanks guys. I assumed as much, but hoped for otherwise!
The reason I ask is it seems I can only OC the CPU to 1.6, and I would like to be at about 1.7 if possible.
I have with Siyah kernel and System Turnerpro OC. to 1.8 without problems.
I use S.T.pro because than I can to 1.8.
Siyah only let it go to 1.7.
Sent from my GT-I9300 using xda premium

LG L5II E460 Touch CWM

Hello XDA
Today we're going to flash a touch CWM recovery to our phones.
First of all I want to thank all developers who made this become possible for our device,
-Kingo ROOT for giving root permissions (this is the one I used for my E460 and it worked like a charm)
-Optima Team for bringing us the unlocked bootloader.
-Chimey Jimmey for giving a non touch recovery and easy method to push it.
If you want a non touch recovery just tell me and I will post the file(it also may be found in some thread)
PRE-REQUISITES
1.Root Permissions on your LG L5II
2. Unlocked bootlader
NOTE: I tested this only on E460, I hope this works also on other L5IIs but I'm not sure.
EDIT: This will work if the non touch CWM version works on your device, the non touch version can be easily found in this forum section
I DO NOT ASSUME ANY RESPONSABILITY FOR BRICKED DEVICES OR ANY OTHER DAMAGE DURING THIS PROCEDURE, DO THIS ON YOUR OWN RISK.
1.Download this file and extract it. http://www.filedropper.com/touchcwmrecovery
MD5 sum:
Code:
94B805ADF74CD810CCF417C1FB985723
2.Then place it in your SDcard and open your terminal emulator(which can be downloaded from Play Store)
and type the following text:
Code:
su
dd if=/mnt/sdcard2/touchcwm_recovery.img of=/dev/recovery
3. When you have successfuly executed the previous commands in terminal emulator reboot in recovery mode to test it(this is the only method i know how to boot into recovery on this device)
Type this in terminal emulator
Code:
su
reboot recovery
I hope this worked for you and now you can do whatever you want with your new recovery.
Thanks for the attention, let me know if this was useful.
will this work with e450-10b
I did test this only on E460, if you can dump me your recovery.img i can build it for your model.
soo, it's opening a new way to build a custom rom for our phone?
I hope it is, now I am learning new stuff about kernel and other stuff in order to work on a costum ROM for our phones. Unfortunately our phones is the only one from LII Series with mediatek chipset and porting cyanogenmod is very difficult because mediatek refuses of sharing any data.
EDIT: I just saw that there's some open source stuff release on LG official site, I'm not sure if it includes kernerl source and all other stuff needed.
HTML:
https://www.lg.com/global/support/opensource/opensourceList?types=ALL&search=e460
include:
{
"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"
}
Good as soon I can download that I will give a look to this! Hopefully we have everything opensource (now I can't downlad this because I'm using my phone and I'm without fast internet connection)
i think same, but keep calm

No Wifi No Data on AOSP roms READ THIS BEFORE POSTING!!!

You need three things besides your phone:
You lost data/wifi when flashing a CM UPDATE, this is your fault for not reading the threads, The FIX IS BELOW, in simple, plain english, easy to understand. DON'T MAKE ME DRAW PICTURES
1) Android SDK
https://developer.an.../sdk/index.html
Download it and install it. I'll only describe it for Windows OS.
2) The correct ROM
https://download.cya.../?device=enrc2b
or from my CM-12.1/AOSP threads
Download it and open it with WinRAR or Winzip or just unpack the whole thing. Directly in the root folder you'll see a file called boot.img
3) USB Cable connection between the phone and your PC
Connect the device to your PC. On your phone go to settings and enable USB debugging.
Now you are ready to flash the boot image.
a) copy the boot.img to the same folder as fastboot
if you downloaded the package from above, you'll see a folder structure that is a bit overwhelming. Navigate to
C:\adt-bundle-windows-x86-20140702\sdk\platform-tools
and copy the file called boot.img from the ROM there.
B) open up the terminal
click on start and enter cmd.exe
enter the folder with
cd /
cd C:\adt-bundle-windows-x86-20140702\sdk\platform-tools
c) start the flashing
Now type:
adb reboot bootloader
or alternatively, restart your phone manually and press the buttons Power and Volume down until you see a white menu screen.
Now type:
fastboot devices
and you should see your phone
d) flash the boot.img
type:
fastboot flash boot boot.img
That's it, 3G and WiFi should work now. A more extensive How-To can be found here:
http://wiki.cyanogen...l_CM_for_enrc2b
Taken from my thread of the same title from the CM forums
http://forum.cyanogenmod.org/topic/101207-no-wifi-no-data-read-this/
IF YOU CANNOT FOLLOW THOSE SIMPLE INSTRUCTIONS GIVE UP NOW
Hi @Lloir,
as far as i can see you have removed the aosp5.1 thread, right? that means no work from you for one x+ anymore?
now i also see that there is no one x+ in your signature...
mmm...bad news...
is it just because of the newbies and there stupdi questions? the best way to get rid of them is to ingore them!!!
.
el-Loko said:
Hi @Lloir,
as far as i can see you have removed the aosp5.1 thread, right? that means no work from you for one x+ anymore?
now i also see that there is no one x+ in your signature...
mmm...bad news...
.
Click to expand...
Click to collapse
My X+ is dead and I'm now mostly working on Huawei devices.
shhh....ititit :'(
.
{
"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"
}

			
				
Hey,@ Lloir
Ive tried this for my stock ROM that ive reverted to after having cyanogenmod 11, but it didnt work, I used the same boot.img from the firmware.zip. it did work successfully when reverting to cyanogen after it didn't work though.
What have I missed?
Any help would be appreciated.

Categories

Resources