SPflash tool - how can I read the ROM? - Android Q&A, Help & Troubleshooting

With MTK Tools long dead, I'm trying to read the ROM on a phone with a cracked mother board one which by some miracle, the USB interface still works. I need my userdata.img and to try to get my contacts off that.
Can I use a scatter file that comes with the factory restore images for my phone which is based on MT6582 (4Gb int. mem) to find my memory point entry values for each separate file I want to pull off the phone? I tried copying exactly the linear_start_address and the partition_size into SPFlash "ADD" fields to use with the Read Back option and I get the xxxxxx.img files but not sure if this is the right way because I can't seem to use a tool to extract the internal files like I have been able to do on other restore images in the past.
I have used Disk Internals Linux Reader on my Windows laptop in the past but it doesn't seem to work on the files I extracted but of course until someone tells me if simply copying and pasting the named fields out of the scatter file and into SPFlash ADD, Read Back, I don't know if the data has been read out of the phone properly.
Thanks!

Related

Anyway to Clone a Rooted Android Tv Box?

I'm looking for a way to clone a Rooted android box to other android boxes. I want to clone my Tv launcher and apps plus settings.. I have tried a few programs Titanium backup but it seemed to back it up and restore fine but fails to recovery the settings for each app. If there is a faster way of doing this please let me know. The boxes are all different, but have the same processors s905x amlogic. Is there a way to make a IMG then use the usb burning tool to write to each box?
I Used Filezilla to grab files but it also fails to load all the files from the entire box?
Use twrp to create a image then flash that image to the other
I'd agree with Bcoates84, I've been testing out the process of cloning some Samsung tablets by simply restoring TWRP backups and so far everything's worked out pretty well.
It would be a good idea to backup the target ones just in case before trying it since you mentioned they are different boxes.
If you look up TWRP for your specific model(s) there should be some good information to get you heading in the right direction.
So i have done my backup on the box i want to clone, ill call it A-box. I got a Folder called TWRP/Backups With a few files
Boot.emmc.win
data.ext4.win000
data.ext4.win001
data.info
recovery.log
system.ext4.win
system.info
I plugged the stick into the box i want to clone, ill call it b-box went to restore this time and it fails to see the backup?
So I copied the TWRP folder with it's contents this time to my desktop and deleted the TWRP folder from the USB stick. Decided to do a Backup on b-box even know i didn't need the backup just wanted the folder structure to compare the two which i then got.
Boot.emmc.win
data.ext4.win
data.info
recovery.log
system.ext4.win
system.info
So I removed all the FILES from the usb only leaving the folder structure TWRP/BACKUP/SERIALNUMBERS I'm guessing? Also the p212-userdebug_6.0.1 folder. Then copied my files from A-box into the file structure and went to do a restore and it sees the image! Restore went smooth, went to reboot and it's stuck on android splash screen for 30mins now so guessing it's bricked. I can flash stock img back thats not a issue. Just trying to figure out how to clone this damn thing lol.
Is there anyway to simply make a Img so i can flash it via the amlogic usb burning tool. I saw this guide https://forum.xda-developers.com/showthread.php?t=2746044 which i can extract the system.ext4 seeing all the system files, fast_preinstall, addon.d, app, bin, fonts, usr ect... But i don't see boot.emmc.win anywhere? I'm assuming this methods for phones only?

Editing a Prestigio 3037 3G's system files, this thing is bullet proof

