[REPARTITION] Nexus 5 Repartition [HAMMERHEAD] [16GB/32GB] [UA TWRP] - Nexus 5 Original Android Development

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 ?

Related

[RECOVERY][crespo4g] TWRP 3.0.0-0 touch recovery [2016-02-06]

Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
CHANGELOG for 3.0.0-0:
-Completely new theme - Much more modern and much nicer looking (by z31s1g)
-True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
-Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
-Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
-Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
-Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
-SuperSU prompt will no longer display if a Marshmallow ROM is installed
-Update exfat, exfat fuse, dosfstools (by mdmower)
-Update AOSP base to 6.0
-A huge laundry list of other minor fixes and tweaks
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the udpated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
CHANGELOG for 2.8.7.0:
-Initial ground work for software drawn keyboard (_that)
-Fix handling of wiping internal storage on datamedia devices (xuefer)
-Allow DataManager to set and read values from the system properties (xuefer)
-Fix crash when taking screenshots on arm64 devices (xuefer)
-Fix error message after an ORS script completes (Dees_Troy)
-Fix crashes / error when creating encrypted backups (_that, Dees_Troy)
-Add system read only option – more details below (Dees_Troy)
-Add resize2fs and GUI option to run resize2fs (Dees_Troy)
-Fix crash loop caused by empty lines in AOSP recovery command file (_that)
-Prevent duplicate page overlays such as multiple lock screens (mdmower)
Note: As always, be sure your custom theme is up to date (or remove your custom theme) before updating TWRP.
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
This new version also marks our first set of full builds using our new jenkins build server. You can track the progress of builds at https://jenkins.twrp.me and we have taken additional steps to make it easier for device maintainers to step up and submit patches to our gerrit server at https://gerrit.twrp.me to help us keep devices up to date and working.
DOWNLOAD:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed
1) Download the latest version from our website on your device
2) Reboot to TWRP
3) Hit Install and tap the "Images..." button in the lower right
4) Browse to the location of the TWRP image on your device and select it
5) Select recovery from the partition list and swipe to flash
OR:
You can find more information and download links on our NEW website! NOTE that the 2.8.6.0 version is ONLY available on our new site and is not available on our other, older mirrors!
BUGS:
If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.
Changelog - See our website!
FAQ:
How to install with Fastboot:
1. Download the fastboot binary for your computer from HTC
2. Connect your phone and boot it into fastboot
3. Run fastboot with the command
Code:
Code:
fastboot flash recovery path/to/recovery-twrp-crespo4g-1.0.3.img
Error when flashing some zip files:
twrp only supports the latest and greatest edify script for zip flashing. Please bug the zip developer to update the zip script to edify.
Does this back up the WiMAX partition?
That is an option if you chose, but you'll find it under "efs" and not wimax. Both the NS4G and the GSM Nexus S have an efs partition. The efs partition on the NS4G includes WiMAX along with some other fairly crucial data. It's a good idea to back up your efs separately (e.g. just pick efs and don't choose any other partitions) and keep this backup in a safe place.
Live support:
Click this link or join us in #twrp on Freenode IRC.
Yes. Thanks for this. Works great
So how will flashing our backed up images thru fastboot work since they are backed up as .win?
Uncle Jimmy says hello
snandlal said:
Yes. Thanks for this. Works great
So how will flashing our backed up images thru fastboot work since they are backed up as .win?
Uncle Jimmy says hello
Click to expand...
Click to collapse
What partition?
Most are img files just with a different extension some are .tars. You can try it. If it doesn't work you can just restore.
If i go in TWRP on my storage and look at the backed up images like system.win, data.win, boot.win. how would i use that image in fastboot if for some reason i couldnt get to recovery? Rename it to .img?
Uncle Jimmy says hello
The .win files are either .tar or .tgz files (depending on whether you chose compression or not). The backups themselves are usually done with dd. So long as you're not messing with the recovery partition itself and leaving compression turned off, you should be good to go with fastboot flashing, though I don't have a NS4G myself to check.
snandlal said:
If i go in TWRP on my storage and look at the backed up images like system.win, data.win, boot.win. how would i use that image in fastboot if for some reason i couldnt get to recovery? Rename it to .img?
Uncle Jimmy says hello
Click to expand...
Click to collapse
No, you can not fastboot system/data/cache/sd-ext/.android_secure as those are essentially tgz. You can how ever fastboot or dd the others which are boot/recovery/efs by renaming it to .img
AssassinsLament said:
No, you can not fastboot system/data/cache/sd-ext/.android_secure as those are essentially tgz. You can how ever fastboot or dd the others which are boot/recovery/efs by renaming it to .img
Click to expand...
Click to collapse
What? Ok so all im asking is.....the system.win in TWRP, can i rename that system.img and flash thru fastboot?
Uncle Jimmy says hello
snandlal said:
What? Ok so all im asking is.....the system.win in TWRP, can i rename that system.img and flash thru fastboot?
Uncle Jimmy says hello
Click to expand...
Click to collapse
You can fastboot these backups:
boot/recovery/efs
You cannot fastboot these:
system/data/cache/sd-ext/.android_secure
Hope that clears it up.
Dees_Troy said:
You can fastboot these backups:
boot/recovery/efs
You cannot fastboot these:
system/data/cache/sd-ext/.android_secure
Hope that clears it up.
Click to expand...
Click to collapse
Ok thanks. That did clear it up.
Uncle Jimmy says hello
You guys gonna submit this to koushik so it can be flashed in rom manager under "flash alternate recoveries"?
I would love to use this recovery, but unable to push anything on my laptop right now (needs formation). Any flashable scripts?
Sent from my Nexus S 4G using XDA Premium App
info[]box1 said:
I would love to use this recovery, but unable to push anything on my laptop right now (needs formation). Any flashable scripts?
Sent from my Nexus S 4G using XDA Premium App
Click to expand...
Click to collapse
Use "flash_image gui" by Joeykrim. Apps & Themes section
http://forum.xda-developers.com/showthread.php?t=1122599
snandlal said:
Use "flash_image gui" by Joeykrim. Apps & Themes section
http://forum.xda-developers.com/showthread.php?t=1122599
Click to expand...
Click to collapse
Thanks for help I'll report back.
Edit: it worked thx
Sent from my Nexus S 4G using XDA Premium App
Loving this recovery. Great job teamwin!
Wish all capacitive buttons worked though.
snandlal said:
Use "flash_image gui" by Joeykrim. Apps & Themes section
http://forum.xda-developers.com/showthread.php?t=1122599
Click to expand...
Click to collapse
Please advise: If your using the app do you just select the recovery image option and hit flash file?
very very well done.
would there be a way to implement the option to perform backup/restore via adb like on RA recovery?
I tried it but i am not sure if i remember the command properly I did
Code:
adb shell
# cd /sbin
# nandroid-mobile.sh -b
TheBurgh said:
Please advise: If your using the app do you just select the recovery image option and hit flash file?
Click to expand...
Click to collapse
yeah the first attempt i selected recovery img and manually selected wipe cache. it prompted successful execute, but recovered cwm recovery (no recovery)lol. just rebooted and the second attempt i didnt check wipe cache. all is GOOD now lol.
[email protected] said:
very very well done.
would there be a way to implement the option to perform backup/restore via adb like on RA recovery?
I tried it but i am not sure if i remember the command properly I did
Code:
adb shell
# cd /sbin
# nandroid-mobile.sh -b
Click to expand...
Click to collapse
We don't use nandroid.sh at all. It's not included in our recovery. All of our backups are done in C, so this isn't possible. Sorry.
We didn't base our recovery on CWM or Amon_RA. While we may have used a few bits of code here and there, for the most part we tried to write our own recovery doing things the best way that we thought was possible.

BigPart Repartition Upgrade and Resource Center

Hello everyone.
You should know that time ago Motorola decided to stop updating our Xoom, but we showed (and we are still showing) them that our tablet is still alive and kicking.
Let me update this with the last news (a big win, indeed) from @bigrushdog:
IMPORTANT: It should be harmless for your Xoom, but you need to do it at your own risk. Nobody will give you any kind of warranty and we will be not guilty if your Xoom bricks, dies, loses the data, gets cursed, your cow starts to give bitter milk or if it unchains a thermonuclear war.
bigrushdog said:
BigPart Repartition Upgrade and Resource Center
Credits
Much love, credit, and respect go out to @Schischu and @rchtk! Your insight on the kernel patch paved the way! The Motorola Xoom cheats death once again!
Repartition Guide
1) Your data will be totally wiped! If you have Nandroids, TitaniumBackups, or anything of any value on your internal storage, copy them to your microsd or computer! They will be gone forever! Your microsd card is the only safe haven on your Xoom during this process.
2) Put all needed resources on your microsd card! You will need the original TWRP 2.6.3.0 touch recovery from @runandhide05, TWRP 2.6.3.0 BigPart version, your desired rom, and the BigPart boot image that goes with your desired rom. The BigPart boot images can be found in the next section.
3) Reboot into recovery. Flash TWRP BigPart. Don't reboot just yet.
4) Go back into wipe menu and wipe everything but /sdcard.
5) Go to reboot menu and reboot into recovery. Disregard the "No OS" warning and don't install SuperSU when asked.
6) When you come back into recovery, it will think your data is encrypted but it's not. Go into wipe menu and "format data". Type "yes" when prompted. When done, go back into wipe menu. Select "Advanced Wipe". Check "system" and "cache" and wipe them.
7) Hit Home then go to reboot menu and reboot recovery. Once again, disregard "No OS" warning and don't install SuperSU when asked
8) When you come back into recovery, go into mount menu. You should see "cache" and "data" checked. "System" will be unchecked. Check it to confirm it mounts, then uncheck it. Congratulations! You are now repartitioned!
9) Go into install. Recovery should show your microsd storage by default. If not, using the navigation panel, navigate to root then go into "sdcard". Flash your rom, BigPart boot image package, and any other resources as you normally would.
10) Reboot into system. You are done!
Later.... How to restore to stock partitions.
TWRP 2.6.3.0 R.A.H BigPart Edition Recovery
TWRP 2.6.3.0 BigPart
BigPart Eos 4 boot images with the usual modules
WARNING: You must have already executed the repartition before using these boot images. If not, follow the guide above! These will soft brick your device otherwise!
Eos 4 BigPart Wingray Boot Image
Eos 4 BigPart Stingray / Stingray_CDMA Boot Image
Eos 4 BigPart Everest Boot Image
CM10.1 BigPart Kernel by @matt4321
http://d-h.st/IzQ
For CM10.1, follow instructions in the OP but when getting to the flashing of ROMs, flash CM10.1, then flash thi
BigPart @dreamcwli MyWingray 4.3 (or in theory any 4.3) boot image with the usual modules
Note: This is a new kernel rebased on @dreamcwli 's tree. No overclock or gpu overclock yet, but soon ;D
WARNING: You must have already executed the repartition before using these boot images. If not, follow the guide above! These will soft brick your device otherwise!
MyWingray 4.3 BigPart wingray Boot Image
Click to expand...
Click to collapse
Q&A
Q: OK to understand this right, now we have a new recovery and boot. Which ROM do we use? The same as before? And BigPart @dreamcwli MyWingray 4.3 is only for wingray?
A: Yes, we have new recovery and boot. For this recovery and boot you need to use the new BigPart roms. If you are not using BigPart roms, you will need to install old recovery and boot and format everything again. And yes, it seems like @dreamcwli MyWingray 4.3 is only for wingray at the moment, but brd published a version of the last EOS4 stable with the new kernel working for BigPart.
Q: Does this new space mean we can start using full blown GApps Instead of the scaled down versions we had been previously?
(I understand there may be NEON ramifications causing a NO Answer here)
A: You can use the GApps that you prefer. Now we have space enough, but scaled down versions might be slightly faster as it uses less resources (I guess).
Q: Seems like a good time to ask and reveal my limited understanding of why user space is formatted vfat. I'm a linux fan who dislikes being limited to 4096 Mb when creating a linux.img. A yes or no answer will suffice. As long as the devs are pushing the limits, can the user space (sdcard) be formatted ext2, 3 or 4?
A: I think that that is something to implement in the kernel. I think that it is easy to do and our bakers eventually will implement it.
Q: Can cm10.2 be flashed instead of an eos4 rom after the repartition?
A: You need to replace BOOT.img in the CM zip with the BigPart compatible with your Xoom, and if the kernel is compatible with CM it will work.
Q: I'm on stingray_cdma.....unless i can flash a wingray rom and boot.img after the repart?
A: No idea, but it's safer to use roms build for your device. Take a look to the previous question.
Q: im on stingray and i tried using cm10.1 as my rom and it didnt get to the bootanimation so i tried eos 3 and it works well. couldnt get eos 4 to download from goo.im
A: brd published some EOS4 working with BigPart (see http://forum.xda-developers.com/showpost.php?p=47005701&postcount=1 )
Q: I am asking again to understand this right, now we have a new recovery and boot.
Which ROM do we use? The same as before? Do we have to change the boot IMG in the ROM with the big part one?
And BigPart @dreamcwli MyWingray 4.3 is only for wingray or it can be used with everest as well? And what is its difference with the other big part in the kernel?
A: Use only BigPart roms. You will need to change the boot.img from the rom if the rom is not compatible with BigParts, but if the rom is not compatible with the new kernel, it is useless... MyWingray is compatible with Everest but you will not have 3G, I guess... But I'm not sure.
Q: That's great. @bigrushdog @realjumy Is there a way to get the radios for everest and stingray on a separate zip?
A: The rom must be cooked with the radios...
Q: I wanna ask you because i have my xoom forma two years, and laste time i format it and give me error with dev block mmblck or something else and i think that i could have my internal storage corrupt.. If i install your 4.3 image modded, and then the repartition, Will it works fine?? Thanks and sorry me
A: No idea.
Q: Followed the instructions for the re-partitioning. Everything worked except the Xoom cannot see the external sd card in recovery. I have re-formated it as fat32 and tried another card. When I view the files in the PC they are there. Any ideas?
A: Something something went wrong... Copy the data from the SD to your PC, format SD and put back data. Let's see if that works...
Q: How can we identify which ROMs are for the new partition layout? Just assume everything 4.3 and later? It would be nice if we added [BigPart] to the thread title to make them more easily identifiable.
A: Only roms with BigPart in their name can be used with the new layout.
Q: I was under the impression that we could use old roms provided we replaced the boot.img in the zip with the NEW BIGPART boot.img for our unit? (Only after repartitioning has been completed) Is that wrong and we need to wait for a particular build?
A: Not all the roms are compatibles with the boot.img method (kernel method). You will need to try to be sure. EOS4 and Dream's have proper versions. If you want to use, for example, CM you will need to:
option 1.- Build it yourself patching the kernel
option 2.- Use CM and try to use a different kernel
option 3.- Ask to the CM maintainer to release BigPartition versions.
There is a lot of 4.2.2 projects running, some 4.3 and if we are successful, MAYBE we will be able to port 4.4 to our devices. One of the main problems (but not the only one) is the internal storage structure of the tablet. It seems that is not too hard to solve, as in other devices (mainly Samsung) is common to change it.
The aim of this project is to compare how the internal partitions are setted up in order to change them and have more room for system and apps. This will improve all the ROMS (4.1, 4.2.*, 4.4). @bigrushdog is doing a big effort to change it but we need more data from all models to compare and be sure that we don't break anything.
It will take up to 3 hours (depends on the model) but is something that can work while you are sleeping or not using the tablet. With the data provided by you, we can compare and choose the best changes.
IMPORTANT: It should be harmless for your Xoom, but you need to do it at your own risk. Nobody will give you any kind of warranty and we will be not guilty if your Xoom bricks, dies, loses the data, gets cursed, makes your cow begin to give bitter milk or if it unchains a thermonuclear war.
IMPORTANT: It should be harmless for your PC, but you need to do it at your own risk. Nobody will give you any kind of warranty and we will be not guilty if your PC bricks, dies, gets cursed, loses the data, makes your cow begin to give bitter milk or if it unchains a thermonuclear war.
What are you going to do:
You are going to do a 1:1 copy of your internal storage into your PC. Then, we will detect the partitions and where begins and ends each one. Nothing else. We will compare the different versions and in the future a tool will be released to make the changes.
What you will need:
Linux (maybe you can use a Live DVD / USB?). It should be a way to do this process under Windows. If you know how to do it, please, share the info.
33GB of disk space in your computer, anywhere.
Android SDK working (that means that if you plug your tablet turned on and run
Code:
./adb devices
in the folder "platform-tools" of your SDK will provide a serial number): http://developer.android.com/sdk/index.html
3 hours (can be done while sleeping, not using the tablet, etc) if you have a 32GB Xoom.
Rooted Xoom.
Before you begin:
DO A NANDROID BACKUP!!!!!
READ EVERYTHING AND ASK IF YOU DON'T UNDERSTAND SOMETHING
Step by step:
Full charge your tablet (or keep it connected to AC?) and turn it on WITHOUT SDCARD.
If your Android SDK is not installed or working properly, fix it now: http://developer.android.com/sdk/index.html
Install the dependencies. For Ubuntu / LinuxMint / Debian:
Code:
apt-get install testdisk netcat pv extundelete testdisk
Activate USB Debug on your device (in order to connect with adb). You can find it under Settings > Developer options.
Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
Click to expand...
Click to collapse
Plug your tablet (it must be on) and run
Code:
./adb devices
in the folder "platform-tools" of your SDK. If you don't get as a result a serial number, STOP. Something is wrong with your SDK. Please, fix it to continue.
Open a terminal on your computer, go to the Android SDK directory's subdirectory sdk/platform-tools (where adb is located).
We will setup a forward port to be able to download the data to our PC:
Code:
./adb forward tcp:5555 tcp:5555
Now we will connect to the tablet
Code:
./adb shell
Maybe you need to grant permission to do it. Take a look to your tablet's screen.
We become superuser:
Code:
su
Grant permanent permissions when asked. You can revoke the permissions later if you want.
With this we will transfer the data to the port that we set previously:
Code:
/system/xbin/busybox nc -l -p 5555 -e /system/xbin/busybox dd if=/dev/block/mmcblk0
DON'T CLOSE THAT TERMINAL. An now OPEN A NEW ONE IN THE PC.
Go again to the folder "platform-tools" of your SDK and let's collect the data:
Code:
./adb forward tcp:5555 tcp:5555
Code:
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0.raw
If you want to save the file in a different place/partition, change what is after ">". For example, if I want to save the file in my home folder, I will write /home/jumy/mmcblk0.raw. If you are not sure or don't know how to do it, don't change it.
You will to wait up to 3 hours until it finish.
When the transfer is finished, run this in the folder where the dump is located (if you changed nothing, it is located in the older "platform-tools" of your SDK):
Code:
testdisk mmcblk0.raw
First restore the GPT partition table. Select mmcblk0.raw in the TestDisk interface and choose Proceed.
Choose EFI GPT.
Then select Analyse.
Choose Quick Search.
The search will return a table that you should copy and paste in this thread.
Now you can exit and remove the dumped file (mmcblk0.raw).
Please, when you provide the data, tell us which model, storage size, ROM name and version and indicate if it is the Hong Kong model.
Info collected from http://www.df.lth.se/~jokke/androidfilerecovery/ --> Visit it if you want some screenshots.
Everest, 32GB, using EOS4 V170, NOT Hong Kong model.
Code:
Partition Start End Size in sectors
>P MS Data 47104 51199 4096
P MS Data 61440 65535 4096
P MS Data 122880 647159 524280
P MS Data 647168 993279 346112
P MS Data 993280 62319583 61326304
Ill Help!
Testing in progress... =]
Device: XOOM 32GB Wingray MZ604
Android: 4.2.2
ROM: EOS4 Nightly 203
EDIT: i did my bloody SD card... did it again and now heres the internal 32GB
Code:
Disk mmcblk0_1.raw - 31 GB / 29 GiB - CHS 3880 255 63
Partition Start End Size in sectors
P MS Data 47104 51199 4096
P MS Data 61440 65535 4096
P MS Data 122880 647159 524280
P MS Data 647168 993279 346112
P MS Data 993280 62319583 61326304
4.4
No problem for test
Would love to test
I would really love to test Android 4.4 on my Xoom... The new platform seems to be much faster and my Xoom feels very slow and clumpy on Android 4.2 and even 4.1
djripster said:
I would really love to test Android 4.4 on my Xoom... The new platform seems to be much faster and my Xoom feels very slow and clumpy on Android 4.2 and even 4.1
Click to expand...
Click to collapse
4.4 will have the same problem that 4.2.* and 4.3 as it is a problem with the storage. That is the reason why we need so badly to change the partitions, and that is why we are asking for help to collect this data.
I'm running it now!
Sent from my Xoom
notbrodie said:
I'm running it now!
Sent from my Xoom
Click to expand...
Click to collapse
That's great!!!!
i got no Linux box. will see if i can do some research over the weekend on Windoze tools.
I derped my development laptop so I was down a few days. I think we have what we need for a repartition script. As some of you know kitkat source dropped. Under the hood, not much changed. At least from what I hear. So I'll slap together a theoretical repartition script. Any volunteers?
realjumy said:
That's great!!!!
Click to expand...
Click to collapse
Disk mmcblk0.raw - 1967 MB / 1875 MiB - CHS 240 255 63
Partition Start End Size in sectors
>P MS Data 47104 51199 4096
P MS Data 61440 65535 4096
P MS Data 122880 647159 524280
P MS Data 647168 993279 346112
P MS Data 1860958 1862168 1211 [\^I]
Xoom WiFi 32GB EOS-203, Not Hong Kong.
also: 3 hours... lol. it took 18 minutes
---------- Post added at 08:09 PM ---------- Previous post was at 08:06 PM ----------
bigrushdog said:
I derped my development laptop so I was down a few days. I think we have what we need for a repartition script. As some of you know kitkat source dropped. Under the hood, not much changed. At least from what I hear. So I'll slap together a theoretical repartition script. Any volunteers?
Click to expand...
Click to collapse
Count me in! i've got a nandroid on my external sdcard, though I'm not sure what good that'll do if the repartitioning fails...
---------- Post added at 08:18 PM ---------- Previous post was at 08:09 PM ----------
about to load 4.4 on my N4... let's see if this super-hyped new android is really that much different/better than 4.3!
Model: MZ604 (wifi-only)
Storage size: 32GB
ROM: EOS Stable release 3.0
NOT Hong Kong model
testdisk output:
Code:
Disk mmcblk0.raw - 32 GB / 29 GiB - CHS 3892 255 63
Partition Start End Size in sectors
>P MS Data 43008 47103 4096
P MS Data 57344 61439 4096
P MS Data 118784 643063 524280
P MS Data 643072 989183 346112
P MS Data 989184 62512095 61522912
Took a bit more than 3 hours...
notbrodie, there may be something wrong in your experiment as the dump file is only around 2GB. Or maybe you just have non-standard partitioning, I am not sure...
PS: Small correction to the instructions (just to make it perfect):
- closing code tag seems to be lost in ./adb shell command
- A typo in "If you want to save the fine"
Thank you guys!
Sent from my Nexus 4 using Tapatalk
DaniLoveSky said:
Model: MZ604 (wifi-only)
Storage size: 32GB
ROM: EOS Stable release 3.0
NOT Hong Kong model
testdisk output:
Code:
Disk mmcblk0.raw - 32 GB / 29 GiB - CHS 3892 255 63
Partition Start End Size in sectors
>P MS Data 43008 47103 4096
P MS Data 57344 61439 4096
P MS Data 118784 643063 524280
P MS Data 643072 989183 346112
P MS Data 989184 62512095 61522912
Took a bit more than 3 hours...
notbrodie, there may be something wrong in your experiment as the dump file is only around 2GB. Or maybe you just have non-standard partitioning, I am not sure...
PS: Small correction to the instructions (just to make it perfect):
- closing code tag seems to be lost in ./adb shell command
- A typo in "If you want to save the fine"
Click to expand...
Click to collapse
Thanks mate. I will correct the post later from the PC.
Sent from my Nexus 4 using Tapatalk
I'm dumping stingray right now. From what i can see, it already looks like the offsets are different for different models. That's very good to know. So calculations will need to be made for each version. After talking with @Roach2010 he says there may be partition table info that needs updating somewhere in the NAND dump. However, it doesn't appear that is the case for all devices. Once i get this dump we can play some more.
EDIT: found some interesting information http://forum.xda-developers.com/showthread.php?t=1388996
You guys... are brilliant... I'm in. My Xoom is just collecting dust since Eos shutdown.
also guys im getting my nexus 5 by the end of the week, let me know if you want any information extracted from that ! will be rooting that m*****f***er soon as! which leaves me with 2 dev devices XOOM and S2
I have a mz605 umt_everest model, at monday in my lab I will do this and post here.
bigrushdog said:
I'm dumping stingray right now. From what i can see, it already looks like the offsets are different for different models. That's very good to know. So calculations will need to be made for each version. After talking with @Roach2010 he says there may be partition table info that needs updating somewhere in the NAND dump. However, it doesn't appear that is the case for all devices. Once i get this dump we can play some more.
EDIT: found some interesting information http://forum.xda-developers.com/showthread.php?t=1388996
Click to expand...
Click to collapse
Nice find, so by doing this research and analysis it will be possible to create a universal partition structure (in terms of the XOOM versions). am i right in thinking this?
LOGMD said:
Nice find, so by doing this research and analysis it will be possible to create a universal partition structure (in terms of the XOOM versions). am i right in thinking this?
Click to expand...
Click to collapse
No... Whit this we will be able to:
1.- Check if every Xoom version have the same or different partition structure (done, each model has a different structure).
2.- See how every model need to be restructured (pending, that will be next step).
3.- Provide a script to make it easy to do (we need to do the 2nd step first).
Sent from my Nexus 4 using Tapatalk

