Compiled ROW CWR image and ROW diff discussion - Thinkpad Tablet Android Development

UPDATE(Feb 07, 2012): Updating this with most recent info and installation instructions:
ROW 16GB with /data/sdcard fix
http://everyrandom.com/files/download.php?file=381ventana_recovery_row_16.img
ROW 32GB with /data/sdcard fix
http://everyrandom.com/files/download.php?file=165ventana_recovery_row_32.img
ROW 64GB with /data/sdcard fix
http://everyrandom.com/files/download.php?file=656ventana_recovery_row_64.img
Again, use at your own risk. 32GB and 64GB versions have not been tested.
NOTE: Backup has been tested, but recovery hasn't, though I'd be surprised if it didn't. This is a USE AT YOUR OWN RISK image. Also, I noticed my tablet rebooted once or twice while attempting to backup. This was likely due to the 9% battery indicator, but I figure I'd warn you just in case. If you leave your tablet to backup and you get back to it and you see your launcher unlock screen, it rebooted and likely didn't finish so you'll have to try again(again, I'm pretty sure this was just due to me having run down my battery).
WARNING: The following assumes you haven't installed any CWR image yet. If you've already installed CWR successfully, follow the 'Update Steps'.
Installation Steps:
Code:
adb push recovery_ventana_row16.img /data/local/
adb shell
su
mount -o rw,remount /system
cp /system/etc/install-recovery.sh /system/etc/install-recovery.sh.backup
echo "#!/system/bin/sh" > /system/etc/install-recovery.sh
dd if=/data/local/recovery_ventana_row16.img of=/dev/block/mmcblk0p1
Uninstallation Steps:
Code:
adb shell
su
mount -o rw,remount /system
cat /system/etc/install-recovery.sh.backup > /system/etc/install-recovery.sh
dd if=/system/recovery-from-boot.p of=/dev/block/mmcblk0p1
Update Steps:
Code:
adb push recovery_ventana_row16.img /data/local/
adb shell
su
mount -o rw,remount /system
echo "#!/system/bin/sh" > /system/etc/install-recovery.sh
dd if=/dev/block/mmcblk0p1 of=/data/local/recovery_backup_image.img
dd if=/data/local/recovery_ventana_row16.img of=/dev/block/mmcblk0p1
If CWR randomly reboots on you when you either try to do a backup or simply stay on the menu too long, try the following(thanks stewarta):
Boot into CWR. Then select to reboot the device(not "Reboot recovery", just the normal reboot).
Allow it to boot into full Android.
Reboot the device again and re-enter CWR. It should no longer be rebooting.
I don't know why the above happens or fixes it. If it doesn't work for you, please do the following:
Boot into CWR. Either wait at the menu screen or attempt a backup(we want to provoke a reboot)
On reboot, hit Vol+ to enter CWR again.
Select 'Advanced'.
Select 'report recovery'. It will tell you at the bottom where the log is stored. Make a note of it.
Boot into full Android and use your favourite file manager to get the log. Paste its contents in this thread.
And once again thanks to Koshu, logxen and jcase and everyone else involved. They did most of the work. I mostly just hit "make".
____________________________________
So with that out of the way:
The kernel is the only change between jcase's port and the ROW version. The BuildConfig and such are untouched.
So why does it work? I would imagine a recovery image would be beyond caring about region of even the kernel version of the main OS. I can't imagine they'd have altered the hardware between builds, especially as ROW merits as much attention as bundling Canada and Berlin...
So, any ideas as to what could cause the difference? Could it be the nvflash signing keys? Could there be a driver inconsistency? Anyone have any ideas on how to troubleshoot at that level seeing as it doesn't look like Android even logs anything that early in the boot process.

Many thanks to realyst2k and every one made this work.
Just wondering can we replace the ROW rom with the US rom in CWR? The lenovo ftp already has a US image.

fhing said:
Many thanks to realyst2k and every one made this work.
Just wondering can we replace the ROW rom with the US rom in CWR? The lenovo ftp already has a US image.
Click to expand...
Click to collapse
I didn't do anything but make using the ROW kernel extracted from my tablet. Koshu and jcase deserve those thanks more than I.
As far as a US image, go to the following post. Koshu has US CWR images for all models.
http://forum.xda-developers.com/showpost.php?p=21992089&postcount=106

Once again thank you realyst2k for compiling CWR for ROW.
I have TPT ROW 16GB. I backuped with no problem. Only one question, when backuping /data folder it skips /data/media folder which is internal memory same as /mnt/sdcard. From one side it's OK because it can contain up to 10G data and it would be hard to backup it, but from other side resetting to factory defaults also deletes /mnt/sdcard and so you need backup it also. I am little confused?!?!?! What is the situation in other tablets with internal storage?

It skips that mountpoint on purpose. I believe this is how the Transformer does it too. The reasoning aside from potentially gigantic backups and recoveries, is that it can also prevent a proper backup since it could easily overpower the filesystem on some SD cards(especially if you consider the 32GB model).
It's not needed in any case. CWR is made to do a NAND backup, which are your OS files and such. You can use Titanium Backup if you need to backup your media.

@realyst2k:
(SOLVED)

stewarta said:
@realyst2k:
I couldn't get this to work:
I followed the UPDATE steps but even though the file permissions are okay (rw-rw-rw) it could not read the file at the last step. Probably something simply ....
Click to expand...
Click to collapse
Make sure the image file actually is in your /data/local directory(you can use a file manager like root explorer).
If it's named differently(remember, it's case sensitive), adjust the name in the dd command accordingly.
If it isn't there, put it there(again, you can use root explorer if you have trouble using the the adb push command).

realyst2k said:
Make sure the image file actually is in your /data/local directory(you can use a file manager like root explorer).
If it's named differently(remember, it's case sensitive), adjust the name in the dd command accordingly.
If it isn't there, put it there(again, you can use root explorer if you have trouble using the the adb push command).
Click to expand...
Click to collapse
Thanks for the speedy reply. That was the first thing I checked .... the second was that I can still do Nand backups ... and I can. I'll copy it into the directory and try that command line again.
---------- Post added at 03:31 AM ---------- Previous post was at 02:54 AM ----------
realyst2k said:
Make sure the image file actually is in your /data/local directory(you can use a file manager like root explorer).
If it's named differently(remember, it's case sensitive), adjust the name in the dd command accordingly.
If it isn't there, put it there(again, you can use root explorer if you have trouble using the the adb push command).
Click to expand...
Click to collapse
@realyst2k: Guess what it was .... the download file name is ventana_recovery_row_32.img. Compare that with the command line below ...
dd if=/data/local/recovery_ventana_row_32.img of=/dev/block/mmcblk0p1
So that was never going to work until I renamed the file. Duh! Boots into CWR, so I did my usual trick of booting into CWR, doing nothing and booting back into Android OS. Now back in CWR and doing a Nandroid backup without any issues at all. So thank you once again.
Might uninstall CWR over Easter and get OTA2. Perhaps not ... might just wait for ICS in May/June.

OTA 2 and Root with CWR
@realyst2k Being impatient, I decided to rename the install-recovery.sh and the install-recovery.sh.forrecovery and install the OTA and see what was what.
It installed fine. I've lost root, so I will have a go at using the original method of rooting the TPT. Oddly, Root Explorer works, but SuperUser (chainsdd) is not logging this fact. NSTools seems to work as well (reports the scheduler is Noop).
Anyway, long story short, I will report more tomorrow. When I have more time.
Happy Easter.

OTA2 = No Root
(SOLVED)

