[GUIDE] How to create 'mmcblk0.img' from a working device? - Moto G5S Guides, News, & Discussion

Below are the steps I followed to create a mmcblk0.img from a working device.
What is needed? -
a) A Working device of same model XT179x where 'x' could be 2,3,4,5,etc depending on region.
b) It should be a rooted one.
c) A working linux system. Any variant would do.
Steps to follow in working device:
1) Reboot device to TWRP recovery.
2) Take a backup of system,data and boot partitions. While taking backup, select the storage as Micro SDCard.
3) Once backup is complete, do a factory reset. This step is required as you don't want your friends personal files and settings.
3a) Power off the device.
4) Remove the SIM and existing SDCard.
5) Insert a new 32GB SDCard Class 10 UHS-1 into the device. This should be formatted as FAT32 or exFAT.
6) Boot the device.
7) Once booted, connect the device to computer using USB.
8) Open a terminal in your linux.
9) adb devices (This step assumes that adb and fastboot are in linux system path)
10) adb shell
11) su -
12) You are in root shell now.
13) cat /proc/partitions.
13a) Above step would list out all partitions.
14) Note the size of mmcblk0 partition.
15) Now run 'dd if=/dev/block/mmcblk0 of=/storage/<STORAGE-ID>/mmcblk0.img bs=1000000000 count=30' without quotes. 'bs' stands for block size. Here in the above command I am giving a block size of 1GB. In my case mmcblk0 partition size was nearly 30GB. So the above command worked for me. If you are experiencing problem, then play with the numbers. For example you could try decreasing the 'bs' value and increase the 'count' value. Ultimately 'bs' multiplied by count should be the partition size. If everything goes fine, you will have a mmcblk0.img in your sdcard. One more point to note. <STORAGE-ID> in the command is the place holder. The actual ID would be a hexadecimal value. You can get your storage id by doing a 'ls /storage' in root shell. In my case the SDCard was referred as 7368-9BEE.
16)Above step would take some time as it has to create a image of 30G size. Once complete, copy the image from SDcard to your computer.
17) Power off the device and remove the SDcard from device.
18) Insert your friend's SIM card and SDCard.
19) Boot to TWRP recovery.
20) Restore the backup you took in step 2 above.
Thanks
KS

kalyansundhar said:
Below are the steps I followed to create a mmcblk0.img from a working device.
Thanks
KS
Click to expand...
Click to collapse
I, Thankyou!

Can someone please create this file of a moto g5 xt1676 cedric?
we are many who need this file. Thanks again.

takoa said:
Can someone please create this file of a moto g5 xt1676 cedric?
we are many who need this file. Thanks again.
Click to expand...
Click to collapse
sure, but you have to ask this in g5 threads not here
is hard to beleive someone has both devices tipe g5 and g5s

I just used adb in a dos-cmd-prompt under windows 10. As steps 10 until 15 are executed inside 'adb shell' and use nothing of the underlying OS (only on the phone itself).
Furtheron, i had to use a exFAT formatted SD-card, as FAT32 maxfile size is 4Gb and the mmcblk0.img file will be (a lot) bigger.
And i had to use a 64Gb SD-card as my mmcblk0.img seems to be bigger as yours (and the SD-card hosts some files in the android-folder, onces the phone was booted).
My mmcblk0 was listed in 'cat /proc/partitions' sized at 30.535.680 (blocks of 1024 bytes).
I used dd command:
dd if=/dev/block/mmcblk0 of=/storage/<SDcard-ID>/mmcblk0.img bs=1048576 count=29820
matching the exact size of mmcblk0
Once i uploaded the image file, i will put the download link in a post in the unbrick thread. With specs of my phone and versions.

Can you make a video about it? which is in linux or windows 10 because I already have 2 days with my cell phone dead and I still can not solve the problem. The template is xt1792.

kalyansundhar said:
Below are the steps I followed to create a mmcblk0.img from a working device.
What is needed? -
a) A Working device of same model XT179x where 'x' could be 2,3,4,5,etc depending on region.
b) It should be a rooted one.
c) A working linux system. Any variant would do.
Steps to follow in working device:
1) Reboot device to TWRP recovery.
2) Take a backup of system,data and boot partitions. While taking backup, select the storage as Micro SDCard.
3) Once backup is complete, do a factory reset. This step is required as you don't want your friends personal files and settings.
3a) Power off the device.
4) Remove the SIM and existing SDCard.
5) Insert a new 32GB SDCard Class 10 UHS-1 into the device. This should be formatted as FAT32 or exFAT.
6) Boot the device.
7) Once booted, connect the device to computer using USB.
8) Open a terminal in your linux.
9) adb devices (This step assumes that adb and fastboot are in linux system path)
10) adb shell
11) su -
12) You are in root shell now.
13) cat /proc/partitions.
13a) Above step would list out all partitions.
14) Note the size of mmcblk0 partition.
15) Now run 'dd if=/dev/block/mmcblk0 of=/storage/<STORAGE-ID>/mmcblk0.img bs=1000000000 count=30' without quotes. 'bs' stands for block size. Here in the above command I am giving a block size of 1GB. In my case mmcblk0 partition size was nearly 30GB. So the above command worked for me. If you are experiencing problem, then play with the numbers. For example you could try decreasing the 'bs' value and increase the 'count' value. Ultimately 'bs' multiplied by count should be the partition size. If everything goes fine, you will have a mmcblk0.img in your sdcard. One more point to note. <STORAGE-ID> in the command is the place holder. The actual ID would be a hexadecimal value. You can get your storage id by doing a 'ls /storage' in root shell. In my case the SDCard was referred as 7368-9BEE.
16)Above step would take some time as it has to create a image of 30G size. Once complete, copy the image from SDcard to your computer.
17) Power off the device and remove the SDcard from device.
18) Insert your friend's SIM card and SDCard.
19) Boot to TWRP recovery.
20) Restore the backup you took in step 2 above.
Thanks
KS
Click to expand...
Click to collapse
Thanks for the tutorial, I'm doing the file for the moto G5 Cedric.

TheFixItMan said:
Since no one responded to my request in the Q&A section I'll ask here so sorry for off topic but I know people here will have a rooted moto g5
Since I don't own this device anymore I'm looking for someone to provide the mmcblk0 partition so people with hard bricked device could potentially revive them
If you would like to provide it you will need the following
A moto g5 cedric rooted with twrp installed
A blank micro sd card of at least 32gb
Linux/Ubuntu or a virtual machine running it
Cloud storage & a decent Internet connection
See instructions below
https://forum.xda-developers.com/showpost.php?p=76795590&postcount=1
You can pm me the image
Click to expand...
Click to collapse
I suppose @rssxda, as messaged previously, can help you..

I have 2 mmcblk0 images:
1) Moto G5S and
2) Moto G5.
My Moto G5 (Cedric): XT1676, model M2675 (3Gb mem + 16Gb storage), NPP25.137-93 (1nov2017), reteu, android 7.0
download link: https://www.androidfilehost.com/?fid=11050483647474830935
MD5 of 7z-file: fc8617eb3957e2b4df16400f722f8095
MD5 of img-file (after unzip): 90efa172d7881f7268bb58708f3d9935
My Moto G5S (Montana): XT1794, model 2996, (3Gb + 32Gb), NPPS26.102-49-8 (1apr2018), reteu, android 7.1.1
download link https://www.androidfilehost.com/?fid=11050483647474830875
MD5 of 7z-file: dd10315797b78c359a2887b149cc8f44
MD5 of img-file (after unzip): ffeca74973f0b38b0996e13cde667c38
Have fun with it!

