[MOD] Increase your SYSTEM partition to 2.5GB , Boot to 30MB , Recovery to 30MB for Y - YU Yureka Original Android Development

Do you want to increase partitions using tool.....? Then here is the link
Finally your and MY wait is over Hear @I Putu Tirta Agung S & @Annabathina are introducing that HOW TO INCREASE YUREKA / PLUS PARTITIONS ........
{
"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"
}
I & @I Putu Tirta Agung S are not responsible for anything that may happen to your phone as a result of following this guide / installing custom roms and/or kernels. you do so at your own risk and take the responsibility upon yourself. ​​
NOTE : Please read hole thread before starting........
Preface
This guide has been tested to work on Lollipop and Marshmallow. By following this guide, you will resize your boot, system, cache, and recovery partition to the new partition size as can be seen below:
This guide is quite safe as it doesn't change the emmc GUID and its unique partitions GUID, which is hard coded into our Yureka's non-HLOS (High Level Operating System).
The Guides
Backing up important partitions ( Very very important )
Go to TWRP (please use the newest, or at minimal Abhishek's 3.0.1-0), and when you are in it run "adb shell" from your computer using " ADB+&+Fastboot of yureka " by " Hold shift key and right click on mouse and select Open command window here " then type below lines ONE BY ONE (remember to do it line by line)
Code:
[SIZE="4"]dd if=/dev/block/mmcblk0 of=/sdcard/gpt.bin bs=512 count=34
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/modem
adb shell dd if=/dev/block/mmcblk0p2 of=/sdcard/sbl1
adb shell dd if=/dev/block/mmcblk0p3 of=/sdcard/sbl1bak
adb shell dd if=/dev/block/mmcblk0p4 of=/sdcard/aboot
adb shell dd if=/dev/block/mmcblk0p5 of=/sdcard/abootbak
adb shell dd if=/dev/block/mmcblk0p6 of=/sdcard/rpm
adb shell dd if=/dev/block/mmcblk0p7 of=/sdcard/rpmbak
adb shell dd if=/dev/block/mmcblk0p8 of=/sdcard/tz
adb shell dd if=/dev/block/mmcblk0p9 of=/sdcard/tzbak
adb shell dd if=/dev/block/mmcblk0p10 of=/sdcard/hyp
adb shell dd if=/dev/block/mmcblk0p11 of=/sdcard/hypbak
adb shell dd if=/dev/block/mmcblk0p12 of=/sdcard/pad
adb shell dd if=/dev/block/mmcblk0p13 of=/sdcard/modemst1
adb shell dd if=/dev/block/mmcblk0p14 of=/sdcard/modemst2
adb shell dd if=/dev/block/mmcblk0p15 of=/sdcard/misc
adb shell dd if=/dev/block/mmcblk0p16 of=/sdcard/fsc
adb shell dd if=/dev/block/mmcblk0p17 of=/sdcard/ssd
adb shell dd if=/dev/block/mmcblk0p18 of=/sdcard/DDR
adb shell dd if=/dev/block/mmcblk0p19 of=/sdcard/fsg
adb shell dd if=/dev/block/mmcblk0p20 of=/sdcard/sec
adb shell dd if=/dev/block/mmcblk0p22 of=/sdcard/params
adb shell dd if=/dev/block/mmcblk0p23 of=/sdcard/panic
adb shell dd if=/dev/block/mmcblk0p24 of=/sdcard/autobak
adb shell dd if=/dev/block/mmcblk0p26 of=/sdcard/persist[/SIZE]
Copy all files from internal storage (sdcard) to your computer, keep them safe as they are very important if something bad happens.
Doing the magic
Download and extract "gpt.zip" attached in this post, and copy the "gpt.bin" file to the root of your internal storage (internal sdcard).
1. Go back to TWRP and run "adb shell" again from your computer, then type:
2. Go back to TWRP and run "adb shell" again from your computer, then type:
dd if=/sdcard/gpt.bin of=/dev/block/mmcblk0 bs=512 count=34
Click to expand...
Click to collapse
3. After all done, reboot to your bootloader and flash your recovery (TWRP) by typing:
fastboot -i 0x1ebf erase recovery
fastboot -i 0x1ebf flash recovery TheNameofYourRecovery.img
Click to expand...
Click to collapse
4. After that, type below commands (remember to do it line by line):
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf erase boot
fastboot -i 0x1ebf format cache
fastboot -i 0x1ebf format userdata
fastboot -i 0x1ebf format system
fastboot -i 0x1ebf reboot-bootloader
fastboot -i 0x1ebf boot recovery
Click to expand...
Click to collapse
5. After booting to TWRP, wipe everything again (system, data, cache, dalvik, internal storage)
6. Reboot the phone to TWRP again.
7. Copy your original "params", "panic", "autobak", and "persist" files you backed up earlier to the root of your internal storage (internal sdcard) and run "adb shell" again from your computer, then type:
adb shell dd if=/sdcard/params of=/dev/block/mmcblk0p22
adb shell dd if=/sdcard/panic of=/dev/block/mmcblk0p23
adb shell dd if=/sdcard/autobak of=/dev/block/mmcblk0p24
adb shell dd if=/sdcard/persist of=/dev/block/mmcblk0p26
Click to expand...
Click to collapse
This step is very important, so don't miss it or you will hard bricked your god damn phone.
8. After all done, reboot to your bootloader and type again below codes (remember to do it line by line):
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf erase boot
fastboot -i 0x1ebf format cache
fastboot -i 0x1ebf format userdata
fastboot -i 0x1ebf format system
fastboot -i 0x1ebf reboot-bootloader
fastboot -i 0x1ebf boot recovery
Click to expand...
Click to collapse
After booting to TWRP, wipe everything again (system, data, cache, dalvik, internal storage)
9. Reboot the phone to TWRP again.
Troubleshooting
Wallah, now you have 2.5 GB of system partition, 150 MB (it will be usefull if you use f2fs file system) cache partition, 30 MB of recovery partition, 30 MB of boot partition, and around 11.77 GB of data partition.
Oh btw, if you flash "userdata.img" from COS or CM roms, you will get something similar to this:
target reported max download size of 268435456 bytes
erasing 'userdata'...
OKAY [ 8.440s]
sending 'userdata' (137434 KB)...
OKAY [ 5.164s]
writing 'userdata'...
FAILED (remote: image size too large)
finished. total time: 13.634s
Click to expand...
Click to collapse
Why? Because now your data partition is approximately 1.5 GB smaller. So just relax, if you got that kind of warning.
Furthermore, because a lot of devs use that ****in ".dat" files ****ty thing ("system.new.dat", "system.patch.dat" and "system.transfer.list"), if you flash their roms (such as CM, AICP, Exodus, bla bla bla), you will see that your partition will go back to its original value. But not to worry, it is not the real value of what is really use. It is because of the nature on how sparse ext4 image is compiled, they need to set the partition size before compiling, and of course they use the old one, not the one we have changed.
So to overcome this problem, you need to do it the hard way, explained in the second post below. However, if you don't want the hazzle then just flash AOSParadox or YuOS (the TWRP version, not the fastboot one) or Mokee or any rom that doen't have "system.new.dat", "system.patch.dat" and "system.transfer.list" in its zip file, as they will read the new partition size just fine.
ADB+&+Fastboot : link
Partition changer : link
Back up code PNG : link
Device Driver installation links
ADB for pc : link
YU usb drivers : link
PdaNet drivers : link
@I Putu Tirta Agung S MY friend for every thing ( NOTE : YOUR the best HACKER that I ever met )
@Annabathina

If you want the hard way in changing ROMs with ****in ".dat" files ****ty thing ("system.new.dat", "system.patch.dat" and "system.transfer.list") to read the new partition size, then you need Ubuntu with the latest kernel (that has the latest patch on "Transparent Compression", see this post), and follow these steps (thanks to xpirt for his guide):
Step 1 - Decompressing = DAT (sparse data) -> EXT4 (raw image)
We're now using sdat2img binary, the usage is very simple (make sure you have python 3.x installed):
Code:
./sdat2img.py <transfer_list> <system_new_file> <system_ext4>- <transfer_list> = input, system.transfer.list from rom zip
<system_new_file> = input, system.new.dat from rom zip
<system_ext4> = output ext4 raw image file
and a quick example of usage:
Code:
./sdat2img.py system.transfer.list system.new.dat system.img
by running this command you will get as output the file my_new_system.img which is the raw ext4 image.
Step 2 - Decompress EXT4 (raw image) -> OUTPUT folder -> Compress EXT4 (raw image)
Now we need to mount or ext4 raw image into an output folder so we can see apks/jars etc. To do this we need to type this command:
Code:
sudo mount -t ext4 -o loop system.img output/
As you can see there is a new folder called output which we can edit/modify/delete your files (not able to? see here)
Now we need to compress it back to a raw ext4 image, to do this we need the make_ext4fs binary. Make sure you have the file_contexts file (taken from the Rom zip) inside the make_ext4fs path. Then type this (got issues? see here).
Code:
/make_ext4fs -T 0 -S file_contexts -l 2684354560 -a system system_new.img output/
The value of 2684354560 in above code is the new size of system partition in Bytes. Upon doing the above processes, you will get the new raw ext4 image called 'system_new.img' ready for the next step.
Step 3 - Converting = EXT4 (raw image) -> DAT (sparse data)
Now we need the rimg2sdat binary, the usage is very simple:
Code:
./rimg2sdat <system_img>
<system_img> = name of input ext4 raw image file
and a quick example of usage:
Code:
./rimg2sdat my_new_system.img
As you can see the output is composed by system.transfer.list, (system.patch.dat) & system.new.dat, ready to be replaced inside your Rom zip.
Just to make it really simple
1. Fire up your beloved ubuntu, make sure you have python 3.x installed.
2. Download "sdat2img.py", "make_ext4fs", and "rimg2sdat" binaries, and put it inside a folder (use a file manager for god sake). We can name the folder "****inGreat".
3. Now make an empty folder inside "****inGreat" folder, and name it "output".
4. Extract "system.new.dat", "system.patch.dat", "system.transfer.list", and "file_contexts" from your beloved rom's zip file, and put it inside "****inGreat" folder.
5. Now open "****inGreat" folder with root privilege, then open terminal (we call it cmd in windows) from there.
6. type below code on the terminal (one line at a time):
Code:
./sdat2img.py system.transfer.list system.new.dat system.img (press enter)
sudo mount -t ext4 -o loop system.img output/ (press enter)
/make_ext4fs -T 0 -S file_contexts -l 2684354560 -a system system_new.img output/ (press enter)
./rimg2sdat my_new_system.img (press enter)
7. Now copy the new "system.new.dat", "system.patch.dat", "system.transfer.list", and "file_contexts" inside "****inGreat" folder back to your beloved rom's zip file.
8. Flash the rom via TWRP
9. And you are good to go.
10. Ain't that simple!!!!!!!!!!!!!
sdat2img.py
- github.com
make_ext4fs
- mega.co.nz
rimg2sdat
- mega.co.nz

reserved for SS

@I Putu Tirta Agung S MY friend for every thing ( NOTE : YOUR the best HACKER that I ever met )
 @Annabathina

reserved

where is
gpt.zip
i cannot found

@ Annabathina I want to use yureka full default partitions on yureka plus version p3 which is pure locked bootloader andoroid 5.1 version. i need your help.

For all adb shell commands I am getting not found
should i proceed further?
Device Yu Yureka (Lineage os 14.1) @Annabathina

luck_y said:
For all adb shell commands I am getting not found
should i proceed further?
Device Yu Yureka (Lineage os 14.1) @Annabathina
Click to expand...
Click to collapse
This is due to your ADB drivers check weather your PC has successfully installed ADB or not

Successfully increased system partition. But as prescribed this mod is supported to LP and MM ROMs only. Is there any way to support this to OREO. And also prescribe a method for restoring stock partitions.

how to go to default partition
please help i am installing nitrogen os and you hard way is not easily understandable

please provide gpt for default partition
please sir atleast provide default gpt so that i can manage myself

yashgogia007 said:
please help i am installing nitrogen os and you hard way is not easily understandable
Click to expand...
Click to collapse
Follow this
http://forums.yuplaygod.com/index.php?threads/50913/
Sent from my AO5510 using Tapatalk

original gpt.bin
Can anyone post the original gpt.bin, which you back up in 1st step...?

Wolverine00796 said:
Can anyone post the original gpt.bin, which you back up in 1st step...?
Click to expand...
Click to collapse
Here you go.

hi kindly request you that after increase partation my phone stuck at boot logo showing some chinese language boot i tried every thing just manage to get stock rom but still my phone stuck in cyanogen mood please help me my phone no is this +91-9829009627 i have no other phone.

E:Unable to mount '/persist' please help me to get back my yureka AO5510 working

Related

[TOUCHRECOVERY]CWM 5.8.0.0 Touch Recovery for DesireHD<Noob Friendly>

Here is a nood friendly tutorial for fastboot flashing the new CWM Touch Recovery .
Download the zip file attached and extract it anywhere .
LE:\\ You need ENG S-OFF and a rooted phone , too.
Your phone needs to be in debugging mode and you need the lastest usb drivers instaled . ( HTC Sync )
FLASHING VIA FAST BOOT :
Step 1 : Run Start Here.bat , a comand promt window will open.
Step 2 : Type in "adb reboot bootloader" . <This works on every rom , it will reboot in fastboot mod.>
Step 3 : After the phone rebooted in fastboot , type in "fastboot flash recovery recovery-clockwork-touch-5.8.0.0-ace.img" .
Step 4 : You have your Touch Recovery flashed .
UPDATE TO LASTEST VERSION :
Step 5 : Download and install "ROM Manager" from Android Market.
Step 6 : Open ROM Manager , and select "Flash ClockworkMod Touch".
Step 7 : Confirm your phone model and in about 20 seconds a message should appear "Successfully flashed ClockworkMod Recovery!" press ok and you are done.
FLASH VIA BOOTLOADER (Without enghboot) : //Thx. nteeb
nteeb said:
For those who don't have enghboot.
The recovery is flashable from bootloader if you pack it in a PD98IMG.zip.
I tried it,this is the zip,use if you want:
PD98IMG.zip
md5: E19E4461F73AB6449760D70AE906341D
Click to expand...
Click to collapse
If you are unable to flash recovery do this and try again : //THX. CostaTX
CostaTX said:
Connect phone via usb and turn on debugging/just charging
Open up cmd (eventually as administrator) and type in "adb shell"
Find out how your system partition is named: "cat /proc/mounts | grep /system"
Mount system partition write/read. replace the X's "mount -o remount,rw -t yaffs2 /dev/block/XXXXX /system"
Use the terminal emulator to install the recovery:
su
flash_image recovery /sdcard/touch.img (or whatever the recovery image is named)
remount the system partition again as read only "mount -o remount,ro -t yaffs2 /dev/block/XXXXX /system
and you're done
Click to expand...
Click to collapse
Donate to ClockworkMod for awesome job .
A new version of recovery (5.8.1.5) is available here: http://www.clockworkmod.com/rommanager
You can also use Terminal Emulator: (I prefer to place the .img file in the root of the SD card and rename the image to something simple like touch.img so I don't have to type the long name from my phone)
su
flash_image recovery /sdcard/touch.img (or whatever the recovery image is named)
reboot recovery
Enjoy!
hello, this method does n't work for me, tried in fastboot with adb, same.... it's showing "remoot error" or something lik that
Do you have S-off? That error usually indicates you do not, and it is required for this method... Any luck using Terminal Emulator, as described two posts above?
Sent from my BNTV250 using Tapatalk
winsettr said:
You can also use Terminal Emulator: (I prefer to place the .img file in the root of the SD card and rename the image to something simple like touch.img so I don't have to type the long name from my phone)
su
flash_image recovery /sdcard/touch.img (or whatever the recovery image is named)
reboot recovery
Enjoy!
Click to expand...
Click to collapse
Hey dude. This method doesn't work for me.
I keep getting a message saying 'flash_image: not found'.
I have placed the image on the root of the sd card as well as in the original download folder. Neither location works.
{
"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"
}
Any ideas?
Greg.
Sent from my Desire HD using Tapatalk
Two thoughts: when you download the recovery image its actually named something like touch-recovery-ace-5.8.0.2.img; if you want to just type in touch.img in Terminal Emulator you need to rename the file that you downloaded. If you have already done this then you may not have busybox installed (CM and MIUI do, I don't know for sure about other ROMs). To test, from Terminal Emulator type "busybox"; if it's installed, you will get a list of available commands.
Sent from my BNTV250 using Tapatalk
works perfect, thx for the new recovery
winsettr said:
Two thoughts: when you download the recovery image its actually named something like touch-recovery-ace-5.8.0.2.img; if you want to just type in touch.img in Terminal Emulator you need to rename the file that you downloaded. If you have already done this then you may not have busybox installed (CM and MIUI do, I don't know for sure about other ROMs). To test, from Terminal Emulator type "busybox"; if it's installed, you will get a list of available commands.
Sent from my BNTV250 using Tapatalk
Click to expand...
Click to collapse
Hey dude.
I had indeed already renamed the file to touch.img.
I checked TE and I do seem to have busybox installed, I'm rocking RCMIX3D V4.
Curious.
Greg.
Sent from my Desire HD using Tapatalk
Also, I took the ***** way out and I bought the touch recovery, it's only £2.
Cheers,
Greg.
Sent from my Desire HD using Tapatalk
Supporting developers is never looked down upon, glad you are up and running!
Sent from my BNTV250 using Tapatalk
It did not work for me. i get these errors:
Code:
C:\Users\Jan>cd c:\touchrecovery
c:\TOUCHRECOVERY>fastboot flash recovery touch.img
sending 'recovery' (3554 KB)... OKAY [ 0.597s]
writing 'recovery'... FAILED (remote: not allowed)
finished. total time: 0.598s
c:\TOUCHRECOVERY>notepad
i ran cmd as admin but i still get the same error. when i try installing it via terminal emulator it also says "file not found". idea?
Do you have ENG S-off (different from just rooting)? That error usually indicates you do not, and it is required for the OP method... You might try updating Busybox (search Market for Busybox Installer) if you are sure when using Terminal Emulator that the path and filename are correct.
Sent from my BNTV250 using Tapatalk
I do have eng s-off . i was able to update the the recovery in the first place. i updated busybox and su-binaries as well but still got the same error. rebooted the phone just in case but still got the errors.
i can't say if it would have worked flashing via fastboot, now with the updated busybox. I'll give it a try when i'm back home. I believe it won't work neither. Maybe you got another idea?
edit: nothing changed using fastboot
So just to confirm, you only have this problem flashing the touch recovery, and can flash other versions of CWM just fine (using fastboot or terminal)?
Sent from my Desire HD using Tapatalk
Thanks for the guide, but I have a problem. When flashing the .img file, I get the following error:
sending 'recovery' (3554 KB)... OKAY [ 0.633s]
writing 'recovery'... FAILED (remote: not allowed)
finished. total time: 0.634s
I have S-OFF, but not ENG S-OFF. Is it possible to flash this without ENG S-OFF?
ROM Manager Premium says: "Error while downloading from server. Please make sure that you have a stable internet connection, and that your SD card is inserted and has free space!"
The internet connection and the SD card are of course all right...
Edit: I read that "Engineering HBOOT is required to flash the recovery area remotely." How can I flash the recovery on the phone (not remotely)?
winsettr said:
So just to confirm, you only have this problem flashing the touch recovery, and can flash other versions of CWM just fine (using fastboot or terminal)?
Sent from my Desire HD using Tapatalk
Click to expand...
Click to collapse
i've tested flashing a non-touch recovery right now but nothing changed. i noticed that flashing a recovery via rom manager works without any problem.
I read a while back that some users (from a G1 forum, so may not be as helpful, but it's an idea) had to mount the recovery partition r/w manually from fastboot. I'll see if I can find the link... http://www.droidforums.net/forum/dr...e-busybox-flash_image-more-app.html#post87383
That might fix your error while flashing from fastboot, but it seems the issue with terminal emulator is that it's not recognizing the flash_image command. The above link also has instructions for installing flash_image which may be the key!
I downloaded this file: recovery-clockwork-touch-5.8.1.5-ace.zip
Is it safe to install this zip (which is a recovery) in recovery?
winsettr said:
I read a while back that some users (from a G1 forum, so may not be as helpful, but it's an idea) had to mount the recovery partition r/w manually from fastboot. I'll see if I can find the link... http://www.droidforums.net/forum/dr...e-busybox-flash_image-more-app.html#post87383
That might fix your error while flashing from fastboot, but it seems the issue with terminal emulator is that it's not recognizing the flash_image command. The above link also has instructions for installing flash_image which may be the key!
Click to expand...
Click to collapse
here ist what i did with that link
Code:
C:\TOUCHRECOVERY>adb shell
# cat /proc/mounts |grep /system
cat /proc/mounts |grep /system
/dev/block/mmcblk0p25 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
# mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p25 /system
mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p25 /system
# cat /sdcard/touch.img > /system/bin/touch.img
cat /sdcard/touch.img > /system/bin/touch.img
# chmod 755 /system/bin/touch.img
chmod 755 /system/bin/touch.img
# sync
sync
# mount -o remount,r -t yaffs2 /dev/block/mmcblk0p25
mount -o remount,r -t yaffs2 /dev/block/mmcblk0p25
mount: mounting /dev/block/mmcblk0p25 on /system failed: Invalid argument
# mount -o remount,r -t yaffs2 /dev/block/mmcblk0p25 /system
mount -o remount,r -t yaffs2 /dev/block/mmcblk0p25 /system
mount: mounting /dev/block/mmcblk0p25 on /system failed: Invalid argument
busybox was already installed so i skipped this part and started with installing the recovery right away. I don't know why i'm not able to remount the system partition as read only at the end. It looks like as if everything seems to have worked properly but the touch recovery is not showing up.

restoring erased data

i installed wishnu app https://play.google.com/store/apps/details?id=edu.phystech.wishnu&feature=search_resultand tried to run it but it doesnt work , then i remove the app by go to applications manager>wishnu then clear data and uninstall
after that all my data is gone i dont know how
sdcard and internal card but my app doesnt erased
how can i fix or restore my data and files ?
plz help :crying:
Try to reboot and check once.
or use undelete from the playstore
Hi,
with dd command you can extract an image of your sdcard or over & after use data recovery forensics tool (foremost).
ex: dd (try 'mount' for identify block before)
Code:
#dd if=/dev/<blockdevice> of=/extract_image bs=4096
# foremost -t all -i extract_image
or with app but i have no experimented any app
manually is the best way & sure
nokiamodeln91 said:
Try to reboot and check once.
or use undelete from the playstore
Click to expand...
Click to collapse
thanx
but it doesnt work
karamelos said:
Hi,
with dd command you can extract an image of your sdcard or over & after use data recovery forensics tool (foremost).
ex: dd (try 'mount' for identify block before)
Code:
#dd if=/dev/<blockdevice> of=/extract_image bs=4096
# foremost -t all -i extract_image
or with app but i have no experimented any app
manually is the best way & sure
Click to expand...
Click to collapse
can you explain more
i am linux user i can use terminal
but android terminal i dont know how it work
tsar007 said:
can you explain more
i am linux user i can use terminal
but android terminal i dont know how it work
Click to expand...
Click to collapse
Yes of course and with pleasure
It's not android terminal command.
On your Linux (for exemple ubuntu) laptop open terminal:
Code:
$sudo apt-get install foremost
mount your phone on your pc & list disk (mass storage simply way)
Code:
#fdisk -l
or with mount command
Your sdcard for this example named: sdb
Copier sdb with dd command & nane it extract_image. option bs=4096 it's block size & maximizing execution speed significantly.
more option in man (root)
Code:
#dd if=/dev/sdb of=/extract_image bs=4096
Foremost extract (root):
Code:
#foremost -t all -i extract_image
-t - specify file type/ here "all" but you can specifies jpg mp4 pdf etc....
-i - specify input file/ your backup
Foremost create folder but you must be root for open it (/temp directory is good work spaces)
or (not good but simply)
Code:
gksudo nautilus
Enjoy
karamelos said:
Yes of course and with pleasure
It's not android terminal command.
On your Linux (for exemple ubuntu) laptop open terminal:
Code:
$sudo apt-get install foremost
mount your phone on your pc & list disk (mass storage simply way)
Code:
#fdisk -l
or with mount command
Your sdcard for this example named: sdb
Copier sdb with dd command & nane it extract_image. option bs=4096 it's block size & maximizing execution speed significantly.
more option in man (root)
Code:
#dd if=/dev/sdb of=/extract_image bs=4096
Foremost extract (root):
Code:
#foremost -t all -i extract_image
-t - specify file type/ here "all" but you can specifies jpg mp4 pdf etc....
-i - specify input file/ your backup
Foremost create folder but you must be root for open it (/temp directory is good work spaces)
or (not good but simply)
Code:
gksudo nautilus
Enjoy
Click to expand...
Click to collapse
i did execute this
Code:
dd if=/dev/sdc of=/extract_image bs=4096
this is the output
Code:
2904064+0 records in
2904064+0 records out
11895046144 bytes (12 GB) copied, 635.841 s, 18.7 MB/s
then i same directory i did execute this
Code:
foremost -t all -i extract_image
and this is the output
Code:
Processing: stdin
i wait for more than 3 hours and same thing ,nothing happened
look
there is another application "photorec"
in terminal i did execute
Code:
photorec
its look like a guide
after it done i opened the directory and i found folders i opened one and there is txt files and zip files and tar files
i didnt know how i used it
tsar007 said:
Code:
foremost -t all -i extract_image
Click to expand...
Click to collapse
This's a basique commande try with other option
first command Generate audit file and print to the screen, the seconde extract with verbose
Code:
$sudo foremost -avT extract_image
$sudo foremost -vT -t all -i extract_image
-a write all headers
-v Verbose
-T delete the output dir when you running multiple times
For photorec:
A good wiki & site
After using photorec
karamelos said:
This's a basique commande try with other option
first command Generate audit file and print to the screen, the seconde extract with verbose
Code:
$sudo foremost -avT extract_image
$sudo foremost -vT -t all -i extract_image
-a write all headers
-v Verbose
-T delete the output dir when you running multiple times
For photorec:
A good wiki & site
After using photorec
Click to expand...
Click to collapse
thanx a lot :laugh:
For future
Foremost is a great tool simply & faster but photorec detect more files & just read partitions
For sdcard (photos, PDF...) foremost enough
Sent from my GT-N7000 using xda app-developers app

[GUIDE] Making Dump Files Out of Android Device Partitions

Use:
The main purpose is to make a file that contains all data in android specific partition. This is really handy in case of dumping leak firmwares.
Pr-requirement:
- Rooted device.
- Knowledge of how to use adb or Terminal Emulator.
The first step of making dump files out of device partitions is to locate its mounting points..!!
So in our tutorial, we will make it in 2 sections. Section 1 for how to get mounting points, and section 2 for how to get partition dumped..
Keep in mind that this is xda-university; so my target is to show beginners how to do that manually, without the aid of any tool, so they can get the concept behind it.. OK let's begin..!!
Section 1:
Getting mounting points​There are several methods to achieve this, but we will discuss the easiest methods that give efficient information about the partition that you want to know its mounting point.
All these methods will be described using adb shell.
Way #1
Code:
adb shell
cat /proc/partitions
This one needs from you to figure out which block belong to which partition name.!!
{
"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"
}
Way #2
Code:
adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
This one will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc)
This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).
How?
- In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).
- Go to "/dev/block/platform/" folder
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.
- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)
- Now open adb shell and put that command..
Way #3
By pushing parted binary to /system/bin folder and run it (you can find it in attachment).
Code:
adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 0755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print
Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.
example:
The hidden partition mounting point will be mmcblk0p10
The radio partition mounting point will be mmcblk0p7
The system partition mounting point will be mmcblk0p9
The recovery partition mounting point will be mmcblk0p6
and so on
Don't forget to "quit" the parted action after grasping your device mounting points.
N.B:
- You may need to run first:
Code:
adb shell
cat /proc/partitions
to know what is the initial name for your device partition.. In the example above, it was mmcblk0.
- Also to be able to do adb push to /system partition for parted binary, you will need insecure boot.img used in your ROM or adbd insecure installed in your device (Check this thread for that app), or just push parted binary manually by any root explorer and then fix permissions to rwxr-xr-x (755).
***​
Section 2:
Dumping ROM partition​After locating the mounting point of the partition you want to dump, open adb shell command prompt and type:
Code:
adb shell
su
dd if=[B][COLOR="Blue"]/yourMountingPoint[/COLOR][/B] of=[B][COLOR="Green"]/yourDestination[/COLOR][COLOR="Red"]/partitionType[/COLOR][/B]
Let's say I want to take a dump out of system partition from above example. So the adb commands will be:
Code:
adb shell
su
dd if=[B][COLOR="Blue"]/dev/block/mmcblk0p9[/COLOR][/B] of=[B][COLOR="Green"]/sdcard[/COLOR][COLOR="Red"]/system.img[/COLOR][/B]
This may take a while to complete the dumping process, depending on the size of your dumped partition; so be patient..
Note:
If the partition is formatted as ext3/4 then the dumped partition will have .img as an extension.
Other partition dumps have different extensions; examples:
radio.bin
param.lfs
Sbl.bin
zImage (without extension)
***​
Optional:
Read Partition Image​After dumping an image from android partition, you can mount it to extract a particular file for sharing, or the whole dump content in case the ROM chief wants to make a ROM out of dump files..
For Linux Users:
- Open terminal and type:
Code:
su -
mkdir -p /mnt/disk
mount -o loop [B][COLOR="Red"]yourImage.img[/COLOR][/B] /mnt/disk
cd /mnt/disk
ls -l
For Windows Users:
- Download LinuxReader from this site here.
- Open it -> Drives -> Mount Image -> Then choose your dumped image and hit Mount. A new driver will appear that contains all files inside the dumped image called "Linux native Volume 1". Just double click it to get inside the dumped image.
I hope you will find this tutorial beneficial,,,
Yours;
Actions Explanation
★ Tutorial Legends ★​
In this post, I will try to explain the use of each binary used in the tutorial, so you can make sense of each action taken.
#1
Code:
adb shell
Run remote shell interactively, as if you are in linux terminal.
Click to expand...
Click to collapse
#2
Code:
cat /proc/partitions
cat binary is used to concatenate file(s) and print them to standard output display. In our example, it prints the content of partitions file which is found in proc folder to screen display.
Click to expand...
Click to collapse
#3
Code:
ls -al /dev/block/platform/dw_mmc/by-name
ls binary is used to list directory contents.
-al is the used option for ls which means to include entries that started with "." in long listing format. There are a lot of options for ls binary. You can always print ls --h to display help menu for other options available.
Click to expand...
Click to collapse
#4
Code:
adb remount
Remounts the /system partition on the device read / write. This has been disabled in some devices (those with secure boot image); so you need to make sure that you have patched adbd that can run this command effectively.
Click to expand...
Click to collapse
#5
Code:
su
Used to get super-user privilege.
Click to expand...
Click to collapse
#6
Code:
mount -o remount,[B][COLOR="Red"]rw[/COLOR][/B] /system
Specific command to mount the /system partition on the device read / write (rw).
If you change rw to ro, you will get /system partition mounted as read only.
Click to expand...
Click to collapse
#7
Code:
adb push parted /system/bin/parted
adb push is used to copy file/dir from your local computer to android device. The usual format is adb push <local> <remote>
Click to expand...
Click to collapse
#8
Code:
chmod 0755 /system/bin/parted
chmod binary is used to set permissions for the specified file/dir.
The number after chmod is the permission used. See the next box for better understanding of chmod formatting:
Code:
[CENTER][B][COLOR="Red"]----------------
| CHMOD SCHEME |
----------------[/COLOR][/B][/CENTER]
[B] r w x[/B]
[B]4 2 1 [COLOR="Green"]= 7 (Full Permissions)[/COLOR][/B]
User ( ) ( ) ( ) [B][COLOR="Green"]--> 2nd digit[/COLOR][/B]
Group ( ) ( ) ( ) [B][COLOR="Green"]--> 3rd digit[/COLOR][/B]
Other ( ) ( ) ( ) [B][COLOR="Green"]--> 4th digit[/COLOR][/B]
Special UID GID STK
( ) ( ) ( ) [B][COLOR="Green"]--> 1st digit, ignored on most cases or put 0[/COLOR][/B]
In the above example, it is set to 0755 which means the following scheme:
Code:
[B] r w x[/B]
[B]4 2 1[/B]
User ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 7 (rwx)[/COLOR][/B]
Group ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
Other ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
Special UID GID STK
( ) ( ) ( ) [B][COLOR="Green"]--> This equals to 0 (---)[/COLOR][/B]
As you can see, if you said 0755, it will be as same as saying ---rwxr-xr-x
Click to expand...
Click to collapse
#9
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
dd binary is used to copy a file with converting and formatting.
if means input file; here we pointed to the whole partition, not specific file.
of means outputting file to specific destination path; here it is to sdcard with system.img name.
Click to expand...
Click to collapse
#10
Code:
mkdir -p /mnt/disk
mkdir binary is used to make folder dir.
-p is mkdir option which means to create folder with sub-folder at the same time. Here we want to create mnt folder that contains disk sub-folder in it. If the folder and or sub-folder(s) are already exists, it will not give error but nothing will be created.
Click to expand...
Click to collapse
#11
Code:
mount -o loop yourImage.img /mnt/disk
This is linux way to mount images into specific directory (/mnt/disk in this example).
Click to expand...
Click to collapse
#12
Code:
cd /mnt/disk
cd used to get inside specific dir path.
Click to expand...
Click to collapse
#13
Code:
ls -l
ls binary is used to list directory contents as described above.
-l is the used option for ls which means to list contents in long listing format.
Click to expand...
Click to collapse
Cheers
another way to get common names
on way #2, I've often used:
Code:
cat /proc/emmc
on a few devices to reveal similar info.
Rob
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??
hasan4791 said:
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??
Click to expand...
Click to collapse
if you mean extract to modify boot.img, then I don't think there is away to do that from device itself in the moment..
if you mean dumping boot.img then yes you can, just install terminal emulator from Google play and you can run adb shell commands directly from the device
Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i find they have trouble executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb shell
ricky310711 said:
Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i find they have trouble executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb shell
Click to expand...
Click to collapse
Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for boot.img, sbl.bin, modem.bin...etc right
majdinj said:
Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for boot.img, sbl.bin, modem.bin...etc right
Click to expand...
Click to collapse
ofcoarse, i actually had a project going where it detects all partitions(modems, boot.img, system etc..) that archives itself into a .zip
it was going well until i did something in the script, now it only works on the s3 it shall be continued one day!
Such great tutorial, this is definitely going to come in handy for me. I have a question, how can you dump (extract) a bootloader? Can i use the same method as dumping the ROM?
Could you explain how to extract stock recovery image please?
Sent from my HTC One using xda app-developers app
Where did the parted binary come from?
For Gods Sake
http://forum.xda-developers.com/sho...IDE] Unpack/repack ext4 Android system images
http://forum.xda-developers.com/sho... Creator (deployable over all kernel sources)
http://forum.xda-developers.com/sho...ipt]Backup all paritions on i9505 to odin rom
http://forum.xda-developers.com/sho...al 4.3 TW Custom Rom/ The ORIGINAL WIFI TRICK
... use Forum Search Engine first, then start asking all your 'important' questions
¤ GT-I9505 - powered by KitKat ¤
insink71 said:
on way #2, I've often used:
Code:
cat /proc/emmc
on a few devices to reveal similar info.
Rob
Click to expand...
Click to collapse
Thx for this. On my HTC One there is no "by-name" folder. It only has "by-num". cat /proc/emmc works fine though.
Cheers.
I also wrote a guide, It just using the "by-name"
and needs root
[HOWTO] dump your rom
Code:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/extSdCard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/extSdCard/recovery.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/param of=/storage/extSdCard/param.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/extSdCard/boot.img
Hi,
I tried this on my I-9505G. It is NOT rooted, so I thought I could enter the system through Clockworkmod Recovery.
I did it, but at first I didn't mount the DATA partition (later on I did through CWM Recovery); I still ran the command:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/data/media/TEST/system.img
Thought I hadn't mounted anything, the media folder was still there, I only created the TEST folder.
After the image was created I typed the "ls" command and the system.img file was in /data/media/TEST/.
I then rebooted once again in CWM and ran the "adb shell" command once again, I entered /data/media/ e neither the img file nor the TEST folder I had created were there.
My question is: where have they gone?? Are they still occupying some of my space or they just got deleted automatically when I rebooted??
Please let me know as I'd like to free that extra unuseful 1.2 Gb system.img file.
Anyway, just as side information, I later on mounted the /data through CWM interface and was able to see the folders ("/data/media/0/") I can see by plugging the phone normally to the computer. I then dumped the image.
I have some other questions:
I can I mount the /data folder (or the external SD) via command?
What extention should I give to the other partitions? (All of them)
Why did you say that it's MANDATORY that the phone be rooted if it can be done this way?
Are the images I'm dumping flashable through fastboot?
Thank you all for your time!
Anybody? Please.
•I can I mount the /data folder (or the external SD) via command?
I have not been able to find the SD card in clockwork on the I9505G, hence one of my rooting procedures send the root file vi "adb sideload".
I might be able to pull the data from the phone but the clockwork recovery is still not working 100% when fastbooting it.
•What extention should I give to the other partitions? (All of them)
.img are fine.
•Why did you say that it's MANDATORY that the phone be rooted if it can be done this way?
currently it is required that the phone be unlocked. Something need to be fixed in clockwork to make it work any other way.
•Are the images I'm dumping flashable through fastboot?
They should be, but I have not been able to flash anything on the I9505G vi fastboot because of the secure boot.
without a full official image this make my playing around a little concerning (slowing me down).
I will look into this at my leisure. I would love to be able to pull a rom off a phone with only unlocking it.
I will test some stuff using my old galaxy nexus.
I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.
Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.
I've not clearly understood what "secure boot" means. Any guide or wiki?
Thanks!
---------- Post added at 06:56 PM ---------- Previous post was at 06:55 PM ----------
I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.
Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.
I've not clearly understood what "secure boot" means. Any guide or wiki?
Thanks!
Hey, great guide! I need some help but. I can't retrieve the common names / labels of my devices partitions. It's a GT-i8150 and there is no 'by-name' sub directory. Furthermore, parted does not work on mmcblk0 for some reason (unable to satisfy partition restraints or something). I also have no emmc file in proc.
Does anyone know how some other methods for getting the names of the partitions?
EDIT:
Another question - using ADB shell, is it possible to dump a partition straight from the phone onto the computers hard drive? My little 2GB sd card isn't coping! Thanks
a very basic but good guide
Sent from my GT-P1000 using xda app-developers app

How to backup a partition

How to backup - let's say boot - partition to a fastboot flashable file (*.img) format?
For example:
Code:
dd if=/dev/block/platform/hi_mci.0/by-name/boot of=/sdcard/boot.img
and so on.
Kostyan_nsk said:
For example:
Code:
dd if=/dev/block/platform/hi_mci.0/by-name/boot of=/sdcard/boot.img
and so on.
Click to expand...
Click to collapse
Thanks. So fastboot is using dd images. Please do confirm.
Regards.
You can use only boot and recovery images extracted by dd for flashing via fastboot.
Kostyan_nsk said:
You can use only boot and recovery images extracted by dd for flashing via fastboot.
Click to expand...
Click to collapse
Thanks
Kostyan_nsk said:
For example:
Code:
dd if=/dev/block/platform/hi_mci.0/by-name/boot of=/sdcard/boot.img
and so on.
Click to expand...
Click to collapse
I have done the backup to the image file as you have suggested.
I have copied image file to the linux computer, but when I try to mount the image file I get:
mount -o loop boot_orig_B830.img /mnt/boot/
mount: /dev/loop0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
What is the file system for this image?
Length of the image file is:
ls -l boot_orig_B830.img
-rw-rw-r-- 1 test test 16777216 Lis 13 22:04 boot_orig_B830.img
For Linux: google "unpackbootimg", "gunzip" and "cpio".
For Windows: google "AndImgTool".

[GUIDE]Using /internal_sd/ as a swap

Warning: Using dd incorrectly can easily kill your smartphone
If you make a mistake in the commands you can erase the data on your memory card or erase one of the eMMC partitions altogether
After all this procedure will delete all the data on /internal_sd/ and you will not be able to store files on it
And now for the tutorial: I find these 96 MB in /internal_sd/ not very useful so I decided to use them for swap and it was successful
You need a kernel with swap and init.d and of course a root
That's all in the CM11 RC5. I don't know about other kernels or ROMs.
1) Download internal_sd_swp.img from the attachment
2) Put it somewhere on your smartphone
3) Run adb shell or some terminal on your smartphone
4) Do su and allow the request from the application Superuser or SuperSU
You should see # at the beginning of the line
5) Type
Code:
dd if=/patn/to/img/internal_sd_swp.img of=/dev/block/mmcblk0p32
(instead of /patn/to/img/ it should be where you put .img, if /data/local/ it will be /data/local/internal_sd_swp.img if /sdcard/ then /sdcard/internal_sd_swp.img etc)
6) Make a file 09swapon in /system/etc/init.d/ and type the following
Code:
busybox mkswap /dev/block/mmcblk0p32
busybox swapon /dev/block/mmcblk0p32
echo 100 > /proc/sys/vm/swappiness
7) Reboot and enter the
Code:
free
command and if successful the swap will not be 0
If you want it back the way it was, download internal_sd.img from the attachment, dd it like before and remove /system/etc/init.d/09swapon

Categories

Resources