OTA 2.5 + Root + CWR
Yay! I am back in business with root after installing OTA 2.5. For the low down, use this new exploit. But make sure you have the right drivers and lines in the android_winusb.inf file (Do a check using adb devices in a command window while the TPT is connected and in recovery mode. If no device is reported go into Win Device Manager and check out if you have Android phone showing or Portable device with a MTP driver--the latter is WRONG and you need to get the correct driver loaded otherwise you get the errors being reported by many others):
Code:
[Google.NTamd64]
;
;NVIDIATegra
%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100&MI_01
;
;NVIDIA Tegra %SingleAdbInterface% = USB_Install, USB\VID_17EF&PID_741C
%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741C&MI_01
;
;Lenovo Think Tablet
;%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741B&MI_01
;%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741C&MI_01
;%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741D&MI_02
;%CompositeAdbInterface% = USB_Install, USB\VID_17EF&PID_741E&MI_02
His script does work. Even without a factory reset. So now I have 0089_ROW with root. And yes, I am now using 'Root Keeper' from Play Store.
And before you ask, realyst2k's method of gaining CWR works. Just make sure your first boot in CWR is only to reboot back into the OS. Then on your next boot into CWR, you can do a Nandroid backup without any unintended boots and the like. This means boot into CWR from shutdown using Vol+ and Pwr, then Vol+ after the vibration (do not use such as Rom Manager). Enjoy!

Doesn't work for my TPT 64GB.
I'm ready to trace/play/debug/... to get it work

I'm still working on it but for some reason I have the MTP USB and the Android Phone listed in Device Manager, I thought it was suppose to be one or the other.
Also, if I'm reading your post right I should check in windows device manager while the tablet is in recovery, correct? That is when I see Android Phone > Lenovo ThinkPad Tablet ADB Interface and farther down Portable Devices > MTP USB Device. The MTP USB Device always tries to install whenver I plug or unplug the tablet and always fails, but the Android Phone part always does fine.
For what it's worth it didn't matter that I had both devices that ended up working.

josh451 said:
I'm still working on it but for some reason I have the MTP USB and the Android Phone listed in Device Manager, I thought it was suppose to be one or the other.
Also, if I'm reading your post right I should check in windows device manager while the tablet is in recovery, correct? That is when I see Android Phone > Lenovo ThinkPad Tablet ADB Interface and farther down Portable Devices > MTP USB Device. The MTP USB Device always tries to install whenver I plug or unplug the tablet and always fails, but the Android Phone part always does fine.
For what it's worth it didn't matter that I had both devices that ended up working.
Click to expand...
Click to collapse
Yes, I think that as long as the Android phone driver from Lenovo is there it will work. But if it is Portable Devices > MTP USB Device on its own, it will not. Well done!

I'm an idiot !
Links are not dead, for those looking for files you need to wait for a reservation ticket. Too impatient

Great work, thx!
As a TPT 32Gb user, had to rename files on cmdline then all went well.
Just one question: any way to activate emmc instead of using external SD to work with recovery?
I do know it is achieving by patching recovery.fstab, but don't know what exactly should be added..

As for differencies:
My try was to install WE system image on ROW, I succeed. After trying to install also boot image it loops at first lenovo logo.. and as kernel source is common the remainig thing is ramdisk oO

i have CWM-based Recovery v5.0.2.7
trying to load firmware:
ThinkPadTablet_A310_03_0069_0121_ROW.zip
or
ThinkPadTablet_A310_02_0039_0089_ROW.zip
- install zip from sdcard
- toggle signature verification
- choose zip from sdcard
Choose any of the
ThinkPadTablet_A310_03_0069_0121_ROW.zip
ThinkPadTablet_A310_02_0039_0089_ROW.zip
and get a 20-30%% check the exact same error:
E:failed to veryfy whole-file signature
E:signature verification failed
Installation aborted
if you try to upgrade without checking the signature, I get this error:
assert failed: getprop ("ro.producrt.devices") == "Indigo" || getprop ("ro.producrt.product") == "Indigo"
E: Error in sdcard/ThinkPadTablet_A310_.................
(Status7)
Installation aborted
anyone have any ideas what? to upgrade
recovery of stock recovery (Uninstallation Step) it does not help
TPT refuses to respond to the button VOL+ and continue to load.

the problem was resolved. need to recover after the stock bootloader
adb shell
$ su
dd if=/system/recovery-from-boot.p of=/dev/block/mmcblk0p1
Click to expand...
Click to collapse
TWICE TPT reboot, reboot, and the second is already possible to enter the recovery boot (Vol+)
---------- Post added at 05:05 PM ---------- Previous post was at 05:02 PM ----------
new problem: how to install the CWM on 0121_ROW firmware. instruction from the first post does not fit.

CWM Recovery and ICS 4.0.3
Anyone got a CWM Recovery for ICS 4.0.3. ICS sure brings the TPT alive ... but I'd like to be able to do a Nandroid backup so I can stay that way. OTARootkeeper ensured I have root access, so that is a big help.
---------- Post added at 08:16 AM ---------- Previous post was at 08:03 AM ----------
Driver'z said:
i have CWM-based Recovery v5.0.2.7
trying to load firmware:
ThinkPadTablet_A310_03_0069_0121_ROW.zip
or
ThinkPadTablet_A310_02_0039_0089_ROW.zip
- install zip from sdcard
- toggle signature verification
- choose zip from sdcard
Choose any of the
ThinkPadTablet_A310_03_0069_0121_ROW.zip
ThinkPadTablet_A310_02_0039_0089_ROW.zip
and get a 20-30%% check the exact same error:
E:failed to veryfy whole-file signature
E:signature verification failed
Installation aborted
if you try to upgrade without checking the signature, I get this error:
assert failed: getprop ("ro.producrt.devices") == "Indigo" || getprop ("ro.producrt.product") == "Indigo"
E: Error in sdcard/ThinkPadTablet_A310_.................
(Status7)
Installation aborted
anyone have any ideas what? to upgrade
recovery of stock recovery (Uninstallation Step) it does not help
TPT refuses to respond to the button VOL+ and continue to load.
Click to expand...
Click to collapse
Slip across here as there may be quite a few reasons for this.

Related

[Q] Recovery Flashing Error

