[Q] Rooted, booting, no recovery. - Eee Pad Transformer General

My asus transformer tf101 is rooted, booting akop second latest just great.
Something broke recovery though. If I try and boot into recovery I get the EEPad logo and nothing else, it just sits there. I let it sit for 9 hours, no change.
If I hit power off -> reboot -> recovery and let it boot, it sits there. If I shut it down, boot it with volume down pressed and let it go into recovery (either automatic or volume up) it hangs also. If I tell it to boot, it's just fine though. I would like to upgrade my image, or even try changing to CM9 but I can't get into recovery to install a different image...
How do I re-install/fix recovery?

Use the recoveryinstaller app here: http://forum.xda-developers.com/showthread.php?t=1346180&highlight=recovery+installer you should still have root access on AOKP.

Recovery Installer
Did that too. Did that just now again. No change. EEE Pad just staring at me.

Then there's probably a problem with your bootloader, see my splash screen guide here, part of it involves unpacking the blob from official OTA's. You want to download the latest OTA from ASUS for Your Region. unzip it twice and there should be a file called blob, use blobtools from rayman86 (attached in my thread too) to unpack the blob. It will then split into several smaller blobs. You want the blob.ebt file. Copy only that then place on your Tf, rename it to blob with no extension again.
Then flash using the staging partition:
Originally Posted by gee one
to flash using the staging partition- you need either terminal or adb access.
the commands are:
su
dd if=/your/blob/here of=/dev/block/mmcblk0p4 # the last chars are zero pee four
reboot
Use adb or file manager or magic to save your blob somewhere on your transformer.
As it reboots, you should see a blue progress bar to indicate that it is flashing. It will reboot again and should work if you were VERY CAREFUL.

No Love
I got the blob.EBT on my transformer in /mnt/sdcard/Download, did the dd which ran without error. I rebooted, no blue bar, just the EEEPad splash as normal.

Hmm, is your Ro.Secure set to 0? that's about all I can think of right now, or you can run the same command with a CWM blob.SOS recovery and see if it does something. :/

Recovery
I'm not sure what Ro.Secure is.
I did the other thread rewrites of mmcblk0p3 and when I reboot it boots normally. I then redid the write of blob.EBT to mmcblk0p4 and rebooted. It rebooted normally but no blue bar and I still can't get into recovery.

Is it still hanging on the ASUS screen or is it booting normally then?
Ro.secure is a write security of /system/ files. If you have a custom kernel (ex. guevors) it isn't an issue, but stock might be.

Recovery
I'm running AOKP build 35 currently, not stock.
It will boot normally, but if I try to go into recovery (vol-down) then I get the EEE Pad splash and it just sits there.

Take a version of CWM's zip and run the command to flash the SOS blob in the recovery partition (simaler process to flashing EBT) also install SuperSU from market, and update superuser binary, using that try recovery installer again making sure to give it su.
It's really strange.. Did you use ROM manager?

Yes, I did use RomManager, it used to work well but I'm getting the feeling it's fallen aside?
Should I just take the "recovery-clockwork-touch-5.8.1.8-tf101-repack" or "cwm_recovery-5504_roach-tf101-r2" and the double-unzip, find the EBT as I did with the Asus firmware or do you have a link?
And thank you very much for your assistance, it is GREATLY appreciated.
Robert

Yes, so many people were having issues I actually posted a warning in the general thread.
Yes, the same process, but I don't think you should need to unpack with blobtools, just flash the blob as is, since it should be just the SOS partition anyway.
If you need external SD support, use Rouge XM's version instead, it reads from internal and external. Otherwise one of the two you mentioned (internal only).

Do I when you say flash, you mean dd to mmcblk0p4? Inside the recovery-clockwork-touch repack there is a "recoveryblob". Just dd that file?
Sorry for the stupid questions but I really dont' want a brick.

Dd that file, the recovery blob, but RESEARCH FIRST (looking up now) what mmcblk to use. I'm almost certain it's not P4 but a different one, just look around for the recovery partition section.
Edit: Turns out I was wrong, you do dd block 4, just looked at the updaterscript of RougeXM recovery.
Code:
ui_print("[AnyKernel Updater by Koush]");
ui_print("Rogue XM Recovery 1.3.0 (CWM-based Recovery v5.0.2.7)");
ui_print("Built for the Asus Transformer TF101");
set_progress(1.000000);
ui_print(" ");
ui_print("Extracting dd...");
package_extract_dir("recovery", "/tmp");
set_perm(0, 0, 0777, "/tmp/dd");
ui_print(" ");
ui_print("Extracting new recovery blob...");
package_extract_file("recoveryblob", "/tmp/recoveryblob");
ui_print(" ");
ui_print("Flashing new recovery blob...");
run_program("/sbin/busybox", "dd", "if=/tmp/recoveryblob", "of=/dev/block/mmcblk0p4");
ui_print(" ");
ui_print("Cleaning up...");
delete("/tmp/recoveryblob");

Got the blue line that time. Rebooted and used vol-down, there's recovery!
So I should go ahead and uninstall Rom Manager? How about GooManager? I like how it will keep me up to date on Roms since they can be a pain to find what's compatible and current but will just install by hand from now on.
Many thanks for the assistance, owe you a beer or two.

Uninstall rom manager, just get updates from threads manually, its worth the hassle
edit: thanks button xD

Related

alt-w missing