[Q] FP1 - 1.6 unified storage upgrade: Problems

hi!
i installed the regulat 1.6 update to my FP1 and everything was just fine.
then I tried to install the "unified 1.6 update" which worked but the problems begun:
things I noticed:
1. backup ist not really a backup for the apps but just a way to reinstall the apps I had installed without any settings. not a fun way to find that out when reopening your apps.
2. the update to the 1.6 unifyed also messed with my SD card and deleted files and put new ones there. not something I was expecting. luckily I had a backup of the SD card.
the thing I am looking for a solution:
after merging the partitions I cannot acces the phone storage on my PC (mac osx 10.9.4). not directly as a drive. the android fil transfer tool works, but it does not have all abilities finder/explorere provides. how do I get acces to the phone storage again?
As all my settings are gone anyway I am open to reinstall the phone from scratch.
fivel_ said:
the thing I am looking for a solution:
after merging the partitions I cannot acces the phone storage on my PC (mac osx 10.9.4). not directly as a drive. the android fil transfer tool works, but it does not have all abilities finder/explorere provides. how do I get acces to the phone storage again?
Click to expand...
Click to collapse
Because of the partition layout it no longer is possible to expose the internal storage as mass storage device. Adb will work but the preferred way of transferring files is using the MTP protocol.
I am not a mac user but I think you need to install some additional software.
https://www.android.com/filetransfer/
_keesj said:
Because of the partition layout it no longer is possible to expose the internal storage as mass storage device. Adb will work but the preferred way of transferring files is using the MTP protocol.
Click to expand...
Click to collapse
thanks a lot, that is what I feared.
hi, i'm also have an upgrade problem: mine is that i can't upgrade at all.
i've repartitioned earlier with the app mentioned in the wiki (wiki/Fairphone_Fairphone/Guides#How_to_partition_your_Fairphone).
i've also done the steps _keesj descripes in thread "unified storage setup on re-partitioned FP1" ("Steps for "fiixing" your upgrade").
i'm having Cherry 1.6, and two 7 GB partitions.
does anyone has a solution?
see other (missplaced) post
This post might be of help:
http://forum.xda-developers.com/fairphone/general/unified-storage-setup-partitioned-fp1-t2834642
Donat.Callens said:
This post might be of help:
http://forum.xda-developers.com/fairphone/general/unified-storage-setup-partitioned-fp1-t2834642
Click to expand...
Click to collapse
thanks, i've read it again and tried _keesj's solution again, unfortunately it didn't solve my situation.
i'm a layman in this area, so probably i shoudn't haved 'played' with partitions at all (but with the app it was easy).
my previous post wasn't quite complete... i have had an unified partition before...
because of an app that didn't work, i used the repartition app again to see if that could solve the problem.
it did, but later i wondered if a wrong install in the unified sistuation was the problem... so i thought 'let's try the unified partition again'...
i thought i could simply re-use the Fairphone Updater...
so maybe i'm now having a unified partition divided in 2?
and lost the ability to ever upgrade to newer versions of the Fairphone OS?
i hope someone can help me...
jjjanssen said:
i could simply re-use the Fairphone Updater...
Click to expand...
Click to collapse
Make sure you allow it to reinstall the default recovery.
Donat.Callens said:
Make sure you allow it to reinstall the default recovery.
Click to expand...
Click to collapse
how do I allow it? i didn't get the question you've got ("ROM may flash stock recovery on boot. Fix?").
i downloaded Cherry 1.6 again and chose Install, gave it SU (forever) access, it automatically restarted to the Android with the text “Installing system update…” (no progress bar), and after a few minutes it restarted and nothing is changed. After starting the Fairphone Updater again, it immediately gave the Install option again. Same after selecting the Storage Upgrader.
I also tried restoring from the recovery (default, never replaced), from sd and adb (1.6 does install, 1.3 doesn't, and 1.6 partition upgrader doesn't either, gets aborted)…
Hi,
jjjanssen said:
how do I allow it? i didn't get the question you've got ("ROM may flash stock recovery on boot. Fix?").
i downloaded Cherry 1.6 again and chose Install, gave it SU (forever) access, it automatically restarted to the Android with the text “Installing system update…” (no progress bar), and after a few minutes it restarted and nothing is changed. After starting the Fairphone Updater again, it immediately gave the Install option again. Same after selecting the Storage Upgrader.
I also tried restoring from the recovery (default, never replaced), from sd and adb (1.6 does install, 1.3 doesn't, and 1.6 partition upgrader doesn't either, gets aborted)…
Click to expand...
Click to collapse
Non unified images have a different signature. The moment you use the partition upgrader it will change the accepted signature and will no longer allow older images. If all is as I expected your running image is still the parition upgrader image and it contains the tools to perform the last step of the re-partitioning (e.g. calling the script and performing a recovery with format).
If you want to know what is going wrong with the zip install check the /cache/recovery direcotry. it will contain logs of the failing install.
As for a solutions I think you either need to run the script or flash your device using a 1.6 FUSE image.
_keesj said:
If you want to know what is going wrong with the zip install check the /cache/recovery direcotry. it will contain logs of the failing install.
As for a solutions I think you either need to run the script or flash your device using a 1.6 FUSE image.
Click to expand...
Click to collapse
I couldn't find any (log) files in /cache/recovery, but...
flashing the EBR1 from the FUSE binaries (FP1U) to my FP1 solved it! :victory:
thanks to _keesj, Rick (from Fairphone) and Christian (Fairphone forum)!
here is Rick's tutorial (with a few notes of my own):
You can only fix this by flashing your phone:
For GURU's only! (flashing with ADB). The alternative is to use the windows flasher tool.
1) Download the original image binaries from Fairphone's site (as a new user I, jjjanssen, can't post links yet).
(Download FP1U's zip: Fairphone_Cherry_1.6_FUSE_Image_2014-07-31.zip)
2) unzip the file
(I chose to unzip to location D:/FP1U.
after that i moved all content from the directory which contained EBR1, to D:/FP1U.)
3) enable usb debugging (on your phone: Settings, Developer options, turn USB debugging on)
4) push EBR1 on the phone: (Open (if you're using Windows) the Command Prompt)
adb push FP1U/EBR1 /mnt/sdcard/
(For instructions on how to use ADB search this site)
5) become root:
adb shell
(after that I also became super user (command su), but maybe that's not necessary; Rick didn't mention it. )
6) override the partition inforation:
dd if=/mnt/sdcard/EBR1 of=/dev/ebr1
7) reboot into recovery:
reboot recovery
8) choose to wipe data and cache
(after that, choose reboot)
Click to expand...
Click to collapse

