[GUIDE][HOW-TO] Fully duplicate a tablet to other tablets of the same model - Galaxy Tab S2 General

Fully duplicating a tablet to many other tablets.
This guide was used to clone several hundreds of Samsung Galaxy S2 tablets, model SM-T815Y.
You will need:
Linux computer for getting the master tablet image.
Windows computer for flashing that image using Odin.
latest firmware for the Android tablet.
TWRP image for the Android tablet.
On your Linux computer, heimdall and some executables for manipulating Android sparse images. You can find these executables in my Google drive folder linked below.
Getting the master tablet image
Upgrade Android
On your computer, download the latest firmware for your tablet. You should end up with folder containing partition images.
Put the tablet in download mode: power if off, then press home + volume down + power.
Flash the firmware to the tablet:
Code:
heimdall flash --BOOTLOADER sboot.bin --BOOT boot.img --RECOVERY recovery.img --SYSTEM system.img --CACHE cache.img --HIDDEN hidden.img --RADIO modem.bin
Once the tablet boots, do a factory data reset from the settings menu.
Configure
Install and configure apps, adjust the settings, etc.
Flash TWRP
Download the TWRP image for your tablet model.
Put the tablet in download mode.
Flash TWRP to the tablet:
Code:
heimdall flash --RECOVERY twrp.img --no-reboot
Reboot into recovery: hold home + volume down + power, and as soon as you see the boot screen, hold home + volume up + power.
Get an image of the data partition
Insert an SD card into the tablet. The SD card should be big enough to contain the data partition. Make sure the External SD card is mounted from the TWRP menu.
In TWRP, go to Advanced > Terminal.
Copy the data partition to the SD card:
Code:
dd if=/dev/block/mmcblk0p22 | gzip > /external_sd/data.gz
Transfer that data.gz file to a Linux computer.
gunzip it. You should get a data file that is a Linux filesystem.
Convert it to the Android sparse format using ext2simg. You can download that executable below.
Code:
./ext2simg data data.img
Bloat the data.img headers. That is a Samsung particularity.
Code:
./sgs4ext4fs --bloat data.img data_32bit.img
Create an Odin flashable tar file by combining your data image with the firmware parititions:
Code:
mv data_32bit.img userdata.img
tar -H ustar -c boot.img cache.img hidden.img modem.bin recovery.img sboot.bin system.img userdata.img > odin_repack.tar
Flashing other tablets with the master image
From a Windows machine, open Odin, click the AP button, then open the odin_repack.tar file.
Get a tablet that you want to flash in download mode, connect it to the Windows computer.
Click start in Odin. When the flashing is finished your tablet reboots, and is exactly like the master tablet.
Notes
You can connect up to 8 tablets to Odin and flash them in parallel.
If you have very big files on the data partition, Odin may crash. In this case you'll have to transfer these files after the flashing instead of including them in the data partition.

There is any easier way. Odin allows for downloading to multiple targets at the same time.
All that is required is a raw backup of the data partition converted to sparse format.
It's unnecessary to backup or flash the cache partition as it contains nothing useful.
All it shouldn't be necessary to backup the system partition unless you have good reason to do so as you can use the stock image.

ashyx said:
There is any easier way. Odin allows for downloading to multiple targets at the same time.
All that is required is a raw backup of the data partition converted to sparse format.
It's unnecessary to backup or flash the cache partition as it contains nothing useful.
All it shouldn't be necessary to backup the system partition unless you have good reason to do so as you can use the stock image.
Click to expand...
Click to collapse
Thanks ashyx! I could get a flashable data partition. Here are the steps:
Insert an SD card in the master tablet, reboot to TWRP, mount the SD card
In the master tablet TWRP terminal:
Code:
dd if=/dev/block/mmcblk0p22 | gzip > /external_sd/data.gz
Transfer that data.gz file to your computer.
gunzip it, you should get a file named data that is a Linux filesystem.
Convert it to the Android sparse format:
Code:
./ext2simg data data.img
Bloat the data.img headers:
Code:
./sgs4ext4fs --bloat data.img data_32bit.img
Flash that Android sparse image using heimdall:
Code:
heimdall flash --USERDATA data_32bit.img
The two binaries ext2simg and sgs4ext4fs were compiled using the ANDROID_IMG_REPACK_TOOLS found at https://forum.xda-developers.com/showthread.php?t=2600364. Here they are for Android 6.0.1, Linux 64-bit:
https://drive.google.com/drive/folders/0B9BiITFgw4CLT2pvcExucXJKREU?usp=sharing

Converting to a VM?
Can I use a method similar to this to convert an older Galaxy E (SMT-377A) into a VM; perhaps suitable for VMWare Fusion or similar. Obviously without cellular capabilities. I have an older tab that is probably going to die, that I want to preserve for prosperity and perhaps even use/interact with -- but not on another tab.

Related

How to use Heimdall

