[Resolved] Resize recovery partition on Lenovo K30W - General Questions and Answers

I want to increase size of recovery partition on Lenovo K30W so I can flash larger recovery image created for Lenovo A6000. I have devised a way, but I would be grateful if someone could look it over and spot possible flaws.
Here is the current partition table.
Code:
Model: MMC Q8XSAB (sd/mmc)
Disk /dev/block/mmcblk0: 15634268160B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 67108864B 134217727B 67108864B fat16 modem
2 134217728B 134742015B 524288B sbl1
3 134742016B 135266303B 524288B sbl1bak
4 135266304B 136314879B 1048576B aboot
5 136314880B 137363455B 1048576B abootbak
6 137363456B 137887743B 524288B rpm
7 137887744B 138412031B 524288B rpmbak
8 138412032B 138936319B 524288B tz
9 138936320B 139460607B 524288B tzbak
10 139460608B 139984895B 524288B hyp
11 139984896B 140509183B 524288B hypbak
12 140509184B 141557759B 1048576B pad
13 141557760B 143130623B 1572864B modemst1
14 143130624B 144703487B 1572864B modemst2
15 144703488B 145752063B 1048576B misc
16 145752064B 145753087B 1024B fsc
17 145753088B 145761279B 8192B ssd
18 145761280B 156247039B 10485760B splash
19 201326592B 201359359B 32768B DDR
20 201359360B 202932223B 1572864B fsg
21 202932224B 202948607B 16384B sec
22 202948608B 219725823B 16777216B boot
23 219725824B 1830338559B 1610612736B ext4 system
24 1830338560B 1863892991B 33554432B ext4 persist
25 1863892992B 1998110719B 134217728B ext4 cache
26 1998110720B 2014887935B 16777216B recovery
27 2014887936B 15634251263B 13619363328B ext4 userdata
Luckily, recovery and data partition are next to each other. Here is the procedure, please tell me if it is viable.
1. Boot into recovery
2. Create nandroid backup of data partition
3. Make sure that data partition is unmounted in recovery
4. Using parted, delete recovery and data partitions, and then recreate them with new sizes
5. Format data partition
6. Make sure that "use rm -rf instead of formatting" is enabled in recovery settings
7. Restore nandroid backup
8. Flash new recovery
9. Reboot
These are the commands I would use:
Code:
adb shell
parted /dev/block/mmcblk0
unit b
rm 27
rm 26
mkpart primary 1998110720 2031665151
mkpart primary 2031665152 15634251263
name 26 recovery
name 27 userdata
quit
mke2fs -t ext4 /dev/block/mmcblk0p27

As there were no replies, I took a risk and went ahead with resizing the partitions. The described procedure worked without problems.

Could you make a guide on how you did this exactly for noobs?
I understand that you posted the steps you used, but i'm not familiar with what you did.
Also, what rom are you using currently?
I got a rom working for this phone, It works well, but is not ideal.
https://forum.xda-developers.com/general/help/k3-note-question-k30w-t3531158

addict1337 said:
Could you make a guide on how you did this exactly for noobs?
I understand that you posted the steps you used, but i'm not familiar with what you did.
Also, what rom are you using currently?
I got a rom working for this phone, It works well, but is not ideal.
https://forum.xda-developers.com/general/help/k3-note-question-k30w-t3531158
Click to expand...
Click to collapse
Well, making an even more detailed guide will take some effort. I'll do it when I find the time.
I am using this ROM: https://forum.xda-developers.com/lenovo-a6000/development/rom-resurrectionremix-5-8-1-t3555184
It's great, but I do have problems with updating it. Hopefully it'll be resolved soon.

Here is a more detailed procedure. However, if you are not familiar with Linux command line and the Android partition layout, I strongly recommend that you stay away from this.
First, you need Android platform tools from here. Download for your platform (I am going to assume Windows) and extract to a folder of your choosing (for example C:\Android).
You also need parted utility, download from here. It's best to extract it to the same folder as Android platform tools.
Next, open Windows command prompt and go to the platform tools folder. The easiest way to do it is to open the folder in Windows Explorer, right click in the empty space while holding shift and choose "Open command window here". Reboot your device in recovery mode and connect it to the computer USB port.
While in recovery, make a backup of your data partition.
Copy the new recovery image to external SD if you have one, or else to internal memory. You can do it using Windows Explorer.
Copy parted utility to the device.
Code:
adb push parted /.
Next, enter device shell.
Code:
adb shell
Make parted executable.
Code:
chmod a+x parted
Start parted utility.
Code:
./parted /dev/block/mmcblk0
Be extremely careful from now on. Every parted command is executed immediately, so if you type something wrong, you could brick your device.
Change size unit to byte.
Code:
unit b
Print your current partition layout. If it's not the same as in my original post, abort now as you'll mess things up.
Code:
p
Remove recovery and data partitions.
Code:
rm 27
rm 26
Recreate partitions with new sizes (recovery is now 32MB instead of previous 16MB).
Code:
mkpart primary 1998110720 2031665151
mkpart primary 2031665152 15634251263
Give partitions the same names as before.
Code:
name 26 recovery
name 27 userdata
Exit parted utility.
Code:
quit
Format the data partition.
Code:
mke2fs -t ext4 /dev/block/mmcblk0p27
Make sure that "use rm -rf instead of formatting" is enabled in recovery settings. This may not be necessary, but I've seen it in some tutorial, and it can't hurt.
Restore data partition from backup.
Flash new recovery using current recovery (go to install and choose "install image").
Reboot and hope for the best.

Thank you very much
I will give it a try.

All worked well, however I am never able to boot into recovery from my phone itself (before i attempted this, and after).
I always need to use my pc/usb to boot into recovery via a batch file.
Even if I install recovery from the recovery I just booted.
Getting into recovery is holding volume up and the power button right?
I installed the software you mentioned, however it is stuck at the bootscreen

addict1337 said:
All worked well, however I am never able to boot into recovery from my phone itself (before i attempted this, and after).
I always need to use my pc/usb to boot into recovery via a batch file.
Even if I install recovery from the recovery I just booted.
Getting into recovery is holding volume up and the power button right?
I installed the software you mentioned, however it is stuck at the bootscreen
Click to expand...
Click to collapse
To get into recovery, you need to keep BOTH up and down volume keys, and then power on. After a few seconds, you can release volume keys.
As far as the ROM is concerned, make sure you wipe data and cache before installing it. That's all I can think of.

CrazyNik said:
To get into recovery, you need to keep BOTH up and down volume keys, and then power on. After a few seconds, you can release volume keys.
As far as the ROM is concerned, make sure you wipe data and cache before installing it. That's all I can think of.
Click to expand...
Click to collapse
Thanks.
I managed to install a CWM recovery for A6000, witch is working fine now (32MB)
I had problems with GPS on my Cyanongenmod Rom modified for K30-W, but after installing gapps all is working fine now.
Thank you for your help!

I hate to bother you any more, but I would like to use the same rom you are using, however I can't get it to flash.
I got TWRP 2.8.6.1 working (any other version I tried will not work)
I wipe DATA DALVIK and CACHE
When I try to install: 20170403-a6000-Official it gets stuck on:
Patching system image unconditionally....
I am able to flash Cyanogenmod, but that's a much older version.
If you could help me with what I am doing wrong, that would be much appriciated.
There are not many people running this phone.
I am also interested in the recovery you are using.

addict1337 said:
I hate to bother you any more, but I would like to use the same rom you are using, however I can't get it to flash.
I got TWRP 2.8.6.1 working (any other version I tried will not work)
I wipe DATA DALVIK and CACHE
When I try to install: 20170403-a6000-Official it gets stuck on:
Patching system image unconditionally....
I am able to flash Cyanogenmod, but that's a much older version.
If you could help me with what I am doing wrong, that would be much appriciated.
There are not many people running this phone.
I am also interested in the recovery you are using.
Click to expand...
Click to collapse
You must use TWRP 3.1.0, but even with it, RR 20170403 will not install on K30W firmware, I don't know why. I managed to install it by flashing A6000 firmware first. I will post the tutorial on RR thread when I find the time.

addict1337 said:
I hate to bother you any more, but I would like to use the same rom you are using, however I can't get it to flash.
I got TWRP 2.8.6.1 working (any other version I tried will not work)
I wipe DATA DALVIK and CACHE
When I try to install: 20170403-a6000-Official it gets stuck on:
Patching system image unconditionally....
I am able to flash Cyanogenmod, but that's a much older version.
If you could help me with what I am doing wrong, that would be much appriciated.
There are not many people running this phone.
I am also interested in the recovery you are using.
Click to expand...
Click to collapse
I've posted the tutorial here.