[Tools/Recovery] TWRP for LG Optimus F3Q

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

[PARTITION][TREBLE] Project Treble for Xiaomi Mi Note 2 [SCORPIO][15.02.2019]

- T R E B L E Y -
Android Partition Treblerizer
A tool able to seamlessly create / remove the vendor partition from within TWRP​
INTRODUCTION
The creation of a tool able to create and remove the supplier partition from TWRP, so a computer was not required. So I created this flaming TWRP ZIP which can create and remove the vendor partition from the userdata system or partitions without a computer and without deleting the files in the mother partition in the recommended configuration.
In this way, our device can also have a treble just like a phone that came out of the factory with the vendor partition without touching the cust partition.
The tool will try to resize the mother partition without deleting it, either during the creation and removal of the supplier partition. However, this can only be done when the mother partition is ext4, only when the supplier partition is at the end of the mother partition and when the mother partition is not encrypted. The recommended configuration is the one that is obtained by selecting the first option in each option: subdividing 512 MB from the end of the system partition. A reboot is required after applying the patch to the partition table because the kernel needs to reload it before doing anything else.
REQUIREMENTS
Due to the use of a key detection binary, it is compatible only with ARM and ARM64 devices running TWRP. So far I have tested it in the Xiaomi Mi Note 2 but It should work in any compatible device. I made it this way so other legacy devices could transition to Treble ROMs + GSI, and Android Pie. Please let me know about other devices using this tool!!!!!
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED.
!!! Whatever you do, it is at your own risk !!!
Either for creating or removing a vendor partition,, follow these steps:
A. Download Trebley_APT, Trebley_treble, Trebley_twrp.
1. Put Trebley_APT, Trebley_treble, Trebley_twrp to your External SD card.
2. Go to Install and flash the Trebley_APT ZIP file as any other ROM or MOD file to execute the tool.
3. Reboot to recovery again to ensure the changes are applied properly.
4. In some cases you will need to format the mother partition after adding or removing the vendor partition next to it.
5. Go to Install and select "Flash Image".
6. Flash the Trebley_twrp IMG file to recovery partition and reboot to recovery.
7. Wipe cache, dalvik-cache, system, vendor and data
8. Flash a Generic System Image in system partition (arm64, A only).
9. Reboot, and done.
CREATE A VENDOR PARTITION:
So far these are the available options:
Mother partition selection: system / userdata
Split position: Splitting from the end / start of the mother partition.
Vendor partition size: 512 / 915 MB
REMOVE THE VENDOR PARTITION:
Should a Vendor module already exists, Trebley offers to remove it, returning to a Non-Treble partition table. It will return the space to the mother partition, system or userdata. So, older non Treble ROMs could be flashed after the mandatory reboot.
DOWNLOAD
Trebley_APT_v1.0_ARM_20190215-signed.zip
Trebley_treble_scorpio-20190215-0521-signed.zip
Trebley-twrp-3.2.3-0-scorpio-custom.img
SOURCES
All rights reserved to the project: Party and its creator @Oki).
CREDITS
@someone755 for the keycheck binary
@Zackptg5 for the V4A install script that inspired my version.
@Oki for the base script.
@Psy_Man for the kernel and for supporting.
Trebley updated V1.0, is now affordable for all users, and above all is stable.
DarioRetr said:
I would be grateful if developers like @Psy_Man will update their project, making it compatible with the project treble with the vendor partition.
Click to expand...
Click to collapse
Nice work! I recently hunted down the original source of the keycheck binary and built it for x86/64 (and rebuilt it for arm/64) here: https://github.com/Zackptg5/keycheck
Here's compiled ones to save you some time: https://github.com/Zackptg5/Unity-Addons/tree/master/Volume-Key-Selector
The screenshots will be added soon!
Zackptg5 said:
Nice work! I recently hunted down the original source of the keycheck binary and built it for x86/64 (and rebuilt it for arm/64) here: https://github.com/Zackptg5/keycheck
Here's compiled ones to save you some time: https://github.com/Zackptg5/Unity-Addons/tree/master/Volume-Key-Selector
Click to expand...
Click to collapse
Thanks for the advice, I will evaluate if I will put in the next Trebley update, however, have you tried Trebley?
DarioRetr said:
Thanks for the advice, I will evaluate if I will put in the next Trebley update, however, have you tried Trebley?
Click to expand...
Click to collapse
No, my current devices are already treble compatible
Please post and open the thread in the designated Project Treble section.
Thank you for helping us keeping the forums organized.
Thread Closed
Funk Wizard
Forum Moderator

Categories

Resources