Heimdall is an open-source alternative to flashing firmware to devices. It claims to be safer and a better alternative to Odin pretty much.
Although Heimdall is safer, it is still a firmware flashing tool, and like all firmware flashing tools, there could be dire consequences for not following instructions. I take no responsibility for what unexpected results or damage that may happen when following this guide. (I followed this guide on my tab though and it worked great)
- You should probably backup all important data prior to using Heimdall
First, you'll have to acquire Heimdall. You can find Heimdall releases and information here: http://www.glassechidna.com.au/products/heimdall/
- Heimdall is for Windows, OS X, and Linux
- I recommend using the command-line version over the GUI
zImage Guide
Note: For flashing of just the kernel to your device
- Command for flashing zImage
Code:
heimdall flash --kernel zImage --verbose
Files Needed:
zImage
ROM, Kernel, Modem, etc. Guide
Note: For flashing a ROM, Kernel, and Modem to your device, or for "re-stocking"
- Command for flashing complete ROM, Kernel, and Modem
Code:
heimdall flash --repartition --primary-boot boot.bin --cache cache.rfs --dbdata dbdata.rfs --factoryfs factoryfs.rfs --pit gt-p1000_mr.pit --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage --verbose
Files Needed for Command Above:
gt-p1000_mr.pit (partitioning)
modem.bin (modem)
boot.bin
cache.rfs
dbdata.rfs
factoryfs.rfs (file-system or ROM?)
param.lfs
Sbl.bin
zImage (kernel)
From this point on, this will mostly be a Windows-based guide. I'll use a Samsung Galaxy Tab 7" P1000 GSM and I'll re-stock using files from Overcome, and then flash the Overcome kernel afterwards. You may have to modify parts of the guide for different devices, kernels, ROMs, Operating Systems, etc.
Windows Driver Preparation
1. Install Samsung's Drivers (SAMSUNG_USB_Driver_for_Mobile_Phones.msi either from Kies or SAMSUNG_USB_Driver_for_Mobile_Phones_x86.exe from GB-Stock-Safe-v5.zip)
Note: You should reboot your computer after installing, even if it doesn't tell you to. Drivers wouldn't initialize until I rebooted.
2. Connect your Tab to your computer at least once in Normal, Recovery, and Download mode so that all drivers initialize
3. Reboot your tab to Download mode
4. Run zadig.exe
5. Go to Options > List All Devices
6. Select Samsung USB Composite Device from the dropdown box
7. Click Install Driver (accept any unsigned driver prompts you get)
8. Once Zadig says the drivers are installed successfully, close it
Windows Flashing Preparation
1. Make a folder specifically for Heimdall someplace safe
2. Copy heimdall.exe and libusb-1.0.dll to the Heimdall folder
3. Acquire GB-Stock-Safe-v5.zip, and Overcome_Kernel_v4.0.0.tar
4. Extract the contents of GB-Stock-Safe-v5.zip in a folder somewhere
Note: In the GB-Stock-Safe-v5.zip extracted folder should at least be modem folders, gt-p1000_mr.pit, and GB_Stock_Safe_v5.tar
5. Take the modem.bin from the modem of your choosing and throw it in the Heimdall folder
6. Take gt-p1000_mr.pit and throw it in the Heimdall folder
7. Extract the contents of GB_Stock_Safe_v5.tar into the Heimdall folder
Note: You should have 13 files total equaling around 391MB
Windows Flashing (Re-stocking)
1. Reboot your tab into Download mode
2. Connect it to your PC with the same USB port you used to prepare drivers
3. Open Command Prompt
4. cd into the Heimdall folder
5. Type (or copy/paste)
Code:
heimdall flash --repartition --primary-boot boot.bin --cache cache.rfs --dbdata dbdata.rfs --factoryfs factoryfs.rfs --pit gt-p1000_mr.pit --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage --verbose
and press Enter
Note: This will take maybe 2 minutes, but quicker then Odin
Note: When flashing is complete, tab will automatically reboot
Note: You will have to manually wipe caches and factory reset from Recovery if you see it fails to mount /data on initial boot (if you see red text, then it failed)
6. When tab finishes booting, complete the Setup Wizard
Note: If you are going to flash another ROM (such as icedBOCA, CM9, etc), then just press Next through all of setup. Language will be Italian, but this does not matter for now
Note: If you just want to return to a pure factory state, this is as far as you should go
Note: This does not seem to wipe the internal SD card. For the cleanest experience possible, I recommend manually formatting the internal SD card right after the Setup Wizard
Windows Flashing (Overcome Kernel)
Note: This will convert partitions to ext4 and give you CWM recovery
Note: This is to be done after you have re-stocked
1. Acquire Overcome_Kernel_v4.0.0.tar
Note: You should have this already if you followed Windows Flashing Preparation
2. Copy heimdall.exe and libusb-1.0.dll to a new Heimdall folder
Note: Or use the same Heimdall folder you had previously
Note: I'll refer to the new folder as Heimdall2
3. Extract the zImage file from Overcome_Kernel_v4.0.0.tar to the Heimdall2 folder
4. Reboot your tab into Download mode
5. Connect it to your PC with the same USB port you used to prepare drivers
6. Open Command Prompt
7. cd into the Heimdall2 folder
8. Type (or copy/paste)
Code:
heimdall flash --kernel zImage --verbose
Note: This should take less then 5 seconds
Note: Your tab should automatically reboot when completed
9. Your tab should now convert partitions to ext4
Note: This is known as the Voodoo lagfix
Note: You will be stuck on the SGT bootscreen until this process is done
Note: You will hear a "sexy" voice telling you the steps of the ext4 process
Note: This process should take maybe 3-5 minutes
Note: Your tab will automatically reboot when complete, so you can walk away if needed
10. You are now on Gingerbread with Overcome kernel
- From this point on, you can now proceed to install (most, if not all) any compatible ROM/Kernel you want
- You should not need Heimdall from this point on also, as most ROM's and Kernels offer .zip packages that can be flashed from CWM/Recovery
Note: For any new ROM you flash, I recommend doing a data wipe afterwards, that way, you can gain access to the Setup Wizard and properly setup your Google Account, Market Sync, etc.
Windows Troubleshooting and Q&A
Q: I get a libusb error when trying to flash anything with Heimdall
A: This is due to either improper driver installation or using another USB port then the one you used to install the drivers
Note: You have to use zadig
Note: I would recommend uninstalling all previous USB filter drivers as well if you have problems
Q: Is it possible to use both Heimdall and Odin?
A: Yes, but it is recommended to have two USB ports. Do the zadig driver install on one USB port, and that port will be for Heimdall, and the second USB port will be untouched, and you'll be able to use Odin on it
Note: You cannot use Heimdall and Odin on the same port without uninstalling/installing the libusb filter driver from zadig that Heimdall needs
Q: Is Heimdall really faster then Odin?
A: Indeed. It's faster to start the flashing process, and faster to flash in-general. For instance, to re-stock my tab, I simply plug it into my Heimdall USB port, run a batch file (simply containing the command used above), and it's re-stocked in about 1 minute. With Odin, you have to manually select the files, and then flashing itself takes 2-3 minutes.
it would appear Heimdall does not work on Windows Consumer Preview (zadig fails, saying the OS rejects unsigned drivers)
Good tutorial, thanks.
Is this tool only feasible for Samsung devices, or also for most other Android ones?
Two annoyances from this tool:
1. It does not have some facility (like a specific command line option) to reveal to the user that the connection to a "download mode" device (i.e., no way to tell if the driver is working)
2. After the --print-pit option (I used this to confirm that the communication is setup properly) will reboot the device, I think just printing something will cause a device reboot is extremely unexpected...
By the way, your title seems to misspelled the keyword "heimdall".
factoryfs.rfs is the Factory installed filesystem and its the main rom
I have data.img... where I put it? datafs?
I am using heimdall frontend 1.3.1
what to do if wipe cache and recovery fail, the red text mount data? I followed all your steps but still stuck at samsung screen.
How to flash hidden.rfs by heimdall?
Sent from my GT-P1000
goofey2012 said:
How to flash hidden.rfs by heimdall?
Sent from my GT-P1000
Click to expand...
Click to collapse
--hidden hidden.rfs
zeroxia said:
annoyances from this tool:
1. It does not have some facility (like a specific command line option) to reveal to the user that the connection to a "download mode" device (i.e., no way to tell if the driver is working)
By the way, your title seems to misspelled the keyword "heimdall".
Click to expand...
Click to collapse
heimdall detect
zeroxia said:
2. After the --print-pit option (I used this to confirm that the communication is setup properly) will reboot the device, I think just printing something will cause a device reboot is extremely unexpected...
Click to expand...
Click to collapse
heimdall print-pit --no-reboot
Thanks!!!
heimdall syntax / files confusion
Hello all.
I imagine this is a noob question but I am stuck and reluctant to flash random files in hopes of getting it right.
I have these files from an extracted tar.md5 (T999UVDLJA_T999TMBDLJA_T999UVDLJA_HOME.tar.md5).
I'm trying to use heimdall to restore a SGS3 (d2tmo/T999) with a Stock ROM without bumping the flash counter. I only use Linux, so...
aboot.mbn
boot.img
cache.img.ext4
NON-HLOS.bin
recovery.img
rpm.mbn
sbl2.mbn
sbl3.mbn
SS_DL.dll (not needed, eh?)
system.img.ext4
tz.mbn
But I do not know what to do with the "*.mbn" files or the "NON-HLOS.bin"
I'm guessing the syntax is something like:
heimdall flash --primary-boot boot.img --cache cache.img.ext4 --recovery recovery.img --factoryfs system.img.ext4 ...
But I have a lot of files left over. Would someone kindly confirm that part is correct and fill in the rest of the blanks?
$ heimdall version
v1.4 RC1
Thank you for your time,
this is actually a Galaxy Tab 7" forum.
But anyway, your questions was answered (somewhat) by the heimdall author
https://github.com/Benjamin-Dobell/Heimdall/issues/82
look for the last comment
Thank you
priyana said:
this is actually a Galaxy Tab 7" forum.
But anyway, your questions was answered (somewhat) by the heimdall author
look for the last comment
Click to expand...
Click to collapse
Thank you -- and sorry about that.
I just saw the title and didn't pay attention to the device model.
My bad.
Jesus is a prophet
GoSooners345 said:
factoryfs.rfs is the Factory installed filesystem and its the main rom
Click to expand...
Click to collapse
Thanks alot will try
What will happen if in heimdall i choose the 512.pit file with re-partition ticked and flash my SGS?
Will i have to install a stock rom, then a GB and lastely the latest rom of my preference?
Send me link for zadig file .thqnkx in advance
Sent from my GT-P1000 using xda app-developers app
CM 10.1 flashing feedback
espionage724 said:
Heimdall is an open-source alternative to flashing firmware to devices. It claims to be safer and a better alternative to Odin pretty much.
Although Heimdall is safer, it is still a firmware flashing tool, and like all firmware flashing tools, there could be dire consequences for not following instructions. I take no responsibility for what unexpected results or damage that may happen when following this guide. (I followed this guide on my tab though and it worked great)
- You should probably backup all important data prior to using Heimdall
First, you'll have to acquire Heimdall. You can find Heimdall releases and information here: http://www.glassechidna.com.au/products/heimdall/
- Heimdall is for Windows, OS X, and Linux
- I recommend using the command-line version over the GUI
zImage Guide
Note: For flashing of just the kernel to your device
- Command for flashing zImage
Code:
heimdall flash --kernel zImage --verbose
Files Needed:
zImage
ROM, Kernel, Modem, etc. Guide
Note: For flashing a ROM, Kernel, and Modem to your device, or for "re-stocking"
- Command for flashing complete ROM, Kernel, and Modem
Code:
heimdall flash --repartition --primary-boot boot.bin --cache cache.rfs --dbdata dbdata.rfs --factoryfs factoryfs.rfs --pit gt-p1000_mr.pit --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage --verbose
Files Needed for Command Above:
gt-p1000_mr.pit (partitioning)
modem.bin (modem)
boot.bin
cache.rfs
dbdata.rfs
factoryfs.rfs (file-system or ROM?)
param.lfs
Sbl.bin
zImage (kernel)
From this point on, this will mostly be a Windows-based guide. I'll use a Samsung Galaxy Tab 7" P1000 GSM and I'll re-stock using files from Overcome, and then flash the Overcome kernel afterwards. You may have to modify parts of the guide for different devices, kernels, ROMs, Operating Systems, etc.
Windows Driver Preparation
1. Install Samsung's Drivers (SAMSUNG_USB_Driver_for_Mobile_Phones.msi either from Kies or SAMSUNG_USB_Driver_for_Mobile_Phones_x86.exe from GB-Stock-Safe-v5.zip)
Note: You should reboot your computer after installing, even if it doesn't tell you to. Drivers wouldn't initialize until I rebooted.
2. Connect your Tab to your computer at least once in Normal, Recovery, and Download mode so that all drivers initialize
3. Reboot your tab to Download mode
4. Run zadig.exe
5. Go to Options > List All Devices
6. Select Samsung USB Composite Device from the dropdown box
7. Click Install Driver (accept any unsigned driver prompts you get)
8. Once Zadig says the drivers are installed successfully, close it
Windows Flashing Preparation
1. Make a folder specifically for Heimdall someplace safe
2. Copy heimdall.exe and libusb-1.0.dll to the Heimdall folder
3. Acquire GB-Stock-Safe-v5.zip, and Overcome_Kernel_v4.0.0.tar
4. Extract the contents of GB-Stock-Safe-v5.zip in a folder somewhere
Note: In the GB-Stock-Safe-v5.zip extracted folder should at least be modem folders, gt-p1000_mr.pit, and GB_Stock_Safe_v5.tar
5. Take the modem.bin from the modem of your choosing and throw it in the Heimdall folder
6. Take gt-p1000_mr.pit and throw it in the Heimdall folder
7. Extract the contents of GB_Stock_Safe_v5.tar into the Heimdall folder
Note: You should have 13 files total equaling around 391MB
Windows Flashing (Re-stocking)
1. Reboot your tab into Download mode
2. Connect it to your PC with the same USB port you used to prepare drivers
3. Open Command Prompt
4. cd into the Heimdall folder
5. Type (or copy/paste)
Code:
heimdall flash --repartition --primary-boot boot.bin --cache cache.rfs --dbdata dbdata.rfs --factoryfs factoryfs.rfs --pit gt-p1000_mr.pit --modem modem.bin --param param.lfs --secondary-boot Sbl.bin --kernel zImage --verbose
and press Enter
Note: This will take maybe 2 minutes, but quicker then Odin
Note: When flashing is complete, tab will automatically reboot
Note: You will have to manually wipe caches and factory reset from Recovery if you see it fails to mount /data on initial boot (if you see red text, then it failed)
6. When tab finishes booting, complete the Setup Wizard
Note: If you are going to flash another ROM (such as icedBOCA, CM9, etc), then just press Next through all of setup. Language will be Italian, but this does not matter for now
Note: If you just want to return to a pure factory state, this is as far as you should go
Note: This does not seem to wipe the internal SD card. For the cleanest experience possible, I recommend manually formatting the internal SD card right after the Setup Wizard
Windows Flashing (Overcome Kernel)
Note: This will convert partitions to ext4 and give you CWM recovery
Note: This is to be done after you have re-stocked
1. Acquire Overcome_Kernel_v4.0.0.tar
Note: You should have this already if you followed Windows Flashing Preparation
2. Copy heimdall.exe and libusb-1.0.dll to a new Heimdall folder
Note: Or use the same Heimdall folder you had previously
Note: I'll refer to the new folder as Heimdall2
3. Extract the zImage file from Overcome_Kernel_v4.0.0.tar to the Heimdall2 folder
4. Reboot your tab into Download mode
5. Connect it to your PC with the same USB port you used to prepare drivers
6. Open Command Prompt
7. cd into the Heimdall2 folder
8. Type (or copy/paste)
Code:
heimdall flash --kernel zImage --verbose
Note: This should take less then 5 seconds
Note: Your tab should automatically reboot when completed
9. Your tab should now convert partitions to ext4
Note: This is known as the Voodoo lagfix
Note: You will be stuck on the SGT bootscreen until this process is done
Note: You will hear a "sexy" voice telling you the steps of the ext4 process
Note: This process should take maybe 3-5 minutes
Note: Your tab will automatically reboot when complete, so you can walk away if needed
10. You are now on Gingerbread with Overcome kernel
- From this point on, you can now proceed to install (most, if not all) any compatible ROM/Kernel you want
- You should not need Heimdall from this point on also, as most ROM's and Kernels offer .zip packages that can be flashed from CWM/Recovery
Note: For any new ROM you flash, I recommend doing a data wipe afterwards, that way, you can gain access to the Setup Wizard and properly setup your Google Account, Market Sync, etc.
Windows Troubleshooting and Q&A
Q: I get a libusb error when trying to flash anything with Heimdall
A: This is due to either improper driver installation or using another USB port then the one you used to install the drivers
Note: You have to use zadig
Note: I would recommend uninstalling all previous USB filter drivers as well if you have problems
Q: Is it possible to use both Heimdall and Odin?
A: Yes, but it is recommended to have two USB ports. Do the zadig driver install on one USB port, and that port will be for Heimdall, and the second USB port will be untouched, and you'll be able to use Odin on it
Note: You cannot use Heimdall and Odin on the same port without uninstalling/installing the libusb filter driver from zadig that Heimdall needs
Q: Is Heimdall really faster then Odin?
A: Indeed. It's faster to start the flashing process, and faster to flash in-general. For instance, to re-stock my tab, I simply plug it into my Heimdall USB port, run a batch file (simply containing the command used above), and it's re-stocked in about 1 minute. With Odin, you have to manually select the files, and then flashing itself takes 2-3 minutes.
Click to expand...
Click to collapse
I flashed GT p1000 GSM through this method. CM10.1 4.2.2 worked really well. No bugs yet. Will feedback further.soon.
Mensreaorder out!
Great
Sent from my GT-I9300 using xda premium
please post a link to the required files
Hi...i downloaded heimdall, but was unable to find all the required files like dbdata.rfs, param etc... Please post a link containing the full package.
But you need to say which tab model/variant is yours,
Sent from my GT-P1000 using xda app-developers app
Details on the problem
priyana said:
But you need to say which tab model/variant is yours,
Sent from my GT-P1000 using xda app-developers app[/QUOTE
Hi Priyana. I'm using the Galaxy tab p1000 asian version. I was running cm 9.1 on it for the last 6 months without any problems, but recently tried out the bluetooth tethering and the software went into an infinite bootloop. I tried recovery by trying a full wipe, but when i tried to restore one of the old backups it all crashed again. My device is now able to go into download mode with power+vol down button combo. Also when the power button is long pressed, i get the Samsung galaxy tab frozen splash screen and on connecting the charger there is a battery icon but no charging progress.
Odin did not recognize the device despite waiting and watching as recommended, hence i tried flashing with heimdall 1.4 version and the GB stock safe rom by following the instructions. Device drivers get installed and heimdall detects my device.Was able to figure out the files and run Heimdall (my previous question is hence irrelevant), but to no avail. Am attaching the log after the Heimdall run. Please help.
Click to expand...
Click to collapse

[Q] how to make .img files from existing tablet?

I have a complete setup for the Nexus 7, part of a product we are working on, that I need to easily clone on "virgin" tablets for production. The app requires a rooted OS.
I want to write an installation script using fastboot to unlock the bootloader, erase partitions, then flash them with .img files for each partition (kernel, system, cache, etc.).
How do I extract .img files from my "master" tablet? I have an understanding from some where that these are simple byte-for-byte dumps of the partition -- is this true? As such can I create a .img file by simple doing 'cat blkfile >file.img' where "blkfile" is the appropriate block device for the partition in question?
Or do I need to use 'dd'? Or something else?
I have searched and searched, and can't find an anwer. I've found other answers using some tools to create these files from a build on a PC, but nothing about creating them from an existing tablet.
Thanks in advance!
Use the dd command. You can use it both to dump and write a partition. It's how I install recovery programs like TWRP
Sent from my Nexus 7
You can use dd for the boot partition and recovery partition - they are raw binary blobs. (Don't use dd on other Android devices, esp. those that have MTD flash devices, though - it only works most of the time there)
If you want to use the same fastboot-based scenario that Google uses for factory image sets, then for the system & userdata image files you will need to find out about "sparse ext4 filesystem images"
If you took a raw block-device based dump of any of your tablet ext4 partitions, you could actually take those image files and mount them on any other linux machine (using a loopback mount procedure).
But you will find that if you attempt to do that with the Google factory ".img" files (for system & userdata partitions), they will not mount. It's not a simple matter of a offset superblock, either.
Since these are the formats that the stock recovery expects, I suppose you ought to use those formats if you want to do the "all at once all partitions" fastboot flashing if you plan on using the stock recovery.
Note that there is absolutely nothing that prevents you from unpacking whatever you want from whatever archive format you want - so long as the recovery's busybox supports the archive format correctly - you could use cpio or pax or tar archives for that matter. (The stock recovery's "toolbox" has very little functionality, so this comment applies to custom recoveries, which typically have more robust functionality in their busybox) You will be writing your own scripts to do those things though, typically either in one of two ways:
1.A mount target filesystem partition
1.B do a deep recursive remove at that mountpoint ( rm -rf * )
1.C unpack your archive into same mount point ( tar xf archive.tar, etc)
1.D unmount the mount point
OR
2.A unmount target partition and zero it out (dd if=/dev/zero, flash_erase, etc)
2.B recreate filesystem in partition (mke2fs -t ext4 etc)
2.C mount target filesystem
2.D unpack your archive into the same mount point (tar xf archive, pax, cpio, unyaffs2, etc)
2.E unmount that mountpoint
Even though this post is for the Samsung Galaxy S II, the same thing applies to the factory Nexus 7 images from Google:
http://forum.xda-developers.com/showthread.php?t=1081239
As that thread mentions, the simg2img and mkuserimg.sh programs are part of the Android project.
Here's a Nexus 7 thread where the contributor built the tools for both x86 linux and arm linux
Finally, I should note that because /system is typically mounted read-only, imaging /system from the live OS is no big deal. Trying to do the same thing with /data is an extremely dopey idea, however. Accurate backups are rarely made from live read-write filesystems.
cheers
Thank you so much for all the great information! I hit thanks for both of you.
The link to the nexus 7 thread is what I need... This is for my company, and I need a simple cloning solution that can be performed by a non-technical assembly person. The fastboot install procedure is about as simple as it gets.
Thanks again!

[Solved] Best way to make system.img into a recovery flashable zip?

Hi, I've been trying to make sparse system.img from firmware tar file into a twrp-flashable zip file but I'm not sure which is the best way.
All operations are performed on latest linux mint and I'm not going to use any kitchen. All binaries used to convert images are compiled from latest AOSP sources.
Here are some of the methods I've tried.
a) Extract everything from system.img and set metadata infos in updater-script, just like any other "rom"s. (e.g. SuperMan Rom)
Probably one of the simplest ways, and system files inside the zip can be modified easily - extract, edit, recompress.
But this method has a potential of destroying unique permissions/owner infos, such as those of symlinks.
I'd like to flash the system.img "as-is," without making a mess with whatever's inside the image.
b) Extract raw system.img directly to /dev/block/platform/155a0000.ufs/by-name/SYSTEM.
Not so bad. Raw system.img can be easily generated with simg2img. But turns out to take too much time to flash and doesn't get along well with DualBoot patcher.
c) Sparse dat, like the ones used in most AOSP-based roms
Probably the most ideal one. But when I took the following steps to make it, I found out that system partition size gets kinda damaged or something.
- Convert system.img to raw system.img with simg2img.
- Convert the raw system.img to sparse image again with ext2simg, to make img2sdat.py work properly.
- Convert the sparse image to sparse dat with @xpirt's img2sdat.py.
- Finally, convert the generated sparse dat to raw system image with sdat2img.py to check if partition size matches.
Then I get the following results.
- Size of original raw system.img : 4404019200
- Size of raw system.img generated in last step : about ~100MB smaller
I know I can loop mount system.img and then make a new sparse image with make_ext4fs,
but it also breaks some permissions and make_ext4fs won't recognize file_contexts.bin from nougat firmware whereas it worked well with marshmallow's.
If anyone's got a better method or a solution for method c please leave a reply. Thanks in advance.

