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
Related
Hi, I installed Windows 8.1 Preview on my ARM tablet. before installing it I created a recovery USB drive as I thought I would hate Windows 8.1 and want to go back to 8.0.
So I did but before recovering I had the stupidest idea to wipe clean the disk.
there were 3 partitions in it before:
• recovery (around 300mb)
• EFI (I don't remember its size)
• C: (around 54, 55GB).
I can still get access to the blue screen with the big buttons. in Troubleshoot, "Reset your PC" won't work. it gives me a message saying "Unable to reset your PC. A required drive partition is missing"
I still have access to command line and could recreate the partitions but I don't know what would be the correct sizes and file systems for EFI and Recovery. and even if I did I have a feeling that just creating the partitions might not make much difference.
Any ideas, please?
VIDEO: http://youtu.be/KdDLy23CAGk
You cant restore from your USB? In troubleshoot, "reset your PC" tries to reset it from the internal recovery partition, not an external one. There would be a different option for that.
Sent from my SCH-I535 using xda app-developers app
jtg007 said:
You cant restore from your USB? In troubleshoot, "reset your PC" tries to reset it from the internal recovery partition, not an external one. There would be a different option for that.
Click to expand...
Click to collapse
no, buddy... that's what I assumed it would happen before wiping the disk.
once I'm in I get the blue screen where I pick the keyboard layout then the second screen has two buttons "Troubleshoot" and "Turn off your PC". In "Troubleshoot" I have "Refresh your PC", "Reset your PC" and "Advanced Options". In "Advanced Options" I have "Automatic Repair" and "Command Prompt".
none of these options do anything even though I can see the recovery drive is being accessed.
If you have a full (~3 GB) recovery image on USB, boot your system from USB and it should be able to restore.
With the USB stick plugged in and the Surface off, hold the "volume down" button and press and release the power-on button. Hold down "volume down" until you see the Surface logo. It will take a while, since it's loading from USB. Once you get to *that* menu, do a reset. When it asks, make sure that you choose to repartition your drives. Don't do the full wipe option--that'll take forever. Just use the "delete my files" or whatever button.
You can know that it's the 8.0 recovery image rather than 8.1 because it will ask for your language before asking for your keyboard layout. (This is because RT 8.1 preview was only released in English. It'll likely change for final.)
Myriachan said:
If you have a full (~3 GB) recovery image on USB, boot your system from USB and it should be able to restore.
With the USB stick plugged in and the Surface off, hold the "volume down" button and press and release the power-on button. Hold down "volume down" until you see the Surface logo. It will take a while, since it's loading from USB. Once you get to *that* menu, do a reset. When it asks, make sure that you choose to repartition your drives. Don't do the full wipe option--that'll take forever. Just use the "delete my files" or whatever button.
You can know that it's the 8.0 recovery image rather than 8.1 because it will ask for your language before asking for your keyboard layout. (This is because RT 8.1 preview was only released in English. It'll likely change for final.)
Click to expand...
Click to collapse
yep... I tried that. check this video. it shows exactly what is going on.
http://youtu.be/KdDLy23CAGk
try destroy your os partition first.rebuild or format it.
windowsrtc said:
try destroy your os partition first.rebuild or format it.
Click to expand...
Click to collapse
the disk has been wiped clean. I have created the partitions manually. it didn't make any difference.
Try this CMD script. Thanks go to a person in the original "windows RT unlocking" thread, he've uploaded his recovery taken from a developer-unlocked device. Unfortunately I don't remember his nick
Code:
rem These commands are used with DiskPart to
rem erase the drive and create five partitions
rem for a UEFI/GPT-based computer.
rem Adjust the partition sizes to fill the drive as necessary.
convert gpt
rem === 1. Windows RE tools partition ===========
create partition primary size=350
format quick fs=ntfs label="WinRE"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
assign letter="T"
gpt attributes=0x8000000000000001
rem === 2. System partition =====================
create partition efi size=200
rem *** NOTE: For 4KB-per-sector drives, change this value to 260
format quick fs=fat32 label="System"
assign letter="S"
rem === 3. Microsoft Reserved (MSR) partition ===
create partition msr size=128
rem === 4. Windows partition ====================
rem == a. Create Windows partition ===========
create partition primary
rem == b. Create space for recovery image ====
shrink minimum=3600
rem == c. Prepare the Windows partition ======
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 5. Recovery image partition =============
create partition primary
format quick fs=ntfs label="Recovery Image"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
assign letter="R"
gpt attributes=0x8000000000000001
exit
You should create a CMD file (say, "CreatePartitions-UEFI.cmd"), put it into the root dir of your recovery USB and boot into the command-line mode. Then run it from CMD.
Of cause you can modify the script as you like - for example as you already have the pratitions created, you may need only to use "gpt attributes" commands.
And don't forget that the boot partition (the EFI partition that contains bootmgr.efi file) should be FAT32, not NTFS.
After the script finished - disk W: would be your Windows partition. You should try to extract the recovery WIM file there:
Code:
Dism /apply-image /imagefile:U:\sources\Install.Wim /index:1 /ApplyDir:W:\
U: here is a drive letter of your recovery USB. I think that it should be D: or E:. You can determine it with the "list vol" command in diskpart.
S: is your EFI partition. You may need to copy the \EFI subdirectory from your recovery USB to S:\EFI dir and then use BCDEDIT tool to recreate boot entries. read technet or more info, for example here: http://technet.microsoft.com/en-us/library/hh265131(v=ws.10).aspx
P.S. I have not tried this script myself - but it looks like being correct. For more info look here: http://technet.microsoft.com/en-us/library/hh825686.aspx and here: http://technet.microsoft.com/en-us/library/hh825221.aspx
mamaich said:
Try this CMD script. Thanks go to a person in the original "windows RT unlocking" thread, he've uploaded his recovery taken from a developer-unlocked device. Unfortunately I don't remember his nick
Click to expand...
Click to collapse
fella... you are a star, an angel.
you saved me from sending the tablet to Czech Republic to do what took me 20 minutes.
I really, really, really appreciate it. the damn thing is working again.
:laugh::laugh::laugh:
Although not completely related to this thread...
I have trouble with restoring from USB on 8.1, though 8.0 works fine. When restored from USB instead of upgraded from 8.0, the OS goes into a mode where the desktop is always black and won't let you change it. This is due to Windows not having a valid product key.
I did some registry trickery to retrieve my 8.0 product key. =) Basically, I copied the Windows NT\CurrentVersion to my Windows 8 PC as a different name, then hacked an existing product key retrieval program to use that name. It seemed to work; it gave a key that my RT accepts.
Myriachan said:
Although not completely related to this thread...
I have trouble with restoring from USB on 8.1, though 8.0 works fine. When restored from USB instead of upgraded from 8.0, the OS goes into a mode where the desktop is always black and won't let you change it. This is due to Windows not having a valid product key.
I did some registry trickery to retrieve my 8.0 product key. =) Basically, I copied the Windows NT\CurrentVersion to my Windows 8 PC as a different name, then hacked an existing product key retrieval program to use that name. It seemed to work; it gave a key that my RT accepts.
Click to expand...
Click to collapse
I would just wipe clean the hard drive with diskpart.
the steps our friend posted worked for me but I ignored the parts it refers to a Windows RE Tools partition. also I used 4000 instead of 3600 for the Recovery Partition.
after the
Code:
Dism /apply-image /imagefile:U:\sources\Install.Wim /index:1 /ApplyDir:W:\
step (which is lengthy as it rebuilds the entire windows partition) copy the boot files to the EFI partition from the newly rebuilt Windows partition with
Code:
bcdboot W:\Windows
and finally set the location of the Windows partition with
Code:
W:\Windows\System32\reagentc /setosimage /path R: /target W:\Windows /index 1
and you're done. don't bother with drive letters and visible drives as they'll sort themselves out when Windows launches for the first time.
I am having the same exact issue after formatting my Samsung XE700T and then trying to restore my laptop with a recovery usb
Can someone please give me a hand with this process, I have tried the script but it isn't working, so I am wondering what I am doing wrong.
A more simple explanation for someone who isn't use to using CMD would be great
Thank you
iSlaker said:
I would just wipe clean the hard drive with diskpart.
the steps our friend posted worked for me but I ignored the parts it refers to a Windows RE Tools partition. also I used 4000 instead of 3600 for the Recovery Partition.
after the
Code:
Dism /apply-image /imagefile:U:\sources\Install.Wim /index:1 /ApplyDir:W:\
step (which is lengthy as it rebuilds the entire windows partition) copy the boot files to the EFI partition from the newly rebuilt Windows partition with
Code:
bcdboot W:\Windows
and finally set the location of the Windows partition with
Code:
W:\Windows\System32\reagentc /setosimage /path R: /target W:\Windows /index 1
and you're done. don't bother with drive letters and visible drives as they'll sort themselves out when Windows launches for the first time.
Click to expand...
Click to collapse
hI! at the last step you mentioned with setting location of windows partition, i got this error:
"reagentc.exe the recovery image file cannot be placed in the root directory of a volume"
any ideas?
iSlaker said:
I would just wipe clean the hard drive with diskpart.
the steps our friend posted worked for me but I ignored the parts it refers to a Windows RE Tools partition. also I used 4000 instead of 3600 for the Recovery Partition.
after the
Code:
Dism /apply-image /imagefile:U:\sources\Install.Wim /index:1 /ApplyDir:W:\
step (which is lengthy as it rebuilds the entire windows partition) copy the boot files to the EFI partition from the newly rebuilt Windows partition with
Code:
bcdboot W:\Windows
and finally set the location of the Windows partition with
Code:
W:\Windows\System32\reagentc /setosimage /path R: /target W:\Windows /index 1
and you're done. don't bother with drive letters and visible drives as they'll sort themselves out when Windows launches for the first time.
Click to expand...
Click to collapse
also, did you have to do anything with the S: efi partition?
Yze said:
hI! at the last step you mentioned with setting location of windows partition, i got this error:
"reagentc.exe the recovery image file cannot be placed in the root directory of a volume"
any ideas?
Click to expand...
Click to collapse
Same error ... no news ?
studio37 said:
Same error ... no news ?
Click to expand...
Click to collapse
Ok, before the last command line I create new directory on R:
mkdir r:\osimage
and finally :
W:\Windows\System32\reagentc /setosimage /path R:\osimage /target W:\Windows /index 1
Thanks to all on this thread...!!!
I was able to completely re-format and downgrade to Win RT 8.0.
Fantastic !!
chappatti said:
Thanks to all on this thread...!!!
I was able to completely re-format and downgrade to Win RT 8.0.
Fantastic !!
Click to expand...
Click to collapse
How? Please write for me a full instruction how you downgrade it? Or video. Thanks!
P.S. sorry for my bad English.:highfive:
ayuda please
hola necesito ayudaa mi me sale ese error k se faata particion para poder recuperra mi tablet ..... me podrias poner paso por paso como lo hiciste soy novato en esto y me sale muy caro mandarlo a servicio tecnico gracias
Take a look at this link for info: eightforums.com/installation-setup/44021-need-help-reinstalling-windonws-8-usb-2.html#post368623
Anybody else had this issue? I tried it on Shiny Rom and now CM 10.2 nightly. Get in one time with no issues, if I reboot I get stuck at the Google screen. The one way to get the phone usable is to do a completely factory data wipe and start all over.
I'm using TWRP, I've flashed tons of roms and I'm doing it no different than any of them. I do a complete wipe, install CM, GApps, reboot I get in one time. Do a reboot and then get stuck at Google screen.
This happened with both ShinyROM and 10.2 both are 4.3. They both had a valid MD5.
I have flashed PRIMEMD04_Bootloader-signed - One that came from Shiny ROM bootloader-toro-primelc03 - Stock (I believe)
Nothing worked, got the same issue.
GiZiM said:
Anybody else had this issue? I tried it on Shiny Rom and now CM 10.2 nightly. Get in one time with no issues, if I reboot I get stuck at the Google screen. The one way to get the phone usable is to do a completely factory data wipe and start all over.
I'm using TWRP, I've flashed tons of roms and I'm doing it no different than any of them. I do a complete wipe, install CM, GApps, reboot I get in one time. Do a reboot and then get stuck at Google screen.
This happened with both ShinyROM and 10.2 both are 4.3. They both had a valid MD5.
I have flashed PRIMEMD04_Bootloader-signed - One that came from Shiny ROM bootloader-toro-primelc03 - Stock (I believe)
Nothing worked, got the same issue.
Click to expand...
Click to collapse
The only time I get persistent Google screen is when I have a corrupt /userdata partition.
Try running e2fsck on mmcblk0p12 if you have one of those devices that get emmc corruption by changes in sdcard free space.
In case you need more information on this :
1. In TWRP Mount options, unmount Data. The command won't work on mounted partition.
2. In Advanced > Terminal Command, select the /dev/block folder. Then type in
Code:
e2fsck -n mmcblk0p12
("-n" option will cause no changes to your filesystem, it just shows a simulation of the file system correction tool's result.) If the result says the filesystem is "clean", then you have something else to worry about and its not corrupted /userdata.
3. If it starts checking for errors (there's a KILL button while running the command), your filesystem has errors. You can kill it, and then run
Code:
e2fsck -f -C 0 -y mmcblk0p12
(-f is for forced run, -C 0 will give you progress of completion of task, -y will say yes to all prompts (necessary), and mmcblk0p12 is the /userdata partition)
4. Let the command run until you don't see the KILL button (shouldn't be more than a couple of minutes). On running
Code:
e2fsck -n mmcblk0p12
again, it must show you a "clean" filesystem.
5. Just reboot to System. If your /userdata was corrupt, running this will mostly solve your problem.
Damn, I wish I had found such instructions to get over my horrendous time with corrupt partitions over six months from November 2012-April 2013.
Thank you! I will look into this but I would love to fix the cause.
I'm sure this is the issue because I cannot get the phone back into a working state until after doing a full factory wipe.
What would be causing 4.3 roms to corrupt my /userdata? Whatever it is it is happening after the first reboot after I get into the rom.
desktopfusion said:
The only time I get persistent Google screen is when I have a corrupt /userdata partition.
Try running e2fsck on mmcblk0p12 if you have one of those devices that get emmc corruption by changes in sdcard free space.
In case you need more information on this :
1. In TWRP Mount options, unmount Data. The command won't work on mounted partition.
2. In Advanced > Terminal Command, select the /dev/block folder. Then type in
Code:
e2fsck -n mmcblk0p12
("-n" option will cause no changes to your filesystem, it just shows a simulation of the file system correction tool's result.) If the result says the filesystem is "clean", then you have something else to worry about and its not corrupted /userdata.
3. If it starts checking for errors (there's a KILL button while running the command), your filesystem has errors. You can kill it, and then run
Code:
e2fsck -f -C 0 -y mmcblk0p12
(-f is for forced run, -C 0 will give you progress of completion of task, -y will say yes to all prompts (necessary), and mmcblk0p12 is the /userdata partition)
4. Let the command run until you don't see the KILL button. On running
Code:
e2fsck -n mmcblk0p12
again, it must show you a "clean" filesystem.
5. Just reboot to System. If your /userdata was corrupt, running this will mostly solve your problem.
Damn, I wish I had found such instructions to get over my horrendous time with corrupt partitions over six months from November 2012-April 2013.
Click to expand...
Click to collapse
Whatever my phone faces is not limited to 4.3. It has been happening since 4.1. Something to do with the eMMC of the phone itself. Gets corrupt too easily when the decreasing free sdcard space approaches 3 GB. Sometimes a battery pull can also cause it, sometimes a random reboot can cause it. Technically, 4.3 is supposed to solve this issue with TRIM execution in the background, but it hasn't helped me definitively yet.
It has been documented on these forums for this to happen to phones produced in August, September, October 2012.
In my case, I am quite sure that adding and/or deleting files larger than say 500 MB (for example Nandroid backups) causes this problem to happen at any time afterwards without notice (preceded by random reboot straight into stuck Google screen). I guess new ROMs can cause such issues if there is a large amount of app data deleted everytime, but this is just uninformed speculation.
I've setup Tasker profiles to autorun e2fsck through TWRP every morning before I wake up so I don't have these issues while awake. And one more profile to tell me every 8 hours if my sdcard has changed by a lot.
I hope this is all there is to your phone's problem!
Thanks this is very helpful, I will work on this tonight after work and see what I can come up with.
Right now it is showing as CLEAN but i'm running 4.2.2. Is there anything special to go from 4.2.2 to 4.3?
desktopfusion said:
Whatever my phone faces is not limited to 4.3. It has been happening since 4.1. Something to do with the eMMC of the phone itself. Gets corrupt too easily when the decreasing free sdcard space approaches 3 GB. Sometimes a battery pull can also cause it, sometimes a random reboot can cause it. Technically, 4.3 is supposed to solve this issue with TRIM execution in the background, but it hasn't helped me definitively yet.
It has been documented on these forums for this to happen to phones produced in August, September, October 2012.
In my case, I am quite sure that adding and/or deleting files larger than say 500 MB (for example Nandroid backups) causes this problem to happen at any time afterwards without notice (preceded by random reboot straight into stuck Google screen). I guess new ROMs can cause such issues if there is a large amount of app data deleted everytime, but this is just uninformed speculation.
I've setup Tasker profiles to autorun e2fsck through TWRP every morning before I wake up so I don't have these issues while awake. And one more profile to tell me every 8 hours if my sdcard has changed by a lot.
I hope this is all there is to your phone's problem!
Click to expand...
Click to collapse
Nothing special really.
Was the result Clean after a stuck Google logo?
You could pull battery at the stuck logo and go to TWRP and then check if it is clean. If it is indeed clean, then there's something else wrong that is completely different!
I'm going to give it a go tonight when I get home.
1. So pretty much backup everything, do a complete factory wipe of all data.
2. I'll do a adb push of the .zip for the rom and everything.
3. Flash rom and any other packages needed
4. Run that command see if it comes back clean
5. Reboot go into the rom
6. Reboot, if i get stuck at the Google screen run that script if it's not clean just keep running it?
desktopfusion said:
Nothing special really.
Was the result Clean after a stuck Google logo?
You could pull battery at the stuck logo and go to TWRP and then check if it is clean. If it is indeed clean, then there's something else wrong that is completely different!
Click to expand...
Click to collapse
It's running, it says "clone multiply-claimed blocks? <yes>"
How long does this normally run?
Edit: Running now for 4hrs
GiZiM said:
It's running, it says "clone multiply-claimed blocks? <yes>"
How long does this normally run?
Edit: Running now for 4hrs
Click to expand...
Click to collapse
Hey, sorry.
4 hours?! I've not had it run for more than 2 minutes, ever!
Did you run the -n option and let it say whether there is a corrupt partition? If yes then there may be a problem with the eMMC since its taking so long.
As a last resort, you could go completely stock via fastboot. [Formats /userdata partition, erases SDcard as well - take backup]
Lifesaving string of code.
desktopfusion said:
The only time I get persistent Google screen is when I have a corrupt /userdata partition.
Try running e2fsck on mmcblk0p12 if you have one of those devices that get emmc corruption by changes in sdcard free space.
In case you need more information on this :
1. In TWRP Mount options, unmount Data. The command won't work on mounted partition.
2. In Advanced > Terminal Command, select the /dev/block folder. Then type in
Code:
e2fsck -n mmcblk0p12
("-n" option will cause no changes to your filesystem, it just shows a simulation of the file system correction tool's result.) If the result says the filesystem is "clean", then you have something else to worry about and its not corrupted /userdata.
3. If it starts checking for errors (there's a KILL button while running the command), your filesystem has errors. You can kill it, and then run
Code:
e2fsck -f -C 0 -y mmcblk0p12
(-f is for forced run, -C 0 will give you progress of completion of task, -y will say yes to all prompts (necessary), and mmcblk0p12 is the /userdata partition)
4. Let the command run until you don't see the KILL button. On running
Code:
e2fsck -n mmcblk0p12
again, it must show you a "clean" filesystem.
5. Just reboot to System. If your /userdata was corrupt, running this will mostly solve your problem.
Damn, I wish I had found such instructions to get over my horrendous time with corrupt partitions over six months from November 2012-April 2013.
Click to expand...
Click to collapse
Holy mother of god.
This was a lifesaving string of code. I was convinced that I was going to have to buy a brand new phone. Kudos to you DesktopFusion. Thanks a lot!
Explanation as to why a corrupt userdata partition causes this issue
So, in case anybody was wondering, I would like to explain how I see the issue at hand (corrupt userdata partition).
Upon first boot, the ROM is getting set up and doesn't have any orders to check /userdata because well, there is none on the device. So why waste precious time being redundant (smart coders, right?). So the userdata partition is not checked.
However, now that the second boot is being performed, there is, by default in the system's repertoir, data put in by the user, so the bootloader is told to check the partition containing user data. Since the partition is corrupt, and the free space is technically "modified", it errors up and gets stuck.
I could be wrong, I'm not a developer of any sorts. Just a dude giving my point of view.
I got this trouble too last night. I'm flashing elia's 4.3 custom rom with under 5 gb free space. Got it boot twice,then got stuck at google's logo after trying flashing slim bean gapps. Flashing whole 4.3 stock firmware finally solve this. Maybe there is correlation between upgrading from 4.2.2 without upgrading the bootloader with this problem.
Sent from my Galaxy Nexus using Tapatalk 4
It ended up running for 6hrs and never finished, I did do the -n and it said it was CLEAN but still could not boot into the 4.3 ROM.
So ran it any way for 6hrs and no change as of right now I am unable to boot into ANY 4.3 ROM.
If eMMC was screwed up why can 4.2.2 roms work fine but not 4.3 roms? what's the difference?
desktopfusion said:
Hey, sorry.
4 hours?! I've not had it run for more than 2 minutes, ever!
Did you run the -n option and let it say whether there is a corrupt partition? If yes then there may be a problem with the eMMC since its taking so long.
As a last resort, you could go completely stock via fastboot. [Formats /userdata partition, erases SDcard as well - take backup]
Click to expand...
Click to collapse
BUMP still no 4.3 love
GiZiM said:
BUMP still no 4.3 love
Click to expand...
Click to collapse
Still not resolved?
Have you tried flashing completely stock factory image via fastboot?
Consider checking your flash memory with this app, "eMMC Brickbug Check"
Could you also put in here what Type and Date the eMMC chip was made as per the application?
desktopfusion said:
Still not resolved?
Have you tried flashing completely stock factory image via fastboot?
Consider checking your flash memory with this app, "eMMC Brickbug Check"
Could you also put in here what Type and Date the eMMC chip was made as per the application?
Click to expand...
Click to collapse
Sane chip
Ran memory check no issues
Type: SEM32G
Date: 10/2011
FW: 0x90
GiZiM said:
Sane chip
Ran memory check no issues
Type: SEM32G
Date: 10/2011
FW: 0x90
Click to expand...
Click to collapse
Rats. Falling short of ideas.
I might have missed your answer on whether you've tried flashing a stock Nexus image through fastboot, though.
I had basically the same problem coming from 4.2.2 to 4.3. I'm not sure if it was the bootloader upgrade, 4.3 CM alpha from early August, or the small amount of free space under 5GB, but it was definitely userdata corruption like desktopfusion is saying. I was finally able to fix the problem after a "fastboot -w" userdata and cache*format. This has to be done in fastboot, so hook your computer to your phone in twrp, run "adb pull /sdcard "drive:\pc_backup_location"" to backup your sdcard data (grab what you can if errors come up from badly named or corrupted files). Make sure you got md5verified recovery & bootloader images renamed to recovery.img & bootloader.img, and a rom.zip in your adb folder on the computer. Reboot to bootloader, still connected. **And make sure you're not forgetting any sdcard backup, or twrp backup if still functional, before this erase and format. Run "fastboot -w". Then "fastboot flash recovery recovery.img" and you should be good to reboot, adb transfer ROM.zip and other files to fresh sdcard, etc. There's info on this around to double check, and I just posted a little more detailed walkthrough on this a couple days ago. This definitely saved me though with an identical problem, so if the emmc error check doesn't pan out, I would give this a try. May the fastboot gods be with you.
@desktopfusion -Thanks for your post on the previous page! Copied and saved to mygiant android useful infos text file ... which will one day end up corrupting my userdata partition with my luck.
7175 said:
I had basically the same problem coming from 4.2.2 to 4.3. I'm not sure if it was the bootloader upgrade, 4.3 CM alpha from early August, or the small amount of free space under 5GB, but it was definitely userdata corruption like desktopfusion is saying. I was finally able to fix the problem after a "fastboot -w" userdata and cache*format. This has to be done in fastboot, so hook your computer to your phone in twrp, run "adb pull /sdcard "drive:\pc_backup_location"" to backup your sdcard data (grab what you can if errors come up from badly named or corrupted files). Make sure you got md5verified recovery & bootloader images renamed to recovery.img & bootloader.img, and a rom.zip in your adb folder on the computer. Reboot to bootloader, still connected. **And make sure you're not forgetting any sdcard backup, or twrp backup if still functional, before this erase and format. Run "fastboot -w". Then "fastboot flash recovery recovery.img" and you should be good to reboot, adb transfer ROM.zip and other files to fresh sdcard, etc. There's info on this around to double check, and I just posted a little more detailed walkthrough on this a couple days ago. This definitely saved me though with an identical problem, so if the emmc error check doesn't pan out, I would give this a try. May the fastboot gods be with you.http://forum.xda-developers.com/images/smilies/highfive.gif
@desktopfusion -Thanks for your post on the previous page! Copied and saved to mygiant android useful infos text file ... which will one day end up corrupting my userdata partition with my luck.
Click to expand...
Click to collapse
7175 nailed it. I tried flashing all sorts of different ROMs/gapps/Super SU combinations and tried different wipes/formats to no avail. I wish I would have found the instructions to "fastboot cleanse" the phone 4 or 5 hours ago. I have been reading through forums for several hours today and every suggested fix failed. 7175's fix was spot on for me. My phone was locking up at the Google screen with the lock every time I rebooted after installing a 4.3 ROM.
:highfive:
7175 said:
I had basically the same problem coming from 4.2.2 to 4.3. I'm not sure if it was the bootloader upgrade, 4.3 CM alpha from early August, or the small amount of free space under 5GB, but it was definitely userdata corruption like desktopfusion is saying. I was finally able to fix the problem after a "fastboot -w" userdata and cache*format. This has to be done in fastboot, so hook your computer to your phone in twrp, run "adb pull /sdcard "drive:\pc_backup_location"" to backup your sdcard data (grab what you can if errors come up from badly named or corrupted files). Make sure you got md5verified recovery & bootloader images renamed to recovery.img & bootloader.img, and a rom.zip in your adb folder on the computer. Reboot to bootloader, still connected. **And make sure you're not forgetting any sdcard backup, or twrp backup if still functional, before this erase and format. Run "fastboot -w". Then "fastboot flash recovery recovery.img" and you should be good to reboot, adb transfer ROM.zip and other files to fresh sdcard, etc. There's info on this around to double check, and I just posted a little more detailed walkthrough on this a couple days ago. This definitely saved me though with an identical problem, so if the emmc error check doesn't pan out, I would give this a try. May the fastboot gods be with you.
@desktopfusion -Thanks for your post on the previous page! Copied and saved to mygiant android useful infos text file ... which will one day end up corrupting my userdata partition with my luck.
Click to expand...
Click to collapse
Thanks for this...
First thought it was an issue with SlimRom, tried different kernels, problem wouldn't go away, then realised it was happening with every rom I flashed...
TWRP Recovery for the LG F3Q (codenames: fx3q, d520)
Background story (who ever wants to know):
As I'm currently testing around with flashing etc I hated it to re-flash the stock ROM again and again. It is sooo time consuming..
In that kind of ROM compiling learning process I also was able to build a working TWRP recovery for the LG F3Q so that was such a good feeling But as said the caveat was that because of the locked bootloader we can reach TWRP (or CWM) only when executing "adb reboot recovery" from the running system. That was not really satisfying me though..
Some day I've done a factory reset and well I saw that this is starting my TWRP recovery when executing it! Well it isn't such a surprise as TWRP sits on the recovery partition and will be triggered by the factory reset script but... well do you think what I think? When it would be possible to start TWRP fully and not that factory reset part of TWRP than we would have a workaround to reach the recovery mode without booting the system (which is in fact not possible anymore when flashing of system.img/boot.img fails)
That said.. I was in touch with the TWRP developers bigbiff and Dees_Troy and many thanks for the hint they gave me! I have build a new TWRP version based on that information I got and well the idea of that is:
Vol Down + Power -> LG Factory Reset screen appears
Confirming with power 2 times as asked
Voila: No factory reset anymore but TWRP is here!
Well that will have a caveat - READ CAREFULLY:
As you may think of the factory reset in the boot-up process and within the ROM will not working anymore until you flash another recovery!
But if you know that it is not such a caveat because you can choose the wipe options within TWRP to do a "manual" factory reset.
v2.8.1.0 build 5
USE THAT ON YOUR OWN RISK! BACKUP BEFORE!
Working (quickly tested):
Install (to flash a custom Kernel)
Mounting partitions
Reboot Recovery | System
adb shell (also see known issues)
Backup (compressed | uncompressed | encrypted (!) | unencrypted)
Restore (unencrypted | encypted (!) | compressed | uncompressed)
Internal storage /data/media
MTP which mounts the external storage!
File Manager
Terminal Command
Power charging while in TWRP
Displaying CPU temp
Totally untested:
WIPE (should work)
decrypting /data (but should work as it do so for encrypted backups already)
Every option which is not stated as "Known issue" or "Working"
Known issues (with workarounds):
ADB works only when screen "timed out" (manual locking does not help it must time out) therefore ADB can take up to 1 minute after boot until it becomes available (because screen need to be timed out first)
Workaround: set the time limit in the screen menu to e.g. 10 sec (that is the default value for now)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP.... )
Workaround: set a timezone which displays the most accurate timezone
Known issues (without workarounds):
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
Wiping /data not possible after "factory reset buttons" used. You need to choose "wipe" and then "format data" manually (or use mke2fs on CLI).
Vibration is not working (I will not fix that atm because I like it that way)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the TWRP v2.8.1.0 version ready to use even with locked bootloader:
BACKUP EVERYTHING BEFORE USING THIS. USE AT YOUR OWN RISK!
DD Image file:twrp_v2.8.1.0_build5_fx3q_FR-OFF.img.zip = FactoryReset is disabled / TWRP will be loaded instead (also see known issues)
Read the Installation & Usage instructions in this thread on how to install that file.
Installation & Usage instructions
Pre-Requirements
Read the FAQ
YOU NEED ROOT! (check FAQ)
YOU SHOULD do a NANDroid BACKUP! (check FAQ)
You need to boot up, enable USB debugging and then connect USB cable.(check FAQ get ROOT - the link contains a guide on that)
You better doing a NANDroid backup right? (I mentioned that before - but DO it! NOW!)
For the best usage experience install the sediKERNEL or use joel's debloated stock ROM which includes it already
Bulletproof Method 1: "the average user"
Use this guide if you simply want to install & use TWRP like it should be. If you're unsure use this guide!
Install:
Download the TWRP recovery file and unzip it
copy it to your device (e.g. adb push or simply copy & paste by your file browser)
Download the loki_tool (https://github.com/djrbliss/loki/raw/master/bin/loki_tool)
copy loki_tool to your device (e.g. adb push or simply copy & paste by your file browser)
execute:
adb shell
su (you may need to grant permission)
mount -oremount,rw /system
cp /PATH-WHERE-YOU-COPIED/loki_tool /system/bin/ && chmod 755 /system/bin/loki_tool
loki_tool flash recovery /PATH-WHERE-YOU-COPIED/twrp_X.X.X.X_recovery_FRoff/off.img
reboot recovery --> you should see the TWRP screen
Usage (sediKERNEL v2.0 or higher installed):
Power on the device
when you see the LG logo the first time do NOTHING!!
When the screen goes black THEN press Volume UP + Volume DOWN. Both the same time and hold them pressed.
Release the buttons when the screen goes black again
Wait. You will see the LG logo a third time and then you will see the recovery screen!
If you see a kernel crash then you have pressed the magic keys too early! Read and follow the above steps carefully and you should be fine.
Usage (without sediKERNEL v2.0 or higher):
boot into your ROM
execute "adb reboot recovery" from your PC or open a Terminal on your device and execute "su" then "reboot recovery"
Bulletproof Method 2: "developers only"
This is the developers preferred way of installing TWRP. It ensures that even when your ROM or Kernel gets damaged that you still be able to boot into recovery. This is to the developers or heavy testers who are knowing what they do ONLY!
But even when you think this is for you: Read the important hint at the end before deciding if you want to choose this method.
Install:
flash recovery image to your RECOVERY partition:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
adb reboot recovery
A user reports the the by-name does not worked for him but this one:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/mmcblk0p17
-> If you can see TWRP now everything is fine - Otherwise DO NOT continue!
BACKUP YOUR WHOLE DEVICE NOW! I highly recommend to backup everything except /data from within TWRP because it is easy and works (from TWRP v2.8build5 or higher)
BACKUP /data is recommended to be done NOW and this way:
adb shell su -c dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/external_sd/userdata_backup_stock.img
--> This can take a long while but it contains also the backup for the internal storage not only /data and that internal part is not backupable over TWRP
while in TWRP flash the same recovery image to your BOOT partition now (do not think that this is dangerous. The boot partition is not a magic thing or so it is only the partition which will be started from the bootloader thats all about it. So yes you can install a recovery image on the boot partition without any harm.):
adb shell su -c dd if=/external_sd/twrp_vXXXXX_fx3q_FR-OFF.img.loki of=/dev/block/platform/msm_sdcc.1/by-name/boot
watch carefully that the process ended without errors and that the size is exactly the same as it should be (about 1,3GB)
adb shell sync
power off the device by taken out the battery (do not use reboot or something we want to be sure that the next step is absolutely really the normal boot up)
Boot up normally --> you should see TWRP !! You're NOT in recovery mode you're booting the normal boot mode!
Go on with flashing the sediKERNEL into your RECOVERY partition:
Download the sediKERNEL from here (the stock one could work, too but never tested ...)
push it to your device with adb or MTP (since v2.8build5)
Flash the sediKERNEL to your RECOVERY partition:
adb shell su -c dd if=/external_sd/sediKERNEL_JB-vXXXX.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Reboot into Recovery by using TWRP GUI or by executing "adb reboot recovery"
Your ROM will boot.
Usage:
From now on every time your device booting up you will see the TWRP screen and need to choose Reboot-->Recovery to boot your ROM.
This is the absolute best way to use TWRP if you want to be sure that you will reach the recovery even when your ROM gets damaged and is confirmed to work very well (as always guarantees are not available )
Important hint:
Be sure that you keep in mind that from now on your recovery and boot partition are not the same anymore (you can always revert back to the normal behaviour, of course!). So if you want to flash a kernel image you need to ensure that it goes to the RECOVERY partition instead of the normal BOOT partition (because on boot partition is TWRP now).
If I got my ROM working I will definitively add an option to the installer where this will be ensured and I asked @joel.maxuel for his stock ROM to add that, too. As for now we are the only ones who are developing for the F3Q so you should be save enough atm but you will need to keep that always in mind when you want to replace the kernel and/or ROM.
What would happen if you forget about that? Well nothing really bad because when you install a kernel or ROM the boot image partition simply gets overwritten and that means only that your TWRP is not there anymore but the system will boot (if the new kernel/ROM is not buggy or damaged). You then could install TWRP by method 1 or using method 2 by using the boot image/Kernel you want to install.
Damage your device - booting (NOT RECOMMENDED will loose /data ):
You probably NEVER want to use this method. It is here for reference only.
I highly recommend to choose one of the above bulletproof versions instead of this one because it WILL damage /data and you need to restore that whole partition afterwards.
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near.
Install:
same as for "Bulletproof Method 1" above
Usage:
When you choosen FR-OFF then TWRP will be able to start without booting up the whole system (also see known issues):
Power Off the device (remove battery)
Vol Down + Power --> Then put the battery back --> LG Factory Reset screen appears
Confirming with power button 2 times as asked - if you downloaded and flashed the FRoff version of TWRP it will NOT open the normal reset procedure but /data and the internal storage are not accessible afterwards (read above about the details). That means your app configs and systems configs get lost that way. You have been warned!
Voila: No (full) factory reset anymore but TWRP is here when you have damaged your ROM or for some dev approach
If you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system.
XDA:DevDB Information
sediTWRP for LG Optimus F3Q, Tool/Utility for the General Discussion
Contributors
xdajog
Source Code: https://github.com/xdajog/bootable_recovery_twrp_fx3q
Version Information
Status: Stable
Current Stable Version: v2.8.1.0 build 5
Stable Release Date: 2014-11-18
Created 2015-05-19
Last Updated 2015-07-20
FAQ
Frequently Asked Questions (FAQ)
What is that "adb" thing?
adb stands for: Android Debug Bridge and can help a lot when it comes to work with your device. It is not for developers only but they use it a lot of course.
But a normal user can use this to exchange files without the need of mounting, backing up the device, reboot the device and use it as a very comfortable way of having a terminal emulator.
Normally adb itself is not available as a standalone application - it comes with the Android SDK which is very big and heavy if you want to use adb and/or fastboot (another great tool) only.
But we live in a great world with many people wanting to make things easy so here you go when you want/need only adb and fastboot:
download & install adb at lifehacker
(Direct link for Windows users: Go to easy ADB install thread)
How to get root for the F3Q?
Here is the tool and guide: Saferoot
[*]What is a "nandroid" backup?
nandroid means essentially: "a full image of all your partitions" so it is a full snapshot of your ROM including all your apps and contents.
The name NANDroid is a portmanteau of "NAND" (as in Flash memory - NAND flash) and "Android." (Source)
[*]How to create a "nandroid" backup?
(See above for the meaning of "nandroid backup")
You have several options on how to do that.
The normal and absolutely recommended way is to do that "offline" (from within recovery mode) but you can also do it "online" (while Android is running).
.
Offline nandroid backup by using TWRP recovery: Guide
If you have no custom recovery installed read on.
.
Online nandroid backup:
by using an app:
There is 1 (known to me) "online" nandroid backup tool available which will backup from within your running Android: PlayStore.
I tested it and still using it since a while and I really like it but I would not fully resist on it.
I had no problems backing up but sometimes an app is lost when restoring. This may have been fixed but well it is like imaging a running Windows or Linux system:
Do not do it online if you can - it may/will work but there could be problems/inconsistencies later!!
If you never made a nandroid before doing it online will not harm anything and should be your first start. So install the Online Nandroid backup tool and begin.
Check out this guide for some hints: Guide
(If you like the Android app do not hesitate to buy the unlock key to support the developer!)
by using commandline tools:
First of all you need "adb" installed (check out the FAQ answer number 1 above).
Then you need someone who is telling you the device partition table and you need a big sized SD card to hold the images.
The reason is that you will use a special command named "dd" which images the whole partition (not the content only!).
dd is a VERY dangerous tool because if you use it wrong your device may get bricked so it is essential that you are using the
correct command and check that twice!
Check out the next FAQ on how to do this for the F3Q.
[*]How to create a "nandroid" backup for the F3Q - WITHOUT having a custom recovery?
The whole process will take a big amount of time but it is worth to follow each step including the md5sum checks at the end.
Please read the previous FAQ first because there you will find more information about background and other options you may have.
Ensure you have a SD card inserted which is big enough and having enough free space available (4GB at least! I recommend at least 8 GB but this depends on the size of your current data partition. A completely stock ROM with nothing installed and unused will need 3 GB space).
.
Install "adb" on your pc (check out the FAQ #1 above).
root your device (check out FAQ #2 above)
connect with adb to your (running) F3Q:
adb shell
(you should see a prompt)
su
(you need to grant permission if you haven't yet)
Then backup your current ROM and data:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/external_SD/recovery.2015-07-20.img
# If you never backed up your EFS you really should do that once:
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/storage/external_SD/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Just to be sure you can do an online backup now, too ( Guide ) Online Nandroid backup App
.
copy the backup(s) to your device (connect USB cable - open your external storage and drag&drop) <--- DO NOT SKIP THIS STEP!!!! It is absolutely essential!
Check your copy on your device:
md5sum /storage/external_SD/system.2015-07-20.img
md5sum /storage/external_SD/boot.2015-07-20.img
md5sum /storage/external_SD/userdata.2015-07-20.img
md5sum /storage/external_SD/recovery.2015-07-20.img
md5sum /storage/external_SD/modemst1.img
md5sum /storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Download a md5sum checker like this one Windows MD5 and load each file you copied to it (on Linux the "md5sum" command can be used of course).
compare the md5sums from the above output and ensure that they are all matching.
[*]Why is factory reset not working when installing TWRP? (or: AAAAaaaah my /data is inaccessible after doing a factory reset!!!!)
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near. Sorry but you have been warned (known issues) before.
.
if you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system. v2.7. is not recommended to use but atm the only option if you really want that. Instead I would better try the wipe options from within TWRP and re-installing your ROM of choice or simply using the official LG flashing tool to get your F3Q fully reset.
.
History / Changelog
Previous development (v2.7.1.0)
I HIGHLY RECOMMEND USING v2.8 instead of this version!
You have been warned.. If you still want that buggy version go on here:
USE THAT ON YOUR OWN RISK! I STRONGLY RECOMMEND TO BACKUP EVERYTHING BEFORE PROCEEDING.
Working:
Install (to flash a custom Kernel)
Mounting partitions (see known issues for the internal one)
Reboot Recovery | System
adb shell
File Manager
Terminal Command
Totally untested:
WIPE (may work)
Known issues:
If the device becomes locked and then unlocked by the user adb will restart on the device (or crash and start again. haven't had looked into that yet)
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
RESTORE (will NOT work!)
BACKUP (will NOT work!)
You cannot mount the external sd via USB or MTP
Vibration is not working (I will not fix that atm because I like it that way)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP....
Internal storage is missing (/data/media)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the loki'ed TWRP version (v2.7.1.0):
AGAIN: THIS IS A PROOF-OF-CONCEPT only. It definitively WILL have bugs and problems! I want to proof that it will be possible to have TWRP on this device and also have a way to boot up into TWRP without booting the whole system.
twrp_2.7.1.0_recovery_FRoff.img.lok = FactoryReset is disabled / TWRP will be loaded instead
twrp_2.7.1.0_recovery_FRon.img.lok = FactoryReset is enabled / TWRP can be reached with "adb reboot recovery" only
Read the Installation & Usage instructions in the OP on how to install that file.
Awesome work! Saves having to risk modifying the bootloader (for now). :laugh: :highfive: Thanks!
xdajog said:
TWRP Recovery for the LG F3Q / D520
...
Click to expand...
Click to collapse
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Device does not show internal storage.
Wipe menu does not differentiate from internal storage and /data
there's no /mnt, /storage or /sdcard present while in TWRP.
Uhm, I'm sure there's some more I've missed, but that's all I've got for now.
eriklion said:
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Click to expand...
Click to collapse
Uhm what do you mean? adb shell and then open /tmp/recovery.log? Clicking on the small mini icon at middle bottom of the screen? Both working for me. Have you tested the above attached version or the one I gave you at dropbox? The above is a more current one!
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Click to expand...
Click to collapse
hm I will look into that
Device does not show internal storage.
Click to expand...
Click to collapse
yeah forgot to mention that. Is that shown in CWM btw?
Wipe menu does not differentiate from internal storage and /data
Click to expand...
Click to collapse
Could you explain what does that means?
there's no /mnt, /storage or /sdcard present while in TWRP.
Click to expand...
Click to collapse
/mnt and /storage are not needed or am I wrong? /sdcard would point to the internal storage I think but I decided to use /external_sd instead which is accessible in the latest version.
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. I have a pastebin, sorry it's so long but I wanted to try a couple different backup options before I gave up and produced a log file:
http://pastebin.com/QUfNw6Rk
The portions of interest are:
Code:
Backing up Cache...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//cache.ext4.win'
I:addFile '/cache/recovery' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/cache/recovery/log' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
...
Code:
Backing up Data...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//data.ext4.win'
I:addFile '/data/dontpanic' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg0' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/next_count' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg1' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg2' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg3' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg4' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg5' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg6' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg7' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Starting TWRP 2.7.1.0 on Sun Jan 25 03:44:01 1970
I:Single storage only.
I:No internal storage defined.
I:No storage defined, defaulting to /sdcard.
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file' does not exist, USB storage mode disabled
I:Found brightness file at '/sys/class/leds/lcd-backlight/brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 255
Starting the UI...Pixel format: 480x800 @ 32bpp
Pixel format: RGBX_8888
Not using qualcomm overlay, 'msmfb43_80201'
framebuffer: fd 4 (480 x 800)
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/boot'
I:Processing '/cache'
I:Processing '/data'
I:Processing '/misc'
I:Processing '/recovery'
I:Processing '/external_sd'
I:Processing '/system'
I:Creating Android Secure: /external_sd/.android_secure
I:Backup folder set to '/external_sd/TWRP/BACKUPS/1db9cba'
I:Settings storage is '/external_sd'
Updating partition details...
I:Unmounting main partitions...
E:Unable to unmount '/data'
I have a stock based ROM to test, and I want to make sure I can enter recovery through the bootloader should things go sour. If TWRP can backup and restore, that allows me to go back to my true stock after the test. Any ideas?
joel.maxuel said:
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. [.....] Any ideas?
Click to expand...
Click to collapse
Yes.
There are several things coming in place when it comes to backing up out of TWRP atm...
You hopefully have read the big fat red warning ? What I mean is the part regarding /data gets lost when you do a factory-reset
That said if you have entered TWRP by pressing the physical keys your /data partition will be wiped (really bad thing but that it is made for and I haven't had the time to look into that further)
The result is a cleaned /data which is not mountable until you format it with mke2fs.
(e.g.: "adb shell mke2fs -T ext4 /dev/block/mmcblk0p15")
If you do not do that what MAY happens is that TWRP failing because of missing /data (and if not then you should ensure that /data was really backed up)
But as your log told me it seems to be not the problem here 'cause the /data partition is detected by TWRP. so it could be 2)
Mounting points.
As stated the mount points are not fully working in TWRP atm. That means when it comes to /sdcard which is the internal device storage it will fail, too because it cannot be found. The reason for this is that LG mounts /sdcard by the sdcard service but that is somehow tricky thats why it is not working atm.
And on top: the internal storage normally needs to be mounted to "/data/media" especially when we want to use MultiROM later.
So +1 for /sdcard or/and internal storage related
background info: http://teamw.in/DataMedia
The last one I could imagine is "something else" which could be catched by "/proc/last_kmsg"
The important thing is that this file gets written only after a crash and when the battery was not removed. So if the device reboots to TWRP again try to adb shell to the device and then paste the last_kmsg again. Maybe we can find something here.
When I will continue on TWRP I think of upgrading to v2.8 because they enable MTP here which could be good for copying data between device and pc..
BTW:
I have no idea what CWM port which is also be available would do in case of starting a backup especially what will REALLY gets backed up!!!!
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
xdajog said:
<SNIP>
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
Click to expand...
Click to collapse
This should work (I've done it before for eriklion):
Code:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/cache of=/storage/external_SD/cache.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2014-11-12.img
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight have posted a last_kmsg here.
joel.maxuel said:
This should work (I've done it before for eriklion):
Code:
adb shell
dd /dev/block/platform/msm_sdcc.1/by-name/system /storage/external_SD/system.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/boot /storage/external_SD/boot.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/cache /storage/external_SD/cache.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/userdata /storage/external_SD/userdata.2014-11-12.img
Click to expand...
Click to collapse
yes thats all you need to backup & restore
joel.maxuel said:
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight.
Click to expand...
Click to collapse
I always do it that way:
Code:
Starting TWRP
adb shell
("su" in TWRP not needed normally)
mke2fs -T ext4 /dev/block/mmcblk0p15 (for userdata)
mke2fs -T ext4 /dev/block/mmcblk0p14 (for cache)
Then you can be sure it is clean and well formatted. ext4 is for both cache and userdata and works fine for me.
twrp v2.8 with many enhancements and fixes is on its way
Stay tuned ....
if you get bored in the meanwhile ... click thanks
Is someone here with running the stock ROM (or absolutely not modified means formatted! /data partition) who is willing to give me a quick help? It must be stock or placed back to stock by using a backuped image dump if you have one.
The following need to be done in recovery so you need to have CWM or TWRP installed. Boot into recovery (adb reboot recovery) and then use "adb shell" to connect.
I need your output of this command:
Code:
mke2fs -n /dev/block/platform/msm_sdcc.1/by-name/userdata
This will not do/destroy/modify anything.
It should display some information about that partition. Read the details here http://linux.die.net/man/8/mke2fs
The reason is that LG factory reset seems to wipe superblocks (wanted by LG or not - fact is that they are thrown) and THEN forwarding to the recovery tool like TWRP but to be sure I need the above output from 1 or 2 people to be sure enough on how to proceed.
Thanks in advance
As Joel investigated that may destroy /data cause of a buggy version of mke2fs!! Oh man..
-----
Sent from my SGH-I927 using XDA Android mobile app
Ok thx to joel I'm able to investigate the LG facotry reset further.
In parallel I will try another way which will be (if I get it working) absolutely smooth and will not have such workaround character like the current idea (hijacking factory reset).
Give me some time but if that works it would be a great solution for accessing recovery..
Stay tuned some good things may happen...
-----
Sent from my SGH-I927 using XDA Android mobile app
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
xdajog said:
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
Click to expand...
Click to collapse
Great work.
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img? And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
So, what is this solution getting around? So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more? Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Sorry for my confusion, still trying to grasp all this new information.
joel.maxuel said:
Great work.
Click to expand...
Click to collapse
Thanks
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img?
Click to expand...
Click to collapse
Method 2 will suggest that if you install a custom ROM that you are be able to use/choose the boot.img partition (I hoped that the "hint" at the was clear enough but better to ask of course!)
And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
Click to expand...
Click to collapse
Well yes you either need to point to the recovery partition or (and that would be what I recommend) you let the user choose what he wanted to do.
So, what is this solution getting around?
Click to expand...
Click to collapse
The best we can do here (and that is what I will do for my custom ROM if I get it done some day) to use AROMA installer and ask the user if he has a recovery installed in the boot partition or not. Then you can choose what to do in the updater script.
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more?
Click to expand...
Click to collapse
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Click to expand...
Click to collapse
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Sorry for my confusion, still trying to grasp all this new information.
Click to expand...
Click to collapse
No worry about that happy if that is useful for someone
xdajog said:
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
Click to expand...
Click to collapse
Thanks! I will take a look at this in the next few days.
xdajog said:
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Click to expand...
Click to collapse
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
xdajog said:
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Click to expand...
Click to collapse
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
joel.maxuel said:
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
Click to expand...
Click to collapse
You mean "factory-reset" right? By either pressing the factory reset buttons (or by choosing from within the ROM) correct?
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Click to expand...
Click to collapse
If you install TWRP with method 1 and your boot partition gets corrupt you still be able to reach TWRP by using the factory-reset buttons. But you will loose /data then.
If you install TWRP with method 2 and your boot partition has gone you can not start TWRP anymore because it sits on there.
So you're more bulletproof by choosing method 1 because you would reach TWRP even when the boot partition gets damaged but you will loose /data then! Mentioned in the known issues in the OP.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
Click to expand...
Click to collapse
When you have TWRP installed with method 1 you will reach TWRP by factory reset buttons and it will DO NOTHING ! Really! It simply starts TWRP because I patched TWRP that way that it will not wipe anything when triggered by the factory-reset command / button!
I can say that for double sure since today because:
1) In one of my tests I had disabled REALLY EVERY wipe option within TWRP - compiled it - installed it and even then /data gets lost!
2) I have installed the BOOT image means KERNEL on the RECOVERY partition today again and then used the factory-reset buttons again (after I restored /data of course)... and /data gets lost AGAIN--?!!
That means even when there is absolutely no custom recovery in place (like TWRP) which would normally handle wiping /data then nevertheless /data gets corrupted! I have tested that twice so I can say now for sure that this has nothing to do with TWRP but it comes from the LG bootloader instead! That bootloader is CRAP. sorry.
I had tested one approach which is build in boot image RAM disk which catches the keys which are pressed and then reboot into recovery. That would work but only as long as you have a working boot image partition. So that is the same good/bad as having TWRP sitting within the boot partition which is much easier to do so I decided to go this way for now.
One last word about the crappy factory-reset by LG: I have tried a lot to find out what really happens to the partition or partition table of /data when those keys are pressed but the only thing I can say is that the superblocks are inaccessible and the same for the backup superblocks. doing a "mke2fs -S" does not work (and wouldn't fix the root cause of the issue) and I have no idea what LG do here. Therefore cannot fix that ..
so I believe we will need to live with one of the 3 methods described in the OP....
Hope that answered some of your questions...
Bad news..
The Desire Z of my wife is completely broken now.
That means I cannot develop anymore..
- I ported and released the latest TWRP version to the F3Q
- I'm able to build AOSP JellyBean (not booting yet though),
- I compiled and released a custom AOSP Kernel (named sediKERNEL)
.... and a lot more..
I have everything I need to continue here in place...
I have the will and the ability to continue...
But no device anymore..
If someone has a F3Q to give away.. then I will continue but I'm not willing to buy a F3Q for developing only. So if you have an idea how we could continue let me know.
Update:
Check out the following link if you want to help http://forum.xda-developers.com/showthread.php?t=2952919
Otherwise that will end here for me unfortunately...
Hopefully not.
Yours
Xdajog.
-----
Sent from my SGH-I927 using XDA Android mobile app
I will update the installation instructions soon!
Because of the new sediKERNEL v2.0 the instructions will be made bullet proof only .. and i try to do it more detailed @Kediil
-----
Sent from my SGH-I927 using XDA Android mobile app
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] 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