I hope someone can help. Originally, when I downloaded Hero beta4 it came with a recovery file. Since I didnt know where it went, I did not adb it over. Now, everytime I wipe (i am now running rosie), it locks up at the Android screen and endless boots. I am sure it is because I am missing my recovery image. I presume I can use any update.zip and rename it recovery.something. My questions are
1. what is this recovery file named?
2. Where does it go? I have app_s installed to my ext2 partition for rosie.
If you boot up without holding down the home key (a normal boot in other words) the system doesn't touch your recovery partition. So having a damaged recovery is likely not the cause of your looping. If you want to install a recovery.img you can just grab it out of a full updater or as a separate file.
Thanks, but you said something interesting. You said recovery partition. Where is that? And would I use ADB to push the recovery file over to where ever?
it only boot-loops when i wipe. If I update, things go smoothly. Until I wipe again. Seems like i am missing the recovery image (since it came with the download but I never moved it).
Thanks jashsu for your prompt response.
pine
I don't think it's the recovery partition. I get kinda the same with tehseano's Hero theme 1.1. When I wipe before applying the update, I get problems with home app. And after, I get a bootloop..

[WIP] Ideapad K1 CWM recovery port

Greetings,
I am looking for assistance trying to port CWM recovery to the Lenovo K1.
Where I'm At
I have compiled CWM Recovery from the source and have successfully flashed it to the device with working buttons. The recovery can mount all partitions except /misc. I have successfully flashed update.zip's, and verified the files were in place via adb. The problem is once I boot into CWM (Even if I don't flash anything) I cannot boot back to the OS, without reflashing everything
For example:
1. I flash the Chinese rom with my recovery.img in place via nvflash
2. Once it boots I move a blank update.zip & update.xml to the Download dir on the internal storage
3. Reboot
4. Automatically tries to go into Recovery
5. Get an error image (Blank update.zip wouldn't flash of course). Hold down Power Button until device powers off.
6. Power on and device goes right into CWM.
At this point even if I just reboot the device goes right back into CWM. The recovery is very functional, I am able to flash update.zip's, mount almost all partitions, and access via adb.
According to djmwj there needs to be an update.zip and update.xml file in the /sdcard/Download dir to boot into recovery. These can be blank files. They are deleted on every reboot, so you have to put them back each time.
-This only works for me on the Chinese rom
Partitions
/dev/block/mmcblk0p1 - /recovery
/dev/block/mmcblk0p2 - /boot
/dev/block/mmcblk0p3 - /system
/dev/block/mmcblk0p4 - /cache
/dev/block/mmcblk0p5 - ?? 2MB
/dev/block/mmcblk0p6 - blob
/dev/block/mmcblk0p7 - /data
/dev/block/mmcblk0p8 - /data/temp
/dev/block/mmcblk1p1 - /sdcard
recovery.fstab
# mount point fstype device [device2]
/boot mtd /dev/block/mmcblk0p2
/cache ext4 /dev/block/mmcblk0p4
/data ext4 /dev/block/mmcblk0p7 /dev/block/mmcblk0p8
/mis mtd ??
/recovery mtd /dev/block/mmcblk0p1
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/system ext4 /dev/block/mmcblk0p3
/sd-ext yaffs2 ??
Please let me know if you would like a copy of the recovery.img or the modified files from the CWM source. Also if anyone has any suggestions to get it rebooting to the OS. If I can get that working it should be ready for an initial release.
Would this help?
http://rootzwiki.com/topic/13407-alpha-ideapad-k1-cwm-stock-rooted-rom/
He seems to have it flashing and booting a rooted version of the stock rom. He mentions some issues but doesn't list them (unless you count not having lenovo market as an issue.)
I'm waiting for this to root my K1, any update?
---------- Post added at 12:54 PM ---------- Previous post was at 12:53 PM ----------
gallahad2000 said:
Would this help?
http://rootzwiki.com/topic/13407-alpha-ideapad-k1-cwm-stock-rooted-rom/
He seems to have it flashing and booting a rooted version of the stock rom. He mentions some issues but doesn't list them (unless you count not having lenovo market as an issue.)
Click to expand...
Click to collapse
He is actually the same guy.
leo_bsb said:
He is actually the same guy.
Click to expand...
Click to collapse
That's what I get for not paying any attention. I think he's at the same place as everyone else: They've got a rooted rom but need a copy of the userdata img or all of the original .apks to restore all of the third-party apps.
He just posted Alpha 2.0!
*Edit: I helped him pull the lenovo .apks from my stock K1, so there may be another update soon*
I think I can help you. If you want to launch a recovery and you have root(#) then on the Lenovo you just issue this command "/system/bin/misc_command FOTA" and then reboot. It will launch CWM or the stock recovery. No need to make dummy update.zip files.
Take a look at http://forum.xda-developers.com/showpost.php?p=21309379&postcount=50
You should be able to download that tool, replace the recovery.img in the image folder with your CWM and then flash to 13_13_US. You'll have to comment (change) out the boot sequence so CWM doesn't get replaced on reboots. This is why it only works once for you and then you have to flash it again.
Also, if you get root. You should be able to dd back in the recovery blob without flashing which would work for one reboot and then it gets replaced again with stock.
So you could:
1. dd of=/dev/block/mmcblk0p1 if=/sdcard/Download/recovery.img
2. /system/bin/misc_command FOTA
3. reboot
Note: this assumes you have root and should launch CWM for you. However CWM will be replaced back with the stock recovery on the next reboot unless you comment out those commands in the start up.
Hope this helps, let me know,
TD
Thanks, but I already created an app/widget that reboots into recovery. I watched logcat while applying an OTA update to see what intent was called. The app basically puts a blank update.zip in place and calls the intent. This method does not cause you to reflash the recovery image each time. You reboot to recovery as many times as you would like.
All my work is posted over a rootzwiki
khanning88 said:
Thanks, but I already created an app/widget that reboots into recovery. I watched logcat while applying an OTA update to see what intent was called. The app basically puts a blank update.zip in place and calls the intent. This method does not cause you to reflash the recovery image each time. You reboot to recovery as many times as you would like.
All my work is posted over a rootzwiki
Click to expand...
Click to collapse
Nice, got a link for the download of CWM?
timmyDean said:
Nice, got a link for the download of CWM?
Click to expand...
Click to collapse
http://rootzwiki.com/topic/13407-alpha-ideapad-k1-cwm-stock-rooted-rom-111029-build/

[Q] Can only boot to CWM

I updated to the 7.2 RC Kang via CWM, but now my Nook will only boot to CWM. I was already on a 7.2 beta and working fine. Flashed the newest release, cleared cache and dalvik, now all it will do is boot to CWM.
I have taken the SD card right out and its doing the same thing. I have the Cyanogen boot loader on there (shows Cy logo instead of "The Future...").
Appreciate any guidance.
bluevolume said:
I updated to the 7.2 RC Kang via CWM, but now my Nook will only boot to CWM. I was already on a 7.2 beta and working fine. Flashed the newest release, cleared cache and dalvik, now all it will do is boot to CWM.
I have taken the SD card right out and its doing the same thing. I have the Cyanogen boot loader on there (shows Cy logo instead of "The Future...").
Appreciate any guidance.
Click to expand...
Click to collapse
If it is booting to CWM recovery and not locking up, that means the 'boot to recovery' flag is set and is not clearing when you leave CWM like it should. Try doing some things in CWM before you exit, like wiping cache or something. And when you exit, exit by the menu, not just powering off.
You can also try using the boot menu to try to force you to emmc. Hold the n button while booting and when the boot menu comes up, pick emmc and normal and reboot.
Edit: You say you take the SD out and it does the same. Why would you expect it to be different? Are you running from SD? If so you should not be flashing things with CWM, that puts things on emmc. Or did you mean you take the bootable CWM SD out? You should always take that out after flashing to emmc. And if your already running CM7 from emmc, you should be flashing with the CWM on emmc, not a bootable CWM SD. I'm confused as to what you were doing and what your configuration was.
Sent from my Nook Color running ICS and Tapatalk
leapinlar said:
If it is booting to CWM recovery and not locking up, that means the 'boot to recovery' flag is set and is not clearing when you leave CWM like it should. Try doing some things in CWM before you exit, like wiping cache or something. And when you exit, exit by the menu, not just powering off.
You can also try using the boot menu to try to force you to emmc. Hold the n button while booting and when the boot menu comes up, pick emmc and normal and reboot.
Edit: You say you take the SD out and it does the same. Why would you expect it to be different? Are you running from SD? If so you should not be flashing things with CWM, that puts things on emmc. Or did you mean you take the bootable CWM SD out? You should always take that out after flashing to emmc. And if your already running CM7 from emmc, you should be flashing with the CWM on emmc, not a bootable CWM SD. I'm confused as to what you were doing and what your configuration was.
Sent from my Nook Color running ICS and Tapatalk
Click to expand...
Click to collapse
I took the SD card out as someone had suggested that in the ROM thread. No, it doesn't make sense that if would just start booting from the SD card when it wasn't before, but it eliminated a variable.
I have gone into the boot menu and checked that it is booting from emmc. I've even changed it to SD and back just to make sure it took.
bluevolume said:
I took the SD card out as someone had suggested that in the ROM thread. No, it doesn't make sense that if would just start booting from the SD card when it wasn't before, but it eliminated a variable.
I have gone into the boot menu and checked that it is booting from emmc. I've even changed it to SD and back just to make sure it took.
Click to expand...
Click to collapse
Then it is the set flag issue I mentioned in the first part of my post. Not sure how to get it cleared. Just exercising CWM? Try flashing something else. Gapps again maybe. It won't hurt to flash them twice.
Edit: btw, what version of CWM are you running?
Sent from my Nook Color running ICS and Tapatalk
CWM v3.2.0.1
I installed gapps again, same problem. Gremlins!
I had this problem, but the only way I found to fix it was to flash a stock recovery zip from CWM recovery SD card, then CM7 again
cmendonc2 said:
I had this problem, but the only way I found to fix it was to flash a stock recovery zip from CWM recovery SD card, then CM7 again
Click to expand...
Click to collapse
But in his case it is not locking up. It is cleanly rebooting to CWM. A little different scenario than yours.
leapinlar said:
But in his case it is not locking up. It is cleanly rebooting to CWM. A little different scenario than yours.
Click to expand...
Click to collapse
How could it reboot into CwM if there is no flashable CwM uSD installed, where those "Rec" files reside?
Did you some how flash CwM into eMMC before, OP?
votinh said:
How could it reboot into CwM if there is no flashable CwM uSD installed, where those "Rec" files reside?
Did you some how flash CwM into eMMC before, OP?
Click to expand...
Click to collapse
Yes, I've had CWM flashed into the emmc for a while. So I could use the boot menu utility to boot to CWM if needed.
BTW - this is the ROM i'm using: http://forum.xda-developers.com/showthread.php?t=1344873
votinh said:
How could it reboot into CwM if there is no flashable CwM uSD installed, where those "Rec" files reside?
Did you some how flash CwM into eMMC before, OP?
Click to expand...
Click to collapse
He is on emmc. He had a CM version on earlier and used ROM Manager to put CWM on the emmc boot partition. This problem only emerged when he flashed the newest CM to emmc from ROM Manager with the CWM on emmc. He now only boots to CWM and it is loaded from emmc boot. It is a flag set problem. The boot loader is telling it to go to recovery instead of normal ROM. That flag is set by ROM Manager when it wants CWM to perform a task for it. Like flash a ROM. That is how the boot loader knows to boot to recovery rather than the ROM. CWM is supposed to reset that flag when it has finished the task that ROM Manager asked it to do. Somehow it is not being reset.
Edit: @bluevolume - a possible solution is to make a bootable CWM SD and boot to that. That may reset the flag when it exits.
Edit 2: I found where the recovery flag is stored on the nook. There is a separate partition (2) called /rom that stores basic information like your model number, date of manufacture, serial number, etc. Also there is a file named BCB which is usually an empty file. But if the word 'recovery' is written there properly, it will always boot into recovery. Recovery is supposed to write the empty file back when finished so that on next boot it boots normally to emmc. I'm not sure how much good this information is going to do you, but if you are proficient with adb, you can modify the file even if in recovery.
leapinlar said:
He is on emmc. He had a CM version on earlier and used ROM Manager to put CWM on the emmc boot partition. This problem only emerged when he flashed the newest CM to emmc from ROM Manager with the CWM on emmc. He now only boots to CWM and it is loaded from emmc boot. It is a flag set problem. The boot loader is telling it to go to recovery instead of normal ROM. That flag is set by ROM Manager when it wants CWM to perform a task for it. Like flash a ROM. That is how the boot loader knows to boot to recovery rather than the ROM. CWM is supposed to reset that flag when it has finished the task that ROM Manager asked it to do. Somehow it is not being reset.
Edit: @bluevolume - a possible solution is to make a bootable CWM SD and boot to that. That may reset the flag when it exits.
Edit 2: I found where the recovery flag is stored on the nook. There is a separate partition (2) called /rom that stores basic information like your model number, date of manufacture, serial number, etc. Also there is a file named BCB which is usually an empty file. But if the word 'recovery' is written there properly, it will always boot into recovery. Recovery is supposed to write the empty file back when finished so that on next boot it boots normally to emmc. I'm not sure how much good this information is going to do you, but if you are proficient with adb, you can modify the file even if in recovery.
Click to expand...
Click to collapse
That is good info, thank you. I have not been able to get ADB working in the past (i'm on Win 7 64); I think its a driver issue. I'll revisit that later today.
bluevolume said:
That is good info, thank you. I have not been able to get ADB working in the past (i'm on Win 7 64); I think its a driver issue.
Click to expand...
Click to collapse
If you can get adb working in CWM, this is what you want to do in at the dos prompt, one line at a time:
adb shell mount -t vfat /dev/block/mmcblk0p2 /rom
adb shell dd if=/dev/zero of=/rom/bcb bs=512 count=1
adb shell reboot
Edit: if you want help getting adb working this post may help:
http://forum.xda-developers.com/showthread.php?p=21665649
Edit2: I've been doing a lot of experimenting. It is not what's in the bcb file. It's what the file size is. If the file size is 512 bytes or larger it will boot to normal emmc. If it is smaller than 512 bytes or MISSING, it will boot to recovery. It could be yours is missing. But recovery is supposed to create a new big one if it is. Could be a permissions problem. If you get adb going you can fix that.
On a side note I was thinking it could be corrupted boot files causing this, but I purposely messed with them and it does not boot into recovery, it just hangs.
leapinlar said:
If you can get adb working in CWM, this is what you want to do in at the dos prompt, one line at a time:
adb shell mount -t vfat /dev/block/mmcblk0p2 /rom
adb shell dd if=/dev/zero of=/rom/bcb bs=512 count=1
adb shell reboot
Edit: if you want help getting adb working this post may help:
http://forum.xda-developers.com/showthread.php?p=21665649
Edit2: I've been doing a lot of experimenting. It is not what's in the bcb file. It's what the file size is. If the file size is 512 bytes or larger it will boot to normal emmc. If it is smaller than 512 bytes or MISSING, it will boot to recovery. It could be yours is missing. But recovery is supposed to create a new big one if it is. Could be a permissions problem. If you get adb going you can fix that.
On a side note I was thinking it could be corrupted boot files causing this, but I purposely messed with them and it does not boot into recovery, it just hangs.
Click to expand...
Click to collapse
Let me first thank you for your time and support on this; its people like you that make these forums such a great resource.
I'm not that comfortable with adb commands so I starting looking for other solutions. Since you mentioned that its the actual boot files that are missing/corrupted, I searched around and found this:
http://forum.xda-developers.com/showthread.php?t=958748
I loaded the RecoveryFix.zip on my SD card and flashed it with CWM. Rebooted, and I was back to the 'Future of reading..." boot logo, but it still went straight to CWM. So I flashed the ROM again (the ROM I listed earlier in the thread), wiped cache, fixed permissions. Rebooted, and the "Cyanogenmod" boot logo was back. And instead of going right to CWM, the screen was blank for quite a while then I saw the little Android guy skate by... And I'm back in business.
I know other people have had this problem and this seems like a pretty simple solution. I'm good at this point, and hopefully some other people will find this thread helpful.
bluevolume said:
Let me first thank you for your time and support on this; its people like you that make these forums such a great resource.
I know other people have had this problem and this seems like a pretty simple solution. I'm good at this point, and hopefully some other people will find this thread helpful.
Click to expand...
Click to collapse
The next step I was going suggest if you could not fix it was to flash a new CWM to your boot files. Good job finding that.
Glad you got it running. I learned a lot myself and maybe that info will help others.
Sent from my Nook Color running ICS and Tapatalk
leapinlar said:
He is on emmc. He had a CM version on earlier and used ROM Manager to put CWM on the emmc boot partition. This problem only emerged when he flashed the newest CM to emmc from ROM Manager with the CWM on emmc. He now only boots to CWM and it is loaded from emmc boot. It is a flag set problem. The boot loader is telling it to go to recovery instead of normal ROM. That flag is set by ROM Manager when it wants CWM to perform a task for it. Like flash a ROM. That is how the boot loader knows to boot to recovery rather than the ROM. CWM is supposed to reset that flag when it has finished the task that ROM Manager asked it to do. Somehow it is not being reset.
Click to expand...
Click to collapse
Got it, thanks m8
That clears up my mind.
I had the same problem, followed the thread you found. Did the same thing, now I'm back in business too. Thanks!
Just wanted to say thanks for figuring this out! I was in a similar situation after downgrading from cm9 back to cm7. Installed CWM using recoveryfix_3.0.2.8.zip from the thread above, and was back up and running after a restore of a cwm backup. Headed on vacation tomorrow and the wife would have had my head for being such an FW... you're a lifesaver!

[HOW TO] Clean route to XNP44S keeping Root + Xposed + Kernel (No wipe)

Updated with steps to go to CM11-S update XNP44S
These days I was on 33R, rooted, with Xposed Framework installed, and lots of modules configured, including one that adds more col/lines to the Google Now launcher grid. Until now, each OTA was a pain, because although it flashed fine, I had to reinstall Xposed and I always had trouble with the launcher loosing its config (during the first boot, the grid was back to the default grid, and after reinstalling Xposed, I had to also restore a TiBu backup of Google Search to have my launcher setup again)... a pain.
This time, to go to 38R I took a different approach.
First, prepare in your /sdcard the following files:
cm-11.0-XNPH33R-bacon-signed.zip: Full XNPH33R factory image (flashable in recovery)
cm-bacon-3628510d76-to-ac1ccf7921-signed.zip: XNPH38R OTA zip. (link taken from here, thanks jaggyjags)
XNP44S update cm-bacon-ac1ccf7921-to-5fa8c79c0b-signed.zip
SuperSU-v2.02.zip Flashable SuperSu zip (source, thanks Chainfire)
Xposed-Installer-Recovery.zip: zip that installs Xposed framework (you can generate it from Xposed Installer, or directly download this one)
With that, and assuming you already have a custom recovery installed (I used TWRP 2.7.1.1), this I what I did:
Reboot into Recovery (Vol-Down & Power)
Click Install
Select 1rst zip: cm-11.0-XNPH33R-bacon-signed.zip, but don't flash it yet
Add a zip: cm-bacon-3628510d76-to-ac1ccf7921-signed.zip (XPN38R)
Add a zip: cm-bacon-ac1ccf7921-to-5fa8c79c0b-XNPH44S-signed.zip
Add a zip: SuperSU-v2.02.zip
Add a zip: Xposed-Installer-Recovery.zip
(Optional) If you have a custom kernel zip that you know is compatible with XNP38R, you can also add it here
Swipe to confirm flash, this will actually flash all the previous zips, in order
Check to wipe Dalvik-cache/Cache
Reboot to system
Wait a couple of minute while your OPO boots to XNP38R: You've successfully flashed the OTA while preserving root, Xposed,...
Hope that helped
Enjoy XNP38R!
Edit: The method above should work if you are running CM11-S. The factory cm-11.0-XNPH33R-bacon-signed.zip does some verification on the already installed rom (for some reason, I really don't see the point).
If you have a different rom, or if it's a CM11-S rom but somehow resigned by different key, this above will fail. The update-script runs a script called otasigcheck.sh that looks into the installed rom files and checks the key that signed the /system/app/HTMLViewer.apk against the one in the OTA).
The error is: "Can't install this package on top of incompatible data. Please try another package or run a factory reset". (More details in comment #16)
In that case you should start doing the following:
Download and extract the XNP33R fastboot factory image
Boot into fastboot mode (Vol-Up & Power)
Connect your OPO to your computer (USB)
Run: fastboot flash boot boot.img
Then: fastboot flash system system.img
Then: fastboot reboot (will reboot the phone into Android)
Reboot into Recovery (Vol-Down & Power)
It should now be fine to continue from step 4 of the steps above.
If you need help with installing fastboot on your computer, please go here.
You don't need to do a wipe? I'm also struggling getting 38R
Hey if Im already on 33r do I have to flash it? Im currently on 33r rooted and when I try to flash 38r it gives me an error
Waynesta said:
Hey if Im already on 33r do I have to flash it? Im currently on 33r rooted and when I try to flash 38r it gives me an error
Click to expand...
Click to collapse
Yes you need to reflash it. It will put your phone in the state where you can then correctly flash 38R OTA.
Sent from my OnePlus One using Tapatalk Pro
rhaces said:
You don't need to do a wipe? I'm also struggling getting 38R
Click to expand...
Click to collapse
You don't need to do a wipe data, if you come from CM11-S. If you come from a different rom, you probably need to.
Sent from my OnePlus One using Tapatalk Pro
stupid question:
what is the framework xposed?
psxsnake said:
stupid question:
what is the framework xposed?
Click to expand...
Click to collapse
http://forum.xda-developers.com/xposed/xposed-installer-versions-changelog-t2714053
Transmitted via Bacon
This is not working for me. I get Error executing updater binary in zip when flashing 33R zip
EDIT: I don't know why but I tried the option "Fix premissions" in the recovery and now it works and flashed without error.
don't wor for me or error flash or error mount ft why?
i had vanir rom
Great post. Thanks.
Can I wipe all data anyway so I can start with a fresh install of the update?
famonaco said:
don't wor for me or error flash or error mount ft why?
i had vanir rom
Click to expand...
Click to collapse
What recovery are you using? What is the error you get exactly? Can you maybe post a photo?
Sent from my OnePlus One using Tapatalk Pro
jairusz said:
Can I wipe all data anyway so I can start with a fresh install of the update?
Click to expand...
Click to collapse
Yes of course. It's not necessary though, I did so because I didn't want to wipe all data.
Sent from my OnePlus One using Tapatalk Pro
Same issue I get when trying to install the 38R by itself, described here http://forum.xda-developers.com/oneplus-one/help/apply-ota-stock-root-franco-23r-twrp-t2900311, "Can't install this package on top of incompatible data. Please try another package or run a factory reset"
CyberT3 said:
This is not working for me. I get Error executing updater binary in zip when flashing 33R zip
EDIT: I don't know why but I tried the option "Fix premissions" in the recovery and now it works and flashed without error.
Click to expand...
Click to collapse
update TWRP to 2.8.01
"Can't install this package on top of incompatible data"
rhaces said:
Same issue I get when trying to install the 38R by itself, described here http://forum.xda-developers.com/oneplus-one/help/apply-ota-stock-root-franco-23r-twrp-t2900311, "Can't install this package on top of incompatible data. Please try another package or run a factory reset"
Click to expand...
Click to collapse
TL;DR: I've updated the OP with an alternative method that should work for those getting this error .
Actually, for some obscure reason I don't know, the zip factory image for XNP33R does a verification on one file that is in /data (/data/system/packages.xml), looking for the certificate that signed a specific package from the installed rom (/system/app/HTMLViewer.apk). If the certificate isn't the same one that is bundled in the factory image, it won't flash and throw the error you got. If you scroll to the right you'll see the error is from the sha1_check on line 6:
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
package_extract_file("system/bin/otasigcheck.sh", "/tmp/otasigcheck.sh");
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
set_metadata("/tmp/otasigcheck.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/otasigcheck.sh");
sha1_check(read_file("/tmp/releasekey"),"7241e92725436afc79389d4fc2333a2aa8c20230") && abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
unmount("/data");
Here we can see the content of otasigcheck.sh:
Code:
#!/sbin/sh
# Validate that the incoming OTA is compatible with an already-installed
# system
if [ -f /data/system/packages.xml -a -f /tmp/releasekey ]; then
relCert=$(grep -A3 'package name="com.android.htmlviewer"' /data/system/packages.xml | grep "cert index" | head -n 1 | sed -e 's|.*"\([[:digit:]][[:digit:]]*\)".*|\1|g')
grep "cert index=\"$relCert\"" /data/system/packages.xml | grep -q `cat /tmp/releasekey`
if [ $? -ne 0 ]; then
echo "You have an installed system that isn't signed with this build's key, aborting..."
# Edify doesn't abort on non-zero executions, so let's trash the key and use sha1sum instead
echo "INVALID" > /tmp/releasekey
exit 1
fi
fi
exit 0
I don't really see the whole point in doing that, as the next line will actually format system, so why care about what was there before anyway?
Code:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
I've updated the OP with an alternative method that should work for those getting this error .
I really don't know what is going on with my phone but that didn't help anyways. I flashed boot and system from 33R in fastboot, went back into TWRP and installed the full 38R and still same issue. I tried every combination (including flash boot, syste, then in TWRP install 33R again) and nothing.
Finally what I did was fastboot flash boot system and recovery, boot into system, apply the OTA from the system and now that worked. Booted into 38R and everything worked ok, so went back to fastboot, flashed TWRP again, went into TWRP and installed supersu and franco 24r and now things seem to be ok.
Thanks for all the help
rhaces said:
I really don't know what is going on with my phone but that didn't help anyways. I flashed boot and system from 33R in fastboot, went back into TWRP and installed the full 38R and still same issue. I tried every combination (including flash boot, syste, then in TWRP install 33R again) and nothing.
Finally what I did was fastboot flash boot system and recovery, boot into system, apply the OTA from the system and now that worked. Booted into 38R and everything worked ok, so went back to fastboot, flashed TWRP again, went into TWRP and installed supersu and franco 24r and now things seem to be ok.
Thanks for all the help
Click to expand...
Click to collapse
I've modified my alternative instructions in OP, that should fix that (for others) : after fastboot system and boot it seems you need to reboot into Android (what you did). That makes sense actually as it will recompute the xml file that is also checked by the OTA. Then reboot back to TWRP.
I still wonder why it was falling though. You were on cm11-s right? What could have make the htmlviewer file have a different signature? Any idea? (did you apply any modification on top of CM11-S besides root, kernel, Xposed ?)
Sent from my OnePlus One using Tapatalk Pro
Option 1 worked fine on my rooted but otherwise unaltered OnePlus One. Thanks for the guide!
I get an error on the Xposed-installer but everything else goes well. If I remember it was a directory error message...
Envoyé de mon A0001 en utilisant Tapatalk

Trouble Permanently Flashing TWRP

Hi,
I'm currently using the Skipsoft Android Toolkit to unlock flash TWRP onto my device. I've followed to first steps (install drivers, backup device and unlock bootloader) to the letter and everything went smooth.
Now the final part of installing TWRP is not going so well. Flashing the custom recovery works as expected and I end up in the TWRP menu. However, as soon as I reboot my phone and try to go back to the recovery via Advanced Reboot --> recovery, I end up in the default One Plus Recovery Menu. Now the tool mentioneds when this process fails, renaming the Recovery Restore Files is recommend to prevent the system from flashing the stock recovery on boot (what happens to my device). I follow this option in which I end up back in TWRP, flash a zip named 'permanent-recovery.zip' (while read only mode is turned off in TWRP) and reboot my device. Still when I use Advanced Reboot to open recovery, I end up once again in the Stock Recovery.
Is there anyone who could tell me where I am going wrong and how to solve this issue?
Thanks in advance
Rawrden said:
Hi,
I'm currently using the Skipsoft Android Toolkit to unlock flash TWRP onto my device. I've followed to first steps (install drivers, backup device and unlock bootloader) to the letter and everything went smooth.
Now the final part of installing TWRP is not going so well. Flashing the custom recovery works as expected and I end up in the TWRP menu. However, as soon as I reboot my phone and try to go back to the recovery via Advanced Reboot --> recovery, I end up in the default One Plus Recovery Menu. Now the tool mentioneds when this process fails, renaming the Recovery Restore Files is recommend to prevent the system from flashing the stock recovery on boot (what happens to my device). I follow this option in which I end up back in TWRP, flash a zip named 'permanent-recovery.zip' (while read only mode is turned off in TWRP) and reboot my device. Still when I use Advanced Reboot to open recovery, I end up once again in the Stock Recovery.
Is there anyone who could tell me where I am going wrong and how to solve this issue?
Thanks in advance
Click to expand...
Click to collapse
The basic "mechanics" of what happens seems to still be as follows:
As your phone is delivered with Stock OS, it has these two files installed:
Code:
/system/recovery-from-boot.p
/system/etc/install-recovery.sh
I know from looking at mine when I got it that it had /system/recovery-from-boot.p installed. If it's there, it is run when it runs at boot.
To stop that behavior you have to get rid of those files before you reboot the first time from recovery or else recovery will be replaced with the stock image. I'm aware that supposedly the custom recovery supposedly renames either one or the other or both of these but am not convinced it does this or whether installing root (either Magisk or SuperSU) does it. Either way, since you're stuck with the problem, either from file-manager in TWRP if that's all you can boot to, you need to rename /system/recovery-from-boot.p to something like /system/recovery-from-boot.p.orig and maybe the other one /system/etc/install-recovery.sh to /system/etc/install-recovery.sh.orig as well.
Once even the .p file is gone, it's not going to rewrite recovery. You must, of course, be rooted before you can touch those files although if you can sideboot TWRP, it seems like you are rooted while it is booted and "should" have access to system files if you can mount system rw.
I've fixed it this way on other phones. On this one, installing the "official" TWRP and Magisk did it. When I booted into /system after installing Magisk, I looked for the .p file and found it renamed to /system/recovery-from-boot.bak.
I found a link for a Samsung s8 for the same purpose. It's probably identical. http://www.teamandroid.com/2017/04/25/install-galaxy-s8-twrp-310-recovery/3/
Click to expand...
Click to collapse
I looked into those two files while in TWRP and noticed I only had the recovery-from-boot.p file. This was already in fact renamed to recovery-from-boot.p.bak. I renamed it once again (just to be sure) and after flashing the .zip I mentioned earlier, the TWRP did not last another reboot...
Can I after flashing TWRP again, immediately flash Magsik? I intended to hold off rooting because the rom I was going to install has Magisk build into it. I don't want to create a conflict when flashing later on. Is this going to be an issue?
@hachamacha I've reread your post and wondering if rooting my device is even going to make a difference right now? Since I'm already able to rename files in the system directory, would it even make a difference?
Rawrden said:
I looked into those two files while in TWRP and noticed and only had the recovery-from-boot.p file. This was already in fact renamed to record-from-boot.p.bak. I renamed it once again (just to be sure) and after flashing the .zip I mentioned earlier, the TWRP did not last another reboot...
Can I after flashing TWRP again, immediately flash Magsik? I intended to hold off rooting because the rom I was going to install has Magisk build into it. I don't want to create a conflict when flashing later on. Is this going to be an issue?
Click to expand...
Click to collapse
To me, it doesn't sound like a conflict to re-install Magisk over itself in FOS and see if that helps. The real "action" that counts is all about whether you've already booted into the OS after installing TWRP and then how you go about getting rid of the .p file without doing a regular reboot via the OS. Even installing the FOS ROM should get rid of the .p file (rename it), so something else is going on. I'll look around some more and update this if I can.
By the way: Depending upon how exactly you got from TWRP to the OS the first time, it could already have rewritten the stock recovery by the time you noticed *.p file renamed to *.bak.
OK: I recalled how I did this without a problem: I wrote instructions somewhere but have no idea where. This is what I think I did:
1) fastboot flash recovery recovery.img (custom/TWRP)
2) fastboot boot recovery.img (so force it to load recovery without a traditional reboot).
3) install ROM from that point and after done just hit the reboot button (or install Magisk from that point and hit reboot).
Click to expand...
Click to collapse
---------- Post added at 09:26 AM ---------- Previous post was at 08:59 AM ----------
Rawrden said:
@hachamacha I've reread your post and wondering if rooting my device is even going to make a difference right now? Since I'm already able to rename files in the system directory, would it even make a difference?
Click to expand...
Click to collapse
Just saw this note:
Anytime you're in TWRP, you're automatically "rooted" for the time you're there. It's integral to TWRP having permissions to do anything like install etc. If you just "loaded" TWRP (as in fastboot boot twrprecovery.img) then you'd be rooted, but when you rebooted to the system, you'd be unrooted. While you were in TWRP, in theory you could make file system changes to the /system partition (a) if TWRP lets you mount it rw which I think that first swipe does and b) if you can see the correct files in it's file manager.
So it "seems" like those file changes should be actual file changes to the correct place. Keep in mind that while booted in TWRP, TWRP may have it's own ./system/ that has nothing to do with the OS's ./system folder, so you've got to be able to mount the OS's ./system. TWRP's ./system is already fine and of no importance for this. I can boot mine into TWRP and look around to try to clear this up, but it might not be crystal clear to me either.
The output of a TWRP terminal emulator "mount" command might be of use but it will be messy. Maybe if you can do this in emulator from TWRP:
# mount | grep system, and look at that output, perhaps put it in this post, it'd be of help. The mounted rw ./system we need is going to be the same one you'd see from adb shell or terminal emulator while booted from the OS. My guess is that the one we don't want from TWRP's perspective will be mounted as /system (params...) and that the the OS's system either will not yet be mounted and you'll have to go to mounts and mount it and then look at the output of the mount cmd again to figure out what it was mounted as. Sorry about how complicated this explanation has become. Anyway: The ./system that corresponds to the OS is the only one we care about.
There's no easy way to explain it so I'll leave it hidden to spare anyone having to look at it:
I just booted into TWRP and used terminal emulator and file manager to explore:
findings: While in TWRP, using terminal emulator to do a
$ df and then a $ mount command shows no ./system mounted specifically. // maybe not a surprise.
// TWRP just mounts it's root / file system and there is a /system folder, just not a specific mount point for it.
// TWRP does not auto mount the OS's ./system partition by default. It depends what you're going to do there.
Without going into "mounts" and clicking on /system, it won't even try to mount /system for the OS.
If you can get that mount to work in read/write mode, then you should be able to see the ./system mount using terminal emulator as such.
$ mount | grep -i system (and look specifically for ./system on the right side of whatever appears).
In theory you should be able to make changes to the OS's /system partition now. When you're done, unmount it. (I'm assuming all this works from TWRP, a dodgy assumption)
At this point: I'm just trying to figure out how TWRP does things like installs OS zips to the /system & /data partitions which it is clearly successfully able to do. It could do it without mounting anything because it could use the linux dd command, which just writes to the /dev name. OR: It could mount /system and use it. I'm not sure which.
hachamacha said:
OK: I recalled how I did this without a problem: I wrote instructions somewhere but have no idea where. This is what I think I did:
Quote:
Code:
1) fastboot flash recovery recovery.img (custom/TWRP)
2) fastboot boot recovery.img (so force it to load recovery without a traditional reboot).
3) install ROM from that point and after done just hit the reboot button (or install Magisk from that point and hit reboot).
Click to expand...
Click to collapse
I followed these steps and I managed to install FreedomOS without any issues. My phone booted normally and after a few complimentary steps I booted back into recovery and... TWRP! No more stock recovery. Thanks a lot!
Just one more question: TWRP currently asks whether it is allowed to install itself as a system app. Now I assume it is already a system app, but I'm not expert at this so I can't say for sure. Would you recommend me to install TWRP as a system app?
Rawrden said:
I followed these steps and I managed to install FreedomOS without any issues. My phone booted normally and after a few complimentary steps I booted back into recovery and... TWRP! No more stock recovery. Thanks a lot!
Just one more question: TWRP currently asks whether it is allowed to install itself as a system app. Now I assume it is already a system app, but I'm not expert at this so I can't say for sure. Would you recommend me to install TWRP as a system app?
Click to expand...
Click to collapse
Great! Glad that worked. I guess it's all about how that first boot to the OS occurs.
Anyway: Your question, I'm assuming is about TWRP "Manager" the app? If so, yes, it should be a system app. The thing is that "Official TWRP Manager" doesn't really do much of use that you wouldn't just as soon do from fastboot, so it's not critical and nothing other than TWRP manager will "not work" regardless of what you designate it. All saying it's a system app does is puts a slot for it in Magisks "root table".
Cheers.
hachamacha said:
Great! Glad that worked. I guess it's all about how that first boot to the OS occurs.
Anyway: Your question, I'm assuming is about TWRP "Manager" the app? If so, yes, it should be a system app. The thing is that "Official TWRP Manager" doesn't really do much of use that you wouldn't just as soon do from fastboot, so it's not critical and nothing other than TWRP manager will "not work" regardless of what you designate it. All saying it's a system app does is puts a slot for it in Magisks "root table".
Cheers.
Click to expand...
Click to collapse
Done! Can I just say how grateful I am to you for helping me out with this? Your answers have been extremely detailed and I've learned quite a few things. Unfortunately I can only thank your posts once, because you've earned more than that. Thanks again and keep being awesome!

Categories

Resources