[Guide] [Unbrick] How to revive a hard bricked Moto G5

This guide is for hard bricked Moto G5 Cedric
Hard bricked means a device which can not enter bootloader mode normally
This method has now been confirmed working
Works with XT1672 XT1670 XT1671 XT1675 XT1676 XT1677 (and most likely all others and if you ask if it will work on your version I will just copy & paste this to you!)
Smaller Image
Thanks to Luka Panio, Omega, and nift4 we now have a smaller image size
Goto This github page and under assets download mmcblk0.img.gz
Extract mmcblk0.img from the zip file to PC
Previous Larger Images
Mega
Download mmcblk0.zip image from Mega
Create your own mega account and import the file into your mega account. Log into your account and download it from your own account
Extract mmcblk0.img from mmcblk0.zip to PC
Or for those of you who can't use mega or have unstable Internet I've split the large file size into smaller multiple zip files. You must download each part and then extract using an unzip tool like winrar or 7zip
Android File Host
Download mmcblk0.zip mmcblk0-part1.zip and mmcblk0-part2.zip from Android File Host
Extract mmcblk0.z01 from mmcblk0-part1.zip
Extract mmcblk0.z02 from mmcblk0-part2.zip
Extract mmcblk0.img from mmcblk0.zip (If prompted point to mmcblk0.z01 and mmcblk0.z02 but it shouldn't ask if all files are in the same folder)
Requirements
Freshly formatted microSD card 16gb if using the smaller image or at least 32gb if using the previous larger images (It needs to have at least 31.3gb free after formatting - if it displays as less you will need to buy a 64gb microSD card or use the smaller image)
7zip
Linux mint live usb/dvd
USB card reader
Method
The BEST method to flash the sdcard with mmcbk0.img file is to use LINUX!
Windows users have no need to install Linux on their PC, you can run Linux from a bootable usb-stick that is at least 8gb or a dvd
Do not run Linux as a virtual machine on Windows! Use the live USB/DVD
0) Put the Moto g5 on mains charge until you have finished flashing the sdcard so it's fully charged ready for the boot test!
1) Run Linux, preferably cinnamon or mate versions of Linux Mint
2) Insert the sdcard in pc or card reader and open "Disks" app
3) In "Disks" app select sdcard and you will see the sdcard partitions
4) Press "-" to delete the partition (delete all partitions if there is more than one)
5) Press "+" to create a new one and name it mmcblk0, set FAT(FAT32) file format and press "CREATE"
6) Press "Play" button to mount the sdcard, look to see what path the sdcard has (/dev/sd??) and then close the "Disks" app
7) Go to Desktop, open "Computer" and navigate to the location where the img file is extracted (mmcblk0.img)
8) Open the window where img file is with root (right click on window and select "open as root")
9) In root window open the Terminal (right click on window and select "open terminal")
no need to type "su" in terminal, it has root already (see notes if using Linux live usb/dvd)
10) Type in terminal the command written below and don't forget to eliminate that "1" from the sdcard path,
that "1" can make the difference between the phone booting or not!!!!!
Things to note
Linux Live dvd doesn't have open as root so just open in terminal and add sudo to the start of the commands
I've included this in the commands below
If you get a status error just remove status=progress from the terminal command below
Terminal comands
- if your sdcard is seen like " /dev/sdb1"
in terminal apply this command:
Code:
sudo dd bs=4M if=mmcblk0.img of=/dev/sdb status=progress oflag=sync
-if your sdcard is seen like " /dev/mmcblk0p1"
in terminal apply this command:
Code:
sudo dd bs=4M if=mmcblk0.img of=/dev/mmcblk0 status=progress oflag=sync
and the flashing process should start
When it finishes, test the sdcard in the phone and it should boot!
If you get a size error of the sdcard in terminal you have to change the sdcard and try again!
Thanks to @vaserbanix for the original version of this guide
Re-flash Stock Firmware
Once the phone is in bootloader mode you can flash stock firmware via fastboot
Note that in order to flash gpt the firmware MUST be the same or newer than the version currently on your phone
Firmware can be download from Here
Once you have firmware that is the same or newer than your current version you can remove the sd card and run these commands (assuming you have fastboot all setup on your pc)
If you get a security downgrade error when you try to flash gpt.bin or bootloader.img then the firmware you are trying to flash is too old!
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear
fastboot reboot
I might consider doing this if you explained what this loader.img is?
Is it something one would flash to recover their G5?
Exanneon said:
I might consider doing this if you explained what this loader.img is?
Is it something one would flash to recover their G5?
Click to expand...
Click to collapse
Potentially - its used to boot off the sd card so those with a bricked phone can access the bootloader through booting it off their sd card & then flash the firmware via fastboot
See
https://www.aryk.tech/2017/02/how-to-unbrick-debrick-qualcomm-android.html?m=1
I hope the solution is achieved soon
Here you go:
https://cloud.wdata.de/index.php/s/JK2by8YBQCSrsof
Device Info:
Cedric XT1676 Retail
LineageOS 14.1
TWRP 3.2.1 (32bit)
staffe said:
Here you go:
https://cloud.wdata.de/index.php/s/JK2by8YBQCSrsof
Device Info:
Cedric XT1676 Retail
LineageOS 14.1
TWRP 3.2.1 (32bit)
Click to expand...
Click to collapse
Thanks for uploading it
Hello, I followed all the steps of the link, using a 16gb card and the file here hung and nothing, the phone does not start.
In my case it is an xt1676 which only turns on the led and blinks when I connect it to the pc by usb or the wall charger.
takoa said:
Hello, I followed all the steps of the link, using a 16gb card and the file here hung and nothing, the phone does not start.
In my case it is an xt1676 which only turns on the led and blinks when I connect it to the pc by usb or the wall charger.
Click to expand...
Click to collapse
I take it the programme wrote the loader image successfully to sdcard
So either the person who uploaded the Loader.img interrupted the extract & so its corrupted or this phone can't boot off the sd card with this method
It does say it may take a while to boot but who knows
If anyone else can upload a Loader.img using the methods in the first post so there's a comparison please do
Yeah right.
What is strange to me, although maybe it is, is the size of the file hung here, 165 mb.
the 16gb card is formatted in fat32, is it correct?
Does the DiskImageRev2 program automatically create the card to be bootable?
Why install the qualcomm drivers if the phone does not have to be connected to the PC? It is assumed that the phone will boot in bootloader mode and there only need the adb / fastboot controllers.
I do not mind to keep trying since the phone I give for lost at the moment.
Can someone return to the first post with an xt1676?
Thank you.
TheFixItMan said:
I'm trying to work on a solution for guys with a hard bricked moto g5 but as I no longer own this device anymore I need someone to provide the following
Requirements
Rooted moto g5
Busybox installed
Terminal emulator installed
What I need
In terminal emulator type su and grant superuser access
Then type
Code:
dd if=/dev/block/mmcblk0 of=/sdcard/Loader.img bs=1024 count=168960
Wait for the command prompt to return (it may take a few mins)
Post the Loader.img file created on the root of sdcard here
Click to expand...
Click to collapse
https://drive.google.com/file/d/1H2Qkc1XKbr7Is46n5xdCFlgiuIH1m-vE/view
Device : XT1677
takoa said:
Yeah right.
What is strange to me, although maybe it is, is the size of the file hung here, 165 mb.
the 16gb card is formatted in fat32, is it correct?
Does the DiskImageRev2 program automatically create the card to be bootable?
Why install the qualcomm drivers if the phone does not have to be connected to the PC? It is assumed that the phone will boot in bootloader mode and there only need the adb / fastboot controllers.
I do not mind to keep trying since the phone I give for lost at the moment.
Can someone return to the first post with an xt1676?
Thank you.
Click to expand...
Click to collapse
I presume it's needed for some devices who use different methods of flashing stock firmware
Someone else has uploaded an image file so you can try that one from a xt1677
Yes formatted fat32 - you should just have to select the drive the sdcard card is assigned to on your pc in the program eg f: and then select image file & then write - and accept the warning
It should make it bootable
Iv no idea if this method will work with this device
then it does not work in this model or the file posted here is wrong. Because I have done it as here is exposed and nothing.
I'm going to try the one from xt1677
TheFixItMan said:
So either the person who uploaded the Loader.img interrupted the extract & so its corrupted or this phone can't boot off the sd card with this method
It does say it may take a while to boot but who knows
Click to expand...
Click to collapse
Hmm, there haven't been any error messages on my side. I pulled the image again with above dd-command. I also tried with adb shell instead of terminal emulator but it's always the same file with the exact same file size.
staffe said:
Hmm, there haven't been any error messages on my side. I pulled the image again with above dd-command. I also tried with adb shell instead of terminal emulator but it's always the same file with the exact same file size.
Click to expand...
Click to collapse
I assume the file is correct - it's probably more the case of this phone doesn't support this method
If I get my hands on this device again in the future I can properly test things but at the moment all I can do is throw out ideas for people to try
Think I'll leave it now as without the device there's not a lot I can do
nothing, it does not work. it does not start :crying:
As I said, only the LED flashes when connected by USB or charger.
I recommend using rufus for flashing it to the sd card, it has never failed me yet, and supports up to 16gb.
Edit: I have the XT1675, if anyone would find it useful for me to post this variant's bootloader then I'd be happy to do so.
Edit again: Isn't dd used for writing an image to flash storage for later booting rather than extracting it?
takoa said:
nothing, it does not work. it does not start :crying:
As I said, only the LED flashes when connected by USB or charger.
Click to expand...
Click to collapse
It seems, some qualcomm devices need a full mmcblk0 dump to be able to boot from sdcard (e.g. LG G5)¹. I don't know if thats the case for our device but you can give it a try:
Loader_XT1676.zip Uncompressed filesize: ~4GB
¹ "The Loader method requires a full ROM Dump also known as a full blk0 backup of a working LG G5 H850 correctly flashed or written on a pretty good and fast class 10 SD Card."
Source: https://www.aryk.tech/2018/03/lg-g5-h850-unbrick-solutions.html
Exanneon said:
Edit again: Isn't dd used for writing an image to flash storage for later booting rather than extracting it?
Click to expand...
Click to collapse
dd basically clones/copies the source-data block by block to another disk, partition or (img-)file.
staffe said:
It seems, some qualcomm devices need a full mmcblk0 dump to be able to boot from sdcard (e.g. LG G5)¹. I don't know if thats the case for our device but you can give it a try:
Loader_XT1676.zip Uncompressed filesize: ~4GB
¹ "The Loader method requires a full ROM Dump also known as a full blk0 backup of a working LG G5 H850 correctly flashed or written on a pretty good and fast class 10 SD Card."
Source: https://www.aryk.tech/2018/03/lg-g5-h850-unbrick-solutions.html
dd basically clones/copies the source-data block by block to another disk, partition or (img-)file.
Click to expand...
Click to collapse
Thanks for the info - if someone can try this full Loader.img & let me know if it works I'll write up a guide
Iv added the guide to the first post if people want to test
Like Iv said before I no longer own this device - I have not tested this & it may not work
Feel free to add potential solutions to help those with bricked devices

