Updating Rooted TWRP installed phone question - Samsung Galaxy S7 Edge Questions and Answers

I used the flashfire method of downloading firmware and extracting ap file and flashing system and boot.img. Does anyone know or has anyone tried taking the ap file and extracting system.img and boot.img and flashing those image files via twrp? Twrp I believe supports flashing image files and that should work in theory. Thanks
Also is it important to update csc or csc_home files? I am learning Samsung coming from always owning nexus devices which are quite a bit different.

flyinj54 said:
I used the flashfire method of downloading firmware and extracting ap file and flashing system and boot.img. Does anyone know or has anyone tried taking the ap file and extracting system.img and boot.img and flashing those image files via twrp? Twrp I believe supports flashing image files and that should work in theory. Thanks
Also is it important to update csc or csc_home files? I am learning Samsung coming from always owning nexus devices which are quite a bit different.
Click to expand...
Click to collapse
There's a thread which explains updating rooted devices with flashfire without loosing data here

Related

[HowTo] SM-G900FD with Android 5.0 Root if all seems to fail

[ Read the How To at the second post ]
Heya guys,
I just got yesterday my new Galaxy S5. I'm actually someone who is switching from the iPhone world to Galaxy.
I had a Note 2 in the past for some time and I'm sys admin so I'm a bit familiar with flashing and technical stuff.
Phone Information:
Model: SM-G900FD (or SM-G900MD?) (DuoS)
Country of Origin: United Arab Emirates
The phone came with stock rom 4.4.2. On the About Phone screen it shown SM-G900FD as model, directly from unboxing.
But when entering the Odin Mode it shows as product name SM-G900MD (which would fit the origin of course).
The first I did was downloading G900FDXXU1BNL9 (Android 5.0 SER (Russia)) and flash it with Odin. It works like a charm.
Then I tried dozen of different rooting methods, and failed every time, I spent I believe 10 hours on it already and flashed the phone about 30 times.
When flashing the stock rom, either the new G900FDXXU1BNL9 (5.0) or old G900FDXXU1ANF6 (4.4.2) it works like a charm.
The phone comes to life, Android is working fine.
As soon as I try to flash *any* other image, CWM, CF-Auto-Root or anything, it starts with "NAND Write Start!" and then in some seconds stops with "Complete(Write) operation failed." and the system ends up in a soft brick (Firmware upgrade encountered an issue. Please select recovery mode in Kies & try again.). I tried from every piece of software I could find many different versions. Different Odin versions. I tried Heimdall (Mac) and fastboot (Windows & Mac) without success. These two don't work at all with the phone. Heimdall can't correctly connect to the phone and download the PIT, I was reading its a bug with the newest bootloader of Samsung. And fastboot/adb can't see the phone, at all. While heimdall or odin can see the phone, so its not a driver issue that the OS can't recognize the phone.
I tried also different versions of CWM, CF-Auto-Root, either for SM-G900FD or SM-G900MD. No luck.
What I tried then was using towelroot, but it doesn't work with the newest Android. So I found a thread that stated to flash a old Kernel, which will give errors during booting but you can then root the phone with towelroot, and then flash the newest kernel back to the phone. I tried that, taking out the boot.img files from old and new firmware out and use a script to package them into .tar.md5 files and try to flash them with Odin. Even there, Odin reports FAIL! With the boot.img files from the stock images, which work fine flashing if I flash the entire stock image.
I tried also installing a old stock rom and try rooting it there with CWM/CF-Auto-Root. Same stuff, FAIL! flashing.
I'm a bit out of ideas right now. Does anyone ever encountered this? Or does have a hint on what could cause this problems?
Some threads I was reading (its a way more, but the list would be too long, I just add the most recent ones) and following:
[How to] Root for 4.4.2 and Flash rooted Stock Android 5.0 with KNOX 0x0?
http://forum.xda-developers.com/showpost.php?p=54745709&postcount=13
Galaxy S5 G900FD
http://forum.xda-developers.com/showpost.php?p=55994495&postcount=102
[Script][Tool] how to create a tar.md5 file from img For Odin
http://forum.xda-developers.com/showthread.php?t=2446269
Click to expand...
Click to collapse
Thank you very much for any assistance. I hope there is a possibility to root this phone
Cheers,
Sven
PS: My KNOX Warranty Void is already increased, so the warranty is killed already.
[HowTo]
Heya everyone again,
I just wanted to say that the last hope I had to try did work finally.
As every flashing of single partitions (eg. recovery.img, cache.img.ext4 or boot.img) failed, I did the following:
1. Take the image you want to have, in my case it is Android 5.0 SER (G900FDXXU1BNL9) stock image, and unpack it
2. Take the CWM, I used philz_touch_6.26.2-klte.tar.md5, and unpack it
3. Move the recovery.img file from the CWM to the image you want to flash and replace the original recovery.img
4. Package all together into one image.tar.md5 file, in my case it would be the stock image with the replaced CWM recovery.img
5. Flash it with Odin, it worked at me!
6. Proceed with the default rooting procedure of CWM (copy SuperSU, boot recovery, install ZIP)
You are done!
Steps to package the image.tar.md5 file (I used Mac OS X Yosmite):
$ COPYFILE_DISABLE=1 gtar -H ustar -c NON-HLOS.bin aboot.mbn boot.img cache.img.ext4 hidden.img.ext4 modem.bin recovery.img rpm.mbn sbl1.mbn sdi.mbn system.img.ext4 tz.mbn > image.tar
$ gmd5sum -t image.tar >> image.tar
$ mv image.tar image.tar.md5
Click to expand...
Click to collapse
The OS X tools (tar and md5) are NOT suitable! You should use brew install coreutils and use the gnu tar and md5sum commands. The OS X tar will produce a unusable tar file and Odin will crash, the OS X md5 produces a different output than md5sum (even when using md5 -r) and the verification will fail. When using Linux/Windows tar/md5sum tools all should be fine. If odin crashes when trying to flash it doesn't like how tar packaged up your file. Try a different tar version (better: operating different system).
I hope this helps people that encountered the same issue as me and they can now enjoy Android 5.0 with root on their SM-G900FD.
Cheers,
Sven
Well done!!
af2k said:
Heya everyone again,
I just wanted to say that the last hope I had to try did work finally.
As every flashing of single partitions (eg. recovery.img, cache.img.ext4 or boot.img) failed, I did the following:
1. Take the image you want to have, in my case it is Android 5.0 SER (G900FDXXU1BNL9) stock image, and unpack it
2. Take the CWM, I used philz_touch_6.26.2-klte.tar.md5, and unpack it
3. Move the recovery.img file from the CWM to the image you want to flash and replace the original recovery.img
4. Package all together into one image.tar.md5 file, in my case it would be the stock image with the replaced CWM recovery.img
5. Flash it with Odin, it worked at me!
6. Proceed with the default rooting procedure of CWM (copy SuperSU, boot recovery, install ZIP)
You are done!
Steps to package the image.tar.md5 file (I used Mac OS X Yosmite):
The OS X tools (tar and md5) are NOT suitable! You should use brew install coreutils and use the gnu tar and md5sum commands. The OS X tar will produce a unusable tar file and Odin will crash, the OS X md5 produces a different output than md5sum (even when using md5 -r) and the verification will fail. When using Linux/Windows tar/md5sum tools all should be fine. If odin crashes when trying to flash it doesn't like how tar packaged up your file. Try a different tar version (better: operating different system).
I hope this helps people that encountered the same issue as me and they can now enjoy Android 5.0 with root on their SM-G900FD.
Cheers,
Sven
Click to expand...
Click to collapse
Well done !!
i was looking for this root for my phone M-G900FD
until i read your thread ,so please upload the ready made file to root my phone as i am not experienced in this matter
waiting for your feed back
thanks
I had the same problem. I couldn't flash any other image whatever I did. And what I did was disabling reactivation lock within the settings. Worked since then.
free007 said:
please upload the ready made file
Click to expand...
Click to collapse
I will look into this tomorrow and provide a ready image for this.
AlwaysAndroid said:
what I did was disabling reactivation lock within the settings. Worked since then.
Click to expand...
Click to collapse
It didn't work out of the box at me. I checked right now within the settings and the reactivation lock is disabled already.
So we seem to face different problems. I still don't understand why flashing anything but an entire firmware is failing.
Well done indeed, would love to get my hands on your modded ROM, as in Dubai with new Duos just purchased today.
Any problems with Wifi passwords not being stored on re-boot?
af2k said:
Heya everyone again,
I just wanted to say that the last hope I had to try did work finally.
As every flashing of single partitions (eg. recovery.img, cache.img.ext4 or boot.img) failed, I did the following:
1. Take the image you want to have, in my case it is Android 5.0 SER (G900FDXXU1BNL9) stock image, and unpack it
2. Take the CWM, I used philz_touch_6.26.2-klte.tar.md5, and unpack it
3. Move the recovery.img file from the CWM to the image you want to flash and replace the original recovery.img
4. Package all together into one image.tar.md5 file, in my case it would be the stock image with the replaced CWM recovery.img
5. Flash it with Odin, it worked at me!
6. Proceed with the default rooting procedure of CWM (copy SuperSU, boot recovery, install ZIP)
You are done!
Steps to package the image.tar.md5 file (I used Mac OS X Yosmite):
The OS X tools (tar and md5) are NOT suitable! You should use brew install coreutils and use the gnu tar and md5sum commands. The OS X tar will produce a unusable tar file and Odin will crash, the OS X md5 produces a different output than md5sum (even when using md5 -r) and the verification will fail. When using Linux/Windows tar/md5sum tools all should be fine. If odin crashes when trying to flash it doesn't like how tar packaged up your file. Try a different tar version (better: operating different system).
I hope this helps people that encountered the same issue as me and they can now enjoy Android 5.0 with root on their SM-G900FD.
Cheers,
Sven
Click to expand...
Click to collapse
Looks like gtar needs to be installed separately.
$ brew install gnu-tar
This is what I was looking for...
I am not on OSX. Is there a possibility to get access to the modified image?

