[Q] How to extract system_signed of the RAZR i firmware? - RAZR i Q&A, Help & Troubleshooting

Hy everybody,
I need a small help. I'd like to extract stock system apks placed in /system/app but I don't succed.
On the normal RAZR XT910 I use RSD or a zip extractor (winrar, winzip, etc.) to divide a stock firmware in system_signed, mbr_signed, motoboot, cdrom_signed, boot_signed and other files, then i can extract system_signed using Ext2explore to have a copy of the stock system folders,
On the RAZRi XT890 firmwares 4.1.2 this procedure doesn't work, when i try to extract system_signed,Ext2explore sometimes doesn't read the archive without any response or other times it stops working.
Thanks for helping.

bobby3 said:
Hy everybody,
I need a small help. I'd like to extract stock system apks placed in /system/app but I don't succed.
On the normal RAZR XT910 I use RSD or a zip extractor (winrar, winzip, etc.) to divide a stock firmware in system_signed, mbr_signed, motoboot, cdrom_signed, boot_signed and other files, then i can extract system_signed using Ext2explore to have a copy of the stock system folders,
On the RAZRi XT890 firmwares 4.1.2 this procedure doesn't work, when i try to extract system_signed,Ext2explore sometimes doesn't read the archive without any response or other times it stops working.
Thanks for helping.
Click to expand...
Click to collapse
Hey,
try unyaffs tool

First, wrong section. This belongs in the q&a.
Back to topic. The system.IMG has an ext4 file system. Mount it in Ubuntu with a mount loop methode. Don't know the exact words for it, sry.
Sent from my XT890 using xda app-developers app

Doesn't work
Thanks (and thanks to moderator) but these methods doesn't work.
Using system_signed of RAZRi unyaffs tool gives me an error response, "mount" on linux does nothing.
Using system_signed of RAZR XT910 instead works fine with ext2explore, with unyaffs tool and mounting in ubuntu but i need to extract RAZRi system_signed.

bobby3 said:
Thanks (and thanks to moderator) but these methods doesn't work.
Using system_signed of RAZRi unyaffs tool gives me an error response, "mount" on linux does nothing.
Using system_signed of RAZR XT910 instead works fine with ext2explore, with unyaffs tool and mounting in ubuntu but i need to extract RAZRi system_signed.
Click to expand...
Click to collapse
Than u still didnt look good enough. But ok, i have done it now for you
Download the script in the attachment. The simg2img.py.zip and extract it.
Uncompress the system.img file into a normal ext4 disk image:
‘python simg2img.py system_signed tmp.img’
This will create an uncompressed ext4 volume ‘tmp.img’ in the same directory
Mount this disk image:
‘sudo mount -t ext4 -o loop tmp.img somedir/’
profit. The mounted file/partition (then) is in read only mode, for the record
Hazou

Thanks a lot!
Hazou said:
Than u still didnt look good enough. But ok, i have done it now for you
Download the script in the attachment. The simg2img.py.zip and extract it.
Uncompress the system.img file into a normal ext4 disk image:
‘python simg2img.py system_signed tmp.img’
This will create an uncompressed ext4 volume ‘tmp.img’ in the same directory
Mount this disk image:
‘sudo mount -t ext4 -o loop tmp.img somedir/’
profit. The mounted file/partition (then) is in read only mode, for the record
Hazou
Click to expand...
Click to collapse
Fantastic! It works!
You are great! :highfive:
Thank you! Thank you! Thank you!

Related

[TUT] Unbrick\Restore to Factory Condition from Linux

I did not see anything that really walked through what you should do in one place. This is the method I used to restore my device to factory condition. It can also be used to unbrick the device.
You should be comfortable with the command line before proceeding. You cannot downgrade at this tome, so download the version that was on your phone previously.
Files needed:
Verizon 5.5.959 or Verizon 5.6.890
moto-fastboot for linux, download the appropriate version for your arch
HowTo:
1. Extract the zip you downloaded and moto-fastboot.zip to the same working directory. You will get several .img files, moto-fastboot, and an .xml
2. Create a new file named "reset" in your working directory and fill it with the following code.
Code:
#!/bin/bash
./moto-fastboot flash mbm allow-mbmloader-flashing-mbm.bin
./moto-fastboot reboot-bootloader
sleep 30
./moto-fastboot flash mbmloader mbmloader.bin
./moto-fastboot flash mbm mbm.bin
./moto-fastboot reboot-bootloader
sleep 30
./moto-fastboot flash cdt.bin cdt.bin
./moto-fastboot erase userdata
./moto-fastboot erase cache
./moto-fastboot flash lbl lbl
./moto-fastboot flash logo.bin logo.bin
./moto-fastboot flash ebr ebr
./moto-fastboot flash mbr mbr
./moto-fastboot flash devtree device_tree.bin
./moto-fastboot flash system system.img
./moto-fastboot flash radio radio.img
./moto-fastboot flash boot boot.img
./moto-fastboot flash recovery recovery.img
./moto-fastboot flash cdrom cdrom
./moto-fastboot flash preinstall preinstall.img
./moto-fastboot reboot
3. Change directory to your working directory. Make moto-fastboot and the script executable.
Code:
chmod a+x moto-fastboot
chmod a+x reset
4. Execute the script you created in step 2 (with supercowpowers). It should read "< waiting for device >"
Code:
sudo ./reset
5. Make sure your phone is >%50 charged for good measure. Turn off your phone. Hold the 'M' key on the keyboard and turn your phone back on. Press Vol - to scroll down to "AP Fastboot". Press Vol + to select. Connect the USB cable.
6. Sit back and relax, the phone is now flashing back to factory. It will reset a few times. Eventually it will boot up like normal and you'll be all set!
Notes:
You can change sleep to 10 seconds to speed it up. I recommend 30 because I don't know how fast your system picks up usb devices.
The parameters I used to create the script are from the .xml file, in case you were wondering.
[Source for files]
http://rootzwiki.com/showthread.php?5103-SBF-Droid-3-Fastboot-files-(5.5.959-and-5.6.890)
If this helped you, press thanks so others know
If it didn't, please post why to help improve this guide
We have a easier method now, rsd.
Sent from my DROID3 using XDA App
ourtut said:
We have a easier method now, rsd.
Sent from my DROID3 using XDA App
Click to expand...
Click to collapse
RSD doesn't run natively on Linux
I get it now. Good tut for ppl with linux.
Sent from my DROID3 using XDA App
Thanks for this! I hate having to drop to windows for this kind of stuff, especially considering that linux is under the android framework.
Sent from my DROID3 using XDA App
thank you now i never have to mess with rsd lite and windows .. and drivers you know. thanks
Sent from my DROID3 using Tapatalk
Why does the script need superuser (sudo)? I like the script and will for sure use it, thank you for sharing. I think it would work fine without sudo though
Sent from my DROID3 using XDA App
jweber228 said:
Why does the script need superuser (sudo)? I like the script and will for sure use it, thank you for sharing. I think it would work fine without sudo though
Sent from my DROID3 using XDA App
Click to expand...
Click to collapse
I don't feel like trouble shooting peoples permissions issues. Running as superuser will eliminate those problems. Some systems\configurations do require those permissions.
Why is this thread no stickied? all other RSD lite threads are, and we cant use RSDlite in linux.
Darksurf said:
Why is this thread no stickied? all other RSD lite threads are, and we cant use RSDlite in linux.
Click to expand...
Click to collapse
because you have to msg the forum mod...cheif_tony and request it
thanks for this one!
a few questions,
is this possible with the new 906 zip?
http://forum.xda-developers.com/showthread.php?p=27315518#post27315518
can you please explain points 3 and 4 more detailed for newer linux/ubuntu users?
what do you mean "3. Change directory to your working directory. Make moto-fastboot and the script executable." and "Execute the script you created in step 2 (with supercowpowers)" how do i get supercowpowers?
The original post's "Verizon 5.6.890" link to the 890 install brings me to LNX.lu and requires a login. I've been waiting a while for their emailed account confirmation - is there another place to grab this file?
Also, you mention Arch - is this process the same in Ubuntu?
EDIT: Hah! Works like a charm. One last step - THANK YOU GamezR2EZ!

[Q] Need Help Flash Failure

Droid 3 Flash Failure
I assume it is possible to fix this problem but I can not find a solution despite extensive research. I have a Droid 3, XT862 experiencing:
AP Fastboot Flash Mode (S)(Flash Failure)
Every time I start the phone I get this message. I can get around it by using Power+M, going into Boot Mode Selection Menu and using Normal Powerup. I have Safestrap v1.08 installed and am able to run 5.6.890 as my safe ROM and Hash’s Cyanogen ICS and both ROM’s work great.
Having to go through these procedures is a pain. I have tried to SBF. I have attempted to flash using RSD Lite. All attempts fail. I would appreciate any help or even an explanation of what the problem may be. Thanks.
Hello
dowlnoad moto-fastboot
download swu.zip file
( moto-fastboot file and downloaded swu.zip file must be extracted to that same folder )
turn on phone by using power + vol down
and in CMD use a command
moto-fastboot flash preinstall preinstall.img
( you know, how to use a CMD in windows right ? )
after that reboot your phone all should be ok
You Give Me Too Much Credit
Thank you so very much for your help. I have moto-fastboot but have no idea where to obtain the swu.zip file. Any help would be appreciated. CMD in windows, what? Sorry, I am 62 years old, have no experience with this stuff. I thought I was doing well by rooting, strapping, and loading two ROMs. So if you could give me just a little more help here, I will kiss your avatar on the screen (which actually looks pretty hot!). Thanks.
Weird! Could you detail at which step RSD Lite failed to flash the ROM onto your phone? Normally, RSD Lite is the first to call when it comes to flash or unbrick Motorola phones. It's never failed me once since using on my Milestone.
Anyway, I don't know if you've read this instruction. This is pretty much foolproof. The link for the file is dead, you could try this to obtain it.
Good luck!
1. Download full system files from that link
http://www.multiupload.nl/PLYL79UDCC or from link what you got from blackbuddha
1a. make directory on C: and name it 1
2. extract this file to folder c:/1/
3. download moto-fastboot files
http://forum.xda-developers.com/attachment.php?attachmentid=635568&d=1308927194
end extract to C:/1/ where you have system droid3 system files
you must have moto-fastboot file and preinstall.img file in that same folder
( so you must check and if this both file is in diffrent folders please copy all to c:/1/)
4. click on start and in type CMD (and push enter)
5. in this black window ( CMD ) input cd/ (and push enter)
6. now type cd 1 (and push enter) you will go to folder 1
7.and now type moto-fastboot flash preinstall preinstall.img (and hit enter)
*** update ***
You must turn on phone with hold POWER + VOL DOWN buttons i forgot
niko99 said:
1. Download full system files from that link
http://www.multiupload.nl/PLYL79UDCC or from link what you got from blackbuddha
1a. make directory on C: and name it 1
2. extract this file to folder c:/1/
3. download moto-fastboot files
http://forum.xda-developers.com/attachment.php?attachmentid=635568&d=1308927194
end extract to C:/1/ where you have system droid3 system files
you must have moto-fastboot file and preinstall.img file in that same folder
( so you must check and if this both file is in diffrent folders please copy all to c:/1/)
4. click on start and in type CMD (and push enter)
5. in this black window ( CMD ) input cd/ (and push enter)
6. now type cd 1 (and push enter) you will go to folder 1
7.and now type moto-fastboot flash preinstall preinstall.img (and hit enter)
*** update ***
You must turn on phone with hold POWER + VOL DOWN buttons i forgot
Click to expand...
Click to collapse
I tried this but nothing happens after, phone stays in AP Fastboot Flash mode(S)
cmd did sending preinstall and writing okay twice.
Is the phone supposed to restart itself?
What next?
so no problem flash all files
with using a CMD and FAST-BOOT
moto-fastboot flash recovery recovery.img
moto-fastboot flash boot boot.img
moto-fastboot flash devtree device_tree.bin
moto-fastboot flash logo.bin logo.bin
moto-fastboot flash preinstall preinstall.img
moto-fastboot flash cdrom cdrom
moto-fastboot flash radio radio.img
moto-fastboot flash system system.img
and this should help for 100% to you
Still working on this
I, original poster, still working on this to solve problem. Have two Droid3s so I have time to work on it. Will try later today. Thanks.
Does Not work!! Lint in the blowhole?
OK, I have tried this cure multiple ways and it just does not work. I downloaded multiple copies of the files to be installed. I have used CMD as described above but it just does not "flash". When I add the command line in CMD my hard drive cranks and spins, loading the files to be flashed. Then I get <waiting for device>. I put the phone into AP Flashboot Phone battery is OK, and plug in the USB cable. I get Erasing "userdata"...OKAY [0.047s] and Erasing 'cache" ...OKAY [0.156s] CMD says Sending "recovery" <9216 KB>... and nothing. I have waited, and waited. There is just something that prevents the files from being flashed in. Any possible ideas? It is obviously connecting if it can erase, but it will not send.
When using RSD Lite, the phone is detected as Fastboot CDMA_Solana S. When I attempt to flash the SBF file it says: Failed flashing process. Unable to retrieve interface handle. [0x7027]; phone connected.
You also try to flash mbm.bin and mbmloader.bin finally or not ?
MBM.BIN
MBMLOADER.BIN
this two files must work
moto-fastboot flash mbm mbm.bin
moto-fastboot flash mbmloader mbmloader.bin
must work ! look if you have this both files in that same folder where is fast-boot.exe
if you dont have download from here
http://speedy.sh/gURdE/mbmloader.bin
http://speedy.sh/UHGVd/mbm.bin
Thanks again but no luck
Tried to flash just these two files and no luck. The same process as described above occurred, then it did not flash the files. I am about ready to give up and just put up with having to use two steps to start the phone.
Are you on one of the leaked OTA ROMs (.902, .905, or .906)?
I am on .905 and also have this same issue. Cannot flash anything with RSD Lite and I get the AP-FastBoot Flash Failed message everytime I reboot.
I think we need a new version of RSD Lite.
Sent from my DROID3 using xda premium
Maybe Tha's The Problem
Perhaps you have put your finger on the problem. I have .906 currently installed. I am using RSD Lite 5.6 which I assume, but do not know, is the latest version available. My only reservation in agreeing that this may be the problem is that I believe I had 5.6.890 installed when I bricked and tried to unbrick using Pete's unbricking script. Flash would not work. Later I recovered by installing .906 from recovery (I think) and then continued to be unable to flash. So it could be a .906 problem but maybe not.

[Q] How to create boot.img

Hi @all,
does anyone know how to create the boot.img to flash it over fastboot?
When I extract the kernel.sin from a FTF and try to flash it over fastboot it doesn´t work.
Thanks.
Greetings
UserX10
Why do you want to do that? Just flash kernel.sin via flashtool.
pandaball said:
Why do you want to do that? Just flash kernel.sin via flashtool.
Click to expand...
Click to collapse
For sure this is possible, but on this way I haven't learned anything
But I found after some search that I have to extract the system.sin to system.ext4 and just rename the system.ext4 to system.img
I assume that this is working the same way with kernel.sin
Will try it tomorrow...
That will only work if you're unlocked. You can just take the ftf, open it in flashtool and exclude everything except the kernel. That will flash just the kernel.
How to create boot.img Android
If you really want to learn then you should be reading reading reading.
http://forum.xda-developers.com/showthread.php?t=2139498
Sent from my C6603 using xda premium
gm007 said:
http://forum.xda-developers.com/showthread.php?t=2139498
Sent from my C6603 using xda premium
Click to expand...
Click to collapse
The thread you linked is about compiling a kernel from source, rather than converting a .ftf file to a .img file.
Easiest method to do this is to use flashtool, and dd the boot partition to /sdcard/boot.img
I don't know what the boot partition is though, but the command is either:
dd if=/path/to/boot of=/sdcard/boot.img bs=2048
or
dd if=/path/to/boot of=/sdcard/boot.img bs=4096
The boot.img you get on your sdcard is now flashable through fastboot and a direct copy of your currently installed kernel.
Thanks,
have done as described ftf -> sin -> ext4 and rename to img
flashed over fastboot worked
When I try to flash the same way the system I get the following error:
error: cannot load 'system.img'
anyone an idea?

fastboot flash custom rom?

hi guys, all custom roms are flashable. how can i fastboot flash the system partition of any custom rom, lile aicp or others? is that possible someway? tia!
I believe unpacking the system.new.dat from a ROM zip gives you a system.img, which I can only assume is fastboot flashable with fastboot command
can't open the .dat file as archive here with 7zip how could I unpack it?
EDIT: I see now you said "unpack" not uncompress... googling for that now!
FcukBloat said:
can't open the .dat file as archive here with 7zip how could I unpack it?
EDIT: I see now you said "unpack" not uncompress... googling for that now!
Click to expand...
Click to collapse
you can extract your system.new.dat by following this guide
thanks both! I suceeded in installing aicp's system image via fastboot after unpacking system.new.dat with a tool found on xda similar to the one you linked
thanks again!

Tool for extracting Oreo system.img etc

I found this tool that runs under Windows for extracting the Oreo system.img. Just put the system image into the program folder and run the convert.bat. The result is a system.ext4.img with could be opened and extracted with 7zip. You could also convert every other image like cust.img, boot.img, etc. But you have to rename every image to system.img. The convert.bat only works with this name.
Regards
You can just open a command prompt in the same folder as simg2img.exe and run:
simg2img.exe input_sparse.img raw_output.img
Then you can either use the included Ext2Explorer, or extract it using 7zip (this will not keep permissions/ownership).
You can not convert boot/recovery/ramdisk using this. Use Android Image Kitchen for that.
ante0 said:
You can just open a command prompt in the same folder as simg2img.exe and run:
simg2img.exe input_sparse.img raw_output.img
Then you can either use the included Ext2Explorer, or extract it using 7zip (this will not keep permissions/ownership).
You can not convert boot/recovery/ramdisk using this. Use Android Image Kitchen for that.
Click to expand...
Click to collapse
But cust.img worked without problems. Thought it works for every image from the firmware.
Coredown said:
But cust.img worked without problems. Thought it works for every image from the firmware.
Click to expand...
Click to collapse
system, vendor, cust, product, odm and version will convert fine.
For ramdisk/kernel/recovery partitions you need to use Android Image Kitchen as they're not sparse images.
ante0 said:
system, vendor, cust, product, odm and version will convert fine.
For ramdisk/kernel/recovery partitions you need to use Android Image Kitchen as they're not sparse images.
Click to expand...
Click to collapse
Alright, thanks for the information. I will give it a try.
It doesn't work for android 9 .img
D:\convert>simg2img.exe system.img raw_output.img
Bad magic
Edit: I've just extracted system.img with 7 zip
It Finally worked
other methods only extracted apps!

Categories

Resources