[DEVS-NEEDED][VERY WIP][NOT WORKING]TWRP Recovery for the gio - Samsung Galaxy Gio GT-S5660

Hello, iam trying to get teamwin recovery on the gio
Current status:
-Compiles good, no errors and a recovery.img of 7.9MB, phiexz device profile used
-But doesnt work actually, if it boots the screen turns blue , and adb doesn't work
Can some more experienced dev help me?
What i did
Downloaded CM7 source
Insterted phiexz device profile in it
Insterted TWRP stuff in it
Adjusted boardconfig.mk:
Commented out custom graphics libary(graphics.c)
Added TWRP required flags in the boardconfig
Did a make -j5 recoveryimage
Can somebody point out what iam doing wrong?

Related

[Q] [lt26] Boot flow, how does it work?

I got my hands on a Xperia S and just started looking into the android development stuff...
If I would compiled a JB kernel for the device as well as AOSP 4.1.2, and lets say the recoveryimage from CM. I am wondering how / if everything works together.
The recovery partition seems to be non writable and it seems that people are advised to flash the CWM recovery to the boot partition. I thought this partition is the one for the actual kernel? Even if so, how does the combination of my kernel.elf and CWM recovery work?
If I get this done this brings up the next question, is the same kernel used to bootup the whole system later on? What I would like to see is something like a flow chart where I see how control is passed around and to what address, and which initrd does what... maybe someone can correct or expand the following:
first stage bootloader (recovery partition?)
apparently I can boot into different modes (fastboot, flash, ...)
on normal boot the kernel from the boot partition gets loaded into ram (execution starts at 0x40208000 ?)
kernel (boot partition)
... does initializaiton stuff ...
in the end init from initrd fires up either the CWM recovery (?) or userspace (?)
I assume in userspace the usr init fires up the dalvik vm and android boots as usual (this is the system partition I get from AOSP ?)
How exactly does it work for CWM and where is it located in the ROM and RAM?
I am sorry if the information is already posted somewhere in these forums but I wasn't able to acquire it so far.
cheers
Welcome to the forum. Thread moved, please post your questions here in Q&A in future.
Thanks
AvRS
Hi,
Let me try to clarify a bit, at least on how I see it:
Bootloader is indeed capable of handling multiple modes:
- flash mode
- fastboot
- normal kernel boot
- recovery / fota kernel boot (disabled with unlocked bootloader)
When unlocking bootloader, the only kernel we can boot is normal kernel. You can write to fota kernel partition, but it will not boot anything unsigned there and will boot normal kernel instead.
So in our custom roms, Android and recovery are using the same kernel, we add recovery files in the Android initramfs, and the switch is handled by init.*.rc with a script that detects keypress and is launching recovery if volume key is pressed.

Spreadtrum SC6820/SC8810 Full Backup