Making custom SM-G903F (GS5 Neo) LL 5.1.1 Pre-rooted Odin Rom (HELP)

Hello the community,
i'd like to ask you for help because i don't manage to make it.
Here is the problem :
1/ i flashed last firmware for the phone
2/ then root it, install latest busybox....
3/ dump from my phone cache & system using this :
dd if=/dev/block/platform/13540000.dwmmc0/by-name/CACHE of=/sdcard/cache.img
dd if=/dev/block/platform/13540000.dwmmc0/by-name/SYSTEM bs=4096 of=/sdcard/system.img
I check it using linux reader. No problem at all
4/ Then repack those 2 files with others files which are on stock tar file (boot, hidden...)
5/ Launch Odin, put my tar on AP then flash.
- All were ok until it came to cache.img then fail
On stock tar, there is a system.img (not .raw). Don't know if it is sparsed but....i suppose as it needs to be converted to bre used with linux reader.
So i dunno what to do to have a valid cache.img & system.img
If you can help me, i will be grateful.
Thanks for all.
Hi
I'm trying too making a pre rooted stock rom flashable through odin. But i get everytime a "failed" from Odin.
However why are using your cache instead of cache.img present in stock firmware?
Try unpack stock firmware and replace only custom "system.img" that contains root and finally repack stock firmware!
Well some info i need is in cache
why don't you make a flashable zip since you know the partions then add root
malbert16442 said:
why don't you make a flashable zip since you know the partions then add root
Click to expand...
Click to collapse
A stock firmware pre-rooted flashable through odin is more comfortable whenever you wanna reset your phone isn't need to using FlashFire or Mobile Odin. IMHO

