[Q] Flash baseband Without Odin? - Samsung Galaxy W I8150

Hello guys, I'm back.
And as I said in title, does anyone here have an alternative to flash a baseband without Odin?
Regards, Kreaz.

http://forum.xda-developers.com/showthread.php?t=2098679
Here You are. You can flash in CWM.
Sent from my GT-I8150 using xda premium

skrillex13 said:
http://forum.xda-developers.com/showthread.php?t=2098679
Here You are. You can flash in CWM.
Sent from my GT-I8150 using xda premium
Click to expand...
Click to collapse
Tested? Because in the thread itself OP stated that they are flashable via Odin.

Oh sorry my bad. I rembered wrong. I thought that you can flash it via CWM Sorry again.

i believe you can issue dd command to /dev/block/mmcblk0p6 for the baseband
in flashable zip of kernel i used, it issue command to extract the amss.mbn to /dev/block/mmcblk0p6

hadidjapri said:
i believe you can issue dd command to /dev/block/mmcblk0p6 for the baseband
in flashable zip of kernel i used, it issue command to extract the amss.mbn to /dev/block/mmcblk0p6
Click to expand...
Click to collapse
So we'll use the dd if="/path/to/amss.mbn" of="/dev/block/mmcblk0p6" then?
Will try it later, thanks!

Kreaz said:
So we'll use the dd if="/path/to/amss.mbn" of="/dev/block/mmcblk0p6" then?
Will try it later, thanks!
Click to expand...
Click to collapse
Don't forget to backup the partition first.
Code:
su
bbpart="/dev/block/mmcblk0p6"
blksz=$((128*1024))
dd if=$bbpart of=/mnt/sdcard/orig-baseband.img bs=$blksz
dd if=/path/to/amss.mbn of=$bbpart bs=$blksz
As you can see, I specified a block size of 128 KiB, because many flash memory are 'zoned' into 128-KiB blocks.
By matching the bs= of the dd command with the blocksize of the flash memory, the process becomes faster and also less stressing to your flash memory: instead of cycling through "read-modify-write" process 8192 times per block, it can use a single "direct-overwrite" for each block.
And here's an empirical proof of the importance of matching bs= with blocksize: http://kim.oyhus.no/FlashBlockSize.html
(In the latter article, the writer's flash memory apparently had 8 KiB blocks instead of 128 KiB, but that's allright; as you can see, specifying higher bs= does not result in slowdown).

pepoluan said:
Don't forget to backup the partition first.
Code:
su
bbpart="/dev/block/mmcblk0p6"
blksz=$((128*1024))
dd if=$bbpart of=/mnt/sdcard/orig-baseband.img bs=$blksz
dd if=/path/to/amss.mbn of=$bbpart bs=$blksz
As you can see, I specified a block size of 128 KiB, because many flash memory are 'zoned' into 128-KiB blocks.
By matching the bs= of the dd command with the blocksize of the flash memory, the process becomes faster and also less stressing to your flash memory: instead of cycling through "read-modify-write" process 8192 times per block, it can use a single "direct-overwrite" for each block.
And here's an empirical proof of the importance of matching bs= with blocksize: http://kim.oyhus.no/FlashBlockSize.html
(In the latter article, the writer's flash memory apparently had 8 KiB blocks instead of 128 KiB, but that's allright; as you can see, specifying higher bs= does not result in slowdown).
Click to expand...
Click to collapse
Thanks for the backup assist.
Suprisingly, I found 2 files in my downloaded zip. amss.mbn and adsp.mbn
I've pushed (and backed up the original one) the amss.mbn to mmcblk0p6,
But where in the /dev/block/ should adsp.mbn be pushed?

Kreaz said:
Thanks for the backup assist.
Suprisingly, I found 2 files in my downloaded zip. amss.mbn and adsp.mbn
I've pushed (and backed up the original one) the amss.mbn to mmcblk0p6,
But where in the /dev/block/ should adsp.mbn be pushed?
Click to expand...
Click to collapse
according to here adsp.mbn should go to mmcblk0p9

After some thinking, I had to ask the question:
Is it safe, if even possible, to flash baseband via Terminal, while the baseband is being used?
I still think that the best way to flash baseband is via CWM...
-- Sent from a GT-I8150 running ICS perfectly well. F'U, Sams#!t --

pepoluan said:
After some thinking, I had to ask the question:
Is it safe, if even possible, to flash baseband via Terminal, while the baseband is being used?
I still think that the best way to flash baseband is via CWM...
-- Sent from a GT-I8150 running ICS perfectly well. F'U, Sams#!t --
Click to expand...
Click to collapse
Yeah, I was just thinking the same thing, the baseband is already being used, replacing it "shouldn't" be safe. Then again who am I to talk, I didn't believe in inventing a time machine but look at me now
Sent From The Future Using My Rocking Wonder Running Android 5.0

BTW, here's a whole gaggle of CWM-flashable basebands :
http://forum.xda-developers.com/showthread.php?p=36690782
-- Sent from a GT-I8150 running ICS perfectly well. F'U, Sams#!t --

Related

[GUIDE] How to make an Odin ROM

