Hi all,
I am trying to make sense of how the android system is made up w.r.t to boot/kernel.
I have been looking at the .img files in the build (I built for the "passion" device), and have been googling around to find some more information about the various .img files.
I ran into a nice HOWTO in android-dls.com 's WIKI, titled HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images (I'm sorry, I'm a new user so XDA won't allow me to post links. I will try to modify my post a soon as I'm granted permission for that)
but I am afraid it is a little outdated:
I have several questions, but I will try to be brief, so I'll focus on
one of them, and if that works I'll proceed to the next questions, all related to "Android bringup for dummy embedded linux kernel experts".
I am fairly aware of differences between different linux
configurations, and I am very familiar with linux bringup concepts, so I will just use common examples from the linux world as my terminology. Hope it will be clear enough.
I understood that boot.img a combination of a kernel (e.g. bzImage in linux) and an initial ramdisk (e.g. initrd.gz), wrapped by some header, as in common linux kernel loading practice (piggy.o etc.).
Now, the aforementioned HOWTO says that the "recovery" image is built on
the same way, and that it is stored on the target's /system/
recovery.img .
I would assume that this would be compound of the ramdisk-
recovery.img, and some other kernel.
Now, the problem is that:
1. This /system/recovery.img does not exist from what I saw (on my
Motorola XOOM tablet)
2. What does exist is /system/boot-from-recovery.p , which is
created during the boot process in obj/PACKAGING/
recovery_patch_intermediates/recovery_from_boot.p .
I saw tons of posts referring to the files, all said that "in order to
replace the rescue disk image, this file needs to be renamed" - but I
am looking for a way to figure out what it is, and how to extract its
contents.
I assume /system/recovery.img is deprecated, is that correct?
3. I did not see any flash devices in /proc/mtd (which is strange).
I searched for hours before sending this post, so I would appreciate
your help. I also posted a similar message at the google android-building group, but it has not been answered yet, and I got the impression that these forums are more active and can help me get where I need.
If it is not the right place to ask the question please let me know -
I just assume this is a general android concept and not device
specific.
Thanks,
Ron
I meant of course /system/recovery-from-boot.p , and not recovery-from.boot.p
-R
Hi,
I don't know if you managed to find out what "recovery-from-boot.p" is, since this is quite an old post, but I think I'll try to help anyway.
recovery.img is not deprecated at all. From my own experience, it looks like "recovery-from-boot.p" is a protection measure introduced in Gingerbread, but not the recovery itself. What it does is replacing any recovery currently installed on the phone with the default one on every boot.
I discovered it after flashing a custom recovery on my Android 2.3.4 phone. It worked, but just during the first boot. The next time I rebooted the phone, the default recovery image was there again. After browsing several sites, I found that "recovery-from-boot.p" is responsible for that.
So, if you flash a custom recovery image on a Gingerbread phone and want to keep it forever, you must delete this "recovery-from-boot.p" from /system, or at least rename it. That way, your new custom recovery will never get overwritten buy the default one, unless you do it yourself.
I hope this helps you and clarifies this question.
Well, it helped me. I'm new to rooting and just came across mention of this file. I am trying to learn 'why' as well as 'how'', so your post was informative.
Was going to ask a dumb question but I figured it out
i need to delet those files
bigrammy said:
Was going to ask a dumb question but I figured it out
Click to expand...
Click to collapse
Hello
can't delete those files >> i am rooted but every time i delete or rename it take permission then nothing happen >> how i can delete them plsssssssssssssssssssssssssssssssssssssss
recovery from boot p
ahmed morsy said:
Hello
can't delete those files >> i am rooted but every time i delete or rename it take permission then nothing happen >> how i can delete them plsssssssssssssssssssssssssssssssssssssss
Click to expand...
Click to collapse
Hey good day. Did you get your problem fixed...? I have an xt912 it has the same file. For days I've been trying to wipe the phone. Tryed rooting it. I tryed reprogramming it. And I got through with all of that. But everytime the phone boots up it goes back to the same state. Then I used a root browser and while exploring I saw this recovery from boot file. I need help. And I don't think I can downgrade the Motorola phones. Thanks in advance.
jman0 said:
Hi,
I don't know if you managed to find out what "recovery-from-boot.p" is, since this is quite an old post, but I think I'll try to help anyway.
recovery.img is not deprecated at all. From my own experience, it looks like "recovery-from-boot.p" is a protection measure introduced in Gingerbread, but not the recovery itself. What it does is replacing any recovery currently installed on the phone with the default one on every boot.
I discovered it after flashing a custom recovery on my Android 2.3.4 phone. It worked, but just during the first boot. The next time I rebooted the phone, the default recovery image was there again. After browsing several sites, I found that "recovery-from-boot.p" is responsible for that.
So, if you flash a custom recovery image on a Gingerbread phone and want to keep it forever, you must delete this "recovery-from-boot.p" from /system, or at least rename it. That way, your new custom recovery will never get overwritten buy the default one, unless you do it yourself.
I hope this helps you and clarifies this question.
Click to expand...
Click to collapse
i have deleted it . then flash recovery ,, but it failed .. it wont even now go to stock recovery itself.. any help..
Does recovery from boot has to do anything with ota update applying ? or it will cause issues in system update ?
I have recovery-from-boot.p in my system and i cant root my phone i cant change the recovery img ... Help?
I hadn't had to deal with this for some time, perhaps because I've updated my devices (Nexus 4, Nexus 5, Nexus 7 '13) with the factory images, with "-w" removed from flash-all, then flashing CWM's recovery, ensure SuperSU was installed, then continuing. Today, I used the new OTA image on my Hammerhead/N5, and recovery-from-boot.p seems to be up to its old tricks again.
Solution is simple.
Flash your alternate Recovery in fastboot, fastboot flash recovery [recovery image file] . Boot into Recovery. Apply/install root app (typically via sideload). Mount /system. adb shell mv /system/recovery-from-boot.p /system/recovery-from-boot.p.bak. Reboot. Done. (If you're unfamiliar with fastboot, adb, and flashing new recovery partitions, you have some reading to do. Commence RTFM.)
I also used to have to move /system/etc/install-recovery.sh but that seems to be gone in Marshmallow. :} Or moved...?
well, after following a guide I have extracted the system.img from a pure-nexus ROM(The ROM I'm currently using), now I can see that "recovery-from-boot.p" file is responsible for recovery lock in my phone. I'll keep it short and straight to the question
"Can I remove this file and rebuild the .dat file and flash it?, so that I won't have any other problems at all"
I want to know if recovery-from-boot.p file is linked to anything other than just locking the recovery or re-flashing it innumerable times.
To preface: History--I have some experience installing tenderloin mods for hp Touchpad. More currently, I spent 2 days reading about first, an SD Install for my nook HD+, and then an emmc install for same. I felt ready to go forward but did not prove a smooth process.
To date, I have verygreen's process executed with the following issues:
Failed gapps install...I believe.
Notification of processes being stopped, ie, clock.
Cannot log onto Play Store--"Authentication is required. You need to sign into your Google Account. Retry" Pressing Retry loops back to same message.
Oddness or unexpected results:
I expected all my apps and accounts to disappear with Rom install but all and perhaps more exist. My gmail app and account opens with emails from time before install but no new downloads since. Internet works as wi-fi connected fine.
Procedures that got me into this pickle:
1. Using Pretec 8GB Class 10 Micro SDHC, which btw my nook found fairly easily, I used the following sw to prep and populate it for install.
a. win32diskimager-v0.9-binary
b. sdcard-cwm-early9.img
which btw reduced my Micro sdhd partition to just the minimal size needed to perform the needed function w/o space for rom or gapps. Grrr
2. Downloaded cm-11-20140303-NIGHTLY-ovation to "download" folder inside nook...yes, I forgot both the cwm-recovery-ovation-6 and the gapps.
3. Began to install NIGHTLY and rebooted but as you probably expected it stopped at "nook".
4. Rechecked verygreen's procedure list with facepalm, tried to install forgotten files onto flash mem where there was no room(see above), rebooted into nook to download missing recovery file and pair of gapps files -- pa_gapps-modular-full-4.4.2-20140301-signed and pa_gapps-stock-4.4.2-20140301-signed
5. Install begun with boot to flash and then, yes then decided to use cwm to backup pre-existing rom. Tried to backup to /sdcard with following android reply:
SDCARD cwm-based recovery v6.0.4.6
SD Card space free: 6133MB
Backing up boot...
Backup of boot completed.
Backing up system...
Can't mount /system!
6. Perhaps a backup to emmc?
SD Card space free: 4495MB
Backing up boot...
Backup of boot completed
Backing up system...
Can't mount /system!
7. Oh...I'm not done (it was late).
Choose default backup format
tar (default) //why change something I don't understand?
Default backup format set to tar.
CAN'T SEEM TO SOLICIT A WAY TO BACK OUT OF HERE! Later I discover the power button as backout, but until then...
8. free unused backup data
Freeing space...
Done freeing space
Freeing space...
Done freeing space
Choose an image to restore first. The next menu will show you more options.
-2014-03-04.05.37.33/
Advanced Restore -----------Upon reflection, perhaps I shouldn't have proceeded
--Restore boot
--Restore system
--Restore data
--Restore cache
--Restore sd.ext <<== this one looks interesting
Backup & Restore
Yikes! Finally found power button
//Reboot and install of forgotten recovery file, then Rom. Rebooted, downloaded 2 gapps files(see above)
9. SDCARD CWM-based recovery v6.0.4.6
--Couldn't open directory
--Couldn't open directory
No files found.
--Installing: /emmc/0/download/pa_gapps-modular-full-4.4.2-20140301-signed.zip
Finding update package...
Opening update package...
E: Can't open /int-data/media/0/download/pre_gapps-modular-full-4.4.2-20140301-signed.zip
(bad)
Installation aborted //Why? File truncated at about 7KB due to bad download
10. Not to be deterred, another download.
SDCARD cwm-based recovery v6.0.4.6
No files found
...Installing: /emmc/0/download/pa_gapps-modular...etc
Finding update package...
Opening update package...
Installing update...
################
//Graphics display
################
PA GApps Full Modular 4.4.2 20140301
Mounting system...
file_getprop: failed to stat "/system/build.prop": No such file or directory
E: Error in /int-data/media/;0/download/pa_gapps-modular-full-4.4.2-20140301-signed.zip
Installation aborted
I guess what I am hoping for is a forensics examination(but not in depth). I hope the excessive detail can be skimmed for a quick assessment of my nook's status. IOW, is there a simple fix. Should and can I start all over?
Thanks for whatever help is offered.
I have to admit that I didn't expect a response to this post.
I had begun researching a Rom installation for my nook days before my actual attempt but had neglected to open an account where I discovered the 10-post rule. Had I known I would not have been allowed to post into the forum I had studied to make that install I don't think I would have attempted it until much later. Now I am left to post a specific and detailed account into a general topic Q & A forum without any chance to attract a person familiar with a nook HD+ ROM installation. No problem...I'll just get started on learning how to program for Android and installation of Roms and how they are...designed and all the rest.
Solved
bupkus said:
I have to admit that I didn't expect a response to this post.
I had begun researching a Rom installation for my nook days before my actual attempt but had neglected to open an account where I discovered the 10-post rule. Had I known I would not have been allowed to post into the forum I had studied to make that install I don't think I would have attempted it until much later. Now I am left to post a specific and detailed account into a general topic Q & A forum without any chance to attract a person familiar with a nook HD+ ROM installation. No problem...I'll just get started on learning how to program for Android and installation of Roms and how they are...designed and all the rest.
Click to expand...
Click to collapse
Solved:
While lurking around I found this post about rebooting into recovery without using the microSDHC card used during the original install of a CM ROM.
From there I installed the gapps successfully.
Very happy with the way my nook performs now.
Edit: SOLVED
Hoping someone can roughly point me in the right direction. I'm not very savvy in flashing new ROM's, but I had success with my phone recently, so I decided to try and update my tablet and it's not going so well. It's a Samsung Galaxy Tab 10.1, model GT-P7510MA, which I believe is wifi only. I started off by following the youtube tutorial: 0eAQzxwEVjY
I did *not* make a backup, so shame on me right off the bat, but at least now I've learned this lesson.
There is no OS, but TWRP v2.2.0 is installed and I'm able to boot into it just fine. I'm able to transfer/push files via command line on my windows machine, but I did find something that seemed odd, which is that the top level directory is not named "/sdcard", instead it's just "/". When I transfer files, I have to name the the path "/" for them to show up in the top level directory. If I use "/sdcard", it looks like they upload, but I have no idea where they go. Not sure if there's any significance there, but figured I'd mention it.
The problem is that I can't seem to install any OS. I've tried Nameless 4.4.4, Clockworkmod 10.1, and AOSP 6.0. They all fail the same way, I'll type out what it says below:
--Install /aosp-6.0-p4-20151211.zip ...
Finding update package...
E:unknown volume for path [/aosp-6.0-p4-20151211.zip]
E:Can't mount '/aosp-6.0-p4-20151211.zip'
* Verifying filesystems...
* Verifying partition sizes
Error flashing zip '/aosp-6.0-p4-20151211.zip'
Another strange thing is that when I tried the aosp-6.0-p4wifi, it said that this device was a p4, which I don't think is correct, but that's why I tried the p4 version. It errors just the same. I've also tried to update TWRP, but I'm not sure you can update TWRP from within TWRP? I've tried using the file "twrp-2.8.7.-picassowifi.zip" and it errors the same as the OS'.
Edit: It's been sitting here powered on for a bit and then went to the blue teamwin screen and would flash off every five seconds or so. I figured this was maybe a screensaver? Next it powered off and on restart, all the files I've uploaded are no longer visible.
Any guidance is much appreciated.
Final edit: Kind of embarrassing...all I needed to do to find the /sdcard directory was just scroll down a little through the folders on the left (I thought it was supopsed to be the top directory). I'm pretty sure the 7510 is a wifi only version, but for some reason, none of the wifi ROM's I've tried will work. It gives an error and says my device is a p4 and not a p4wifi. Anyway, neither of the wifi/p4 Marshmallow ROM's will work, but all I had to do was wipe cache/delvic/system (I did do this several times) and factory reset (had not done this before) and install Cyanogenmod for p4 with the recommended Google Apps and all is working well.
I am having a lot of trouble restoring my GSM Galaxy Nexus to it's former glory. I installed CM12 and CWM recovery earlier but CM12 suddenly stopped working. My phone started rebooting over and over so I decided it was to time to flash the stock ROM. I flashed the stock ROM with WugFresh's root toolkit. And it worked fine besides the fact that writing the system.img took 30 mins, which is very unusual. I rebooted my device and CM12 showed up again... ?!. I tried flashing it by hand with ADB but no luck either. CM12 was still there. I've been busy 3 days now and suddenly realised that CM12 created new root folders after a factory reset which I did multiple times. So for example, my sdcard contains one root with a folder, named "0", that contains the files om my phone before the factory reset. The problem is that this folders contains the system and CM12 ROM too. So I have like four '0' folders, and the 'deepest' one contains the system and ROM. Assuming that if you flash a stock ROM, it will install in the root of my SD-card, but doesn't boot because it didn't overwrite the CM12 ROM in the deepest '0' directory [IMG]. If only CM12 was working, I could manualy delete all the unneccesary '0' folders... I really have no idea how to continue from now on and I really need your help :fingers-crossed:
Edit: I tried: adb shell rm -r /sdcard/0 and it is gone but if I reboot Recovery and look into my folders everything is there again...
epilogue:
- Maybe the fact that sytem.img took 30 minutes to write has something to do with all those '0' folders [IMG]
- I tried flashing multiple recovery's to my device but they only show up if I open them via ADB. Ohterwise CWMR shows up again because that one is actually installed in the 'correct' (read:incorrect) folder.
- With Skipsoft roolkit I actually received an error while writing userdata.img. It said: remote: write fail. I thought this was due the multiple installation folders and the toolkit not knowing where to place/flash the rom.
So I need to remove all the 0 folders and place the OS back in the sdcard's root, or I have to somehow tell android to place the stock rom in the same directory as CM12, or I need to somehow wipe the complete sdcard so I can install a new recovery and flash the stock rom... I have no idea how however.
Thanks in advance!:good:
As I understand, my situation is fairly specific, and so I need to address a few points:
This is my first time rooting a phone- I've made several mistakes but managed, at this point, to avoid bricking my phone
I'm using a Nexus 5, and flashing the pwnphone system (Android Open Pwn Project)
I've followed all the standard steps (except one... see below) for unlocking, rooting, and using TWRP as my recovery
I've also successfully flashed AOPP once, although I made an error I couldn't fix during setup and needed to reinstall
To my stupidity, I forgot to make a Nandroid backup on both attempts
I've just used TWRP to wipe my phone's Dalvik/ART Cache, system, data, and cache, assuming I could reflash the same zip I used before
MD5 check is disabled
Zip validation is disabled
Okay, so let's get down to the heart of the issue now. My phone is sitting here, plugged into my computer, I have a command prompt running, and adb is working properly. I try to flash THE SAME ZIP file I used, just before, to start from a clean slate AOPP install, and now I'm recieving an Error: 7.
I looked up the fixes for this, and ran into a problem: I'm already using the most recent version of TWRP- and I just made an alternate AOPP.zip where I removed the asserts from /META-INF/com/google/android/update-script. I was hoping this would solve my problem, but it didn't.
Now, instead of getting an Error: 7, I'm getting an "invalid zip format" notice with very little other information.
Installing zip file '/sdcard/aoppfix.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
Invalid zip file format!
Error installing zip file '/sdcard/aoppfix.zip'
Updating partition details...
...done
Click to expand...
Click to collapse
I have no idea what to do at this point. In my earlier error, I failed to make a Nandroid backup file- and much to my dismay- I can't even find one someone has uploaded elsewhere which I could use to at least have a functioning phone to to boot into.
Can someone please help figure out what my next course of action is?
Hi and welcome to XDA Assist !
I`ve searching and I couldn`t find that rom on the Nexus 5 development forums so it`s hard to figure out what`s the problem
Your attempts to modify that script are courageous but I`m afraid that is more than a script issue
Try to flash a different rom with xda support and you`ll get more info and help , good luck !