This device is not ready for use - Upgrading, Modifying and Unlocking

Hi
I've been following this tutorial in order to dump my original telus ROM for another user here that have asked me.
http://forum.xda-developers.com/showthread.php?t=327073
However, when I get this step:
check for real size
D:\_ROM>pdocread -w -d TrueFFS -p Part02 -t
real nr of sectors: 132752 - 64.82Mbyte (0x40d2000)
I get the following error:
ERROR: ITTFFSGetInfo - The device is not ready for use.
WARNING: using default 512 bytes for sectorsize
CopyTFFSToFile(0x0, 0x43e0000, Part02.raw)
ERROR: ITReadDisk: outbuf==NULL
- The device is not ready for use.
Any clues?
Thanks

Ok I got the device name point but now when I try to read the partition size, with all the names OK, it gives me the default 512bytes...

Related

[DUMP]UK Vodafone .RAW Files

I have manage to upload the .raw files for the vodafone uk ROM.
I don't know how to make it into a ROM so just gave you what I have.
link below:
Dump.rar
If some can make it into a ROM for me that would be great.
1: download a kitchen, for example http://forum.xda-developers.com/showthread.php?t=408951
2: if you have Part01.raw and Part02.raw, put it into the "source" folder
3: Place the RUU_signed.nbh from the prebuilt ROM into the "source" folder
4: Rebuild using the right hand side menu.
Thank you! Now I can have my voda rom backup
Thanks for the files.
Rebuilt but would like to know what information should go in the boxes in the htc rom tool.
Device Diamond*
Model ID DIAM***** Should this be changed?
Country ID 11111111 Should this be changed?
Version 1.93.456.3 WWE What is the original Vodafone ROM details
Language WWE
Does it matter what goes in these boxes as I trying to build a backup ROM just in case I need to return my phone under warranty.
Thanks
oops...delete this
What did you use to back up your ROM?
Garetht said:
I have manage to upload the .raw files for the vodafone uk ROM.
I don't know how to make it into a ROM so just gave you what I have.
link below:
Dump.rar
If some can make it into a ROM for me that would be great.
Click to expand...
Click to collapse
Glad lad...
You had the patience to learn and do this yourself nice one
Firstly you will need to download the file below:
http://nah6.com/~itsme/itsutilsbin-20080313.zip
Once you have downloaded the file you will need to extract it into a folder.
You will see lot's of icons and programs in the folder but that is normal.
Now go to "Start" and then "Run" on your PC and type 'CMD'.
This will open a command prompt window (DOS window).
You will need to get to the folder where to extracted the downloaded file from.
The folder that I use is in my C:\ drive, so in my DOS command window it will look like this: C:\>.
Helfire got this for me and you just need to follow this for the next part:
This is a copy from the post i mentioned think i know what your doing wronas i did the same.
Go to the folder with itsutils in command prompt window eg. c:\itsutils
Then type pdocread.exe -l
You then should see the following. ive cut of the bit at the bottom.
C:\bin>pdocread.exe -l
210.38M (0xd260000) DSK1:
| 3.12M (0x31f000) Part00
| 4.38M (0x460000) Part01
| 106.38M (0x6a60000) Part02
| 96.50M (0x6080000) Part03
3.75G (0xf0000000) DSK7:
| 3.75G (0xf0000000) PART00
STRG handles:
handle e6932666 3.75G (0xf0000000)
handle e7cae8da 96.50M (0x6080000) (Part03)
handle c7db27be106.38M (0x6a60000) (Part02)
handle a7db279a 4.38M (0x460000) (Part01)
handle 67db2752 3.12M (0x31f000) (Part00)
[...]
Ok take note of the values underlined as they will probs be different for some of the parts.
Next enter below changing the values to match the ones you got from above step underlined.
pdocread.exe -w -h 0x67db2752 -b 0x800 0 0x31f000 Part00.raw
When it finishes you should see below
CopyTFFSToFile(0x0, 0x31f000, Part00.raw)
Next enter below changing the values to match the ones you got from above step underlined.
pdocread.exe -w -h 0xa7db279a -b 0x800 0 0x460000 Part01.raw
When it finishes you should see below
CopyTFFSToFile(0x0, 0x460000, Part01.raw)
Next enter below changing the values to match the ones you got from above step underlined.
pdocread.exe -w -h 0xc7db27be -b 0x800 0 0x6a60000 Part02.raw
When it finishes you should see below
CopyTFFSToFile(0x0, 0x6a60000, Part02.raw)
Next enter below changing the values to match the ones you got from above step underlined.
pdocread.exe -w -h 0xe7cae8da -b 0x800 0 0x6080000 Part03.raw
When it finishes you should see below
CopyTFFSToFile(0x0, 0x6080000, Part03.raw)Dump the bootloader:
To dump the bootloader
Code:
pmemdump.exe 0xa8000000 524288 SPLdumped.nb
When it finishes you should see below
CopyProcessMemoryToFile(00000042, a8000000, 00080000, SPLdumped.nb)
I hope this helps you as its what i did.
By the looks of it you typed the whole pdocread.exe -w -h 0xa7db2752 -b 0x800 0 0x31f000 Part00.raw CopyTFFSToFile(0x0, 0x31f000, Part00.RAW)
when you only need to type pdocread.exe -w -h 0xa7db2752 -b 0x800 0 0x31f000 Part00.raw
as the CopyTFFSToFile(0x0, 0x31f000, Part00.RAW) is the output.
Let me know how you get on, it took me a while but when Helfire showed me this it all made sense.
Thanks
I'm stuck at the first hurdle with the -
Could not update itsutils.dll to the current version, maybe it is inuse?
try restarting your device, or restart ActiveSync
Click to expand...
Click to collapse
Do you get that message when you have downloaded the ITSUTILS and try to extract it ?
No, it seems it wants to put that on my phone, my phone displayed a message asking if I wanted to run the program. Seems I need to do a regdit somehow to allow it to run.
I think it might just be easier to get a copy of your ROM if that's ok. I've downloaded your dump already, have you made that back into a ROM yet?
you have to use first cert.cab then enablerapi.cab then softreset
after this you can make your dump
Trying to back up the rom...
adwinp said:
2: if you have Part01.raw and Part02.raw, put it into the "source" folder
3: Place the RUU_signed.nbh from the prebuilt ROM into the "source" folder
Click to expand...
Click to collapse
Sorry for my ignorance, but where do I get the RUU_signed.nbh ? and don't I need Part03 and 04 at all?
Gadgetgal-C said:
Sorry for my ignorance, but where do I get the RUU_signed.nbh ? and don't I need Part03 and 04 at all?
Click to expand...
Click to collapse
Nope. No need for part 3 & 4.
RUU_signed - take from any stock ROM (just extract).
Where could a noob learn the fine art of Rom flashing?
adwinp said:
Nope. No need for part 3 & 4.
RUU_signed - take from any stock ROM (just extract).
Click to expand...
Click to collapse
Thanks for the hint. Is there any thread that would explain in more detailed procedure how to do this (extracting the RUU_signed and the whole backing up the old and flashing a new roms)?
Sorry, my ex did this kind of things for me in the past, but now I am trying to learn myself how to manage all this... Apologise for those noobie questions, but I've gotta start somewhere.
Has anyone managed to assemble this back into a working ROM yet?
Help
Please can someone make the RAW files in the first post into a ROM for us, then I can get it uploaded for everyone else.
I'd like this too if somone would be so kind.
Thanks
Garetht - Did you see my post with the Vodafone Nav if you were interested.