How to make an Odin flashable ROM
This is just a small guide I want to share with anyone who's interested in the commands I personally use. Feel free to correct me or give better commands / instructions.
@Moderators:
If this thread is in the wrong section or already present at XDA, PM me.
This needs a UNIX compatible OS - like Linux or Mac OS X.
On Windows, you can use "Cygwin".
Click to expand...
Click to collapse
Use the dd (datadump) command to make the .rfs files
Of course you need to connect your phone via USB and have ADB prepared on your computer.
# Get Root access first
Code:
su
# Do this first to mount the /system R/W
(thanks to scheichuwe for the simplified command)
Code:
mount -o remount,rw /dev/block/stl9 /system
# Dump the needed data / partitions to your /sdcard
Code:
dd if=/dev/block/stl9 of=/sdcard/factoryfs.rfs bs=4096
dd if=/dev/block/stl11 of=/sdcard/cache.rfs bs=4096
dd if=/dev/block/bml7 of=/sdcard/zImage bs=4096
dd if=/dev/block/bml12 of=/sdcard/modem.bin bs=4096
# Make the tar ball
Code:
tar -H ustar -c factoryfs.rfs cache.rfs modem.bin zImage > darky.tar
# MD5 it for a security check
Code:
md5sum –t darky.tar >> darky.tar
# Rename the tar file
Code:
mv darky.tar darky.tar.md5
Optional:
Make your own pit file
The pit file is used to set the partition layout (Partition Information Table).
# Dump the pit
Code:
dd if=/dev/block/bml2 of=/sdcard/darky.pit bs=4096
I hope I could help you with that
- darkyy.
Nice
Yeah first
Oh and one more thing:
If someone is gonna rate this thread 1 star, please explain here why.
So this means I can make an Odin rom of my current installed config? Or am I missing something?
If you then flash your tar + pit, you have your kernel and rom restored? This would be an awesome way to backup a good config, no?
VenQWish said:
So this means I can make an Odin rom of my current installed config? Or am I missing something?
If you then flash your tar + pit, you have your kernel and rom restored? This would be an awesome way to backup a good config, no?
Click to expand...
Click to collapse
Exactly - these commands will dump the data directly from your current phone.
And yes, you'll have a 1 to 1 Backup.
That is actually VERY useful! I'm constantly switching between a modded Insanity and CM7, and constantly reverting to stock, flashing custom kernels and flashing nandroids is getting quite annoying now.
Don't have access to a linux machine now, I'll try this asap, thanks!
Wow, dasch mal nützlich ville dank^^
Neat. Thank you!
Quipeace said:
That is actually VERY useful! I'm constantly switching between a modded Insanity and CM7, and constantly reverting to stock, flashing custom kernels and flashing nandroids is getting quite annoying now.
Don't have access to a linux machine now, I'll try this asap, thanks!
Click to expand...
Click to collapse
Well you can install cygwin, just remember to install bash terminal when cygwin setup is running.
Sent from my GT-P1000 using Tapatalk
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
Galaxy S is running on yaffs2? Interesting
Code:
mount -o rw,remount /system
That should work too...
Is this the same as this?
http://forum.xda-developers.com/showthread.php?t=943588
Mackzen said:
Is this the same as this?
http://forum.xda-developers.com/showthread.php?t=943588
Click to expand...
Click to collapse
No:
The instructions from drakyy create a flashable ROM from the phone.
The Application from bohdans creates a flashable ROM from files on your computer
scheichuwe said:
Galaxy S is running on yaffs2? Interesting
Code:
mount -o rw,remount /system
That should work too...
Click to expand...
Click to collapse
Thanks - gonna change it in the first post
Verified?
Cool stuff Darkyy,
is this working without any issues, any testers?
mr_at_sgs said:
Cool stuff Darkyy,
is this working without any issues, any testers?
Click to expand...
Click to collapse
It's what we used for the Darky's Resurrection Edition
Damn. Left my laptop charger at work. Just when I need battery also.
Great thread. Thank you.
Tricky103 UltraSlim Essential Rom on DamianGTO Ultimate kernel
I have a problem. When tryign to create the tar-file i get:
cannot create jesper.tar: read-only file system.
What to do?
Does this also work when the partitions are NOT RFS.
Like all in ext4?
Will Odin be able to flash that image?
I somehow doubt it...
zurchpet said:
Does this also work when the partitions are NOT RFS.
Like all in ext4?
Will Odin be able to flash that image?
I somehow doubt it...
Click to expand...
Click to collapse
Good question..... I'd like to know this too..
Although even if having to disable lag fix to create it the apply again after flashing is still a quicker way to toggle between your current rom and cm7..
Neat Darky
but can i do these dumps on the phone without a pc or adb
Sent from my GT-I9000 using XDA App
Perhaps some could write a script to do this at the phone
Sent from my GT-I9000 using XDA App

Fixing a bootloader-bricked Galaxy S3 using an SD card (Qualcomm SGS3 variants)