CrazyNik said:
I've posted the tutorial here.
Click to expand...
Click to collapse
Awesome, I was waiting for it
Thank you very much.

Related

CWM-based Recovery 6.0.1.5 for A700 (JB compatible)

EDIT: These links are no longer available because some people copy these links to forums with "questionable" contents and some company scrape links from those forums and DMCA them all without actually checking them first. Please use the official CWM from now on. Download the official version at http://www.clockworkmod.com/rommanager.
This image is built via unofficial CM10 source linked here
Download
Recovery image: http://www.mediafire.com/?w707lr78by1bbd6 (MD5: 34a2caff881dfa7faf941cb1d34ec3b8)
Recovery image (touch): http://www.mediafire.com/?ff304ho7h9pbapg (MD5: f9aab0807bb5350c5b69d795906fecb5)
Use fastboot to flash
Code:
fastboot flash recovery recovery-a700-6015.img
Enter recovery via vol down + power or
Code:
adb reboot recovery
Old Download
6.0.14
Recovery image: http://www.mediafire.com/?9g39c74cc1smq10 (MD5: b2688a47f5a754e5374df4f2abd3b445)
Recovery image (touch): http://www.mediafire.com/?gtfmvb6on1ivgrq (MD5: 534f7d73d5a77fcec6ab2c21a8a48a71)
6.0.11 Update 1: http://www.mediafire.com/?o5skj3acsatq633 (MD5: 52b61d78940101d72eab20689d47f2ba)
Congratulations, it unfortunately can not test because I have an A510. Is the recovery from a510/a700 the same? Actually, the tablets are different only in the display, right? Has anybody tried to flash a recovery from an a700 to a A510? Where did you get the two files, especially the fstab?
Thanks!
Thanks, have you fully tested it ? We've had a couple of recos that managed to bricked tablets so far
Edit : you have not tested the wipe ? Those one bricked my A700 so be careful.
Rembold91 said:
Congratulations, it unfortunately can not test because I have an A510. Is the recovery from a510/a700 the same? Actually, the tablets are different only in the display, right? Has anybody tried to flash a recovery from an a700 to a A510? Where did you get the two files, especially the fstab?
Thanks!
Click to expand...
Click to collapse
The boot.img was dumped from my device using dd, recovery.fstab was based on Nexus 7's and modified to suit our device. I'm not sure about the A510 since I don't have one.
paugustin said:
Thanks, have you fully tested it ? We've had a couple of recos that managed to bricked tablets so far
Edit : you have not tested the wipe ? Those one bricked my A700 so be careful.
Click to expand...
Click to collapse
Wipe works both from system and recovery itself.
OK thanks for the info.
Too bad my tablet is still unable to boot
paugustin said:
OK thanks for the info.
Too bad my tablet is still unable to boot
Click to expand...
Click to collapse
Are you able to boot into fastboot? Are you able to boot into recovery using the orientation lock + volume down + power?
EDIT: Oh wait, this device has no way of booting into fastboot without a working system?
pawitp said:
Are you able to boot into fastboot? Are you able to boot into recovery using the orientation lock + volume down + power?
Click to expand...
Click to collapse
Yes fastboot and recovery mode are available. I can flash rom but they won't boot and whenever I use wipe/format on a partition the process will freeze.
paugustin said:
Yes fastboot and recovery mode are available. I can flash rom but they won't boot and whenever I use wipe/format on a partition the process will freeze.
Click to expand...
Click to collapse
Hmm, can you add me on GTalk [email protected]?
Just checking procedure please....
I got the OTA update today to Image version: Acer_AV043_A700_RV07RC06_PA_CUS1 Build: Acer_AV043_A700_1.029.00_PA_CUS1
I had to unlock the bootloader and root again. ***OTA Rootkeeper WILL NOT keep the root! The bootloader is re-written and root removed***
I just downloaded the Recovery.img file and want to be SURE I do this correctly, so please forgive me if I sound "noobish"!
1. Copy Recovery.img to root of SD Card
2. Use ADB Fastboot to get tablet into flashboot mode
3. Once tablet has entered flashboot, Type -fastboot flash recovery recovery.img
4. Process should allow me to enter Recovery mode
Am I correct here? I don't want to brick my tab! I appreciate any input and thanks in advance!
paugustin said:
OK thanks for the info.
Too bad my tablet is still unable to boot
Click to expand...
Click to collapse
Have you tried using nvflash in apx mode ?
Well we don't have a fully working nvflash for tegra 3 with sbk support yet. If you have one I'm interested
Sent from my S300 using xda app-developers app
paugustin said:
Well we don't have a fully working nvflash for tegra 3 with sbk support yet. If you have one I'm interested
Sent from my S300 using xda app-developers app
Click to expand...
Click to collapse
Did you check the a700 service rom? It seems it has the NVFlash support as near as I can tell. Should be the same for the 701. Looks like it has support for the blocks.
I can't do anything with it. Tab is still in for repair. Hope maybe this week,
MD
pawitp said:
Wipe works both from system and recovery itself.
Click to expand...
Click to collapse
Sounds good. However, let me be a little more specific.
The problem with all the previous recoveries happened when you tried to wipe /Data. All the other functions seemed to work well. Seemed to.
1. Recovery backup took longer than usual, especially on a bare stock install.
2. The first time you restore a recovery image, it would take "forever". Usually, it would complete the first time, but Data apps didn't function once the Rom booted. Nor could you download ANY apps. Any additional attempts to do a restore would hang at "formatting data". Once that happened, you basically could not install anything nor restore from a recovery. /Data corrupted.
So the question again, have you tested the /data wipes and formats via CWM? Several times after downloading apps, backups, restores?
Please don't take this the wrong way. We appreciate taking the time developing a workable recovery for the 70x. But the previous attempts caused needless bricked tabs. 1 dev, didn't even own a 70x to test it on and he pushed it out. And the other guy, well, whereabouts unknown, and knowing the previous issues, he also never bothered to check all functions before releasing his version. Claimed "I don't have a need to wipe data".
So please clear this issue, before we get into the flashing portion. You have to understand, some of us, are a little "gun-shy" right now.
Thanks for taking the time to develop a recovery! I hope it works well!
MD
paugustin said:
Well we don't have a fully working nvflash for tegra 3 with sbk support yet. If you have one I'm interested
Sent from my S300 using xda app-developers app
Click to expand...
Click to collapse
I'll take a guess, that if the /data issue is working in the new recovery, and you can get it installed, you may be able to wipe the corrupted /data, and restore your previous recovery backup. If you used a CWM based recovery.
Also, I think I may still have my stock recovery CWM backup from my 701 on my PC (build .015) (I think). But considering it was done with CWM, you may be able to restore it. Might work, might not.
MD
OK I spent some time this morning with pawitp. He was able to make my A700 boot but the /data partition is reduced to 126Meg and if I try to format any partition it will break things again.
So it's a start...
Regarding restore, I have a CWM backup of my system but so far my attempts at restoring it have failed, even with pawitp recovery. The partition is broken so it won't take any data.
paugustin said:
OK I spent some time this morning with pawitp. He was able to make my A700 boot but the /data partition is reduced to 126Meg and if I try to format any partition it will break things again.
So it's a start...
Regarding restore, I have a CWM backup of my system but so far my attempts at restoring it have failed, even with pawitp recovery. The partition is broken so it won't take any data.
Click to expand...
Click to collapse
Well, that's a bit of good news. Similar to the SGS II and their leaked kernel. They had to flash a modified PIT that ignored the corrupted sectors. Lost 2gb in the process, but still a start.
MD
Partitions on the A700
Just to shed some light on the partitions of our new toy.
Maybe it's of use as a reference.
Block devices:
/ # ls -l /dev/block/platform/sdhci-tegra.3/by-name/
lrwxrwxrwx root root 2012-07-24 10:28 AKB -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-07-24 10:28 APP -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-07-24 10:28 CAC -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-07-24 10:28 DE2 -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-07-24 10:28 FLX -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2012-07-24 10:28 LNX -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-07-24 10:28 MSC -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-07-24 10:28 SOS -> /dev/block/mmcblk0p1
lrwxrwxrwx root root 2012-07-24 10:28 UDA -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2012-07-24 10:28 USP -> /dev/block/mmcblk0p8
Partition sizes:
/ # cat /proc/partitions
major minor #blocks name
179 0 31260672 mmcblk0
179 1 6144 mmcblk0p1
179 2 8192 mmcblk0p2
179 3 614400 mmcblk0p3
179 4 1253376 mmcblk0p4
179 5 4096 mmcblk0p5
179 6 102400 mmcblk0p6
179 7 10240 mmcblk0p7
179 8 20480 mmcblk0p8
179 9 10240 mmcblk0p9
179 10 29204480 mmcblk0p10
179 32 15558144 mmcblk1
179 33 15558136 mmcblk1p1
Moscow Desire said:
Sounds good. However, let me be a little more specific.
The problem with all the previous recoveries happened when you tried to wipe /Data. All the other functions seemed to work well. Seemed to.
1. Recovery backup took longer than usual, especially on a bare stock install.
2. The first time you restore a recovery image, it would take "forever". Usually, it would complete the first time, but Data apps didn't function once the Rom booted. Nor could you download ANY apps. Any additional attempts to do a restore would hang at "formatting data". Once that happened, you basically could not install anything nor restore from a recovery. /Data corrupted.
So the question again, have you tested the /data wipes and formats via CWM? Several times after downloading apps, backups, restores?
Please don't take this the wrong way. We appreciate taking the time developing a workable recovery for the 70x. But the previous attempts caused needless bricked tabs. 1 dev, didn't even own a 70x to test it on and he pushed it out. And the other guy, well, whereabouts unknown, and knowing the previous issues, he also never bothered to check all functions before releasing his version. Claimed "I don't have a need to wipe data".
So please clear this issue, before we get into the flashing portion. You have to understand, some of us, are a little "gun-shy" right now.
Thanks for taking the time to develop a recovery! I hope it works well!
MD
Click to expand...
Click to collapse
Don't worry, the data partition is never actually formatted because the internal sdcard lies in /data/media. All the recovery does is delete all the files not in /data/media.
Sent from my A700 using xda app-developers app
pawitp said:
Don't worry, the data partition is never actually formatted because the internal sdcard lies in /data/media. All the recovery does is delete all the files not in /data/media.
Sent from my A700 using xda app-developers app
Click to expand...
Click to collapse
Sorry, I meant User Data/Factory Reset (as CWM calls it).
This is why when on the first attempt at restoring a recovery, the downloaded apps would not function. You had the icons, but Force Close on them all. The system apps were fine. Any attempt to restore any previous backup failed (would hang on that partition). Couldn't wipe the partition in CWM after that.
MD
Moscow Desire said:
Sorry, I meant User Data/Factory Reset (as CWM calls it).
This is why when on the first attempt at restoring a recovery, the downloaded apps would not function. You had the icons, but Force Close on them all. The system apps were fine. Any attempt to restore any previous backup failed (would hang on that partition). Couldn't wipe the partition in CWM after that.
MD
Click to expand...
Click to collapse
And that basically clears data. I've tested it, it works (and mentioned it on first page).

No longer able to install ICS, stuck on HC.

I recentlly attempted to update my P6800 from ICS LQ1 to LQ2 via Mobile Odin.
The result was a tablet that would only boot as far as the Samsung Logo and boot chime and would hang there.
Many attempts were made to clear caches, reset data via both stock recovery and CWM versions 5 .5 and even 6 with no change.
Tried using PC Odin to go back to LQ1 and has the same exact results. suspected an error in a partition and used a stock p6800 .pit along with stock LQ1 .tar and still have same problem. Cm9 and 10 gives same results.
However I am able to install stock Honeycomb via PC Odin which seems to work fine except CWM backup is unable to restore a backup and hangs just after starting.
I still suspect a bad partition somewhe but dont see a way of verifying this. Have read many posts both here and in the Galaxy Note forum but none have solution that has worked for me.
Does anyone know if the .pit file actually recreates your partitions? Or does someone have instructions on how I can manually do this via adb shell? Specifically the cache, data and system partitins.
Any help is appreciated.
Try this.
- In HC use Locerra' CWM v5.x
In recovery:
- Clear cache.
- Dalvik.
- Data reset.
- Flash rom: http://www.androidtablets.net/forum/showthread.php?p=223379
- Fix permission.
- Reboot.
If stuck after reboot...boot to cwm recovery again.
- Full wipe.
- Reboot and wait a while.
Hope it help and keep us posted
Astrix Ashburn said:
Try this.
- In HC use Locerra' CWM v5.x
In recovery:
- Clear cache.
- Dalvik.
- Data reset.
- Flash rom: http://www.androidtablets.net/forum/showthread.php?p=223379
- Fix permission.
- Reboot.
If stuck after reboot...boot to cwm recovery again.
- Full wipe.
- Reboot and wait a while.
Hope it help and keep us posted
Click to expand...
Click to collapse
followed above and got non stop rebooting.
wonder if ics uses a different partition structure.
While at recovery do u have testbend?
Sent from my GT-P6800 using xda premium
I faced your situation before, here's what you should do
1 Install official HC 3.2 using PC odin
2 boot in to HC stock recovery
3 factory reset / Data & Cache wipe
4 do full boot into HC till you see your desktop
5 use your PC odin or Mobile odin pro to Install ICS over HC
6 Now you should be good to go.
Note if you can successfully boot into HC then your paritions are good, dont mess with them.
zorbakun said:
I faced your situation before, here's what you should do
1 Install official HC 3.2 using PC odin
2 boot in to HC stock recovery
3 factory reset / Data & Cache wipe
4 do full boot into HC till you see your desktop
5 use your PC odin or Mobile odin pro to Install ICS over HC
6 Now you should be good to go.
Note if you can successfully boot into HC then your paritions are good, dont mess with them.
Click to expand...
Click to collapse
This has been tried several times with the same results each time. Boot loops.
Thats what I don't get, HC works but as soon as ICS is put on I get /Data partition errors. More specifically /data cannot be mounted.
Josvaz said:
While at recovery do u have testbend?
Sent from my GT-P6800 using xda premium
Click to expand...
Click to collapse
Yes , in stock recovery I do. Was not sure what that did.
Looking at my partitions via adb it looks like /dev/block/mmcblk0p10 is empty. Perhaps this is the issue? If so, does anyone know how to recreate?
~ # parted /dev/block/mmcblk0p10
parted /dev/block/mmcblk0p10
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p10
Welcome to GNU Parted! Type 'help' to view a list of co
(parted) print
print
print
Error: /dev/block/mmcblk0p10: unrecognised disk label
(parted) print list
print list
print list
Error: /dev/block/mmcblk0p10: unrecognised disk label
(parted)
kable said:
Looking at my partitions via adb it looks like /dev/block/mmcblk0p10 is empty. Perhaps this is the issue? If so, does anyone know how to recreate?
~ # parted /dev/block/mmcblk0p10
parted /dev/block/mmcblk0p10
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p10
Welcome to GNU Parted! Type 'help' to view a list of co
(parted) print
print
print
Error: /dev/block/mmcblk0p10: unrecognised disk label
(parted) print list
print list
print list
Error: /dev/block/mmcblk0p10: unrecognised disk label
(parted)
Click to expand...
Click to collapse
its look like the /data partition is screwed... try running e2fsck -fDC0 /dev/block/mmcblk0p10 to check the partition...
this is the EXACT problem i was having. here's what i did to fix it*:
disclaimer: i am waiting for HC filefactory slow-*ss download to take another F*CKING hour.... so i have yet to FULLY recover my tab... BUT i think i'm onto something.
i COULD get a full flash from odin with no hanging up...then i corrupted my /data and /system partition... don't ask me how: i knew to stay away from wiping with 3e stock ICS recovery, i used cwm 5.8.1 temporary zip that i flashed from stock recovery, IT messed up everything.... then i started trying to follow androguide.fr's revive from superbrick guide. (will post link later)
after days and days and DAYS of frustration trying to remove and remake /data and /system, /cache eventually corrupted. i was ready to blow my brains out.... just on a whim, without having read any of this stuff, i:
1) flashed the original pit file,
2) flashed ATO-ICS firmware
3) flashed CWM 6.0.1.1
4) wiped /data /factory /dalvik SUCCESSFULLY!!!!
5)....after wiping, e2fsck checking and getting clean partitions with every ICS CM9/10 rom i could find, and STILL getting stuck on the boot animation...
i finally read in a gNote forum that people with this problem were flashing back to GB (original firmware for the Note) and solving their problem, then they could go back to ICS... if you can't i'm SORRY!!! but i'm even just trying to get ANYTHING to boot at this point. YOU'RE POST GIVES ME HOPE!!!!
so try: flashing the original pit file, flash cwm 6.0.1.1, wipe data/factory reset, wipe dalvik cache, reboot and JUST do the e2fsck section of the NOOB friendly guide to recovering your tab from superbrick. --will post link later. that should at LEAST get rid of the corrupt filesystem. e2fsck every partition that you were having trouble with.
zorbakun said:
I faced your situation before, here's what you should do
1 Install official HC 3.2 using PC odin
2 boot in to HC stock recovery
3 factory reset / Data & Cache wipe
4 do full boot into HC till you see your desktop
5 use your PC odin or Mobile odin pro to Install ICS over HC
6 Now you should be good to go.
Note if you can successfully boot into HC then your paritions are good, dont mess with them.
Click to expand...
Click to collapse
Thank you for this, it got me working again. I didnt think to do any wipes after going back to stock HC but it was exactly what it needed.
nutley said:
Thank you for this, it got me working again. I didnt think to do any wipes after going back to stock HC but it was exactly what it needed.
Click to expand...
Click to collapse
You should change your topic by adding ( Resolved ) to it so others know you got it figured out .
Fluxcore said:
You should change your topic by adding ( Resolved ) to it so others know you got it figured out .
Click to expand...
Click to collapse
It's not my topic. Just saying thanks as it sorted my own issue out

[DUAL_BOOT][ANY_ANDROID]Dual booting in an android phone with external SD card

So here you come. To read and perform this tutorial, you obviously need a first hand experience on flashing a ROM and/or kernels. Otherwise this tutorial and my efforts to get you a device with two OSes running might end up giving you a bricked device. So, if you're hearing the terms "flashing" or 'kernels' for the first time and thinking it's kinda good food, then bro, just go and taste those first.
Something's to remind before we gonna dig deep into this tutorial->
Noone but you will be responsible for what you end up with.
The warranty of your device will be voided after this if it isn't already after rooting. For MI users, the good news is that you can reclaim it by just flashing the fastboot ROM for your device.
Enough lectures. Bro let's get to work.
Things you'll be needing =>
One working Windows PC(because I doesn't know any replacement of bootimg.exe on any other OS. If you know, then let me).
ADB, fastboot and the device drivers (easily found in XDA)
Any custom CWM based recovery installed.(since TWRP is most popular, I will demonstrate using it. You can use any other you want overall process will be the same)
A custom ROM and kernel for your phone(the second os)
A class 10 memory card ( I recommend 32GB for the spaces)
PART 1: MODIFYING THE BOOT
At first, how does your device boots up? What are the partitions called /data and /system? The answer is quite simple. It's your kernel that points out the location from where the OS should be picked up. So for booting into the second OS we need some modifications to it at first.
Search and download bootimg.exe on XDA, I'll post a link later. Create two folders. Name them "Internal OS" and "External OS" respectively. Put the zip file of the OS you're currently using to the first one and the OS you're gonna use on the external storage to the second one. Rename the second OS to originalExternalOS.zip. Extract originalExternalOS.zip. Pick the boot.img file from the root of the extracted folder and move it to a new folder named "boot2". Extract the IMG using bootimg.exe. Navigate to the initrd folder and you will get a file named 'fstab".
Basically it's the file that tells the kernel which partition does the OS resides in.
Open the file in your favourite text editor.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
Save the file without giving any extension to it. Repack it using the same tool. You'll have boot-new.img and boot-old.img. Rename boot-new.img to boot.img and replace the one in the root folder with this. Basically what we're doing here is replacing the old boot.img with the modified one.
For your knowledge, blocks are the partitions of any storage you have on your device. For example, your internal storage is partitioned to near about 30 different blocks each starting with prefix "mmcblk0p". We here just told the kernel to load the OS from the blocks mentioned. We'll be creating these blocks in the external SD card next.
PART 2: PARTITIONING THE SD CARD
Connect your device with the memory card inserted to your PC. If you haven't installed fastboot, ADB, and the drivers, do it now.
READ THE FOLLOWING CAREFULLY
Reboot the device to recovery mode. Type the commands in cmd:
Code:
adb shell
parted
unit MB
print
quit
umount external_sd
Read and store the minimum and maximum capacity of your card. Since different cards will have different capacities I will point it as variable MIN_SIZE and MAX_SIZE. You'll need to calculate and put the values in the commands. Now type the following commands on cmd:
Code:
parted /dev/block/mmcblk1
rm 1
//START_BLOCK = MAX_SIZE - 5000
mkpartfs primary fat32 MIN_SIZE START_BLOCK
//SYS_START = START_BLOCK+1
//SYS_END = SYS_START + 1200
mkpartfs primary ext2 SYS_START SYS_END
//DATA_START = SYS_END+1
//DATA_END = DATA_START + 3500
mkpartfs primary ext2 DATA_START DATA_END
//CACHE_START = DATA_END + 1
mkpartfs primary ext2 CACHE_START MAX_SIZE
//We have partitioned the memory card. Let's format them. Ignore all "Do you wish to continue" question in the next commands as we're already mentioning yes.
mkfs yes 1 fat32
mkfs yes 2 ext2
mkfs yes 3 ext2
mkfs yes 4 ext2
quit
//Now they are almost ready. Just make the newly created blocks readable by the OS.
make_ext4fs /dev/block/mmcblk1p2
make_ext4fs /dev/block/mmcblk1p3
make_ext4fs /dev/block/mmcblk1p4
//Now you get where does the blocks come in the kernel right?
exit
//You've covered up the hardest part. Let's get some coffee.
PART 3: MODIFYING THE NEW OS
You've left the OS extracted in the "External OS" folder right? It's time to do some magic in it. We're gonna tell the OS to be installed in the blocks we created just like the kernel. But wait, where does the OS know before installing where it should get installed? Well, the answer hides in the updater-script in the folder META-INF > com > google > android. Navigate yourself in it. Open the updater-script file in your favourite editor ( I use notepad++ ) and modify it in the same way as the boot.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
Leave the /dev/block/bootdevice/by-name/boot as it's the fundamental block and we can't replicate it. Don't think for the /cache partition as we've already done that in the boot.img file. Now navigate to the root of the folder where you extracted the External OS. Select all files, add them to a zip file using WinRAR. Name the file to newOS.zip. Open newOs.zip and originalExternalOS.zip with WinRAR and compare them if you find any change in the folder tree. They must and they should be exactly the same. You're 80% done.
PART 4: MODIFYING THE RECOVERY
We often flash many zips including very popular Xposed and other mods to our OS right? They also look for the /system partition. So what are we gonna do? Modifying each of them? Nah. Let's modify where they get which one the /system is. The recovery. Extract the img of the recovery you're using with the same bootimg.exe. Modify exactly the same things. I.e.
Replace every instance of the first line with the second one:
/dev/block/bootdevice/by-name/system => /dev/block/mmcblk1p2
/dev/block/bootdevice/by-name/userdata => /dev/block/mmcblk1p3
/dev/block/bootdevice/by-name/cache => /dev/block/mmcblk1p4
in the following files : initrd/fstab.qcom
initrd/etc/recovery.fstab
initrd/etc/twrp.fstab(For TWRP only)
Save them. Repack. And you got your recovery-new.img and recovery-old.img. Put recovery-new.img and newOS.zip in the same folder. Now wake up, it's time for some action.
PART 5 : INSTALLING THE OS
Open cmd in the folder where newOS.zip resides. Reboot the device in fastboot mode. Type the following commands:
Code:
adb push newOS.zip external_sd
fastboot flash recovery recovery-new.img
fastboot boot recovery
Now your device should boot up in recovery mode. To check if everything has gone fine mount system using TWRP. Use twrp's built in file manager and navigate to system folder. It's empty? Yup. You've done a great job. Now flash the newOS.zip using TWRP and your device should boot up in the new OS. To cross check again remove the SD card and try to boot. If you're headed towards recovery or bootloop after that then it's a win. Put the SD card back again and watch the new OS to boot.
PART 6: SWITCHING BETWEEN THE TWO
Extract the boot.img from the "Internal OS" zip file and put it together with recovery-old.img. To check if your old system is untouched type the following commands in fastboot mode:
Code:
fastboot flash recovery recovery-old.img
fastboot flash boot boot.img
fastboot boot system
Your device should take you back to the old one. Surprised? Now let's make a switch between the two. There are two methods.
METHOD 1: USING FLASHIFY
Create two folders in your SD card. Put boot.img and recovery-old.img to one and boot-new.img and recovery-new.img to the other. To switch to the external OS, just flash boot-new.img as boot and recovery-new.img using flashify. Ignore reboot now dialog and reboot directly to the system. To go back, first install flashify in the new OS and flash boot.img and recovery-old.img. Easy right?
METHOD 2: USING ZIPS
I'm gonna tell you that tomorrow as I can write no more today.
More to come....
CREDITS:
justzzshadz from MIUI forum for this revolutionary concept. @iamsubhranil for adding TWRP, Flashify support and completely rewriting the tutorial.
Thank u so much for ur efforts... It helps me a lot
I don't understand members on xda ...why they don't give thnaks on thread ..they only see the thread and go away...
Sry 4 my english ..
Thanks again
---------- Post added at 08:07 AM ---------- Previous post was at 07:48 AM ----------
Pls lemme know that if i can use dsixda's kitchen for modifying boot.img (kernal ) ???
Coz i didn't find bootimg.exe tool... If u have then pls give me the link.
Thanks
yes you can use android kitchen
When You Will Continue Writing The Thread Im Really Interested in trying it
Faisal Z Ahmad said:
When You Will Continue Writing The Thread Im Really Interested in trying it
Click to expand...
Click to collapse
I will after a while as I'm having final exams you can still try with flashify bro
sc123001.11 said:
Thank u so much for ur efforts... It helps me a lot
I don't understand members on xda ...why they don't give thnaks on thread ..they only see the thread and go away...
Sry 4 my english ..
Thanks again
---------- Post added at 08:07 AM ---------- Previous post was at 07:48 AM ----------
Pls lemme know that if i can use dsixda's kitchen for modifying boot.img (kernal ) ???
Coz i didn't find bootimg.exe tool... If u have then pls give me the link.
Thanks
Click to expand...
Click to collapse
http://forum.xda-developers.com/redmi-1s/general/guide-unpack-repack-kernel-t2908458
Most comfortable
iamsubhranil said:
I will after a while as I'm having final exams you can still try with flashify bro
Click to expand...
Click to collapse
Yeah I Know I Can Try But i Need To Know Method 2 To Switch ROMS Because Second One Is Faster Using Zips Otherwise Great Post And Guide ,Thank You
Good Luck With Your Exams
Nice tutorial.
Dual boot for Mediatek devices is so easy to me. But I don't have any idea for Other devices like Samsung or Sony.
When I bought some SD Card, I'll try this one.
Keep it up!
Faisal Z Ahmad said:
Yeah I Know I Can Try But i Need To Know Method 2 To Switch ROMS Because Second One Is Faster Using Zips Otherwise Great Post And Guide ,Thank You
Good Luck With Your Exams
Click to expand...
Click to collapse
Thanx a lot
BTW flashify is also very convenient method
1)Just choose boot image from the option
2)Find and select the internal or external boot image to boot
3)Have a normal reboot
jbliz said:
Nice tutorial.
Dual boot for Mediatek devices is so easy to me. But I don't have any idea for Other devices like Samsung or Sony.
When I bought some SD Card, I'll try this one.
Keep it up!
Click to expand...
Click to collapse
This one is universal bro
iamsubhranil said:
This one is universal bro
Click to expand...
Click to collapse
I did not see you make any modification to boot.img.
Sry My bad. I didn't read at the top.
iamsubhranil said:
Thanx a lot
BTW flashify is also very convenient method
1)Just choose boot image from the option
2)Find and select the internal or external boot image to boot
3)Have a normal reboot
Click to expand...
Click to collapse
I am gonna try this anyway, maybe tomorrow
Because i want two ROMS mainly, one for CM cuz i love it, daily drivers and everday usage, second one mainly focused on battery life (when i don't use my device much)
Another Question ,How do I Flash Zips (from recovery) To A Specific ROM?
And I Have CM 12.1 And Im Using M5 Kernel so Where Do the Edit Goes?
Faisal Z Ahmad said:
Another Question ,How do I Flash Zips (from recovery) To A Specific ROM?
And I Have CM 12.1 And Im Using M5 Kernel so Where Do the Edit Goes?
Click to expand...
Click to collapse
The edit goes to the recovery. At the end of the process you'll have two different recovery files for two OSes. Flashing any zips via modified recovery will flash them straight to the new os. Switch between those recoveries as required. Read the TUT carefully.

[HOWTO][TWRP][ROOT] ZTE quest N817 with locked bootloader

First off doing this will void your warranty and can brick your device. Following these simple steps should work for you. I will state here and further down, make sure you download all programs needed and both recovery.img and recovery_orig.img. I am in no way resposible for your device being bricked.
**Only thing I have not tested is the external sd card, I make no promises that it works. I only have 1 sd micro card its installed in my main device. So install the recoveries and supersu to your internal sdcard.
This is for assurance wireless, I have seen one or two other n817 devices if the specs are the same, they "should" work with this twrp, but use partition backup and restore by wanam on Play store to get a recovery.img for your device. I do not use this program for system back up, for some reason it does not work properly but its fine for boot,aboot, recovery and other smaller partitions.
This is a ported twrp from kis3 twrp version 3.0.2-0 by KonstaT from here http://konstakang.com/devices/kis3/TWRP/. Also this version of chainfire su SR3-SuperSU-v2.79-SR3-20170114223742 download from here https://download.chainfire.eu/1021/. This twrp recovery has Supersu folder but I still installed the zip from recovery to be sure.
The twrp n817 recovery named: recovery.img along with the original n817 recovery named: recovery_orig.img go here https://github.com/jag9906/n817_twrp
Other programs needed [ROOT]Rashr flash tool, online nandroid backup *root*, SD maid from Play Store. The Rashr flash tool is required, you can use any back up you wish, I prefer SD maid for cleaning up system and removing/freezing programs you can use any you use, this is to remove your temp root after recovery and supersu is installed.
**Again I am stating here the Rashr flash tool is required this will allow you to install the recovery.img with a locked bootloader. This is a must to install this twrp recovery. The twrp app will not work until you have supersu installed. There are other flash tools, but this worked flawless with kingo so its the only one I will support for this guide. If you use another flash tool its on you.
First make a back up prior to installing the twrp recovery. Use the online nandoird back up of all partitions I save them as twrp. If you have external SD card you can do all at once if not do all but data and system then copy to your computer and then back up system folder. Your choice on data, I back up my apk so never data.
Next run Rashr flash tool from Play store the first option is recovery from storage, choose this option then go to your location on sdcard and select recovery.img hit ok it will take about 10 to 15 seconds and ask if you want to reboot into recovery, hit yes and then your device will reboot into recovery. Once loaded swipe and go to install, top left find your SR3-SuperSU-v2.79-SR3-20170114223742.zip file and select that, then swipe to install. Once finished hit reboot and system.
Then run SD Maid or any root tool to uninstall you have. You can now delete/remove Kingo or any root you used prior to installing the recovery and have supersu by chainfire as your root for the device.
You now have a twrp recovery, and chainfire's supersu installed on your n817 device.
thanks to KonstaT and Chainfire for the hard work they have done.
Wow, thanks.
I was able to port KonstaT's CWM for the kis3 to this device and it works almost flawlessly, but when I tried to do the same with TWRP I just got a white screen and had to pull the battery. This boots fine, so I'm interested in taking it apart and seeing what you changed.
External SD card doesn't work on my phone. Since I plan on taking it apart anyway I'll look at the fstab files, if I figure it out I'll be sure to share my changes.
Yeah like I said in post I have no external sdcard so I could not test. With putting in external a few ttimes I was looping. I think I did 6 builds and on my device which is not used. I was able to create boot, system and data backups and flash again amd install supersu from chainfire. I have built a number of kernels but wont boot. I am just going to get working kernel and nethunter it or maybe kexec hardboot for a linux. Also I rhink I used the original recovery kernel, might have gone stock.
Did you do recovery or cm 11. I tried about 5 builds of cm11 furthest i got to was loading applications screen and locking. Did you flash this twrp. With rashr app. Not sure how it will handle it being locked boot. Each of the port guides useless being locked. Days off this week might look into delving into it more. But after 5 months of headaches with exynos kernel and rom might need a break. Tired of these corps releasing broken code to stall people. 3 or 4 from scratch begings with samdung kernel between 2,000 and 6,,000 files edited on each attempt and still borked, with even.trying to back port newer versions of drivers. I have one solid kernel running but just above stock because I removed there fuelgague and charger driver with a Script for deepsleep, might be my best yet before I get a new phone in a few months. Samsung and zte plus any mediatek I'm over them now and swearing off.
I notice the line for the sdcard is commented out in twrp.fstab, I'll try uncommenting that and see what happens, but I remember to get the sdcard working correctly under CWM I had to use vold. The line for CWM was:
/devices/msm_sdcc.2/mmc_host auto auto defaults voldmanaged=sdcard0:auto,noemulatedsd
This seems to work with or without an sd-ext partition (mounting sd-ext normally as /dev/block/mmcblk1p2 works, no need to use vold for that).
jag9906 said:
Did you do recovery or cm 11. I tried about 5 builds of cm11 furthest i got to was loading applications screen and locking. Did you flash this twrp. With rashr app.
Click to expand...
Click to collapse
I did KonstaT's CWM recovery from the kis3. I think the only things I had to change were the kernel (from stock recovery), fstab (based on stock recovery, with some trial and error) and default.prop
Haven't tried flashing CM11 to this phone yet, I have tried building the device/vendor trees to build CM11 from source, but ZTE's kernel source for this device doesn't compile and KnostaT's ZTE msm8610 kernel source doesn't boot, so that's as far as I've managed to get.
I flashed this TWRP with the rashr app, but when I flashed CWM I had no problem using (from a root adb shell) "dd if=/path/to/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery"
I did need to (once) reboot the device with "adb reboot disemmcwp" when I initially got root before I could mount system rw and install SuperSU.
Yeah that was the issue when.I did stuff with my main phone, I only have one sdcard in main phone so I didn't get around to testung vold. That sould fix the issue. I learned that lesson a few weeks ago with my samsung phone. If it works mind posting that fike so.I can.update this twrp.so people cam atleast have a touch backup with supersu not those roots that auto install garbage apks and have ads.
I found another cm11 I will check later afyer work tomorrow and post link since kis3 is gms this one was cmda for porting rom.
ok can try porting the cm11 unofficial condor, or carbon KK unofficial condor both I think I found through xda, there is an AOPK condor MM nightly if you want to try to up to that or the lineage OS condor 14.1 with a new kernel. can google this cm-11-20140808-UNOFFICIAL-condor to get the link from xda or search here.
I got my sdcard (with sd-ext partition) working with this twrp.fstab:
Code:
# mount point fstype device [device2, parameters]
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot flags=backup=1;
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1;
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system flags=backup=1;
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache flags=backup=1;
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata flags=backup=1; length=-16384
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="MicroSD";storage;wipeingui;removable
/sd-ext auto /dev/block/mmcblk1p2 flags=wipeingui;removable;backup=1
I'm sure that's not quite right, there are probably some flags I'm missing and definitely some other partitions you'd want to back up. I also have TWRP 3.1.0-0 compiling for this device from source (against LineageOS cm-11.0 tree with precompiled kernel from stock recovery) and booting with internal "emulated" SD and external SD both working, but I need to tweak my BoardConfig.mk a bit more to solve a couple minor issues. If I can get that 100% working I might try to "make bacon" and see what happens, I'm pretty sure the rest of my device tree is right and I've pulled all of the vendor files from the device. I didn't remember to take a backup of my stock ROM when I rooted, but I do have a full backup of my device in its current state.
Sorry to double-post, just an update. Between what I already had, your work here and a conversation with KonstaT about kernels, I have the ZTE N817 kernel and TWRP 3.0.2-0 compiling against LineageOS cm-11.0, newer versions of TWRP may build and run fine against KitKat but the OTA tools need a newer version of Android to build.
local manifests:
https://github.com/stevenh512/local_manifest_zte_n817
device tree:
https://github.com/stevenh512/android_device_zte_n817
kernel tree:
https://github.com/stevenh512/android_kernel_zte_n817
vendor tree:
https://github.com/stevenh512/proprietary_vendor_zte_n817
Just repo init -u https://github.com/LineageOS/android.git -b cm-11.0 and copy the local manifests into .repo/local_manifests before you sync, then:
Code:
. build/envsetup.sh
lunch cm_n817-userdebug
make -j4 recoveryimage
adb push out/target/product/n817/recovery.img /storage/sdcard1/recovery-twrp-new.img
(replace /storage/sdcard1 with /storage/sdcard0 if you have no external SD)
I haven't tried to build the ROM yet, but TWRP works flawlessly, external SD and internal "emulated" (/data/media) SD are both recognized.
Have fun.
jag9906 said:
First off doing this will void your warranty and can brick your device. Following these simple steps should work for you. I will state here and further down, make sure you download all programs needed and both recovery.img and recovery_orig.img. I am in no way resposible for your device being bricked.
**Only thing I have not tested is the external sd card, I make no promises that it works. I only have 1 sd micro card its installed in my main device. So install the recoveries and supersu to your internal sdcard.
This is for assurance wireless, I have seen one or two other n817 devices if the specs are the same, they "should" work with this twrp, but use partition backup and restore by wanam on Play store to get a recovery.img for your device. I do not use this program for system back up, for some reason it does not work properly but its fine for boot,aboot, recovery and other smaller partitions.
This is a ported twrp from kis3 twrp version 3.0.2-0 by KonstaT from here http://konstakang.com/devices/kis3/TWRP/. Also this version of chainfire su SR3-SuperSU-v2.79-SR3-20170114223742 download from here https://download.chainfire.eu/1021/. This twrp recovery has Supersu folder but I still installed the zip from recovery to be sure.
The twrp n817 recovery named: recovery.img along with the original n817 recovery named: recovery_orig.img go here https://github.com/jag9906/n817_twrp
Other programs needed [ROOT]Rashr flash tool, online nandroid backup *root*, SD maid from Play Store. The Rashr flash tool is required, you can use any back up you wish, I prefer SD maid for cleaning up system and removing/freezing programs you can use any you use, this is to remove your temp root after recovery and supersu is installed.
**Again I am stating here the Rashr flash tool is required this will allow you to install the recovery.img with a locked bootloader. This is a must to install this twrp recovery. The twrp app will not work until you have supersu installed. There are other flash tools, but this worked flawless with kingo so its the only one I will support for this guide. If you use another flash tool its on you.
First make a back up prior to installing the twrp recovery. Use the online nandoird back up of all partitions I save them as twrp. If you have external SD card you can do all at once if not do all but data and system then copy to your computer and then back up system folder. Your choice on data, I back up my apk so never data.
Next run Rashr flash tool from Play store the first option is recovery from storage, choose this option then go to your location on sdcard and select recovery.img hit ok it will take about 10 to 15 seconds and ask if you want to reboot into recovery, hit yes and then your device will reboot into recovery. Once loaded swipe and go to install, top left find your SR3-SuperSU-v2.79-SR3-20170114223742.zip file and select that, then swipe to install. Once finished hit reboot and system.
Then run SD Maid or any root tool to uninstall you have. You can now delete/remove Kingo or any root you used prior to installing the recovery and have supersu by chainfire as your root for the device.
You now have a twrp recovery, and chainfire's supersu installed on your n817 device.
thanks to KonstaT and Chainfire for the hard work they have done.
Click to expand...
Click to collapse
Unfortunately Kingo can't root my device and neither can anything else...... Sucks but hey the phone was free. Hopefully something can work in the future *shrugs*
Edit: rebooted "adb reboot disemmcwp" and Kingo worked ._.
Yeah, this phone was pretty difficult before King/Kingo supported it, and with no fastboot I don't think there's any way other than a ZTE signed update to alter the /system partition without rebooting with "adb reboot disemmcwp" first. Before I discovered a post mentioning using that command to disable the write-protection on another ZTE device I was able to get a root prompt with the right SELinux context but I still couldn't write anything to /system. Once I got the write-protection disabled, I didn't even bother with any of the one-click rooting apps. I just got a root shell, mounted /system rw and proceeded to put all of the SuperSU files where they go and set their permissions by hand, rebooted and I was good to go. Of course, once I got a recovery installed I did re-flash SuperSU from an update zip just to make sure it was right.
does anyone have a stock backup, i don't kn0w what i did, but now the standard android recovery tells me there are missing files when i do md5 check and it boot loops right back to recovery, anyone have and recommendations for repair, i can get to stock recovery, i can adb side load updates or choose from cache or sd card, when i pop out the battery and plug in its recognized as:
ZTE WCDMA Technologies MSM
right before boot loop to recovery:
Product: ZTE HSUSB Device Manufacturer: ZTE Incorporated (dmesg)
while in recovery in adb sideload mode
Product: N817 Manufacturer: ZTE (dmesg)
18d1:d001 Google Inc. Nexus 4 (fastboot)(lsusb)
whitout battery black screen:
QSHSUSB_BULK qualcom CDMA technologies MSM
i dont know if im in ftm mode, screen just stays black and shows up as above? when in recovery
stevenh512 said:
I got my sdcard (with sd-ext partition) working with this twrp.fstab:
Code:
# mount point fstype device [device2, parameters]
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot flags=backup=1;
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1;
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system flags=backup=1;
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache flags=backup=1;
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata flags=backup=1; length=-16384
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="MicroSD";storage;wipeingui;removable
/sd-ext auto /dev/block/mmcblk1p2 flags=wipeingui;removable;backup=1
I'm sure that's not quite right, there are probably some flags I'm missing and definitely some other partitions you'd want to back up. I also have TWRP 3.1.0-0 compiling for this device from source (against LineageOS cm-11.0 tree with precompiled kernel from stock recovery) and booting with internal "emulated" SD and external SD both working, but I need to tweak my BoardConfig.mk a bit more to solve a couple minor issues. If I can get that 100% working I might try to "make bacon" and see what happens, I'm pretty sure the rest of my device tree is right and I've pulled all of the vendor files from the device. I didn't remember to take a backup of my stock ROM when I rooted, but I do have a full backup of my device in its current state.[/Q
Change sdcard to sdcard1
Click to expand...
Click to collapse
morpheous1777 said:
does anyone have a stock backup
Click to expand...
Click to collapse
I also wouldn't mind having a stock backup, unfortunately I didn't remember to take a backup before I started tinkering with my system partition, but thankfully I haven't managed to break anything I couldn't fix.
while in recovery in adb sideload mode
Product: N817 Manufacturer: ZTE (dmesg)
18d1:d001 Google Inc. Nexus 4 (fastboot)(lsusb)
Click to expand...
Click to collapse
While in this mode, are you able to actually use fastboot? I ask for two reasons. First, if you're on a stock recovery, the only way you're going to be able to restore a stock ROM (or install any other ROM) from recovery is if it's signed by ZTE, otherwise you'll need another way (like fastboot). Second, as far as I can tell, there is no fastboot on my phone.
leetree2001 said:
stevenh512 said:
I got my sdcard (with sd-ext partition) working with this twrp.fstab:
Code:
# mount point fstype device [device2, parameters]
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot flags=backup=1;
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1;
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system flags=backup=1;
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache flags=backup=1;
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata flags=backup=1; length=-16384
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="MicroSD";storage;wipeingui;removable
/sd-ext auto /dev/block/mmcblk1p2 flags=wipeingui;removable;backup=1
I'm sure that's not quite right, there are probably some flags I'm missing and definitely some other partitions you'd want to back up. I also have TWRP 3.1.0-0 compiling for this device from source (against LineageOS cm-11.0 tree with precompiled kernel from stock recovery) and booting with internal "emulated" SD and external SD both working, but I need to tweak my BoardConfig.mk a bit more to solve a couple minor issues. If I can get that 100% working I might try to "make bacon" and see what happens, I'm pretty sure the rest of my device tree is right and I've pulled all of the vendor files from the device. I didn't remember to take a backup of my stock ROM when I rooted, but I do have a full backup of my device in its current state.[/Q
Change sdcard to sdcard1
Click to expand...
Click to collapse
I'd really love this and I'd love it more if I could contribute in some way... this phone is painfully slow on the stock OS.
Click to expand...
Click to collapse
Have nothing to contribute right now.Just want to THANK all you guys for your unselfish work!!!
Sent from my LGLS770 using Tapatalk
Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help
This worked great, thanks
---------- Post added at 10:03 PM ---------- Previous post was at 09:32 PM ----------
It works, but my system is very unstable right now. I have a feeling it's that KingCrap . It doesn't like to be replaced with another SU. That stuff is malware and I never use it unless I"m desperate. I'm going to try to push 3c toolbox to it. It won't stay up long enough to install it from playstore.
Member96 posts Thanks: 16
Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help
I did a full backup of my zte n817. it's in .img format. pm me and I'll send it to my google drive and give you the link. Do you know what partition goes where? I also have that info too !! After 3 bricked phones I have learned somewhat of a lesson
I can't do anything with it now. It won't stay up long enough. I have a nandroid backup but it's on the external sd which this TWRP can't see. There isn't enough space on the internal to copy it to. I'm giving up for now, I"ve spent way too much time on a $20 phone
slacker8135666 said:
Member96 posts Thanks: 16
Does anyone have the stock rom?? The recovery bricked my assurance n817.Please help
I did a full backup of my zte n817. it's in .img format. pm me and I'll send it to my google drive and give you the link. Do you know what partition goes where? I also have that info too !! After 3 bricked phones I have learned somewhat of a lesson
Click to expand...
Click to collapse
Sent from my LGLS770 using Tapatalk

[RECOVERY][TB128FU][UNOFFICIAL] TWRP 3.7.x for Lenovo Tab M10 Plus (Gen 3)(SDM680)

This version of TWRP works on the Lenovo TB128FU: Tab M10 Plus (Gen 3) and Xiaoxin Pad 2022. It might also work on the TB128XU and Moto Tab G62 - to be confirmed.
Warning: this TWRP will not work for any of the Tab M10 Plus Gen 3 variants with Mediatek SoCs (TB125FU) or UniSoc SoCs (TB328FU,TB328FX).
Code:
#include <std_disclaimer.h>
/*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*/
Working:
Almost everything is working including:
data decryption
ADB/MTP
external SD card
OTG
Known issues:
vibration
when you unmount then remount the data partition, twrp forgets how to decrypt it
you tell me
This guide is not for noobs
There are two problems with the bootloader on these tablets:
Lenovo does not allow bootloader unlocking on some tablets
Lenovo has not enabled fastboot flash on some tablets
So it's not easy to install twrp on these devices. If you are a noob, don't ask for a step-by-step guide - you'll just have to learn more about Android before trying this guide. It's not my fault - blame Lenovo for making development on this tablet so difficult.
unlocked bootloader
You will need a tablet with an unlocked bootloader. Lenovo has not provided a method to unlock many of these tablets. The commands fastboot oem unlock-go, fastboot flashing unlock and fastboot flashing unlock_critical do not work.
You can check on the fastboot menu. The "DEVICE STATE" should be "unlocked".
Some Xiaoxin Pad 2022 models already come with an unlocked bootloader.
There is also a known method to unlock the bootloader. I have not tried it and can't provide any support for it. Use it at your own risk.
Hopefully Lenovo will provide a method in an upcoming OTA.
fastboot flash
If your tablet does not support fastboot flash, you will get an "unknown command" error like this:
Code:
C:\>fastboot flash recovery_a twrp_TB128FU_12.img
Sending 'recovery_a' (98304 KB) OKAY [ 2.288s]
Writing 'recovery_a' FAILED (remote: 'unknown command')
fastboot: error: Command failed
In this case you can use a tool like QFil or edl to EDL-flash twrp. Use the prog_firehose_ddr.elf program from the stock ROM.
Installation
With a stock ROM, it is recommended that you also install Magisk. This will ensure TWRP remains your default recovery. You can either use the boot image patch method, or flash the magisk apk in twrp.
ensure your bootloader is unlocked. On the fastboot menu, "DEVICE STATE" should be "unlocked".
download TWRP to your PC (see the Download section below)
flash the TWRP image:
Code:
adb reboot fastboot <== NOT "adb reboot bootloader"
fastboot flash recovery_a twrp_TB128FU_12.img
fastboot flash recovery_b twrp_TB128FU_12.img
fastboot reboot recovery
if fastboot flash does not work, then use Qfil or EDL to flash twrp to recovery_a and recovery_b
in TWRP: backup the boot, oem and persist partitions in TWRP, if you don't have backups already.
load Magisk by loading the patched boot image, or by installing the zip file. Instructions are linked above.
If you prefer to use button combos, rather than fastboot/ADB commands:
Vol Up + Power = fastboot mode
Vol Up + Vol Down + Power = recovery mode
Changelog
Code:
2023-02-13 - removed abl, bluetooth and modem partitions from twrp
2023-01-10 - fastbootd working
2023-01-06 - fixed "unable to locate parent partition" errors
2023-01-06 - TWRP 3.7.0_12-0: initial release (UNOFFICIAL)
Downloads
twrp-TB128FU_12.img
Source code
https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp/tree/twrp-12.1
https://github.com/Yahoo-Mike/recovery_device_lenovo_TB128FU
Credits
The guys at TeamWin Recovery Project.
Everyone whose device trees I plagiarised from GitHub.
Contributors
Yahoo Mike
Created: 2023-01-06
Last Updated: 2023-02-23 - removed abl, modem and bluetooth from fstab
How to load a GSI using TWRP​prereqs​
unlocked bootloader
copy of vbmeta.img and vbmeta_system.img from your stock ROM
optional: backup of system, data and metadata partition
how to...
adb reboot fastboot
fastboot --disable-verity --disable-verification vbmeta vbmeta.img
fastboot --disable-verity --disable-verification vbmeta_system vbmeta_system.img
fastboot flash system system_arm64_b.img
fastboot -w
fastboot reboot
note: step #5 wipes userdata and metadata
New version just posted.
I fixed the "unable to locate parent partition" problem that resulted in multiple false positives for external partitions.
Now the "Select Storage" menu consists of only "Internal Storage", "Micro SDCard" and "USB-OTG". All are working.
It seems that few people are interested in this machine
Thank you!!!!
Thank you! You have greatly facilitated the tasks with the tablet
I tried to make a full backup in TWRP, everything went fine, I threw a backup on the computer, made a full formatting of all partitions, then an attempt to throw a backup into the internal memory will not succeed, the internal memory is not mounted and generally asks for a password. Need DFE?
AForan said:
I tried to make a full backup in TWRP, everything went fine, I threw a backup on the computer, made a full formatting of all partitions, then an attempt to throw a backup into the internal memory will not succeed, the internal memory is not mounted and generally asks for a password. Need DFE?
Click to expand...
Click to collapse
Thanks for reporting this.
I don't know why the re-formatted data partition is not mounting or allowing you to write to it. I will have a look at this over the next few days.
Are you using adb push to copy to the tablet? Or are you using Windows Explorer (MTP) to copy to the tablet?
Before you formatted the data partition, was it password protected? Or no password/pin/etc ?
You shouldn't need to disable force-encryption.
In the meantime, you could use an SDcard or OTG device to restore your partitions.
Restoring the data partition is a special case. When you format the data partition, there should be a warning in twrp. Something like: "You need to boot into Android before you can re-use the data partition". TWRP only re-formats the partition, it does not encrypt it. So you'll need to boot into Android to let it re-encrypt the partition. After the data partition is re-encrypted, you can restore your backup of the data partition.
Yahoo Mike said:
Thanks for reporting this.
I don't know why the re-formatted data partition is not mounting or allowing you to write to it. I will have a look at this over the next few days.
Are you using adb push to copy to the tablet? Or are you using Windows Explorer (MTP) to copy to the tablet?
Before you formatted the data partition, was it password protected? Or no password/pin/etc ?
You shouldn't need to disable force-encryption.
In the meantime, you could use an SDcard or OTG device to restore your partitions.
Restoring the data partition is a special case. When you format the data partition, there should be a warning in twrp. Something like: "You need to boot into Android before you can re-use the data partition". TWRP only re-formats the partition, it does not encrypt it. So you'll need to boot into Android to let it re-encrypt the partition. After the data partition is re-encrypted, you can restore your backup of the data partition.
Click to expand...
Click to collapse
I understand everything, thank you
I used MTP to transfer files. As for the password, no, the password was not set in the system
AForan said:
I tried to make a full backup in TWRP, everything went fine, I threw a backup on the computer, made a full formatting of all partitions, then an attempt to throw a backup into the internal memory will not succeed, the internal memory is not mounted and generally asks for a password. Need DFE?
Click to expand...
Click to collapse
The short answer
TWRP does not support MTP for our tablet on a re-formatted data partition. You must reboot your tablet before MTP will work properly again.
I can't change that, sorry. You could ask the Teamwin team to change it by raising an issue.
The long answer
TB128FU tablets use FBE (file-based encryption).
In October 2021, the TWRP team decided that TWRP does not support MTP on FBE devices after formatting data until you reboot into Android. This is because mtp uses /data/media as a mount point. TWRP does not recreate that directory for FBE devices:
Code:
void TWPartition::Recreate_Media_Folder(void) {
string Command;
string Media_Path = Mount_Point + "/media";
if (Is_FBE) {
LOGINFO("Not recreating media folder on FBE\n");
return;
}
...
That code has been in TWRP ever since FBE support was introduced in 2016.
Since that change in October 2021, when you reformat the /data partition on an FBE device, you will get the warning: "TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media."
When you reformat the /data partition, it will be unencrypted. When you reboot to Android, Android will re-encrypt the partition.
Before you reboot to Android, you can still adb push files to the unencrypted data partition. You can still use it in adb shell. It's just MTP that won't work properly.
When you reboot to Android, the data partition will be re-encrypted and you might lose everything you put on the (unencrypted) data partition. But MTP will work again for internal storage in TWRP.
Just updated OP with new version of TWRP. It fixes fastbootd. I've done basic tests, but if there are any issues let me know.
Theoretically you should now be able flash a GSI (even a signed one) from TWRP. Let me know if there are issues.
Edit: post #2 updated with instructions on how to flash GSI using TWRP. I successfully flashed Andy Yan's LOS19 using those instructions.
Yahoo Mike said:
The short answer
TWRP does not support MTP for our tablet on a re-formatted data partition. You must reboot your tablet before MTP will work properly again.
I can't change that, sorry. You could ask the Teamwin team to change it by raising an issue.
The long answer
TB128FU tablets use FBE (file-based encryption).
In October 2021, the TWRP team decided that TWRP does not support MTP on FBE devices after formatting data until you reboot into Android. This is because mtp uses /data/media as a mount point. TWRP does not recreate that directory for FBE devices:
Code:
void TWPartition::Recreate_Media_Folder(void) {
string Command;
string Media_Path = Mount_Point + "/media";
if (Is_FBE) {
LOGINFO("Not recreating media folder on FBE\n");
return;
}
...
That code has been in TWRP ever since FBE support was introduced in 2016.
Since that change in October 2021, when you reformat the /data partition on an FBE device, you will get the warning: "TWRP will not recreate /data/media on an FBE device. Please reboot into your rom to create /data/media."
When you reformat the /data partition, it will be unencrypted. When you reboot to Android, Android will re-encrypt the partition.
Before you reboot to Android, you can still adb push files to the unencrypted data partition. You can still use it in adb shell. It's just MTP that won't work properly.
When you reboot to Android, the data partition will be re-encrypted and you might lose everything you put on the (unencrypted) data partition. But MTP will work again for internal storage in TWRP.
Click to expand...
Click to collapse
Thank you for the detailed explanation!
Tell me, how can I unpack backups of this recovery? (.win) in view of the vendor update (zui 14.675), I would like to create patches for convenient firmware
OTA ZUI are not installed, there is a reboot in recovery to install and then boot into the system again
AForan said:
OTA ZUI are not installed, there is a reboot in recovery to install and then boot into the system again
Click to expand...
Click to collapse
Official OTA Updates and TWRP
We found that in the previous version there was this option (the system partition is read-only), here, on the latest version this option is missing
AForan said:
We found that in the previous version there was this option (the system partition is read-only), here, on the latest version this option is missing
Click to expand...
Click to collapse
Welcome to the wonderful world of dynamic partitions (aka super partition). TWRP does not support mounting dynamic partitions as read-write. You can flash dynamic partitions in twrp fastbootd mode, but you can't mount them r/w in twrp recovery mode.
On this device the following partitions are dynamic:
product
system (mounted at /system_root in twrp)
system_ext
vendor
The option you are talking about (Mount system partition read-only) should never have been in the old version. That was my fault. I forgot to tell TWRP that the device has dynamic partitions. I fixed my error in the new version. I apologise for the confusion.
Workarounds​There are workarounds that people have been using on other devices, but there's no guarantee they'll work on our devices. Use them with caution. If any of them work for you, let us know on this thread.
Here's one method.
Here's another method. Note: the developer has just been banned from XDA for 3 months.
If you have the skills, you can also use Magisk modules to write to dynamic partitions.
Must be useful this program: https://forum.xda-developers.com/t/...system-partitions-to-read-write-mode.4521131/
Use it on TB-J716F from TWRP, positive experience.
Yahoo Mike said:
Welcome to the wonderful world of dynamic partitions (aka super partition). TWRP does not support mounting dynamic partitions as read-write. You can flash dynamic partitions in twrp fastbootd mode, but you can't mount them r/w in twrp recovery mode.
On this device the following partitions are dynamic:
product
system (mounted at /system_root in twrp)
system_ext
vendor
The option you are talking about (Mount system partition read-only) should never have been in the old version. That was my fault. I forgot to tell TWRP that the device has dynamic partitions. I fixed my error in the new version. I apologise for the confusion.
Workarounds​There are workarounds that people have been using on other devices, but there's no guarantee they'll work on our devices. Use them with caution. If any of them work for you, let us know on this thread.
Here's one method.
Here's another method. Note: the developer has just been banned from XDA for 3 months.
If you have the skills, you can also use Magisk modules to write to dynamic partitions.
Click to expand...
Click to collapse
Thanks, it's clearer now
Could u makle it available for P11 5G (TB-J607Z) with Android 12???

Categories

Resources