Questions on ROM development

I am able to extract System.img from the 4.4.4 ODEN install and mount it in Ubunto. I can modify the folders and files to remove bloat, etc. I am able to repack back and use FlashFire to flash the 4.4.4 modified firmware.
My question is related to 5.0. I have tried the same method and after several modifled attempts, was able to extract and mount the System.img. After debloating, etc. I tried to repack it the same way but in FlashFire, it fails the MD5 check.
I tried another approach. Instead of repacking the full firmware package, I just created the System.img as a stand alone flash-able package. I then install 5.0 through ODEN, install Root and FlashFire.
When I try to flash my modified System.img through FlashFire, it passes the MD5 and installs successfully but it never boots. It never even makes it to the initial boot screen.
After that, I have to ODEN back again and start over. Any dev's out there that might know what I might be missing or can point me to some documentation on the process for 5.0?
I used SuperR's Kitchen to customize my Note 3's Lollipop, then Flashed via FlashFire.
http://forum.xda-developers.com/chef-central/android/kitchen-superrs-kitchen-t3202296
Looks like the kitchen will make it a lot easier. I checked one out a while back but the dev said it wasn't supported anymore. Thanks!
Sent from my SM-N900V using Tapatalk

Issue faced in flashing kernel compiled from source

Hi Guys,
I have compiled a kernel for note 4 from opensource samsung.
I have got zimage in two locations , one in output which is less than 10mb and one in main kernel boot folder which is 20 mb.
When i try to flash using odin i , get the error , unsupported dev type.
I have firmware N910GDTS1DRH2 N910GODD1DRD1 downloaded from sammobile.
Also after compiling i have got some modules which i didnot touch.
I downloaded source from http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=n910g
I have tried 3 mm versions, but all give same error.
Any help will be appreciated.
I also tried making boot.img with perl script but phone doesnot boot up using that.
Thanks and Regards,
Ankit
I use AIK to unpack the stock boot image. Take the zImage from output/arch/arm/boot/ and replace the original one in the new split_img folder that AIK creates. Be sure to rename it what AIK names it (boot.img-zImage if I remember right). Then repack it flash the new image via TWRP. The new-image should be close to 15.8 mb.
Edit- forgot to hit reply button @xdauserherewithnote4
Is TWRP neccessary
kevintm78 said:
I use AIK to unpack the stock boot image. Take the zImage from output/arch/arm/boot/ and replace the original one in the new split_img folder that AIK creates. Be sure to rename it what AIK names it (boot.img-zImage if I remember right). Then repack it flash the new image via TWRP. The new-image should be close to 15.8 mb.
Edit- forgot to hit reply button @xdauserherewithnote4
Click to expand...
Click to collapse
Thanks for your reply, i was wondering if i can flash using odin or i have to use twrp? zimages are convertible to tar files that odin can flash but the problem i am facing is odin mode showing unsupported dev type.
xdauserherewithnote4 said:
Thanks for your reply, i was wondering if i can flash using odin or i have to use twrp? zimages are convertible to tar files that odin can flash but the problem i am facing is odin mode showing unsupported dev type.
Click to expand...
Click to collapse
Yeah, you could make it in to .tar if you'd like but it needs to be in a boot.img form. The only way I know how to directly flash a zImage is with anykernel or a tool similar to that.
Kernel flash was success but phone is not stable now !
kevintm78 said:
Yeah, you could make it in to .tar if you'd like but it needs to be in a boot.img form. The only way I know how to directly flash a zImage is with anykernel or a tool similar to that.
Click to expand...
Click to collapse
Ok i was able to flash boot.img by converting into tar (having new zimage) , but system is rebooting again and again after sometime.
I was able to flash after making boot.img using AIK. Thanks for advice.