This thread is dedicated to booting Qualcomm Snapdragon-based Samsung Galaxy S3 models from an SD card.
As I understand it, this only works because the Snapdragon boot ROM (NOT the bootloader, which resides on the eMMC - this is part of the CPU) has a fallback mode which reads the bootloader from an SD card if the eMMC fails. To date, the only devices I am aware of that have this fallback mode are the Snapdragon Galaxy S3 models designed for use in the US. As such, this will not work on international/Exynos based phones.
The process of preparing an SD card for this is fairly simple. All that is needed is a working, rooted phone and an empty SD card.
The dumps at the end of this post were obtained by various people using a variant of the following command:
Code:
busybox dd if=/dev/block/mmcblk0 of=/sdcard/backup.bin bs=1M count=70
Depending on the device, you may need more than 70MB, but on the Sprint Galaxy S3, the first 70MB of the eMMC contains everything needed for download mode without including identifying information in the dump, like the EFS partition for example.
If you are absolutely certain your SD card is empty, you can change the dd command to "of=/dev/block/mmblk1" to write the eMMC backup image directly to the SD card instead of to a file. Be very careful working with dd! mmcblk0 is the eMMC and mmcblk1 is the external SD card.
This should be obvious, but cross-device dumps will not work! This is the main reason so many people are finding themselves in need of this guide!
Use common sense - do your research and don't cross-flash, especially between US and international ROMs!
If your model is not listed there, search the forums or ask someone to make a dump for you.
Please note: if your phone model is not listed here, that doesn't mean this method won't work - however, I would appreciate it if everyone would do their research instead of bombarding me with private messages.
I hope this helps! Flash wisely!
For posterity, this is the content of the OP that led me to discover the SD boot mode by accident:
I am trying to fix a 16GB Sprint Samsung Galaxy S3 that went through a rooting process and failed, leaving download mode and most other recovery options inaccessible.
I don't have a USB download mode jig or JTAG equipment, but I noticed it's recognized as "05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)" when connected to a Linux computer.
From what I've read, not many people have gotten it out of this mode, however, I've found guides that imply the NAND/eMMC is writable in this mode with qdload.pl. None of the files I've seen want to be flashed with this tool - the generic, unsigned 8960_msimage.mbn/MPRG8960.hex files to get it into EMMC USB storage mode don't execute/stay intact after flashing, so I'm guessing they failed the signature check.
Is anyone willing to dump the partition table/bootloader from their working 16GB Sprint SGS3 for me?
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/backup.bin bs=1048576 count=70
I unfortunately don't know what stages of the bootloader were corrupted, and I'm not sure what address to flash aboot to, if that's even possible with qdload.
Downloads:
Sprint SPH-L710: http://www.mediafire.com/download/231uhy6l80jx74n/debrick_sph_l710.img.xz (Thanks @CNexus!)
AT&T SGH-i747: http://d-h.st/iEy (Thanks @Android_Geeek!)
T-Mobile SGH-T999: http://www.mediafire.com/download/grgyera66w0rt25/debrick_SGH-T999.img (Thanks @Techlyfe!)
Sure, gimme a sec.
EDIT: You know you can find these in the firmware zips freezes has in his thread, right?
CNexus said:
Sure, gimme a sec.
EDIT: You know you can find these in the firmware zips freezes has in his thread, right?
Click to expand...
Click to collapse
I've been looking around for stock firmware packages and couldn't find them. I'll look a little harder...
EDIT: This? sbl1.mbn? Downloading it, but I'll be pretty disappointed if it doesn't work after using ~700MB...
Top of this thread you will find all the latest MD4 stuff
http://forum.xda-developers.com/showthread.php?p=32176586
Sent from the future via Tapatalk 4
No, the firmware zips, not the ROMs
And yes. The bootloaders are there, they're smaller, like 20~ MB
Grab the one that says "MD4 firmware/modem/baseband"
EDIT: This thread may be useful, it's a different device but the board is the same (MSM8960).
CNexus said:
No, the firmware zips, not the ROMs
And yes. The bootloaders are there, they're smaller, like 20~ MB
Grab the one that says "MD4 firmware/modem/baseband"
Click to expand...
Click to collapse
Found it, thanks. Unfortunately, flashing the SBL didn't fix it.
What address does aboot get flashed to? Can someone post the partition table so I can figure out the offset?
Here are two more links that give more technical information on the MSM8960 bootloaders.
Here
http://forum.xda-developers.com/showthread.php?t=1856327
And here
http://forum.xda-developers.com/showthread.php?t=1769411
You should be able to find most everything you need there.
CNexus said:
Here are two more links that give more technical information on the MSM8960 bootloaders.
Here
http://forum.xda-developers.com/showthread.php?t=1856327
And here
http://forum.xda-developers.com/showthread.php?t=1769411
You should be able to find most everything you need there.
Click to expand...
Click to collapse
I've been over those threads multiple times and I still don't know what address to plug into qdload to flash aboot (mmcblk0p5).
parted /dev/block/mmcblk0 might help.
Ok, I was just trying to help.
Code:
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 67.1MB 62.9MB modem
2 67.1MB 67.2MB 131kB sbl1
3 67.2MB 67.5MB 262kB sbl2
4 67.5MB 68.0MB 524kB sbl3
5 68.0MB 70.1MB 2097kB aboot
6 70.1MB 70.6MB 524kB rpm
CNexus said:
Ok, I was just trying to help.
Code:
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 67.1MB 62.9MB modem
2 67.1MB 67.2MB 131kB sbl1
3 67.2MB 67.5MB 262kB sbl2
4 67.5MB 68.0MB 524kB sbl3
5 68.0MB 70.1MB 2097kB aboot
6 70.1MB 70.6MB 524kB rpm
Click to expand...
Click to collapse
Thanks! Sorry I'm being so demanding - you have no obligation to help me, after all.
Could I trouble you for the size in bytes? Again, thanks for the help!
Edit: This is probably asking too much, but it would be immensely helpful:
"dd if=/dev/block/mmcblk0 of=/sdcard/backup.bin bs=1M count=70"
gTan64 said:
"dd if=/dev/block/mmcblk0 of=/sdcard/backup.bin bs=1M count=70"
Click to expand...
Click to collapse
Anyone with a rooted SGS3 willing to do this? I don't know what got messed up or how - the guy who gave this phone to me just said it wouldn't reboot after one of the steps in the rooting process - but flashing that backup with qdload could be a good method of fixing bricked phones without JTAG!
In the spirit of sharing, if I manage to fix it, I'll be doing an Ubuntu "port" (building a bootloader/kernel for desktop Linux distros, not Ubuntu Touch), hopefully with Freedreno drivers too.
Sorry, couldn't get the size in bytes or else I would have posted that instead of the MB
Here's the output of dd
http://db.tt/nvwsj4e5
CNexus said:
Sorry, couldn't get the size in bytes or else I would have posted that instead of the MB
Here's the output of dd
http://db.tt/nvwsj4e5
Click to expand...
Click to collapse
It's supposed to be the first 70MB of the eMMC chip, containing the partition table, the 64MB firmware partition, the three bootloader stages, and aboot. Unless I gave the wrong command or you changed it, 70 bytes isn't going to be much help
gTan64 said:
It's supposed to be the first 70MB of the eMMC chip, containing the partition table, the 64MB firmware partition, the three bootloader stages, and aboot. Unless I gave the wrong command or you changed it, 70 bytes isn't going to be much help
Click to expand...
Click to collapse
I know, but that is the output, I was surprised as well
CNexus said:
I know, but that is the output, I was surprised as well
Click to expand...
Click to collapse
I'm guessing the version of dd on your phone is a stripped down version that doesn't recognize suffixes.
dd if=/dev/block/mmcblk0 of=/sdcard/backup.bin bs=1024 count=71680
gTan64 said:
It's supposed to be the first 70MB of the eMMC chip, containing the partition table, the 64MB firmware partition, the three bootloader stages, and aboot. Unless I gave the wrong command or you changed it, 70 bytes isn't going to be much help
Click to expand...
Click to collapse
I know, but that is the output, I was surprised as well
EDIT: dd would not accept "MB" for some reason, so I just wrote out the number of bytes. Here's the file
http://d-h.st/G3l
Md5sum: 12ca987274d905865a337d687f9e2a73
CNexus said:
I know, but that is the output, I was surprised as well
EDIT: dd would not accept "MB" for some reason, so I just wrote out the number of bytes. Here's the file
http://d-h.st/G3l
Md5sum: 12ca987274d905865a337d687f9e2a73
Click to expand...
Click to collapse
I miscalculated - it should have been 70.6MB - but I was able to find the aboot offset, so it's okay!
Huge thanks! Flashing now!
gTan64 said:
I miscalculated - it should have been 70.6MB - but I was able to find the aboot offset, so it's okay!
Huge thanks! Flashing now!
Click to expand...
Click to collapse
After the process failed for the umpteenth time, I concluded qdload only loads code into RAM and executes it - of course, in this case, it wasn't executing the backup. It seems I need an alternative method of accessing the eMMC.
The aboot/appsbl address I used was incorrect, so I still need to figure out where it's supposed to be loaded in RAM.
This doesn't appear to be common knowledge, unfortunately. Looks like I may have to JTAG it after all...
gTan64 said:
Looks like I may have to JTAG it after all...
Click to expand...
Click to collapse
I am happy to eat those words! I was able to get CNexus's backup onto an SD card (fixing the rpm, tz, and boot.img partitions that weren't part of the backup) and it booted that with no trouble! I'm currently in download mode flashing a stock ROM! Yay!!!
Thanks CNexus for the eMMC dump! I'll be posting a fixed dd image for an SD card soon for anyone who wants it. No more JTAG!
gTan64 said:
I am happy to eat those words! I was able to get CNexus's backup onto an SD card (fixing the rpm, tz, and boot.img partitions that weren't part of the backup) and it booted that with no trouble! I'm currently in download mode flashing a stock ROM! Yay!!!
Thanks CNexus for the eMMC dump! I'll be posting a fixed dd image for an SD card soon for anyone who wants it. No more JTAG!
Click to expand...
Click to collapse
HOLY GEEZ. AWESOME SAUCE. Please post a thread in development outlining your process so we can get it stickied !!
Also, PM me a Dropbox link to it or something and I'll mirror everywhere lol :thumbup::beer::beer:
This is actually great. Do you happen to know how the phone was initially bricked?
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.

