43

Because of my external SD card issue, I thought I should factory reset my phone then reinstall the firmware on it. Before I'd do that though, I'd have to back up my apps and their data so that I can restore it afterwards. For that purpose, I had been relying on Titanium Backup Pro, so I entered the app, changed the backup directory to /storage/emulated/legacy/TitaniumBackup (as the external SD card was unavailable) and attempted to backup all user apps and system data. A progress dialogue appeared and was stuck at 0% for about 30 seconds until it close and Titanium Backup displayed the notification 'Batch backup interrupted: Insufficient free storage space' despite having 7 gigabytes left on /storage/emulated/legacy.

I tried searching on Google for a solution - the only one that came up was to remove /data/app/com.keramidas.TitaniumBackup-1.odex but the file did not exist on my end. How can I fix this issue?

Clarification: My copy of Titanium Backup is a Pro version activated by a Pro key obtained from the Google Play store. There is no need for any external patchers, cracks or keygens.

Arielle
  • 757
  • 2
  • 6
  • 19
  • This may sound trivial let alone odd but did you consider removing SD card from the device and restarting the latter? Your SD card issue wasn't straightforward, the card was visible to root (which means to apps running as root as well) but not to others. – Firelord Jul 24 '15 at 11:06
  • that odex file couldn't exist in that path ,only if you odexed that titanium yourself ,that file is located in /data/dalvic-cache/arm/data@[email protected] – Rachid Boudjelida Jul 24 '15 at 11:12
  • @Firelord I have tried restarting the device with the card removed, but that didn't solve the issue. I'm getting the same error from Titanium Backup. – Arielle Jul 24 '15 at 11:20
  • @Arielle have you tryed uninstalling and then reinstalling ? – Rachid Boudjelida Jul 24 '15 at 11:25
  • @lord-ralf-adolf I have just tried that, and it still doesn't work. – Arielle Jul 24 '15 at 11:33
  • Considering your final goal, this might be an XY problem. Wouldn't the real question be how to backup all your apps – instead of how to repair TiBu? Especially as the TiBu issue won't be there anymore with your ROM fixed :) If you agree to that, it would be helpful to know what you wish to backup (plus, maybe, what OS you're using on your desktop). I have an approach in mind, but "one piece dosn't fit everything" there. – Izzy Jul 24 '15 at 11:36
  • @Izzy I'd like to backup my apps with their respective data. I'm not sure if simply copying the folders /data/app and /data/data would do the trick. Oh, and on my desktop computer, I have Windows 8.1. – Arielle Jul 24 '15 at 11:38
  • @Arielle it might work but ,it wouldn't be as organized and safe as using titanium ,by the way try changing the backup path to /storage/emulated/0 instead of /storage/emulated/legacy ,the two location are pointing to the same location – Rachid Boudjelida Jul 24 '15 at 11:40
  • @lord-ralf-adolf I tried that, but it still doesn't work - same error message. There appears to be nothing relevant in the logcat. – Arielle Jul 24 '15 at 11:46
  • @Arielle check our backup tag-wiki, especially the part on ADB backups (and make sure to follow-up the first linked question at the end of the page). I will update the wiki now for one missing item concerning ADB backups (apps protecting themselves against it setting ALLOW_BACKUP = FALSE in their manifests, plus a work-around for that – mentioned question already has that at least in the comments on one answer) – DONE. – Izzy Jul 24 '15 at 11:46
  • @Izzy I tried using the adb backup command, but my phone didn't show a backup confirmation prompt like that in the answer. – Arielle Jul 24 '15 at 11:52
  • this is weird ,I can say there is something wrong with your rom/kernel ,sdcard doesn't mount ,and now this ,still can you change the path to /data/media/0 it points to the same locations as legacy – Rachid Boudjelida Jul 24 '15 at 11:53
  • @lord-ralf-adolf I tried that, but Titanium Backup said that folder was 'inaccessible', and so was /mnt/shell/emulated. I tried changing the path to Ye Olde /mnt/sdcard, but it gave the same error as previously. – Arielle Jul 24 '15 at 13:06

11 Answers11

52

This is due to the 'Mount namespace separation' setting in SuperSU being turned on (by default). Untick that, reboot and try your Titanium Backup operation again.

This happens because the permissions to app-created folders are restricted in newer Android versions, I believe. Ironically, I didn't have this issue on Marshmallow-based CM13, but I did face it in the Lollipop-based OxygenOS for the OnePlus One.

aalaap
  • 725
  • 6
  • 10
6

This happens due to some service change in kitkat. Some research on google showed that there is an app available to modify the platform.xml file. The app once run, prompts the user to allow it to go ahead and make the modifications to the above file. Everything works fine after this.

NextApp SDFix

beeshyams
  • 40,739
  • 30
  • 119
  • 269
ody
  • 61
  • 1
  • 1
5

At TB's startup it always displayed a warning that SuperSU's namespace separation feature "might not work reliably on some platforms".

Well, I never faced any problems until a recent SuperSU update...

So disabling that option in SuperSU and rebooting solved the "insufficient space" on my OnePlus One/CM12.1.

This was the obvious solution before fiddling around with permissions etc.

kaedinger
  • 51
  • 1
  • 2
3

In recent versions of Android, paths under /storage/emulated/legacy only work for the apps that created them. If the OS doesn't know that TB created /storage/emulated/legacy/TitaniumBackup, then you'll get this error.

Try using TB to create a directory, then use that for your backups. Alternatively, use a path that doesn't start with /storage/emulated/legacy, like /data/media/0/TitaniumBackup. Either should work.

Trebor Rude
  • 1,064
  • 8
  • 23
  • Either should work... but neither did. I tried creating another directory on /storage/emulated/legacy, and using that for the backups - didn't work. I tried using a path that did not start with /storage/emulated/legacy - /mnt/sdcard (/data was not accessible to Titanium Backup at all) and it still didn't work as intended. – Arielle Jul 25 '15 at 09:11
  • Hmm, I know I solved this exact problem on my TF700T after installing a new ROM. But I had similar issues in a number of apps. I must have used the /data trick in a different one. I assume you used TB to create the other directory in /storage/emulated/legacy? Won't work otherwise. – Trebor Rude Jul 25 '15 at 10:09
3

(Titanium Backup)batch backup interrupted: insufficient storage space this solution work for me any one can try see if it work. I have a fix. I did a little research and found that you can edit /etc/permissions/platform.xml and add a group to WRITE_EXTERNAL_STORAGE

Original:

Add the media_rw group:

Done. Doing a TiBU right now to my external card. This may fix other apps that have issues writing to the card, I personally didn't find any.

Suggest that you do an adb pull of the file for safekeeping before doing this. If you pull the file, edit it, and push it back make sure the permissions are set to 644.

zak
  • 31
  • 2
  • I didn't have this group on Android 6, but had it on Android 5. Just adding it fixed the insufficient storage space message for me. So add this above the "WRITE_MEDIA_STORAGE" entry: – Berend de Boer Jan 07 '17 at 07:04
1

just go to super user-settings-untick "mount namespace separation" and reboot done!!

abhis4u
  • 21
  • 1
  • 4
    And the reasoning behind it? – Firelord Jan 06 '16 at 20:36
  • Same answer as highest rated. Titanium Backup now pops a warning if Namespace separation is enabled, which separates the superuser commands in some way. Titanium backup can't access the right things if namespaces are separated. – mix3d Mar 09 '16 at 19:20
1

If you are using Magisk as your superuser manager, go to settings > mount namespace mode and select isolated namespace. Hope this helps someone!

subtleseeker
  • 111
  • 6
  • 1
    Unfortunately, this did not really help. At the end, I set mount-namespace-mode to "global namespace" in Magisk and selected "DocumentProvider storage" in Titatium backup settings and there the correct folder on the external SA card. This combination seem sto work. – jherb Jul 14 '20 at 16:22
0

Open Preferences of your Titanium Backup. Then look for an option called Backup app external data in Backup Settings. Make sure it is NOT Enabled. Rather set it to 'Enabled if smaller than a chosen size' and set the size to 35 MB.

(Click image to enlarge)

IMG: Backup external data

Some apps have a hefty amount of external data (stored in /sdcard/Android/data), particularly games which may span over several gigs. This option disables backing them up as they can be downloaded again.

Firelord
  • 25,084
  • 20
  • 124
  • 286
Vishal Biswas
  • 201
  • 1
  • 9
  • Sorry, but that solution didn't really work on my end. 'Backup app external data' was already set to 'Enabled if it's smaller than a chosen size' and the size was set to 32 MB, so I tried setting it to 'Disabled (Always)' and retrying the backup... which didn't work. – Arielle Jul 24 '15 at 17:41
  • @Arielle Try turning on Compression (setting it to BZIP2). Make sure you're just backing up the user apps and NOT any system apps. – Vishal Biswas Jul 25 '15 at 04:00
  • I tried changing Compression from GZIP to BZIP2, and backing up the user apps only. Still doesn't work. Even though I have 7 GB of space left. – Arielle Jul 25 '15 at 07:25
  • Last resort: Run logcat as root. It will give you an idea at least. – Vishal Biswas Jul 25 '15 at 13:28
0

As @Izzy said, this was an XY problem - I could have looked for another backup solution instead of insisting on using Titanium Backup. And I did - I used the adb backup feature (which worked when I rebooted my phone). In the end, I didn't have to restore the backup at all, but that's a different story altogether.

Arielle
  • 757
  • 2
  • 6
  • 19
0

Go into Titanium Backup settings

  • Backup Folder location
  • Storage provider
  • Select "DocumentProvider storage"
  • Allow access to ____

https://forum.xda-developers.com/t/titanium-backup-insufficient-storage-root-with-magisk.3806051/#post-76858004

endolith
  • 3,035
  • 10
  • 40
  • 48
-2

I have also faced this weird situation. I don't know whether it will work or not. But for me it works.

Install lucky patcher. It will automatically remove the odex file and you will be able to install Titanium Backup.

Firelord
  • 25,084
  • 20
  • 124
  • 286
Dalvik
  • 429
  • 3
  • 7
  • 16
  • But there doesn't seem to be any .odex file. And it doesn't seem to be hidden considering its tutorials around the web. // And TitaniumBackup is already installed! – Firelord Jul 24 '15 at 11:12
  • In my case same scenario is there. I also not able to view the file. Please install this apk and open . just wait for 5-10 sec it will automatically scan and remove. You will se a notification when its done – Dalvik Jul 24 '15 at 11:13
  • http://android.stackexchange.com/questions/105816/google-play-insufficient-space-error see my question – Dalvik Jul 24 '15 at 11:15
  • there is not odex file ,only if you odex the app your self ,like applying a patch from lucky patcher ,if you do lucky patcher will apply patch to an odex file and put it in the same directory as the apk (I think the use of lucky patcher is illegal -just saying- ) – Rachid Boudjelida Jul 24 '15 at 11:15
  • I don't need to use Lucky Patcher as I've already bought the Pro version of Titanium Backup on Google Play. I should have been more clear about that. – Arielle Jul 24 '15 at 11:18
  • @lord-ralf-adolf i dont know about odex in deep. But Lucky patcher solve my problem. I was stuck for months. IT is not illegal it is just the power of open source – Dalvik Jul 24 '15 at 11:18
  • @Arielle I am not saying you to use it. You just install it. and open it. You have to do nothing. It will automatically remove the odex file. then you can uninstall the app – Dalvik Jul 24 '15 at 11:19
  • 1
    @Dalvik Thanks for the help but you're missing the basic point. We can't seem to find that odex file and that patcher is certainly no magical thingie which would create that file on its own, delete it, and then tell us that it did the job! Right! – Firelord Jul 24 '15 at 11:23
  • @Dalvik not the power of open source (the power of open source can be seen in many project like linux kernel ,xbmc ,chromium ect ) ,it emulates in-app purchases! patch free to make pro versions ,I know it has a set of useful tools but still there more illegal and legal stuff – Rachid Boudjelida Jul 24 '15 at 11:26
  • @Firelord I am not supporting lucky patcher. I am sharing my experience and how it solved my issue . If it works for someone then its good – Dalvik Jul 24 '15 at 11:27
  • @Dalvik OK, I got the point. Now it's up to the community users to decide the usefulness of this answer. Good luck! (and I didn't down-vote). – Firelord Jul 24 '15 at 11:29
  • @Firelord its ok – Dalvik Jul 24 '15 at 11:31
  • for more info about odex files I recommend reading this http://forum.xda-developers.com/showthread.php?t=2336411 – Rachid Boudjelida Jul 24 '15 at 11:33
  • I have just tried opening Lucky Patcher, then closing it and reinstalling Titanium Backup. It still doesn't work as intended. – Arielle Jul 24 '15 at 11:34
  • @Arielle Have you waited for some time after opening lucky patcher ? – Dalvik Jul 24 '15 at 11:37
  • @Dalvik I waited until the progress dialogue disappeared. Was I supposed to wait for longer? – Arielle Jul 24 '15 at 11:40
  • yes ... for 5-10 sec.. give it time to scan all the apps .... and wait for a while – Dalvik Jul 24 '15 at 11:42