Generic ROM dumper?

I posted a simular question in another board and no one answered. I assume that anyone who read it did not know or it as the wrong forum. so after 2 days of reading the forum I am posting this question here.
Is there a generic tool for dumping Windows Mobile ROM?
I have a Hantel Q5 Phone that I would love to MOD.
I have tried the itsutilsbin package but it would not copy the dll. I then manually copied the dll, tried again... didn't work. soft reset... didn't work. I thought that maybe it needed to be in some sort of recovery mode and tried starting the phone holding different key combination's. I did find one that did a hard reset (by holding the End key while powering on the phone.) I did not find any other combination's that would do anything.
This is a inexpensive alternative to some higher priced phones and I am surprised that no one here has tried anything with it yet.
Thanks for reading.
Just noticed elf0100 above the Serial sticker
Does this mean this device a HTC Touch clone?
Ok so I have gotten a little farther
First I moved to an XP machine...
Then I used a regeditor and edited HKLM\security\Policies\Polices0001001 dword value to 1 (it was set to 2)
this allowed pdocread.exe to read some information. it was not complete but it gave me enough information to do a search.
I then tried pdocread.exe -w TrueFFS -p Part02 -t
this resulted in..
ERROR: ITTFFSGetInfo - The device is not ready for use.
WARNING: using default 512 bytes for sectorsize
real nr of sectors: 1 - 512.00byte, 0x200
well that did not look right so I searched for it and I then found a diamond ROM dumping thread with a similar problem.
This thread outlined a way to specify handles and sector sized ( at least that is what I think it is)
So I did the following
Code:
E:\WM6\itsutilsbin-20088313>pdocread.exe -l
122.13M (0x7a20000) DSK1:
| 1.25M (0x31f000) Part00
| 2.00M (0x200000) Part01
| 46.63M (0x2ea0000) Part02
| 72.25M (0x4840000) Part03
3.69G (0xec580000) DSK2:
| 3.69G (0xec180000) PART00
STRG handles:
handle 47e7be7a 3.69G (0xec180000)
handle 87f52bca 72.25M (0x4840000)
handle 67f777be 46.63M (0x2ea0000)
handle 67f7779a 2.00M (0x200000)
handle 47f77752 1.25M (0x13f000)
[...]
E:\WM6\itsutilsbin-20088313> pdocread.exe -w -h 0x47f77752 -b 0x800 0 0x13f000 Part00.raw
CopyTFFSToFile(0x0, 0x13f000, Part00.raw)
E:\WM6\itsutilsbin-20088313> pdocread.exe -w -h 0x67f7779a -b 0x800 0 0x200000 Part01.raw
CopyTFFSToFile(0x0, 0x200000, Part01.raw)
E:\WM6\itsutilsbin-20088313> pdocread.exe -w -h 0x67f777be -b 0x800 0 0x2ea0000 Part02.raw
CopyTFFSToFile(0x0, 0x2ea0000, Part02.raw)
E:\WM6\itsutilsbin-20088313> pdocread.exe -w -h 0x87f52bca -b 0x800 0 0x4840000 Part03.raw
CopyTFFSToFile(0x0, 0x4840000, Part03.raw)
This output 4 .raw files with what seemed to be the correct sizes. I opened one of them in a hex editor to ensure that it was not just an empty file. It wasn't so I continued my search.
Now I should be able to combine these files to make a ROM Image.
But what I have run across is I have to find a OS.nb file that is larger than my original Part02.raw file. This is where I am stuck. All the posts I have read say to extract this from an original ROM file. Well my device as far as I know is the first one of its kind to get dumped. so no larger original to extract from.
The way I think I understand it the OS.nb file is an operating system container. This leads me to believe that the container is generic and not specific to my Phone. But I am not taking any chances. e.g. this post. Is this the case? if so what do I do now? Can I extract the OS.nb from one of my .raw files and hope I do not exceed the size limitation?
If so how do I extract the OS.nb?
Furthermore all threads I have found have outlined a Kitchen (tools package) specific to there phones. would one of these work ok for my purposes? I have tried one of these and it asks you which model you are using and spits default values specific to that devices parameters. obviously my system will not fall into one of these categories but the underlying tools may be useful. I am hoping that one of these will work and I will just have to do it the manual way. If someone would point me in the right direction to which one to use and perhaps some instructions for doing so I would greatly appreciate it.
First things first however, to combine my .raw files. Any light on my OS.nb dilemma would be great.
Thanks again for reading
Hantel Q5 = Elf clone
I cannot resolve the OS.nb file dilemma but will keep reading around. What I read so far on xda-developers is that it has been proof positive verified the the Q5 has identical hardware with the HTC Touch (GSM version), also known as HTC Elf. Reading around about the Elf, there is an Elf upgrading thread, probably you are aware of it:
http://forum.xda-developers.com/forumdisplay.php?f=374
Maybe those folks know more. Trying to flash the Hantel Q5 using the "standard" method (using the HTC RUU = ROM Upgrade Utility) doesn't go anywhere: once the RUU starts updating, ActiveSynch shuts down and RUU throws a 260 error (cannot connect). Lots of good Elf ROMs out there but out of reach for Hantel, for now ...
What you did so far is *good* work - maybe it is only a matter of persistence ...