[Info] mmcblk* partitons reference of the P6 B107

Located in /dev/block, may be useful
Code:
mmcblk0p1 -> /xloader
mmcblk0p2 -> /round (-empty-)
mmcblk0p3 -> /nvme
mmcblk0p4 -> /misc
mmcblk0p5 -> /splash (-empty-)
mmcblk0p6 -> /oeminfo
mmcblk0p7 -> /reserved1 (-empty-)
mmcblk0p8 -> /reserved2 (-empty-)
mmcblk0p9 -> /splash2
mmcblk0p10 -> /recovery2 (-empty-)
mmcblk0p11 -> /recovery
mmcblk0p12 -> /boot
mmcblk0p13 -> /modemimage
mmcblk0p14 -> /modemnvm
mmcblk0p15 -> /modemnvm2
mmcblk0p16 -> /system
mmcblk0p17 -> /cache
mmcblk0p18 -> /cust
mmcblk0p19 -> /userdata
I took this info opening the direct accesses in /dev/block/platform/hi_mci.1/by-name
To extract the boot or recovery img with dd:
Code:
adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/recovery.img
dd if=/dev/block/mmcblk0p12 of=/sdcard/boot.img
TheProd said:
To extract the boot or recovery img with dd:
Code:
adb shell
su
dd if=/dev/block/mmcblk0p11 of=/sdcard/recovery.img
dd if=/dev/block/mmcblk0p12 of=/sdcard/boot.img
Click to expand...
Click to collapse
I already extracted recovery.img But i can't unpack it, i use unyaffs.exe but i get "broken image file" D:
Same with the other *.img files
Code:
BOARD_KERNEL_CMDLINE vmalloc=512M k3v2_pmem=1 mmcparts=mmcblk0:p1(xloader),p3(n
me),p4(misc),p5(splash),p6(oeminfo),p7(reserved1),p8(reserved2),p9(splash2),p10
recovery2),p11(recovery),p12(boot),p13(modemimage),p14(modemnvm1),p15(modemnvm2
,p16(system),p17(cache),p18(cust),p19(userdata);mmcblk1:p1(ext_sdcard)
BOARD_KERNEL_BASE 00000000
BOARD_PAGE_SIZE 2048
BOARD_RAMDISK_ADDR 01400000
Unpacking ramdisk to "/ramdisk/" . . .
Compression used: gzip
2085 blocks
Done!
Boot.img unpacked, K3V2 uses ARMv7 Instruction Set. Let's see if we can't get something cooking already
I unpacked recovery and boot too
Sent from my HUAWEI P6-U06 using xda app-developers app
Good show, unless your planning on beginning work on a Custom Recovery what are you going to gain by unpacking the recovery.img?
I see your working on a CM port, so wish you all the best on that. I'll be porting MIUIv5 for the Ascend P6 as I did for a few other devices, also going to have another crack at porting Flyme OS since I already ported 90% to my previous device.
Best Regards,
s89
I unpacked boot and recovery to get info for BoardConfig.mk
Ty
Sent from my HUAWEI P6-U06 using xda app-developers app
If you've already got a build environment setup you may aswel build CWM from CM sources, we have more then enough information here to proceed. Even more convenient considering you have the recovery.img unpacked. Google "Build CWM Cyanogenmod" for more info. Failing that i'll setup a build environment and do so myself tomorrow evening.
Best Regards,
s89
I'm setting up the enviroment to build CWM, i hope to get it done in a few hours, anyways, i got bad news. My laptop screen broke today, and i send it to repair tomorrow and i don't know how much time will take :/
S34Qu4K3 said:
I'm setting up the enviroment to build CWM, i hope to get it done in a few hours, anyways, i got bad news. My laptop screen broke today, and i send it to repair tomorrow and i don't know how much time will take :/
Click to expand...
Click to collapse
Aww man that's unfortunate, wishing a speedy recovery for said laptop aha. Are you continuing the build on another machine or using an external monitor for the meantime?
Best Regards,
s89
Stickman89 said:
Aww man that's unfortunate, wishing a speedy recovery for said laptop aha. Are you continuing the build on another machine or using an external monitor for the meantime?
Best Regards,
s89
Click to expand...
Click to collapse
I got an small laptop and a pc, i have to install linux and will continue working (i think) i expect to be at least 1 week without my laptop (maybe i got it with screen broken ultil i wait the new screen)
Dam git sync, so ****ing long
Just a question, if i have in my .fstabfile the partition routes this way:
Code:
/dev/block/platform/hi_mci.1/by-name/sdcard
I have to change it to
Code:
/dev/block/mcblk....
In BoardConfig.mk or can i let it original? Looks the same for me, /dev/block/platform/hi_mci.1/by-name/ points the mcblk, i want to be sure
S34Qu4K3 said:
Just a question, if i have in my .fstabfile the partition routes this way:
Code:
/dev/block/platform/hi_mci.1/by-name/sdcard
I have to change it to
Code:
/dev/block/mcblk....
In BoardConfig.mk or can i let it original? Looks the same for me, /dev/block/platform/hi_mci.1/by-name/ points the mcblk, i want to be sure
Click to expand...
Click to collapse
EXT SDCard Mounts at:
Code:
/dev/block/mmcblk1p1
so your recovery.fstab should be setup like...
Code:
/sdcard vfat /dev/block/mmcblk1p1
So yup it needs to be changed to the second option.
I'm still syncing too... -.- ...zZzZzZzZz tired
Best Regards,
s89​
Stickman89 said:
EXT SDCard Mounts at:
Code:
/dev/block/mmcblk1p1
so your recovery.fstab should be setup like...
Code:
/sdcard vfat /dev/block/mmcblk1p1
So yup it needs to be changed to the second option.
I'm still syncing too... -.- ...zZzZzZzZz tired
Best Regards,
s89​
Click to expand...
Click to collapse
But /dev/block/platform/hi_mci.1/by-name/sdcard points to /dev/block/mmcblk1p1, so it shouldn't be necessary (i'll use /dev/block/mmcblk1p1 style, to be sure anyway)
In 4 hours, i leave my lapton in the shop, in another hour, i got it repaired (115€ D
I've built CWM from CM sources. Haven't tried it as of yet though.
Flash at your OWN risk. I will not take responsibility for any actions taken by the user in combination with the provided file... By downloading this image your accepting full liability for any issues that should arise as a result of undergoing ANY flashing/modding on YOUR device.
Removed for the time being! Do not use...
Best Regards,
s89
Stickman89 said:
I've built CWM from CM sources. Haven't tried it as of yet though.
Flash at your OWN risk. I will not take responsibility for any actions taken by the user in combination with the provided file... By downloading this image your accepting full liability for any issues that should arise as a result of undergoing ANY flashing/modding of your device.
Best Regards,
s89
Click to expand...
Click to collapse
My repo still 93% ;___;
Why you don't make a thread posting it??
Good job bro
We can try recoverys without flash using fastboot? Like the kernel?
S34Qu4K3 said:
My repo still 93% ;___;
Why you don't make a thread posting it??
Good job bro
We can try recoverys without flash using fastboot? Like the kernel?
Click to expand...
Click to collapse
I've tried "fastboot boot recovery.img" to no avail. The output is as follows...
Output:
Code:
downloading 'boot.img'...
OKAY [ 0.193s]
booting...
FAILED (remote: invalid command)
finished. total time: 0.194s
As you can see... It's expecting a boot.img so this command is only available for booting ramdisk & kernel.
Stickman89 said:
I've tried "fastboot boot recovery.img" to no avail. The output is as follows...
Output:
Code:
downloading 'boot.img'...
OKAY [ 0.193s]
booting...
FAILED (remote: invalid command)
finished. total time: 0.194s
As you can see... It's expecting a boot.img so this command is only available for booting ramdisk & kernel.
Click to expand...
Click to collapse
So, we have to flash it... Bad bad...D:
I tried fastboot boot recovery recovery.img but i get:
Code:
fastboot boot recovery recovery.img
cannot load 'recovery'
I don't think that command is applicable until post flash as according to cyanogenmod documentation:
Code:
Installing recovery using fastboot
You can use fastboot to install your recovery image to the device.
Installing ClockworkMod Recovery on the device
Connect the device to the computer via USB.
Make sure the fastboot binary is in your PATH or that you place the downloaded image in the same directory as fastboot.
Open a terminal on your PC and reboot the device into fastboot mode by typing adb reboot bootloader or by using the hardware key combination.
Once the device is in fastboot mode, verify your PC sees the device by typing fastboot devices
If you don't see your device serial number, and instead see "<waiting for device>", fastboot is not configured properly on your machine. See fastboot documentation for more info.
Flash ClockworkMod Recovery onto your device by entering the following command: fastboot flash recovery your_recovery_image.img where the latter part is the name of the file you downloaded.
Once the flash completes successfully, reboot the device into recovery to verify the installation. This can be done by typing fastboot boot your_recovery_image.img.
Note: Some ROMs overwrite recovery at boot time so if you do not plan to immediately boot into recovery to install CyanogenMod, please be aware that this may overwrite your custom recovery with the stock one.

[SPRINT] Fix for OTA update with TWRP issue

I am making a separate thread specifically for Sprint because I have seen so many posts from Sprint users that took the OTA update, and I don't want this to be buried in the other thread.
If you have a Sprint G2, then you have to wipe the fota partition AND the misc partition.
Thanks so much to autoprime from #lg-g2 for pointing me in the right direction.
Code:
adb shell
cd /dev/block/platform/msm_sdcc.1/by-name
dd if=/dev/zero of=./fota
dd if=/dev/zero of=./misc
If you can't get adb to talk to your phone and only have the terminal from TWRP, then you will have to type the paths out -- make sure you get them right
-- Brian
I keep getting an error saying -
Code:
[email protected]:/dev/block/platform/msm_sdcc.1/by-name # dd if=/dev/zero of=./misc
zero of=./misc
./misc: write error: No space left on device
32769+0 records in
32768+0 records out
16777216 bytes transferred in 1.332 secs (12595507 bytes/sec)1
That is normal since we didn't specify a block size and a count. When dd fills the partition with zeros it errors out that it is out of space. The goal here is to do just that, fill the entire partition with zeros
-- Brian
runningnak3d said:
That is normal since we didn't specify a block size and a count. When dd fills the partition with zeros it errors out that it is out of space. The goal here is to do just that, fill the entire partition with zeros
-- Brian
Click to expand...
Click to collapse
That makes sense. Still learning about this side of android. Appreciate the help bro.
Silicon Knight said:
That makes sense. Still learning about this side of android. Appreciate the help bro.
Click to expand...
Click to collapse
does this work on D802 with CWM?
Also, i actually formatted all partitions shown on CWM advance menu.. does it mean my EFS is corrupt? I did not make EFS backup..

How To Guide How to backup your partitions with command line (requires root)

How to backup partition images with dd on the command line (root required)​
We don't currently have a working custom recovery for the Xperia 10 III, but if you have root there's a simple method to dump partition images.
This is a very good idea and you should do it at least once, especially if you like to mess around the device a lot.
You won't be able to do this before you root, so by the time you do some partitions will not be stock anymore. Use XperiFirm instead to get the clean stock images.
Special partitions:​
The userdata partition holds all your personal files and system settings. It's huge (about 105 GB) and obviously you can't dump it into itself. You can dump it on an SD card if it's 128+ GB.
The super partition is a physical partition that contains several logical partitions (including system and vendor) That's why you won't find those in the partition list. This is done on Android 10+ devices to allow those logical partitions to be resized or rearranged as needed. You don't need to split out the internal logical partitions, you can flash back the entire super partition. The stock firmware also comes with a super image, not individual logical partitions.
Using a helper script:​There's a Magisk module called Backup (by Draco) which gives you a command line shell script you can use if you prefer. It mostly does the same things I described above. The script is here if anybody wants to just grab it directly.
On the plus side, the script knows to dump only the active A/B image (which is the one that interests you most). On the flip side, it doesn't have a feature to skip userdata.
So here is a shell command that will use the backup script to dump all partitions, but only those matching your device's active A/B slot, and skips userdata:
Code:
backup $(ls /dev/block/bootdevice/by-name/ | grep -v userdata | sed 's/_[ab]$//')
And here's one that also skips super:
Code:
backup $(ls /dev/block/bootdevice/by-name/ | grep -v userdata | grep -v super | sed 's/_[ab]$//')
How to dump partitions manually:​If you can't/won't use the helper script you can do it by hand. All the following commands need root:
Find the names of all the partitions:
Code:
ls /dev/block/bootdevice/by-name/
Dump one specific partition identified by NAME:
Code:
dd if=/dev/block/bootdevice/by-name/NAME of=NAME.img
Dump all partitions except userdata:
Code:
ls /dev/block/bootdevice/by-name/ | grep -v userdata | while read NAME; do echo dd if=/dev/block/bootdevice/by-name/${NAME} of=${NAME}.img; done
Find the active slot:
Code:
getprop ro.boot.slot_suffix
Get checksums for all the images after the dump:
Code:
md5sum *.img
Confused about _a and _b partitions?​You should read about A/B Seamless Updates.
Long story short, some partitions have two copies eg. boot_a and boot_b. When you boot up the device you use the partitions in one slot (eg. the _a partitions). When an OTA update is being downloaded, it writes into the partitions for the other slot (eg. the _b partitions). Your phone can stay in use while this happens. If the OTA fails nothing is broken, you just keep using the good slot partitions. After the OTA is successful you switch to the other slot and also have the previous version in the other slot in case you need to switch back.
This means that some of the _a and _b images for the same partition can be different for you! So it's strongly recommended to do the checksums, and also to find out which is your active slot, so you know which partitions you're using right now.
I used a 128 GB card to take a backup of userdata. The backup script had some trouble with the backup location being on the storage card for some reason and I didn't have time to figure it out, but the dd command I gave above worked fine.
Code:
# time dd if=/dev/block/bootdevice/by-name/userdata of=userdata.img
112111374336 bytes (104 G) copied, 2342.274225 s, 46 M/s
39m02.31s real 1m11.78s user 14m44.72s system
Code:
# adb pull /storage/1234-ABCD/backup/userdata.img ./
/storage/1234-ABCD/backup/userdata.img: 1 file pulled, 0 skipped.
87.2 MB/s (112111374336 bytes in 1225.663s)
So that's 104 GB that took 39 minutes to be written to a new Samsung Evo U3/V30 microSDXC (46 MB/sec real write speed) and 20 minutes to be read to the PC (Samsung Evo M.2) with adb pull over USB (87 MB/sec read speed). Just so you know what you're in for.
I was looking into whether I could speed up the process of taking userdata snapshots by dumping the partition directly to the PC, but you need to be root to access the device block. The stock ROM doesn't allow the command adb root, but I found this blog post which made me realize you can run a su -c command that asks dd to write to stdout and just pipe the output to a file. The post author has also made this helpful Python script which lets you do pulls and pushes with root-only files.
If you want to run the command directly (I've only tested on Linux, no idea if it works on PowerShell but it might):
Code:
# adb shell "su -c" "dd if=/dev/block/bootdevice/by-name/userdata" > userdata.img
If you want to use the Python script:
Code:
# adb-root.py pull /dev/block/bootdevice/by-name/userdata userdata.img
Using the same fast SSD on the PC side as above, I now get:
Code:
218967528+0 records in
218967528+0 records out
112111374336 bytes (104 G) copied, 1077.681097 s, 99 M/s
real 17m57.910s
So that's roughly 15 minutes compared to 1 hour total with the previous method and you don't need to have a 128 GB SD card anymore.
Are you able to switch to a different backup location? Say a USB OTG if possible.
mikeshutte said:
Are you able to switch to a different backup location? Say a USB OTG if possible.
Click to expand...
Click to collapse
With dd yes, simply move to the directory you want before you call dd.
The backup script is bugged and seems to ignore the -d parameter for the backup location so it always uses /sdcard/backup. (I think it might be expecting a different version of getopts...) Normally I would say to try creating a symlink from /sdcard/backup to the OTG storage but the ln utility is also behaving strangely and I can't make any symlinks (even with root).
wirespot said:
With dd yes, simply move to the directory you want before you call dd.
The backup script is bugged and seems to ignore the -d parameter for the backup location so it always uses /sdcard/backup. (I think it might be expecting a different version of getopts...) Normally I would say to try creating a symlink from /sdcard/backup to the OTG storage but the ln utility is also behaving strangely and I can't make any symlinks (even with root).
Click to expand...
Click to collapse
Ok I'll give it a try and see what happens. Thanks for your help.
Hi, I'm used to TWRP backups, so I don't really understand this tool. I've backedup everything except the massive userdata partition. If needed, how would I restore this? Is the userdata partition required when I have all the others?
Thanks!
jakito said:
Hi, I'm used to TWRP backups, so I don't really understand this tool. I've backedup everything except the massive userdata partition. If needed, how would I restore this? Is the userdata partition required when I have all the others?
Thanks!
Click to expand...
Click to collapse
This is basically the same thing that TWRP does, dd is a command line Linux tool that makes a "raw" copy of a partition.
Restoration is a bit more tricky. In theory you can simply dump the raw backup copy over the partition. The problem is that it's not ok to do it while the system is running. Typically it's done by booting into recovery (TWRP) and overwriting the partition from there.
Another method for restore is to use fastboot, which is an alternative tool you can boot into that only does one thing, write partitions. But fastboot is typically locked by the vendor to only write signed images, so it can only be used to write official release ROMs.
There are some limited uses for fastboot, such as overwriting the boot partition, which is not checked for signature anymore once you've unlocked the bootloader. So if you want to experiment with unofficial kernels and mess something up you can always restore a good boot partition with fastboot.
TLDR: for the time being until we get a working TWRP recovery the most you can do is take backups, but not restore them.
wirespot said:
This is basically the same thing that TWRP does, dd is a command line Linux tool that makes a "raw" copy of a partition.
Restoration is a bit more tricky. In theory you can simply dump the raw backup copy over the partition. The problem is that it's not ok to do it while the system is running. Typically it's done by booting into recovery (TWRP) and overwriting the partition from there.
Another method for restore is to use fastboot, which is an alternative tool you can boot into that only does one thing, write partitions. But fastboot is typically locked by the vendor to only write signed images, so it can only be used to write official release ROMs.
There are some limited uses for fastboot, such as overwriting the boot partition, which is not checked for signature anymore once you've unlocked the bootloader. So if you want to experiment with unofficial kernels and mess something up you can always restore a good boot partition with fastboot.
TLDR: for the time being until we get a working TWRP recovery the most you can do is take backups, but not restore them.
Click to expand...
Click to collapse
I see. Thank you nonetheless!
wirespot said:
This is basically the same thing that TWRP does, dd is a command line Linux tool that makes a "raw" copy of a partition.
Restoration is a bit more tricky. In theory you can simply dump the raw backup copy over the partition. The problem is that it's not ok to do it while the system is running. Typically it's done by booting into recovery (TWRP) and overwriting the partition from there.
Another method for restore is to use fastboot, which is an alternative tool you can boot into that only does one thing, write partitions. But fastboot is typically locked by the vendor to only write signed images, so it can only be used to write official release ROMs.
There are some limited uses for fastboot, such as overwriting the boot partition, which is not checked for signature anymore once you've unlocked the bootloader. So if you want to experiment with unofficial kernels and mess something up you can always restore a good boot partition with fastboot.
TLDR: for the time being until we get a working TWRP recovery the most you can do is take backups, but not restore them.
Click to expand...
Click to collapse
I don't know how I ended up but making a backup you can't restore is completely pointless.
Techguy777 said:
I don't know how I ended up but making a backup you can't restore is completely pointless.
Click to expand...
Click to collapse
No, it's not. All your data is in there. You can mount your backup on a linux computer and pull out apks as well as app data. You can then restore these folder by folder with adb and a root shell on your phone.
That beeing said, does anyone know a proper backup software like Titanium Backup for Android 11 and above? Sometimes I read recommendations, but looking at the ratings it seems that no software manages to achieve the same level of comfort and control. Also they all seem to suffer from the same limitations.
Let's be honest: Google wants to make your life hard, so they can lock you in.
@xperinaut
I'm using Titanium on Android 11. Is it not working for you?

Categories

Resources