After I got my nexus back from HTC for a faulty power button, my nexus has been rooted via a replaced motherboard. Now I have already root my phone and unlocked the bootloader, however when I try to flash the recovery image I get
sending 'recovery' (4074 KB)... OKAY
writing 'recovery'... FAILED (remote: image update error)
Also I can somehow access recovery, and it looks as it should. However when I try to backup my rom it says "Run 'nandroid-moblie.sh' via adb!" and similar things when I try any other the other options. Could someone please help with this?
How are you trying to flash it? Fastboot is the best foolproof way to do flash the recovery. I have never really seen that error before, what recovery are you trying to flash?
Your nandroid error is most likely because the sdcard thinks it's still mounted, or is mounted. Also, I don't know if this still happens but make sure you only do a backup, not backup +ext if you don't have an ext partition on the sdcard.
he's obviously using fastboot...
Did you make sure recovery.img had the right MD5 hashes as amon_ra posted?
I have check the MD5 checksums, and they match up. Also, i am using fastboot to flash, and I am trying to flash RA-nexus v2.0.0. Are you suggesting that I remount the sd card to get it to flash the recovery image?
cajer said:
I have check the MD5 checksums, and they match up. Also, i am using fastboot to flash, and I am trying to flash RA-nexus v2.0.0. Are you suggesting that I remount the sd card to get it to flash the recovery image?
Click to expand...
Click to collapse
I would suggest you try in command line with the adb commands as follows:
adb shell
su
mount -o rw,remount /dev/block/mtdblock4 /system
cat /sdcard/flash_image > /system/bin/flash_image
chmod 775 /system/bin/flash_image
flash_image recovery /sdcard/recovery.img
rm /system/etc/install-recovery.sh
rm /system/recovery-from-boot.p
reboot recovery
You need flash_image for this, check the wiki for the file...don't forget to put the recovery in the root of the sdcard and rename it to recovery.img for convenience purpose
gravufo said:
I would suggest you try in command line with the adb commands as follows:
adb shell
su
mount -o rw,remount /dev/block/mtdblock4 /system
cat /sdcard/flash_image > /system/bin/flash_image
chmod 775 /system/bin/flash_image
flash_image recovery /sdcard/recovery.img
rm /system/etc/install-recovery.sh
rm /system/recovery-from-boot.p
reboot recovery
You need flash_image for this, check the wiki for the file...don't forget to put the recovery in the root of the sdcard and rename it to recovery.img for convenience purpose
Click to expand...
Click to collapse
What do I do with flash_image? Also this device came back stock with frg 83, which I am trying to flash the recovery on. When I type in adb shell, I get "error: device not found" even though I can see it through "fastboot devices".
cajer said:
What do I do with flash_image? Also this device came back stock with frg 83, which I am trying to flash the recovery on. When I type in adb shell, I get "error: device not found" even though I can see it through "fastboot devices".
Click to expand...
Click to collapse
flash image has to be placed in the root of your sd card as well as the recovery!
As for the adb shell, try enabling USB Debugging in Setting > Applications > Development
Make sure you're rooted too (use SuperOneClick if you're not already)
I can get through that string of commands until
rm /system/etc/install-recovery.sh
rm /system/recovery-from-boot.p
reboot recovery
Then it says "No such file or directory". I have already rooted, and both the flash_image and recovery file have been placed in the root directory of the sd card.
Well, after you did that string of commands, does the problem persist?
Also, do you have at least 400MB free on your SD card?
Well, I can't get
rm /system/etc/install-recovery.sh
rm /system/recovery-from-boot.p
reboot recovery
to work as it responds with "No such file or directory". Even if I go through after the errors, the recovery still gives 'nandroid-moblie.sh' via adb!" and similar messages. Do I need to find a way to put the file install-recovery.sh in my sd card root directory if so, where can I get it? In addition when I try to flash recovery with nexus one superboot I get "(remote: signature verify fail)" even though the MD5 sum matches up.
Yes I have over 5 gbs on the sd card.
rm = remove
The steps you are trying to perform with the 2 rm command is to remove the 2 files that automatically rewrite your recovery.
If you reboot without succeeding in removing these files, the recovery image you just flashed will be written over by the stock recovery...
Since you have rebooted, and are still having the problem, you need to do the whole list of commands again... be careful how you type...
Sent from my Nexus One using XDA App
Danger, it seems as I can't remove those two files as I get the error message "rm failed for /system/etc/install-recovery.sh, No such file or directory". Any ways to successfully remove them?
Sounds like the files aren't actually there then, unless you're making a typing error...
Did your recovery update after the last attempt? Did it look different, what is the recovery version that is listed on the recovery screen?
Sent from my Nexus One using XDA App
I have been flashing different themed recoveries to see if any data transfers, and the background changes. But as before the actions all say "Run 'nandroid-moblie.sh' via adb!" or something similar.
cajer said:
I have been flashing different themed recoveries to see if any data transfers, and the background changes. But as before the actions all say "Run 'nandroid-moblie.sh' via adb!" or something similar.
Click to expand...
Click to collapse
if the rm doesn't work it's fine.
But what about your flashing command? It simply works or outputs an error too?
When u flashed themed ones, did the background change?
The background did change when I flashed the themed ones, however it still outputs errors like "Run 'nandroid-moblie.sh' via adb!" when i try to run any of the options under recovery. The fastboot flashing command gives this "writing 'recovery'... FAILED (remote: image update error)" error.
cajer said:
The background did change when I flashed the themed ones, however it still outputs errors like "Run 'nandroid-moblie.sh' via adb!" when i try to run any of the options under recovery. The fastboot flashing command gives this "writing 'recovery'... FAILED (remote: image update error)" error.
Click to expand...
Click to collapse
When you try running a NAND backup or restore a previous NAND?
When restoring, the backup must be at the exact position where it was when you did it: /sdcard/nandroid/HT#####/BCD######
I was trying to backup my current image, and this happens with all other actions even the shut down action on the recovery page just with "Run 'reboot -p' via adb!"
lawl xD that seems useful...
well, that's extremely odd to be honest...uhm...I think you should try and contact amon_ra if possible...He knows the code of his recovery and might know what's wrong...
I really have no clue, sorry =\
PS: Have u tried clockworkmod recovery?
Alright I will try contacting amon_ra, and I will try clockwork tomorrow. I was going for amon_ra recovery to get Sense HD on it with sd partition. Thanks for the help though I learned more stuff about my phone.
EDIT: Wow, clockwork installed like a charm, and I didn't even have to do anything. I'm now a clockwork convert.

How to restore your DS7