Blackstone ROM dumping issues

This was posted in another thread, but alas, nobody replied. Hopefully somebody here can help me.
i'm trying to dump the ROM from my Blackstone. I've got the 4 raw files, but i'm kinda confused now, since all the kitchen tutorials only mention the first two files. Seeing the sizes of the files, it makes me think - the first two files are only about 8 megs, and the other two are huge. What is taht about? Why did we make the last two files and when do we get to use them?
Also, another question, the ROM on my Blackstone comes with Sunnysoft Interwrite preinstallled - is it possible to extract it's cab from dumped rom?
Thanx!
EDIT: Whooops, possible problem here:
I was dumping ROM according to this
CMD outputs info that's similar to the one in the guide
Code:
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part00 -t
real nr of sectors: 1598 - 3.12Mbyte, 0x31f000
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part01 -t
real nr of sectors: 2176 - 4.25Mbyte, 0x440000
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part02 -t
real nr of sectors: 64768 - 126.50Mbyte, 0x7e80000
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part03 -t
real nr of sectors: 166016 - 324.25Mbyte, 0x14440000
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part00 0 0x31f000 Part00.raw
CopyTFFSToFile(0x0, 0x31f000, Part00.raw)
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part01 0 0x440000 Part01.raw
CopyTFFSToFile(0x0, 0x440000, Part01.raw)
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part02 0 0x7e80000 Part02.raw
CopyTFFSToFile(0x0, 0x7e80000, Part02.raw)
[C:\itsutils]pdocread -w -d FLASHDR -b 0x800 -p Part03 0 0x1440000 Part03.raw
CopyTFFSToFile(0x0, 0x1440000, Part03.raw)
But the generated files are of different sizes:
Part00.raw 3,12 MB (3.272.704 bytes)
Part01.raw 4,25 MB (4.456.448 bytes)
Part02.raw 126 MB (132.644.864 bytes)
Part03.raw 20,2 MB (21.233.664 bytes)
WTF? Is this ok?
I used RUU_signed.nbh from Duttys HD 2.6 Xtreme rom.
And kitchen gives me a "RecMode.exe has encountered an error and needs to close...." error after this:
Code:
Please wait for this script to finish after you see "Done!".
Don't close it, but press enter to continue!
------------------------------------------------------------
NBSplit 2.1rc2
Using data chunk size = 0x800 and extra chunk size = 0x8
on file OS.NB
Done.
ImgfsFromNb 2.1rc2
Sector size is 0x800 bytes
ImgFs partition starts at 0x00840000 and ends at 0x079a0000
Dumping IMGFS at offset 0x00840000 (size 0x07160000)
Done!
And the same thing happened even in a virtual xp machine - clean machine, .net 3.5, sp3 and all the updates, which leads me to believe that ROM dump wasn't succesful. Any ideas?
Honestly, not one answer? Just a hint if i'm doing it right or wrong?