Hey!
Intro:
Bought a new tablet for my granny since she seemed to like the prestigio a lot.
I haven't had any luck selling this junk.
My idea is to make it into a GPS for my Ford Focus.
I want to edit the lessen the boot time (of 1 minute), to change boot logos, to remove ads, to do a ton of stuff.
I'm a C/Cpp developer, I'm still an amateur in Cpp and I've recently started a course on C#.
Problem:
I rooted the tablet and I gained access to the root directory.
I tried editing some system files and added a reboot command at the end of init_charging, so it would boot when I connect it.
It turns out those files get replaced with fresh copies after each restart, so that did nothing.
I tried changing permissions in twelve different ways following youtube vids.
Nothing worked.
I found 2 files - "BOOT" and "bootimg" both without a file type and with 0kb size (using Solid Explorer).
I figured these are the images or archives that the tablet extracts on every boot hance the long boot times.
After buying and downloading an app for putting the tablet in "insecure mode", I could pull root files.
Using ADB, PULLed a file called "bootimg" that had no file type.
I couldn't pull "BOOT" as it told me "wrong argument".
I extracted "bootimg" with bootimg.exe program, NOTE that the bootimg file was 3GB and the tablet somehow had a total of 1GB root memory, 4GB sd memory.
The extracted files were only the system files and it was about ~5mb.
Only bootimg.exe worked for extracting the IMG for some reason, and I have no idea why it extracted so little.
I edited them trying with the _charging again, packed the bootimg, replaced the one on the tablet.
So now instead of 3GB bootimg file, the tablet had a 4mb bootimg file.
Now.. I'm not kidding when I say that the tablet managed to restore the whole 3GB bootimg file that I replaced with a new one.
If it restores the alleged archive it uses to restore everything else, then... what now?
On top of all, it has a "reset" button on the back, which I'm guessing is a bridge to some extra ROM backup.
I have no idea why I can't get the BOOT file or what's in it. I mean, the bootimg file should be the boot.img that is known on other android operating systems.
I can get a ROM for this tablet's system, but it won't be super easy, nor does it make sense at this point.
Alternatives?:
I'm starting to lose hope, modifying the OS seems impossible if it can reset a whole 3GB file that was deleted.
If there's a more mod-friendly tablet out there, can you recommend it to me?

Redmi Pro Scatter File - Which options to select to save data during flash?