This may void your warranty, cost you your soul, and cause your spouse to leave you - ALL OF WHICH I AM NOT RESPONSIBLE FOR!
So, if it's because you screwed up flashing something, bricked your tablet with an OTA update after you installed CWM, or whatever, this is how you get it back to its outta-da-box shape!
(Please note, this assumes you have both installed CWM on your DS7 AND have installed the latest SDK on your computer).
1. Download the three attached .img files
2. Boot into CWM (since there really isn't anything else you can do)
3. In CWM, mount your SD card (so that you can view files via USB)
4. Plug in your DS7 to your computer, and copy the three .img files to the root of your SD card
5. Unmount your SD card, but leave the USB cable plugged into computer
6. Mount as many things as you can (ie system, boot, etc)
7. Open up command prompt, and navigate to your Android/tools folder, and type "adb devices"
8. There should be a number that shows up, or a "?" - either at this point is fine
9. Type the following command:
Code:
adb shell
a hash tag should show up that looks like this:
Code:
#~
10. Now, type the follow two commands one at a time:
Code:
flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
flash_image /dev/block/mmcblk3p1 /sdcard/recovery_orig.img
11. now, select "reboot" from DWM to reboot your device. It should boot and say something like "Formating Misc", and then it will reboot repeatedly
12. Use something small to push the RESET button on the DS7 (it's next to the SD card slot)
Your screen should go blank
13. Now, press and hold both the POWER button and the VOLUME - button until the screen comes on saying that the "fastboot downloader" is booted
14. Copy the three .img files into the your Android/tools folder
15. Now type the following code:
Code:
fastboot devices
16. There should be a number that shows up, or a "?" - either at this point is fine once again
17. Now type the following commands one at a time. The first will take a while to complete - this is okay:
Code:
fastboot flash system system_orig.img
fastboot flash recovery recovery_orig.img
fastboot flash boot boot_orig.img
Now, if after every command a "finished." is given, along with the total time each command took, you may continue.
18. You may now type the triumphant command:
Code:
fastboot reboot
Which will reboot your device.
Give it a little bit to boot, but when all is done you should see the original T-Mobile boot animation and everything.
Special thanks to DJ_Steve, bogdi1988, and [email protected] for all your help!
Needed files:
system_orig.img
recovery_orig.img
boot_orig.img
[Edit]
For those users who need the original "flash_image.zip" file, I have uploaded it and it is available here.
PS: As an added note: **** you Koush! From all of the DS7 community!
Just what was needed
sent from somewhere
thanks but if you would of search there was a thread made already but i am sure the more the marrier
mooch777 said:
This may void your warranty, cost you your soul, and cause your spouse to leave you - ALL OF WHICH I AM NOT RESPONSIBLE FOR!
So, if it's because you screwed up flashing something, bricked your tablet with an OTA update after you installed CWM, or whatever, this is how you get it back to its outta-da-box shape!
(Please note, this assumes you have both installed CWM on your DS7 AND have installed the latest SDK on your computer).
1. Download the three attached .img files
2. Boot into CWM (since there really isn't anything else you can do)
3. In CWM, mount your SD card (so that you can view files via USB)
4. Plug in your DS7 to your computer, and copy the three .img files to the root of your SD card
5. Unmount your SD card, but leave the USB cable plugged into computer
6. Mount as many things as you can (ie system, boot, etc)
7. Open up command prompt, and navigate to your Android/tools folder, and type "adb devices"
8. There should be a number that shows up, or a "?" - either at this point is fine
9. Type the following command:
Code:
adb shell
a hash tag should show up that looks like this:
Code:
#~
10. Now, type the follow two commands one at a time:
Code:
flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
flash_image /dev/block/mmcblk3p1 /sdcard/recovery_orig.img
11. now, select "reboot" from DWM to reboot your device. It should boot and say something like "Formating Misc", and then it will reboot repeatedly
12. Use something small to push the RESET button on the DS7 (it's next to the SD card slot)
Your screen should go blank
13. Now, press and hold both the POWER button and the VOLUME - button until the screen comes on saying that the "fastboot downloader" is booted
14. Copy the three .img files into the your Android/tools folder
15. Now type the following code:
Code:
fastboot devices
16. There should be a number that shows up, or a "?" - either at this point is fine once again
17. Now type the following commands one at a time. The first will take a while to complete - this is okay:
Code:
fastboot flash system system_orig.img
fastboot flash recovery recovery_orig.img
fastboot flash boot boot_orig.img
Now, if after every command a "finished." is given, along with the total time each command took, you may continue.
18. You may now type the triumphant command:
Code:
fastboot reboot
Which will reboot your device.
Give it a little bit to boot, but when all is done you should see the original T-Mobile boot animation and everything.
Special thanks to DJ_Steve, bogdi1988, and [email protected] for all your help!
Needed files:
system_orig.img
recovery_orig.img
boot_orig.img
PS: As an added note: **** you Koush! From all of the DS7 community!
Click to expand...
Click to collapse
Thanked using the Thanks button and Thanks for your post!
Just to remind me a little as I may miss something,
why we **** Koush? It is not his fault that we stuck at CWM, or is it????
jiwengang said:
Thanked using the Thanks button and Thanks for your post!
Just to remind me a little as I may miss something,
why we **** Koush? It is not his fault that we stuck at CWM, or is it????
Click to expand...
Click to collapse
No its not his fault.. people shouldn't have tried to install the ota update while having cwr installed.. instead should have waited for a zip of the update that hell posted on behalf of did steve. As I have said if you have cwr you really can't get ota updates and install them the normal way. If the update was an update.zip you could flash through cwr but dell uses pgk files not zip.. so the only way to update is to wait for a dev to release a flashable cwr zip fike
Sent from my HTC Glacier using XDA App
The reason I made this post was so that we could have one concise, iD10t proof solution for people who were dumb like me. There's other posts, but you have to go back and forth to get the solution.
And the "Koush-****ing" was because of his unannounced abandonment of his projects, and those he was working with.
And thank you for the kind thanks!
Sent from my Dell Streak 7 using XDA App
mooch777 said:
The reason I made this post was so that we could have one concise, iD10t proof solution for people who were dumb like me. There's other posts, but you have to go back and forth to get the solution.
And the "Koush-****ing" was because of his unannounced abandonment of his projects, and those he was working with.
And thank you for the kind thanks!
Sent from my Dell Streak 7 using XDA App
Click to expand...
Click to collapse
Did he retire completely?
graffixnyc said:
Did he retire completely?
Click to expand...
Click to collapse
Think so!
From my CM7 UrBan Glacier
Hi,
I am the situation described above as I tried the OTA and am now stuck in CWR.
I followed the directions putting the 3 files on the root of my DS7 and am stuck at the following:
~ # flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
failed with error: -1
~ #
Any ideas.....?
Thanks
SkI
Error 1
Error 1 means that the file is not where it is supposed to be. In this case on the SD card. Check and make sure that you have the right file, with the right file name on the root of your SD card and try again!
Good Luck
What does
"Error scanning partitions" means?...
jiwengang said:
What does
"Error scanning partitions" means?...
Click to expand...
Click to collapse
nvm, it is solved. don't use your own flash_image. use the stock one.
dj_ski69 said:
Hi,
I am the situation described above as I tried the OTA and am now stuck in CWR.
I followed the directions putting the 3 files on the root of my DS7 and am stuck at the following:
~ # flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
failed with error: -1
~ #
Click to expand...
Click to collapse
+1 same here...
I find that at step 3... I mount sdcard... it shows on PC... I copy the 3 files to drive... unmount sdcard... mount everything else... run the other commands then get error... when I repeat the process I notice the files I copied are not there... ?
so I tried to adb push the files... they say they went thru correctly... but still get the same result as above...
any ideas?
dfspot said:
+1 same here...
I find that at step 3... I mount sdcard... it shows on PC... I copy the 3 files to drive... unmount sdcard... mount everything else... run the other commands then get error... when I repeat the process I notice the files I copied are not there... ?
so I tried to adb push the files... they say they went thru correctly... but still get the same result as above...
any ideas?
Click to expand...
Click to collapse
when you adp push to sdcard, make sure you mounted it already.
after that , it always help to adb shell ls /sdcard to make sure all files are there.
then you go to adb shell,
use the stock flash_image to flash. remember point to the path to flash_image
eg. flash_image /dev/block/mmcblk3p2 /sdcard/boot_orig.img
my understanding, if you don't mount sdcard, you canot see your sdcard FROM the tablet's perspective.
I mean, for table's flash_image to work, it has to be able to access its drive, in this case, is sdcard 's content.
so did you try leave sdcard mount and do the command above?
Hey Team...
can someone help me find the stock flash_image plz.....
I soooooooooooooo happy I was able to fix my Streak 7......yahooooooooo
I was missing the correct flash_image file which i took from the Galaxy Tab flash_image which is the same for the Dell and follow the direction and I now up again.......
Thanks guys
chris73 said:
I soooooooooooooo happy I was able to fix my Streak 7......yahooooooooo
I was missing the correct flash_image file which i took from the Galaxy Tab flash_image which is the same for the Dell and follow the direction and I now up again.......
Thanks guys
Click to expand...
Click to collapse
What command did you do.
Sent from my HTC Glacier using XDA App
chris73 said:
I soooooooooooooo happy I was able to fix my Streak 7......yahooooooooo
I was missing the correct flash_image file which i took from the Galaxy Tab flash_image which is the same for the Dell and follow the direction and I now up again.......
Thanks guys
Click to expand...
Click to collapse
do I need to push flash_image to my tablet?
If I remember correctly it needs to be in the nvflash folder
Sent from my Dell Streak 7 using XDA Premium App

Motorola Milestone a853 Recovery / Open Recovery problem

Hello, as I said in the title, I have a problem with the recovery menu (Same with OR) - problem is I can boot in recovery (the screen with the triangle) but there can not go to the menu. I press Volume Up + camera and nothing happens. Remains the same screen with the triangle and phone.
Please give me a solution because my phone is moving very slowly with Android 2.2.x
Device - Motorola a853 Milestone
Bootloader - 90.78
Button on the camera work, as well as the volume.
What could be the problem?
Sorry for bad English ..
Come on guys, 26 views and no response to my question?
I searched all forums and tried all the solutions posted there, but none worked! But those were old solutions ...
No one knows who could be my problem?
Not sure what kind of problem you are facing. You can surely try this.
Looks like OR is not loading in ur case. You can download the latest OR, I'm using minimod OR, copy the update.zip file into the root of SD card, again reboot into recovery. If u find ur milestone stuck in triangle button try pressing volume up button. This time it should invoke the OR or it should ask u to update the zip file.
Still if it doesnt works i think u have to take advice from experts who can help u to use ADB comnands to troubleshoot further. Anyways best of luck.
Sent from my Milestone using xda app-developers app
like the last post, you should verify if you have OpenRecovery folder and update.zip file in your /sdcard.
You can try via adb or terminal emulation "reboot recovery"
I tried what you said nagabushan.c, but it does not work ... Always the same problem, no menu displays..
At least do u get exclamatory mark when u booted or milestone while pressing camera button ? Then give a sec gap and then press volume up button.
Any device both rooted or non rooted should display this.
Try ADB steps..
Let us know what u observe
Sent from my Milestone using xda app-developers app
nagabushan.c said:
At least do u get exclamatory mark when u booted or milestone while pressing camera button ? Then give a sec gap and then press volume up button.
Any device both rooted or non rooted should display this.
Try ADB steps..
Let us know what u observe
Sent from my Milestone using xda app-developers app
Click to expand...
Click to collapse
I see an exclamation mark only when you press power + x (bootloader 90.78).
I tried ADB steps..not working.
Have you verified OpenRecovery folder and its update.zip on sdcard? Try to re-download and unpack it fresh new.
What rom you said you currently have?
Have you installed vulnerable recovery?
Have you verified OpenRecovery folder and its update.zip on sdcard? Try to re-download and unpack it fresh new.
I tried, does not work ...
What rom you said you currently have?
Stock rom 2.2.x.
Have you installed vulnerable recovery?
Of course, just as there's no difference ... the menu does not show.
The menu should show. Any menu. Either from stock or OpenRecovery. I would try with a different sdcard because the older kernel (2.6.29) in recovery does not support some cards well. If the buttons are working and you have installed everything correctly then it should work. I'd try with different sdcard.
Alternatively, you can try to tell recovery to apply update.zip from sdcard automatically
Code:
echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
but note that I am not sure if you need to be rooted for that. I assume not. You can either install Terminal emulator from PlayStore or enable usb debbuging in settings and try to connect through adb if you choose to try.
To see if adb detects your device
Code:
adb devices
if all is OK you should get some output (aphanumeric) and after that 16 characters, it should display in what mode is your device (device for a normally booted system, recovery for device in recovery...)
And then
Code:
adb shell
echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
reboot
I'm no expert but it might be an unsupported sdcard...
mrvek said:
The menu should show. Any menu. Either from stock or OpenRecovery. I would try with a different sdcard because the older kernel (2.6.29) in recovery does not support some cards well. If the buttons are working and you have installed everything correctly then it should work. I'd try with different sdcard.
Alternatively, you can try to tell recovery to apply update.zip from sdcard automatically
Code:
echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
but note that I am not sure if you need to be rooted for that. I assume not. You can either install Terminal emulator from PlayStore or enable usb debbuging in settings and try to connect through adb if you choose to try.
To see if adb detects your device
Code:
adb devices
if all is OK you should get some output (aphanumeric) and after that 16 characters, it should display in what mode is your device (device for a normally booted system, recovery for device in recovery...)
And then
Code:
adb shell
echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
reboot
I'm no expert but it might be an unsupported sdcard...
Click to expand...
Click to collapse
Here's what I get from cmd:
C:\android-sdk\platform-tools>adb devices
List of devices attached
04037B7518003010 device
C:\android-sdk\platform-tools>adb shell
# echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
cannot create /cache/recovery/command: directory nonexistent
#
My device is rooted wth "superoneclick" method.
es7ar said:
cannot create /cache/recovery/command: directory nonexistent
Click to expand...
Click to collapse
Create it.
Code:
adb shell
mkdir -p /cache/recovery
mrvek said:
Create it.
Code:
adb shell
mkdir -p /cache/recovery
Click to expand...
Click to collapse
C:\android-sdk\platform-tools>adb shell
$ mkdir -p /cache/recovery
mkdir -p /cache/recovery
mkdir failed for -p, Read-only file system
$
Try without -p
Code:
mkdir /cache/recovery
mrvek said:
Try without -p
Code:
mkdir /cache/recovery
Click to expand...
Click to collapse
I created the folder "recovery" inside "cache" with root explorer.
Now cmd shows me: ( check attachments )
are you missing "echo"?
Code:
echo "--update_package=SDCARD:update.zip" > /cache/recovery/command
it simply writes what is in the first argument (in quotes) to file named "command" located in /cache/recovery
Edit: you can ommit adb devices. You just test the first time when you connect to be sure if adb detects your device. After that it should generally give "device not found" or something like that if connection to device is lost.
I do not understand ...
The command "echo" - update_package = sdcard: update.zip "> / cache / recovery / command" should create a file called "command" in the folder "recovery" from the "cache"?
If so, there is no file called "command"
Sorry, I'm newbie ... I do not want to stress you out.
Edit : Hmm ...
Instead of reboot, like you said, I typed "reboot recovery" then restated the phone ... and the loading bar appears. The phone has rebooted when it came to approx. 30% ..
es7ar said:
I do not understand ...
The command "echo" - update_package = sdcard: update.zip "> / cache / recovery / command" should create a file called "command" in the folder "recovery" from the "cache"?
If so, there is no file called "command"
Sorry, I'm newbie ... I do not want to stress you out.
Click to expand...
Click to collapse
Yes, it should create that file with that content, to instruct recovery to automatically apply update.zip.
You can try to create that file manually with the
Code:
--update_package=SDCARD:update.zip
content in it.
Could you post the content of
Code:
mount
executed in adb? i was sure you can write to cache, it should be mounted read-write.
---------- Post added at 03:32 PM ---------- Previous post was at 03:30 PM ----------
es7ar said:
Edit : Hmm ...
Instead of reboot, like you said, I typed "reboot recovery" then restated the phone ... and the loading bar appears. The phone has rebooted when it came to approx. 30% ..
Click to expand...
Click to collapse
hm...
could you please execute in adb:
Code:
ls -laR /sdcard/OpenRecovery /sdcard/*.zip
post output.
Okay, it looks like it was done!
You've explained it very well ... but I did not openrecovery and update.zip in sdcard.
I thank you so much for helping me! Thanks a lot!!
es7ar said:
but I did not openrecovery and update.zip in sdcard
Click to expand...
Click to collapse
That leads us back to the very begining of the process...

Bootloop after CM install. Won't restore backup, mount /data, flash stock

Hi developers. I am sorry for posting this. I spent the last week trying to solve it by myself with no hope. This is my second time installing something on a phone, but it is my only phone, so I beg anyone for a help...
-What I did:
Some days ago I downgraded to this ROM C5503_10.1.1.A.1.310_GLOBAL-LTE.ftf to use DoomLord rooting script. I did it with flashtool for linux and I applied his .bat step by step in the terminal since windows would not detect my phone.
It worked. I had root for some days, but I was still annoyed by sony default android. So I decided to install Cyanogenmod.
I unlocked the device with sony official system and wen't straight to this instructions, before the first reboot
wiki.cyanogenmod.org/w/Install_CM_for_yuga
I booted succesfully in CWM, followed everything as it says there. But that's where weird things happened:
-The problems:
-The backup
I tried, it wouldn't mount /sdcard. Since I don't understand much about this, I thought it was normal. The next choice was sdcard1, I backed up there. Or so I thought...
-The factory reset
I factory reset, again, not mounting sdcard. Here is the message that shows when I try this now:
can't mount /data!
Error mounting /sdcard.android_secure
Skipping format...
Data wipe complete.
Since it said it is complete, I went on installing the zip file from my sdcard1. Both CM 10.2.1 (dogo, the right one for my phone) and the appropriate GAPPS.
Now it loops on the CM loop animation and I have to remove the battery...
-The restore problem
It still boots on the recovery mode. So I tried recovering my backup from sdcard1. But the image name is 1970.01.01.00.03.16. And it says "md5 mismatch"
I tried flashing again the stock rom with flashtool. The proccess goes on but nothing happens. I still have CWM and the boot loop.
I read elsewhere someone with a similar problem who solved using sony "emma" software. I installed it, it won't even recocnize my phone.
It recocnizes that there is a phone, but don't know which one.
But that has alway been the case with windows. I haven't been able to do anything in windows other then accessing the sdcard (when the phone worked).
Is there something I can do? I imagine that somehow, for some reason, the /data and /sdcard partitions got corrupted. I imagine I would need to repartition this and install again, but I have no idea how this happens on phones...
I can mount /system /cache and /storage/sdcard1. just /data I can´t. Says "error mounting /data"
This is my only phone and a vey recent $400 thing. I was very stupid to do that withouth a replacement and really need this phone. I greatly appreciate any help...
I found this post forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/ searching the internet. Is it possible that this would solve my problem? or would it finish bricking the phone?
Here's what you'll need:
Working recovery, basic knowledge of adb & the shell
Parted (download here)
stock PB31IMG.zip
Note also that I had run unrevoked forever (so my phone was S-OFF) ... I'm not sure if that's required or not.
So, grab parted from the link above. Now you need to extract the individual binaries from the .zip (the 6 files in the sdparted folder within the zip), ideally to your android-sdk\tools directory. Now push all 6 files (adb push [file] /sbin/). Next, we need to make them useable, so go into the shell (adb shell). Change to your /sbin/ directory, and run: chmod 0755 <file> on each of the 6 files.
Now, we need to fix the partitions. This is assuming that the partitions are there, just the wrong format (which is what happened to me .. I accidentally made them FAT32 instead of ext). So, run the following: parted /dev/block/mmcblk0 mkfs ext2. It will ask if you want to continue, hit yes. When it asks for the partition number, enter 1. Next, when it asks for the format, enter ext2. Let it do its thing. Now, once it's done, run parted again. This time, enter partition 2 (everything else is the same).
Click to expand...
Click to collapse

[GUIDE] Upgrade 4.5.15 rooted & encrypted -> 5.0.2 WITHOUT DATA/SETTINGS LOSS

as usual, if anything goes wrong, no responsibility etc
The official update tutorial for rooted users doesn't keep app data, only internal storage! This tutorial keeps EVERYTHING
This method allows updating from 4.5.15 (unlocked, encrypted, rooted) to 5.0.2 without any data (sys settings + app data + user data) loss
A FAQ section is present at the end of this post and will be regularly updated.
List of files to download while doing the following steps:
OOS 5.0.2 ROM
Codeworkx TWRP recovery
Latest Magisk
Terms and software used in this guide:
Fastboot / Bootloader = bootloader of the phone, it's a very low level mode of the phone that allows booting into recovery. Can be accessed by using the advanced reboot menu (enable in dev options) or by "adb reboot fastboot".
Recovery = a small operating system on the phone that allows you to do various operations even when the main OS (Android) is broken. This includes flashing ROMs, modifying stuff on the storage, etc. It's the Android swiss army knife. If you can get a phone to boot TWRP, then you can do almost anything.
Magisk = rooting software that uses a systemless method to keep SafetyNet working. Systemless = instead of modifying the system, every change is put in a separate image that is mounted "over" the system. When the system tries to access a file modified by Magisk, instead of reading it from the partition, it reads it from Magisk. It's recommended to use Magisk instead of SuperSU as of 2018.
ADB = tool that allows controlling the phone from your PC through USB. You can use it when you're in Android if USB debugging is enabled in the settings, or when you're in TWRP. Here, we mostly use it for transferring files directly (without MTP) and running commands (using "adb shell")
Note: For this guide you will be required to download and install Magisk. If you don't want your phone to be rooted, then at the end of this guide reboot into TWRP, wipe both caches and re-flash the OS. This will uninstall Magisk and any other root patch. Beware: it will reflash stock recovery, so if you ever want to re-root, you'll need to reboot to fastboot and flash TWRP manually.
Convention for commands that you will have to run:
a command line starting with "C:" means that it should be run on your PC
a command line starting with "~ #" means that it should be run on your phone (through adb shell) while in TWRP
a command line starting with "OnePlus5:/ $" means that it should be run on your phone (through adb shell) while in OxygenOS
Although the commands start with "C:", this is just for readability purposes. You should run everything from inside an empty directory with enough disk space and writing access.
Your phone will have to be plugged in to your PC from the beginning to the end. Also, make sure it has at least 80% battery before beginning, just in case.
I know, the tutorial is huge. This is simply due to the fact that if I just wrote "make a nandroid backup of this and that, flash, and restore the backup while doing this", then some people may encounter problems because not everyone knows how to do a nandroid backup, restore it, etc. Also, there are a lot of things that need to be done precisely that way and not another way, which explains why the tutorial is huge. Also, you may notice that there is a lot of commands to run throughout the tutorial, this is because that way, I'm sure that at the end, you will have done everything like I did it on my phone, so that if you have a problem it's much easier to figure out where it comes from.
Summary of what you need to do (this is only a SUMMARY to give you a preview of what the whole thing looks like, you shouldn't follow it except if you're really an expert since a lot of things need to be done precisely, instead you should follow the easier complete steps below):
Make a Nandroid backup of /data
Backup files on internal storage
Wipe everything (internal storage + /data + system + caches), and then format data (important!)
Push and flash the OOS zip
Wipe caches and reboot (to Oreo!)
When it reboots, make sure everything (features, like Wi-Fi and fingerprint sensor) works. Don't "save anything" though, everything you do will be erased when we'll restore your backup. This is just a "test drive" for Oreo.
Reboot to TWRP, wipe Data and restore the /data backup
Run the three commands to fix Wi-Fi and fingerprints
Reboot (to System) and check everything works (don't do anything, don't change any setting, just make sure it works)
Reboot to TWRP, rename the "Android" folder to "Android_oreo" on sdcard, delete everything else on sdcard and restore your internal files
Rename the freshly restored Android (nougat) folder to "Android_nougat" and rename "Android_oreo" to "Android".
Flash Magisk, wipe dalvik+cache and reboot to System
When in Android, everything should work except some apps won't have their data. This is normal. Open a terminal (either on your phone using Termux or from your PC using adb shell), elevate using su and rename "Android" to "Android_oreo" and "Android_nougat" to "Android" (this is so that it correctly restores permissions)
If everything works fine, delete the "Android_oreo" folder
First, if you have Xposed Framework (systemless or not) installed, uninstall it. Next, if needed, uninstall any Magisk module that is "Nougat-only" to prevent any problems afterwards.
Boot the phone to bootloader/fastboot (either using advanced reboot, or by using volume down button when you start your phone) and boot to the TWRP recovery by doing
Code:
C:\> fastboot boot twrp-3.2.1-0-oreo-8.1-codeworkx-cheeseburger.img
from your PC.
Next, in TWRP, make a backup of /data (using the Backup button). Then, still while in TWRP, run the following commands:
Code:
C:\> adb shell
~ # cd /sdcard
/sdcard # tar cvf twrp.tar TWRP
/sdcard # md5sum twrp.tar
<< md5 checksum of twrp.tar >>
/sdcard # exit
C:\> adb pull -p /sdcard/twrp.tar
When the above command has finished, make sure that the checksum of the received twrp.tar file matches the one previously displayed.
If it doesn't match, delete the file and run adb pull again. Don't continue following this guide until you have received a 1:1 (checksum-wise) backup of /data.
Code:
C:\> adb shell
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
~ # rm -rf /sdcard/TWRP
~ # rm /sdcard/twrp.tar
That was for /data. Now, the backup for the internal storage:
Code:
~ # cd /sdcard
/sdcard # du -csh
<< you should see here the total size of sdcard, that'll give you an idea of how long it'll take >>
/sdcard # tar cvf sd.tar element1 element2 element... elementN
<< in the command above, replace "element1..N" by a space-separated list of what you want to have in the backup.
Keep in mind that your list HAS to contain the element "Android" (case is important). It contains the app data.
Let's say for example you want to keep only the photos you have taken (and nothing, nothing else that was on internal storage).
The photos are in the folder DCIM, so the command will look like this:
tar cvf sd.tar Android DCIM
(because you want DCIM, and Android has to be in the list, no matter where)
>>
/sdcard # md5sum sd.tar
<< md5 checksum of sd.tar >>
/sdcard # exit
C:\> adb pull -p /sdcard/sd.tar
When the above command has finished, make sure that the checksum of the received sd.tar file matches the one previously displayed.
If it doesn't match, delete the file and run adb pull again.
Keep in mind that anything you don't put in that list will not be backed up and will be lost!
Now, you have a backup for all the important stuff so we can start doing the real sh*t.
Now, the important step:
Go back to the TWRP home screen, press "Wipe", "Advanced Wipe" and there check "Dalvik / ART Cache", "Cache", "System", "Data" and "Internal Storage". Confirm using the slider at the bottom of the screen. Press the home button, then "Reboot" and "FastBoot". Now, type the same fastboot command as in the previous step to boot the recovery image. You'll enter the recovery as before.
Now, on your PC, in the terminal, type
Code:
adb push -p OnePlus5Oxygen_23_OTA_029_all_1801292040_d71af3d.zip /sideload
(note: here, we are not using "adb sideload", we are really using "adb push"). In TWRP, click Install, in the file manager go to /sideload and select the OOS zip file. Confirm by sliding. If you get an error, go back to home, click Mount and ensure System is not checked. Then try installing again. If it still does not work, reboot to fastboot, type command again, get to the recovery and install again.
When the zip-file is installed, go home, click "Wipe", "Advanced Wipe" and check both caches and confirm. Then, go home, click "Wipe" and then "Format Data". Then, go home, click "Reboot" and then "System". Your phone will now reboot to Oreo. It will take a long time, but do not turn off the phone. Let it run. On my phone, it took on average 2 minutes for that boot.
You'll be greeted by the "first boot" page. It'll ask you if you want to restore a backup or start anew, choose start anew. Connect to your Wi-Fi network and Google account. Follow all the instructions until you get to the home screen. There, make sure everything works (especially Wi-Fi and fingerprint sensor). Don't save your fingerprints yet, they will be erased afterwards. If everything works, you can continue following these instructions. If not, post a comment down there.
Now that you're at the home screen, go in the settings, About Android and click the build number 8 times to enable Developer Options. Go in there and enable advanced reboot. Then, reboot your phone into fastboot/bootloader using the power button. Type the exact same command as before to start TWRP. Once that you are in TWRP, run the following commands:
Code:
C:\> adb push -p twrp.tar /sdcard/
C:\> adb shell
~ # cd /sdcard
/sdcard # tar xvf twrp.tar
/sdcard # cp /data/misc/wifi/WifiConfigStore.xml /sdcard/
In TWRP, click "Wipe", "Advanced Wipe" and check only the "Data" partition. Confirm. Press home, then "Restore" and choose the backup in the list. Confirm to restore. Back to the terminal, we need to run the following commands otherwise Wi-Fi and fingerprints won't work:
Code:
/sdcard # cp WifiConfigStore.xml /data/misc/wifi/
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
Note: the command above are ran from your PC in an adb shell while the phone is still in TWRP.
Reboot the phone to system and ensure Wi-Fi and fingerprints are still working. Right now you should already see your old home screen and all your apps, but the internal storage isn't there yet. Reboot in fastboot, run the command to get in TWRP.
Once TWRP has booted, run the following commands:
Code:
C:\> adb push -p sd.tar /sdcard/
C:\> adb shell
~ # cd /sdcard
<< WARNING: dangerous command! double check the following line is correct before pressing enter! >>
/sdcard # rm -rf Alarms Albums DCIM Download Movies Music Notifications Pictures Podcasts Ringtones
/sdcard # ls
<< now, look at the list of files that were printed, and rm anything left that is not called "Android" or "sd.tar"
<< WARNING: dangerous command! double check everything is correct before pressing enter! >>
if when you do rm <the thing> it tells you it's a directory, then do: rm -rf <thething>
if there's a folder called SomeFolder, do "rm -rf SomeFolder"
next, run this:
/sdcard # ls
Android sd.tar <-- expected output
/sdcard # mv Android Android_oreo
/sdcard # tar xvf sd.tar
/sdcard # mv Android Android_nougat
/sdcard # mv Android_oreo Android
If you don't have Magisk somewhere on your sd card, download it and upload it using MTP or adb. Then flash it using the Install button. Clear dalvik/cache and reboot to system.
When the phone has booted (again, it might take time), make sure USB debugging is enabled and run the following commands:
Code:
C:\> adb shell
OnePlus5:/ $ su
<< here, you might see a Magisk screen asking for superuser access. Allow. >>
OnePlus5:/ $ cd /sdcard
OnePlus5:/sdcard $ mv Android Android_oreo && mv Android_nougat Android
Now, try some apps and make sure all the data is there (especially games and Netflix/Hulu/etc). If everything is there, and the phone works properly, go back in the terminal and type:
Code:
OnePlus5:/sdcard $ rm -rf Android_oreo
Optionally, start the TWRP app and flash it, it can always be useful. You can also reboot to fastboot to do that.
Now reboot your phone (normal reboot) one last time.
There, working OOS 5.0.2 / Android 8.0.0 phone with no data loss.
Frequently Asked Questions
How long does the whole thing take?
Highly depends on the amount of data you have on your phone. Since it the USB port only supports USB 2.0, it may take 4 or 5 hours in total.
Will doing this void my warranty?
No.
Will I be able to install future OTA updates using the regular download-reboot-flash-twrp procedure?
Yep. Just use the regular method as you would have on Nougat.
Will I lose my data?
If you follow all the instructions, no. Even if you don't follow them, as soon as you have made a backup of /data and internal storage, then no matter how bad you screw up you could always get a working phone back.
I followed the instructions and now my phone doesn't work
Boot in TWRP, wipe everything, reflash.
questions will be added there in the future
Having WiFi and fingerprint issues
You sure it is a good idea to just delete those files? I would have guessed that I need to replace these (nougat version from backup) with the oreo version to have it working just like before the restore.
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
I'm having the issues with wifi and fingerprints. Neither one is working. I'll try to figure out how to fix this.
@zdimension Thanks for this guide, I don't have time to test it yet, but I have a question
pdluke said:
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
Click to expand...
Click to collapse
At this point in the procedure, adb shell is still using root (before flashing magisk) ? How is that possible ? Does the adb /sideload preserve root ?
olivier380 said:
@zdimension Thanks for this guide, I don't have time to test it yet, but I have a question
At this point in the procedure, adb shell is still using root (before flashing magisk) ? How is that possible ? Does the adb /sideload preserve root ?
Click to expand...
Click to collapse
These commands should be run while the phone is in TWRP. Also note that adb /sideload is not used here, only adb push.
pdluke said:
You sure it is a good idea to just delete those files? I would have guessed that I need to replace these (nougat version from backup) with the oreo version to have it working just like before the restore.
Code:
/sdcard # rm /data/misc/wifi/wpa_supplicant.conf
/sdcard # rm -rf /data/system/users/0/fpdata
/sdcard # rm /data/system/users/0/settings_fingerprint.xml
I'm having the issues with wifi and fingerprints. Neither one is working. I'll try to figure out how to fix this.
Click to expand...
Click to collapse
If you delete them, they will be generated automatically at the next system boot. But you could also make a backup of those three files before wiping /data, store that somewhere, restore Nougat /data and then restore your backup of those three files. The result would be the same.
Note: actually, not exactly. Erasing the first file won't change anything since it's not used anymore in Oreo, but the two other files contain the fingerprint configuration (list of saved fingerprints). So,
Either you remove the files and you have to save your fingerprints again at next boot
Either you restore them from an Oreo backup and you'll get the fingerprints you had saved during the "first boot" procedure when you rebooted the phone right after flashing the OS
But the result is mostly the same: everything works. Deleting the files ensures you get something clean. If you restore from an Oreo backup I can't guarantee the result (as it may interfere with other files from the Nougat backup).
10 bucks to make a script to do this all for me haha.
@zdimension Thanks for the clarification Another thing you might add to the files to download would be Magisk (optionally). In this kind of guide, I've always find it useful to download everything first.
olivier380 said:
@zdimension Thanks for the clarification Another thing you might add to the files to download would be Magisk (optionally). In this kind of guide, I've always find it useful to download everything first.
Click to expand...
Click to collapse
Oops, forgot to add it
I added the link, and also instructions for how to un-root afterwards for those who would want it.
To improve the guide, here are some ideas :
- You should highlight that rm -rf is a very dangerous command, and that it needs to be checked twice (especially the targeted folder)
- It could be useful to use the du -csh command to check the size of a folder (to estimate the backup time for example).
- As a safety measure, one could md5sum the tar file before and after using adb pull
What do you think ?
olivier380 said:
To improve the guide, here are some ideas :
- You should highlight that rm -rf is a very dangerous command, and that it needs to be checked twice (especially the targeted folder)
- It could be useful to use the du -csh command to check the size of a folder (to estimate the backup time for example).
- As a safety measure, one could md5sum the tar file before and after using adb pull
What do you think ?
Click to expand...
Click to collapse
Thanks for the ideas! I updated the post (and I added a changelog at the bottom for future reference).
Followed guide for successful upgrade from 4.5.15 encrypted, unlocked bootloader w/ Magisk root.
One note, after the first complete wipe and flash of the full ROM, it was getting stuck on first boot and never completed. Discovered that I needed to not just wipe the Data partition but Format it in TWRP, to clear out the old encryption I think. Magisk wouldn't install either until I did this.
@debork thanks for the positive feedback (all the merit goes to @zdimension of course)
@zdimension there are many people in the other thread https://forum.xda-developers.com/oneplus-5/how-to/official-oxygenos-4-5-2-7-1-1-ota-t3627003 that tried (unsucessfully) to upgrade from 4.5.15 to 5.0.1, maybe a link to this topic could be useful for them (if it's not too late).
Regarding the
Go back to the TWRP home screen, press "Wipe", "Advanced Wipe" and there check "Dalvik / ART Cache", "Cache", "System", "Data" and "Internal Storage".
Click to expand...
Click to collapse
I think it should be highlighted in red, since it is the actual "clean flash" (AFAIU, correct me if I'm wrong).
if we only have the BL unlocked non root and stock recovery can we only ota without any loss of data ?
debork said:
Followed guide for successful upgrade from 4.5.15 encrypted, unlocked bootloader w/ Magisk root.
One note, after the first complete wipe and flash of the full ROM, it was getting stuck on first boot and never completed. Discovered that I needed to not just wipe the Data partition but Format it in TWRP, to clear out the old encryption I think. Magisk wouldn't install either until I did this.
Click to expand...
Click to collapse
Thanks for feedback, I will add that to the guide (although it worked with just Wipe for me )
zdimension said:
Thanks for feedback, I will add that to the guide (although it worked with just Wipe for me )
Click to expand...
Click to collapse
Have you rooted the 4.5.15 with Magisk or SuperSU (which is not compatible with Oreo anymore) ?
olivier380 said:
Have you rooted the 4.5.15 with Magisk or SuperSU (which is not compatible with Oreo anymore) ?
Click to expand...
Click to collapse
I stopped using SuperSU when it was sold to that shady company. Also, Magisk is better imo.
quick05 said:
if we only have the BL unlocked non root and stock recovery can we only ota without any loss of data ?
Click to expand...
Click to collapse
Official OnePlus support said that nothing is guaranteed if your bootloader is unlocked. But since you're on stock recovery + non rooted, you could always try. But backup everything first. Some people here on XDA have reported that it doesn't work, though.
Just followed your guide with no problems. Thank you very much!! I can confirm also that you need to format data after the wipe otherwise it gets stuck in a bootloop!
Thanks so much for this. I was able to successfully follow the guide and get upgraded to 5.0.1 without losing any data. In fact, I even messed up one step by failing to include the Android directory in the sdcard.tar backup (perhaps that should be more explicit), but it doesn't seem to have affected everything; all of my apps seem to have retained their data.
A few notes:
1. The file size of twrp.tar was ~14GB but when executing the pull command, it recognized it as only ~1.3 GB. As a result, the pull was not complete until it reached over 1000%. All the more reason to do the md5 check.
2. As others stated, I needed to format the data partition, not just wipe it.
3. I might recommend also including a "summary" version somewhere on what this guide does. Scrolling through the guide the first time, it seemed pretty daunting, but really all that you're doing is: backing up data partition and internal storage; wiping device; flashing Oreo ROM; tweaking a few files; and restoring backed up data and internal storage.
Thank you again so much! Glad to finally be on Oreo.
elight3 said:
Thanks so much for this. I was able to successfully follow the guide and get upgraded to 5.0.1 without losing any data. In fact, I even messed up one step by failing to include the Android directory in the sdcard.tar backup (perhaps that should be more explicit), but it doesn't seem to have affected everything; all of my apps seem to have retained their data.
A few notes:
1. The file size of twrp.tar was ~14GB but when executing the pull command, it recognized it as only ~1.3 GB. As a result, the pull was not complete until it reached over 1000%. All the more reason to do the md5 check.
2. As others stated, I needed to format the data partition, not just wipe it.
3. I might recommend also including a "summary" version somewhere on what this guide does. Scrolling through the guide the first time, it seemed pretty daunting, but really all that you're doing is: backing up data partition and internal storage; wiping device; flashing Oreo ROM; tweaking a few files; and restoring backed up data and internal storage.
Thank you again so much! Glad to finally be on Oreo.
Click to expand...
Click to collapse
Thanks for the feedback! I'll add a summary to the guide.

Categories

Resources