[WIP] Ideapad K1 CWM recovery port - Thinkpad Tablet General

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/

Related

[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!

[Q] Rooted, booting, no recovery.

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

Need Major Help

I have been trying for a week now to restore a nook color back to stock with no avail. When I started there was no boot image or stock recovery and it would only boot from a CWR sd card but not mount or read the sd card to install any zip files Now i have it booting with the stock boot image but only to the "n" screen and no further. I have tried the factory recovery and reset but get nothing. I have a PC with a working ADB install but am unable to "push" the system.img to the sd card or anywhere for that matter and then dd it to the correct block on the internal memory. I am also unable to boot CM7 from the sd card because it freezes during the install. So basically what I'm asking for, is help fixing this darn thing cause I'm tired of it kicking my ass. thank you in advance for the info.
Sounds like your emmc partitions are messed up. Go to my partition repair thread linked in my signature. But if you cannot flash any zips, my repairs will not work. Try using my CWM bootable card from my tips thread also linked in my signature. Put the repair zips on the boot card before you boot.
Sent from my Nook Color running ParanoidAndroid and Tapatalk
leapinlar said:
Sounds like your emmc partitions are messed up. Go to my partition repair thread linked in my signature. But if you cannot flash any zips, my repairs will not work. Try using my CWM bootable card from my tips thread also linked in my signature. Put the repair zips on the boot card before you boot.
Sent from my Nook Color running ParanoidAndroid and Tapatalk
Click to expand...
Click to collapse
I will try both when i get home from work and let you know how it works. Thanks.
steve_o2291 said:
I will try both when i get home from work and let you know how it works. Thanks.
Click to expand...
Click to collapse
ok so after reading your links i have tried both of those methods already and neither of them works. I am beginning to wonder if i don't just have a group of six bad sd cards. They will boot CWR and begin the install of CM7 but thats as far as they get. I have tried everything I can find on forums and nothing works so far. If i could just get the system.img pushed with adb then i think that would get it but it just won't work.
I have also read about the system not loading if the serial number is not on it but I have done some file searching and found that it is in place so i don't think thats the prob. If you could think of anything different that would be awesome but I think I'm about to the point of having to bring it to B&N for service or just replace it.
Is there a place i could put the system image for the factory reset to take care of the install on its own.
steve_o2291 said:
Is there a place i could put the system image for the factory reset to take care of the install on its own.
Click to expand...
Click to collapse
Go to my tips thread and I have a new section about 8 failed boots. But you need the stock recovery on /boot for it to work. I know you cannot flash my stock recovery zip, but you could open the zip and extract the uRecImg and uRecRam and push them with adb to /boot (mount /dev/block/mmcblk0p1 as /boot first). Then follow my guide on how to do the 8 failed boots. That should wipe your device (including media) and install the original stock on your system.
leapinlar said:
Go to my tips thread and I have a new section about 8 failed boots. But you need the stock recovery on /boot for it to work. I know you cannot flash my stock recovery zip, but you could open the zip and extract the uRecImg and uRecRam and push them with adb to /boot (mount /dev/block/mmcblk0p1 as /boot first). Then follow my guide on how to do the 8 failed boots. That should wipe your device (including media) and install the original stock on your system.
Click to expand...
Click to collapse
Ive already got the stock recovery on /boot but 8 failed boots still does nothing because i have system.img for it to recover. I have all the partitions formatted the way they are supposed to be with fdisk but i still can't push the system.img to sdcard because it can't find it and if i try to put it on the nook i either get a protocol error or not enough room on the device error.
steve_o2291 said:
Ive already got the stock recovery on /boot but 8 failed boots still does nothing because i have system.img for it to recover.
Click to expand...
Click to collapse
I don't understand what you mean, you 'have system.img for it to recover'. The 8 failed boot uses factory.zip in partition 3 and if it enters the process (via stock recovery), it clears data and flashes that.
leapinlar said:
I don't understand what you mean, you 'have system.img for it to recover'. The 8 failed boot uses factory.zip in partition 3 and if it enters the process (via stock recovery), it clears data and flashes that.
Click to expand...
Click to collapse
I didn't realize i had to have facotry.zip on p3. I am going to try to dd it there and see what it does from there
Ok just tried like that and still get the install failed screen.
steve_o2291 said:
I didn't realize i had to have facotry.zip on p3. I am going to try to dd it there and see what it does from there
Ok just tried like that and still get the install failed screen.
Click to expand...
Click to collapse
Where did you get your factory.zip? Did you just rename a stock zip? It looks the same but I'm not sure everything is. When it says install failed, did the recovery start and fail or did it say that right off? Are you sure the recovery you used is the real stock recovery? You cannot just remove kernel-recovery and ramdisk-recovery from the stock zip and push those as uRecImg and uRecRam. Those get patched as the rom installs. Take the ones from my zip and push them. They are the patched versions.
You say you dd it but I hope you mean push to the mounted partition.
leapinlar said:
Where did you get your factory.zip? Did you just rename a stock zip? It looks the same but I'm not sure everything is. When it says install failed, did the recovery start and fail or did it say that right off? Are you sure the recovery you used is the real stock recovery? You cannot just remove kernel-recovery and ramdisk-recovery from the stock zip and push those as uRecImg and uRecRam. Those get patched as the rom installs. Take the ones from my zip and push them. They are the patched versions.
You say you dd it but I hope you mean push to the mounted partition.
Click to expand...
Click to collapse
I am unable to mount /dev/block/mmcblk0p1 in shell with a /boot directory. gives me a "Device or resource busy". so i just pushed the recovery files to /boot with
"adb push XXXX /boot"
and yes the recovery starts to load then fails
If i do
adb mount /boot
I get the help menu for a wrong entry
and i used the files from your download for the factory recovery
steve_o2291 said:
I am unable to mount /dev/block/mmcblk0p1 in shell with a /boot directory. gives me a "Device or resource busy". so i just pushed the recovery files to /boot with
"adb push XXXX /boot"
and yes the recovery starts to load then fails
If i do
adb mount /boot
I get the help menu for a wrong entry
Click to expand...
Click to collapse
Boot must already be mounted by CWM.
Just do an 'adb mount' command and it will tell you the things already mounted.
As for dd'ing the system.img to p5, can't you just dd it with adb from your PC?
And the factory.zip? You pushed that to p3?
leapinlar said:
Boot must already be mounted by CWM.
Just do an 'adb mount' command and it will tell you the things already mounted.
As for dd'ing the system.img to p5, can't you just dd it with adb from your PC?
And the factory.zip? You pushed that to p3?
Click to expand...
Click to collapse
yes i pushed factory.zip to p3
as for dd'ing system.img to p5 with adb i have to do dd with a shell command and i errors out when i try to push it data so i can't dd it to p5
this would be a lot easier if the damn sd card would work. I have no clue why it isn't because it worked fine until it crashed
Try formatting the SD with an SD formatting program (in a USB card reader, not your PC's internal slot). Sometimes SDs formatted with PCs are not readable in the nook. Search the net for one.
leapinlar said:
Try formatting the SD with an SD formatting program (in a USB card reader, not your PC's internal slot). Sometimes SDs formatted with PCs are not readable in the nook. Search the net for one.
Click to expand...
Click to collapse
Already did that several times with multiple cards on different machines. One with windows the other a mac
One final suggestion. Use my CWM SD (version 5.5.0.4) since it has the option of flashing things from internal memory.
Do an 'adb mount' to verify that p8 is mounted. If it isn't, mount it. Then push the zips that you want to flash there. Then the new CWM can flash from there.
Tried that just now and 5.5.0.4 tells me no zip found. I guess this is something that'll have to be done by a professional. After a week of trying and trying again I don't think Im going to be able to do it because I've tried everything i can find on the net and nothing works except for get the factory boot image back in place and getting the factory recovery to start but won't install anything. The factory reset also starts and erases all data but won't still only boots to the "n" screen. thanks for the help

[Q] Complete NOOB with a question

OK, so here is the backround...This is my very first Android device (S4 MK2 4.3) ever. I been on the Iphone since standing in line for the original release, so I have absolutely experience with Android at all.
I got my phone and Rooted it on day one. I'm on the stock ROM. Day two I decided to so a Wifi Hotspot Mod by replacing the .odex and .jar files. On reboot, I discovered I had soft bricked my phone when it got stuck on the yellow Sprint screen. I gave my self a quick crash course, and fixed the issue by flashing stock MJA with Odin 3.7 and then OTA update to MK2, then re-rooted.
My question is to do with the Wifi hotspot mod. I have found a huge amount of information out there, but there seems to be conflicting information as to if I can actually do this with the 4.3. Could someone please confirm if there is a hotspot mod that is compatible with the MK2 4.3 and maybe guide me to some info?
Thanks in advance for your help.
You can try this :
http://forum.xda-developers.com/showthread.php?p=48590490
It's a zip file just flash it through a custom recovery.
Sent from my Nexus 5 using Tapatalk
BIGSAMDA1ST said:
You can try this :
http://forum.xda-developers.com/showthread.php?p=48590490
It's a zip file just flash it through a custom recovery.
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
This link above, post 337.
Outstanding, thanks for the quick replies!
My next question is about stock recoveries. I was trying implement the Clockwork recovery mod. When I started ROM Manager, the only installation file listed was for Sprint S4 jfltespr. My confusion was with the jfltespr. I was expecting to see one for MK2 or MJA. Is the jfltespr like a catch all for any Sprint phone?
Jfltespr is the sprint gs4.
Sent from my SPH-L720 using Tapatalk
daniel4653 said:
Jfltespr is the sprint gs4.
Sent from my SPH-L720 using Tapatalk
Click to expand...
Click to collapse
Awesome! Thanks for the the quick helpful responses and being NOOB friendly I'm sure I will be back.:laugh:
newest problem
Sorry to post another problem so soon, but I'm having problems backing up using clockworkmod 6.0.4.4
So I did the clockworkmod install through ROM Manager. When I select to Backup Current Rom it boots me into recovery mode. Once there it tries to mount the sd card. It counts down from 20 to 1 and finally times out. At the end of that I get this: Error processing rom manager script.
I'm not sure what I'm doing wrong here. The micro sd is formatted in FAT32
Any ideas?
Install goomanager.
Then use THAT to install custom recovery (CWM or TWRP).
Once installed open it.
Then Hit Menu button and select “Install OpenRecoveryScript” (jfltespr is for Sprint). Once installed it will tell you it's done.
You can then use GooManager to 'reboot to recovery'.
Rom Manager uses a 'temp recovery' that often doesn't work.
leaderbuilder said:
Install goomanager.
Then use THAT to install custom recovery (CWM or TWRP).
Once installed open it.
Then Hit Menu button and select “Install OpenRecoveryScript” (jfltespr is for Sprint). Once installed it will tell you it's done.
You can then use GooManager to 'reboot to recovery'.
Rom Manager uses a 'temp recovery' that often doesn't work.
Click to expand...
Click to collapse
K, I did that but when I try to manually boot into recovery it hangs on the teamwin screen for a little while. Eventually it launches the GUI and I can initiate a backup, but this is what happens:
E:unable to mount '/data'
E: unable to recreate /data/media folder
updating partition detals...
E:unable to mount '/data'
E:unable to mount internal storage
E:unable to mount/data/media during gui startup.
running boot script...
finished running boot script.
E:unable to mount /data/media/twrp/.twrps when trying to read settings f
E:unable to mount '/data'
E:unable to mount '/data'
E:unable to mount '/data'
E:updating partition details...
E:unable to mount '/data'
*total number of partitions to back up: 3
*total size of all data: 2073mb
*available space 28041mb
[backup started]
*backup folder: /external_sd/twrp/backups/1e0bf818/1970-01-08--02-24-1
backing up system...
breaking backup file into multiple achives...
*generating md5...
*md5 created.
E:unable to mount '/data'
My progress bar gets maybe 1/4 of the way complete and then the message at the top of the screen changes to
Backup Complete
Failed
I'm not sure what I'm missing. I tried this twice with the same outcome.
I did just notice that it added 1.9 gigs of data to my card. The files are
boot.emmc.win
boot.emmc.win.md5
system.ext4.win000
system.ext4.win001
system.ext4.win000.md5
system.ext4.win001.md5
Does this mean that it was actually successful event though I had the unable to mount and failed messages???
In twrp >advanced fix permisions.
Also check the size of storage you have left on your ExternalSD.
You may also want to flash Reverpats repacked TWRP v. 2.6.3.1 in recovery - now that you have recovery.
Grab it here
Put on your ExternalSD, boot to recovery, install zip from externalsd.
Then reboot 'RECOVERY'.
Repair permissions, reboot phone completely. Then back to recovery and try backup again.
chunter001 said:
I did just notice that it added 1.9 gigs of data to my card. The files are
boot.emmc.win
boot.emmc.win.md5
system.ext4.win000
system.ext4.win001
system.ext4.win000.md5
system.ext4.win001.md5
Does this mean that it was actually successful event though I had the unable to mount and failed messages???
Click to expand...
Click to collapse
you're missing like half of your stuff. you can also fix permissions in rom manager if you have that instead of twrp. i'm far from expert status, but maybe try changing your default backup format (in the backup and restore part of recovery mode) to tar?
Could also try PC Odin the recovery tar(s) either twrp, CWM or Philz (CWM based). They're here just search.
leaderbuilder said:
Could also try PC Odin the recovery tar(s) either twrp, CWM or Philz (CWM based). They're here just search.
Click to expand...
Click to collapse
Sorry, but I'm completely new to this. Would I just get the .tar for the recovery and put it to PDA just like a stock ROM?
yes
Just can't get it to work. Here is question, since I already have custom recovery I just can't save a backup...is there another way to backup the ROM? Maybe to my computer, then I could just transfer it to my externalSD?
So this is pretty much where I am stuck
Ok, so I got the phone rooted, custom recovery installed, and the one mod that I really needed flashed. I am unable to backup my phone with either Clockwork or TWRP. Both tell me that data can't be mounted.
Is there another way that I could save a nandroid backup to my computer, then move it to my external sd card to be flashed through the custom recovery if needed?
Any help would be appreciated.

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