Hi All -
I have a Xiaomi Redmi Pro with an unlocked bootloader which is stuck in a boot loop. It has some very recent pics and videos of my 8 months old daughter that I desperately want to save. Thre is no SD card in the phone. However, I cannot get the phone to be detected by the computer/ boot in recovery etc. I have tried a few DIY(TWRP) from online forums but to no avail. I flashed it with MI flash tool(fastboot rom) using save user data; Flash was successful but the phone is still stuck in a bootloop.
I came across an article on Gizbeat with the title " Flash ROM upgrade firmware without losing user data cache" which showed how to save user data while flashing the phone with SP Flash tool. The author has advised deselecting certain parts of the scatter file. I have downloaded Redmi Pro china stable fastboot rom, but the scatter file has different parts to what was shown in the tutorial. At this stage, I do not know what to deselect.
Can the experts on this forum please advise which options should be selected/deselected to save user data while flashing? I have attached a screenshot of the scatter file. Thanks already.
Sid
sid_aj said:
Hi All -
I have a Xiaomi Redmi Pro with an unlocked bootloader which is stuck in a boot loop. It has some very recent pics and videos of my 8 months old daughter that I desperately want to save. Thre is no SD card in the phone. However, I cannot get the phone to be detected by the computer/ boot in recovery etc. I have tried a few DIY(TWRP) from online forums but to no avail. I flashed it with MI flash tool(fastboot rom) using save user data; Flash was successful but the phone is still stuck in a bootloop.
I came across an article on Gizbeat with the title " Flash ROM upgrade firmware without losing user data cache" which showed how to save user data while flashing the phone with SP Flash tool. The author has advised deselecting certain parts of the scatter file. I have downloaded Redmi Pro china stable fastboot rom, but the scatter file has different parts to what was shown in the tutorial. At this stage, I do not know what to deselect.
Can the experts on this forum please advise which options should be selected/deselected to save user data while flashing? I have attached a screenshot of the scatter file. Thanks already.
Sid
Click to expand...
Click to collapse
Hi,
It seems like you've posted in the wrong section. The correct section would be this one: https://forum.xda-developers.com/redmi-pro/help
Regarding the question, however, you can uncheck "userdata" part (and probably "cache" too). Doing so will leave your pictures untouched (hopefully the phone boots).
Also, if you can boot to TWRP, there is no need of this. You should be able to access your internal storage in TWRP from your computer. Otherwise, you can backup the userdata partition with TWRP, copy it to your computer and then try to access the contents of the backup. You can also try to boot to stock recovery, there SHOULD BE an option to backup the userdata. If such option exists (recent MTK phones do have this option by default), you can give it a shot. I have no idea how it works, though.
Nonta72 said:
Hi,
It seems like you've posted in the wrong section. The correct section would be this one: https://forum.xda-developers.com/redmi-pro/help
Regarding the question, however, you can uncheck "userdata" part (and probably "cache" too). Doing so will leave your pictures untouched (hopefully the phone boots).
Also, if you can boot to TWRP, there is no need of this. You should be able to access your internal storage in TWRP from your computer. Otherwise, you can backup the userdata partition with TWRP, copy it to your computer and then try to access the contents of the backup. You can also try to boot to stock recovery, there SHOULD BE an option to backup the userdata. If such option exists (recent MTK phones do have this option by default), you can give it a shot. I have no idea how it works, though.
Click to expand...
Click to collapse
Thanks Nonta72. I have tried but cannot boot to TWRP. My phone is either stuck in a bootloop or I can boot it to fastboot screen. without being able to boot to TWRP, how can I backup the userdata partition?
sid_aj said:
Thanks Nonta72. I have tried but cannot boot to TWRP. My phone is either stuck in a bootloop or I can boot it to fastboot screen. without being able to boot to TWRP, how can I backup the userdata partition?
Click to expand...
Click to collapse
Can you flash things with SP Flash Tool?
Try to flash just the boot.img (uncheck everything else) to see if you can do that.
Nonta72 said:
Can you flash things with SP Flash Tool?
Try to flash just the boot.img (uncheck everything else) to see if you can do that.
Click to expand...
Click to collapse
I haven't tried it yet, and that is why made this post so that I don't end up screwing things whilst using SP Flash tool. You mean flash the full rom with just boot.img selected in the scatter file? Thanks much.
sid_aj said:
I haven't tried it yet, and that is why made this post so that I don't end up screwing things whilst using SP Flash tool. You mean flash the full rom with just boot.img selected in the scatter file? Thanks much.
Click to expand...
Click to collapse
When you open SP Flash Tool program and then select the scatter file by clicking "Scatter Loading", you will be given the possibility to choose which partitions to flash. So, you have to uncheck every partition in SP Flash Tool except "boot" (on the left side, you can see the checkboxes). After that, click "Download", power off the phone, plug it in. It will flash just the boot.img and the process will be very quick (few seconds).
If you want to be ABSOLUTELY sure (even though, unchecking the other partitions is enough), you can go to your stock rom's folder containing the scatter file and then delete the userdata.img file. If the corresponding file isn't found in the folder containing the scatter file, the program will automatically uncheck that partition and will remain so untill you manually provide a usable file for that partition.
Nonta72 said:
When you open SP Flash Tool program and then select the scatter file by clicking "Scatter Loading", you will be given the possibility to choose which partitions to flash. So, you have to uncheck every partition in SP Flash Tool except "boot" (on the left side, you can see the checkboxes). After that, click "Download", power off the phone, plug it in. It will flash just the boot.img and the process will be very quick (few seconds).
If you want to be ABSOLUTELY sure (even though, unchecking the other partitions is enough), you can go to your stock rom's folder containing the scatter file and then delete the userdata.img file. If the corresponding file isn't found in the folder containing the scatter file, the program will automatically uncheck that partition and will remain so untill you manually provide a usable file for that partition.
Click to expand...
Click to collapse
Many thanks. I will give it a shot over the weekend. Fingers crossed!
Nonta72 said:
When you open SP Flash Tool program and then select the scatter file by clicking "Scatter Loading", you will be given the possibility to choose which partitions to flash. So, you have to uncheck every partition in SP Flash Tool except "boot" (on the left side, you can see the checkboxes). After that, click "Download", power off the phone, plug it in. It will flash just the boot.img and the process will be very quick (few seconds).
If you want to be ABSOLUTELY sure (even though, unchecking the other partitions is enough), you can go to your stock rom's folder containing the scatter file and then delete the userdata.img file. If the corresponding file isn't found in the folder containing the scatter file, the program will automatically uncheck that partition and will remain so untill you manually provide a usable file for that partition.
Click to expand...
Click to collapse
Hi,
I tried, but it did not work. Getting PMT error(screenshot attached). Thanks.
sid_aj said:
Hi,
I tried, but it did not work. Getting PMT error(screenshot attached). Thanks.
Click to expand...
Click to collapse
It appears that you have held an incompatible scatter file. Please note that the scatter file isn't the same for the 3 versions.
The Note 4 (Mediatek) comes in 3 versions:
- 16+2
- 64+3
- 64+4 (You probably can use 64+3 scatter in 64+4 and vice versa but 16+2 scatter is likely not compatible with 64GB versions and also vice versa).
I may be wrong! But you have to make sure that it's the correct firmware that you have.
Nonta72 said:
It appears that you have held an incompatible scatter file. Please note that the scatter file isn't the same for the 3 versions.
The Note 4 (Mediatek) comes in 3 versions:
- 16+2
- 64+3
- 64+4 (You probably can use 64+3 scatter in 64+4 and vice versa but 16+2 scatter is likely not compatible with 64GB versions and also vice versa).
I may be wrong! But you have to make sure that it's the correct firmware that you have.
Click to expand...
Click to collapse
Hi Nonta72 -
I have downloaded the Redmi pro fastboot stable rom from here - http://en.miui.com/a-234.html and using the scatter file that came along with it. My phone is 3gb/64gb Helio x25(6797T). The rom page does not have different roms for different versions of processor - just stable or developer. I have attached my scatter file for your reference. Thanks
sid_aj said:
Hi Nonta72 -
I have downloaded the Redmi pro fastboot stable rom from here - http://en.miui.com/a-234.html and using the scatter file that came along with it. My phone is 3gb/64gb Helio x25(6797T). The rom page does not have different roms for different versions of processor - just stable or developer. I have attached my scatter file for your reference. Thanks
Click to expand...
Click to collapse
I really can't tell whether you have the correct scatter file or not.
But I do know that it's really rare that different versions of the phone share the same scatter file especially when there is a big gap between the storages.
If SP Flash Tool doesn't work, you can try to backup the device and maybe you'll get a working scatter file.
Here is an interesting guide that will teach you how to backup your phone (and possibly create a scatter file from it as well).
https://forum.hovatek.com/thread-13347.html
Notes:
You may want to turn off your computer's internet connection before using the program
On step 9, make sure you tick the USERDATA checkbox! If it succeeds, you'll get your pictures in that file. Since the phone has a huge 64GB storage, make sure your computer has enough space (70GB or more) just to make sure!

What on earth will it take for Windows 10 to properly mount and read an .img file?

Been trying for days to extract the kernel from Nougat to use it within Marshmallow in order to downgrade with vibration working on nougats bootloader - but for the life of me i can NOT get windows to actually read these files properly. have all kinds of mounting programs, a java based converter that doesnt actually work (sgs2ext4) i end up with this loop of the same lines, and a 0kb converted file. I can mount the regular img file fine, but it will NOT open without some sort of error. the files themselves are just fine as they will properly flash and run when using odin (when compressed into tar.md5)
Tried wthin twrp hoping the file manager might just let me browse through it since the phone is already linux based and can actually see the information... but no dice there either. It doesnt go into further detail than just showing me that theres an img file present, with options to delete, chmod, etc.
what can i do to dig down to this zimage portion of boot.img that everyone insists the kernel is within? (i say insist cuz i havent actually seen it for myself!)
none of the tutorials ive come across address these specific opening errors - other than that the error is happening because windows cant read it
diskinternals wont work, osfmount will mount but i cant read it .... where on earth are these drivers or programs or whatever i need to actually allow me to browse and explore these files properly? and dare i say, recompress them once ive found what im looking for!
i did also try flashify, thinking run nougat, backup kernel, install marshmallow, restore nougat kernel, but it just leads to freezing on boot logo. I need to get within these img files to actually do what i want to successfully, switching out only that one specific zimage part of the file, leaving the rest intact.
very frustrated here, would very much love some help with this...
Try this, helped so much!
https://forum.xda-developers.com/general/xda-university/unpacking-editing-packing-roms-img-dat-t3350261
Also, If you want to try, here is a link for the tools:https://www.androidfilehost.com/?fid=24459283995310951

