Recover Android system with TWRP Recovery


Question


Note that I am running Mac OS X.







I tried installing an unofficial version of Cyanogenmod I found on XDA Developers that supports kltemini (SM-G800F). However, I messed up somewhere in the installation, and got a message on TWRP recovery saying:



Can't install this package on top of incompatible data. Please try another package or run a factory reset


And when I try pressing Reboot into System, I get:



No OS Installed! Are you sure you wish to reboot?


In the comments, @beeshyams said that I can install from a trusted source SamMobile, where I did get the SM-G800F Czech version, and downloaded it. However, the flashing fails with:



Error flashing zip /external_sd/Android_Stock.zip


Extracting it on a computer makes a .tar.md5 file, and extracting that gives me a bunch of .img files. I read that I should compress these, and flash, but the same error showed.



Another solution could be to download a custom ROM so I can actually boot into ANYTHING, but most ROMs don't support SM-G800F.



What I can also do is go to Download mode, and download stock recovery, so I can re-install the OS over OTA, however there is a risk that I will not be able to use Recovery anymore.



How can I solve this?






UPDATE:



Trying to flash stock recovery with heimdall prints:



ERROR: Failed to send data!
Releasing device interface...


I am on OS X and I am using the CLI Heimdall to flash






I also made a chatroom for active discussion here: http://chat.stackexchange.com/rooms/33331/discussion-on-question


Answer

Looking at the installation instructions of the ROM you flashed, I am guessing in the TWRP/ CWM options, under Advanced Wipe , one of the options " Wipe Dalvik Cache, Cache, System and Data " (likely data) was missed out leading to the current situation.



[[ Edit



Thanks to OP for confirming that wiping data was missed out by him while installing CM. A couple of other observations made by OP are listed. These are NOT normally observed behaviour of CWM but may be occurring due to incompatibilities of ROM being " unofficial"




  1. CM didn't start normally when data partition alone was backed up

  2. He had to resort to wiping data to get back to normal functioning. This is also mentioned in the installation instructions of the ROM




Flash CyanogenMod:....Note that the recovery might fail to restore the backup when you want to go back to the stock ROM (emphasis by ROM developer)




]]



That aside, as you brought out, there are two options



Option 1 Re-flash CM ROM and subsequently revert to stock if needed



Option 2 Attempt to flash stock directly



Option 1 would be preferred option since your unable to flash stock ROM and get an error message



Suggested steps for Option 1




  1. Boot to recovery mode of TWRP/CWM

  2. Wipe Dalvik Cache, Cache, and Data (inside Wipe -> Advanced Wipe for TWRP)

  3. Install CM ROM

  4. Install the GApps zip-package

  5. Test that ROM is correctly installed by testing minimum functionality of Google play store connecting, camera and call/ SMS working



Now,assuming it is successful,use the ROM for a couple of days before deciding if you want to continue with it or revert to stock



Reverting to Stock from CM 12




  1. Since you are using OS X and Debian, install Heimdall (am not conversant with it so will skip the details)

  2. Flash recovery. This guide seems to explain the process well but you can suggest a better alternative with your experience http://davideddu.org/blog/posts/how-to-flash-a-recovery-image-using-heimdall/







Additional Information that may come in handy for related issues and also to cover points raised in the comments section of question




Windows users:




  • Flashing Stock using Odin



Odin has different versions and some of the versions have options changed. Hence, the description in guides may differ with options available on the tool. This guide has a good pictorial description corresponding to newer version of Odin



http://androidmtk.com/flash-samsung-stock-rom-using-odin





Instructions for flashing stock ROM ate covered here How to convert .img to .tar to flash using Samsung odin tool?




Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes