[Q] Incorrectly partitioned SD card, need fix. - Kindle Fire Q&A, Help & Troubleshooting

Hi, I accidentally wiped my SD card in TWRP, and I held the power button in an attempt to stop it. That of course didn't work, and my SD card was unusable. So I tried partitioning it with TWRP (Advanced > Partition SD Card) and that didn't do anything. I plugged it into my PC running Ubuntu 11.04 and formatted it to Fat32, and I'm now able to copy files to it and such with my PC, but I can't flash anything from it, and I have no ROM currently installed on it. I need help getting the SD card working again.

Do you still have TWRP recovery installed? If you do, boot to it and post the result of the following...
Code:
adb shell
parted /dev/block/mmcblk0
unit
^This will ask for another input. Type "B" and hit Enter
print
This will show your current partition layout.

Code:
print
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734296576B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 2041053183B 1192230912B ext4 userdata
11 2041053184B 2309488639B 268435456B ext4 cache
12 2309488640B 7689732095B 5380243456B media

It's showing that the "media" partition (sdcard) isn't formatted to fat32.
You would have to reformat it from TWRP recovery. The following should work.
Code:
adb shell
parted /dev/block/mmcblk0
mkfs 12 fat32
^This will format partition 12 to the fat32 filesystem.

lmntone said:
It's showing that the "media" partition (sdcard) isn't formatted to fat32.
You would have to reformat it from TWRP recovery. The following should work.
Code:
adb shell
parted /dev/block/mmcblk0
mkfs 12 fat32
^This will format partition 12 to the fat32 filesystem.
Click to expand...
Click to collapse
Thank you so much, that fixed it.

FroyoShark said:
Thank you so much, that fixed it.
Click to expand...
Click to collapse
Glad to hear your KF is back to normal.

Missing partition 11 and flag msftres on partition 12
Hello, I have rooted my kindle fire and i tried to partition it with FireParted and it unsuccessfully parted. Here are the partition details:
Model: MMC M8G2FA (sd/mmc)
Disk /dev/block/mmcblk0: 7734296576B
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 131072B 262143B 131072B xloader
2 262144B 524287B 262144B bootloader
3 524288B 11010047B 10485760B dkernel
4 11010048B 212336639B 201326592B ext4 dfs
5 212336640B 229113855B 16777216B recovery
6 229113856B 296222719B 67108864B ext4 backup
7 296222720B 306708479B 10485760B boot
8 306708480B 311951359B 5242880B ext4 splash
9 311951360B 848822271B 536870912B ext4 system
10 848822272B 2041000447B 1192178176B ext4
12 2309488640B 4309000191B 1999511552B fat32 media msftres
Please help thankyou

the simpliest way should be to use fff version 1.1 or higher
boot to fastboot mode and issue "fastboot oem format"
http://forum.xda-developers.com/showthread.php?t=1369405
this should restore the factory partitioning

RE:
It says
. . . FAILED (remote failure)
finished. total time: 0.004s

is your fff version 1.1 or newer ?
twrp installs version 1.0
would suggest to install (linked in) version 1.2 and retry

RE:
I downloaded FIREFIREFIRE 1.2 boot loader
And when i did the fastboot command it worked
Thanks for the input!

glad to help ...

Perfect fix!
Using Android's parted via adb shell as described in this post worked like a charm. I had tried to reformat the sdcard partition from both linux (using gparted) and windows 7, to fat32, but still couldn't get it to mount within android even though I could mount the partition as USB using TWRP or CWMR. But parted via adb shell was the ticket to success! THANK YOU!!

I essentially have the same issue, but cannot get my KF to connect for ADB to run the commands. Seems that when I put the Energy ROM (latest) on it, it now identifies itself as an "Am" in the device manager and no matter what I do I cannot get the drivers to install for it.
The only thing I was able to do successfully is use the KFU to set bootmode to Fastboot if I have it waiting to see device and restart it. There is a brief moment of connectivity but that is it.
My device would work fine if I could get the SDcard portion properly configured/formatted. This all stems from really bricking it good trying to flash the newest Kernel and everything went south.
Any suggestions? Plain english please as I am very novice.

When I mount normally out of twrp it comes up am if I mount SD in twrp it comes up kindle I wonder if this doesn't point straight to your USB mass storage drivers
---------- Post added at 08:23 PM ---------- Previous post was at 08:11 PM ----------
This is what I would do you have choices I think.
1. Unplug your kindle and restore your computer with system restore to an earlier time when the drivers were good then plug your kindle in while in twrp to see if there is any change in adb or mass storage.
Or 2. Startup the kfu and run the driver file to then check device status to see if adb is back online.
Or 3 without your kindle plugged either run driver install then plug in check for a change or go through the process of manually installing your drivers.
---------- Post added at 08:26 PM ---------- Previous post was at 08:23 PM ----------
Edit wait I will look up another post standby
---------- Post added at 08:41 PM ---------- Previous post was at 08:26 PM ----------
http://forum.xda-developers.com/showthread.php?t=1625356 OK start here in about 8 hours I will post what I did when I'm at my computer
---------- Post added at 08:45 PM ---------- Previous post was at 08:41 PM ----------
The driver needs to be edited and reinstalled to use adb on the newer roms.

I had to add
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0001&REV_021&MI_01
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0001&MI_01
to [Google.NTamd64] and [Google.NTx86] in android_winusb.inf before it would recognize the drivers, but after that it worked.
I opened the inf. file with notepad copied the two line code above set my cursor just after [Google.NTamd64] hit enter right clicked pasted the code did the same thing after [Google.NTx86] saved the notepad file. This was all within the provided files in the kindle fire utility. Then ran the driver install disregarded the warning ran it anyway. Giving me working adb

Thanks so much! With a little doing, it finally worked! Once I got the drivers to connect to my device again by adding those lines it made it possible to communicate with it again and get it fixed.
Now, being hooked on this stuff like the rest of you... I may have to change ROM's again to take advantage of the new Kernel with all the fixes for the annoyances.
Hope I don't brick it again. lol

Me too your welcome

Broken SD
Hi. i have partitioned my Scard using TWRP. butt my battery comes down, and phone off.
Now i cannot use my SD Card, in phone i cannot see it. in Windows PC too. Like unconnected.
I have searched in device manager, butt cannot see there my card, no RAW partition. another sdcard works good.
Is my SD Card only software-demaged using TWRP, Or it was hardware-broken by another cause?

gouster3 said:
Hi. i have partitioned my Scard using TWRP. butt my battery comes down, and phone off.
Now i cannot use my SD Card, in phone i cannot see it. in Windows PC too. Like unconnected.
I have searched in device manager, butt cannot see there my card, no RAW partition. another sdcard works good.
Is my SD Card only software-demaged using TWRP, Or it was hardware-broken by another cause?
Click to expand...
Click to collapse
The kindle fire 1 doesn't have a removable SD card.
Sent from my XT907 using Tapatalk

Related

[GUIDE][XS/XSL]One time re-partitioning for Marshmelow ROM flashing

A Marshmellow based AOSP ROM was recently released by billchen1997. To flash it, re-partitioning of the partition table is required.To do so, following procedure can be used.
Note: This procedure doesn't work with nAOSP 6.0 ROM released by mickybart now, please find the appropriate instructions in ROM thread.
Do make a note of few things though:
Internal storage which can be accessed via PC by selecting "File transfer"option manually after connecting.
Recovery for Me was retained since I had flashed it in fota partition, hence I would recommend flashing recovery in fota partition before hand.
Performing them on PC would be convenient as some calculations are required.
Wiping all partitions before hand is recommended.
Text formatting conventions are used in the code sections to depict different meanings:
Bold : States the commands to be entered on adb.
Italic : States what values, usually which varies user to user, has to be entered at the place.
Underlined : States output shown by a certain command preceding it.
Repeated x/y/z are variables.
As pointed out by @GjorgiDxc, the phone is not directly encrypted. We need to encrypt it manually. To do so, flash only the ROM, without gapps or root, boot into ROM and encrypt the phone. More details can be found here. Encrypting data would make data partition inaccessible in TWRP.
Procedure:
Take backup of Your apps as well as the data from the internal storage (Photos, Music, Video etc) as it will all be wiped.
Boot into TWRP.
Goto mount option and untick all partitions.
On PC, using adb, type out the following commands,
Print the current partition table. Note down the starting cylinder of partition 14, It will be needed further.
Code:
[B]adb shell
fdisk /dev/block/mmcblk0
p[/B]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now delete the sdcard(15) and data(14) partition.
Code:
[B]d
15
d
14[/B]
Create new data partition which uses remaining space.
Code:
[B]n[/B]
[U]First cylinder (xxx-yyyyyy, default xxx): [/U] [I]You have to enter the start cylinder of partition 14 as read in partition table earlier.[/I]
[U]Last cylinder or +size or +sizeM or +sizeK (zzzzz-yyyyyy, default yyyyyy):[/U] [I]Enter the yyyyyy value.[/I]
Print and write the modified partition table. Note down the "Blocks" value of partition 14 here.
Code:
[B]p
w[/B]
Code:
[U]Command (m for help): [/U][B]t[/B]
[U]Partition number (1-14): [/U][B]14[/B]
[U]Hex code (type L to list codes):[/U][B] 83[/B]
One of the two paths can be followed here now. It depends on which filesystem is required for data partition, ext4 or f2fs. For ext4, follow the first subsection and for f2fs, second one.
Now the calculation needs to be done for ext4 file system. From the "Blocks" value of partition 14, subtract 16, since we have to leave 16384 bytes and each block equals 1024 bytes (16*1024=16384).
For Me, the "Blocks" value of partition 14 was 29161464. Hence, my final value was 29161464-16=29161448. Now divide the solution by 4.
Therefore, 29145080/4=7290362. Consider it as final_size. This many blocks will be allocated for the data partition. This needs to be done since the partition needs to be made using blocks size.
Now we format the data partition such that it acquires the space and as well as leaves the trailing 16384 bytes. This creates a data partition with ext4 type, allocation unit as 4096 and size in blocks as final_size.
Code:
[B]mke2fs -t ext4 -b 4096 /dev/block/mmcblk0p14[/B] [I]final_size[/I]
For f2fs file system, simply run the following command, no need of any calculation:
Code:
[B]mkfs.f2fs -r 16384 /dev/block/mmcblk0p14[/B]
Code:
[B]exit
adb push -p pure_aosp_marshmallow_r1.zip /tmp/[/B]
Now on phone, in TWRP, Flash the ROM via install option, and done!
Notes:
First Reboot is long.
If after boot it says encryption failed, let it reset the phone. Then it will work properly.
For root, flashing Update zip of SuperSU from here works.
Wiping data via TWRP menu will allocate the trailing 16384 bytes to it too, so it is not to be done.
For gapps, flash Pico gapps from here. Then after reboot and login, go to Settings, Apps>Settings icon at top right> App permissions. Now in each permission, open the permission, select show system from options and enable the permission for all system apps.
If You get error like "Error retrieving information from sever.[RPC:C:S-7:AEC-7 CDY7-E3OJ-V2TKC]" in Google Play Store and are not able to install any app, then log out and log in again into Your google account via settings.
If You copy a file and want to access it via TWRP, mount data partition and go to /data/media. Although data won't mount if You encrypt Your phone.
Credits to @SystemR89 for his tutorial as base and billchen1997, @mickybart for his instructions and TWRP.
Calculations are not needed now since micybart has modified the TWRP to leave trailing 16384 bytes at end. The TWRP can be found here.
Thanks for your guide friend. What is difference between this method and your previous method http://forum.xda-developers.com/showthread.php?p=64433804 ? I think your previous method is easier and it's not confusing.
BTW I wiped /data in twrp and I don't have any problem
@Mirhawk so what are you saying Friend? What will be the difference we get than your instruction.will it solve my battery not charching problem.?actually I used mickybarts recovery last time.so was that OK or I have to flash the official twrp to do the job
pejman97 said:
Thanks for your guide friend. What is difference between this method and your previous method http://forum.xda-developers.com/showthread.php?p=64433804 ? I think your previous method is easier and it's not confusing.
BTW I wiped /data in twrp and I don't have any problem
Click to expand...
Click to collapse
The earlier one allocated less space for user. Yeah, I agree, this one is a bit more complicated than previous one, but it is as per some of the instructions provided by billchen1997. Wiping /data with previous process works, but as it wouldn't with this process. I will have to test that if it will work.
nageswarswain said:
@Mirhawk so what are you saying Friend? What will be the difference we get than your instruction.will it solve my battery not charching problem.?actually I used mickybarts recovery last time.so was that OK or I have to flash the official twrp to do the job
Click to expand...
Click to collapse
As said above, it will allocate more usable space for user. Well, modifying of partition should not affect Your offline charging. I used the TWRP by SdtBarbarossa, if it makes any difference.
Why were you saying storage is not accessable via PC? Internal storage shows up fine for me via PC. The only issue I have is with recovery, but there should be a fix to the recovery by mickybart (he is maintaining TWRP) to recognize the new repartitioning, so I can live with that.
GjorgiDxc said:
Why were you saying storage is not accessable via PC? Internal storage shows up fine for me via PC. The only issue I have is with recovery, but there should be a fix to the recovery by mickybart (he is maintaining TWRP) to recognize the new repartitioning, so I can live with that.
Click to expand...
Click to collapse
You are able to save in internal storage using PC? And if You save a file, does it show up in /storage/emulated/0?
All I get is blank window when I open "Xperia S" icon in windows explorer.
Never mind, forgot to select the option for file transfer. Will update that now.
Mirhawk said:
You are able to save in internal storage using PC? And if You save a file, does it show up in /storage/emulated/0?
All I get is blank window when I open "Xperia S" icon in windows explorer.
Click to expand...
Click to collapse
Yes I can. I think after creating partiton14 you should type
t
14
c
I think I did that, but anyway yes i can see the whole 27GB of storage on the computer, and thats how i flash gapps. I flash rom via /tmp and gapps after it boots up. Also maybe you've missed this, but you have to toggle "File tranfer" in the notification shade, the default is "Charging cable" and it doesn't display the internal storage. Pull down notifications, tap on the one bellow USB debugging and select the second option. I'll post some screenshots maybe later, I'm doing some battery testing atm.
GjorgiDxc said:
Yes I can. I think after creating partiton14 you should type
t
14
c
I think I did that, but anyway yes i can see the whole 27GB of storage on the computer, and thats how i flash gapps. I flash rom via /tmp and gapps after it boots up. Also maybe you've missed this, but you have to toggle "File tranfer" in the notification shade, the default is "Charging cable" and it doesn't display the internal storage. Pull down notifications, tap on the one bellow USB debugging and select the second option. I'll post some screenshots maybe later, I'm doing some battery testing atm.
Click to expand...
Click to collapse
Yeah, thanks, the notification doesn't show up on lock screen.
I don't think there is any need to type "c" after creating partition, since it converts the partition to fat32 and it is not needed here.
Mirhawk said:
Yeah, thanks, the notification doesn't show up on lock screen.
I don't think there is any need to type "c" after creating partition, since it converts the partition to fat32 and it is not needed here.
Click to expand...
Click to collapse
I never knew that, still no issues with doing that
So you've missed the notification? You're able to see storage now right?
@Mirhawk try this if it works.connect device to PC.then select file transfer.then goto settings developer option and turn off the USB debugging.it worked for me
Mirhawk said:
You are able to save in internal storage using PC? And if You save a file, does it show up in /storage/emulated/0?
All I get is blank window when I open "Xperia S" icon in windows explorer.
Never mind, forgot to select the option for file transfer. Will update that now.
Click to expand...
Click to collapse
I'm able to access all 27GB in my device and PC. I did everything exactly like you instruction http://forum.xda-developers.com/showpost.php?p=64433804&postcount=1487 till item 4, then I went to wipe menu in twrp and ticked /data partition then pressed on "Repair or change file system" then pressed on resize, then it changed and shows all 27GB then I choose EXT4 then wiped all partitions on my device by twrp, then I did rest of your instruction
Screenshots
 @Mirhawk
GjorgiDxc said:
I never knew that, still no issues with doing that
So you've missed the notification? You're able to see storage now right?
Click to expand...
Click to collapse
nageswarswain said:
@Mirhawk try this if it works.connect device to PC.then select file transfer.then goto settings developer option and turn off the USB debugging.it worked for me
Click to expand...
Click to collapse
Yup, it works for Me, just had to unlock the screen to get notification.
pejman97 said:
I'm able to access all 27GB in my device and PC. I did everything exactly like you instruction http://forum.xda-developers.com/showpost.php?p=64433804&postcount=1487 till item 4, then I went to wipe menu in twrp and ticked /data partition then pressed on "Repair or change file system" then pressed on resize, then it changed and shows all 27GB then I choose EXT4 then wiped all partitions on my device by twrp, then I did rest of your instruction
Click to expand...
Click to collapse
Yeah, it would work that way since the 16384 bytes are left outside the data partition end border in the older procedure. Here, we leave the 16384 bytes inside the end boundary of the data partition. My screenshots after following this procedure with size are attached.
Mirhawk said:
Yup, it works for Me, just had to unlock the screen to get notification.
Yeah, it would work that way since the 16384 bytes are left outside the data partition end border in the older procedure. Here, we leave the 16384 bytes inside the end boundary of the data partition. My screenshots after following this procedure with size are attached.
Click to expand...
Click to collapse
We both did the same but why I lost about 1GB rather than you?
pejman97 said:
We both did the same but why I lost about 1GB rather than you?
Click to expand...
Click to collapse
In the previous method, more than 16384 bytes are left out. There 16384 cylinders*bytes_per_cylinder are left out. Hence there is a difference in size.
Mirhawk said:
In the previous method, more than 16384 bytes are left out. There 16384 cylinders*bytes_per_cylinder are left out. Hence there is a difference in size.
Click to expand...
Click to collapse
Thanks for your instructions it's clear at the the beginning. Now there is no way to use old p15 in this rom until doing like this to use all storage size. That's clear now. So, can I leave about 1G as mmcblk0p15 with vfat system just to flash an update and gapps in the future? Cause all data partition will be wiped if we reset the device.
Can anyone help me? When I try adb in PC, i receive this message: device not found.
I have the phone with TWRP and connected by Usb to the PC.
In the past, i increased the partition for lollipop without problems.
What am i doing bad??
Update:
If I connect the phone with lollipop instead TWRP i can access to the phone without problems. Adb found my de vice attached.
hi, thanks for the detailed instructions. is there any way (command) fo format as f2fs instead of ext4?
jgilalonso666 said:
Can anyone help me? When I try adb in PC, i receive this message: device not found.
I have the phone with TWRP and connected by Usb to the PC.
In the past, i increased the partition for lollipop without problems.
What am i doing bad??
Click to expand...
Click to collapse
Just connect your device to PC and open command. Write (adb devices) if the device doesn't detect while youre device is connected to PC go to advance menu in twrp and open side load and swipe then press cancel then your device should be detected by this command (adb devices)
Ok. I'm gonna try. Thanks

Kindle Fire unable to mount

Ok so i rooted my kindle fire first gen, i have twrp 2.7.0.1, however i did the dumbest thing ever. i erased everything with wipe...now i have no zips no nada, tried to connect to my pc, now i get an error message saying "please insert disk" like nothing is there, i have been researching for weeks and nothing. can someone please help me...also i tried to adb push but it says i have no directories, sideload doesnt even work
Reka39 said:
Ok so i rooted my kindle fire first gen, i have twrp 2.7.0.1, however i did the dumbest thing ever. i erased everything with wipe...now i have no zips no nada, tried to connect to my pc, now i get an error message saying "please insert disk" like nothing is there, i have been researching for weeks and nothing. can someone please help me...also i tried to adb push but it says i have no directories, sideload doesnt even work
Click to expand...
Click to collapse
in twrp select
mount, check SD card, mount adb storage
Sent from my XT1060 using XDA Labs
in TWRP 2.7.0.1 there is no option to mount sd card. at least not in mine any way lol.
Reka39 said:
in TWRP 2.7.0.1 there is no option to mount sd card. at least not in mine any way lol.
Click to expand...
Click to collapse
do you know the original fine name for twrp.img ?
Sent from my DROID Turbo using XDA Labs
sd_shadow said:
do you know the original fine name for twrp.img ?
Sent from my DROID Turbo using XDA Labs
Click to expand...
Click to collapse
unfortunately i don't. i just , I just know that its twrp 2.7.0.1, also if this helps a little when i hook it into my computers (3 of them, Windows XP, Windows 7 and 10) they all say file linux cd , when i look in my drivers it says amazon otter-x. it will not let me update the driver on any of the machines.
Reka39 said:
unfortunately i don't. i just , I just know that its twrp 2.7.0.1, also if this helps a little when i hook it into my computers (3 of them, Windows XP, Windows 7 and 10) they all say file linux cd , when i look in my drivers it says amazon otter-x. it will not let me update the driver on any of the machines.
Click to expand...
Click to collapse
OtterX 2.7.0.1 doesn't have mount options that work
did you convert partitions to OtterX?
Sent from my XT1060 using XDA Labs
---------- Post added at 11:41 PM ---------- Previous post was at 11:40 PM ----------
Started a Thread [How To] Fix OtterX Install Errors, Partition sizes, Unable to Mount System... with some possible fixes for those having issues since converting to OtterX, with pushing files, failure to mount system errors when installing Lollipop Roms...
Partitions all should say Present: Yes
System: Current file System: Ext4 - Size: 751MB (768MB)
Cache: _Current File System: Ext4 - Size: 503MB (512MB)
Data:__Current File System: _ f2fs - Size: 5820MB (5880mb)
Sent from my XT1060 using XDA Labs
No I don't think so I just wiped it then when all my options failed I did a factory reset which was probably foolish..I've tried all types of tools kfu n all types of drivers nothing seems to work
Reka39 said:
No I don't think so I just wiped it then when all my options failed I did a factory reset which was probably foolish..I've tried all types of tools kfu n all types of drivers nothing seems to work
Click to expand...
Click to collapse
I would flash the Otter /Blaze 2.7.1.0 twrp
see Flashing Twrp in FFF bootloader with fastboot.exe
Sent from my DROID Turbo using XDA Labs
sd_shadow said:
OtterX 2.7.0.1 doesn't have mount options that work
did you convert partitions to OtterX?
Sent from my XT1060 using XDA Labs
---------- Post added at 11:41 PM ---------- Previous post was at 11:40 PM ----------
Started a Thread [How To] Fix OtterX Install Errors, Partition sizes, Unable to Mount System... with some possible fixes for those having issues since converting to OtterX, with pushing files, failure to mount system errors when installing Lollipop Roms...
Partitions all should say Present: Yes
System: Current file System: Ext4 - Size: 751MB (768MB)
Cache: _Current File System: Ext4 - Size: 503MB (512MB)
Data:__Current File System: _ f2fs - Size: 5820MB (5880mb)
Sent from my XT1060 using XDA Labs
Click to expand...
Click to collapse
omg you are so awesome i could kiss you right now!! thanks!

TOLTESPR / SM-N910P hard brick trials and solution (mmc_read failed)

Greets all,
Apologies in advance for the longer post.
TLDR: Writing the debrick-n910p.img image to SDcard using Windows (10 x86_64) for me caused my hard bricked SM-N910P / Sprint Samsung Galaxy Note 4 to endlessly boot-loop (displaying BOOT RECOVERY MODE / CHECK BOOT PARTITIONS.. / COPY FROM T-FLASH.. / BOOT RECOVERY / WRITE 188416 sectors / REBOOT). I found my solution for this issue to be that as long as I wrote the debrick-n910p.img image in Windows (10 x86_64), then booted into Linux and wiped the GPT data structures on the SDcard only to convert the SDcard to basic MBR (+DOS compatible flag), then created & formatted a single 32GB partition as FAT32, then and only then, write the debrick-n910p.img image file to the SDcard in this way, I was able to save my hard-bricked phone flawlessly!
I ran into the "mmc_read failed" issue that many posters to this site have experienced. I wanted to add the solution that worked for me along with the issues I ran into, as a reference for myself if I ever need it again in the future, and to pass on the information in the event others may find it helpful.
In all my trials and research I never found a point-by-point / exact instructions for the SM-N910P / Sprint Samsung Galaxy Note 4, nor anyone running into the same issue(s) that I did. that's what this post is => links to others solutions, my experience, and my solution for a hard-bricked SM-N910P / Sprint Samsung Galaxy Note 4.
SCENARIO: After ~6months of owning my phone I bought from craigslist it started experiencing random lagging, then random reboots, and ultimately the phone failed to boot into the OS one day. So I booted up TWRP, did a full-wipe and fresh OS load. after the OS flash (like I've done a million times, nothing different/strange) the device was set to reboot, then the screen went dark, and never came back on. just poof. it would flat-out not boot again; no LED during charging, nothing would happen when attempting to power on the phone, or any attempt to try booting recovery (Home+Vol-Up+Power) or to Odin/Kies download-mode (Home+Vol-Down+Power). To me the phone was dead, I considered it the "true brick". Yet, I wondered at the most curious thing that would happen when I connected the phone to my computer via the microUSB cable without the battery; I would hear the "new device attached" Windows chime, and Device Manager would list a new "Qualcomm HS-USB QDLoader 9008" device. otherwise, the phone remained dark, and completely void of any life.
At this point I started researching to purchase a replacement cellphone when a website caught my eye with the title "Qualcomm Snapdragon Unbrick Guide, Snapdragon’s are UNBRICKABLE".
I skimmed over the text, and began thinking it possible to revive my (broken?) phone - I just desired a straight-forward HOWTO describing the procedure how I could resurrect my phone, and I figured I would be on my way.
In the end, I found some promising posts, and the very SM-N910P debrick image itself (see below for links), but never found a step-by-step for my exact model of phone.
N910P Debrick Image + Useful Links
Mega Link to the N910P debrick image (128MB)
Samsung N910P Galaxy Note 4 Sprint USA Repair Firmware (N910PVPU4COG5_SPT4COG5_Sprint_USA_v5.1.1_Repair_Firmware.zip)
Win32DiskImager (Project Homepage) (v0.9 binary)
dd for windows
Galaxy Note 4 Unbrick/Debrick.img for N910G/F/T/W8 [unbrick] [unbrick image]
[*]- Inside, a reference For N910P refer this thread​
Galaxy Note 4 N910T FIXED HARD BRICKED
SM-N910P (US-Sprint) debrick.img
All instructions seemed to state I needed a 16GB or larger SDcard, so I went out and purchased a brand new 128GB MicroSDXC card, specifically Samsung MicroSDXC EVO Memory Card w/ Adapter 128GB (2017 Model) - Model: MB-MP128G / Model Code: MB-MP128GA/AM
The gist of all the reports on how to fix my issue was to write the N910P debrick image to a micro SDcard and magically the phone would come back to life. And so, I did just that. In my case using Windows 10 x86_64 - using the suggested applications to write the image to the SDcard: Win32DiskImager and/or dd for windows, then popping the SDcard into the "dead" phone, attaching the battery to the phone and pushing power - or one of the 3 finger salutes (recovery/download-mode) - then the magic would happen, the screen would show the following text:
Code:
BOOT RECOVERY MODE
CHECK BOOT PARTITIONS..
COPY FROM T-FLASH..
BOOT RECOVERY
WRITE 188416 sectors
REBOOT
But, unfortunately for me, that is all it would do, I would keep seeing that text over and over... If I let the "COPY FROM T-FLASH.." appear then press one of the 3 finger salutes (recovery -or- download-mode), the phone would just reboot before it displayed the rest, and continue back in it's loop:
Code:
BOOT RECOVERY MODE
CHECK BOOT PARTITIONS..
COPY FROM T-FLASH..
BOOT RECOVERY
WRITE 188416 sectors
REBOOT
This just kept occurring over, and over with infinite reboots. Yet, ALL the documentation said it would ultimately boot into download-mode, I just had to "put it in the freezer to let the phone cool" (never mind that the phone wasn't hot AT ALL) for an hour or something similar?? All my searching found nobody else with this issue (at least no one reporting it). So I am reporting it and also reporting how I fixed my sorry state of affairs.
As I noted above, I was using Windows 10 x86_64 as the OS and Win32DiskImager, as well as dd for windows, to write the debrick image to the SDcard up to this point. This was my process:
:: Windows 10 ::
place SDCARD in drive
format the SDCARD (drive d:/f:, whichever) through Windows Explorer (explorer.exe) via RIGHT-CLICK on drive -> Format ...
capacity 119GB / Filesystem: exFAT / Allocation Size: drop-down = Default Allocatio-- n Size
CHECK Quick Format
click Start button
click OK
click OK when finished
click Close button
in Windows Explorer (explorer.exe), RIGHT-CLICK on SDCARD drive -> Eject
eject SDCARD from computer
- EITHER Win32DiskImager OR dd for windows, only do 1.
:: Win32DiskImager ::
run Win32DiskImager as Administrator
DEVICE = drive of the SDCARD (D:/F:, whichever)
IMAGE FILE = click FOLDER icon, select "debrick-n910p.img"
click WRITE button
click OK
at Write Successful = click OK
more then likely (win10) a ****-ton of Explorer screens pop up, with errors like "You need to format the disk in Drive ? before you can use it" pops up
IGNORE ALL THIS, ALT-F4 to close ALL the pop-ups and errors
OR just REBOOT, as at this point we are done
Shutdown Windows (10) -> REBOOT
:: dd for windows ::
open "cmd" as Administrator
dd --list
dd if=debrick-n910p.img of=\\.\Volume{3fde94fa-d22d-11e7-b791-806e6f6e6963} bs=1M
Once the debrick-n910p.img file is finished being written to the SDcard, 27 partitions (what appears to be mostly duplicate) will show up and all drive letters will get filled, being displayed as mostly unreadable, that is just the nature of what the debrick image is.
My Solution to this situation was as follows:
:: LINUX ::
boot linux from USB -or- CD (I booted a handy USB stick with Qubes OS v4-rc3, choose Troubleshooting -> Rescue a Qubes System)
upon boot, choose "3" to be dropped to shell
mount windows folder that holds the debrick N910P image = mount /dev/sda2 /mnt/sysimage
place SDCARD in drive
fdisk -l << make sure your SDcard shows up (/dev/mmcblk0) is there
cgdisk /dev/mmcblk0
delete ALL paritions (using "d" on each highlighted partition)
"New"
Fist sector = hit ENTER (choose default = 2048 for me)
Size in sectors = 32G
Hex code = 0700 (Microsoft basic data)
Partition name = hit ENTER
"Write"
type "yes"
"Quit"
gdisk /dev/mmcblk0
should display = "Found valid GPT with protective MBR; using GPT"
"x" (extra functionality (experts only))
"z" (zap (destroy) GPT data structures and exit)
"Y" (Yes to continue)
"N" (blank out MBR)
fdisk /dev/mmcblk0
"p" (print parition table)
"c" (toggle dos compatibility flag)
should show DOS COMPATABILITY FLAG SET (DEPRICATED)
"d" (delete partition)
MAKE SURE NO PARTITIONS EXIST!
"n" (new partition)
"p" (primary)
hit ENTER (default = "1")
hit ENTER (first sector, my default was 63)
"+32G" (last sector, this creates 32GB partition)
"a" (toggle bootable flag, should show "the bootable flag on partition 1 is enabled now")
"t" (partition type)
"c" (W95 FAT32 (LBA))
"w" (write table to disk and exit)
Format the new partition, FAT32
mkfs.fat -F 32 /dev/mmcblk0p1
Goto the folder containing the debrick N910P image
cd /mnt/sysimage/Users/$USER/Downloads/SM-N910P-trltespr
dd if=debrick-n910p.img of=/dev/mmcblk0 bs=1M
sync
Eject sdcard and place in your Note 4 phone
This time, when I put the battery in the phone, I got the same text as before:
Code:
BOOT RECOVERY MODE
CHECK BOOT PARTITIONS..
COPY FROM T-FLASH..
BOOT RECOVERY
WRITE 188416 sectors
REBOOT
And then, it did a REAL reboot, and went directly to download-mode!
I tested this multiple times - as long as I wrote the debrick image in Win10, and then erased the SDcard and formatted it as Fat32 without using GPT just a basic MBR, and wrote the debrick image that way in linux it worked flawlessly!
let it boot, then do it's reboot
should be able to go into RECOVERY = Home+Vol-Down+Power !!!
:: Boot Windows ::
unzip "N910PVPU4COG5_SPT4COG5_Sprint_USA_v5.1.1_Repair_Firmware.zip"
run Odin3 3.09
click PIT button -> select "TRLTE_USA_SPR.pit" -> click OPEN
click AP button -> select "ALL_SPT_N910PVPU4COG5_N910PSPT4COG5_CL5303209_QB5691107_REV00_user_low_ship_MULTI_CERT.tar.md5" -> click OPEN
phone should be in DOWNLOAD mode (home+vol-down+power -> UP to continue) and connected via microUSB, Odin3 should be detecting it with a BLUE ID:COM lit up on top-left
click START button in Odin3
when finished it will reboot, and all should be well
- One last note, about the "mmc read fail" error, I took this gentleman's advice:
As a side note....
IF YOU HAVE THE MMC READ FAIL MESSAGE!!!
Which consists of Random Reboots, Heating Issues when theirs hardly no apps on, or even Lag or Glitchyness.
The Temp FiX that I've been using everyday and haven't had these issues since was downloading this app
WakeLock Manager and setting to PARTIAL LOCK! on Level 4.
Click to expand...
Click to collapse
And am currently running Wake Lock - PowerManager from Google Play as suggested, just to be safe - and so far, I have not YET had to deal with that horrid business again (so far, fingers crossed).
And there ye have it, that is my story, my tribulations, and my fix. Thank you to all who came before me, and for everyone's good advice = Good luck to all, and have a great rest of 2017.
XORr0 said:
[*]mount windows folder that holds the debrick N910P image = mount /dev/sda2 /mnt/sysimage
Click to expand...
Click to collapse
Hi man, thank you for the post, but can´t mount the sysimage
Help me please!!!
Mega Link a la imagen de debrick N910P ( 128MB )
the files are not there if it is not too much trouble to provide me with the: confusing files: confusing

[REPARTITION] Nexus 5 Repartition [HAMMERHEAD] [16GB/32GB] [UA TWRP]

Nexus 5 Repartition​
No one is responsible for your actions except yourself. Everything written further may potentially brick your device, although risk is reduced to minimum.
This repartition package offers 1.5G /system; a /vendor partition and it is fully backward compatible with any ROM (including stock system.img).
Known-issues
HTML:
- If repartition pack says that device isn't correct,
than, if partition table wasn't modified before,
congrats! your device has different memory chip
that those I worked with. No worry, PM me and
I'll add support for it.
DO THE BACKUPs. Repartition will erase all your data
USB connection to PC is MANDATORY else you will not have opportunity to push ROM to your device
Installation
HTML:
# Before processing further we highly recommend you backup persist using terminal and dd comand and EFS
# Or you might lose your IMEI/WIFI + BT mac addresses
# This mod is backwards compatible with any ROM so we highly recommend NOT to reverse it if repartition went well.
# You should use ONLY recovery from this thread since other don't support all benefits of this mod.
# When installing ROM just after you flashed zip and before installing GAPPs you MUST make a resize in TWRP since all roms are build for ~1G system.
# To restore stock layout use same zip and steps as for repartition.
1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).
2. Backup your data & Move your files from flash to your PC.
3. Flash repartition pack zip.
4. Do the actions asked by repartition pack (go to Terminal in ordinary recovery and input word that pack will tell you. Everything else will be done automatically).
5. Phone will reboot into recovery.
6. Install TWRP from below (it is build with support of new partitions layout and sizes. It can be differed from official TWRP by next format 3.x.x-1 UA).
7. Format everything. (mount errors will not affect formatting!)
- In TWRP: Wipe > Format data
- Type yes
- Once this completes go to: Wipe > Advanced Wipe
- Tick all the boxes and wipe. There should be no further mount errors.
8. Install ROM which you like.
9. Enjoy better flash partition layout.
If something gone wrong - we recommend you NOT to do anything by yourself. Write here for help, else you may do only worse.
Downloads:
Repartitioning package: GitHub
Credits:
Special thanks to
- Unlegacy-Android team;
- Sudokamikaze;
- surfrock66 for his gide for Nexus 5;
As usual, feedback is appreciated
XDA:DevDB Information
Nexus 5 Repartition, Tool/Utility for the Google Nexus 5
Contributors
Clamor
Source Code: https://github.com/clamor95/android_device_unlegacy_recovery
Version Information
Status: Stable
Created 2018-09-19
Last Updated 2019-01-18
Common issues and F. A. Q.
Repartition pack should be safe for most devices. Common mistakes, issues and their solution will be published here.
1. You shouldn't flash any internal parts of repartition pack (*.sh files) only flash whole zip using TWRP. You may use my scripts for personal use or projects but authorship should to be kept.
2. If something isn't mounting after repartition try to format partitions that don't mount using Wipe -> Advanced Wipe in TWPR. Ideally you should format in that way all partitions in Advanced Wipe menu (see 5-th step of installation guide).
3. To be sure that repartition went well I enclose loging zip. Flash it after repartition (when device reboots into TWRP). It won't modify anything only generates a partition.log in root of internal storage and outputs your current partition layout to screen. You shoud check if your layout is same as those fragments I provide under spoiler (file systems doesn't matter). If there are any differences you have to discribe what you did and enclose partition.log to your post.
HAMMERHEAD STOCK
Code:
25 192937984B 1266679807B 1073741824B system
26 1266679808B 1298137087B 31457280B crypto
27 1298137088B 2032140287B 734003200B cache
HAMMERHEAD MODIFIED
Code:
25 192937984B 1803551231B 1610613248B system
26 1803551232B 2065695231B 262144000B vendor
27 2065695232B 2097152511B 31457280B crypto
28 2097152512B 2306867711B 209715200B cache
4. Flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).
5. To backup persist partition you need PC with installed adb. Boot your hammerhead in TWRP and plug to PC. Than use next commands.
Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p16 of=/sdcard/persist.img
Than copy .img file from root of internal storage to your PC. Although, script doesn't affect that area, backup of this partition may help in case of any problems with mac address etc.
Thank you for this zip!!! It works fine but I used nano package gapps for the face unlock but still does not work on LOS 15.1. Any suggestions
Vendor partition means support for treble.... Right?
---------- Post added at 04:11 AM ---------- Previous post was at 03:44 AM ----------
After flashing a ROM the system partition resizes back to 1009mb...
Can this be fixed?
@sinkoo1979 try bigger gapps, alse, it may be Lineage problem.
@getrooted0019 you didn't read Installation part carefully, did you? You need to use resize option in TWRP to restore original size after flashing ROMs since they are build for 1G /system partition.
getting a message in twrp "this is not a nexus 5" and won't let me switch back to stock.
@sinkoo1979 send me your partition table in bytes
Clamor said:
@sinkoo1979 send me your partition table in bytes
Click to expand...
Click to collapse
Data and vendor partitions in my nexus 5 are 0mb and not present. System showing about 1028mb while cache is on 29mb.
Thank you for your help but can't change the cache storage back to stock. Can't access the internal storage in TWRP. I think I corrupted my partitions on the nexus 5. Nexus 5 boots into TWRP but can't access nothing. Tried to flash different rom with OTG but bootloops. Can't flash stock because the cache partition is too small.
@sinkoo1979 just stop. I'd ask you to create a telegram account and PM it to me here. I'll help you, just don't do anything
Clamor said:
@sinkoo1979 just stop. I'd ask you to create a telegram account and PM it to me here. I'll help you, just don't do anything
Click to expand...
Click to collapse
Thank you for your help
This is fixable! I was a noob and didn't resize my system partition after flashing rom. Flashed the hh repartition to go back to stock in the ua twrp and got a bunch of errors. Then flashed stock recovery and tried again. This is not a Nexus 5 popped up. The backup file is inside the flashable zip. I just used adb shell and parted to execute the commands listed in backup and viola my Nexus 5 is back. So those freaking out that they messed up their phone...don't worry it's fixable just listen to Clamor. Anyone can pm me too if you need help.
@typow102 if repartition pack says "It is not Nexus 5" than you shouldn't continue without asking here. Using scripts from pack on them own is dangerous as well. Currently I don't know how many types of MMC installed in our Nexus 5 and "It is not Nexus 5" on repartition or on returning to stock may indicate a new type MMC chip like it was with Nexus 7 (2013)
Clamor said:
@typow102 if repartition pack says "It is not Nexus 5" than you shouldn't continue without asking here. Using scripts from pack on them own is dangerous as well. Currently I don't know how many types of MMC installed in our Nexus 5 and "It is not Nexus 5" on repartition or on returning to stock may indicate a new type MMC chip like it was with Nexus 7 (2013)
Click to expand...
Click to collapse
That's the thing though It worked perfectly the first time I flashed it. No errors. Luckily I have had quite a bit of experience with terminal and parted so I felt confident in what I was doing. Can I help you in any way with this? There very well maybe a different mmc chip we don't know about yet.
@typow102 feel free to help if you are certain you can.
For those who downloaded repartition pack before this message is published, please redownload pack since previous version might have a problems with repartition. If repartition was already made, don't worry everything should be fine. Just use up-to-date pack.
Do I need to resize the partition in twrp every time after flashing any ROM and then flash gapps package?
@bagajohny yeah, till devs decide to support it officially.
When I install the ROM (crDroid 4.6) after change the partitions, when I go to TWRP, Wipe > Advanced Wipe, selecting system and pushing over Repair or Change File System button and then over Resize File System, this message was shown:
Repairing system before resizing.
Repairing system using e2fsck...
Done.
Resizing...
/sbin/resize2fs /dev/block/mmcblk0p25 process ended with ERROR: 1
Unable to resize system.
So no resizing is made.
@froilson resize once more, if fails, change mounting state of system and try once more
@Clamor with this can we have treble support ?

[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo

[GUIDE/TUTORIAL/HOWTO] Sony Xperia S stock to Android 8.1 Oreo
[GUIDE/TUTORIAL/HOWTO] Upgrade Sony Xperia S (Model LT26i codename nozomi) from Android 2.3.7 to Android 8.1 Oreo / nAOSP Rom
This detailed step-by-step guide helps you transform your Sony Xperia S to a much fresher one with Android 8.1 Oreo.
To make sure you are with a compatible Xperia S:
On the smartphone, go to Settings > About phone. Check that "Model number" is correct: LT26i.
### We need to make sure Bootloader can be unlocked before going further.
Open dialer, enter code
Code:
*#*#7378423#*#*
In the follow menu, go to Service info > Configuration > Rooting status.
Bootloader unlock allowed: Yes
If it is set on No, you cannot update your device. You can quit this tutorial and cry, you will never unlock it.
### You must be logged as a Microsoft Windows administrator to run console commands below.
CHANGELOG
v4. Moved to Bitgapps to solve infinite GApps "searching for updates", TWRP 3.5.2_9-0
v3. Android 7.1 if needed, hints to solve problems (error 7, fdisk -l)
v2. Slight tutorial improvements
v1. Initial release
1) DOWNLOAD FILES
- djibe Xperia S pack: https://bit.ly/djibe-xperias-pack
(contains FlashTool Xperia Driver Pack 1.8 for USB drivers + fastboot/adb + recovery TWRP 3.5.2_9-0)
+ ROM nearAOSP 8.1 build 11: https://forum.xda-developers.com/t/rom-8-1-naosprom-for-xperia-s-acro-s.3853082/
Download latest build (2020/03 or newer): https://androidfilehost.com/?w=files&flid=240525&sort_by=date&sort_dir=DESC
+ BitGApps Package ARM 8.1: https://github.com/BiTGApps/BiTGApps-Release/releases
+ You find Android 8.1 laggy ? Android 7.1.2/nAOSP is suitable https://androidfilehost.com/?fid=890129502657590583
Download according BitGApps.
+ Charge phone to 100%.
NB. Use a USB2 port to connect tablet to PC.
2) INSTALL USB DRIVERS
Commands below are for Windows 10 installation of unsigned drivers.
### For other Windows versions, Google "windows X install unsigned driver".
On the keyboard of PC, use "Windows key + R" combo.
In the command prompt that opens, type:
Code:
shutdown -r -t 0 -o
This opens a Windows menu:
Go to Troubleshooting > Advanced Options > Settings > Restart
Upon restart, press on keyboard : key 7 - Disables drivers signature verification
After boot,
Start Flashtool Xperia Driver Pack 1.8,
check the Flashmode Drivers, Fastboot drivers, Common drivers Fuji board (both lines) and Xperia S driver for ICS.
Start the installation and confirm the forcing the driver installation.
It ends by saying that everything was installed.
Restart Windows.
3) BACKUP ALL YOUR DATA
Backup every SMS, photo, app login or sync everything in the cloud.
You will lose everything, including what is contained in the microSD card during bootloader unlock.
So backup everything and transfer every file to your computer.
### Do it now or you will regret it.
4) IMEI NUMBER AND UPDATES
On phone, go to Settings > About phone > Status > IMEI
Note the IMEI (15 digits). Store it.
5) MAKE SURE PHONE IS NOT SIMLOCKED
We need to check phone is not SIMlocked.
Open dialer, enter code again
Code:
*#*#7378423#*#*
Go to Service info > SIM lock. If everything is blank/unchecked ( [] ), phone is Desimlocked.
If not, you must contact your network provider for an unlock code.
### Don't move further until phone is simlocked. You cannot debrand/desimlock it using a custom ROM.
6) GENERATE BOOTLOADER UNLOCK CODE
From your PC, go to https://developer.sony.com/develop/open-devices/get-started/unlock-bootloader/
At the bottom of the page, in "Select your device:" menu: select Xperia S.
Enter your IMEI, check first 2 checkboxes "I acknowledge that", click Submit and complete the captcha to generate unlock key.
Note the unlock code (beginning and end of page paragraph C.)
7) CONNECT PHONE IN FASTBOOT MODE
Phone powered off, hold "Volume up" while you plug phone in USB.
The blue light appears at the front bottom edge, the drivers install in Windows.
8) UNLOCK BOOTLOADER
In Windows, copy the path to the "flash" folder you unziped earlier.
Open a Windows command prompt : Start menu > Command prompt > Start as administrator
Then type
Code:
cd /d thePathToFlashFolder
(ex: E:\root\djibe Sony Xperia S\djibe\flash)
Type:
Code:
fastboot devices
If "PSDN:..." is returned, drivers are correctly installed.
Create this text: fastboot -i 0x0fce oem unlock 0xAPPENDYOURUNLOCKCODEAFTER0x
Paste the previous line in windows command:
Code:
fastboot -i 0x0fce oem unlock 0xAPPENDYOURUNLOCKCODEAFTER0x
confirm with Enter.
After 5 seconds, it is displayed Finished. Total time: ...
Bootloader is unlocked !
9) FLASH TWRP RECOVERY 3.5
Still in fastboot, type in console :
Code:
fastboot flash boot twrp-3.5.2_9-0-nozomi.img
. Confirm with Enter.
Wait, then once the confirmed success,
type :
Code:
fastboot reboot
(confirm with Enter).
Be fast to disconnect phone AND while it restarts, repeatedly click Volume+ AND Volume- buttons to access the recovery (can take a while).
Reconnect phone to PC once recovery has started.
10) BACKUP ORIGINAL ROM AND USE TWRP RECOVERY
You are now in TWRP recovery,
check Never show this screen during boot again and Swipe to Allow modifications.
Go to Backup, select all partitions.
Confirm with OK.
Then swipe to start backup.
Click the TWRP icon to return to home.
Go to Mount. Select Data partition and make sure bottom right button is dsiplaying Disable MTP text.
Phone must be connected to computer.
In Windows Explorer, open Xperia S device > Internal Storage.
Copy whole TWRP folder and save it somewhere safe on your PC.
In the opposite way, copy twrp.img and paste it in the same phone's folder you grabbed TWRP folder (SDcard root folder).
11) FLASH A PERMANENT TWRP RECOVERY
The TWRP recovery you are using is temporary.
We need to flash it on a partition.
Back to TWRP Home screen > Install > Install Image button > twrp.img > Select boot partition > Swipe to flash.
12) REPARTITION INTERNAL MEMORY
Newer Android versions changed the partition layout. We have to do so.
Back to TWRP Home screen > Mount.
Deselect ALL partitions.
You can copy-paste commands with right click in the Windows command.
From Windows command, type following commands:
Code:
adb devices
Command returns: List of devices attached
CB511Z8FWJ recovery
Code:
adb shell
Code:
fdisk -l /dev/block/mmcblk0
### fdisk -l (this is letter L, not number 1)
Command returns
Code:
4 heads, 16 sectors/track, 973824 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 65 2048 f0 Linux/PA-RISC boot
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 * 65 81 512 4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 129 768 20480 48 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 769 954240 30511104 5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 785 800 512 46 Unknown
/dev/block/mmcblk0p6 833 928 3072 4a Unknown
/dev/block/mmcblk0p7 961 1056 3072 4b Unknown
/dev/block/mmcblk0p8 1089 1184 3072 58 Unknown
/dev/block/mmcblk0p9 1217 1376 5120 70 Unknown
/dev/block/mmcblk0p10 1409 1664 8192 83 Linux
/dev/block/mmcblk0p11 1665 2176 16384 f0 Linux/PA-RISC boot
/dev/block/mmcblk0p12 2177 34944 1048576 83 Linux
/dev/block/mmcblk0p13 34945 42944 256000 83 Linux
/dev/block/mmcblk0p14 42945 108480 2097152 83 Linux
/dev/block/mmcblk0p15 108481 954240 27064320 c Win95 FAT32 (LBA)
~ #
### Copy all the text of the partition layout to be able to reformat in case of a crash.
### Paste this text in a file somewhere safe on your PC.
We are interested by line /dev/block/mmcblk0p14, Start sector: 42945 in my case,
And /dev/block/mmcblk0p15 End sector: 954240 for me.
### These values may differ for you. USE YOUR OWN VALUES.
Now type
Code:
fdisk /dev/block/mmcblk0
Commands returns: Command (m for help):
Enter
Code:
p
Commands returns: Command (m for help):
Enter
Code:
d
Command returns: Partition number (1-15):
Enter
Code:
15
Commands returns Command (m for help):
Enter
Code:
d
Command returns: Partition number (1-15):
Enter
Code:
14
Commands returns: Command (m for help):
Enter
Code:
n
Command returns: First cylinder (769-954240, default 769):
Enter
Code:
42945
(Your /dev/block/mmcblk0p14 Start sector)
Command returns: Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240):
If "default 954240" is the same as your /dev/block/mmcblk0p15 End sector, just press Enter.
Commands returns: Command (m for help):
Enter
Code:
t
Command returns: Partition number (1-14):
Enter
Code:
14
Command returns: Hex code (type L to list codes):
Enter
Code:
83
Commands returns: Command (m for help):
Enter
Code:
w
And let command return to its waiting state: ~ #
We must restart phone now, unplug USB and from TWRP go to Reboot > Recovery for a refresh of partition table.
### Your TWRP recovery is not compatible with new partition layout.
13) FORMAT PARTITIONS TO F2FS
nAOSP Rom doesn't support EXT4 filesystem. We need to repartition to F2FS, easily with TWRP.
### If you experience errors while flashing like "Unable to mount storage", use TWRP 3.2.3 instead: https://androidfilehost.com/?fid=1322778262904003720
Check Never show this screen during boot again and Swipe to Allow modifications.
Back to TWRP Home menu.
Go to Wipe > Wipe Advanced > Select Data > Repair or Change File System > Change File System > F2FS.
Repeat same procedure for Cache partition.
We must restart phone now, go to Reboot > Recovery for a refresh of partition table.
### If you don't, you won't be able to flash zipfiles.
After reboot, Swipe to Allow modifications.
### If you still see 0MB or a wrong size for data after the reboot, try to format data (Wipe/Format Data).
### In the worst case, convert data to ext4 and convert back to f2fs will do the job.
### You get ERROR 7, Failed to mount '/system' etc.), try this fix: https://bit.ly/3BvcYvM
### Failed to mount '/system' error: https://bit.ly/3yF2jwX
14) PUSH ROM AND GOOGLE APPS
Go to Mount > make sure nothing is mounted.
Connect phone to PC with USB.
Copy downloaded ROM and Google Apps to your /flash folder (along adb.exe and twrp.img).
Rename bitgapps*.zip to gapps.zip
Make sure adb is still running with 'adb devices' command.
Now push the ROM to the phone with
Code:
adb push nAOSProm-8.1.0-b11-nozomi.zip /sideload
Then
Code:
adb push gapps.zip /sideload
15) INSTALL ROM AND GOOGLE APPS
Go back to TWRP Home menu.
Go to Install > You are in /sdcard empty folder.
Tap on (Up a level) > sideload.
Select nAOSProm > Swipe to flash.
Wait during "Install Zip".
Then Reboot > Recovery
Go back to Install > select bitgapps*.zip > Swipe to flash.
## Problems flashing? Use TWRP 3.2.3-0: https://eu.dl.twrp.me/nozomi/twrp-3.2.3-0-nozomi.img.html
At the end, tap on Wipe Cache/Dalvik and Swipe to wipe.
Then tap on Reboot system.
Wait during long first boot.
Enjoy your new phone.
16) BETTER PERFORMANCES
Go to Settings > About phone.
Tap 7 times on Build number.
Go to Settings > System > Developer options.
Set Windows animation scale, Transition animation scale and Animator duration scale to 0.25x.
Right below, you may try to switch Force GPU rendering On (default is off but feels slower, isn't it ?)
17) ROOT
nAOSProm has a built-in root.
No extra Root manipulation needed.
### DO NOT TRY MAGISK, you will have problems.
### If you run in troubles with Magisk, see the end of this tutorial.
Configure Android as you like.
For faster GPS fix, use GPS Status and Toolbox and download A-GPS data.
You may try Greenify app to improve battery.
Your phone is up to date, enjoy ;-)
Thanks: @millosr, @mickybart, @AdrianDC, TWRP team, OpenGApps team, Flashtool Xperia Driver pack team
-----------------------------------------------------------------------
### Android doesn't see Wifi channel 14 (or 13),
Your phone doesn't see your local Wifi network?
You are probably european and your wifi is set to channel >= 11.
Reboot to TWRP recovery.
Go to Mount > check System partition.
Open a Windows command like before:
Code:
adb pull /system/build.prop
Edit file with Notepad++ freeware.
Locate line: ro.wifi.channels=
Change it to: ro.wifi.channels=14
Add this line just below: ro.boot.wificountrycode=EU
Save file.
Send modified file to phone:
Code:
adb push build.prop /system/
Disconnect phone, go to Reboot > System.
-------------------------------------------------------------------------
### Tried Magisk and it doesn't work ? (we know it doesn't)
You can't access recovery because phone restarts as soon as it reboots.
Let battery drain by bootloop.
When it is exhausted, hold Volume+ and connect phone tu USB, blue light will appear (fastboot mode).
Unzip boot.img from nAOSProm-8.1.0-b11-nozomi.zip to /flash folder (along fastboot.exe).
Make sure fastboot is OK with
Code:
fastboot devices
Then
Code:
fastboot flash boot boot.img
And restart with
Code:
fastboot reboot
Phone is op.
Enjoy
Thank you very much for this detailed guide. I have two questions:
1) Why do you recommend to flash version 2.3.7 of Android before beginning this procedure?
2) Everytime I have Flashed nAOSProm-8.1.0-b11-nozomi.zip on my phone (folllowing the original guide), I've had a very annoying bug, which is that it's really difficult to answer a phone call (I have to swipe the phone icon up several times until it finally rsponds). Of course I have always made a totally clean flash of the rom. Do you know what the reason for this can be?
TXUTXI72 said:
Thank you very much for this detailed guide. I have two questions:
1) Why do you recommend to flash version 2.3.7 of Android before beginning this procedure?
2) Everytime I have Flashed nAOSProm-8.1.0-b11-nozomi.zip on my phone (folllowing the original guide), I've had a very annoying bug, which is that it's really difficult to answer a phone call (I have to swipe the phone icon up several times until it finally rsponds). Of course I have always made a totally clean flash of the rom. Do you know what the reason for this can be?
Click to expand...
Click to collapse
Hi,
1) By precaution. For some phones you have to flash latest firmwares which upgrade bootloaders. We never know and there is no information about this. Just precaution.
2) I will test it.
Have you tried another call app ? That's the benefit of Android.
djibe89 said:
Hi,
1) By precaution. For some phones you have to flash latest firmwares which upgrade bootloaders. We never know and there is no information about this. Just precaution.
2) I will test it.
Have you tried another call app ? That's the benefit of Android.
Click to expand...
Click to collapse
Hi again! Thanks for answering.
First of all, 2.3.7 was not the last firmware for Sony xperia s, but the first one. The last one was Jelly Bean (4.1.2, or something like that, as far as I remember). So I am confused by your answer.
Secondly, yesterday I flashed again nAOSProm-8.1.0-b11-nozomi.zip, and this time I didn't get that annoying bug related to the phone app. Why? Well, there are two possible reasons:
1) This time I Flashed TWRP the way you tell in your guide. I used to do it via Flashtool.
2) I have used Nano Gapps instead of Pico Gapps.
Another thing I would like to tell you, is that yesterday it was impossible for me to flash the rom with the official TWRP (the one you recommend). I had to use TWRP 3.2.3, the version the developer of this rom recommends. It is something I don't understand: Why does the official TWRP work for you, while it doesn't for me?
Thank you very much again for all your help. I am pretty much interested in bringing to life again this old phone. What I really like about Xperia S is its small size
Now I am going to try to flash the rom again, because, although it works correctly, I cannot reboot into recovery
Cheers!
TXUTXI72 said:
Hi again! Thanks for answering.
First of all, 2.3.7 was not the last firmware for Sony xperia s, but the first one. The last one was Jelly Bean (4.1.2, or something like that, as far as I remember). So I am confused by your answer.
Secondly, yesterday I flashed again nAOSProm-8.1.0-b11-nozomi.zip, and this time I didn't get that annoying bug related to the phone app. Why? Well, there are two possible reasons:
1) This time I Flashed TWRP the way you tell in your guide. I used to do it via Flashtool.
2) I have used Nano Gapps instead Pico Gapps.
Another thing I would like to tell you, is that yesterday it was impossible for me to flash the rom with the official TWRP (the one you recommend). I had to use TWRP 3.2.3, the version the developer of this rom recommends. It is something I don't understand: Why does the official TWRP work for you, while it doesn't for me?
Thank you very much again for all your help. I am pretty much interested in bringing to life again this old phone. What I really like about Xperia S is its small size
Now I am going to try to flash the rom again, because, although it works correctly, I cannot reboot into recovery
Cheers!
Click to expand...
Click to collapse
Hi,
Sorry for my late replay.
Sorry for the 2.3.7 version. When i tried to force updates nothing came out so I thought it was the last one. I will remove comments on version.
For the Recovery, everything went fin with latest version. However, with 3.4+ TWRP, every time you wipe a partition you must reboot recovery before flashing.
I'll put a comment for those who have problems flashing.
And now I must add the Magisk tuto.
djibe89 said:
Hi,
Sorry for my late replay.
Sorry for the 2.3.7 version. When i tried to force updates nothing came out so I thought it was the last one. I will remove comments on version.
For the Recovery, everything went fin with latest version. However, with 3.4+ TWRP, every time you wipe a partition you must reboot recovery before flashing.
I'll put a comment for those who have problems flashing.
And now I must add the Magisk tuto.
Click to expand...
Click to collapse
Flashing Rom and Gapps over adb gives an insufficient space error. I first install Rom and then install Gapps.
Hi @haktug,
did you repartition correctly ? The partition should be ultra wide after repart
after writing the partition layout and formating /data and /cash the only i get whatever i try to do is "Unable to mount storage". SDCard partition is marked as no present and on "Select Storage" button the only i get is "SDCard (0MB)". and that lets me do NOTHING at all. i tryied everithing i cant get over it, dispite my every step in this guide were presice... please somebody help...
djibe89 said:
Hi @haktug,
did you repartition correctly ? The partition should be ultra wide after repart
Click to expand...
Click to collapse
yes ı did
bkokkinos said:
after writing the partition layout and formating /data and /cash the only i get whatever i try to do is "Unable to mount storage". SDCard partition is marked as no present and on "Select Storage" button the only i get is "SDCard (0MB)". and that lets me do NOTHING at all. i tryied everithing i cant get over it, dispite my every step in this guide were presice... please somebody help...
Click to expand...
Click to collapse
which version of twrp are you using?
haktug said:
which version of twrp are you using?
Click to expand...
Click to collapse
the one you provide ... 3.5.0.9.0 i think it is
i made the procedure multiple times and i formated many times both /data and /cashe and i return to my previous layout installed a random rom and tryied this repartition again with the same results....
unable to mount storage
SDCard (0MB)
on advanced wipe >SDCard >change file system > Present:No
@bkokkinos Can you send the log form the command
Code:
fdisk -l /dev/block/mmcblk0
bkokkinos said:
the one you provide ... 3.5.0.9.0 i think it is
i made the procedure multiple times and i formated many times both /data and /cashe and i return to my previous layout installed a random rom and tryied this repartition again with the same results....
unable to mount storage
SDCard (0MB)
on advanced wipe >SDCard >change file system > Present:No
Click to expand...
Click to collapse
you should use twrp 3.2.3 on this link.
Downloads for : Sony Xperia S | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
haktug said:
you should use twrp 3.2.3 on this link.
Downloads for : Sony Xperia S | AndroidFileHost.com | Download GApps, Roms, Kernels, Themes, Firmware and more. Free file hosting for all Android developers.
Click to expand...
Click to collapse
WWWOOOOOOOOOOOOOOOOOWWWWWWWWWWW!!!!!!!!!!!!!
What did you do......????????!!!!
i just flashed twpr 3.2.3 and everything worked perfectly....!!!! How could just different version make such differance???? OOOUUUFFFFFF i can't believe it... my two days headache is gone... THANK YOU Very Much!!!
Hi, I updated tutorial thanks to both of you.
Thanks t
djibe89 said:
Hi, I updated tutorial thanks to both of you.
Click to expand...
Click to collapse
Thanks to you!
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
l3mu3l said:
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
Click to expand...
Click to collapse
I don't know if I can really help you, but I would recommend you to use the links provided by the author of the rom himself. For instance, the author of this rom says clearly to use the following link in order to get the proper TWRP version: https://androidfilehost.com/?fid=1322778262904003720
Another important thing is in my opinion that the permanent twrp must be flashed into the fota partition, not in the boot partition. In my case, everytime I flashed it into the boot partition, the device always rebooted into system and not into twrp.
And very important as well is to check if the repartition has been made correctly. Check out that the sd has about 28 gigabytes free after doing the repartition.
l3mu3l said:
Hello,
Good day! I was stuck at step 13) INSTALL ROM AND GOOGLE APPS
It says,
"Updater process ended with ERROR: 7 error installing zip file 'sideload/nAOSProm-81.0-b11-nozomi.zip'
Failed to mount '/system' ".
I used TWRP 3.2.3-0.
Thank you...
Click to expand...
Click to collapse
By the way, I have just read someone who was getting error 7 while trying to install the rom, and he warns: MAKE SURE YOU DON'T CHANGE SYSTEM PARTITION INTO F2FS. Only Data and cache partitions must be changed into f2fs. Just in case it may help you...
TXUTXI72 said:
I don't know if I can really help you, but I would recommend you to use the links provided by the author of the rom himself. For instance, the author of this rom says clearly to use the following link in order to get the proper TWRP version: https://androidfilehost.com/?fid=1322778262904003720
Another important thing is in my opinion that the permanent twrp must be flashed into the fota partition, not in the boot partition. In my case, everytime I flashed it into the boot partition, the device always rebooted into system and not into twrp.
And very important as well is to check if the repartition has been made correctly. Check out that the sd has about 28 gigabytes free after doing the repartition.
Click to expand...
Click to collapse
ı agree. if it doesn't work, you're doing it wrong somewhere. You should do it again

Categories

Resources