hanshu43 said:
I have 2 mmcblk0 images:
1) Moto G5S and
2) Moto G5.
My Moto G5 (Cedric): XT1676, model M2675 (3Gb mem + 16Gb storage), NPP25.137-93 (1nov2017), reteu, android 7.0
download link: https://www.androidfilehost.com/?fid=11050483647474830935
MD5 of 7z-file: fc8617eb3957e2b4df16400f722f8095
MD5 of img-file (after unzip): 90efa172d7881f7268bb58708f3d9935
My Moto G5S (Montana): XT1794, model 2996, (3Gb + 32Gb), NPPS26.102-49-8 (1apr2018), reteu, android 7.1.1
download link https://www.androidfilehost.com/?fid=11050483647474830875
MD5 of 7z-file: dd10315797b78c359a2887b149cc8f44
MD5 of img-file (after unzip): ffeca74973f0b38b0996e13cde667c38
Have fun with it!
Click to expand...
Click to collapse
-friend I have a Motorola g5 xt1670 (2GB ram and 32 storage) sera compatible ?
-Tengo otro dispositivo y la hora de extraer el mmcblk0 pesa 30 000 000 000 y no me enciende ademas mi
mmcblk0 su tamaño de bloques es igual al de usted uso el mismo comando ?

hanshu43 said:
I just used adb in a dos-cmd-prompt under windows 10. As steps 10 until 15 are executed inside 'adb shell' and use nothing of the underlying OS (only on the phone itself).
Furtheron, i had to use a exFAT formatted SD-card, as FAT32 maxfile size is 4Gb and the mmcblk0.img file will be (a lot) bigger.
And i had to use a 64Gb SD-card as my mmcblk0.img seems to be bigger as yours (and the SD-card hosts some files in the android-folder, onces the phone was booted).
My mmcblk0 was listed in 'cat /proc/partitions' sized at 30.535.680 (blocks of 1024 bytes).
I used dd command:
dd if=/dev/block/mmcblk0 of=/storage/<SDcard-ID>/mmcblk0.img bs=1048576 count=29820
matching the exact size of mmcblk0
Once i uploaded the image file, i will put the download link in a post in the unbrick thread. With specs of my phone and versions.
Click to expand...
Click to collapse
Thank you very much excellent tutorial, my block is equal to yours.
-What method do I burn the image to your sdcard?

Happiness777 said:
-friend I have a Motorola g5 xt1670 (2GB ram and 32 storage) sera compatible ?
-Tengo otro dispositivo y la hora de extraer el mmcblk0 pesa 30 000 000 000 y no me enciende ademas mi
mmcblk0 su tamaño de bloques es igual al de usted uso el mismo comando ?
Click to expand...
Click to collapse
Sorry, my Spanish (is it spanish?) is not that good. English for me please.
If the xt1670 is compatible with xt1676? i don't know. My guess, it is not. As yours has 2+32Gb and mine has 3+16Gb.
And the image is almost 16Gb and not almost 32Gb.
I create the image with blocksize (bs=) 1048576 and count 14910 for the xt1676.
Hope this helps.

Happiness777 said:
Thank you very much excellent tutorial, my block is equal to yours.
-What method do I burn the image to your sdcard?
Click to expand...
Click to collapse
The 'dd' command writes a (big) file on the SDcard. Actually, can see the file on de SDcard.
See thread https://forum.xda-developers.com/moto-g5s/how-to/blank-flash-montana-t3765150 howto write the image-file on a recovery SDcard.
The phone boots from the SDcard and gives you the opportunity to flashboot the latest stockrom to the internal storage of your phone.
I did *not* brick my phone (yet), so i did not test this recovery. I just created the mmcblk0 images for xt1676 and xt1794.

Can someone please create this file of a moto g5s xt1799-2?

Can someone please make a xt1972 Montana file? I can't revive my Montana with XT1974 and xt1975 files :/ I'm trying so hard since monday, please!

xt1792 a salvação
eu tenho um moto xt1792 mais nao sei como criar a imagem pfv me ajudem o mais rapido

This procedure has for the Moto Z Play XT1635-02 ???

hanshu43 said:
I have 2 mmcblk0 images:
1) Moto G5S and
2) Moto G5.
My Moto G5 (Cedric): XT1676, model M2675 (3Gb mem + 16Gb storage), NPP25.137-93 (1nov2017), reteu, android 7.0
download link:
MD5 of 7z-file: fc8617eb3957e2b4df16400f722f8095
MD5 of img-file (after unzip): 90efa172d7881f7268bb58708f3d9935
My Moto G5S (Montana): XT1794, model 2996, (3Gb + 32Gb), NPPS26.102-49-8 (1apr2018), reteu, android 7.1.1
download link
MD5 of 7z-file: dd10315797b78c359a2887b149cc8f44
MD5 of img-file (after unzip): ffeca74973f0b38b0996e13cde667c38
Have fun with it!
Click to expand...
Click to collapse
im looking for the g5s file, but your link is dead?
does anyone have Moto G5S (Montana): XT1794 mmcblk0 file?
edit: i used a XT1795 file instead and it worked

scruffe said:
im looking for the g5s file, but your link is dead?
does anyone have Moto G5S (Montana): XT1794 mmcblk0 file?
edit: i used a XT1795 file instead and it worked
Click to expand...
Click to collapse
I tried downgrading the bootloader and my XT1795 is hard bricked now. The device doesn't boot up with only led blinking when power source is connected.
Have you flashed the file provided by hanshu43 in the previous post ?
If yes can you please help me with how to flash the mmcblk0 file on my XT1795 .
And is everything working fine after you have flashed an XT1794 file on XT1795 ?

rizwan.mahai said:
I tried downgrading the bootloader and my XT1795 is hard bricked now. The device doesn't boot up with only led blinking when power source is connected.
Have you flashed the file provided by hanshu43 in the previous post ?
If yes can you please help me with how to flash the mmcblk0 file on my XT1795 .
And is everything working fine after you have flashed an XT1794 file on XT1795 ?
Click to expand...
Click to collapse
Use the nougat IMG file!
It work too even you have Oreo bootloader(bc-12)
Thankyou!

Related

[HOW-TO][ROOT][4NOOBS] Resize sdcard0 and internal storage to maximize space for apps

