OOS 5 Oreo, non rooted, stock kernel, TWRP 3.2.1 blue_spark 8.61
every time i try to make a nandroid backup i get this error: createTarFork() process ended with ERROR=255
and backup fails
any ideas?
the log:
Iperation_end - status=0
I:Set page: 'backup'
I:Set page: 'backupencryption'
I:Set page: 'backup_options'
I:Set page: 'backup'
I:Set page: 'backup_run'
Iperation_start: 'Nandroid'
Updating partition details...
Iata backup size is 9064MB, free: 95716MB.
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
...done
I:Backup Name is: '2017-12-30--17-01-48'
I:Backup_Folder is: '/data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48'
I:Calculating backup details...
* Total number of partitions to back up: 13
* Total size of all data: 12729MB
* Available space: 95716MB
[BACKUP STARTED]
* Backup Folder: /data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48
Backing up Boot...
I:Reading '/dev/block/sde19', writing '/data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/boot.emmc.win'
I:Restored default metadata for /data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/boot.emmc.win
Iartition Backup time: 0
Invalid encryption mode 'ice:aes-256-cts'
Backing up Cache...
Invalid encryption mode 'ice:aes-256-cts'
I:Creating backup...
I:Creating tar file '/data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/cache.ext4.win'
I:Using compression...
I:addFile '/cache/recovery' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/last_log.1' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/log' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/last_log' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/last_install' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/last_bootloader_log' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/last_kmsg' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/.version' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/recovery.fstab' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/recovery/storage.fstab' including root: 0
==> set selinux context: ubject_r:cache_recovery_file:s0
I:addFile '/cache/backup_stage' including root: 0
==> set selinux context: ubject_r:cache_backup_file:s0
I:addFile '/cache/backup' including root: 0
==> set selinux context: ubject_r:cache_private_backup_file:s0
I:addFile '/cache/log_before_911' including root: 0
==> set selinux context: ubject_r:cache_file:s0
I:addFile '/cache/log_before_911/android_911.log' including root: 0
==> set selinux context: ubject_r:cache_file:s0
I:addFile '/cache/log_before_911/kernel_911.log' including root: 0
==> set selinux context: ubject_r:cache_file:s0
I:addFile '/cache/log_before_911/android_911.log.1' including root: 0
==> set selinux context: ubject_r:cache_file:s0
I:addFile '/cache/log_before_911/android_911.log.2' including root: 0
==> set selinux context: ubject_r:cache_file:s0
I:addFile '/cache/log_before_911/kernel_911.log.1' including root: 0
==> set selinux context: ubject_r:cache_file:s0
I:Closing tar
Iigz process ended with RC=0
I:Thread id 0 tarList done, 0 archives.
I:Thread ID 0 finished successfully.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/cache.info'
I:createTarFork() process ended with RC=0
Iartition Backup time: 0
Backing up Recovery...
I:Reading '/dev/block/sde22', writing '/data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/recovery.emmc.win'
I:Restored default metadata for /data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/recovery.emmc.win
Iartition Backup time: 1
Invalid encryption mode 'ice:aes-256-cts'
Backing up System...
Invalid encryption mode 'ice:aes-256-cts'
Error opening: '/system/app/DeskClock/oat/arm64' (Not a directory)
I:Error in Generate_TarList!
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/system.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /data/media/0/TWRP/BACKUPS/b7d162d2/2017-12-30--17-01-48/recovery.log
I've got the same error with different folders:
'/data/user/999'
'/data/misc_ce/999'
'/data/system_ce/999'
if they are unnecessary files I could delete them and try again.
does anyone know if these 999 folders are important?
also in my twrp the listed folders above look kind of encrypted (had some struggle with the oos5 update before), but in my file explorer they look decrypted.
are there some ideas what I should do?
yannick818 said:
I've got the same error with different folders:
'/data/user/999'
'/data/misc_ce/999'
'/data/system_ce/999'
if they are unnecessary files I could delete them and try again.
does anyone know if these 999 folders are important?
also in my twrp the listed folders above look kind of encrypted (had some struggle with the oos5 update before), but in my file explorer they look decrypted.
are there some ideas what I should do?
Click to expand...
Click to collapse
looks like it's an error with parallel apps oder multiple users. since i do not use something like that, i just removed this user with the android terminal emulator:
su
pm remove-user 999
everything was fine after that
I have an error during backup, here's the recovery.log content
Code:
I:Backup Name is: '2018-01-03--12-02-08'
I:Backup_Folder is: '/data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08'
I:Calculating backup details...
* Total number of partitions to back up: 5
* Total size of all data: 12759MB
* Available space: 97309MB
[BACKUP STARTED]
* Backup Folder: /data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08
Backing up Boot...
I:Reading '/dev/block/sde19', writing '/data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/boot.emmc
I:Restored default metadata for /data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/boot.emmc.win
* Generating digest...
I:SHA2 Digest: e87cb0358f437689e295df369ada19ed4b40b592e5a65ddff0e73361b460f2e2 boot.emmc.win
I:digest_filename: /data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/boot.emmc.win.sha2
* Digest Created.
I:Partition Backup time: 1
Backing up Recovery...
I:Reading '/dev/block/sde22', writing '/data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/recovery.
I:Restored default metadata for /data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/recovery.emmc.wi
* Generating digest...
I:SHA2 Digest: b8bbc0e66d88769fafd3667c26706e433f43c0b84996bdfa9d955f2c3e009c49 recovery.emmc.win
I:digest_filename: /data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/recovery.emmc.win.sha2
* Digest Created.
I:Partition Backup time: 0
Invalid encryption mode 'ice:aes-256-cts'
Backing up System...
Invalid encryption mode 'ice:aes-256-cts'
Error opening: '/system/app/DeskClock/oat/arm64' (Not a directory)
I:Error in Generate_TarList!
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/system.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /data/media/0/TWRP/BACKUPS/da29c9c8/2018-01-03--12-02-08/recovery.log
I:Set page: 'action_complete'
I:operation_end - status=1
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'terminalcommand'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set overlay: 'slideout'
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
Any help guys?
In my case i made a parallel app (facebook). So the backup failed every time. I killed the app and there is a folder called "999" in the internal storage. Delete it and the backup will work.
IBoZzxLiKeDI said:
In my case i made a parallel app (facebook). So the backup failed every time. I killed the app and there is a folder called "999" in the internal storage. Delete it and the backup will work.
Click to expand...
Click to collapse
I did that, still doesn't work.
fontomas said:
I did that, still doesn't work.
Click to expand...
Click to collapse
you need to turn off parallel apps, then go into a root explorer and delete
data/system/999
data/system_ce/999
data/misc/999
data/misc_ce/999
data/user/999
data/user_ce/999
This will allow you to do a backup, but you'll get "extractTarFork() process ended with ERROR=255' when trying to restore. So it feels kind useless, unless someone can figure this out.
krumbman0wnz said:
you need to turn off parallel apps, then go into a root explorer and delete
data/system/999
data/system_ce/999
data/misc/999
data/misc_ce/999
data/user/999
data/user_ce/999
This will allow you to do a backup, but you'll get "extractTarFork() process ended with ERROR=255' when trying to restore. So it feels kind useless, unless someone can figure this out.
Click to expand...
Click to collapse
You need to delete those folders even before restoring a nandroid backup. At least worked for me
oh, well, its kinda bad for me cuz i'm allmost at OP situation right now.
So, using 8.61 blue sparks twrp i made full backup of my partitions and got '' extractTarFork() process ended with ERROR=255 '' when i was trying to restore backup. Any idea, how can i restore my backup now?
more_than_hater said:
oh, well, its kinda bad for me cuz i'm allmost at OP situation right now.
So, using 8.61 blue sparks twrp i made full backup of my partitions and got '' extractTarFork() process ended with ERROR=255 '' when i was trying to restore backup. Any idea, how can i restore my backup now?
Click to expand...
Click to collapse
From twrp go to advanced then filmanager. U have to delete all those 999 folders then u can restore
There is no such folders at /data folder, only media and lost+found
more_than_hater said:
There is no such folders at /data folder, only media and lost+found
Click to expand...
Click to collapse
Are u rooted?
yes, ofc
I already wiped all, tried to stay at custom but it disapoint me, so flashing back
---------- Post added at 02:22 PM ---------- Previous post was at 01:59 PM ----------
simo6 said:
Are u rooted?
Click to expand...
Click to collapse
Any idea?
yannick818 said:
looks like it's an error with parallel apps oder multiple users. since i do not use something like that, i just removed this user with the android terminal emulator:
su
pm remove-user 999
everything was fine after that
Click to expand...
Click to collapse
Thank you very much. Worked like a charm. Thanks a bunch.
And i second that the culprit here is folder 999 of parallel apps as i found facebook data from second account in this folder like profile pics etc.
yannick818 said:
looks like it's an error with parallel apps oder multiple users. since i do not use something like that, i just removed this user with the android terminal emulator:
su
pm remove-user 999
everything was fine after that
Click to expand...
Click to collapse
Worked for me on 8.0! Thanks!
OnePlus5T:/ $ su
OnePlus5T:/ # pm remove-user 999
Error: couldn't remove user id 999
1|OnePlus5T:/ #
I've tried removing all 999 folders prior to backup, but it still fails. I'm rooted on 5.0.4. with magisk.
Anyone?
simo6 said:
OOS 5 Oreo, non rooted, stock kernel, TWRP 3.2.1 blue_spark 8.61
every time i try to make a nandroid backup i get this error: createTarFork() process ended with ERROR=255
and backup fails
any ideas?
Click to expand...
Click to collapse
For me, this solved.
https://forum.xda-developers.com/oneplus-5/help/error-255-twrp-t3739468
I could resolve my nandroid /data backup error on my EMUI 8.0 device with those following steps:
1 - Use a correct TWRP implementation
TWRP need to access the uncyphered partition /data.
There no possibility to backup it, if TWRP does not implement deciphering user data partition.
2 - Remove all users except user 0 (the administrator)
You can verify that there is no unwanted users, looking at directory /data/user : the only subdirectory should be "0".
To remove the others users :
Remove the PrivateSpace if you have one (Settings > Security & Privacy > PrivateSpace, and tap on the garbage can).
Remove all the secondary users (Settings > Users & accounts > users, and tap on each users to delete them). Keep just the main administrator user.
On EMUI, remove all twins applications (Settings > Apps & Notifications > App Twin, and disable all twin apps).
On OxygenOS, remove all parallel apps (Settings > Apps > Parallel Apps, and disable all parallel apps).
On MIUI, remove all dual apps (Settings > Dual Apps, and disable all dual apps)
On others devices ... you must find all parameters that create those unwanted users.
If you are not able to get the correct settings to suppress those users, in last resort you can try this command : "pm remove-user user-no. (For example "pm remove-user 999").
3 - Do not forget to protect your backups by a password
This would be stupid to cipher your /data partition and keep backups of this partition unprotected.
These steps fixed the nandroid backup problem for /data partition on my Huawei device.
I post on this forum because I hope that this will be helpful for others devices owners.
yannick818 said:
looks like it's an error with parallel apps oder multiple users. since i do not use something like that, i just removed this user with the android terminal emulator:
su
pm remove-user 999
Click to expand...
Click to collapse
Thanks a lot for this! Helped me with OOS 9.5.4 on OnePlus 7 Pro.
Related
I'm having a strange problem. I'm trying to update a few apps and I keep getting errors. I have a rooted RC33 and I have the apps on /system/sd/app.
It looks like I have space:
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 63.1M 913.9M 6% /system/sd
/dev/block/mtdblock5 74.8M 60.1M 14.7M 80% /data
/dev/block/mtdblock4 67.5M 1.4M 66.1M 2% /cache
/dev/block/mmcblk0p1 6.4G 4.6G 1.8G 73% /sdcard
#
Most apps seem to install OK, but there are a few I've tried to install today (qsearch, mybackup, quickoffice) that give me errors. It will say install unsuccessful and the error is either "insufficient storage available" (which seems odd) or "could not delete old application" (which also seems strange).
Any ideas? I'm stumped.
And yes, I've rebooted several times.
Thanks
P.S. Is it normal that my /data/app-private is empty? I just noticed that...
Oh, also, here's the debug log:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23451.tmp
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
D/dalvikvm( 58): GC freed 15380 objects / 698304 bytes in 442ms
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageInstallObserver.packageInstalled(): Package install from content://downloads/download/336 failed: Could not delete old application.
-- more info --
So I tried chmod 777 app-private and then created an empty file com.qo.android.am.apk since that is what it was complaining about. Then I tried installing again. The debug log shows:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23453.tmp
D/PackageManager( 58): Scanning package com.qo.android.am
I/PackageManager( 58): /data/app/vmdl23453.tmp changed; unpacking
D/installd( 37): DexInv: --- BEGIN '/data/app/vmdl23453.tmp' ---
D/dalvikvm( 1564): DexOpt: load 541ms, verify 2688ms, opt 214ms
D/installd( 37): DexInv: --- END '/data/app/vmdl23453.tmp' (success) ---
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
I/installd( 37): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected]
E/PackageManager( 58): Couldn't move package file to: /data/app-private/com.qo.android.am.apk
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
D/PackageManager( 58): Removing package com.qo.android.am
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
D/ActivityManager( 58): Uninstalling process com.qo.android.am
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageIns
tallObserver.packageInstalled(): Package install from content://downloads/download/338 failed: Insufficient storage available.
At this point, I am getting the insufficient space message (as shown in the log). Previously, I was getting the could not delete app message (as shown in the log above this one).
I get this error occasionally too... I don't know why it happens, but it's usually for protected apps.
EDIT: Also, I have my /data/app folder on an ext2 partition on my miccroSD card, but the app-private remains on the phone. I don't know what's going on... I want to buy dxTop, but I don't think that it will install...
I got the same error while trying to install parkmark free. I've been contemplating moving everything back to the phone to install and then move them back to the SD. PITA but I would like to nab it before it is no longer available.
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
amgupt01 said:
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
Click to expand...
Click to collapse
Same here -- that's the only symlinking I did (well, aside from the caches).
I wonder if un-symlinking the apps dir (putting it back to "normal"), installing and then re-symlinking (and copying the new stuff) would work. Does that seem risky? So maybe something like:
Temporarily rename the symlink to app.DISABLED
Create a new app directory (a "real" directory)
Install the new app(s)
Copy whatever is in the new ("real") app directory to the symlinked (now named "app.DISABLED") directory
Remove the "real" app directory and rename the symlink back to app
I'm just wondering if it is dangerous to rename the app directory while apps may be running as suddenly they won't be able to find themselves and that could upset things.
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
amgupt01 said:
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
Click to expand...
Click to collapse
I got bold and tried it and it worked (I did get a few errors about some apps force-closing because I moved directories around). Here's what I did:
cd /data
mv app app.SDCARD
mkdir app
chmod 771 app
chown 1000:1000 app
Went to Market and installed the app that wouldn't install earlier
busybox cp -a app/* /system/sd/app
mv app app.ORIGINAL
mv app.SDCARD app
Voila! My newly installed app works. A reboot should resolve any background apps (like the caller-ID app) that were running while I moved the directories.
If you wanna make some scripts out of that, I'm sure it would help others. A quick "run this" then install then "run that" kind of operation.
EDIT: That worked for a new app. To replace an existing app, I had to do this:
Code:
busybox cp -a /system/sd/app/<old-app> /data/app
before updating so that it could delete the old app. That worked for a replacement (update).
mlevin said:
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
Click to expand...
Click to collapse
I'm wondering if they are checking to see if /data/app is a symlink -- or maybe if /data/app and /data/app-private are on the same filesystem (which could be solved by moving both app and app-private over to the card). Hmm...
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
amgupt01 said:
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
Click to expand...
Click to collapse
Wow. That was easy. I'll do that on mine as well. Cool.
EDIT: Yup, after symlinking and a quick reboot, that worked for me as well!
HELP PLEASE:
Cant update or download new apps from market to SD card.
I can only download & update apps on internal storage and then move them to SD... But If I have app on SD I cannot update or install app.. I always get - Installation Unsuccessful
I am using Leedroid NOA2SD 2.4.1. Tried to format SD card, unmount and mount SD.. nothing helps.
Titanium Backup:
Internal: 23 MB free
SD card: 1.29 GB free
SD card (a2sd): 1.90 MB free
Can you help me with any idea?
Tnx
I have a log file but I cant send it :|
I am using multirom v8, with TWRP v2.4.1.0 on a Nexus 7 Wi-fi version. I have stock Android 4.2.1 (but with Tasssadar's kexec-hardboot kernel) as internal and Ubuntu 13.04.
I received the notification that the 4.2.2 update was available. So, I started to install it but it was unsuccessful. I do not remember but I think it said that update had failed and it rebooted.
So, I manually downloaded the update ( to update build JOP40D to JDQ39) and tried to install it using the modified recovery. Got the following error message (relevant parts):
I:Attempt to load settings from settings file...
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Switching packages (TWRP)
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:Set page: 'flash_zip'
Installing '/sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found.
Verifying current system...
contents of partition "/dev/block/platform/sdhci-tegra.3/by-name/LNX" didn't match EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd
file "EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd" doesn't have any of expected sha1 sums; checking cache
failed to stat "/cache/saved.file": No such file or directory
failed to load cache file
script aborted: assert failed: apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd")
assert failed: apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd")
E:Error in /sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip
(Status 7)
Error flashing zip '/sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip'
Updating partition details...
Any suggestions to fix this issue?
PS: I would have posted this here: http://forum.xda-developers.com/showpost.php?p=38043472&postcount=1157 but I do not have sufficient priviledges...
rigved said:
I am using multirom v8, with TWRP v2.4.1.0 on a Nexus 7 Wi-fi version. I have stock Android 4.2.1 (but with Tasssadar's kexec-hardboot kernel) as internal and Ubuntu 13.04.
I received the notification that the 4.2.2 update was available. So, I started to install it but it was unsuccessful. I do not remember but I think it said that update had failed and it rebooted.
So, I manually downloaded the update ( to update build JOP40D to JDQ39) and tried to install it using the modified recovery. Got the following error message (relevant parts):
I:Attempt to load settings from settings file...
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Switching packages (TWRP)
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:Set page: 'flash_zip'
Installing '/sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found.
Verifying current system...
contents of partition "/dev/block/platform/sdhci-tegra.3/by-name/LNX" didn't match EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd
file "EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd" doesn't have any of expected sha1 sums; checking cache
failed to stat "/cache/saved.file": No such file or directory
failed to load cache file
script aborted: assert failed: apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd")
assert failed: apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd")
E:Error in /sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip
(Status 7)
Error flashing zip '/sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip'
Updating partition details...
Any suggestions to fix this issue?
PS: I would have posted this here: http://forum.xda-developers.com/showpost.php?p=38043472&postcount=1157 but I do not have sufficient priviledges...
Click to expand...
Click to collapse
I think the problem is with bootloader (not sure) ...i had same multirom (cyanogenmod +Ubuntu ) ..i deleted ubuntu then flashed Stock 4.2.1 with wugstool then updated to 4.2.2 ... try updating bootloader
rigved said:
I am using multirom v8, with TWRP v2.4.1.0 on a Nexus 7 Wi-fi version. I have stock Android 4.2.1 (but with Tasssadar's kexec-hardboot kernel) as internal and Ubuntu 13.04.
I received the notification that the 4.2.2 update was available. So, I started to install it but it was unsuccessful. I do not remember but I think it said that update had failed and it rebooted.
So, I manually downloaded the update ( to update build JOP40D to JDQ39) and tried to install it using the modified recovery. Got the following error message (relevant parts):
I:Attempt to load settings from settings file...
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb-otg'
I:Actual block device: '', current file system: 'vfat'
I:Switching packages (TWRP)
I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:Set page: 'flash_zip'
Installing '/sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip'...
Checking for MD5 file...
Skipping MD5 check: no MD5 file found.
Verifying current system...
contents of partition "/dev/block/platform/sdhci-tegra.3/by-name/LNX" didn't match EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd
file "EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd" doesn't have any of expected sha1 sums; checking cache
failed to stat "/cache/saved.file": No such file or directory
failed to load cache file
script aborted: assert failed: apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd")
assert failed: apply_patch_check("EMMC:/dev/block/platform/sdhci-tegra.3/by-name/LNX:5060608:319331fae14fec8a88063751475fce26bae328e0:5062656:af83f09e77a64ed7ede2adad2a16bd0c12d5d7fd")
E:Error in /sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip
(Status 7)
Error flashing zip '/sdcard/Download/6ece895ecb23.signed-nakasi-JDQ39-from-JOP40D.6ece895e.zip'
Updating partition details...
Any suggestions to fix this issue?
PS: I would have posted this here: http://forum.xda-developers.com/showpost.php?p=38043472&postcount=1157 but I do not have sufficient priviledges...
Click to expand...
Click to collapse
I *just* fixed this problem. Mine was failing on the same line. The trick is to modify the updater-script. I modified it to stop the check, and it flashed without a problem on my tablet. I also removed the sections where it replaced the recovery.
I'm hesitant to post mine because I was NOT running multiboot, so when it patched the bootloader regardless of the checksum, I was fine (Or lucky). I don't know what will happen if you use the one I modified, or if 4.2.1 CAN be updated safely without touching the bootloader.
So here: This script is very untested, and modified by someone who doesn't fully understand what he did. Use this at your own risk, and realize I hold no responsibility if you brick your N7..
That said, if you replace the 'updater-script' in the update zip (located in META-ING/com/google/android) with this one, it will patch.
The LNX partition is the boot partition.
That check is failing because when the script looks at the existing LNX partition (boot), it does not find what it expects to find.
The OTA patches existing files, it doesn't replace them with a full replacement copy. So the starting condition of each file to be patched must be exact.
I believe that the check of the LNX partition is the very last checksum verified, so that is good news - it means nothing else checked in /system is mismatched.
You can either hack the installer script as above (and thus need to use a custom recovery to install it because this will break the signing of the factory package), or you can use a completely safe route:
- make full Nandroid backup (including recovery if possible)
- flash the stock 4.2.1 boot image ( not bootloader! ) to the boot partition
- copy the factory ota .zip file to /cache/update.zip
- create a file named "command" with a single line in it:
--update_package=/cache/update.zip
and copy it to /cache/recovery/command
- flash the stock 4.2.1 recovery to the recovery partition
- reboot to recovery
This runs the pure stock OTA install which does all the patching plus installs a new 4.18 bootloader, 4.2.2 boot partition, and 4.2.2 stock recovery.
Before you get too antsy bear in mind that this whole situation is likely to happen again with the next OTA - meaning, it would be a great time to get a backup of pure stock 4.2.2 (including stock recovery and stock boot partition).
So, now:
- perform a soft boot of a custom recovery (don't flash it in place just yet!)
- overflash a SuperSU/Superuser root kit
- make a Nandroid Backup of this entire "lightly rooted pure stock 4.2.2 ROM" - including the recovery partition!
- hard-flash your custom recovery
- restore only the boot partition from the first Nandroid backup described in these instructions.
cheers
I apologize if I've overlooked something simple here, but I am unable to restore my backups. I have swapped to PhilZ Advanced Touch CWM Recovery 6.0.3.7 newly posted in the Android Development Sub Forum.
I believe the error lies in that, for some reason, the external sd card is included in the data partition size calculation (I'm shooting in the dark here but when performing a backup it says needed free space is 21401 MB...I have a 16gb external sd card in the phone). The backups complete with CWM and only take up approx. 1500 MB.
When restoring any of the previously created backups, they all fail at the point of the /data partition. Is there some easy fix for this moving forward (maybe something simple I can change in one of the dumped backup files)? Something I need to reformat?
FWIW I had this problem of 21 GB backup size with TWRP 2.5 as well (yet TWRP fails because it does not continue without the necessary free space).
Any insight would be most appreciated!
Are the errors contained the log typical or do they point out something obvious that needs attention?
Thanks,
Joof
Here are the relevant pieces from the log of the backup being performed....not sure how to grab one from the failed restore and would prefer not to as I have to end up re-flashing the phone
------------------------
Starting recovery on Tue Oct 1 23:30:13 2013
(UTC)
can't open /dev/tty0: No such file or directory
framebuffer: fd 3 (540 x 960)
CWM Advanced Edition 5
CWM Base version: v6.0.3.7
I:Build version: 5.15.0 - cm_xt907
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot (null) 0
2 /system ext4 /dev/block/platform/msm_sdcc.1/by-name/system (null) 0
3 /cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache (null) 0
4 /data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata (null) -16384
5 /sdcard datamedia /dev/null (null) 0
6 /external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 0
7 /logo emmc /dev/block/platform/msm_sdcc.1/by-name/logo (null) 0
8 /modem ext4 /dev/block/platform/msm_sdcc.1/by-name/modem (null) 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /preload during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
I:Completed outputting fstab.
I:using /data/media/0 for /sdcard
Irocessing arguments.
I:Checking arguments.
Warning: No file_contexts
I:Warning: No file_contexts
I:device_recovery_start()
I:Cannot open /data/philz-touch/philz-touch_5.ini
I:nandroid_compression set to default (fast)
I:Cannot open /data/philz-touch/philz-touch_5.ini
I:nandroid_md5sum set to default (1)
I:Cannot open /data/philz-touch/philz-touch_5.ini
I:show_nandroid_size_progress set to default (1)
Command: "/sbin/recovery"
ro.boot.hardware=qcom
....
....
(REMOVED FOR BREVITY)
I:Checking for extendedcommand & OpenRecoveryScript...
I:Skipping execution of extendedcommand, file not found...
I:Skipping execution of OpenRecoveryScript, file not found...
I:ro.modversion=pa_scorpionmini-3.99-RC2-30SEP2013-084601
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
I:Checking needed space for backup '/external_sd/clockworkmod/backup/2013-10-01.23.30.25_pa_scorpionmini-3.99-RC2-30SEP2'
E:Failed to find partition size '/boot'
I:/system backup size (stat)=430Mb
I:/cache backup size (stat)=105Mb
I:/data: tot size=4784Mb, free=3600Mb, backup size=21401Mb, used=21709Mb, media=308Mb
I:/external_sd/.android_secure backup size=0Mb
>> Free space: 6414Mb (42%)
>> Needed space: 21937Mb
>> Unknown partitions size (1): - /boot
>> Backing up /boot...
Backing up boot image...
Backup of boot image completed.
Volume not found! Skipping backup of /recovery...
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /system...
(APPS LISTED...REMOVED FOR BREVITY)
Backup of system completed.
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /data...
(REMOVED FOR BREVITY)
Backup of data completed.
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /external_sd/.android_secure...
Backup of .android_secure completed.
I:setting up /data/media(/0) for /sdcard.
I:using /data/media/0 for /sdcard
>> Backing up /cache...
(REMOVED FOR BREVITY)
Backup of cache completed.
No sd-ext found. Skipping backup of sd-ext.
Generating md5 sum...
Well fastboot flashing stock recovery and doing factory reset/data/cache wipe fixed it. I guess this is not a common issue but thought I'd share my remedy.
Sent from my XT907 using Tapatalk 2
Glad to hear you got your phone working. Just curious, are you now using Philz recovery?
Sent from my XT901 using Tapatalk 4
Thanks!
And Yes. Official philz touch.
I just got this device last week and unlocked the boot loader. I had some issues loading the AOKP 4.3 (boot loops and such even with doing 3x wipes of everything). I eventually had it running smoothly and decided to try the other offerings which is where I discovered this weird backup file size.
But a random post made today in the pacman ROM thread led me to try stock recovery.
Sent from my XT907 using Tapatalk 2
I recently upgraded a Galaxy S2 to Cyanogenmod 12.1 / android 5.1. I also wanted to use full disk encryption with the device and being able to access the internal memory via MTP instead of having a mass storage device. The removable sd card may be accessed via MTP, too, but will not be encrypted. Updating the recovery images to reflect the changes in the storage configuration (in case this is necessary) is not in scope, either.
Cyanogenmod by default only encrypts the /data partition. Newer models emulate the sdcard storage and save the data to /data/media, so everything gets encrypted. However, being an older phone there is still a separate sdcard-partition on the phone which is physically and directly mounted and which will not be touched by encryption.
In order to achieve the goal of full disk encryption two steps are necessary:
1. Change storage configuration to emulated media
2. Shrink old /sdcard partition and grow /data partition
= Change storage configuration to emulated media =
Emulating the sdcard in /data/media instead of physically mounting it directly requires changes to fstab.hardware (fstab.smdk4210), storage_list.xml and init.hardware.rc (init.smdk4210.rc). These files have to be changed in the Cyanogenmod source code and compiled to a new image. The configuration is based on the "Emulated primary, physical secondary" example given in h t t p s : / / source . android . com / devices / storage / config-example.html (cannot properly post URL due to new user restriction).
Here are the relevant changes in init.hardware.rc (init.smdk4210.rc):
Code:
--- init.smdk4210.rc.bak 2015-11-22 23:01:49.259579157 +0000
+++ init.smdk4210.rc.final 2015-11-30 20:21:37.977943177 +0000
@@ -2,35 +2,47 @@
import init.gps.rc
on init
- export EXTERNAL_STORAGE /storage/sdcard0
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
export SECONDARY_STORAGE /storage/sdcard1
- mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
- mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
mkdir /mnt/media_rw/usbdisk0 0700 media_rw media_rw
- mkdir /storage/sdcard0 0770 root root
- mkdir /storage/sdcard1 0770 root root
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+ mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
+ mkdir /storage/sdcard1 0700 root root
+
mkdir /storage/usbdisk0 0770 root root
+ mkdir /storage/sdcard1 0775 system system
+
mkdir /efs 0771 radio system
mkdir /preload 0771 system system
mkdir /mnt 0775 root system
mkdir /mnt/.lfs 0755 root root
# for backwards compatibility
- symlink /storage/sdcard0 /sdcard
- symlink /storage/sdcard0 /mnt/sdcard
- symlink /storage/sdcard1 /extSdCard
- symlink /storage/sdcard1 /mnt/extSdCard
symlink /storage/usbdisk0 /usbdisk0
symlink /storage/usbdisk0 /mnt/usbdisk0
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
+ symlink /storage/sdcard1 /ext_card
+ symlink /storage/sdcard1 /mnt/ext_card
+
+
+
# Disable CFQ slice idle delay
write /sys/block/mmcblk0/queue/iosched/slice_idle 0
on fs
mount_all /fstab.smdk4210
+ setprop ro.crypto.fuse_sdcard true
+
swapon_all /fstab.smdk4210
mkdir /efs/bluetooth
@@ -428,11 +440,10 @@
oneshot
keycodes 114 115 116
-service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
+service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class late_start
- disabled
-service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
+service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
class late_start
disabled
Here are the relevant changes in fstab.hardware (fstab.smdk4210):
Code:
--- fstab.smdk4210.bak 2015-11-29 23:52:30.652913883 +0000
+++ fstab.smdk4210.final 2015-11-30 20:20:23.513945994 +0000
@@ -11,8 +11,8 @@
/dev/block/mmcblk0p12 /preload ext4 noatime,nosuid,nodev,journal_async_commit wait
# vold-managed volumes ("block device" is actually a sysfs devpath)
-/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults wait,voldmanaged=sdcard0:11,nonremovable,noemulatedsd
-/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults wait,voldmanaged=sdcard1:auto,noemulatedsd
+/devices/platform/dw_mmc/mmc_host/mmc0/mmc0* auto auto defaults wait,voldmanaged=sdcard0:11,nonremovable
+/devices/platform/s3c-sdhci.2/mmc_host/mmc1* auto auto defaults wait,voldmanaged=sdcard1:auto
/devices/platform/s3c_otghcd/usb* auto auto defaults voldmanaged=usbdisk0:auto
# recovery
Here are the relevant changes in storage_list.xml:
Code:
--- storage_list.xml.bak2 2015-11-30 21:38:14.565769302 +0000
+++ storage_list.xml.final 2015-11-30 21:43:21.697757684 +0000
@@ -1,16 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<StorageList xmlns:android="h t t p : / / schemas . android . com / apk / res / android "(cannot properly post URL due to new user restriction)>
- <storage android:mountPoint="/storage/sdcard0"
- android:storageDescription="@string/storage_internal"
- android:primary="true"
- android:removable="false"
- android:allowMassStorage="true" />
+ <storage android:storageDescription="@string/storage_internal"
+ android:emulated="true"
+ android:mtpReserve="100" />
<storage android:mountPoint="/storage/sdcard1"
android:storageDescription="@string/storage_sd_card"
- android:primary="false"
android:removable="true"
- android:allowMassStorage="true" />
+ android:maxFileSize="4096" />
<storage android:mountPoint="/storage/usbdisk0"
android:storageDescription="@string/storage_usb"
@@ -18,3 +15,4 @@
android:removable="true" />
</StorageList>
Compile Cyanogenmod and flash your phone. It should boot, but the amount of available storage should be significantly lower as the sdcard is emulated on the /data partition which has not been grown, yet.
= Shrink old /sdcard partition and grow /data partition =
Use PIT Magic to resize the partitions to an appropriate size. For a stock i9100 having 16GB of internal memory my configuration was as follows (according to the backup .pit-file downloaded via heimdall):
Code:
DATAFS:
start: 1,392,640
block count: 4,194,304
end: 5,586,943
UMS:
start: 5,586,944
block count: 24,133,632
end: 29,720,575
Hidden:
start: 29,720,576
block count: 1,048,576
end: 30,769,151
I changed the partition layout to the following sizes:
Code:
DATAFS:
start: 1,392,640
block count: 28,295,167
end: 29,687,807
UMS:
start: 29,687,808
block count: 32,768
end: 29,720,575
Hidden:
start: 29,720,576
block count: 1,048,576
end: 30,769,151
Deleting the UMS or hidden partitions or shrinking the hidden led to Cyanogenmod not booting. Upload the new .pit-file using heimdall and boot the modified Cyanogenmod. Reboot to Cyanogenmod recovery and wipe data. Formatting again using the Cyanogenmod recovery was required as apparently only this recovery honours the "encryptable=footer,length=-16384" option for the /data partition in fstab.hardware which directs the formatting tools to leave 16 kiB of space at the end of the partition for in-place encryption.
Is there a way to achieve emulated SD, without changing source code and recompiling?
Like editing fstab and other config files?
I run CM13 at the moment and would like to achieve full encryption through emulated SD.
I was playing around with the idea that i would resize the sdcard partition to 8mb and resize the /data partition (~14gb), so that applications have a hefty space and i would use the external sdcard (sdcard1) for storing data and media files. Would that be possible to with an emulated sdcard ? I was hoping that with the introduction of Android 6.0 it would allow me to merge (LVM?) the /sdcard0 and /sdcard1 but instead it merges /data and /sdcard1.
fireburner-de said:
Is there a way to achieve emulated SD, without changing source code and recompiling?
Like editing fstab and other config files?
Click to expand...
Click to collapse
I cannot prove that there is no way without having to recompile. However, I couldn't find storage_list.xml in the filesystem on my phone, so I assume that this file is only used during image compilation and therefore it's probably hard/impossible to achieve emulated SD without recompiling.
Maybe this configuration is easier to achieve using Cyanogenmod 13 / Android 6 as the storage_list.xml resource overlay has been removed.
PelzigesOhr, thank you sharing and documenting your experience so well, it has inspired me to try the same on Replicant 4.2 (distro based on CyanogenMod 10).
https:// github . com / GrimKriegor / replicant42-device_samsung_galaxys2-common / commit / 84c5a91a45b059a147921d0ea32367534904b314
However it seems the best way to create a partition table is using PitMagic, which seems to be proprietary software. Would you consider sharing your PIT file please?
Thank you for your time, all of this is greatly appreciated!
EDIT:
If you still have memory of the heimdall parameters used to flash this partition table, please do share as well.
EDIT2:
Managed to create a PIT file similar to yours, thanks for documenting it.
The following thread also includes a patch compatible with Replicant/Android 4.2.
Best of luck!
redmine . replicant . us / boards / 39 / topics / 13707
GrimKriegor said:
Would you consider sharing your PIT file please?
Thank you for your time, all of this is greatly appreciated!
EDIT:
If you still have memory of the heimdall parameters used to flash this partition table, please do share as well.
EDIT2:
Managed to create a PIT file similar to yours, thanks for documenting it.
The following thread also includes a patch compatible with Replicant/Android 4.2.
Click to expand...
Click to collapse
Thanks for the praise, I'm happy that the instructions are of use to someone else. Good to know that you managed everything yourself, I'll answer anyway: This forum doesn't seem to support attachments, so I haven't attached the .pit-file. Feeding the parameters I provided to PIT Magic should yield a good result, though. PIT Magic is indeed a proprietary Windows binary, but it runs fine using wine (at least that's the way I use it).
All the flashing has been done by loading clockworkmodrecovery (
Code:
heimdall flash --KERNEL clockworkmodrecovery.6050.i9100.touch.img
) and afterwards sideloading the compiled ROM.
PelzigesOhr said:
Thanks for the praise, I'm happy that the instructions are of use to someone else. Good to know that you managed everything yourself, I'll answer anyway: This forum doesn't seem to support attachments, so I haven't attached the .pit-file. Feeding the parameters I provided to PIT Magic should yield a good result, though. PIT Magic is indeed a proprietary Windows binary, but it runs fine using wine (at least that's the way I use it).
All the flashing has been done by loading clockworkmodrecovery (
Code:
heimdall flash --KERNEL clockworkmodrecovery.6050.i9100.touch.img
) and afterwards sideloading the compiled ROM.
Click to expand...
Click to collapse
Thanks for the reply sir.
Which partitions did you upload via Heimdall when you flashed the PIT file? I believe repartitioning could delete the contents of important partitions such as BOOT and MODEM, but I am unsure. Do you think maintaining their block boundaries would preserve the data in the respective partitions?
guy i can't mount /storage/sdcard0
i use Cyanogenmod 12.1 android 5.1.1
i need help guy
GrimKriegor said:
Which partitions did you upload via Heimdall when you flashed the PIT file? I believe repartitioning could delete the contents of important partitions such as BOOT and MODEM, but I am unsure. Do you think maintaining their block boundaries would preserve the data in the respective partitions?
Click to expand...
Click to collapse
The exact command I used for repartitioning with Heimdall-1.3.1 was as follows:
Code:
heimdall flash --repartition --pit <filename>
Data should be preserved and if you don't mess with the boundaries of partitions other than DATAFS, UMS and HIDDEN you should be fine. Before repartitioning I backed up all partitions as a precautionary measure, but I didn't have to restore any of them. See also http://forum.xda-developers.com/galaxy-s2/orig-development/guide-enlarge-datafs-partition-rid-t2353551
PelzigesOhr said:
The exact command I used for repartitioning with Heimdall-1.3.1 was as follows:
Code:
heimdall flash --repartition --pit <filename>
Data should be preserved and if you don't mess with the boundaries of partitions other than DATAFS, UMS and HIDDEN you should be fine. Before repartitioning I backed up all partitions as a precautionary measure, but I didn't have to restore any of them. See also http://forum.xda-developers.com/galaxy-s2/orig-development/guide-enlarge-datafs-partition-rid-t2353551
Click to expand...
Click to collapse
Ah! This is excellent, thanks for clarifying this! Just one last question if I may, how did you backup the partitions? Did you use Heimdall to download their contents as image files, did you use DD or maybe even ADB?
Thank you for your time!
GrimKriegor said:
Just one last question if I may, how did you backup the partitions? Did you use Heimdall to download their contents as image files, did you use DD or maybe even ADB?
Click to expand...
Click to collapse
Good guess, I used dd and adb. Get a shell on the phone with adb and dump the partitions to files using dd:
Code:
dd if=/dev/block/mmcblk0pX of=/sdcard/mmcblk0pX.bin bs=512
And then copy the files to your computer using adb pull. You may want to get the mountpoints of the partitions (e.g. using mount) so that you can associate them easily.
Read here for an easy way to switch to emulated storage. Thanks to @Lanchon
https://forum.xda-developers.com/galaxy-s2/orig-development/mod-switch-emulated-to-emulated-t3539651
System permissions corrupt? Backup: "createTarFork() process ended with ERROR: 255"
Hi,
OxygenOS 5.1.7
Rooted
TWRP 322-x blu_spark 8.81
Recently I did a backup (let's call this #1) -> factory reset -> backup (#2) -> restored backup #1 -> restored backup #2.
Doing this, it seems like some permissions somewhere now is broken since I have several random problems.
These problem include the following:
Error trying to backup with blu_spark
Can't upgrade to new oxygen OS
Can't apply ad blocking with AdAway
Some apps, mostly Messenger, randomly crashes
Backup problem with blu_spark:
Getting error "createTarFork() process ended with ERROR: 255". I've read a lot about it on different forums and seems to be related to some parallel apps and user 999. I did have a user called "999" and have deleted it, but problem still occurs. I've also verified there are no folders as below:
data/system/999
data/system_ce/999
data/misc/999
data/misc_ce/999
data/user/999
data/user_ce/999
I've also deleted all apps that has "parallel apps" support.
Code snippet below:
Code:
Starting TWRP 3.2.2-x | blu_spark v8.81-bfb65573 on Tue Jul 20 08:10:34 1971
(pid 567)
...(deleted a lot of text)...
I:Unmounting main partitions...
tw_get_context got selinux context: u:object_r:media_rw_data_file:s0
I:Got default contexts and file mode for storage files.
I:Decrypt adopted storage starting
I:PageManager::LoadFileToBuffer loading filename: '/data/system/storage.xml' directly
I:No /data/system/storage.xml for adopted storage
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:operation_end - status=0
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Switching packages (TWRP)
I:Attempt to load settings from settings file...
I:InfoManager loading from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
__bionic_open_tzdata: couldn't find any tzdata when looking for CET-1CEST,M3.5.0,M10.5.0!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:PageManager::LoadFileToBuffer loading filename: '/twres/languages/en.xml' directly
parsing languageFile
parsing languageFile done
I:Translating partition display names
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:TWFunc::Fixup_Time: Pre-fix date and time: 1971-07-20--10-11-05
I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch
I:TWFunc::Fixup_Time: will attempt to use the ats files now.
I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 1498643804722
I:TWFunc::Fixup_Time: Date and time corrected: 2019-01-14--19-07-49
I:Starting MTP
I:Cannot find file /sys/class/android_usb/android0/idVendor
I:Cannot find file /sys/class/android_usb/android0/idProduct
I:sending message to add 65537 '/data/media/0' 'Internal Storage'
I:[MTP] Starting MTP
I:Message sent, add storage ID: 65537 '/data/media/0'
MTP Enabled
I:Check_Lifetime_Writes result: '7356'
I:Switching packages (TWRP)
I:Starting Adb Backup FIFO
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:[MTP] created new mtpserver object
I:[MTP] MtpServer::run fd: 20
I:[MTP] mtppipe add storage 65537 '/data/media/0'
I:[MTP] MtpStorage id: 65537 path: /data/media/0
I:Set page: 'backup'
I:Set page: 'backup_run'
I:operation_start: 'Nandroid'
Updating partition details...
I:Data backup size is 9614MB, free: 31257MB.
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
...done
I:Backup Name is: '2019-01-14--19-08-03'
I:Backup_Folder is: '/data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03'
I:Calculating backup details...
* Total number of partitions to back up: 7
* Total size of all data: 13888MB
* Available space: 31257MB
[BACKUP STARTED]
* Backup Folder: /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03
Backing up Boot...
I:Reading '/dev/block/sde19', writing '/data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/boot.emmc.win'
I:Restored default metadata for /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/boot.emmc.win
* Generating digest...
I:SHA2 Digest: c7b789bb0103f1e4d0fec64f50d160a9a98f5398aee157a10ec762392a93d9b1 boot.emmc.win
I:digest_filename: /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/boot.emmc.win.sha2
* Digest Created.
I:Partition Backup time: 0
Invalid encryption mode 'ice:aes-256-cts'
Backing up System...
Invalid encryption mode 'ice:aes-256-cts'
Error opening: '/system/app/Account/oat/arm64' (Not a directory)
I:Error in Generate_TarList!
Error creating backup.
I:InfoManager saving '/data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/system.info'
createTarFork() process ended with ERROR: 255
Backup Failed. Cleaning Backup Folder.
I:Copying file /tmp/recovery.log to /data/media/0/TWRP/BACKUPS/4f495385/2019-01-14--19-08-03/recovery.log
I:Set page: 'action_complete'
I:operation_end - status=1
I:Set overlay: 'slideout'
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'backup'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'advanced'
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Can't upgrade to new oxygen OS:
Trying to update with Oxygen Updater gives me the below error. Backup before install = turned off. This is from auto install, manual also fails.
Code:
Starting TWRP 3.2.2-x | blu_spark v8.81-bfb65573 on Wed Jul 21 09:53:16 1971
(pid 562)
...(deleted a lot of text)...
I:Copying file /cache/recovery/log to /cache/recovery/last_log
tw_get_context got selinux context: u:object_r:media_rw_data_file:s0
I:Got default contexts and file mode for storage files.
I:Attempt to load settings from settings file...
I:InfoManager loading from '/data/media/0/TWRP/.twrps'.
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:Copying file /etc/recovery.fstab to /cache/recovery/recovery.fstab
I:Version number saved to '/cache/recovery/.version'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
__bionic_open_tzdata: couldn't find any tzdata when looking for CET-1CEST,M3.5.0,M10.5.0!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
I:TWFunc::Set_Brightness: Setting brightness control to 255
I:PageManager::LoadFileToBuffer loading filename: '/twres/languages/en.xml' directly
parsing languageFile
parsing languageFile done
I:Translating partition display names
I:Backup folder set to '/data/media/0/TWRP/BACKUPS/4f495385'
I:TWFunc::Fixup_Time: Pre-fix date and time: 1971-07-21--11-53-27
I:TWFunc::Fixup_Time: Setting time offset from file /sys/class/rtc/rtc0/since_epoch
I:TWFunc::Fixup_Time: will attempt to use the ats files now.
I:TWFunc::Fixup_Time: Setting time offset from file /data/time/ats_2, offset 1498643804161
I:TWFunc::Fixup_Time: Date and time corrected: 2019-01-15--20-50-10
I:Switching packages (TWRP)
I:Set page: 'action_page'
I:operation_start: 'OpenRecoveryScript'
I:Script file found: '/cache/recovery/openrecoveryscript'
I:Copying file /cache/recovery/openrecoveryscript to /tmp/openrecoveryscript
Running OpenRecoveryScript
I:command is: 'cmd'
I:value is: 'echo " -------------------------"'
-------------------------
I:echo " -------------------------" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "| (↑) OXYGEN UPDATER |"'
| (↑) OXYGEN UPDATER |
I:echo "| (↑) OXYGEN UPDATER |" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "| Update Installer** |"'
| Update Installer** |
I:echo "| Update Installer** |" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo " -------------------------"'
-------------------------
I:echo " -------------------------" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo '
I:echo process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "Thank you for using Oxygen Updater. If you like this app, please rate it 5 stars at Google Play :)"'
Thank you for using Oxygen Updater. If you like this app, please rate it 5 stars at Google Play :)
I:echo "Thank you for using Oxygen Updater. If you like this app, please rate it 5 stars at Google Play :)" process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo '
I:echo process ended with RC=0
I:command is: 'cmd'
I:value is: 'echo "Installing the update…"'
Installing the update…
I:echo "Installing the update…" process ended with RC=0
I:command is: 'install'
I:value is: '/storage/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Unable to mount '/usb_otg'
I:Actual block device: '', current file system: 'vfat'
I:Trying to find zip '/storage/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip' on '/data/media/0'...
I:Looking for zip at '/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/data/media/0/emulated/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/data/media/0/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
I:Looking for zip at '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Installing zip file '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Installing zip file '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Checking for Digest file...
Skipping Digest check: no Digest file found
I:Update binary zip
Verifying package compatibility...
Failed to verify package compatibility (result 1): Device manifest and framework compatibility matrix are incompatible: HALs incompatible. android.hardware.drm
E:String resource 'zip_compatible_err' not found. Using default value.
Zip Treble compatibility error!
Invalid zip file format!
Error installing zip file '/data/media/0/OnePlus5Oxygen_23_OTA_042_all_1812232102_a034988b.zip'
Done processing script file
I:Set page: 'action_complete'
I:operation_end - status=1
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Starting MTP
I:Cannot find file /sys/class/android_usb/android0/idVendor
I:Cannot find file /sys/class/android_usb/android0/idProduct
I:sending message to add 65537 '/data/media/0' 'Internal Storage'
I:[MTP] Starting MTP
I:Message sent, add storage ID: 65537 '/data/media/0'
MTP Enabled
I:Check_Lifetime_Writes result: '9128'
I:Switching packages (TWRP)
I:Starting Adb Backup FIFO
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:[MTP] created new mtpserver object
I:[MTP] MtpServer::run fd: 20
I:[MTP] mtppipe add storage 65537 '/data/media/0'
I:[MTP] MtpStorage id: 65537 path: /data/media/0
I:Set page: 'advanced'
I:Set overlay: 'slideout'
I:Set overlay: ''
I:Set page: 'copylog'
I:Set page: 'action_page'
I:operation_start: 'Copy Log'
I:Copying file /tmp/recovery.log to /data/media/0/recovery.log
Can't apply ad blocking with AdAway:
Getting error: "Applying failed. Try changing the target hosts file in preferences to data/data/hosts". It's currently set to system/etc/hosts, but data/data gives the same error.
Some apps, mostly Messenger, randomly crashes:
Can't give so much details about this, but several apps crashes all the time. Messenger (facebook chat) is most common and can't use it anymore, however "Lite" works well.
I've tried factory reset, but the problem still is exactly the same.
Any ideas to what could be causing this? I would guess there is some permission error to data/system folder, but at least data folder should be fixed when doing a factory reset I thought?
Any ideas would be much appreciated. Thanks.