Searching TWRP for the SM-A515F

Hi,
I would like install at the Samsung SM-A515F the Lineage OS and the TWRP. I found only TWRP for the SM-A50. And the flashing dose not work for this phone.
I has try it with Heimdall and Odin.
The recovery I had downloaed from this Page:
https://www.droidthunder.com/install-twrp-recovery-on-galaxy-a51/
Need help or better information, if there exist an TWRP and lineage for this device.
Regards tiptel170
No need to flash twrp,u can flash aosp rom or even gsi with the help of odin only.Go to s10 page
sankhauaa said:
No need to flash twrp,u can flash aosp rom or even gsi with the help of odin only.Go to s10 page
Click to expand...
Click to collapse
s 10 page? which one is that? can u please provide the link?
Go here for odin flash method without twrp
sankhauaa said:
No need to flash twrp,u can flash aosp rom or even gsi with the help of odin only.Go to s10 page
Click to expand...
Click to collapse
sankhauaa said:
Go here for odin flash method without twrp
Click to expand...
Click to collapse
so does this method work for lineage os on A515F too?
After the long searching in the web, I found this:
A515F-TWRP
Link: https://firmware.gem-flash.com
After paying, you can download this TRWP. No idea, if this works. Maybe some one, will be use it.
ibtsam3301 said:
so does this method work for lineage os on A515F too?
Click to expand...
Click to collapse
I m not tried. But someone in this a51 group tried.Its working. But not so easy .
---------- Post added at 09:11 AM ---------- Previous post was at 09:09 AM ----------
tiptel170 said:
After the long searching in the web, I found this:
A515F-TWRP
Link: https://firmware.gem-flash.com
After paying, you can download this TRWP. No idea, if this works. Maybe some one, will be use it.
Click to expand...
Click to collapse
Don't pay.Its fake
tiptel170 said:
After the long searching in the web, I found this:
A515F-TWRP
Link: https://firmware.gem-flash.com
After paying, you can download this TRWP. No idea, if this works. Maybe some one, will be use it.
Click to expand...
Click to collapse
of course it would be fake
How can I open the img-files in the Linux desktop?
Found here this link, for the Magisk in the A515F:
https://forum.xda-developers.com/ga...w-to-root-samsung-a51-sm-a515f-t4032389/page2
I'll found this:
1. https://www.androlite.com/2020/01/twrp-root-samsung-galaxy-a51.html
2. https://appslova.com/install-twrp-on-samsung-galaxy-a51/
This links look likes good, because, my phone will not start or the heimdall goes into the error (likes in de page one, the screenshots ).
I found this, and I used basic from this page: https://forum.xda-developers.com/showpost.php?p=82241115&postcount=70
My first steps to install the lineage os 17 on the SM-A515F
Lineage: https://sourceforge.net/projects/andyyan-gsi/
All commands in the linux terminal, the path please use your own paths you like it!
Unpack lineage****.xz:
unxz lineage*.xz
1) Extract the AP_file.tar.md5 from your firmware.zip file using 7zip
2) Extract the super.img.lz4 file from the AP_file.tar.md5 file using 7zip
3) Put super.img.lz4 file in LZ4 folder and run in CMD the command
lz4 -d super.img.lz4 superLZ4.img
4) Put superLZ4.img file in Simg2img folder and run in CMD the command
chmod 777 ~/bin/otatools/bin/simg2img
~/bin/otatools/bin/simg2img superLZ4.img superSIMG.img
In Linux OR Bash shell:
1) Put superSIMG.img in otatools/bin folder and extract it in Linux terminal using the command
chomd 777 ~/bin/otatools/bin/lpunpack
~/bin/otatools/bin/lpunpack --slot=0 superSIMG.img ~/1
2) Put, in the folder where you extracted superSIMG.img, the GSI file you downloaded and rename it to system.img. Now you should have odm.img, system.img, vendor.img and product.img files in the same folder.
You may also need to delete/remane the original system.img file before renaming the GSI file.
3) Now you’re going to make a brand new super.img file containing all 4 files of the previous step. This is a critical and tricky step. Run Linux terminal and type:
chomd 777 ~/bin/otatools/bin/lpmake
~/bin/otatools/bin/lpmake ~/bin/otatools/bin/lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:4294967296 --group main:4293513600 --partition system:readonly:1959841792:main --image system=./system.img --partition vendor:readonly:680239104:main --image vendor=./vendor.img --partition odm:readonly:4349952:main --image odm=./odm.img --sparse --output ./super.img
4) Make an tar file:
tar -H ustar -c super.img > lineageos17.1_SMA515F.tar
5) Goto Windows -> Odin -> AP, put the file lineageos17.1_SMA515F.tar in to the AP-slot -> Start
This is what I has done:
But, by the compiling, I got this error:
Code:
lpmake I 07-15 20:18:20 92568 92568 builder.cpp:1012] [liblp]Partition system will resize from 0 bytes to 1959841792 bytes
lpmake I 07-15 20:18:20 92568 92568 builder.cpp:1012] [liblp]Partition vendor will resize from 0 bytes to 680239104 bytes
lpmake I 07-15 20:18:20 92568 92568 builder.cpp:1012] [liblp]Partition odm will resize from 0 bytes to 4349952 bytes
Invalid sparse file format at header magic
Invalid sparse file format at header magic
And the phone is into the boot-loop, it will not starting the system.
Any help please...
Update:
System requirements:
- Fedora 32 with current kernel
- VirtualBox 6.1 with USB support
- Windows 7
- ODIN 3.14
Enable Root:
I) On mobile phone
1. carry out firmware update
1.1 Set up device, WITHOUT Google Accounts, WITHOUT security settings, set up WLAN only
1.2 Settings -> Phone info -> Software information -> Build number (press 7x )
1.3 Settings -> developer option -> enable OEM unlocking and USB debugging
2. copy the files from the root directory to the external SD card
2.1 Install MagiskManager
2.2 Starting MagiskManager
2.3 Installing Magisk Select
II) In the Fedora area
3. unpack the boot.img from the AP***.tar, on the PC
3.1 lz4 -d boot.img.lz4 boot.img
3.2 Copy the boot.img to the SD card from the phone
4. patching the boot.img in MagikMager
4.1 Select the boot.img, wait until "Done" appears.
4.2 Then copy the magisk_patch.img to the workstation (Fedora)
5.1 Rename the original boot.img to boot_original.img
5.2 renaming magisk_patch.img to boot.img
5.3 Transfer the new boot.img to the PC for the ODIN or HEIMDALL
5.4 Convert the boot.img to boot.tar: tar -H ustar -c boot.img > boot.tar (here for ODIN)
III) Virtual environment Win7
6.1 Copy the boot.tar from the Fedora workstation to the Odin directory of Win7
6.2 Open the boot.tar in the AP slot, Auto Reboot must be off
6.3 Press Vol + & Vol - simultaneously and plug in the USB cable (On SM-A515F), then click on "Start" in the ODIN.
IV) On the Mobile Phone
7.1 If ready, restart with Vol - & Hold PWR for more than 7 sec
7.2 Putting the device into recovery mode (switch off, press vol up and pwr simultaneously, Samsunglog appears, release pwr again)
7.3 Wipe your data: Wiped data/factury reset
Note: Device makes a boot loop for the first time - is normal. The first start takes quite long, be patient!
7.4 Settings -> Phone info -> Software information -> Build number (press 7x )
7.5 Settings -> Developer option -> Enable OEM unlock, USB debugging and system auto update to OFF
7.6 Installing and starting MagiskManger
The device will restart once!
Check it: Whether root is present
Fedora workstation:
Call Terminal, enter adb shell followed by su
If everything went well, the MagiskManager should answer the phone and ask for authorization.
These steps works well with the firmware: SM-A515F R58N60BLPAZ
Where are the exactly steps for installing the TWRP?
I has installed the TWRP-10.0(A51).zip with the heimdall and the phone will not booting. And I'm not entering the TWRP. And finally I has reinstalled the revcovery.img (heimdall) from the APxxxx.zip file, and the phone starting normally.
All things with the AOSP10 etc, I has tried and the other steps for an alternative system will not work on this phone.
Thanks God, the root is now working. And I have to work with the ugly Samsung system.
tiptel170 said:
Update:
System requirements:
- Fedora 32 with current kernel
- VirtualBox 6.1 with USB support
- Windows 7
- ODIN 3.14
Enable Root:
I) On mobile phone
1. carry out firmware update
1.1 Set up device, WITHOUT Google Accounts, WITHOUT security settings, set up WLAN only
1.2 Settings -> Phone info -> Software information -> Build number (press 7x )
1.3 Settings -> developer option -> enable OEM unlocking and USB debugging
2. copy the files from the root directory to the external SD card
2.1 Install MagiskManager
2.2 Starting MagiskManager
2.3 Installing Magisk Select
II) In the Fedora area
3. unpack the boot.img from the AP***.tar, on the PC
3.1 lz4 -d boot.img.lz4 boot.img
3.2 Copy the boot.img to the SD card from the phone
4. patching the boot.img in MagikMager
4.1 Select the boot.img, wait until "Done" appears.
4.2 Then copy the magisk_patch.img to the workstation (Fedora)
5.1 Rename the original boot.img to boot_original.img
5.2 renaming magisk_patch.img to boot.img
5.3 Transfer the new boot.img to the PC for the ODIN or HEIMDALL
5.4 Convert the boot.img to boot.tar: tar -H ustar -c boot.img > boot.tar (here for ODIN)
III) Virtual environment Win7
6.1 Copy the boot.tar from the Fedora workstation to the Odin directory of Win7
6.2 Open the boot.tar in the AP slot, Auto Reboot must be off
6.3 Press Vol + & Vol - simultaneously and plug in the USB cable (On SM-A515F), then click on "Start" in the ODIN.
IV) On the Mobile Phone
7.1 If ready, restart with Vol - & Hold PWR for more than 7 sec
7.2 Putting the device into recovery mode (switch off, press vol up and pwr simultaneously, Samsunglog appears, release pwr again)
7.3 Wipe your data: Wiped data/factury reset
Note: Device makes a boot loop for the first time - is normal. The first start takes quite long, be patient!
7.4 Settings -> Phone info -> Software information -> Build number (press 7x )
7.5 Settings -> Developer option -> Enable OEM unlock, USB debugging and system auto update to OFF
7.6 Installing and starting MagiskManger
The device will restart once!
Check it: Whether root is present
Fedora workstation:
Call Terminal, enter adb shell followed by su
If everything went well, the MagiskManager should answer the phone and ask for authorization.
These steps works well with the firmware: SM-A515F R58N60BLPAZ
Where are the exactly steps for installing the TWRP?
I has installed the TWRP-10.0(A51).zip with the heimdall and the phone will not booting. And I'm not entering the TWRP. And finally I has reinstalled the revcovery.img (heimdall) from the APxxxx.zip file, and the phone starting normally.
All things with the AOSP10 etc, I has tried and the other steps for an alternative system will not work on this phone.
Thanks God, the root is now working. And I have to work with the ugly Samsung system.
Click to expand...
Click to collapse
It is work ???
GreggBorowski said:
It is work ???
Click to expand...
Click to collapse
--------------------------------------------------------------------------------------
These steps works well with the firmware: SM-A515F R58N60BLPAZ
Where are the exactly steps for installing the TWRP?
I has installed the TWRP-10.0(A51).zip with the heimdall and the phone will not booting. And I'm not entering the TWRP. And finally I has reinstalled the revcovery.img (heimdall) from the APxxxx.zip file, and the phone starting normally.
All things with the AOSP10 etc, I has tried and the other steps for an alternative system will not work on this phone.
Thanks God, the root is now working. And I have to work with the ugly Samsung system.
sankhauaa said:
I m not tried. But someone in this a51 group tried.Its working. But not so easy .
---------- Post added at 09:11 AM ---------- Previous post was at 09:09 AM ----------
Don't pay.Its fake
Click to expand...
Click to collapse
sar please send me a51 group
Mehran` said:
sar please send me a51 group
Click to expand...
Click to collapse
Go to s10 page
sankhauaa said:
Go here for odin flash method without twrp
Click to expand...
Click to collapse
Not working. I has done step by step in this guide.
ibtsam3301 said:
so does this method work for lineage os on A515F too?
Click to expand...
Click to collapse
No. Withe manipulation from the vbmeta.img, the system is unwilling to start. It gos in to the bootloader, with error-codes. Like in first thread I describe. Olny the SAMSUNG original system works with the kernel modification for the MagiskManager.
I saw black for the future, there will be exist an custom rom for this device.
I have no idea, what can I do for this device. But I use and spend a lot of time for modification, without an good result. Has anyone an idea what can I do? But it look likes, it has an great secure system intern for not using an customer rom. This is my intention.

Categories

Resources