Help with an updater script to flash a ROM onto a S905x2 TV box

Hi,
Long story:
This is not a question about a specific device, although it involves one (A95X MAX) which has made it extremely difficult to modify. I have a ROM that I want to install, but it is essentially only a system.img file in a RAR file which is only accompanied by a file SECURE_BOOT_SET. The stock recovery doesn't know how to use RAR files and, if I unpack the system.img & SECURE_BOOT_SET onto an SD card, stock recovery doesn't know how to handle that. Stock recovery just wants a zip file. (I can't use USB to send ADB commands to the box or use the Amlogic burning ROM tool. I can't get USB communications going, though the USB cable supplies power.)
Examining a TWRP.zip I find a relatively simple structure that I think should be able to get my system.img onto my TV box. It looks as though I just need an updater.script buried in a sub-directory off META-INF with the system.img in the zip's root directory, so, the updater.script...
Short version:
If I only put this command
package_extract_file("system.img", "/dev/block/system");​
into the updater.script and reconstruct a system.zip with my desired system.img is this sufficient to flash the system.img?
And another (hopefully simple) issue, do I need to sign the zip? If so, how do I do it? (Google has magically pointed me to how to sign a zip file.)
Thanks!
--
(If this is the wrong sub-forum, which is the right one?)
maybe a stupid question but is the "System.img" purely the system partition or is that the entire firmware just called system.img?
the "SECURE_BOOT_SET" file suggests its the entire firmware and not just the system.img in which case "USB Burning tool 2.1.6.8" will do the job
Tonian1878 said:
maybe a stupid question but is the "System.img" purely the system partition or is that the entire firmware just called system.img?
the "SECURE_BOOT_SET" file suggests its the entire firmware and not just the system.img in which case "USB Burning tool 2.1.6.8" will do the job
Click to expand...
Click to collapse
Not a stupid question. I'm pretty much in the dark. You may be right that it is the entire firmware. I have no way of seeing inside the package, but a developer elsewhere suggested I take the line of restructuring the package with Simg2img and dd it into the system partition. I renamed it system.img to try to restructure it with a version of Simg2img. And SECURE_BOOT_SET contains nothing readable, if it contains data for the install at all. The package containing these two files looks like no full firmware installation I've seen.
I cannot establish USB communications with this box (it doesn't behave like other S905x2 boxes in circulation, though it seems to have the same central hardware; no-one seems to be doing work on the box and there's no technical support), which makes the USB Burning Tool useless, as I understand it.
your system.img isnt a true system.img, its the entire firmware, which is also a .img file that has several other .img files inside it, this includes the proper system.img , boot.img and recovery.img etc.
i have the A95X Max and i have used USB Burning tool to flash firmwares to it.
Install USB Burning tol 2.1.6.8.
Go to whichever folder you installed USB burning tool in and create a new folder called "license" and put the the "secure_boot_set" file in the "license" folder.
start usb burning tool, select your firmware (.img) then hook the A95X Max to the pc via the back USB connection while pressing the reset/recovery button (hidden in the 3.5mm socket) and then insert power cable.
should pop up on USB Burning tool. press start.
Note: make sure the is nothing else in the USB slots while flashing or the HDD slot.

Categories

Resources