I've been researching methods to boot another linux kernel from the android bootloader by first booting into the bootloader and then using a command similar to what fastboot uses to boot a temporary zImage.
hxxp://groups.google.com/group/android-kernel/browse_thread/thread/71a7cb1c35933a21
NOTE: replace the xx with tt
From my thread on the android Linux kernel group, it seems I can find more information on the recovery program here.
1. What exactly is the recovery program?
2. How does it function?
3. where do I find modified code for it?
(PS: I had originally posted this on questions and answers but this forum is better suited)
Cheers,
Earlence
anyone have any ideas?
atleast where can I get information on what code is in the recovery partition and how was it replaced to unlock these types of phones?
Honestly it seems to be a one kernel only situation for these devices. I understand what you are referring to. Much like desktop systems where you have a distro of Linux installed and you can choose different kernels to boot with. Unfortunately I don't believe any device right now has a bootloader that is capable of having multiple kernels installed with the option to boot from each one. Unless GRUB or LILO make it on to our devices I don't see this happening anytime in the near future.
Related
Hello wonderful people of XDA! This is my first post, so I apologize in advance if I am asking obvious questions.
So everyone is talking about the "locked" bootloaders present on several of the new Droid phones, including my beloved new D2G. This has been cited as the reason that the bootloader, recovery menu, and android kernel on these phones cannot be replaced with unofficial code. I was wondering if anyone here knew the exact technical details of the security systems that actually make up this so called "lock".
One thread I read vaguely mentioned RSA keys, so I can only assume that something somewhere is signed. Is it the typical setup, with a bootloader that is signed with a key that is burned into the CPU, and a kernel that is signed with a key in the bootloader? Clearly the code on the /system partition is not signed, since I was able flash a custom ROM over it (not to mention install the bootstrap recovery).
Also, how much control does a root process really have? If it is possible to inject root code into the boot process just by modifying some things in init.rc (as the bootstrap recovery does), then shouldn't it be possible to manually load whatever we want into memory after that point, including a new kernel? If so, then couldn't we leave the (presumably) signed stock kernel in place, put our kernel in /system, and write some root code that copies it into memory and executes it (without checking any sigs)?
Forgive me if I have no idea what I am talking about. Like I said, I am new to the forum, and I just got my first Android phone a few months ago.
Thanks!
A guy by the name of Matthew Veety (aliasxerog on droidforums) is working on a kexec module to reboot a custom kernel after all the security checks. He has gotten it to boot, however, most of the hardware doesn't function as he needs drivers built for the new kernel. For now the project is focused on the DX, but they have mentioned the D2G as a "planned project."
More info at freemymoto.com
buryboi said:
A guy by the name of Matthew Veety (aliasxerog on droidforums) is working on a kexec module to reboot a custom kernel after all the security checks. He has gotten it to boot, however, most of the hardware doesn't function as he needs drivers built for the new kernel. For now the project is focused on the DX, but they have mentioned the D2G as a "planned project."
More info at freemymoto.com
Click to expand...
Click to collapse
Thanks for the info! I checked out that site and PMed the guy you mentioned on Droid Forums. We'll see if there is something I can do to help.
Any extra info anyone has is still appreciated!
Hi,
Punmaster did you find any more information concerning the locked bootloader. Any ideas to put another kernel?
If i understand well, the roms can only modify the application layer.
You seem to know linux dev, maybe you can help me with the usbnet problem?
Sent from my MotoA953 using XDA App
Hi Folks,
I already spent some years in customizing Linux kernels and in the last time I was already playing around with Android devices and the possibility they offer to boot customized kernel. Now, thanks to NoThrill, we have a working CWM and my interest rises again. I already compiled the Acer Kernel Sources but I got into trouble booting it. Few months ago, I did the same with a lenovo IdeaPad a1 and it should be possible on the A510 too to boot an outside kernel using the command fastboot boot kernel ramdisk.gz. Problem is, that it does download and boot the kernel - but then it returns to fastboot mode instead of booting android. First I thought, it may be due to kernel errors but it does the same if I am using the stock kernel or the boot.img provided by working ROMs. So my questions are:
Is there any possibility to test an experimental kernel without flashing it first? Do I understand correctly, that it is relatively safe to flash it to the boot partition as long as recovery keeps untouched?
What exactly does the (unexplained) command fastboot continue? I thought it may be used to continue booting process with a downloaded kernel, but unfortunately it seems like it does just the same like a normal reboot ...
Simply pack the kernel into a boot.img and flash it to the /boot partition. If something goes wrong, simply reboot into recovery and flash your original boot.img back. Recovery will always work because it uses its own kernel and therefor is independent of whatever kernel you flash to /boot.
A word of warning though: The Acer kernelsource contains code that could brick your tablet. That needs to be fixed before you experiment any further.
Nevertheless, any work done on the A510 kernel is always encouraged :good:
NoThrills said:
Simply pack the kernel into a boot.img and flash it to the /boot partition. If something goes wrong, simply reboot into recovery and flash your original boot.img back. Recovery will always work because it uses its own kernel and therefor is independent of whatever kernel you flash to /boot.
A word of warning though: The Acer kernelsource contains code that could brick your tablet. That needs to be fixed before you experiment any further.
Nevertheless, any work done on the A510 kernel is always encouraged :good:
Click to expand...
Click to collapse
by the way, nothrills, did you set-up a git or something like that to share kernel mods and stuff like that ?
BENETNATH said:
by the way, nothrills, did you set-up a git or something like that to share kernel mods and stuff like that ?
Click to expand...
Click to collapse
Actually, no, because (call me stupid) I really have no clue how git works. I know how to get stuff from it, and used it alot, but never looked into actually setting something up or submitting patches.
I am very ashamed
NoThrills said:
Actually, no, because (call me stupid) I really have no clue how git works. I know how to get stuff from it, and used it alot, but never looked into actually setting something up or submitting patches.
I am very ashamed
Click to expand...
Click to collapse
THAT is something really easy you know..
but if it's something that you agree, i can upload it to my git if you don't want to use time for that.
i can clearly state about the source and then.. work can be shared and commit done.
otherwise, yu have to set-up a free account and follow this :
https://help.github.com/articles/create-a-repo
it would REALLY help you know
I hope there are some devs looking through this part of the forum.
This is NOT a request thread, I merely need some pointers as to questions I have about development so I can experiment on my own and hopefully attain results which are to some degree helpful to the community.
1) The sony stock firmwares come in these weird .sin formats, does this mean the device partitions work differently on Xperias than they do on other devices or does this stand in the way when reading general guides on e.g. cyanogenmod about flashing a certain partition?
2) The bootloader on this device acts differently than the one on my nexus 7, as in, in a weird way. I gather this is because sony made it themselves and to their liking to add flashmode.
2a) Is it normal that I can use fastboot to flash a kernel, but not use "fastboot boot boot.img" to boot e.g. extended stock temporarily? My device then hangs on the black-screen-blue-light standard fastboot look, but it doesn't power off when removing the USB cable and I have to pull out the battery. Flashing works though.
2b) Is "Flashmode" necessary for anything? Does it do anything else then allow for ftf's to be flashed, thus not having much to do with custom rom development?
2c) also, on original stock kernel, is it normal that the only way to get into recovery I have found up until now is using the Quickboot app? Using a recovery keycombo or trying from fastboot or adb does nothing, sometimes even hanging the device, so taking out the battery is necessary again...
3) How do you guys make booting images out of a compiled kernel? I can compile a kernel just fine, but I don't really figure what to do with the zImage file other than "packing it somehow". Been searching around on google for this, but I can't find any working ways to pack anything, and I don't even know where to get a ramdisk or how to make one.
4) On that note, I have been trying to figure out compiling CM, by forking some repos of taoshan and sony common, but I don't really know how for these are in correctness. Are there specific repos with the taoshan board configuration that are being worked on right now that I should/could fork to figure stuff out myself? I don't know how this forking is looked upon, if it is regarded as stealing someone's code or something, any insights about that might also be helpful.
That's what I can form off of the top of my head. I hope I get some insights from you guys at least. I have been trying and breaking my device for a week now, wishing to get something working of my own, but to no real avail
All the best.
MajorMonodon
MajorMonodon said:
I hope there are some devs looking through this part of the forum.
This is NOT a request thread, I merely need some pointers as to questions I have about development so I can experiment on my own and hopefully attain results which are to some degree helpful to the community.
1) The sony stock firmwares come in these weird .sin formats, does this mean the device partitions work differently on Xperias than they do on other devices or does this stand in the way when reading general guides on e.g. cyanogenmod about flashing a certain partition?
2) The bootloader on this device acts differently than the one on my nexus 7, as in, in a weird way. I gather this is because sony made it themselves and to their liking to add flashmode.
2a) Is it normal that I can use fastboot to flash a kernel, but not use "fastboot boot boot.img" to boot e.g. extended stock temporarily? My device then hangs on the black-screen-blue-light standard fastboot look, but it doesn't power off when removing the USB cable and I have to pull out the battery. Flashing works though.
2b) Is "Flashmode" necessary for anything? Does it do anything else then allow for ftf's to be flashed, thus not having much to do with custom rom development?
2c) also, on original stock kernel, is it normal that the only way to get into recovery I have found up until now is using the Quickboot app? Using a recovery keycombo or trying from fastboot or adb does nothing, sometimes even hanging the device, so taking out the battery is necessary again...
3) How do you guys make booting images out of a compiled kernel? I can compile a kernel just fine, but I don't really figure what to do with the zImage file other than "packing it somehow". Been searching around on google for this, but I can't find any working ways to pack anything, and I don't even know where to get a ramdisk or how to make one.
4) On that note, I have been trying to figure out compiling CM, by forking some repos of taoshan and sony common, but I don't really know how for these are in correctness. Are there specific repos with the taoshan board configuration that are being worked on right now that I should/could fork to figure stuff out myself? I don't know how this forking is looked upon, if it is regarded as stealing someone's code or something, any insights about that might also be helpful.
That's what I can form off of the top of my head. I hope I get some insights from you guys at least. I have been trying and breaking my device for a week now, wishing to get something working of my own, but to no real avail
All the best.
MajorMonodon
Click to expand...
Click to collapse
1) Not at all. Just extract .sin using flashtool and then mount the dumped .ext4 as a regular filesystem.
Xperia devices have all partitions except /recovery.
2) I can't answer your question because I didn't have any non Sony android device before.
2a) Sony bootloader doesn't allow hotbooting kernels.
2b) You can cherrypick components of firmware like baseband, kernel, system etc and flash through flashmode. Really handy!
2c) As I mentioned before, Xperia devices don't have /recovery. So any attempt to boot recovery partition is futile.
Another way round, is to load recovery.cpio as an initrd during boot by keymaps.
3) use mkbootimg. Check my git for more info.
Randisk can be obtained by extracting stock kernel.
4) maybe a cm developer can help you regarding this.
Rachit Rawat said:
1) Not at all. Just extract .sin using flashtool and then mount the dumped .ext4 as a regular filesystem.
Xperia devices have all partitions except /recovery.
2) I can't answer your question because I didn't have any non Sony android device before.
2a) Sony bootloader doesn't allow hotbooting kernels.
2b) You can cherrypick components of firmware like baseband, kernel, system etc and flash through flashmode. Really handy!
2c) As I mentioned before, Xperia devices don't have /recovery. So any attempt to boot recovery partition is futile.
Another way round, is to load recovery.cpio as an initrd during boot by keymaps.
3) use mkbootimg. Check my git for more info.
Randisk can be obtained by extracting stock kernel.
4) maybe a cm developer can help you regarding this.
Click to expand...
Click to collapse
Rachit,
Thanks a lot for the answers! This really gives me a boost, because sometimes when stuff doesn't work I'm ready to just give up!
I'll take a look at and fork your kernel repo if that is okay with you, to take a look at how you do things.
If I have an occasional question later on, would you mind me contacting you in some way, like pm?
Thanks again
(a very happy) MajorMonodon
MajorMonodon said:
Rachit,
Thanks a lot for the answers! This really gives me a boost, because sometimes when stuff doesn't work I'm ready to just give up!
I'll take a look at and fork your kernel repo if that is okay with you, to take a look at how you do things.
If I have an occasional question later on, would you mind me contacting you in some way, like pm?
Thanks again
(a very happy) MajorMonodon
Click to expand...
Click to collapse
Sure. You can do whatever you want with my sources.
Atm I think one is broken because I kinda messed it up while patching wcnss.
Better you start with stock and patch it with commits I've done. If you don't understand what the patch is all about, hit me anytime via pm. I don't browse forums frequently.
:thumbup:
Rachit Rawat said:
Sure. You can do whatever you want with my sources.
Atm I think one is broken because I kinda messed it up while patching wcnss.
Better you start with stock and patch it with commits I've done. If you don't understand what the patch is all about, hit me anytime via pm. I don't browse forums frequently.
:thumbup:
Click to expand...
Click to collapse
Thanks Rachit, I'll do that!
All the best
Hey guys,
I was looking for a tutorial and a description about what is a recovery.img and if there is always the need to root any Android or Smartphone (even if it comes with Ubuntu mobile OS) to install a custom ROM.
My second question is about the Super User Apps:
I always see tutorials in which, after flashing the recovery.img they say we need to install a, i.e., CWM_SuperSU_xxx.zip. I do not know why to do that if I have my phone rooted and all I need to do is to boot it and go to the Play Store and install the latest SuperSU app by ChainFire, i.e.
All these questions have a single porpuse: To know what I am doing, because I do not like to perform tasks as an robot. I have a brain that loves to know and learn and be aware of what its doing.
Thank you very much for your help. Maybe you could point me to the documents I need to read to now all these questions.
By the way:
I rooted a year ago my HTC One-V and installed a Custom ROM before and It was working perfect until somebody stolen it from me.
My device now is a Samsung Galaxy GT-i9300. I am from PerĂº, and my Service Provider is Claro.
I use Ubuntu 14.04 and 12.04 and I have installed Heindall from the Ubuntu repositories. Until now I just read tutorials of how to root my phone, but I do not want to perform tasks without knowing what are them for.
So I want to wait before rooting my GT-i9300 until I know what I am really doing with my phone.
Thank you in advance!
Regarding Rooting, Please see [Q] What is rooting? Particularly #7
When it comes to Recovery, See XDA Wiki. Also See XDA University for Android Flashing Guide.
If your Device comes with Linux, then you should not use Android Rooting programs unless advised to do so. Weather Device Recovery works with Linux or not depends on Case by case basis.
In case of additional questions, please post in Android General
My device is a very popular one, a GS3 GT-i9300. It is an Android phone.
My PC, where I am going to connect my phone to root it that has Ubuntu Linux 14.04 and 12.04 installed.
Maybe you miss understood what I wrote.
Mauricio Mora
So if I want to use CWM Recovery, then I can look for the latest version? Or there is a special version for my phone. Afaik it is exactly like my PC when I install a dual boot with Windows. The bootloader (maybe Grub2) is like the Samnsung bootloader and Recovery and my Android are like Ubuntu and Windows dual booting. Is that right?
And hence I do not need a special CWM Recovery for my phone, it should be a simple recovery.img installer but versions differs in features and installed programs. Is that correct? And I just can look for the latest one.
Mauricio Mora
Thank you very much @Perseus71
Your links are very useful for my purpose.
Mauricio Mora
So...
In simple words, it is like my PC.
I inicially have a single OS, Android. Maybe a Recovery but installed by the manufacturer.
Then if I install a Custom Recovery, it is like creating a dual boot: Android and Recovery.
Then if I install a ROM it is like removing a Linux distribution in my PC and installing a new one.
Recovery gives me some tools like backup my personal settings and data and even my apps.
In those terms, there should be ways to install dual boot Android and Ubuntu Touch? Or which ever ROMs in dual boot?
Mauricio Mora
If you want to install CWM, please visit [RECOVERY] ClockworkMod Touch 6.0.3.2 for GT-I9300
Mind you that is for GSM Phone only.
Yes Bootloader = Grub but Linux/ubuntu do not have a concept of Recovery in traditional android sense. In that wany Grub does do the job of a recovery. You may want to google for "What is Android Recovery ?"
If you still have continued questions, please post them in Galaxy S III General forum.
The mission and purpose of XDA Assist is
The mission of XDA Assist is to provide basic help to those who have tried searching but can't find what they are looking for and need assistance. This is not a "helpdesk" providing technical assistance but more to point you in the correct direction with your problem. Perhaps you can't find posts on how to root your phone, install custom recovery or maybe you have questions about how to navigate and use features on the site.
Click to expand...
Click to collapse
Mine is GSM, @Perseus71.
Thank you very much again!
Mauricio Mora
Hello, I just got a new phone. It's probably my first actual phone in many years, as I'm mostly a PC kind of guy. I have been having trouble getting it booted for a while now. Someone informed me that it might be an Axia phone from AT&T, but I don't know the validity of that. It says Q-Innovations every time I use it on Google stuff. Does anyone here know of the phone or know how to boot one?
Thanks a lot in advance!
CamShirayuki said:
Hello, I just got a new phone. It's probably my first actual phone in many years, as I'm mostly a PC kind of guy. I have been having trouble getting it booted for a while now. Someone informed me that it might be an Axia phone from AT&T, but I don't know the validity of that. It says Q-Innovations every time I use it on Google stuff. Does anyone here know of the phone or know how to boot one?
Thanks a lot in advance!
Click to expand...
Click to collapse
The model number seems to be the AT&T version of that phone.
When you say that you can't get it booted, what do you mean exactly? What is the device doing when you try to boot it?
Have you tried holding volume up+power(let go when you see the splash screen) to boot into recovery, then factory reset and wipe cache partition?
Some devices have to hold volume down+power, then at the bootloader menu, choose the recovery option.
Sent from my LGL84VL using Tapatalk
What do you mean? I didn't think it was that easy to boot a phone? I wanted to put Linux on my phone instead of the current android version or even put them both on there.
CamShirayuki said:
What do you mean? I didn't think it was that easy to boot a phone? I wanted to put Linux on my phone instead of the current android version or even put them both on there.
Click to expand...
Click to collapse
I think you need to do some research to get familiar with how android devices actually work. Android devices are not like PC, you can't just install whatever OS you want, android devices are not "generic" like that. Operating systems for android devices have to be built specifically based on the hardware in the device, down to the kernel level, the kernel has to be specific to the device. You need to do some reading about how android stock recovery and custom recovery actually work , you also need to research how android stock firmware and custom operating systems are flashed on android devices.
It is "possible" to remove android and install Linux on an android device, but only certain devices can do it, depending on the security built-in to the bootloader that is installed on the device. There isn't a universal way to install Linux on android.
It is also possible to install Linux on top of android in a sort of emulator/VM then use a VNC to .
There are some apps to install linux on top of android, such as:
1) Linux Deploy
2) Complete Linux installer
3) UserLAnd
I installed and tested UserLAnd last night. Try this and see what you think.
https://github.com/CypherpunkArmory/UserLAnd
View the README.md for instuctions to set it up.
Sent from my LGL84VL using Tapatalk