Related
What Is ClockworkMod Recovery And How To Use It On Android [Tutorial]
ClockworkMod – also known as Clockwork and CWM – is a custom recovery for Android phones and tablets that allows you to perform several advanced recovery, restoration, installation and maintenance operations on your Android device that aren’t possible with the stock recovery. In what follows, we will cover all that this recovery is capable of doing, and how to do it. We do not discuss Touch recovery (and you shouldn’t use it on the ET4G) or Rogue recovery here. Those are different tuts…
All About Android Recovery
All Android devices ship with a recovery console that is basically a partition on the device’s internal memory and can be booted into. The stock recovery of almost all Android devices provides a few basic yet handy options that allow you to factory reset your device and also to recover its operating system using an official ROM in zip format, but that’s all you can do with it. That’s where a custom recovery comes handy.
A custom Android recovery basically replaces the stock recovery with one that lets you do all you can do with the stock recovery, plus a plethora of more options to give you a lot more control on your device. With a custom recovery, you can install official and unofficial ROMs as well as other updates including apps, themes, kernels etc. using zip files, wipe not just user data but pretty much every partition on your device, mount the storage card for USB mass storage access without leaving recovery, partition your SD card, wipe Dalvik cache and battery stats, fix permissions, perform, manage and restore backups and so on.
Introduction to ClockworkMod
ClockworkMod recovery is one of the most widely used custom Android recoveries that is available for most mainstream Android devices. It is the needed recovery for AOKP, AOSP, CM7 and 9. ClockworkMod recovery has been developed by Koushik Dutta (also known as Koush) – the same guy who brought us the Android ROM Manager.
Booting into ClockworkMod
On most Android devices including ones by Samsung, you can enter recovery by powering your device off and then powering it back on while keeping either the ‘Volume Down’ or the ‘Volume-Up’ button pressed, depending on the device (volume up for our phones). This will enter the bootloader from where you can select the ‘RECOVERY’ option by navigating to it with the Volume key and entering it with the ‘Power’ key.
On most Samsung devices specifically Samsung Galaxy S series devices, you must keep both the ‘Volume-Up’ and ‘Home’ keys pressed while powering on the device, to directly enter recovery.
Tour
1. reboot system now
This one is self-explanatory.
2. apply update from sdcard
This can be used for installation of any official or unofficial update, ROM, kernel, theme etc. that is in a zip format installable from recovery, as long as the file is named update.zip and it has been placed on the root of your SD card (i.e. not in any sub-folder). Selecting this option (and most of the options featured below) will bring up a rather annoying confirmation prompt but this has saved us on multiple occasions from a lot of trouble we would have been into due to accidental key presses. This is what we are talking about:
3. wipe data/factory reset
This option wipes all user data on the device as well as cache. Doing this will leave your phone in the state it was in when you bought it or when any custom ROM was first installed. It will also wipe any sd-ext partition that you might have setup (more on this later).
4. wipe cache partition
Wipes the cache partition of the device to clear all the data accumulated there over use. This is often used before installing a new ROM, app, kernel or any similar mod via recovery.
5. install zip from sdcard
This option brings up the following sub-menu:
1. apply /sdcard/update.zip
This one is essentially the same as the ‘apply update from sdcard’ option of the main menu.
2. choose zip from sdcard
Lets you install any zip file (with any name) from any location on your SD card. The file can be for a ROM, a kernel, an application, a theme or any mod as long as it is in recovery-flashable zip format. This is the most widely used option for installing a ROM that you have downloaded and copied to your SD card.
3. toggle signature verification
Turns the signature verification on and off. When signature verification is on, you will not be able to install any custom ROMs that haven’t been signed by the developers (most custom ROMs aren’t signed). Switching it off skips the signature verification check and proceeds with the installation.
4. toggle script asserts
Seldom-used option for a vast majority of users. It simply turns script asserts on or off. If you don’t know about these (we don’t), it’s best not to change this option.
5. +++++Go Back+++++
Takes you back to the main recovery menu, obviously!
6. backup and restore Undoubtedly one of the most important features provided by a custom recovery, the backup and restore feature – also known as Nandroid backup – allows you to take a snapshot of your phone’s entire internal memory including all partitions, and save it on the SD card.
1. Backup
Takes a Nandroid backup, as explained above.
2. Restore
Lets you restore a previously taken backup. Entering this option presents you with a list of existing backups from the SD card that you can choose from for restoration.
3. Advanced Restore
This option is similar to the Restore option but once a backup has been selected to be restored, this option allows you to choose what parts of it to restore. You can choose to restore the boot, system, data, cache and sd-ext partitions.
7. mounts and storage
Allows you to perform maintenance tasks on all the internal and external partitions of your android device
1. mount/unmount /system, /data, /cache, /sdcard or /sd-ext
These options let you toggle between mounting or unmounting these respective partitions. Most users don’t need to change these options.
2. format boot, system, data, cache, sdcard or sd-ext
These let you directly format any of these partitions. Take extreme care with this option as formatting any of these partitions will result in losing all data on them, especially the boot and system partitions. Formatting the system partition will remove your ROM and leave your phone without an operating system while wiping the boot partition may brick your phone unless you restore or flash another one before rebooting your device.
3. mount USB storage
Lets you enable USB mass storage mode for your SD card right from recovery so that you can connect it to your computer via USB and transfer any files to/from it without having to leave recovery.
8. advanced
This section contains a few options most users will not require, though these can come handy quite often, especially wiping Dalvik cache, which is required before most ROM installations.
1. Reboot Recovery
Lets you directly and very conveniently reboot from recovery right back into recovery. This is useful option for certain back-to-back installations that require the device to at least boot once between them.
2. Wipe Dalvik Cache
Allows you to wipe the cache for the Dalvik virtual machine (the custom-built Java virtual machine for Android).This is required before most ROM installations and at other occasions too, for fixing some problems.
3. Wipe Battery Stats
Wipes the saved battery usage statistics and effectively recalibrates the battery. Useful in various scenarios when Android isn’t showing correct battery levels.
4. Report Error
In case of errors, this feature can be used to save a log of recent ClockworkMod recovery operations on the SD card that you can later report from Android using ROM Manager.
5. Key Test
Lets you press any of the hardware keys to see if they are properly functioning, and to see their key codes.
6. Partition SD Card
This option gives you a no-frills way to partition your SD card properly for use with ROMs that support data2ext (a very handy hack for low internal memory devices that enables an /sd-ext partition on the SD card to be used as the internal user data storage i.e. as the /data partition). Once this option is selected, you will be given options to choose the sizes for the /sd-ext partition as well as an optional /swap partition on the SD card, and will then automatically format it for you, leaving the remaining space for normal SD card usage. This option will wipe all data from your SD card so use it with caution!
7. Fix Permissions
Fixes the file permissions for the internal memory partitions back to default. This is very useful as a fix for several errors and Force-Closes that start appearing after you or an application you installed and provided root access end up messing up the permissions of important files.
Using ClockworkMod for ROM, kernel, apps, theme or mod installation
While in the complete feature tour we have already shown you how to install a ROM, kernel, app, theme or any similar mod from a recovery-flashable zip file using the recovery options, those of you who jumped straight to this section expecting to get just this information quickly are at the right place!
This guide is primary focused on a full feature tour of ClockworkMod recovery but in our previously written guide on how to flash a ROM or app from a zip to an Android device file from recovery, we have already covered in detail how to use ClockworkMod for installing any ROM, kernel, app, theme or mod using a recovery-flashable zip file. While that guide is based on an older version of ClockworkMod recovery, everything in it still applies to the latest versions and should work flawlessly.
How To Install A ROM Or App From Zip File To Android Device From Recovery
Please note that the terms ‘installing’ and ‘flashing’ can be used interchangeably here and will mean the same thing.
Disclaimer: Although I have done my best to make the following procedure as safe as possible, you should still follow this guide at your own risk.
Rooting your device renders its warranty void.
ALWAYS take backups before rooting or flashing a custom ROM or app to your phone.
Flashing a defective ROM or app to your phone might brick it so choose the ROMs and software that you flash wisely and never install a ROM or application from an untrusted source.
AddictiveTips will not be liable if your device gets damaged or bricked during the process.
Official ROM updates from device manufacturers or carriers are released in conveniently packaged installation files that you can run on your computer while your Android device is connected to it, and they automatically take care of updating your phone’s system. Similarly, most applications are available directly in the Android Market for easy installation, or come packaged as convenient ‘.apk’ files that you can just run on your Android phone to install. The case is not the same with most custom ROMs and several custom applications, which come in .zip files rather than PC installers or .apk files.
The idea of installing a customized operating system to their smartphone can be quite intimidating for inexperienced users. Though once they get used to it, some of them end up trying out different ROMs for their devices several times a day. While I don’t exactly recommend that you flash every new ROM that is made available for your Android phone, we are here to help you get over the fear of flashing a ROM that enhances the capabilities of your device so that you can use it to its fullest potential.
Here is a quick look at what we will be covering in this guide. Feel free to skip to the real deal if you already meet the prerequisites.
• Before We Begin: Battery Check
• Before We Begin: Unlocking the Bootloader (Stock Android Devices Only)
• Before We Begin: Rooting
• Before We Proceed: Installing a Custom Recovery
• The Real Deal: Installing a Custom ROM to your Phone
• The Real Deal: Installing an App From a Zip File to your Phone
There are certain steps that you might not require, and we shall be mentioning them in each section.
Before We Begin: Battery Check
Before you proceed with any of the following steps, make sure your phone’s battery level is not too low. It is recommended to have it at 50% or more. Do NOT take this lightly. If your phone’s battery runs out while you are attempting to flash a custom ROM, there is a significant chance of your phone getting bricked and becoming unusable PERMANENTLY.
Before We Begin:Unlocking the Bootloader (Stock Android Devices Only)
Note: This step applies only to Android devices with stock version of Android installed. At the moment, Google Nexus One and Nexus S are the only two such devices available. You may skip this step if you are using any other Android device.
Users of stock Android devices such as the Google Nexus One or Nexus S also need to unlock its bootloader before they can proceed. Once you have done this, you may proceed to the next step.
Before We Begin: Rooting
Note: You may skip this step if your device is already rooted, or if you already know how to root it.
Before you can install a custom ROM to your device, your phone needs to be rooted. Rooting is basically administrator or root level access required to perform administrative tasks on your Android device. Once you are done with the rooting process, you may proceed to the next step.
Before We Proceed: Installing A Custom Recovery
Note: You may skip this step if you already have a custom recovery installed on your device.
Rooting grants you the necessary access level to execute administrative tasks on your Android device but it is the recovery that provides the tools necessary to actually perform those tasks. While every Android device ships with a recovery, the stock recovery is quite limited in what it lets you do, and you need a custom recovery image to perform advanced operations on your device. Once you have a custom recovery installed on your phone, you will be ready to proceed to the next step.
The Real Deal: Installing a Custom ROM to your Phone
Now that you have a custom recovery installed on your phone, you can perform all sorts of wonderful advanced operations on your device and this includes the ability to flash a ROM or application from a zip file. The procedure is pretty standard for most ROMs, though there are certain ROMs which require additional steps for their installation. Since those steps differ from ROM to ROM, pay attention to instructions and this includes only the standard instructions here.
• Manually
1. Download the ROM from the link given in the article featuring that ROM. It should be a zip file.
2. Connect your phone to your computer via USB and mount its storage card.
3. Copy the downloaded ROM to the root of the storage card.
4. Power your phone off and reboot it into recovery. This will involve using a combination of your device’s hardware keys. Once in recovery, you can navigate its menu using the volume up and volume down hardware keys or your phone’s trackball / optical track pad if it comes equipped with one.
5. Use the ‘backup and restore’ feature of recovery to backup your existing ROM installation, software and data. This step is known as performing a nandroid backup. ALWAYS perform a backup before flashing a custom ROM, UNLESS you can afford to lose everything that’s on your phone at the moment.
Note: ALWAYS choose to perform the following steps 6, 7 and 8 UNLESS the ROM you are attempting to flash is an updated version of the same ROM that you are currently using, and is compatible with the current installation’s data. It is usually mentioned with the update whether you can install it over a previous version without wiping its data or not.
6. Get back to the main recovery menu and use the option ‘wipe data/factory reset’. You will be prompted to confirm this action. Select “Yes – Delete all user data”.
7. From the main recovery menu, select ‘wipe cache partition’. You will be prompted to confirm this action. Select ‘Yes – Wipe Cache’.
8. From the main recovery menu, enter the ‘advanced’ menu. From this menu, select ‘Wipe Dalvik Cache’. You will be prompted to confirm this action. Select ‘Yes – Format/System’.
9. From the main recovery menu, enter the ‘Mounts and Storage’ menu. From this menu, select ‘Format/System’. You will be prompted to confirm this action. Select ‘Yes – Wipe Dalvik Cache’.
10. Go back to the main recovery menu by pressing the back button and select the ‘Install zip from SD card’ option.
11. Select ‘choose zip from sdcard’ to get a list of the files and folders on your SD card. Scroll to the ROM’s file that you copied there in step 3, and select it. You will be prompted to confirm this action. Select ‘Yes – Install file_name.zip’ where file_name.zip is the name of the zip file that you are trying to install.
12. Wait patiently while the ROM is flashed to your phone via recovery.
13. Once the installation is complete, head back to the main recovery menu if you aren’t there, and select ‘reboot system now’. Your phone will now boot into the newly installed ROM.
The Real Deal: Installing an App From a Zip File to your Phone
While most apps for Android devices are available at the app store for direct download and installation or as .apk files for direct installation, there are certain apps which are only available as zip files installable from recovery. Their installation procedure is the same as installing a custom ROM that we just featured above. However, there are a few minute differences.
• When installing an app from a zip file, you do NOT need to perform the ‘wipe data/factory reset’ or ‘wipe/system’ step so NEVER do that unless you know what you are doing, have a complete backup and want to start using your ROM as a fresh installation with the new app added.
• You might or might not need to wipe the cache and the dalvik cache for installing apps from zip file. This varies from app to app and the developers of such apps as well as many reviewers including us mention when featuring an app whether it requires a cache and dalvik cache wipe or not. However, it never hurts to wipe these caches anyway, and it does not effect the data on your device or its storage card.
There you go, this concludes the guide on how to flash a ROM or app from a zip file to your Android device using a custom recovery. To try out the skills that you just learned, search our site for custom ROMs for your phone and start flashing, always remembering to take backups first!
Edit- for Nandroid Backup Tut go HERE
By Haroon Q. Raja found (original link HERE), with additions and corrections by VeNuM
Very nice tutorial/guide!
EDIT : First!
Wow this will really help me when i decide to root
Sent from my SPH-D710 using Tapatalk
fghjfhjfghjfghjfgjh
10 char
Nice tutorial bro.
Great Guide!!! Wished we had this kind of guide on the fascinate when I started : )
Sent from my SPH-D710 using Tapatalk
jUgGsY said:
Very nice tutorial/guide!
EDIT : First!
Click to expand...
Click to collapse
Thank you
Me likes it, tank u berry mush
iSaint said:
Wow this will really help me when i decide to root
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
Thank You
iSaint said:
Wow this will really help me when i decide to root
Click to expand...
Click to collapse
LOL!
10char
iSaint said:
Wow this will really help me when i decide to root
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
Who are you rooting for?... Lol.
Thank you Venum for your time putting this together. Hopefully it will answer allot of questions before they are asked in dev thread. I'm sure it will be very helpful to allot of people.
Sent from my SPH-D710 using xda premium
blackcanopy said:
Who are you rooting for?... Lol.
Thank you Venum for your time putting this together. Hopefully it will answer allot of questions before they are asked in dev thread. I'm sure it will be very helpful to allot of people.
Sent from my SPH-D710 using xda premium
Click to expand...
Click to collapse
myself I'm to scared not very edumacated with all this phone stuff
Sent from my SPH-D710 using Tapatalk
iSaint said:
myself I'm to scared not very edumacated with all this phone stuff
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
This coming from someone with over 800 thanks. Lol
Thank you for this!
iSaint said:
Wow this will really help me when i decide to root
Sent from my SPH-D710 using Tapatalk
Click to expand...
Click to collapse
Hahahahhaha I was thinking something like that lol
First time user here I wanted to say thank you for this, I found it very easy to read and understand, perfect for helping get threw my first root, recovery, and rom
Could someone please direct me to the version of CWM that is safest for our phones?
Thanks
NM: read the thread again and found it.
Nice Guide.
thanks great guide on installing CWM! will come in handy not just for this device but others
Thanks
Thanks for guide. Defiantly the best CWM guide out there....
I am running twrp 2.5.0 and I want too know what twrp 2.6.0 has to offer in sorts of updates and if I'll need to update to 2.6 for new updates on cyanogenmod 10.1 (I run the official stable version)
What's new in 2.6.0.0:
Special Note: If you are running a custom theme, some of the changes in 2.6.0.0 will likely not be visible with your custom theme.
Can encrypt a backup to prevent theft of private data from your backup files
Updated graphics / icon courtesy of shift
Updated exFAT to latest commits
Fixed a problem with Samsung TouchWiz decryption
Update SuperSU binary
Fixed saving of backup partitions list
Fixed saving of last used zip install folder
Fixed backup of datadata on devices that use a separate partition for datadata
Fixed some issues with the advanced wipe list (android_secure, can now wipe internal storage on data/media deivces and wipe data on the advanced list no longer formats the entire data partition)
Fixed some problems with partitioning a SD card
Various other bug fixes and tweaks
Notes about encrypted backups:
Why encrypt your backups? -- Most people store their backups on the device. Any app that has permission to access storage could potentially read your backup files and try to harvest your data. Encrypted backups also provide an added layer of security if you move your backups to other storage devices or to the cloud. The encryption that we're using is probably not strong enough for enterprise level security, but should be strong enough to make it significantly difficult to get to your data.
Encryption is using OpenAES which uses AES 128-bit cbc encryption. If you happen to use a longer password (over 16 characters) then the encryption strength improves to 192 or 256 bits. Do not forget your password. If you forget your password you will be unable to restore your backup. We don't encrypt the entire backup. Encryption is very CPU intensive and can be fairly slow even when we spread the workload over multiple cores even on the latest high-end devices. To ensure that encrypted backups don't take forever, we don't encrypt any other partitions besides /data and in /data we don't encrypt /data/app (or other app related directories where apks are stored) and we don't encrypt dalvik cache.
Get it here TWRP 2.6
BrooklynNY said:
What's new in 2.6.0.0:
Special Note: If you are running a custom theme, some of the changes in 2.6.0.0 will likely not be visible with your custom theme.
Can encrypt a backup to prevent theft of private data from your backup files
Updated graphics / icon courtesy of shift
Updated exFAT to latest commits
Fixed a problem with Samsung TouchWiz decryption
Update SuperSU binary
Fixed saving of backup partitions list
Fixed saving of last used zip install folder
Fixed backup of datadata on devices that use a separate partition for datadata
Fixed some issues with the advanced wipe list (android_secure, can now wipe internal storage on data/media deivces and wipe data on the advanced list no longer formats the entire data partition)
Fixed some problems with partitioning a SD card
Various other bug fixes and tweaks
Notes about encrypted backups:
Why encrypt your backups? -- Most people store their backups on the device. Any app that has permission to access storage could potentially read your backup files and try to harvest your data. Encrypted backups also provide an added layer of security if you move your backups to other storage devices or to the cloud. The encryption that we're using is probably not strong enough for enterprise level security, but should be strong enough to make it significantly difficult to get to your data.
Encryption is using OpenAES which uses AES 128-bit cbc encryption. If you happen to use a longer password (over 16 characters) then the encryption strength improves to 192 or 256 bits. Do not forget your password. If you forget your password you will be unable to restore your backup. We don't encrypt the entire backup. Encryption is very CPU intensive and can be fairly slow even when we spread the workload over multiple cores even on the latest high-end devices. To ensure that encrypted backups don't take forever, we don't encrypt any other partitions besides /data and in /data we don't encrypt /data/app (or other app related directories where apks are stored) and we don't encrypt dalvik cache.
Get it here TWRP 2.6
Click to expand...
Click to collapse
Is there another way to flash it via zip or a program of some sort or just an img
Sent from my Amazon Kindle Fire using xda app-developers app
You can update it with KF tool 0.99
You can update it with Kindle Fire Utility 0.99 version. Run the KF utility first and select install TWRP. it will download 2.6 version to PC and update it for you when boot the KF
lifegap said:
You can update it with Kindle Fire Utility 0.99 version. Run the KF utility first and select install TWRP. it will download 2.6 version to PC and update it for you when boot the KF
Click to expand...
Click to collapse
First of all here's a flashable zip file. TWRP 2.6 ZIP
Second, you can do this:
Assuming you have the recovery image renamed to "recovery.img" and placed it at the root of the /sdcard partition....
Go to terminal and put in:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p5
Now reboob! Enjoy! -- Sent from my Amazon Kindle Fire using xda premium
BrooklynNY said:
First of all here's a flashable zip file. TWRP 2.6 ZIP
Second, you can do this:
Assuming you have the recovery image renamed to "recovery.img" and placed it at the root of the /sdcard partition....
Go to terminal and put in:
su
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p5
Now reboob! Enjoy! -- Sent from my Amazon Kindle Fire using xda premium
Click to expand...
Click to collapse
Makes sense, I'll flash it later. Thanks for sharing! +1
gapps-slim1.6_CM11_kk4.4.4.zip (your link to simplicity) change-log coming to post #7.
Recent changes:
Google Play 5.0.31
Google Play services 6.1.74
new Link2SD script added to avoid remounting script and reboot after gapps flash; thanks to Fiouz @ XDA for original script
edited 70-gapps.sh to set default media tones; no guarantees, seemed to work the one-time I tried it. Test it; adjust to preference.
Removed Google Calendar and corrected script to allow CM Calendar to update with nightlies, when applicable.
more script changes to hopefully make the important steps 2-4 below less important (let me know)
more suggestions at post 6
Important! (prior to flash):
1) BACKUP; if you want to skip steps 2-4 or if your encounter problems, goto recovery and wipe data, manually format system, flash CM ROM, flash gapps, restore user apps only (not any Google Apps unless they are missing; ie, Google Search. Missing apps found in Google Play store)
2) goto Manage apps/Downloaded and uninstall updates to Google Play and Google Play Services (this update places Google Play 4.9.13 and Google Play Services 6.1.09 in /system
3) launch a root browser and goto /system/addon.d and delete 70-gapps.sh and 91-cm.sh
4) it's helpful to uninstall keyboards other than the Google L development keyboard used in this gapps (use Titanium Backup or Link2SD to uninstall it); the integrated scripts will remove CM-AOSP KB (Have a preference for a different keyboard? -see post 5)
Note: Your CM Nightly updates can be downloaded and installed by the integrated CMUpdater without overfilling system. Also, gapps will be restored as flashed until 70-gapps.sh is removed or the system is manually formatted prior to ROM flash. Relax; it's auto-magically done without returning to recovery each update. More bloat is being removed -see change-log post 5
Suggested use: Flash prior to next CM11 nightly update to:
1) automatically remove CM wallpapers and AOSP keyboard with each CM11 update. Still supported but epicmtd is now a mini ROM build
2) automatically backup and restore /system gapps with each CM11 update (includes: Google Play version 5.0.31, Google Play Services 6.1.11 and Google L developer edition keyboard (with three themes in advanced settings).
(suggestions and disclaimers)
*Recommend flashing initially as clean install; scripts have been modified to flash prior to nightly but dirty flash at own risk. Subsequent updates of CM 11 nightlies can be done retaining userdata, if preferred, but do so at own risk.
**If not using with clean install on initial flash, may require manual removing of original keyboard in /data partition.
***A recommended trial of these gapps could be done prior to flashing another CM nightly. Backup first. If flashing this shows problems, the userdata may need wiping or manual cleaning prior to flashing nightly and gapps. Once in place and functioning, the /system/addons.d scripts will restore minimal gapps and Google L keyboard as well as remove the bloat each update. Therefore, you can simply use the integrated CM Updater in System settings/About phone/CyanogenMod updates to download and update without manually flashing in recovery.
****Any missing Google apps should be available in Google Play.
FYI: deleting the /system/addon.d scripts manually or manually formatting system partition will defeat the auto backup and restore of this custom gapps with bloat melt.
Advantage? Free up available system and data space occupied by infrequently used gapps or outdated ones. No manual bloat melt or modifying ro partitions required. Automatically repeats manual steps... advanced users can modify to automate most manual steps repeated in CM nightly updates. (One step I still repeat manually after each boot is to cycle location toggle.)
(hints and suggestions for advanced users)
You can add your own preferred user apps at /data/app location of .zip archive using your computer but only recommend that for clean installs. If so, use this once for dirty flashing over existing userdata, your updated custom version once for each clean install. (more after disclaimer)
*disclaimer: nightlies sometimes require clean installs due to changes; dirty flash and customize this at own risk. Always backup prior to flash in case of problems.
Within reason, I can attempt to help with in-demand changes to this. To edit for more /system app removal, look into META-INF\com\google\android\updater-script and follow the method in original to make changes take each gapps flash for clean install. You'll also need to edit /system/addon.d/91-cm.sh following that method to make same changes permanent. To add user apps for clean installs, simply download to computer, open the archive and copy your preferred user apps to /data/app folder (updater-script is already modified for permissions).
Note: for those of you that like to manually format /system prior to flashing nightlies, I've looked at the CM11 updater-script and normal format does indeed take place after backing up per addon.d scipts. For example, the CM50 script actually backs up your /system/etc/hosts and rewrites to same location after its normal system partition format. This is useful for those that use apps that modify hosts to block ads. But, formatting prior to flashing could be useful if you happen to suspect a /system/addon.d backed up script was causing you problems.
Note2: I had given up on using addon.d scripts to restore scripts like Link2SD or Xposed framework but now seem to have some scripts that work for CM Updater updates over userdata; they simply eliminate a couple of manual steps within the applications and the reboot that would follow those steps. This is a safer mod, minimizing risks using the existing user scripts rather than flashing an individual's personal script. Post 3 may contain a future update for advanced users with additional scripts for backing up and restoring Link2SD sdext2 partition remount script backup and restore during CM update as well as Xposed framework /system/bin/app_process and app_process.orig backup and restore as needed. WIP; update coming soon.
Note3:There is potential to gain more system partition space available but preferences vary. Keep in mind that scripts will only impact /system partition. A customized version would be required if advanced users wish to add user apps to /data/app like user tools and apps that load quicker in a flash rather than download or side-load apps.
Note4: I've read other CM forums and latest gapps are recommended. Looking through the changes, I agree. I will try to keep this updated, if needed.
added CM Updater support!
Thanks to CMNein and blowtorch in this thread:
[Tutorial] CM9/CM10/CM10.1 back up script along with one other source that I lost in tapatalk, got this CM Updater support working for CM11 Nightlies for both backup and restore gapps as well as melting the bloat. If anyone knows the other source, please let me know so I can thank and give credit but the script is almost identical to the one linked.
Same apps; different scripts. Flash this one to make the backup and restore proper and continual (follow the asterisk comments for conditions)
change log:
1) added appropriate support to 70-gapps.sh to backup the right gapps and keyboard when flashing new nightly without requiring flash of gapps each time(*)
2) added new 91-cm.sh script to melt the bloat each time OTA CM Nightly is flashed.
3) consequently, changes 1 & 2 now make it possible to update CM Nightlies without having to flash gapps each time(**). I came to this realization a bit late
(*)provided that system is not manually formatted (Allow the CM scripts to backup, format system and restore gapps.)
Note: to use different gapps, format system manually or delete /system/addon.d/70-gapps.sh prior to flashing new gapps)
(**)System settings/About phone/CyanogenMod updates/update types: All versions (press the nightly version for changelog; icon gives option to download, install or indicates current version installed) Limit visits to recovery:good:
In summary: you can flash this once and forget about flashing gapps again on nightlies. Works with the integrated CM Updater also (manually formatting system or deleting /system/addon.d/70-gapps.sh and 91-cm.sh will keep these changes from automatically restoring. Editing those scripts can save you time and pose less risk editing ro partition prior to boot.)
version 1.1
advanced user scripts for Link2SD and Xposed framework
gapps-SlimAdv1.2_kk-20140606-signed.zip
(Outdated; merged scripts into one release. See post #4)
refer to edited OP for advanced user discussion (spoiler or hidden text)
same gapps but added a couple of new scripts to support backup and restore of Link2SD and Xposed framework when updating CM with integrated updater while retaining userdata
changelog:
1) added 89link2sd.sh script to backup and restore user's mount script at /system/etc/init.d when updating CM
2) added 90-exposed.sh script to backup and restore /system/bin/app_process if using Xposed framework. Thanks to rovo89; script pulled from link in his OP
Note: if not using either of the above applications, just use version 1.1 referenced in previous posts.
Note2: if one of these scripts do not apply, you can open archive of zip and delete the script not needed without breaking the zip for flashing.
Disclaimer: Use at own risk; currently testing on CM Nightly 20140809.
If you've encountered CM theme or theme update install errors with Google Play since the 4.9.13 update, this gapps update may help; install and use the workaround below the changelog... if not having issues, stay with what works until a CM 4.4.4 Gapps is released.
changelog:
1) updated Google Play to 4.9.13; installs to system partition
2) removed backup/restore of /system/priv-app/GmsCore.apk in /system/addon.d/70-gapps.sh (no longer needed for CM updates)
(after next CM update, you should see a little more system partition available space)
Note: this update includes the advanced scripts 90-xposed.sh and 89link2sd.sh; open zip archive and delete from /system/addon.d if not needed (optional but not necessary; the scripts are there if ever needed for Link2SD or Xposed framework mods).
Note2: this update is only intended for those encountering update or install error in the new Google Play version 4.9.13 (don't update if not having issues; follow the workaround, if needed).
Install instructions:
If you have Google Play version 4.9.13, it's most likely on the data partition. Wipe its data in System settings/apps/Downloaded/Google Play Store and Uninstall the update.
Flash the updated Gapps. If having problems, go to System settings/apps/All and clear data to Google Play services, Google Play Store and Google Services Framework and reboot.
Workaround:
for Google Play Store install errors -24, -110: go to System settings/apps/All and clear data to Google Play services, Google Play Store and Google Services Framework and reboot.
If you encounter Google Play install install error -401 or -400, consider your CM theme may be causing this and revert back to original CM holo (Default) theme in System settings/Themes, freeze Link2SD and Link2SD Plus, go to System settings/apps/All and clear data to Google Play services, Google Play Store and Google Services Framework and reboot. After successfully installing or updating the problematic application, select desired CM theme and unfreeze Link2SD. The 400 hundred series install errors may be rare but I've notified the application developers of the issue.
Notes for Link2SD users:
1) after a CM update, launch the Link2SD application, wait for it to load and "clean up the 2nd partition" in the "more"/left tab slide-out. Don't click OK but read the details and note that you most likely need to "Link dalvik-cache" files in the "more"/left tab slide-out after each update. I've found it's important to wait until the application fully loads to check; otherwise, you may be causing more steps to get your linked files restored and keep the redundant files out of the internal memory.
2) if you have Google Play services update 5.0.89 in Downloaded tab of System settings/Apps, you no longer need the dalvik-cache file [email protected]@[email protected] (you can safely delete it when running the "clean up the 2nd partition" in the "more"/left tab slide-out (if deleting, reboot once more) . You should not see it again after updating CM with the CM updater.
gapps-Slimv1.3-_kk-20140606-updated.zip
change-log for gapps-slim1.4_CM11_kk4.4.4.zip update
Still don't see an official CM gapps for Android 4.4.4; this is an OTA update pulled from apk's pushed to my phone by Google
gapps-slim1.4_CM11_kk4.4.4.zip
Important: see OP (post 1) for update instructions; the old scripts need to be flushed and replaced. The gapps flash/updater-script should take care of that but to be sure, follow the manual steps.
Themes: some themes or theme updates pulled from Google Play WILL (if you have Link2SD installed and sdext2 partition is visible) give you an update error -401 If this happens to you, the workaround in post # 4 above still applies.
change-log:
removed cm-91.sh bloat remover script and integrated into a new 70-gapps.sh
removed more bloat; necessary for larger Google Play and Google Play Services moving to /system
want custom ring tones? look into /system/addon.d/70-gapps.sh for ideas (for those that can edit scripts)
Warning: many media tones were removed as bloat. Check your tones for correctness; if needed, I can add these back in.
Note:
there is a limited space left in system if you choose to risk adding some back in. During testing, the old method was actually maximizing system capacity before the bloat was removed. Therefore, a change to delete the bloat prior to writing/restoring the larger apps from gapps was necessary. If you've ever experienced lag after installing or restoring gapps during CM updates, these scripts are necessary to avoid that mishap. The scripts and updates also keep the updates from landing in /data partition, using more of your internal storage space while the system space is not utilized to its fullest capacity (until next Google update pushed OTA). If you've tried this update before, please try it again and make sure no redundant updates are in /data partition.
Tones retained:
ringtones: Orion, Themos, Kuma
alarms: Argon
notifications: Argon, Altair, Proxima
Extra bloat removed:
Apollo.apk
Galaxy4.apk
NoiseField.apk
HoloSpiralWallpaper.apk
LiveWallpapers.apk
LiveWallpaperspicker.apk
MagicSmokeWallpapers.apk
VideoEditor.apk
VisualizationWallpapers.apk
PhaseBeam.apk
PhotoTable.apk
PhotoPhase.apk
MediaUploader.apk
New Google Play, Services and more scripts
gapps-slim1.5_CM11_kk4.4.4.zip
What's new:
Google Play 5.0.31
Google Play services 6.1.11
new 88-link2sd.sh script added to avoid remounting script and reboot after gapps flash; thanks to Fiouz @ XDA for original script
more script changes to hopefully make the important steps 2-4 from OP less important (let me know)
What's important?
see OP, post 1. You can try the easy way of flashing prior to next nightly or unofficial nightly; the scripts should restore gapps and keep the ROM build "mini"
Check your tones; pull from another nightly ROM or customize as this is done in /system/addon.d/70-gapps.sh script
Xposed framework support was removed; if you need the script, pull from an older gapps version or from here; the bottom script. Hit the thanks button while you're there (the script inspired the latest 88-link2SD.sh used in this gapps release)
gapps-slim1.6_CM11_kk4.4.4.zip (Update)
gapps-slim1.6_CM11_kk4.4.4.zip
Changes:
Removed Google Calendar and corrected script to allow CM Calendar to actually update, when CM applies applicable update
updated Google Play Services to 6.1.74
attempted to set default media tones within the 70-gapps.sh; no guarantees. Thought it worked the one time I tried it but without data wipe so IDK.
FYI: can't test the flashes against the Epic any longer; mine got traded-in for the Note 4 ($200 BB gift card), Friday Oct. 17, 2014. Retired. Farewell Epic forum. Peace.
This is currently how i keep my Galaxy Active 2 working - connected and Samsung Pay working - across ROM flashes without having to reset it every time, because resetting sucks
Please note: At time of writing theres no known way to keep BP Monitor calibration data (ive tried backing up and restoring the relevant database), so you will lose that
Prerequisites:
Apps:
Android ID Changer: I use this (Free) https://play.google.com/store/apps/details?id=com.silverlab.app.deviceidchanger.free
Migrate (Free Backup App) -
Main app: https://play.google.com/store/apps/details?id=balti.migrate
Flasher Module: https://play.google.com/store/apps/details?id=balti.migrate.flasher
Helper Module: https://play.google.com/store/apps/details?id=balti.migrate.helper
MyAPK: https://play.google.com/store/apps/details?id=com.andatsoft.myapk.fwa
Steps:
Install all the above on the ROM you're currently on
Use MyAPK (set MyAPK to save somewhere easily navigable) to make a backup of the following apks:
Android ID Changer
Migrate Flasher Module
Migrate Helper Module
Store them safely (i always use PC, as well as sdcard) as you'll want to use these before restoring your apps, and later to restore your apps
Important: Open Magisk Manager and set MagiskHide for all Samsung Wearables packages (Gear/Samsung/Watch/Watch Plugins), you do not have to select all sub-items under the main packages, just select the main packages
To prepare for a new ROM:
This largely only has to be done once....and then reused on subsequent new ROM flashes. I do things to make life easier for myself as in a bad week i can be testing 3 ROMS...
Note: The only steps you might want to do again are make a new Migrate backup (for new apps), and backup /data/adb, if you MagiskHide further apps in future
Steps:
Run Android ID Changer, copy Android ID to a text file or email (i store mine in both)
With a root capable file manager, or in custom recovery, backup /data/adb/magisk.db to a safe place (i always use PC, as well as sdcard))
Important Note: This assumes as mentioned above you have already used Magisk Manager to MagiskHide all Samsung Wearables packages (Gear/Samsung/Watch/Watch Plugins)
Backup your apps and data with Migrate
Note: for most apps you want to tick all 3 boxes per app, but DO NOTbackup up App Data (middle column for both) of:
Samsung Health
Samsung Health Monitor
As we would have to wipe this anyway after ROM flash to get them working. Save yourself the drama and untick them in Migrate. Migrate is smart enough that it stores your selections between backups, so if you make a next Migrate backup it will automatically leave these de-selected in future backups.
Your Migrate backup will be in /sdcard/Migrate, i recommend backing this up to PC as well
On the New ROM:
After a new ROM and Magisk flash:
Setup ROM
Copy Android ID changer from wherever you backed it up, install and open it, copy and paste your original Android ID into the middle (Edit) field, then click Apply
Reboot the device
Enable MagiskHide (Don't hide Magisk Manager yet)
Test for SafetyNet, and if need be use whatever method is preferred for your ROM to achieve SafetyNet
Copy magisk.db from wherever you backed it up back to device
With a root enabled file manager (or from custom recovery), copy magisk.db to /data/adb
Reboot device (Do not skip this trying to be clever)
Open Magisk Manager, it should hopefully not complain that you've just dumped magisk.db back (Note: you will not see the list of MagiskHidden apps, as they are of course not installed yet, but MagiskHide now already knows to block root detection to them when you do install them - if Samsung Pay even gets a whiff of root, it wont work and you will have to reset some, if not all Gear/Watch Plugins, and reset your watch and start from scratch)
Hide Magisk App via Magisk Manager > Settings > Hide The Magisk App, name it anything but Magisk Manager, i call mine App
Copy the following apps from wherever you backed them up to device, and install them:
Migrate Flasher Module
Migrate Helper Module
Run Migrate Flasher
Descend into the backup folder (listed by date & time), and select all the zips inside it, and flash them (Of course if you moved Migrate folder off the device, restore it to /sdcard first)
At the end open Migrate Helper (which is already installed) and restore all the apps you wish - of course for our purposes, we want all the Samsung ones.... Note: Migrate will automatically select all backed up apps and data
At the finish of Migrate restore, leave the default options selected, which will remove the Migrate Helper, and reboot
On phone, open Gear App and press Connect
On watch, you may need to toggle BlueTooth off, and back on
You may need scan a few times and perhaps toggle bluetooth off and on, but it will give you the usual pairing prompt, both on the phone, and the watch, pair, and shortly you will have the watch reconnected, and Samsung Pay intactNext steps:
Open Samsung Health and sign in and restore
Open Samsung Health Monitor, and sign in
Set up ECG as normal
Re-Calibrate the Blood pressure monitor as normal
On any new ROM from now on, you can:
Make a new Migrate Backup, to include any new apps
Make a backup of /data/adb/magisk.db if you MagiskHide any new apps
Then refer to the On The New ROM steps above....
Please let me know if you find an error or issue folks
73sydney said:
This is currently how i keep my Galaxy Active 2 working - connected and Samsung Pay working - across ROM flashes without having to reset it every time, because resetting sucks
Please note: At time of writing theres no known way to keep BP Monitor calibration data (ive tried backing up and restoring the relevant database), so you will lose that
Prerequisites:
Apps:
Android ID Changer: I use this (Free) https://play.google.com/store/apps/details?id=com.silverlab.app.deviceidchanger.free
Migrate (Free Backup App) -
Main app: https://play.google.com/store/apps/details?id=balti.migrate
Flasher Module: https://play.google.com/store/apps/details?id=balti.migrate.flasher
Helper Module: https://play.google.com/store/apps/details?id=balti.migrate.helper
MyAPK: https://play.google.com/store/apps/details?id=com.andatsoft.myapk.fwa
Steps:
Install all the above on the ROM you're currently on
Use MyAPK (set MyAPK to save somewhere easily navigable) to make a backup of the following apks:
Android ID Changer
Migrate Flasher Module
Migrate Helper Module
Store them safely (i always use PC, as well as sdcard) as you'll want to use these before restoring your apps, and later to restore your apps
Important: Open Magisk Manager and set MagiskHide for all Samsung Wearables packages (Gear/Samsung/Watch/Watch Plugins), you do not have to select all sub-items under the main packages, just select the main packages
To prepare for a new ROM:
This largely only has to be done once....and then reused on subsequent new ROM flashes. I do things to make life easier for myself as in a bad week i can be testing 3 ROMS...
Note: The only steps you might want to do again are make a new Migrate backup (for new apps), and backup /data/adb, if you MagiskHide further apps in future
Steps:
Run Android ID Changer, copy Android ID to a text file or email (i store mine in both)
With a root capable file manager, or in custom recovery, backup /data/adb/magisk.db to a safe place (i always use PC, as well as sdcard))
Important Note: This assumes as mentioned above you have already used Magisk Manager to MagiskHide all Samsung Wearables packages (Gear/Samsung/Watch/Watch Plugins)
Backup your apps and data with Migrate
Note: for most apps you want to tick all 3 boxes per app, but DO NOTbackup up App Data (middle column for both) of:
Samsung Health
Samsung Health Monitor
As we would have to wipe this anyway after ROM flash to get them working. Save yourself the drama and untick them in Migrate. Migrate is smart enough that it stores your selections between backups, so if you make a next Migrate backup it will automatically leave these de-selected in future backups.
Your Migrate backup will be in /sdcard/Migrate, i recommend backing this up to PC as well
On the New ROM:
After a new ROM and Magisk flash:
Setup ROM
Copy Android ID changer from wherever you backed it up, install and open it, copy and paste your original Android ID into the middle (Edit) field, then click Apply
Reboot the device
Enable MagiskHide (Don't hide Magisk Manager yet)
Test for SafetyNet, and if need be use whatever method is preferred for your ROM to achieve SafetyNet
Copy magisk.db from wherever you backed it up back to device
With a root enabled file manager (or from custom recovery), copy magisk.db to /data/adb
Reboot device (Do not skip this trying to be clever)
Open Magisk Manager, it should hopefully not complain that you've just dumped magisk.db back (Note: you will not see the list of MagiskHidden apps, as they are of course not installed yet, but MagiskHide now already knows to block root detection to them when you do install them - if Samsung Pay even gets a whiff of root, it wont work and you will have to reset some, if not all Gear/Watch Plugins, and reset your watch and start from scratch)
Hide Magisk App via Magisk Manager > Settings > Hide The Magisk App, name it anything but Magisk Manager, i call mine App
Copy the following apps from wherever you backed them up to device, and install them:
Migrate Flasher Module
Migrate Helper Module
Run Migrate Flasher
Descend into the backup folder (listed by date & time), and select all the zips inside it, and flash them (Of course if you moved Migrate folder off the device, restore it to /sdcard first)
At the end open Migrate Helper (which is already installed) and restore all the apps you wish - of course for our purposes, we want all the Samsung ones.... Note: Migrate will automatically select all backed up apps and data
At the finish of Migrate restore, leave the default options selected, which will remove the Migrate Helper, and reboot
On phone, open Gear App and press Connect
On watch, you may need to toggle BlueTooth off, and back on
You may need scan a few times and perhaps toggle bluetooth off and on, but it will give you the usual pairing prompt, both on the phone, and the watch, pair, and shortly you will have the watch reconnected, and Samsung Pay intactNext steps:
Open Samsung Health and sign in and restore
Open Samsung Health Monitor, and sign in
Set up ECG as normal
Re-Calibrate the Blood pressure monitor as normal
On any new ROM from now on, you can:
Make a new Migrate Backup, to include any new apps
Make a backup of /data/adb/magisk.db if you MagiskHide any new apps
Then refer to the On The New ROM steps above....
Please let me know if you find an error or issue folks
Click to expand...
Click to collapse
My God! That's a lot of steps.
But you've written them down quite clearly.
This will certainly be helpful for those that like to flash ROMs frequently but don't want the hassle of setting up the watch again everytime you flash a new ROM on the phone. And of course, keeping Samsung Pay working successfully with root, while jumping across ROMs is quite impressive.
enigmaamit said:
My God! That's a lot of steps.
But you've written them down quite clearly.
This will certainly be helpful for those that like to flash ROMs frequently but don't want the hassle of setting up the watch again everytime you flash a new ROM on the phone. And of course, keeping Samsung Pay working successfully with root, while jumping across ROMs is quite impressive.
Click to expand...
Click to collapse
Once you have it set up the process is rather simple and i did have some help with the suggestion it might be tied to the Android ID....so i have to give @Dante63 some credit here (https://forum.xda-developers.com/t/galaxy-watch-features-ecg-bp.4051141/post-84652975)
Hehe If you want to see steps, and lots of words, visit the "My Magisk method for Google Pay SQLite Fix (Tested On P/Q/R)" link in my signature
Luckily at the moment that module isnt needed, but it had its fair share of downloads (23,000+) until recently when Google changed something on the backend again, and you can use Google Pay without it on a rooted device
Honest question: is SHealth so retarded that it doesn't save any backup in cloud, so that it could be restored afterwards?
w41ru5 said:
Honest question: is SHealth so retarded that it doesn't save any backup in cloud, so that it could be restored afterwards?
Click to expand...
Click to collapse
Samsung Health Does - All your steps etc are safe and can be restored after signing back in
Samsung Health Monitor (which calibrates and tests ECG/BP) does not.....
Note - I am not responsible for bricked devices
About TeamWin Recovery Project
TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our Zulip channel or on forums like xda-developers.
Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.
A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM
You can find the source code for TWRP at github.com/teamwin/android_bootable_recovery/
Installation procedure
1 . Download the latest TWRP img file from the downloads page
2. Boot to fastboot, and use a PC to boot into TWRP using the command: fastboot boot (TWRP filename).img
3. Head to TWRP's advanced section
4. Press "Flash Current TWRP"
Note: the installed TWRP will be lost if you flash another ROM or update your ROM, and the process has to be repeated then.
Find the Nokia 6.1 Plus (OPEN SOURCE!) Community here
XDA DevDB Information
TWRP for the Nokia 6.1 Plus / X6
Device Tree
Version Information
Status: Stable
Current Stable Version: 3.6.0
Like my work? Consider donating!
https://ko-fi.com/Sid127
UPI users - [email protected]
Great job !
Official builds are now up for download, please refrain from downloading any version other than v3.6.0
Will it work for Android 12? Thanks for the good work...
goodlife1870 said:
Will it work for Android 12? Thanks for the good work...
Click to expand...
Click to collapse
yessir, you can flash any ROM that our device supports with this TWRP
Sid127 said:
yessir, you can flash any ROM that our device supports with this TWRP
Click to expand...
Click to collapse
Thanks so much Sir Sid127... I appreciate...
How awesome is that - thank you for your hard work, @Sid127.
TWRP's new Advanced -> "Flash Current TWRP" feature has the same effect as its predecessor "Install Recovery Ramdisk", with the advantage of not having to manually select the twrp.img file and then flash it - very convenient! So more appropriately it should be labeled "Flash (or Install) Current TWRP as Recovery Ramdisk". Both features enable booting into TWRP rather than the ROM's built-in recovery when choosing to boot into Recovery.
So here's my report:
(Almost) all ¹ is working mighty fine on my new Nokia 6.1 with the official LineageOS 18.1 (Android 11) ROM, except three things (+ one feature missing):
1) After (while booted into LOS) formatting my SD card as internal and having LOS move all data from phone internal to SD, making the SD card the only/ exclusive Internal, TWRP does't or can't access the SD card anymore.
As supposed, I have a PIN set in LOS. Once TWRP has booted, I enter the PIN as requested by TWRP, but after doing so, only see (as before with the SD as mobile storage) that DATA gets decrypted successfully, but no mention of or even an attempt to also decrypt the content of the SD card.
In TWRP storage picker, I do see my SD card with full size (appr. 128 GB), + Internal Storage (19 of the nominal 32GB). But regardless if I choose Internal Storage or MicroSD, TWRP does not see my previous backups (which are now on the encrypted "internal" SD).
Same in TWRP File Manager: the content of the SD formatted as and then dedicated as sole internal and thus encrypted by LOS does not show up anywhere (SDCARD/ SDCARD1/ Storage/ mnt etc.).
Still, after choosing "Internal Storage" as backup location, TWRP does backup. Afterwards I can choose that backup via "Restore", and also see it in File Manager in /sdcard/TWRP. But when I boot LOS, I do not see the new backup in /sdcard/TWRP, only the older ones. The new backup is nowhere to be found, not even via FX File Manger with root privs, querying the entire file System. Obviously TWRP created the backup into the phone's real internal, but LOS has blinded that out after migrating Internal -> SD, most likely by means of a virtual symlink internal /sdcard -> external /sdcard1, and TWRP does not honor that.
Therefore backup options right now are:
- backup to USB via OTG (only partially working, see 3) below)
- backup to internal phone storage, then (while still in TWRP) move (copy then delete) the backup via MTP from internal to a storage on one's computer
All that said, the following (non-exclusionary) questions arise:
1. Are you aware of that?
2. Can you or somebody else reproduce this?
3. Is this fixable somehow, either in TWRP or in LOS?
4. Is this a shortcoming of TWRP in general, failing to also decrypt an SD card if a) it's formatted as internal and b) serves as the phones *only* internal?
5. Or is that an issue that only arises with LOS (18.1) but not with other Android 11 ROMs?
I hope some insights on this issue can be shared and gathered, or even better a fix
2) fastboot reboot recovery doesn't work for me; instead my ROM boots.
Nokia connected to my Mac via USB cable and booted into bootloader. Active slot is the correct one with TWRP and my ROM (LineageOS 18.1, Android 11).
I can however boot TWRP just fine via key combo (Volume Up + Power), and also via Magisk in LineageOS, so it's installed correctly.
3) USB OTG is only working with limitations:
works if TWRP was flashed/ installed as per instructions above, then (with the device powered off and (via USB cable) either connected to your computer or plugged into your charger) boot TWRP via the Power/ Volume Up key combo. (This also works in native install - not recommended because then standard boot will boot into TWRP as default rather than into your ROM)
- NOT working if booted live!
on your connected USB drive, TWRP only sees the 1st partition with a compatible file system (FATxy, ExFAT, ExtFS) incl. the EFI partition! Therefore make sure a) your USB drive does not have an EFI partition as 1st partition; b) the partition you want to backup to is the 1st with one of the compatible file systems!
4) The "Fix Recovery Bootloop" feature option in the "Advanced" section is missing. I was experiencing a boot loop and had to live-boot another TWRP to execute that feaure, which did fix the issue as expected. @Sid127 it would be great if you could re-add that feature.
________________________________________
¹ run live via fastboot w/o flash, flash then boot, decrypt, backup, restore, USB OTG partially
@BladeRunnerA2C @goodlife1870
has any of you inserted an SD card, and if so, have you formatted it as Internal in Android, and then confirmed when Android asked to move all data from Internal Storage to now "internal" SD, making the SD the only internal?
And if so, can TWRP see that?
For the context see my previous post. Trying to narrow things down.
Does fastboot reboot recovery work for anybody? Instead my ROM boots.
Nokia connected to my Mac via USB cable and booted into bootloader. Active slot is the correct one with TWRP and my ROM (LineageOS 18.1, Android 11).
I can however boot TWRP just fine via key combo (Volume Up + Power), and also via Magisk in LineageOS, so it's installed correctly.
When you share if it's working or also not working for you, please let us know your OS + version of fastboot.
twrp-3.6.1_9-0-DRG_sprout.img | ChangeLog
@RootedLee
1 and 3) If I'm not mistaken, SD card as internal is only supported by the ROM, and not by TWRP, and has been a limitation since Marshmallow days. As for USB OTG, most people don't use partitioned USB drives, and hence TWRP returns after finding the first compatible partition.
2) fastboot reboot recovery isn't a valid command on our device, sadly, since the recovery image is embedded in the boot image and not its own partition.
4) I sadly have no control over TWRP features, I can only work on device side things.
hey @Sid127 Friendly Neighborhood Cacodemon, good to hear from you
SD card as internal can't generally be accessed by TWRP if encrypted: OK, bummer - esp. in the light of that you say it's been requested/ suggested since "prehistoric" times. Needless to say it's feasible technically because TWRP can decrypt /Data. Oh well..
TWRP USB OTG:
a) only finding the first compatible partition: as long as only attaching a USB flash drive - OK. But when attaching an external hard disk whose 1st partition usually is the ESP when it's partitioned as GUID, that's inconvenient. At least a function to skip the ESP would make a lot of sense.
b) reliability: does it always work on your Nokia and in any scenario, regardless if you boot into TWRP via key combo after powering on, or from your running ROM?
2) fastboot reboot recovery & 4.) OK, gotcha
BTW did you do the current 3.6.1 port for this Nokia?
@Sid127 I have a (hopefully simple to implement) request: could you add the "Fix Recovery Bootloop" patch into the "Advanced" menu? Because for the Nokia 6.1 (2018) it's necessary.
Would be really awesome if that's not too much out of your way
RootedLee said:
hey @Sid127 Friendly Neighborhood Cacodemon, good to hear from you
SD card as internal can't generally be accessed by TWRP if encrypted: OK, bummer - esp. in the light of that you say it's been requested/ suggested since "prehistoric" times. Needless to say it's feasible technically because TWRP can decrypt /Data. Oh well..
TWRP USB OTG:
a) only finding the first compatible partition: as long as only attaching a USB flash drive - OK. But when attaching an external hard disk whose 1st partition usually is the ESP when it's partitioned as GUID, that's inconvenient. At least a function to skip the ESP would make a lot of sense.
b) reliability: does it always work on your Nokia and in any scenario, regardless if you boot into TWRP via key combo after powering on, or from your running ROM?
2) fastboot reboot recovery & 4.) OK, gotcha
BTW did you do the current 3.6.1 port for this Nokia?
Click to expand...
Click to collapse
yes indeed, 3.6.1 is also out, and it supposedly fixes adoptable storage, so maybe give that a whirl
RootedLee said:
@Sid127 I have a (hopefully simple to implement) request: could you add the "Fix Recovery Bootloop" patch into the "Advanced" menu? Because for the Nokia 6.1 (2018) it's necessary.
Would be really awesome if that's not too much out of your way
Click to expand...
Click to collapse
as much as I'd love to implement features, there's not much I can do on that front because it's again a source side thing and not a device side thing
You are right - 3.6.1 did fix adoptable storage, thanks for letting me know (that fact slipped my attention somehow).
"Fix Recovery Bootloop" patch: OK, gotcha. With 3.6.1 + the latest LOS boot/ recovery that error seems to be fixed anyway
Keep up your friendly neighborhood commitment !
Correction: support for adoptable storage ("AS") is not fully implemented into TWRP 3.6.1:
- in File Manager it's still only the internal storage which shows up
- in the 'Select Storage' dialogue only 'Internal' can be selected, which is still only the internal but not the merged internal/ SD AS
I simply hadn't migrated any data yet which is why all data still resides on internal.
I'm beyond sick & tried of this (not just in TWRP but all across Android) faultily implemented "AS BS" and will revert back to mobile storage for the SD card!
RootedLee said:
will try. Thanks for the links (I had already come across some of them during my research). Quick question in between (just have a minute right now): could it be of any help to edit the twrp.img and replace contained tar binary with the GNU one?
OT: this whole thread should be moved to the TWRP section where it belongs to in the first place because this is a TWRP not a Xiaomi Redmi Note 3 issue to begin with
Click to expand...
Click to collapse
actually (gnu) gtar is only used by my own linux scripts (to imitate twrp look-a-like backup) and schily (standard) star only used by android-backup-extractor. /sbin/tar -> toybox is a symlink, if you want to replace make sure to unlink /sbin/tar first. but it's not used by twrpTar anyway therefore pointless. your backup looks completely broken, try with another backup first. once you ruled out Error 255 you could try to repair backup
@aIecxs smart and circumspect of you to continue the issue (TWRP restore not producing a functional system from FBE (file-based encryption) Data backup after factory reset: either stuck before reaching login screen, or tar error 255 trying to restore Data) here
Now guess what: I'M BACK UP 'N RUNNING !!!! Even (almost) all apps appear to be working fine apart from a few apps which realize that security settings have changed but performed just fine again after restoring from their own built-in backups, see below ¹ (exceptions also see below ²)
Eventually (after all the steps I had already documented in the other thread), here's the only things I just did:
with LOS installed to slot B unencrypted (no PIN), booted into stock TWRP
because the last backup I made with TWRP from my working and encrypted (PIN > FBE) install was in slot A, changed slot to A
thought, what the heck - just try and see if restore of Data (which so far, if I booted into TWRP with an unecrypted Data present and TWRP not asking for the decrypt PW, had always failed with the notorious tar error 255) works, and indeed, it would suddenly run!!!
decided to at this point to only also restore Boot, but not (yet) System
BOOM - back to Homescreen WITHOUT having to enter any PW thus NOT encrypted - Yeeha !!
the Homescreen launcher (stock LOS Trebuchet) was behaving iffy > restart
launcher now working as supposed; everything else (apart from Signal), too, as it seems, incl. Wi-Fi and making calls.
I am not 100% sure but I think the main do-jobbie indeed was
Code:
./busybox gzip -cd data.ext4.win00# | ./tar --selinux --xattrs -P -vxp
run via adb shell, based on your script, along with the special SELinux tar + busybox (all info see here), + the unencrypted install (currently on the other slot), maybe changing the slot to the inactive one and restore form there - I am honestly not sure.
I am SOOO thrilled about your high-profile help (esp. looking at the numerous threads over at TWRP/Issues where people were not able to resolve this). Let me know if I can buy you a coffee or something.
-----------
¹ Apps also running again after restoring their built-in backups: Signal, Swift Backup, Banking4
² Country-specific apps of mine which required a reset by deleting their data: luca, SBB Mobile, Payback)
In general, since some apps rely on software keystore, it is worth making recurring backups of the data/misc/vold folder which is said to contain the keystore files.
-----------
PS: Once all apps are verified running, I'll apply multiple backup tools, not just TWRP..
donate to Sid127 don't thank me
agreed, friendly neighborhood Cacodemon @Sid127 deserves a donation - done !