Error in compiling CM-10.1

This is the error:
Install system fs image: /home/fede/cm10.1/out/target/product/p350/system.img
/home/fede/cm10.1/out/target/product/p350/system.img+ maxsize=214106112 blocksize=135168 total=150186432 reserve=2162688
Package target files: /home/fede/cm10.1/out/target/product/p350/obj/PACKAGING/target_files_intermediates/cm_p350-target_files-eng.fede.zip
Package OTA: /home/fede/cm10.1/out/target/product/p350/cm_p350-ota-eng.fede.zip
device/lge/p350/releasetools/ota_from_target_files -v \
-p /home/fede/cm10.1/out/host/linux-x86 \
-k build/target/product/security/testkey \
--backup=true \
--override_device=pecan,p350,p355 \
--extras_file=build/tools/releasetools/extras.txt \
/home/fede/cm10.1/out/target/product/p350/obj/PACKAGING/target_files_intermediates/cm_p350-target_files-eng.fede.zip /home/fede/cm10.1/out/target/product/p350/cm_p350-ota-eng.fede.zip
Given a target-files zipfile, produces an OTA package that installs
that build. An incremental OTA is produced if -i is given, otherwise
a full OTA is produced.
Usage: ota_from_target_files [flags] input_target_files output_ota_package
-b (--board_config) <file>
Deprecated.
-k (--package_key) <key> Key to use to sign the package (default is
the value of default_system_dev_certificate from the input
target-files's META/misc_info.txt, or
"build/target/product/security/testkey" if that value is not
specified).
For incremental OTAs, the default value is based on the source
target-file, not the target build.
-i (--incremental_from) <file>
Generate an incremental OTA using the given target-files zip as
the starting build.
-w (--wipe_user_data)
Generate an OTA package that will wipe the user data partition
when installed.
-n (--no_prereq)
Omit the timestamp prereq check normally included at the top of
the build scripts (used for developer OTA packages which
legitimately need to go back and forth).
-e (--extra_script) <file>
Insert the contents of file at the end of the update script.
-a (--aslr_mode) <on|off>
Specify whether to turn on ASLR for the package (on by default).
--backup <boolean>
Enable or disable the execution of backuptool.sh.
Disabled by default.
--override_device <device>
Override device-specific asserts. Can be a comma-separated list.
-p (--path) <dir>
Prepend <dir>/bin to the list of places to search for binaries
run by this script, and expect to find jars in <dir>/framework.
-s (--device_specific) <file>
Path to the python module containing device-specific
releasetools code.
-x (--extra) <key=value>
Add a key/value pair to the 'extras' dict, which device-specific
extension code may look at.
-v (--verbose)
Show command lines being executed.
-h (--help)
Display this usage message and exit.
** option --extras_file not recognized **
make: *** [/home/fede/cm10.1/out/target/product/p350/cm_p350-ota-eng.fede.zip] Error 2
This is at the end, when generating OTA zip file.
Any clue?
Thanks.
Sorry for necroying, Did u solve this issue? thanks