Ever since I bought my Xperia TL (LT30at), I've been upset at the ridiculous allocation of onboard memory: only 1.97GB were available for apps. The rest was allocated to an emulated external SD card, which meant that any app installed on it would lose widgets and suffer from other weird glitches on reboot. I've searched all over the place and couldn't find a solution until @teidus shared his method (per my research, it has been used on older devices from other manufacturers as well). I tried it and adjusted the steps to ensure 100% compatibility with my phone (and added explanations so that other devices could be tested).
See proof in the attached screenshots.
WARNING: You will lose a lot of data if you don't follow this guide!
WARNING: These operations require a rooted device. If you are running unrooted Android 4.3 or newer, you cannot proceed.
NOTE: All of these changes will be reversed if you flash an FTF that includes partition-image.sin.
DISCLAIMER: I'm not responsible for bricked devices and data loss from power surges, hardware damage, or changes to the linked software. Always check the native manuals for all the tools listed here!
Required Downloads:
1. Flashtool, which includes ADB (got questions about it? - ask them here) - requires installation
2. @[NUT]'s dual XZDualRecovery. I'm linking to v2.7.94 BETA installer. If you wish to check for a more recent version, go to his download page and do a page search (CTRL+F) for XT-lockeddualrecovery[version-goes-here].installer.zip. (got questions about it? - ask them here) - unzip to a location you'll remember (say, C:\xperia-resize\recovery\)
3. FTF with your phone's 4.1.2 firmware - save it to the default Flashtool firmware directory (C:\flashtool\firmwares\)
4. File system utilities (attached) - unzip to a location on your phone's physical SD card you'll remember (say, fs-utils\)​
The Guide (skip all the way to the bottom for the short guide if you know how to backup and flash FTFs):
1. Back up all data stored on internal storage:
Option 1: Connect your phone to the computer and save it to a computer drive.
Option 2: Open a file manager on the phone and copy it to a physical SD card (/sdcard1).​2. Back up your current installation with either Online Nandroid or your current recovery and remove the SD card for safety.
3. Flash your phone with basic 4.1.2 install.
3.1 Turn off the phone.
3.2 Launch Flashtool.
3.3 Click the thunderbolt icon on the left and select Flashmode.
3.4 Select the appropriate 4.1.2 FTF from the list (it'll be there if you saved it to c:\Flashtool\firmwares\).
3.5 Tick "No final verification" checkbox on the right, click Flash, and when prompted, hold the VOLUME DOWN button, and connect the phone to the computer. The operation will take about 10 minutes. DISREGARD THE INSTRUCTIONS IN THE ANIMATION. Xperia T/TL doesn't have a hardware Back button.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3.6 When flashing is complete, boot the phone.​
4. Connect your phone to the computer and let the computer recognize it.
5. Enable USB debugging.
5.1 Go to (System) Settings -> Developer options and flip the switch in the top-right corner of the screen.
5.2 Look a bit down (toward the middle of the screen) and check USB debugging.​6. Install the dual recovery.
6.1 Go to the location on your computer where you extracted dual recovery (e.g., C:\xperia-resize\recovery\).
6.2 Double-click install.bat.
6.3 Press 3 on your keyboard for the option 3. Installation on unrooted ROM.
6.4 Follow the instructions on your computer's screen.
6.5 When you will try to reboot the phone back into Android, the recovery will prompt you to root the OS. Do that.​
7. Boot into PhilZ Touch recovery by opening App Drawer, starting NDR Utils, and selecting the appropriate option.
8. When the phone boots into recovery, connect it to the computer.
9. Start ADB.
If you don't know where ADB is, press WIN + R on your computer keyboard, type cmd in the pop-up window, hit ENTER, then copy & paste this command (paste by right-clicking the command prompt window): cd C:\Flashtool\x10flasher_lib. Then type adb shell and hit ENTER again.​10. Execute the following commands one-by-one (you can copy & paste, hit enter, and wait for the output):
Code:
umount /storage
parted /dev/block/mmcblk0
print
These commands unmount all drives, launch parted utility for mmcblk0 (onboard flash storage), and show the partition table.​11. Record the beginning of the partition Userdata and the end of the partitionSDCard. These are the limits of your new partitions The numbers are in megabytes (MB) unless specified.
For Xperia T/TL, Userdata begins at 1621 and SDCard ends at 15.6GB. Xperia V (and any other device with less than 16GB of storage) will definitely have a different value.​
12. Remove the last 2 partitions by executing the following commands:
Code:
rm 14
rm 15
13. Calculate the new end point for Userdata, which is also the new start point for SDCard:
1621 (or another number you recorded in step 11) + additional space = new end. I added 4GB (4 ×1024MB = 4096MB) so my new end point was 7865. I advise to add at least 2GB (2048MB) to feel safe about having enough storage for apps. DON'T TRY TO REMOVE SDCARD ALTOGETHER BY ALLOCATING ALL OF THE AVAILABLE SPACE TO USERDATA! Emulated storage is coded into OS environment and requires additional modifications to work properly.​14. Create and name new partitions by executing the following commands (don't copy the text in parentheses):
The system might throw several errors in the process. When prompted, just type ignore and hit ENTER.​
Code:
mkpartfs logical ext2 1621 7865 (change the numbers as appropriate for your device)
name 14 Userdata
mkpartfs logical ext2 7865 15.6GB (change the numbers as appropriate for your device and notice the GB to make sure the partition extends to the end of the onboard storage)
name 15 SDCard
quit
These commands create the partitions with ext2 file system and given beginning and end parameters, rename them as required, and close parted.​15. "Damage" the internal, emulated SD card so that it could be formatted properly later.
Tap Mounts and storage -> Format /storage/sdcard0 -> default and confirm the operation.​16. Insert the physical SD card (sdcard1) that you removed in step 2 back into the device.
Make sure it's mounted by tapping Mounts and storage and checking its status (it should say unmount /storage/sdcard1/). If not, mount it by tapping on the appropriate option.​17. Execute the following commands one-by-one in the ADB command prompt:
Code:
cd /storage/sdcard1/fs-utils (the directory name will be different if you didn't follow my conventions)
tune2fs -j /dev/block/mmcblk0p14
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14
e2fsck -fpDC0 /dev/block/mmcblk0p14
These commands convert Userdata partition into the appropriate ext4 filesystem, which is not supported natively in the recovery environment.​18. Reboot the device into full Android.
18.1 Remove the physical SD card for safety.
18.2 Tap Back until you make it to the top level of recovery. Then tap the top option Reboot the device.​19. When Android loads fully, you'll notice a notification about storage file system. Tap it and follow the prompts to format it.
20. Insert the physical SD card and reboot into the recovery you used to create the backup in step 2 to restore it.
In PhilZ, that's Backup and Restore -> Restore from /storage/sdcard1.​21. Reboot back into full Android and copy the files saved from internal storage back into it. Then reboot again so that apps recognize the data.
DONE!​
Short guide/list of ADB commands and other events (*enclosed in asterisks*) if you know the safety drill:
Code:
*flash 4.1.2 & install dual recovery*
*boot into PhilZ Touch*
adb shell
umount /storage
parted /dev/block/mmcblk0
print
*record start point of Userdata and end point of SDCard*
rm 15
rm 14
mkpartfs logical ext2 1621 7865
name 14 Userdata
mkpartfs logical ext2 7865 15.6GB
name 15 SDCard
*Mounts and storage -> Format /storage/sdcard0 -> default -> confirm*
*insert physical SD card*
*Mounts and storage -> Mount /storage/sdcard1*
cd /storage/sdcard1/fs-utils
tune2fs -j /dev/block/mmcblk0p14
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p14
e2fsck -fpDC0 /dev/block/mmcblk0p14
*remove physical SD card*
*reboot*
*format emulated SD card*
*reboot recovery*
*restore backup*
*reboot*
*restore sdcard0/*
*reboot*
nice, i was looking for a way to increase the /data after switching to Omni and ART
Will try ASAP..
PS: i think this thread should be added in ALL IN ONE THREAD Section:good::victory::victory::victory:
raghulrr said:
PS: i think this thread should be added in ALL IN ONE THREAD Section
Click to expand...
Click to collapse
That's a request to @gregbradley.
#6 would be the most welcomed way to resize partitions, but unfortunately it's not so easy as it was e.g. with ZTE Blade. But altogether it's good to know that you can resize them now! Thanks!
nice tutorial brother... i'll be trying tommorow
Sent from S5J using Tapatalk
Thanks
Thank you I was definetly looking for it
Thanks
@TO: I couldn't test ist but I think made a little mistake:
I think you want want to execute the programms wich are in the Directory in wich you made the cd. So you have to add ./ before each command.
I don't have such a device, to test it by myself: You said you have to make a new virtual SD. Some ROMes have a vold.fstab in /etc. Mayby it't enough to change this file to be able to remove the SD Partition completly.
Partitionator said:
@TO: I couldn't test ist but I think made a little mistake:
I think you want want to execute the programms wich are in the Directory in wich you made the cd. So you have to add ./ before each command.
I don't have such a device, to test it by myself: You said you have to make a new virtual SD. Some ROMes have a vold.fstab in /etc. Mayby it't enough to change this file to be able to remove the SD Partition completly.
Click to expand...
Click to collapse
I was writing the guide as I was executing commands so everything is exactly as I entered it. I obviously removed all steps that turned out to redundant and wrong.
Will that work with the Xperia Arc S?!
What is the difference between your method and the [MOD]{CM10.1}{CM10.2}{CM11}{AOSP}Working Int2Ext for Xperia 2011 [ART-compatible]?
metaljoker said:
Will that work with the Xperia Arc S?!
What is the difference between your method and the [MOD]{CM10.1}{CM10.2}{CM11}{AOSP}Working Int2Ext for Xperia 2011 [ART-compatible]?
Click to expand...
Click to collapse
These are some great questions! This approach is very different from all Int2Ext scripts:
HUGE NOTE: This works only for devices where the onboard NAND capacity is at least 8GB. That means that 2011 devices with 1-4GB of onboard memory are better off with mounting the physical SD card as /data.
This is a semi-permanent modification to the partition table (it'll work fine if you do factory reset and flash a new ROM .zip but the allocation will be reset every time you flash FTF, possibly even if you exclude partition-image because each .sin contains its offset and size bits).
This approach is compatible with locked bootloaders because support of init.d comes from the kernel.
This approach allows you to allocate as much or as little of onboard NAND storage to each of the 2 partitions (/data and /storage/sdcard0) used for storing apps and their data instead of just allocating the entire physical SD card.
This approach allows you to live a life independent of your physical SD card (i.e., your apps still work and your phone boots up just fine even if the physical SD card dies).
bsined said:
These are some great questions! This approach is very different from all Int2Ext scripts:
HUGE NOTE: This works only for devices where the onboard NAND capacity is at least 8GB. That means that 2011 devices with 1-4GB of onboard memory are better off with mounting the physical SD card as /data.
This is a semi-permanent modification to the partition table (it'll work fine if you do factory reset and flash a new ROM .zip but the allocation will be reset every time you flash FTF, possibly even if you exclude partition-image because each .sin contains its offset and size bits).
This approach is compatible with locked bootloaders because support of init.d comes from the kernel.
This approach allows you to allocate as much or as little of onboard NAND storage to each of the 2 partitions (/data and /storage/sdcard0) used for storing apps and their data instead of just allocating the entire physical SD card.
This approach allows you to live a life independent of your physical SD card (i.e., your apps still work and your phone boots up just fine even if the physical SD card dies).
Click to expand...
Click to collapse
That's a great info! There are steps in the thread that aren't clear enough not only for me but also for others, that's for sure.
For those who have partitioned their SDcard, unlocked BL & rooted phones, should have their own line of steps, however I feel like I might mistake something in case I use it.
P.S.:
01. You didn't answer my question whether this is compatible with my phone, did you?!
02. There should be a video demonstration for this method for it is new in this website, don't you think?!
03. unzip to a location on your phone's physical SD card you'll remember (say, fs-utils\) what do you mean by remember "say, fs-utils\" ??
@up
It depend on your partition scheme, which ones are on the end of memory (physical).
Wysłane z mojego GT-I8160 przy użyciu Tapatalka
batlin said:
@up
It depend on your partition scheme, which ones are on the end of memory (physical).
Wysłane z mojego GT-I8160 przy użyciu Tapatalka
Click to expand...
Click to collapse
I have a 1GB partitioned SDcard for the apps! Does this info help?!
How the heck could I install the TeamWin Recovery Project (TWRP) ??!!
metaljoker said:
That's a great info! There are steps in the thread that aren't clear enough not only for me but also for others, that's for sure.
For those who have partitioned their SDcard, unlocked BL & rooted phones, should have their own line of steps, however I feel like I might mistake something in case I use it.
P.S.:
01. You didn't answer my question whether this is compatible with my phone, did you?!
02. There should be a video demonstration for this method for it is new in this website, don't you think?!
03. unzip to a location on your phone's physical SD card you'll remember (say, fs-utils\) what do you mean by remember "say, fs-utils\" ??
Click to expand...
Click to collapse
SD partitioning and status of the bootloader should not have any effect on the process. However, root is required in order to install recovery.
1. Theoretically, this mod is compatible with any device that has the latest version of CWM or TWRP. I've tested it with Xperia TL and Nook Tablet 16GB. However, if your device's total available user storage (/data + /storage/sdcard0) is 4GB or less, you will likely require a physical SD card for storing your apps, user data, and whatever is written to sdcard0 by default.
2. Although I realize that some people learn best by watching instead of reading, this procedure is very quick when your device's recovery supports all the required commands. I repartitioned Nook Tablet in barely 10 minutes. If I were to make a screen cast of it, 90% of the video would be just moving the mouse around or waiting for the phone to boot. The longest operation is to create the journal, which takes about 10 seconds by the phone.
3. "Say" = "for example". Create a folder on the physical SD card and call it "fs-utils".
bsined said:
SD partitioning and status of the bootloader should not have any effect on the process. However, root is required in order to install recovery.
1. Theoretically, this mod is compatible with any device that has the latest version of CWM or TWRP. I've tested it with Xperia TL and Nook Tablet 16GB. However, if your device's total available user storage (/data + /storage/sdcard0) is 4GB or less, you will likely require a physical SD card for storing your apps, user data, and whatever is written to sdcard0 by default.
2. Although I realize that some people learn best by watching instead of reading, this procedure is very quick when your device's recovery supports all the required commands. I repartitioned Nook Tablet in barely 10 minutes. If I were to make a screen cast of it, 90% of the video would be just moving the mouse around or waiting for the phone to boot. The longest operation is to create the journal, which takes about 10 seconds by the phone.
3. "Say" = "for example". Create a folder on the physical SD card and call it "fs-utils".
Click to expand...
Click to collapse
WOW! I am very impressed for answering each question in an informative way! W E L L D O N E! ! :good:
I'll take my chances since I've read your lines. Wish me luck!
I'll get back to you once I encounter the unexpected, or maybe not. We'll see! Here goes nothing...
metaljoker said:
WOW! I am very impressed for answering each question in an informative way! W E L L D O N E! ! :good:
I'll take my chances since I've read your lines. Wish me luck!
I'll get back to you once I encounter the unexpected, or maybe not. We'll see! Here goes nothing...
Click to expand...
Click to collapse
I realized that I've forgotten to include roll-back instructions if anything goes wrong. Here's the short version:
1. You better have made Nandroid backup of your system and have copied the content of your /storage/sdcard0
2. Find a stock, rootable FTF on the forums, download it, and flash it using Flashtool
3. Install recovery on the reflashed device
4. Restore backup from recovery and copy the content back to /storage/sdcard0
ADB Shell
Sorry if this silly questions
I want use your mod on my XV, but I've some problem (on Windows 8.1 Pro 64bit)
1. When I reboot from PhilZ Touch recovery for a first time, i don't get root question
2. Cause i don't get about root question, so i try root from PhilZ Touch recovery menu
3. When I try run adb shell on TWRP recovery, there no device notif (I already install Windows Update : http://support.microsoft.com/kb/2917929 and use Flashtool Driver 1.5)
So, am i mis something? Where i got wrong? Thanks before
thunder888 said:
Sorry if this silly questions
I want use your mod on my XV, but I've some problem (on Windows 8.1 Pro 64bit)
1. When I reboot from PhilZ Touch recovery for a first time, i don't get root question
2. Cause i don't get about root question, so i try root from PhilZ Touch recovery menu
3. When I try run adb shell on TWRP recovery, there no device notif (I already install Windows Update : http://support.microsoft.com/kb/2917929 and use Flashtool Driver 1.5)
So, am i mis something? Where i got wrong? Thanks before
Click to expand...
Click to collapse
I guess is the problem is with Win8 and ADB drivers. However, just to be sure, try attaching the phone to the computer to test ADB when it's booted to PhilZ and full Android. If the phone is not recognized, search the forum for a fix (there should be one). Unfortunately, my only Win8 machine is Surface RT, which doesn't accept ADB drivers, so I can't test anything myself.
bsined said:
I guess is the problem is with Win8 and ADB drivers. However, just to be sure, try attaching the phone to the computer to test ADB when it's booted to PhilZ and full Android. If the phone is not recognized, search the forum for a fix (there should be one). Unfortunately, my only Win8 machine is Surface RT, which doesn't accept ADB drivers, so I can't test anything myself.
Click to expand...
Click to collapse
Yes, i agree. But if I attach phone at full Android and run ADB, it can be recognized. I'll reinstall my windows and will give a report later. Thanks :good:
My dearest friend...
My phone was revered back to original. In order to have it rooted it took me 17 hours
1] Regarding the "Flash your phone with basic" my phone's already rooted which means that I do not need to flash an FTF file. In case I need to, which version?! Would that harm anyhow?
2] I'm stopped at 6.5. Because I do not have the TWRP installed on my phone.
3] My Recovery is CWM-based Recovery v6.0.4.7, if no problem then how can I Start ADB?!!!
Obviously, I'm not even half way. I need your help my friend!
* Xperia Arc S

lg l90 405 is believed to be 410 dual sim

hi to all guys, I would like to draw your attention to what happened to me, and possibly know how to restore.
I am owner of a lg l90 model d405n, wanting to unlock the bootloader I used an application that I would have to just unlock the bootloader and install a modified recovery.
Actually 'cell after this hack is pretty much dead, he would not turn either.
I started looking for various tools and various programs in vain, the cell showed no signs of life.
Then, now giving it up for lost, I tried to go for broke, I low-level formatted, and then with an application (umbrick) I could flesciare boot and everything else. Now the cell was lit and was also in mode 'upgrade download.
I downloaded the firmware of KDZ 405 and I tried to use flash tool but the procedure is always blocked to 2%, giving an error.
With the tool of 'LG blatantly that I discovered the phone was identified as d410, exhausted by the various trials do not go into port I wanted to download the KDZ model 410d and, as if by magic, flash tool worked! I installed the latest version and the phone works wonders!
So now I have a cell phone with firmware that is not his (among other things the 410d is also dual sim).
I would like to restore its system orifginale, that of the 405, but I'm afraid to do other **** ....
I hope someone can help me out
sebasrul21 said:
hi to all guys, I would like to draw your attention to what happened to me, and possibly know how to restore.
I am owner of a lg l90 model d405n, wanting to unlock the bootloader I used an application that I would have to just unlock the bootloader and install a modified recovery.
Actually 'cell after this hack is pretty much dead, he would not turn either.
I started looking for various tools and various programs in vain, the cell showed no signs of life.
Then, now giving it up for lost, I tried to go for broke, I low-level formatted, and then with an application (umbrick) I could flesciare boot and everything else. Now the cell was lit and was also in mode 'upgrade download.
I downloaded the firmware of KDZ 405 and I tried to use flash tool but the procedure is always blocked to 2%, giving an error.
With the tool of 'LG blatantly that I discovered the phone was identified as d410, exhausted by the various trials do not go into port I wanted to download the KDZ model 410d and, as if by magic, flash tool worked! I installed the latest version and the phone works wonders!
So now I have a cell phone with firmware that is not his (among other things the 410d is also dual sim).
I would like to restore its system orifginale, that of the 405, but I'm afraid to do other **** ....
I hope someone can help me out
Click to expand...
Click to collapse
Did you still have your stock bootloader backup?
neverdies said:
Did you still have your stock bootloader backup?
Click to expand...
Click to collapse
unfortunately no
Stock bootloader (aboot and abootb) can be retrieved from your model KDZ. Every partition, except modemst1 & 2 can be re-flashed from the KDZ.
But the bootloader alone won't do anything, you must flash the entire bootstack of D405n, enter in Donwload Mode again and LG Flash Tool will allow you to flash the entire KDZ again in Emergency Mode without errors.
If you IMEI was lost or changed, it can be restored with other programs after.
F. Gacrux said:
Stock bootloader (aboot and abootb) can be retrieved from your model KDZ. Every partition, except modemst1 & 2 can be re-flashed from the KDZ.
But the bootloader alone won't do anything, you must flash the entire bootstack of D405n, enter in Donwload Mode again and LG Flash Tool will allow you to flash the entire KDZ again in Emergency Mode without errors.
If you IMEI was lost or changed, it can be restored with other programs after.
Click to expand...
Click to collapse
I thank you for the reply but unfortunately being very inexperienced I would need a guide more ' detailed . Excuse my English ( Google translation )
sebasrul21 said:
I thank you for the reply but unfortunately being very inexperienced I would need a guide more ' detailed . Excuse my English ( Google translation )
Click to expand...
Click to collapse
the premise that no sd card , I have to flash aboot ? adb push aboot.bin ? what are the steps for not briccarlo again ?
sebasrul21 said:
I thank you for the reply but unfortunately being very inexperienced I would need a guide more ' detailed . Excuse my English ( Google translation )
Click to expand...
Click to collapse
Answer so I can give you the proper response :
- Rooted?
- Unlocked bootloader?
- Custom recovery (twrp)?
- Variant model and country.
- Carrier model (if yes, which carrier)?
F. Gacrux said:
Answer so I can give you the proper response :
- Rooted?
- Unlocked bootloader?
- Custom recovery (twrp)?
- Variant model and country.
- Carrier model (if yes, which carrier)?
Click to expand...
Click to collapse
rooted yes
unlock bootloader I think not , how does a SEE?
custom recovery no
the phone is a lg d405n but now has become lg d410 dual sim version sw v20 - op1 - hq version Android 5.0.2 Italy no carrier
There is no way to know if the bootloader is unlocked, unless you make aboot partition image and hash check to compare with the original bootloader.
You have first to flash the hacked bootloader (aboot), since you don't know if it's unlocked, it won't hurt to flash again.
First enable USB debugging, at this point I assume you know how to do this.
Download the hacked aboot for D405n v20a:
http://www.mediafire.com/download/bn39rz7ojtosqm3/D405n_v20a_patched_aboot.zip (taken from this thread: http://forum.xda-developers.com/lg-l90/development/recovery-twrp2-7-1-0lgl90w7xxshoxx-t2826150)
Extract the zip and copy aboot.bin to the root of your sdcard. Open android terminal ou adb, take su permission and allow it on your phone screen, flash the hacked bootloader with:
If you copied to the external microSD: dd if=/storage/external_SD/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot
If you copied to the internal sd: dd if=/sdcard/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot
Now flash custom recovery. Download http://forum.xda-developers.com/devdb/project/dl/?id=13334 (taken from the same thread).
Copy TWRP_2.8.7.0_270615_L90.img to the root of your sdcard. To make things easier, rename it to recovery.img. Take su permission and flash with adb or android terminal with:
If you copied to the external microSD: dd if=/storage/external_SD/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
If you copied to the internal sd: dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Now reboot into twrp custom recovery, you can either send reboot recovery command in adb shell or terminal, or with your phone off, hold VOL - and PWR button, when lg logo appears, release and hold PWR button again until a blank screen appears, select YES twice (navigate with VOL buttons and PWR to select). Since now you are on custom recovery, twrp will boot instead a factory reset routine.
Download your D405n bootstack: https://www.androidfilehost.com/?fid=24052804347759484 (taken from this thread: http://forum.xda-developers.com/lg-l90/development/bootstack-kk-l-l90-t3118632)
Copy to your sdcard (do not extract the file). In TWRP recovery, select INSTALL and flash the zip.
Download your italy D405n v20a lollipop kdz: http://csmgdl.lgmobile.com/dn/downloader.dev?fileKey=FW932KU032N9A1T29B55QPQ/D405n20a_00.kdz
Follow this thread to flash with LG Flash Tool (if you already have usb drivers installed, start at step 5): http://forum.xda-developers.com/lg-l90/general/guide-flash-stock-kdz-offline-lg-l90-t2803479
If you face force closes after the first boot, do a factory reset (VOL- and PWR button, like I described before, but since now you are all stock, factory reset will be applied).
Now you are 100% on your italy d405n v20a lollipop.
F. Gacrux said:
There is no way to know if the bootloader is unlocked, unless you make aboot partition image and hash check to compare with the original bootloader.
You have first to flash the hacked bootloader (aboot), since you don't know if it's unlocked, it won't hurt to flash again.
First enable USB debugging, at this point I assume you know how to do this.
Download the hacked aboot for D405n v20a:
http://www.mediafire.com/download/bn39rz7ojtosqm3/D405n_v20a_patched_aboot.zip (taken from this thread: http://forum.xda-developers.com/lg-l90/development/recovery-twrp2-7-1-0lgl90w7xxshoxx-t2826150)
Extract the zip and copy aboot.bin to the root of your sdcard. Open android terminal ou adb, take su permission and allow it on your phone screen, flash the hacked bootloader with:
If you copied to the external microSD: dd if=/storage/external_SD/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot
If you copied to the internal sd: dd if=/sdcard/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot
Now flash custom recovery. Download http://forum.xda-developers.com/devdb/project/dl/?id=13334 (taken from the same thread).
Copy TWRP_2.8.7.0_270615_L90.img to the root of your sdcard. To make things easier, rename it to recovery.img. Take su permission and flash with adb or android terminal with:
If you copied to the external microSD: dd if=/storage/external_SD/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
If you copied to the internal sd: dd if=/sdcard/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Now reboot into twrp custom recovery, you can either send reboot recovery command in adb shell or terminal, or with your phone off, hold VOL - and PWR button, when lg logo appears, release and hold PWR button again until a blank screen appears, select YES twice (navigate with VOL buttons and PWR to select). Since now you are on custom recovery, twrp will boot instead a factory reset routine.
Download your D405n bootstack: https://www.androidfilehost.com/?fid=24052804347759484 (taken from this thread: http://forum.xda-developers.com/lg-l90/development/bootstack-kk-l-l90-t3118632)
Copy to your sdcard (do not extract the file). In TWRP recovery, select INSTALL and flash the zip.
Download your italy D405n v20a lollipop kdz: http://csmgdl.lgmobile.com/dn/downloader.dev?fileKey=FW932KU032N9A1T29B55QPQ/D405n20a_00.kdz
Follow this thread to flash with LG Flash Tool (if you already have usb drivers installed, start at step 5): http://forum.xda-developers.com/lg-l90/general/guide-flash-stock-kdz-offline-lg-l90-t2803479
If you face force closes after the first boot, do a factory reset (VOL- and PWR button, like I described before, but since now you are all stock, factory reset will be applied).
Now you are 100% on your italy d405n v20a lollipop.
Click to expand...
Click to collapse
thank you so much I immediately start work hoping to do no harm
sebasrul21 said:
thank you so much I immediately start work hoping to do no harm
Click to expand...
Click to collapse
perdona un altra cosa, io in questo momento non uso schede microsd, come cambia questa: "if you copied to the external microSD: dd if=/storage/external_SD/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot
If you copied to the internal sd: dd if=/sdcard/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot"
sebasrul21 said:
perdona un altra cosa, io in questo momento non uso schede microsd, come cambia questa: "if you copied to the external microSD: dd if=/storage/external_SD/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot
If you copied to the internal sd: dd if=/sdcard/aboot.bin of=/dev/block/platform/msm_sdcc.1/by-name/aboot"
Click to expand...
Click to collapse
forgive one other thing , I do not at this time use cards microSD , as changes this
I gave you the two options, to copy the necessary files to microSD or internal memory, and what part you didn't understand?
If you don't use microSD, you must use the internal SD command (If you copied to the internal sd: dd if=/sdcard/... etc).
In android, both storage is called SD, the internal one that comes with the phone is the internal SD (sdcard0, media, sdcard, etc), the other one that you stick in the phone is the external SD (external_SD).
sebasrul21 said:
thank you so much I immediately start work hoping to do no harm
Click to expand...
Click to collapse
I run everything perfectly but in the end , When I go to run the flash tool gives me Error
"upgrade because of error ...
lg mobile support tool detects : sw : D41020A LG V500 version sw : V50020F are AVAILABLE agggiornamenti :crying:
sebasrul21 said:
I run everything perfectly but in the end , When I go to run the flash tool gives me Error
"upgrade because of error ...
lg mobile support tool detects : sw : D41020A LG V500 version sw : V50020F are AVAILABLE agggiornamenti :crying:
Click to expand...
Click to collapse
flash tool: Wait until software extraction is complete. stop
sebasrul21 said:
flash tool: Wait until software extraction is complete. stop
Click to expand...
Click to collapse
continues to be invecie 410 of 405
upgrade stopped due to an error
This is not possible. If you flashed D405n bootstack, there is no way LG Flash Tool recognize your phone as D410.
Are you running the LG Flash Tool mod or the official LG Mobile Support Tool? Are you using Download Mode set to Emergency?
On Read Phone Information, you don't need to run it (sometimes it hangs), and click on Clear phone Software update Registry on Select Country % Language Window.
Also check if the KDZ you downloaded is not corrupted. It's a common error the flash tool fail because the kdz is corrupted.
F. Gacrux said:
This is not possible. If you flashed D405n bootstack, there is no way LG Flash Tool recognize your phone as D410.
Are you running the LG Flash Tool mod or the official LG Mobile Support Tool? Are you using Download Mode set to Emergency?
On Read Phone Information, you don't need to run it (sometimes it hangs), and click on Clear phone Software update Registry on Select Country % Language Window.
Also check if the KDZ you downloaded is not corrupted. It's a common error the flash tool fail because the kdz is corrupted.
Click to expand...
Click to collapse
unfortunately so I assure you , I used the flash tool set to emergency and it always fails with the KDZ 405 , invecie loading the KDZ 410 installs easily
sebasrul21 said:
unfortunately so I assure you , I used the flash tool set to emergency and it always fails with the KDZ 405 , invecie loading the KDZ 410 installs easily
Click to expand...
Click to collapse
I followed step by step your guide, a KDZ files are not corrupt , I have tried several of the 405 does not work and no one , instead the KDZ 410 works .
The IMEI is zero

[Guide] Repartition internal storage to get more space on /data

**DISCLAIMER**
**I WILL NOT BE RESPONSIBLE IF YOUR PHONE DIES.**
**PROCEED AT YOUR OWN RISK**
**IF YOU MESS UP, USE SP FLASH TOOLS TO FLASH ROM IN THE FORMAT ALL+ DOWNLOAD MODE**
A lot of space in the internal storage in sprout4 devices is wasted. This will give you a bit more space in userdata. I put this guide in Android One General, but this will apply to most devices. At least to those devices that use GPT partitions like the Sprouts do.
Requirements:
An Android device (duh)
TWRP Materialized by musfiqus, from here: http://forum.xda-developers.com/cro...p-materialised-twrp-recovery-android-t3088715 It includes the Parted binary. Some other builds of TWRP don’t have that. You need it.
Something resembling intelligence
Patience
A PC (Windows , Linux, Mac, whatever) is optional. The instructions here use a PC, but if you don’t have one, you can type commands in TWRP terminal).
ADB drivers, if you’re using a PC.
A hardware calculator. Using an on-screen calculator so many times is going to get you to go Hulk.
Here’s how to do it.
Reboot to TWRP recovery, and open a terminal / Command Prompt. Take a backup of IMEI.
Type:
adb shell
You’ll get a screen like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Type :
parted /dev/block/mmcblk0
By default, Parted uses MB as the storage unit. To prevent possible unused space after repartitioning, we’ll use sectors as a unit instead.
Type
unit s
This’ll change to sectors.
Type
print
It’ll give a warning, just type
i
Then:
print free
At the top, you’ll see that the sector size is written. Write this number down somewhere. For my Android One 4GB, the sector size is 512 bytes.
Now, you need to understand what the list means. Each horizontal row shows the details of a partition.
The 1st column shows the partition number.
The 2nd column shows the start offset of that partition. That means that the partition starts at the location mentioned.
The 3rd column shows where the partition ends. Notice that each partition starts exactly 1 sector after the previous one ends.
The 4th column is obviously the size of the partition.
The 5th column is the file system used by the partition. If nothing is written in this column, that means that it’s a binary partition.
The 6th column is the partition name.
You’ll see that the sizes in that list are weird. They’re not in any standard unit you might know. That’s because we used sectors instead of megabytes. The ‘s’ after each number indicates that it’s in sectors. (You can use the default MB unit (1MB=1000 KB. 1KB=1000bytes), or the MiB unit (1MiB=1024 KiB), but that just might leave 1 or 2 MB of space unused. So, I’m using sectors).
Remember that 1 sector = 512 bytes for my phone.
There’s some free space at the top and bottom of the list. Leave that free space there. Do not make partitions using those.
To convert sectors to MiB or KiB:
1s = 512bytes (Use the sector size you wrote down previously for this step, it might not be 512 bytes for you)
1024 bytes = 1 KiB
1024 KiB = 1 MiB
1024 MiB = 1GiB
So, 4833280s = (4833280 x 512) B = 2474639360 B
= (2474639360 / 1024) KiB = 2416640 KiB
= (2416640 /1024) MiB = 2360 MiB
= (2360 / 1024) GiB = 2.30 GiB
We’ll use another terminal window with sizes in MiB now. So open another Parted prompt in a new terminal / command prompt window, but instead of
unit s,
this time, write
unit MiB
Type “print”, “i”, and “print free” again.
Look at my 11th partition. Its size is 8MiB. I know that this logo partition doesn’t need more than 2 MiB. So, I’ll make it smaller.
When you make partitions smaller, all the data inside will be lost. So, we need to back up the partitions first.
Open a 3rd terminal window. Type
adb shell dd if=/dev/block/mmcblk0p11 of=/microSD/p11
The “dd” command copies bytes from the “if=” location, to the “of=” location. The internal storage is /dev/block/mmcblk0. The “p11” after that refers to the partition we are backing up. Notice that in the Parted list, “logo” has a partition number of “11”. So the general command to back up partitions is
adb shell dd if=/dev/block/mmcblk0p<partition_number> of=/microSD/p<partition_number>
From recovery, unmount all partitions except microSD and oem. Then back up partitions 11, and 13 from PC. We will copy the files from OEM instead of using dd. So type
adb shell mkdir /microSD/oem
adb shell cp –a /oem/ /microSD/oem
Go to /microSD/oem/oem/app with TWRP’s file manager, and delete everything there.
Open the 1st terminal with sizes in sectors.
Type
rm 11
This will delete the oem partition. Type
print free
Partition 11 has been replaced with free space. Let’s make the Logo partition 2MiB. 2MiB = 4096s. The start sector is 113920, so the end sector needs to be (113920 + 4096 - 1) = 118015.
The command to create partitions is:
mkpart <name> <start_sector> <end_sector>
name <partition_number> < name>
So, type:
mkpart logo 113920s 118015s
name 11 logo
Some free space has appeared below logo. If you type “print free” on the 2nd terminal, with units set to MiB,
You’ll see that logo is now only 2 MiB, and an extra 6 MiB of free space is available. Also, oem takes 64 MiB. Open the 3rd terminal, from which you took backups, and type
adb shell df /oem
Divide the number under “used” with 1024. That’ll tell you how much space is being used. My oem partition is 64 MiB, but it’s only using about 6MiB. Typical. Not all space in the partition is available for file storage, so I’ll make the oem partition 11 MiB.
Unmount oem from recovery. Open the 1st terminal window, with sizes in sectors.
Type
rm 12
print free
11MiB = 22528s. new End size will be (118016 + 22528 - 1)s = 140543s
Type
mkpart oem 118016s 140543s
name 12 oem
Look at the 1st partition listing in this post. Oem had a ext4 file system. Open the 3rd terminal window. Type:
adb shell make_ext4fs /dev/block/mmcblk0p12
This will make an ext4 file system. Type “print free” in the MiB terminal. Things look good. Copy back the contents of oem. Mount oem from recovery, and type:
adb shell cp -a /microSD/oem/oem/* /oem/
If you get out of space errors, delete oem, and make it a bit larger. Now type:
adb shell chown root:root /oem/oem.prop
adb shell chmod 644 /oem/oem.prop
This will fix permissions of oem.prop.
I won’t change sizes of partition 13. So I’ll make it occupy 33536s from location 140544s. End sector will be (134400 + 33536 – 1)s = 174079s. So do it like the last two times. If you want to change the size of system, read my next post below first. I suggest that you keep the size of system intact. So, delete system, make it again just after expdb, and make an ext4 file system in it, like you did for oem.
Cache is about 128MiB big, but you just need it to be 5MiB. Any more is a waste. Delete cache, make it again right below system, with a size of 5MiB, and make an ext4 file system in it. This is what my partition table looks like after doing that.
So, after all that insanity, I just gained a tiny 182MiB of space. I’m not sure about the gen partition, and metadata is apparently used for encrypting data, so I’ll leave those two untouched. In my screenshots, userdata doesn’t have any file system, but that’s because I just unlocked my bootloader. Userdata is usually ext4. So, I’ll delete userdata,
and make userdata again. No need to calculate the end size again, as userdata will occupy all the free space, start sector will be 2232320s and end sector will be 7438335s. Then put an ext4 file system on userdata,
and done!
Now restore the partition 11 and 13 backup. If partition 11 gives an error, just ignore it.
dd if=/microSD/p11 of=/dev/block/mmcblk0p11
dd if=/microSD/p13 of=/dev/block/mmcblk0p13
Now reboot recovery, flash a new rom, restore IMEI, and reboot. Read the next post to get more space.
Reserved
Nice thread dude, though awesome tutorial
error
daemon started successfully P*
error: device not found
error: device not found
you think one is gonna take such a big risk of repartitioning for little more space?
yash sharma100 said:
you think one is gonna take such a big risk of repartitioning for little more space?
Click to expand...
Click to collapse
you think people will not get irritated by quoting such big post?
prazool007 said:
daemon started successfully P*
error: device not found
error: device not found
Click to expand...
Click to collapse
Install adb drivers for your phone. You need both adb itself and the drivers. Get it here http://forum.xda-developers.com/showthread.php?t=2588979
nice tutoriol but have you tried it
Yes, many times.
Great tutorial.
Just a little question. I'm sprout8 users, but i use sprout 4 rom. And in sprout4, the default data storage is on external memory (SDCard). The internal memory (userdata) is hidden (on rooted device, i can acces it in data/media/0/)
I think is a waste of space just to let 5.75 GB space only to be hidden.
the question: Can i convert the user data partition to make the system partition a little bigger?
Shybet said:
Great tutorial.
Just a little question. I'm sprout8 users, but i use sprout 4 rom. And in sprout4, the default data storage is on external memory (SDCard). The internal memory (userdata) is hidden (on rooted device, i can acces it in data/media/0/)
I think is a waste of space just to let 5.75 GB space only to be hidden.
the question: Can i convert the user data partition to make the system partition a little bigger?
Click to expand...
Click to collapse
Yes, definitely. Just delete userdata, then make it again with a smaller size, delete system, and put the free space in system. Then make the ext4 volumes on them.
will it be possible to give a flashable zip that will do the same as its a very risky process and my device cant be recovgnized in sp tools
1) I had intended to make a flashable zip. But I was too lazy to make one. I'll make it soon.
2) A flashable zip might actually be more risky than this manual method.
3) Unlock your phone's bootloader, and install MTK Vcom drivers, then SP Flash will recognize it.
How to backup IMEI?
Hi. Sorry if this is a noob question. In the article, the first and last steps are to backup/recover the IMEI. Is this done by backing up the "nvram" partition?
ex (backup):
adb shell dd if=/dev/block/mmcblk0p2 of=/microSD/nvram.img
adb pull /microSD/nvram.img
ex (restore):
adb push nvram.img /microSD
adb shell dd if=/microSD/nvram.img of=/dev/block/mmcblk0p2
or is there more to it than that?
Great tutorial!
But how do I restore everything back to normal?
Should I undo the steps or just restoring a TWRP Backup will do?
After I boot in TWRP it says error: "no devices/emulators found". Can you please help me ? I love my cheap phone , I just want to make the system partition a little larger so that I can add some extra apps
actyon20 said:
After I boot in TWRP it says error: "no devices/emulators found". Can you please help me ? I love my cheap phone , I just want to make the system partition a little larger so that I can add some extra apps
Click to expand...
Click to collapse
It says that on PC? That probably means that you didn't install the ADB drivers. Google for "Minimal ADB XDA", and download it from there. Then it should work.
If not, run all the commands in this post from TWRP - > Advanced - > Terminal (no need for PC).
By the way, a larger data partition = more user apps (from Play Store, etc). Larger system = more system apps (not usually needed).
CSAkshay said:
Great tutorial!
But how do I restore everything back to normal?
Should I undo the steps or just restoring a TWRP Backup will do?
Click to expand...
Click to collapse
To undo, you can just flash with SP Flash using the format + download mode.
However, many devices have been getting bricked by SP Flash lately. So I suggest repeating the steps in this post, but use the original offsets and sizes. That will also undo it.
wb407 said:
Hi. Sorry if this is a noob question. In the article, the first and last steps are to backup/recover the IMEI. Is this done by backing up the "nvram" partition?
ex (backup):
adb shell dd if=/dev/block/mmcblk0p2 of=/microSD/nvram.img
adb pull /microSD/nvram.img
ex (restore):
adb push nvram.img /microSD
adb shell dd if=/microSD/nvram.img of=/dev/block/mmcblk0p2
or is there more to it than that?
Click to expand...
Click to collapse
Actually, I'm not exactly sure.
It didn't work for me, so I had to use the IMEI fix zip from these forums to rewrite the IMEI.
out386 said:
It says that on PC? That probably means that you didn't install the ADB drivers. Google for "Minimal ADB XDA", and download it from there. Then it should work.
If not, run all the commands in this post from TWRP - > Advanced - > Terminal (no need for PC).
By the way, a larger data partition = more user apps (from Play Store, etc). Larger system = more system apps (not usually needed).
Click to expand...
Click to collapse
First of all , thanks a lot for the reply.
Second , yes , I tried that from pc with windows 10 64-bit.
My steps:
1. From my phone I enabled debugging.
2. I downloaded "android-sdk_r24.4.1-windows.zip" from //developer.android.com/studio/index. After I launch SDK Manager I installed:
*Android SDK Tools
*Android SDK Platform-Tools
*Google USB Drive
At Environment Variables at Path I added ;C:\android-sdk\tools;C:\android-sdk\platform-tools
When I type "adb" in cmd a long list appears.
3. I downloaded some "ADB Drivers_Updated" and I go in that folder , Open new cmd+shfit and I type "adb shell" and the next text appears ( without lines )
[email protected]_P4Life:/ $-----------------
BEFORE this you said that I must root in TWRP so I google it and I did the following steps :
1. Went in C:\android-sdk\platform-tools
2. Open new cmd+shift and I type "adb reboot recovery" the phone reboots and the next image appears:
//i.imgur.com/JLWdPXU.jpg
After this I'm lost because when I type abd shell in cmd it says "/no emulators found..."
I want to make a bigger partition for "system content apps" because even if I have ~5GB internal memory remaining I saw that there is a 1GB partition that when it's full (programs registry or I don't know what ) you can't install program anymore even if you have an empty SD card attached and the Default Write option in system is set to SD card.
Can you please help me ? This is my first time doing this and my phone is Allview P4 Life . I really like that cheap phone.

moto e4 plus owen xt1776 vram backup

could someone with this model run these and give me the images
dd if=/dev/block/platform/.../.../by-name/nvram of=/sdcard/nvram.img
dd if=/dev/block/platform/.../.../by-name/nvdata of=/sdcard/nvdata.img
suckme69 said:
Admin Note: This is a special Q&A-formatted thread. Please follow this link to view it in your browser: http://xda.tv/post75038379
Click to expand...
Click to collapse
I would, but those are not block partitions that can be pulled like that.
Sent from my Moto E (4) Plus using XDA Labs
i dont know the excact block but my imie wifi baseband and bluetooth do not work ans was told i flashed my nv ram wouldyou know how to repair this?
Those are not block partitions on this device. I think they are only on Mediatek devices and your XT1776 is Qualcomm. You should probably try flashing stock firmware with fastboot or RSDlite. Download the one with owens_sprint_7.1.1 in the title.
i have like 5 times and i get null imei
Try flashing this modem/fsg:
https://www.androidfilehost.com/?fid=962157660013069126
nope did nothing
https://youtu.be/I8V9ud4PGUk
thats how i been flashing because in windows 10 rsd lite dont work
You should thank me later !
Copy and paste.
Click Here ! #Post8
EDIT : i don't have that device anymore. so i can't help you with this. unable to remind the full directory name.
EDIT : Here is the correct path.
---- For MediaTek Variant ----
Nvram :
dd if=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvram of=/sdcard/nvram.img
Nvdata :
dd if=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/nvdata of=/sdcard/nvdata.img
---- For Qualcomm Variant ----
Nvram :
dd if=/dev/block/bootdevice/by-name/nvram of=/sdcard/nvram.img
Nvdata :
dd if=/dev/block/bootdevice/by-name/nvdata of=/sdcard/nvdata.img
They are not at that path on the Qualcomm variant. I'd post a screenshot if I could here.
drop here you device recovery.fstab data.
how do i get that?
https://github.com/ReimuHakurei/twrp_device_motorola_owens/blob/twrp/twrp.fstab
did anyone figure anything out?
Yes, your phone is probably basically a tablet now. When your problem started, what exactly did you do? Did you flash LineageOS or something without activating the phone on stock firmware first? Did you run any fastboot erase commands like fastboot erase recovery? If so, you should not ever do either of those. The only thing I can say to try, is to remove the sim card, flash stock firmware, boot the phone to the setupwizard and then power it off. Next re-insert the sim card and turn the phone back on. If you don't get it to connect now, or if you didn't activate it already, try calling your carrier customer service and see if they can help you.
In MediaTek, variant IMEI stored in Nvram partition (non-volatile random access memory). whereas in Qualcomm Variant it is stored in raw EFS, modemst1 & modemst2 partition. Probably you lose your device nvdata and it is of no use. Service center guy can fix this by replacing a small chip within the motherboard (in my case its *PCB*). After all this you will get a new imei number.
Hope this helps.
i flashed the files in the order my flash file said i generated the commands by hand because i could not find any on xda for my device
@suckme69 Try this, either with adb with the OS booted or with a terminal emulator on your device, type:
reboot nvbackup
With terminal emulator you'll have to type su then enter for su permissions. Hope this works!
thanks for your guys help but i finally figured it out for some reason my modem image from my sprint stock package i downloaded didn't work or i wrote the sequence wrong.but i decided to flash the partition package for boot on my sprint phone from getoffmylawns forum but it was giving my crashing for my phone ,phone has crashed but i got service!. so i opened up the boost flash package and got the modem image off there. after flashing my stock firmware package threw the boot-loader i then flashed the modem i pulled from the boost partition zip . i was also flashing threw Ubuntu with the rsd lite someone posted because rsd lite doesn't work with windows 10 .and the reason i decided to flash the boost package because well it was the same model phone and the carriers boost and sprint are the same they use the same towers and sprint owns boost so i saw no harm done.

nora mmcblk0 partition request pls

hello, i was making changes to my motoE5 and ended up doing nonsense. I ended up breaking my phone's partition and I can't flash any files via fastboot as I can't start custom ROMs or start twrp either. could someone with a good heart back up the mmcblk0 partition and send it so i can recover my phone? if you want to help me you can back up via the TWRP terminal using the following command:
dd if=/dev/block/mmcblk0 | gzip > /external_sd/mmcblk0.img.gz
Click to expand...
Click to collapse
this command will make a copy of the mmcblk0 partition and compress it in gz to the SD card, and you will be able to send it to the cloud (GoogleDriver or one of your choice).
note: I recommend that you back up the data partition using TWRP and then format it so that no one has access to your personal files. anyone who can help me I appreciate it.
note2: this can not only help me but it can also help other people who are having the same problem.
my cell phone is moto e5 XT1944-4 retail
my telegram : @foxgoddess

Categories

Resources