Is there any method to convert stock firmware to TWRP flashable zip?

Here is a long story. Please read carefully before reply.
I have SM-G955N which is for South Korea. Also I have latest stock firmware that can be flashed with Odin. It has AP, BL, CP, CSC. With this firmware, I can recover from almost every problems(including bootloop) because these files have everything that my S8+ should have, even PIT file.
As you know, modifying stock firmware is very dangerous and you don't know what would happen if you delete/modify certain file.
You might think 'Hmm... I think it is completely not related to system or samsung so maybe I can delete this' but you can get bootlooped. I even got bootlooped by only deleting DioDict which is just dictionary app!
I think It would be much easier to recover from bootloop when I have flashable ZIP file that is pure stock firmware.
Maybe you can say 'Just use TWRP backup feature!' but I can't trust TWRP backup feature now.
When I flashed stock firmware with Odin and right after(after solving KG State thing), flashed TWRP. Then I should have pure, clean stock firmware because I didn't touch anything about system except recovery(TWRP), right? I backupped whole system except Cache because It has 0 MB size.
After I got bootloop while modifying system, I restored that backup but still got bootlooped. That's why I can't use TWRP backup as fallback plan. I can't trust it 100%.
There are few 'Kitchen' scripts but I think they only handle AP files. When I tried to use SuperR's Kitchen Free, I used stock firmware file(tar.md5) and didn't do any modification. After I made flashable ZIP file with it and flashed it with TWRP, I've got bootlooped because It didn't have critical CSC files that system needed.
I think the Kitchen can't handle CSC well even though It is critical. 'Donate' would be last resort.
I've found batch script that convert S9 stock firmware to flashable ZIP (at GItHub, 'harise100/S9-Stock-ROM-TWRP') but I don't think It can cover S8+ files. In the scripts, it requires some files that S8+ firmware don't have. Maybe I should play with that script to fit with S8+ but It will take a lot of time which I don't have much.
Any good idea or information about converting stock firmware to flashable ZIP file?

Categories

Resources