[How to] Determine dd Parameters For All LG G4 Models

[How to] determine dd parameters for all LG G4 models
IMPORTANT:
Only for advanced users!
You are an advanced user if you know exactly what you are doing.
You are an advanced user if you know what to do if something went wrong.
You are NOT an advanced user if you know how to do copy+paste.
You can bring your smartphone into a state, so it no longer works.
I am not responsible for anything. The following instructions are only suggestions.
Hello,
everyone knows how to root the LG G4 with the "low effort root" method.
They copied the system partition to an ".img" file, rooted it and copied it back to the "system" partition.
Many users wonder how to get the right parameters for the "dd" commands.
Please read the complete guide and be sure that you understand it until you execute a command!
Information:
Code:
dd if=/inputfile bs=8192 count=12345 of=/outputfile
if = Input File
of = Output File
bs = Blocksize in bytes (default is 512 - to increase copy speed use multiple of 512 e.g. 8192)
count = how many blocks
skip = skip blocks before start reading
seek = skip blocks before start writing
more info: http://man7.org/linux/man-pages/man1/dd.1.html
There are different models of the LG G4 on the market.
We know that the system partition is different depending on the model of the G4.
As an example I will show you how to calculate the parameters for the LG G4 H815 (International Model).
What you need:
Windows with Send_Command.exe
Instructions:
At first we need to know where the "system" partition starts (first sector) and how big it is (partition size).
I used the first method to find these values. But I recommend the second method because it's easier.
First method (difficult method, extracting the GPT and using "gdisk" in linux to read the partition info)
What you need:
Linux with "gdisk" installed
Instructions:
Put your smartphone to "Download Mode" and connect it to the Send_Command.exe command prompt.
We need to copy the partition table to the internal storage.
The partition table of GPT (GUID Partition Table) has a size of 16384 bytes and starts at LBA2.
Each LBA has a size of 512 bytes. Because we start at LBA0 we need to add 1024 bytes.
In summary 16384 + 1024 = 17408 (bytes).
Execute the following command:
Code:
dd if=/dev/block/mmcblk0 bs=1 count=17408 of=/data/media/0/gpt_backup.img
Enter "LEAVE" to restart your phone.
You will find the (very small) file "gpt_backup.img" on your internal storage.
Switch to Linux:
Copy the file to your Linux and open the terminal. Then type this:
Code:
gdisk /yourpath/gpt_backup.img
Some warnings will occur. Ignore them.
You will see:
Code:
Command (? for help):
Enter "p" and hit "enter".
You will get a list of the partitions.
Scroll up a bit and check that you see:
"Logical sector size: 512 bytes"
Scroll down and look for the "system" partition.
You will find a line similar to this:
Code:
47 884736 9363455 4.0GiB FFFF system
Now you know the number of the "system" partition is "47".
You will see:
Code:
Command (? for help):
Type "i" and hit "enter".
You will be asked the partition number.
Enter it and hit "enter".
You will see something conatining lines similar to this:
Code:
First sector: 884736
Last sector: 9363455
Partition size: 8478720
Partition name: 'system'
We need the values from "First sector" and "Partition size".
Second method (easier method, just using "adb shell" to read the partition info)
What you need:
adb shell
usb debugging enabled
To get the "logical sector size" use:
cat /sys/block/mmcblk0/queue/logical_block_size
It should be 512
smason said:
To find in any smartphone the offset and the size of /system:
$ adb shell
[email protected]:/ $ ls -la /dev/block/bootdevice/by-name/system
ls -la /dev/block/bootdevice/by-name/system
lrwxrwxrwx root root 2015-01-02 10:50 system -> /dev/block/mmcblk0p47
[email protected]:/ $ cd /sys/block/mmcblk0/mmcblk0p47
cd /sys/block/mmcblk0/mmcblk0p47
[email protected]:/sys/block/mmcblk0/mmcblk0p47 $ cat start
cat start
884736
[email protected]:/sys/block/mmcblk0/mmcblk0p47 $ cat size
cat size
8478720
[email protected]:/sys/block/mmcblk0/mmcblk0p47 $
so:
offset = 512 * 884736 = 452984832
partition size = 512 * 8478720 = 4341104640
Cheers!
Click to expand...
Click to collapse
So "first sector" is the value from "cat start" (884736).
The "partiton size" is the value from "cat size" (8478720).
Now the mathematics (using the values from above):
Logical sector size = 512 (I never saw something different on LG G4 smartphones)
Assuming bs=8192
skip and seek: "First sector" * "Logical sector size" / bs
884736 * 512 / 8192 = 55296
count: "Partition size" * "Logical sector size" / bs
8478720 * 512 / 8192 = 529920
That was an example for the H815 (International Model).
Use your own values to calulate the "dd" parameters!
Back to Windows:
Put your smartphone to "Download Mode" and connect it to the Send_Command.exe command prompt.
Now you can copy your "system" partition to "system.img" with the following command:
Code:
dd if=/dev/block/mmcblk0 bs=8192 skip=55296 count=529920 of=/data/media/0/system.img
Replace the values with the ones you calculated for your model!
Now you could copy the "system.img" to your Linux and root it or do everything else you want.
Important: Do NOT delete the original "system.img" from your internal storage as long as you are not 100% sure your G4 is stable.
If your modifications don't work, you can copy back the original "system" partition (with "dd").
To copy the modified "system_changed.img" back to the "system" partition use the following command:
Code:
dd if=/data/media/0/system_changed.img bs=8192 seek=55296 count=529920 of=/dev/block/mmcblk0
Replace the values with the ones you calculated for your model!
Important: Be sure to use "skip" when reading and "seek" when writing.
The "dd" command should take about a minute.
Did the instructions help you?
Please give a "Thanks!"
Thank you
Hi,
thanks for this great post.
I just have one question. With your formulas and using 8K block size, I get a floating point number as result. So I used a block size of 4K instead, and I get an even number. This seems better to me so I went with it, as I believe smaller block sizes are always ok?
I'm just wondering one thing which seems not right to me. My system partition is reported to be 2.5GB:
Partition number (1-42): 39
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: A8725BAA-9E45-B2F8-8FA3-8C972F60F0CF
First sector: 836608 (at 408.5 MiB)
Last sector: 6074573 (at 2.9 GiB)
Partition size: 5237966 sectors (2.5 GiB)
Attribute flags: 1000000000000000
Partition name: 'system'
So with the formulas:
FACTOR 512 / 4096 = 0.125
skip and seek: "First sector" * "Logical sector size" / bs
836608 *FACTOR = 104576
count: "Partition size" * "Logical sector size" / bs
8478720 * FACTOR = 1059840
If I now run the dd command:
dd if=/dev/block/mmcblk0 bs=4096 skip=104576 count=1059840 of=/storage/external_SD/system.img
I get a file system.img which is 4096 MB. Should it not be 2.5GB as my original system partition?
If I use bs=512 (the default) and type
dd if=/dev/block/mmcblk0 bs=512 skip=836608 count=8478720 of=/storage/external_SD/system.img
I get a system.img of the right size (bit over 2.5GB).
I think the block size to use for "skip" is to be specified with the option ibs=XXX, not bs=XXX which only applies to "count" (according to man dd). I tried the ibs option, but the command then just doesn't work on Send_Command.exe. It doesn't even print an error but simply returns immediately.
Cheers
Jen
Hi,
which phone do you have?
Your calculation seems wrong. It's ok to use BS with 4k. I could be a bit slower then 8k, but that doesn't matter.
BUT: Look at your "count" value. Your partition size is 5237966. You used 8478720 (the value from my G4(H815EU) example). Thats wrong!!!
How to calculate with 1k and your values:
bs=1024
skip=836608*512/1024=418304
count=5237966*512/1024=2618983
Please check my calulation!!!
It's interesting, that the Send_Command shell has access to your external sd card...
I think the block size to use for "skip" is to be specified with the option ibs=XXX, not bs=XXX which only applies to "count" (according to man dd).
Click to expand...
Click to collapse
No. "bs" is the right parameter.
If you use "bs" it sets "ibs" and "obs" to the value of "bs".
Just do "dd --help" on a linux system for more details.
Hi Dominik,
oh my, how embarrassing I actually did take the wrong value from the example you posted. I used my value (the 5237966) for calculating the parameters with bs=8K, and got a floating value, so tried 4K instead... and the wrong value must have snug in. Oups.
I also get floating value on 4K now that you've pointed my mistake out:
5237966 * 512/4096= 654745.75
If I rounded this up, would this not mean that I copy a tiny bit of the next partition on the image? And if I then use the image to restore, would I not run the risk to damage something in the following partition?
Anyway, it's not a huge drama as I can just use bs=512 and it works.
Yes I have access to the SD card, the image also has copied there successfully. I was also surprised because I read in the forums that it's not possible.
I found it out with the "df" command, as the SD was listed there. I needed to use it because there's no room on my internal storage (it's a ridiculous 8GB on the LG H735) to store the image there.
My system partition is only 2.5GB so I don't think I have to reformat, but you are right it would be better to use ext4.
Ok
I removed my information about formatting the sd card.
You dont't have to format it. FAT32 is ok.
So you can use your sd card on systems which don't support ext4 too.
I have the LG G4S (H735). It's unusable without rooting as it only has 8GB internal memory. That's why I'm trying to root it now.
jen.magnolis said:
I have the LG G4S (H735). It's unusable without rooting as it only has 8GB internal memory. That's why I'm trying to root it now.
Click to expand...
Click to collapse
Ok, good luck.
Please open a new thread if you have questions about rooting your phone.
Or is there already one? Maybe these?
http://forum.xda-developers.com/g4/help/rooting-lg-h735-g4-beat-t3192491
http://forum.xda-developers.com/g4/general/lg-g4s-world-root-lg-devices-t3231759/page7
Oh. Just saw that you are already there
dominik-p said:
Ok, good luck.
Please open a new thread if you have questions about rooting your phone.
Or is there already one? Maybe these?
http://forum.xda-developers.com/g4/help/rooting-lg-h735-g4-beat-t3192491
http://forum.xda-developers.com/g4/general/lg-g4s-world-root-lg-devices-t3231759/page7
Oh. Just saw that you are already there
Click to expand...
Click to collapse
I just created a new thread too to focus on the particular problem I have:
http://forum.xda-developers.com/g4/general/rooting-lg-g4s-h735-t3243549
this guide helped in dumping boot and recovery partitions.
thank you very much sir! i successfully dumped my boot and recovery partition using dd in my mediatek device by following your guide.
sparksthedev said:
thank you very much sir! i successfully dumped my boot and recovery partition using dd in my mediatek device by following your guide.
Click to expand...
Click to collapse
Congratulations
Did you use the first (more komplex) oder the second method for your device?
I saw that you had problems in this thread:
http://forum.xda-developers.com/showthread.php?p=65907557#post65907557
And you wrote a guide for MTK devices here:
http://forum.xda-developers.com/general/general/guide-dumping-boot-img-recovery-img-t3339530
This doesn't work with the LG G4, but I think it will help many others.
Thank you
My sister asked me to root her phone. It seems more complicated than anything I did in the past (HTC Wildfire, Galaxy Core Plus, Xperia M4A).
I tried this tutorial and it kinda worked, but I can't mount image I got, so it's useless (image, not tutorial!).
Phone is LG-H736 (Beat). I got this result in gdisk:
Code:
Partition number (1-42): 39
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: A9520AE6-ABC6-F107-E8FE-B37C4C30CB77
First sector: 836608 (at 408.5 MiB)
Last sector: 6074573 (at 2.9 GiB)
Partition size: 5237966 sectors (2.5 GiB)
Attribute flags: 1000000000000000
Partition name: 'system'
The 8K bs gave me floating point result, so I used 0,5K.
So the dd command were:
Code:
dd if=/dev/block/mmcblk0 bs=512 skip=836608 count=5237966 of=/storage/external_SD/system.img
BTW, I had access to SDCard and I didn't need to open ports...
EDIT: I got the system.img. The problem was I haven't got enough space on SD card.
But now I bricked it...
https://forum.xda-developers.com/g4/help/softbricked-g4-beat-lg-h735-t3959237

Categories

Resources