Hello there,
Today I will teach you how to make a full backup of your Spreadtrum phone !
This tutorial may also work on several other phones.
CWM can make a nearly full backup of your Spreadtrum, but it's not enough unfortunately.
Android is compartmented in 4 main partitions. You have theses partition:
* boot - It contains the Linux kernel
* System - It contains Android
* Recovery - It contains the recovery system, CWM if you installed it.
* DATA - It contain your personal datas, and should not be published online if you share your backup online.
But Android is one thing, your phone also have a lot of bios, firmwares, and bootloaders. Theses are not saved by traditional backup utilities such as CWM.
Theses partitions includes:
* UBoot - Very important, this thing is the low level bootloader. It starts Linux !
* Modem Firmware - used to dial with your GSM provider
* DSP Firmware - Make video playback smoother using DSP resources.
* NV - It's some kind of encryption key with some low levels parameters. Very important !
* Lots of misc stuffs - Like the boot logo, the kernel panics logs (record the boot-up errors to help the debugging process), etc ...
* Lots of important misc stuffs - For example what start-up the device even before handing the phone to Uboot.
This thread will cover a new way to backup your device, working "only" on rooted Spreadtrum devices.
With this you can recreate your original firmware file, and then rescue your phone even on the worst case you can find. (And help those with the same phone as you but have made a big flashing mistake)
So first, you will need to root your device. It may be simple or difficult, it all depends of the device you have. The instructions on how to root your device are here: http://forum.xda-developers.com/showthread.php?t=2165554
When you are rooted, you will have to install the Spreadtrum drivers if it's not already the case and log into your device with ADB.
You can download the drivers here:
http://www.mediafire.com/download.php?c5nf3rlhxmxhu4x
http://www.mediafire.com/download.php?2tyg0k2xp3ejgyg
You can download ADB and learn how it work here: http://dottech.org/21534/how-to-ins...ows-computer-for-use-with-your-android-phone/
Then you will have to tell adb what phone to use. By that I mean adding the PCI ID to a text file to tell adb that this peripheral is compatible.
The Spreadtrum PCI ID is 0x1782
add this line to "Your user directory/.android/adb_usb.ini"
Code:
0x1782
So when you are ready to go, you have to download this file: http://www.mediafire.com/download.php?y6wmegkc22gkr97
Then with adb, push it on your device with this command:
Code:
adb push backuptools.tar /data/local/tmp
Now we will extract the tools with this command:
Code:
adb shell su -c "tar -xvpf /data/local/tmp/backuptools.tar"
And now, let's start the backup process:
Code:
adb shell su -c "./mkbackup.sh"
and here we go, just wait a while and every partitions on your phone will be saved in the backup directory on the sd card !
You will never have to backup this way again as those partitions are read only, if you don't do crazy things they will never change. But if you want to make another backup I suggest you go with CWM (read this page if you don't have it: http://forum.xda-developers.com/showthread.php?t=2165554).
Please do another backup with CWM even if everything as gone right with this method. Just to double check !
PS: if CWM does not work for you, you just have to send me your boot.img file from your backup and I will make one compatible with your phone.
To restore your backups you will also need to have CWM, you also can use ResearchDownload if you manage to entirely brick your phone or if any attempts to make a CWM recovery fails. I will have to do a tutorial about that too.
Thanks a lot :good:
this is my boot.img after a full backup :www .mediafire.com/?gmnm65rn65b28c3
i need a CWM image for my GT-I9300 clone.
all the best.
monster-exodia said:
Thanks a lot :good:
this is my boot.img after a full backup :www .mediafire.com/?gmnm65rn65b28c3
i need a CWM image for my GT-I9300 clone.
all the best.
Click to expand...
Click to collapse
Hi,
Can I have the exact name of your device ? (it must be in the battery compartment)
Did you tried all the CWM already in the rooting tutorial ? (I added one this morning)
If none of them work, I made this recovery with the boot.img you provided: http://www.mediafire.com/download.php?aj2nman38j5cfip
Please don't forget to tell me what CWM work for you so I can add the name of your phone on the tutorial.
@ElectronikHear
phone model (in battery) : N9300
phone model : (system info) GT-I9300
Build number : MT6515M_C909_HT_V14
cpu hardware : SP6820A
..........
I never tried ... firslty how to to flash CMW recovery ?
thanks in advance.
deleted
monster-exodia said:
how to to flash CMW recovery ?
Click to expand...
Click to collapse
Well it's explained in the rooting tutorial.
If your phone have Fastboot you can flash using it. If you don't you can use the Spreadtrum flash utility called ResearchDownload.
Everything is here:
http://forum.xda-developers.com/showthread.php?t=2165554
As your phone is already rooted it will be a lot more simple to flash using "dd" or some android flashing utilities. Actually it doesn't work that way on theses phones, sorry ... So just do as the rooting tutorial explains.
Hi, I'm succesfully rooted my phone with the "rooted system partition image" method, but none of the CWM images work, so I would be grateful if you can send me the recovery image.
Device Info:
Phone model (in battery) : S6500-TV
Phone model : (system info) S560
Android Version: 4.0.3
Baseband Version: DM_BASE_12A_W12.32|sc8810_modem|08-9-2012 16:47:10
Kernel Version: 2.6.35.7 [email protected] #3
Software Version: T162_JYY_G2_P2_1_W1220P12_DNY_V0.8.1_20121015
Hardware Version: 1.1.0
boot.img : www .dropbox.com/s/ka43sd45em9lu9k/mtd9.boot.img
Thanks in advance.
monster-exodia said:
I never tried ... firslty how to to flash CMW recovery ?
thanks in advance.
Click to expand...
Click to collapse
Don't even try!
Backup first.
janzlev said:
Hi, I'm succesfully rooted my phone with the "rooted system partition image" method, but none of the CWM images work, so I would be grateful if you can send me the recovery image.
Device Info:
Phone model (in battery) : S6500-TV
Phone model : (system info) S560
Android Version: 4.0.3
Baseband Version: DM_BASE_12A_W12.32|sc8810_modem|08-9-2012 16:47:10
Kernel Version: 2.6.35.7 [email protected] #3
Software Version: T162_JYY_G2_P2_1_W1220P12_DNY_V0.8.1_20121015
Hardware Version: 1.1.0
boot.img : www .dropbox.com/s/ka43sd45em9lu9k/mtd9.boot.img
Thanks in advance.
Click to expand...
Click to collapse
Hi there,
Here is your new recovery: http://www.mediafire.com/download.php?iahnncpjhm44etn
Please tell me if it works so I can add it to the rooting tutorial ^^
Thank you very much !
Not working, after flashing the recovery, the phone enters into a boot loop.
Anyway thank you.
janzlev said:
Not working, after flashing the recovery, the phone enters into a boot loop.
Anyway thank you.
Click to expand...
Click to collapse
A boot loop ?
You mean the recovery is looping ? and if you try to boot as normal everything working ok ?
I don't know what has gone wrong ... Where did you find your boot.img ? Did you extract it from the rom as the tutorial said or extracted from a .pac file ?
Have you flashed it with fastboot or with ResearchDownload ?
ElectronikHeart said:
A boot loop ?
You mean the recovery is looping ? and if you try to boot as normal everything working ok ?
I don't know what has gone wrong ... Where did you find your boot.img ? Did you extract it from the rom as the tutorial said or extracted from a .pac file ?
Have you flashed it with fastboot or with ResearchDownload ?
Click to expand...
Click to collapse
Recovery does not start, normal boot enters into a boot loop, the boot.img is extracted from the rom as in the tutorial.
Flashed with ResearchDownload.
janzlev said:
Recovery does not start, normal boot enters into a boot loop, the boot.img is extracted from the rom as in the tutorial.
Flashed with ResearchDownload.
Click to expand...
Click to collapse
That's weird, really weird. Because the recovery partition is not involved in the normal boot procedure. So flashing a new recovery should not harm in any way the normal boot procedure.
I really don't know what have brought your phone in such state I'm afraid.
Maybe you should try to flash the recovery again. and see if everything is the same.
As the recovery is not involved in the normal boot process, it surely will not change anything, but as you have tried the over ones (CWM I mean), and that have not screwed your booting process, you may try to flash one of the non working ones again (but known for sure to not harm the boot process) to see if it work again.
Have you used the same FDL set as when you flashed the system partition and the over CWM ?
It's a good thing you have the full backup on your hand. Because you may surely be able to recover from that. I just have to make a tutorial about flashing the backup with ResearchDownload and explaining what file goes where from the backup.
ElectronikHeart said:
That's weird, really weird. Because the recovery partition is not involved in the normal boot procedure. So flashing a new recovery should not harm in any way the normal boot procedure.
I really don't know what have brought your phone in such state I'm afraid.
Maybe you should try to flash the recovery again. and see if everything is the same.
As the recovery is not involved in the normal boot process, it surely will not change anything, but as you have tried the over ones (CWM I mean), and that have not screwed your booting process, you may try to flash one of the non working ones again (but known for sure to not harm the boot process) to see if it work again.
Have you used the same FDL set as when you flashed the system partition and the over CWM ?
It's a good thing you have the full backup on your hand. Because you may surely be able to recover from that. I just have to make a tutorial about flashing the backup with ResearchDownload and explaining what file goes where from the backup.
Click to expand...
Click to collapse
Thanks would be really helpful, and yes I used the same FDL.
janzlev said:
Thanks would be really helpful, and yes I used the same FDL.
Click to expand...
Click to collapse
I made another CWM recovery for your phone, please try it: http://www.mediafire.com/download.php?lg7m6v49efzpnjk
Apparently was an error of ResearchDownload (It seems was flashing recovery.img into boot.), so I tried with another copy of ResearchDownload and FDL files and now works like a charm.
Thank you very much!
janzlev said:
Apparently was an error of ResearchDownload (It seems was flashing recovery.img into boot.), so I tried with another copy of ResearchDownload and FDL files and now works like a charm.
Thank you very much!
Click to expand...
Click to collapse
Can you tell me what version of ResearchDownload have this bug. It's a pretty scary one. I have to be sure I don't have it on my computer ...
By the way what CWM image is working ? The first or the second one ? (the two should work but I want to be sure before adding it to the main tutorial)
Thank you very much ! That's one more phone to the list of easily rootable Spreadtrums thanks to you !
Edit: And what FDLs you use precisely so I can rename the folder to reflect the use of this set for this phone (Is this the ones on the .pac firmware you've uploaded on the over topic ?)
RESEARCHDOWNLOAD R2.9.6010, with the R2.9.7002 everything's fine. Respect to the CWM images, after the error I tried with the second one, so maybe the first one also works, the FDLs that I used was extracted from the .pac dropbox.com/s/69yl8hn9361qpy5/FDLs-S6500-TV.tar
That's it, if I can help more, let me know.
janzlev said:
RESEARCHDOWNLOAD R2.9.6010, with the R2.9.7002 everything's fine. Respect to the CWM images, after the error I tried with the second one, so maybe the first one also works, the FDLs that I used was extracted from the .pac dropbox.com/s/69yl8hn9361qpy5/FDLs-S6500-TV.tar
That's it, if I can help more, let me know.
Click to expand...
Click to collapse
I think I have every informations I need ^^
I have added the recovery for S6500-TV to the main tutorial and will add in a short while the fdls to the FDL pack file.
Thanks again !
Backup
attached is my boot.img
to follow: entire backup

[Q] Any 1 here experienced with kernels? Need your help for my Kitchen.

Ok firstly this may seem a bit confusing, I am copying this from a PM i sent to @wedgess
Hi, I am wondering if you would be able to make a bootable recovery image with TWRP as i have no idea how to do it and i can only find CWM ones which requires signature for "--update_package="
I don't want a kernel and i don't want a cwm image but i want just simple a TWRP recovery.img which is bootable like http://forum.xda-developers.com/showthread.php?t=1493996 but TWRP instead
Your kernel's work fine but i need it to boot a recovery.img then flash the new rom via "--update_package=" and then reboot device.
For more information check http://forum.xda-developers.com/showthread.php?t=2391169
I hope you can help, Thanks.
-------------------------------
TWRP works great with both the last 2 options so i need to some how create a bootable recovery img based on TWRP but i don't have a clue about kernel development... Could i maybe replace ramdisk with existing bootable recovery or something?
-------------------------------
So to put it simply, I need to switch out CWM on this recovery.img and put TWRP on it (The reasons for this are complicated to explain but i would be extremely thankful if any one could help and credit will be giviven)
So please can any one help me Thanks.
Sorry I didn't reply to your final PM as I said due to real life and limited time I cannot do it for you, But happy to help assisting you if needed. Championswimmer has a tutuorial on what to change in the device tree for TWRP. Search function is down ATM so I can't link you to the thread.
wedgess said:
Sorry I didn't reply to your final PM as I said due to real life and limited time I cannot do it for you, But happy to help assisting you if needed. Championswimmer has a tutuorial on what to change in the device tree for TWRP. Search function is down ATM so I can't link you to the thread.
Click to expand...
Click to collapse
Yeah no worries, Decided to ask any one else, As i really don't have the time to do this aswell as all the other stuff im doing. And it will take some one with experience a lot less time.
I tried switching out the /sbin folder but it didn't work and i didn't expect it to
I am hoping to find some 1 with a linux enviroment all sorted as i don't have a clue when it comes to kernels. surely there is a simple way to switch out a prebuiilt CWM Recovery with a TWRP recovery? Do you know what files TWRP and CWM use?
Thanks.
Altenatively any ideas on what needs to be changed to boot it to recovery always? if so i could modify a existing TWRP kernel (yours for example) and then force it to recovery.
EDIT
I assume you meant this guide?
PORT TO STOCK/ICS/YOU-FAVOURITE-KERNEL
A boot.img consists of the kernel image and the ramdisk (additionally and optionally RPM.bin and commandline). If you want to use TWRP for some other kernel, you have to do this
1. decompile this boot.img (for 2011 models it's a true boot.img, for 2012 models, it's actually a kernel.elf file renamed to boot.img, so you have to decompile accourdingly. you can use my kernel kitchen to do the same)
2. replace the kernel zImage with the one from the kernel you want to port to
3. replace /sbin/ramdisk.cpio with the "UNCOMPRESSED" ramdisk of the kernel you want to port this to. (usually ramdisk is compressed with gzip i.e. ramdisk.cpio.gz. you need to uncompressed ramdisk image i.e. ramdisk.cpio)
4. do not touch anyother thing
5. pack it up into a boot.img (for 2011) or kernel.elf (for 2012) and fastboot it
@wedgess ok so i got it working it now auto boots to TWRP but ADB isn't working, Any ideas?
Thanks so much i got it all working that guide helped
I am curious of what you are trying to do...
As i understand you want:
-flash (only) twrp recovery in fastboot mode
-reboot to recovery and flash rom from pc (adb sideload maybe?)
-reboot to fastboot again to flash kernel
-reboot
If i understand correctly you want to flash ROM (and kernel) from PC side, not dong it from phone?
Bakisha said:
I am curious of what you are trying to do...
As i understand you want:
-flash (only) twrp recovery in fastboot mode
-reboot to recovery and flash rom from pc (adb sideload maybe?)
-reboot to fastboot again to flash kernel
-reboot
If i understand correctly you want to flash ROM (and kernel) from PC side, not dong it from phone?
Click to expand...
Click to collapse
ok this is what happens
1. Download rom and kernel from my kitchen via helper application on windows
2. verifiy md5's
3. fastboot fllash new kernel
4. fastboot boot "recovery.img"
5. once in the new bootable recovery i created/edited, send adb command "adb shell" > recovery --update_package=ROM
6. wait for rom to install, reboot
7. DONE! new rom and kernel flashed
All done automagically and without any user interaction other than picking the rom.
Check post 1 and 2 for more info - http://forum.xda-developers.com/showthread.php?p=46111684
fma965 said:
ok this is what happens
1. Download rom and kernel from my kitchen via helper application on windows
2. verifiy md5's
3. fastboot fllash new kernel
4. fastboot boot "recovery.img"
5. once in the new bootable recovery i created/edited, send adb command "adb shell" > recovery --update_package=ROM
6. wait for rom to install, reboot
7. DONE! new rom and kernel flashed
All done automagically and without any user interaction other than picking the rom.
Check post 1 and 2 for more info - http://forum.xda-developers.com/showthread.php?p=46111684
Click to expand...
Click to collapse
One word: WOW :good:
Not just you have ideas what you can do, but knowledge to do it. You have my respect man :highfive:
i'll check that app ASAP
Bakisha said:
One word: WOW :good:
Not just you have ideas what you can do, but knowledge to do it. You have my respect man :highfive:
i'll check that app ASAP
Click to expand...
Click to collapse
Thanks current released version is quite buggy but new version coming soon
Any way since this problem is now solved, I will close the thread. if you want to discuss this then post on my kitchen thread or pm me

Recovery create for htc Desire 500 One sim(z4u)

I have tried to create recovery from scratch by this action sequence in CM11 sources:
make otatools
build/tools/device/mkvendor.sh htc z4u recovery.img
source build/envsetup.sh
lunch cm_z4u-eng
fixes in device/htc/z4u/BoardConfig.mk (define cpu model and change partition sizes)
. build/tools/device/makerecoveries.sh cm_z4u-eng
fastboot recovery out/target/product/z4u/recovery.img
i have tried to use as recovery.img both images: boot.img and recovery.img from [Root]HTC Desire 500.
But without success - resulted recovery not booted and after select recovery in bootmenu - only several seconds showed message "entering recovery" after that turn off screen and several times blinked.
Also i tried to use rebuilt kernel from source (used source from HTCdev site + config from /proc/config.gz) with same result. May be i used wrong config?
Resulted BoardConfig.mk you can check there.
Do you have some suggestion what i do wrong or what instruction have used for create CWMRecovery_D500_Philz.img recovery?
Could you help with such problem?
are there news? the philz is bugged!!!!
I have rebuilt recovery from cm 10.1 with config from 10.1 branch in "0lvin/htc_z4u" repository on github.
This build have issues with output: when selected 'odd' row in menu - image on screen moved to several pixels left, but generally recovery looks as usable. :fingers-crossed:
Update for recovery:
* fixed bug with frame buffer(moving left/right on odd row).
* fixed boot for cm 11.0 version - now it is booted without any visible problem to recovery build from 11.0 cyanogenmod branch.
* fixed compilation warnings that block compilation.
For build need make copy of local_manifests/local_manifest.xml to /.repo/local_manifests/local_manifest.xml

Custom Kernels for MIUI

Hi,
Just wanted to know, are there any custom Kernels for MIUI ?
I can see there are now some custom roms but couldn't find any custom kernels, specifically any that work with MIUI ?
Thanks
I haven't seen any. I'm not sure there's any freestanding kernel for any ROM atm. From my experience, it is not trivial getting a working one for this phone (but I'm not really a phone dev, so YMMV).
If anyone tries building and booting a kernel for this phone, here are some things I've discovered on my own:
1) DTBO
a) official dtbo + non-official kernel = brick and requires SPFT
b) lineage dtbo + official kernel doesn't work (can't remember if it bricks or not)
c) lineage dtbo + custom kernels = ok
I've tried building a device tree manually, including the voodoo public key appends from HyperTeam's tree, but couldn't get one working.
It should be noted that any kind of broken dtbo results in a brick. Which seems weird, because fastboot should be implemented in lk...
2) Boot image
a) When building the image from the kernel, the offsets must be set correctly, especially kernel + ramdisk. For me this is complicated by a bug in the mkbootimg binary which needs a ramdisk with non-zero size to accept the offset.
b) The image must be signed with avbtool. Interestingly, partition name and size don't matter too much.
3) Charging light
When keeping the phone connected by usb, the charging/notification light is on while the phone is in preloader & lk. When the kernel boots successfully, it gets turned off. Checked it by comparing with pstore logs.
Also, there are some proprietary bits in the vendor partition interacting with some interfaces in the kernel which resulted in kernel oopses for me when trying to boot lineage (I'm seeing some page fault in nl80211_vendor_cmd). I'm expecting MIUI to be even worse.

Categories

Resources