Question Extracting super.img - Samsung Galaxy S22 Ultra

I tried using lpunpack as suggested in Extract super.img.lz4 but once it unpacked the partitions to the output directory i was not able to open the images as archives.
Could anyone explain why this is happening?

Hey please Try Crb v14.
Link:-https://forum.xda-developers.com/t/tool-windows-kitchen-crb-v3-0-0-beta14.3947779/

nilsha said:
Hey please Try Crb v14.
Link:-https://forum.xda-developers.com/t/tool-windows-kitchen-crb-v3-0-0-beta14.3947779/
Click to expand...
Click to collapse
Since it is based out of imjtool & lpunpack it is not working.

Bump

73sla said:
I tried using lpunpack as suggested in Extract super.img.lz4 but once it unpacked the partitions to the output directory i was not able to open the images as archives.
Could anyone explain why this is happening?
Click to expand...
Click to collapse
I think they are in sparse format and you need to convert them (I think the tool is called simg2img)

73sla said:
I tried using lpunpack as suggested in Extract super.img.lz4 but once it unpacked the partitions to the output directory i was not able to open the images as archives.
Could anyone explain why this is happening?
Click to expand...
Click to collapse
Now system.img vendor.img etc are f2fs and at present most common kitchen/Tools doesnt mount it. You may try Fedora linux to mount to extrcat it, someone reported it is working.

dr.ketan said:
Now system.img vendor.img etc are f2fs and at present most common kitchen/Tools doesnt mount it. You may try Fedora linux to mount to extrcat it, someone reported it is working.
Click to expand...
Click to collapse
I tried mounting in Ubuntu without success, not sure if it's different in fedora

Using partitions backup app to backup super.img, is this super.img useful?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

donkeyman1234 said:
Using partitions backup app to backup super.img, is this super.img useful?
Click to expand...
Click to collapse
Nope, it will be same like one packed in stock firmware.

dr.ketan said:
Nope, it will be same like one packed in stock firmware.
Click to expand...
Click to collapse
I see.

Bump as I still need a Windows-based solution.

The 6 imgs obtained after decompressing the super.img of S22 cannot be decompressed
Extracting system.img with Python ...
Traceback (most recent call last):
ext4.MagicError: Invalid magic value in superblock: 0x0002 (expected 0xEF53)
unbutu can not mount system.img too

which tools extract contents of system.img

Bump

Hi guys, I successfully extracted super.img using SuperR's Kitchen on linux. Good luck!

I have now unpacked the boot.img. Took me some time to figure out what Sammy had done.
Haven't done this sine my S9 and a lot has changed. Unpacking the .lz4 file was no problem, giving me a boot.img, which could not be extracted using any of my current tools...
But since I work in Linux, everything is possible.
I have some special tools installed, making it possible to run Android executables in Ubuntu tetminal. So I used Sammys own Android unpack boot image command. This gave me an unpacked boot image and a ram disk.
Again things has changed, RAMDISK is no longer packed like I used to see it, I had to unpack it with a Linux cpio command.
After all this work, just to find out that RAMDISK is more or less empty, only containing the init file, a short txt file and some empty folders.
But this work was required for me before I can build a custom kernel. Because things need to packed same way again.
Regards DeHAWK
Edit: Seems like sammy is f*cking with us. Why is the SamMobile firmware 8GB...they have done something strage and I'm about to find out. Take an example; a lz4 file is 365Kb packed, but unpacked its 8MB, don't make sense. Look at the end of the lz4 packed file.
Regards DeHAWK

SkylinesHD said:
Hi guys, I successfully extracted super.img using SuperR's Kitchen on linux. Good luck!
Click to expand...
Click to collapse
have you been able to get bin files from a vendor.img that uses f2fs as file system?

1. unpack S22's super.img ,your will get 6 imgs
2.copy system.img to your s22 phone /sdcard
3.adb shell su
4.mount -o loop /sdcard/system.img /sdcard/tmp
then you can cd /sdcard/tmp ,ls -l find all files!

tomatolei said:
1. unpack S22's super.img ,your will get 6 imgs
2.copy system.img to your s22 phone /sdcard
3.adb shell su
4.mount -o loop /sdcard/system.img /sdcard/tmp
then you can cd /sdcard/tmp ,ls -l find all files!
Click to expand...
Click to collapse
mount: bad /etc/fstab: No such file or directory
when trying the mount command

E:\tar>adb shell
b0q:/ $ su
b0q:/ # mkdir /sdcard/tmp
b0q:/ # mount -o loop /sdcard/vendor.img /sdcard/tmp
'/dev/block/loop34' is read-only
b0q:/ # cd /sdcard/tmp
b0q:/sdcard/tmp # ls -l
total 28772
drwxr-xr-x 2 root shell 4096 2021-01-01 08:00 apex
drwxr-xr-x 7 root shell 4096 2021-01-01 08:00 app
drwxr-x--x 4 root shell 20480 2021-01-01 08:00 bin
drwxr-xr-x 2 root shell 4096 2021-01-01 08:00 bt_firmware
-rw------- 1 root root 14406 2021-01-01 08:00 build.prop
drwxr-xr-x 2 root shell 4096 2021-01-01 08:00 dsp
drwxr-xr-x 40 root shell 8192 2021-01-01 08:00 etc
drwxr-xr-x 6 root shell 8192 2021-01-01 08:00 firmware
drwxr-xr-x 2 root shell 4096 2021-01-01 08:00 firmware-modem
drwxr-xr-x 2 root shell 4096 2021-01-01 08:00 firmware_mnt
drwxr-xr-x 3 root shell 4096 2021-01-01 08:00 gpu
drwxr-xr-x 10 root shell 118784 2021-01-01 08:00 lib
drwxr-xr-x 8 root shell 118784 2021-01-01 08:00 lib64
lrw-r--r-- 1 root root 4 2021-01-01 08:00 odm -> /odm
drwxr-xr-x 3 root shell 4096 2021-01-01 08:00 odm_dlkm
drwxr-xr-x 8 root shell 4096 2021-01-01 08:00 overlay
-rw-r--r-- 1 root root 29118684 2021-01-01 08:00 recovery-from-boot.p
drwxr-xr-x 5 root shell 4096 2021-01-01 08:00 rfs
drwxr-xr-x 6 root shell 4096 2021-01-01 08:00 saiv
-rw-r--r-- 1 root root 39446 2021-01-01 08:00 ueventd.rc
drwxr-xr-x 3 root shell 4096 2021-01-01 08:00 usr
drwxr-xr-x 2 root shell 4096 2021-01-01 08:00 vm-system

Related

[DEV] Unofficial Cyanogenmod 7 for Lenovo Ideapad A1

Cyanogenmod 7 for the Lenovo Ideapad A1, by Milaq and myself.
BEFORE YOU BEGIN
You should install the modified bootloader that allows you to get into fastboot mode if necessary. This is because there is only one kernel on the A1, and if the kernel causes problems (unlikely, but it's better save yourself the risk) you won't be able to boot normally or into recovery. Being able to boot into fastboot mode gives you a way out of this by allowing you to flash a kernel through usb with the fastboot command. See this post: http://forum.xda-developers.com/showpost.php?p=25186171&postcount=120
Simple installation guide
David Artiss has written a beginners' guide that walks you through the process of installing CM7 starting from the stock system. Get to it here:
http://www.artiss.co.uk/2012/04/installing-cyanogenmod-on-a-lenovo-ideapad-a1
Syncing and building it:
Clone the Cyanogenmod repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Then add the local manifest:
Code:
git clone https://github.com/milaq/android.git local-android
cd local-android
git checkout gingerbread
cd ..
cp local-android/local_manifest.xml android/.repo
They sync the repo, get rom manager, and build:
Code:
cd android
repo sync
./vendor/cyanogen/get-rommanager
source build/envsetup.sh && brunch A1_07
What works:
Graphics HW acceleration
Touchscreen
Buttons (vol, power, menu, back, home)
Removable SD card
Audio
Accelerometer
Wifi (see caveat below)
Bluetooth
Vibration
Internal SD card
Front and back camera for still images, video recording from back camera
GPS
HW accelerated decoding (h.264 etc)
Issues
No 3G on the 3G versions.
Video recording from the front camera
Accelerometer switch not working
Market gives phone layout instead of tablet layout after update
Modified partition layout used with CWM 5.0.2.8 seems to prevent the internal SD card mounting.
GPS Time from android.location.Location.getTime() is wrong (1 day ahead?).
DSPManager sometimes crashes when headphones are inserted.
Bluetooth file transfer doesn't work, but Bluetooth HID seems to work.
IRC Channel
#ideapad-a1 on irc.freenode.net.
Recent logs at http://shron.de/irclogs/ideapad-a1.log
Some older logs at http://shron.de/ideapad-a1.log
Download page
Nightly builds, built by Milaq and hosted by goo.im:
http://goo.im/devs/milaq/a107/cm-7
Acknowledgments
Many thanks to:
Milaq - fixing loads of things: Camera, GPS, vibration, autobrightness, cpu responsiveness, scrolling performance, wifi geolocation, disabling background blur, hiding phone signal by default, density fixes, etc, etc, ...
SpiegelEiXXL - many discussions and thoughts, setting up nightly builds, hosting nightly builds.
Pati- for spotting how to prevent the reboots and internal SD card fixes.
Templis - Channel logs
Collaboration
Please feel free to discuss this porting effort here, point out errors, fork the repositories, submit patches/pull requests etc!
Latest updates:
18 Feb: Nightly downloads added. Please follow the commit log on Github for further details of updates: https://github.com/gmarkall/android_device_ideapad_a1/commits/gingerbread
12 Feb: Fixed the 5:43 reboot issue, wifi (sort of), and accelerometer. New version on download page.
17 Jan: Got it booting, added download page.
15 Jan: Made some very hacky changes that allow an otapackage to be built.
14 Jan: Tried flashing it - so far not quite booting as far as the home screen, but does get to the boot screen.
13 Jan: I had the wrong size for the system partition, which was causing make_ext4fs to fail. This is now corrected, and the build finishes.
13 Jan: I created an IRC channel for discussion of Clockworkmod, Cyanogenmod and development on the A1. It is #ideapad-a1 on irc.freenode.net.
12 Jan: I've added a few more bits and bobs to the build - in particular editing BoardConfig.mk to include settings for building libaudio.so, using the camera stub for the time being, bluetooth settings, etc. Also added some missing files: /etc/media_profiles.xml and vold.a1.fstab, overlay.omap3.so.
11 Jan: added a script that pulls the proprietary libraries off the device and creates a vendor/lenovo/a1 folder for them.
I have a 16GB Lenovo A1 and am more than happy to help out with any testing you need with CM7!
Just drop me a PM if you want any private testing done or I will test out the moment you post a Rom here to flash.
Thanks, Charlie.
awesome! did you already try to flash and run it?
BuzzyB said:
awesome! did you already try to flash and run it?
Click to expand...
Click to collapse
Not yet. At the moment the build system doesn't quite work for making a flashable zip suitable for the ideapad. I want to get the build system to make the update.zips without any manual intervention, rather than just putting one together by hand - otherwise it will be a pain every time I change something to have to manually make a new update.zip.
BuzzyB said:
awesome! did you already try to flash and run it?
Click to expand...
Click to collapse
I tried flashing it - I'm not quite getting as far as the home screen in booting yet, but it's a start:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
nice teaser
Awesome!!!
Simply wonderful!
Update
something new...
:sehorn:
Cool beans!
So with the latest version I have, after bootup there's some problems with dalvik-cache.
The files in /cache/dalvik-cache and their permissions are:
Code:
# ls -l
-rw-r--r-- 1 system system 850744 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 57112 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 232920 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 27960 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 root root 266000 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 system system 194352 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 13880 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 root root 778656 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 system system 7448 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 root root 24128 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 root root 4798600 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 root root 1391096 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 root root 8087736 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 system system 6816 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 4504 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 61616 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 89720 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 28496 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 root root 1638216 Jan 16 23:36 [email protected]@[email protected]
-rw-r--r-- 1 system system 147728 Aug 1 2008 [email protected]@[email protected]
-rw-r--r-- 1 system system 8496 Aug 1 2008 [email protected]@[email protected]
Logcat is at: http://www.doc.ic.ac.uk/~grm08/ideapad/cm7-a1-logcat-jan-17.txt
Any suggestions?
Did you try to chmod 777 /cache/dalvik-cache
Just for testing it?
OTA use data/dalvik-cache and have the same File right like you do.
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
---------- Post added at 09:47 PM ---------- Previous post was at 09:35 PM ----------
What rights have your /cache/dalvik-cache Folder?
It schould have 771
But i think that /cache have only 770
xbdesign said:
Did you try to chmod 777 /cache/dalvik-cache
Just for testing it?
Click to expand...
Click to collapse
I did try that, but it didn't make any difference unfortunately.
So what rights you have now for that Folder (after/at boot)?
xbdesign said:
So what rights you have now for that Folder (after/at boot)?
Click to expand...
Click to collapse
Code:
# ls -l
drwxrwx--x 2 system system 3072 Jan 17 21:02 dalvik-cache
I just noticed that it's only things that run as app_XX that have a problem opening /cache/dalvik-cache/[email protected]@ ...
Things that run as system, e.g. com.android.settings, don't seem to have a problem.
I feel like I'm missing something obvious now!
Right,
all Positions that have root have a Problem
-rw-r--r-- 1 root root
On STOCK ROM there are no Files that have one root root.
They are all having
system system
or
system app_<AppNr>
or
system radio
xbdesign said:
Right,
all Positions that have root have a Problem
-rw-r--r-- 1 root root
Click to expand...
Click to collapse
What is the problem? Those are the same permissions as on my CM7 Desire which doesn't have this issue.
No Problem.
Just wondering why every one of them giving an Error.
I have no working CM7 to compare it to.
---------- Post added at 10:59 PM ---------- Previous post was at 10:52 PM ----------
Are you at stage where you can Wipe dalvik-cache, or it is hapening by building/restoring it?

[Q] Not possible to create a symlink in /mnt/sdcard?

Hi,
Is there a way to create a symling in /mnt/sdcard (I want to point to a folder of the microSD)?
Each time I try (several times since yesterday evening...), I receive the message "Function not implemented"...
Example (/data/sdext2 is an EXT2 partition on my microSD) :
Code:
ln -s /data/sdext2/test /mnt/sdcard/Android/data/test
The usage of mount -o bind doesn't work for what I want to do
Thanks in advance for your help!
Regards.
First question of all: Are you rooted? If not, root first.
If you are rooted and using shell inside the TF, be sure you do "su" before entering any command to grant root privileges (you should have the # prompt instead of $).
Aside from that, it should work... If is still giving you trouble please post the entire log for that session (just copy paste what you've entered in the console), so we can help you better.
Hi,
First of all, thanks for your answer!
My TF is rooted and I use Revolver 3.11.
There are 2 partitions on my micro sd :
1) 8 GB - FAT32 - Primary
2) 22 GB - EXT2 - Primary
The second partition is mounted on /data/sdext2 (mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2).
Here are the commands :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
su
mount -o remount,rw /
cp -pr /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld /data/sdext2/com.triactivemedia.radiocontrolrotorworld
rm -r /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
ln -s /data/sdext2/com.triactivemedia.radiocontrolrotorworld /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
busybox ln -s /data/sdext2/com.triactivemedia.radiocontrolrotorworld /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
Thanks in advance for your help!
Regards
Fat32 doesn't support symbolic links. You would need to use a couple of ext* or linux FS's.
Hi.
Thanks for the answer.
The second partition (/data/sdext2) is an EXT2 partition. So it seems it's not the issue...
Regards.
Sent from my HTC Sensation Z710e using Tapatalk
/mnt/sdcard is a fuse shim around /data/media. Crest your symlink there.
ln -s /Removable/MicroSD/folder /data/media/folder
Should generally work for most people, depending how how custom your tf is or in your case the card
Sent from my Transformer Prime TF201 using Tapatalk
Hi Spidey01!
Thanks a lot for your precious help!
You are right, I was able to create the symlink using :
ln -s /data/sdext2/Android/data/com.triactivemedia.radiocontrolrotorworld/ /data/media/Android/data/com.triactivemedia.radiocontrolrotorworld
If I go to /data/media/Android/data, everything is fine (see ls and ls -l here after) :
/data/media/Android/data # ls
com.google.android.apps.maps
com.google.android.gallery3d
com.google.android.music
com.google.android.videos
com.triactivemedia.modelhelicopterworld
com.triactivemedia.radiocontrolrotorworld
com.zinio.mobile.android.reader
/data/media/Android/data # ls -l
drwxrwxr-x media_rw media_rw 2012-01-10 15:31 com.google.android.apps.maps
drwxrwxr-x media_rw media_rw 2012-01-10 15:06 com.google.android.gallery3d
drwxrwxr-x media_rw media_rw 2012-01-10 14:57 com.google.android.music
drwxrwxr-x media_rw media_rw 2012-01-10 14:56 com.google.android.videos
drwxrwxr-x media_rw media_rw 2012-01-11 11:45 com.triactivemedia.modelhelicopterworld
lrwxrwxrwx root shell 2012-01-13 23:01 com.triactivemedia.radiocontrolrotorworld -> /data/sdext2/Android/data/com.triactivemedia.radiocontrolrotorworld/
drwxrwxr-x media_rw media_rw 2012-01-11 11:15 com.zinio.mobile.android.reader
If I go to /mnt/sdcard/Android/data, I see the link when I make a ls but not when I make a ls -l :
/mnt/sdcard/Android/data # ls
com.google.android.apps.maps
com.google.android.gallery3d
com.google.android.music
com.google.android.videos
com.triactivemedia.modelhelicopterworld
com.triactivemedia.radiocontrolrotorworld
com.zinio.mobile.android.reader
/mnt/sdcard/Android/data # ls -l
drwxrwxr-x root sdcard_rw 2012-01-10 15:31 com.google.android.apps.maps
drwxrwxr-x root sdcard_rw 2012-01-10 15:06 com.google.android.gallery3d
drwxrwxr-x root sdcard_rw 2012-01-10 14:57 com.google.android.music
drwxrwxr-x root sdcard_rw 2012-01-10 14:56 com.google.android.videos
drwxrwxr-x root sdcard_rw 2012-01-11 11:45 com.triactivemedia.modelhelicopterworld
drwxrwxr-x root sdcard_rw 2012-01-11 11:15 com.zinio.mobile.android.reader
Do you have another idea? Or should we admit that we can't use symlink with Fuse?
Thanks!!!
I am after this as well, have you managed to get it working?
I managed to symlink to /data/media/0 and file manager sees it there, but if I go to /sdcard there's nothing either.
Isn't there a way to edit fstab to get /sdcard to mount as ext4, instead of fuse? Because all my systems are Linux, I wouldn't have trouble mounting my Tablet over my laptop (even more because I only do wireless connections via ssh)
Sent from PomPoko [TF101G] using TapaTalkHD
This is how I did it.
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
frefol123 said:
This is how I did it.
Code:
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
Click to expand...
Click to collapse
I got the idea, but for what I need bind won't work
I want to symlink, e.g., a download folder from extsd in place of /sdcard/Download.
Bind only mounts the actual devices, subfolders won't work AFAIK
Sent from PomPoko [TF101G] using TapaTalkHD
leomeloxp said:
I got the idea, but for what I need bind won't work
I want to symlink, e.g., a download folder from extsd in place of /sdcard/Download.
Bind only mounts the actual devices, subfolders won't work AFAIK
Sent from PomPoko [TF101G] using TapaTalkHD
Click to expand...
Click to collapse
I just tried mount -o bind /Removable/MicroSD/Download /mnt/sdcard/extsd and it worked just fine, unless that is not what you meant.
Edit: nevermind, I just realized that you wanted to redirected the /sdcard/download folder to the micro sd.
The adroid app "FolderMount" will accomplish this and does so quite well. If you need to do mounts (links) outside of the internal and external sdcard folders, you will need to donate (inside the app; $2) and then use the option to uncheck destination folder checks. This app works really well for any data that isnt needed right at startup.
insanelycool said:
The adroid app "FolderMount" will accomplish this and does so quite well.
Click to expand...
Click to collapse
Thanks, but that looks like it requires root. If I had root, I would have already fixed this myself.
[Q] Can't create symlinks on sdcard0...
Running latest Carbon ROM, rooted.
I'm trying to link my /storage/sdcard0/Pictures/Screenshots into /storage/sdcard0/DCIM so Google+ will pickup and upload screenshots automatically.
I've fired up the Terminal Emulator, su'd no problem so prompt is a #.
cd /storage/sdcard0/DCIM works fine c/l prompt showing new path, pwd shows the same.
ln -s /storage/sdcard0/Pictures/Screenshots Screenshots
Gives the message: link failed Operation not permitted.
Obviously not a FAT32 issue as sdcard0 is the internal one so I assume EXT32...
Tried ln -sf... still nothing.
Any ideas?
Salut all!
I have android 4.2.2 with all user stuff stored in /data/media/0 (internal SD)
and clockworkmod backup hidden within /data/media/clockworkmod (id est it's not visible unless i navigate outside my SD with a help of some root explorer). But that's not an issue.
The issue is that I use PC based backup with Samba fileshare on smartphone and FreeFileSync running on Windows PC.
And Windows PC cannot access anything outside phone SD, so clockworkmod backups are out of syncing.
I suppose that linking /data/media/clockworkmod to /data/media/0/clockworkmod would make rom backups accessible from PC. Yeah?
So the main question is
What directories are actual and real?
I have
1) /data/media/0/
2) /mnt/shell/emulated/0/
3) /storage/emulated/0/
4) /storage/emulated/legacy/
And I cannot understand which of these is THE original one to operate with.
I would not want to create links on links on links on links...
Thank you!
chasman said:
Running latest Carbon ROM, rooted.
I'm trying to link my /storage/sdcard0/Pictures/Screenshots into /storage/sdcard0/DCIM so Google+ will pickup and upload screenshots automatically.
I've fired up the Terminal Emulator, su'd no problem so prompt is a #.
cd /storage/sdcard0/DCIM works fine c/l prompt showing new path, pwd shows the same.
ln -s /storage/sdcard0/Pictures/Screenshots Screenshots
Gives the message: link failed Operation not permitted.
Obviously not a FAT32 issue as sdcard0 is the internal one so I assume EXT32...
Tried ln -sf... still nothing.
Any ideas?
Click to expand...
Click to collapse
This is almost exactly what I want to do and I'm having the same problem. I want to get a symlink from /storage/sdcard0/DCIM/Studio to /storage/sdcard0/Studio, because a picture editing app I use stores the images it creates in /storage/sdcard0/Studio, and I want them to be synced to "the cloud" with my DCIM folder. I've tried the same steps as chasman, and gotten the same result.
May I ask a few questions regarding symlinks?
I'm thinking of solving a problem (wrote about it here) I have of sending multiple files that have the same name but aren't allowed to be renamed (which can cause issues) , by using symlinks to them (that will have unique names).
1. Will this solution work?
2. If this should work, would it require root, even if the path is public for all?
3. If it should work, what should be the exact command?
4. Is there anything I should know about this method?
5. Is there an official API on Android for symlinks?
6. Can it work on any device?
So I was able to create a symlink to external sdcard on LG g3 running rooted stock kit Kat Rom. I successfully changed Groove's (formerly xboxmusic) offline storage to external sdcard.
The following command was successful in creating a link, but Groove was unable to download music to the directory presumably due to permissions on /many
su
cp -rp /data/media/0/Android/data/com.microsoft.xboxmusic /storage/external_sd
rm -r /data/media/0/Android/data/com.microsoft.xboxmusic
ln -s /mnt/media_rw/external_sd/com.microsoft.xboxmusic/ /data/media/0/Android/data
After these commands, Groove was producing errors stating that there was not enough disk space. As said before, I believe this was due to it's lack of permissions to /mnt
Replacing the last command with the following worked and offline music is now downloaded to external sd card
ln -s /storage/external_sd/com.microsoft.xboxmusic/ /data/media/0/Android/data
Given my experience, you cant create a link in a fuse fs, but you can create a symblink to a fuse fs.
Hope this helps.
Thanks it worked!!
frefol123 said:
This is how I did it.
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
Click to expand...
Click to collapse
thanks!! this command worked like a charm, i was able to link /sdcard to /storage/sdcard1 to change the default storage location!! Again thankyou very much!
a small issue
soorya_cryo said:
thanks!! this command worked like a charm, i was able to link /sdcard to /storage/sdcard1 to change the default storage location!! Again thankyou very much!
Click to expand...
Click to collapse
you cant access the internal sd card later on after running this command. Only option is to reboot and revert back to the default settings.

[Q] /data filesystem problem

In the ADB shell as root I get the following results
Code:
/data # ls -la dalvik-cache/
ls -la dalvik-cache
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
ls: dalvik-cache/[email protected]@[email protected]: No such file or directory
drwxrwx--x 4 root root 57344 Mar 14 12:36 .
drwxrwx--x 41 system system 4096 Mar 15 07:45 ..
drwx--x--x 2 root root 53248 Mar 15 07:45 arm
drwx--x--x 2 system system 20480 Mar 14 20:56 profiles
/data # ls -la property/
ls -la property
ls: property/persist.atvc.allow_res_core: No such file or directory
ls: property/persist.atvc.allow_all_core: No such file or directory
ls: property/persist.radio.adb_log_on: No such file or directory
drwx------ 2 root root 4096 Mar 15 08:25 .
drwxrwx--x 41 system system 4096 Mar 15 07:45 ..
-rw------- 1 root root 1 Jan 2 2009 persist.atvc.adb
-rw------- 1 root root 1 Mar 15 07:45 persist.atvc.allow_res_panic
....
This doesn't seem right. Since /data is an F2FS partition I can't fsck it.
Any ideas on how to get rid of those errors?
What I've tried:
listing (ls), removing, stat'ing, fsck.f2fs'ing, nothing works from the shell.
Is there possibly a better forum to ask this question? I have plenty *nix experience, but am stumped on how to solve this. Normally filechecking tools are necessary but a good one for F2FS doesn't seem available (on Android).
Which ROM are you running on your phone? I'm not sure if that makes a difference since GPE uses ext4 and stock uses f2fs.
I've only run stock KK and L.
In the end I could only solve it by completely wiping the /data partition with dd and reformatting with mkfs.f2fs.
Done from adb shell in recovery.
I dunno how I ended up in this situation but it's solved now.
Running the Brzilian XT1032 ROM now, will reinstall sometime when the EU image is available.
Sent from my XT1032 using XDA Free mobile app
Quark^2 said:
I've only run stock KK and L.
In the end I could only solve it by completely wiping the /data partition with dd and reformatting with mkfs.f2fs.
Done from adb shell in recovery.
I dunno how I ended up in this situation but it's solved now.
Running the Brzilian XT1032 ROM now, will reinstall sometime when the EU image is available.
Sent from my XT1032 using XDA Free mobile app
Click to expand...
Click to collapse
Could you give a link to the file and a list of commands you used?
I'm probably stuck in the same situation as you were.

[Guide] [XT16XX] [Solve] Moto G4/Plus IMEI=0 issue

Important:
Now since Official Oreo is out, you can simply update to Official Oreo via fastboot and your IMEI will be restored.
This method will not work if you have restored other device's persist from some Youtube video or some Internet guide.
Read post #3 if you have restored some other persist and do not have a backup of your original persist.
For those who can't read this much, here is a better guide for you:
Hello everyone, this is a guide for solving the problem for IMEI = 0 on Moto G4/Plus which is caused after flashing stock ROM.
I got this problem last week and was constantly researching for the solution to this problem for the past 5 days and finally, I was able to get my IMEI back on my Moto G4 Plus (XT1643).
Note: I will be using stock firmware and stock ROM interchangeably in this thread as a lot of people consider it the same so don't get confused since I am by no means referring to the /firmware partition.
There are two common and major problems which occur while flashing custom/stock ROMs:
1. IMEI = Unknown and Baseband = Unknown
2. IMEI = 0
1st Problem:
Reason: You flashed the firmware/stock ROM which wasn't meant for your device.
Solution: Flash the firmware which is made for your device like XT1621 or XT1643, etc.
2nd Problem:
This is a major problem and there are two reasons for this:
1. Mess up your persist partition.
2. fastboot erase all command.
If your problem is caused by the first reason, it might be possible to fix it.
However, if the problem is caused by the second reason, I'm sorry I don't know if a solution to this problem exists.
Firstly you need to check if your device still has IMEI intact or not. For that use the following command through fastboot in the bootloader mode:
Code:
fastboot getvar imei
If the command returns an IMEI, it means that the IMEI is not completely lost and it can be recovered.
However, if the command returns IMEI as 0, then there are two reasons:
1. Either you flashed the bootloader that wasn't meant for your device. This can be solved by flashing the correct bootloader which is made for your device again by the command:
Code:
fastboot flash bootloader bootloader.img
2. If you have flashed the correct bootloader that is meant for your device and facing this issue, I'm sorry I don't think there is a solution to this problem. This problem is either caused by fastboot erase all command (which erases everything like IMEI from the device's motherboard or the place where IMEI is permanently stored) or some hardware issue.
Here is a little explanation:
Device specific or device unique IDs are stored in a separate place in the device like the motherboard or some other place which I am unaware of.
When EFS partition is created, it picks up the IMEI from that unique place in the device like the motherboard (or some other place which I am unaware of) where the IMEI is stored.
On every reboot, EFS partition is checked and if it does not exists, the Android system by default creates it.
When we flash stock ROM, we use the following commands:
Code:
fastboot erase modemst1
fastboot erase modemst2
These commands wipe the EFS partition and on rebooting, EFS partition is recreated.
But, in some cases, the EFS partition is not able to regenerate IMEI or the Android system is unable to recreate it and so we are left with IMEI = 0.
Here is a detailed explanation regarding this issue:
NZedPred said:
4) Explanation
4a) What happened to persist.
To understand what happened, you need to know a few things about filesystem permissions in Linux. Files and folders have user and group ownership, and permissions. Examples of owners are the system, root, user, etc. Examples of permissions are read access, write access, execute access. The permissions are applied at three levels 1) the user, 2) the group, 3) everyone else.
@rachitrawat's investigation into the failures showed that the issue was relating to the persist partition, specifically some files dhob.bin etc that are under the rfs sub folder in this partition. Under stock, these files/folders are owned by a user called rfs, and have group ownership under a group also called rfs. Additionally, the permissions on these files/folders are limited - only the rfs user can read/write/execute these files. Other users, groups, or everyone else, cannot access the files.
There was a change in the Oreo roms. If you flash and boot into an Oreo rom, and you look at the permissions/ownership, you will see that a user and group oem_2951 owns the rfs folder, and a group oem_2952 owns the hlos_rfs folder. Now this is a different name, but on its own, a different name does not mean different ownership.
In Linux, all users and groups are assigned an ID, i.e. a number. So something happened in lineage that changed the user IDs that are applied to the rfs folder.
If you look at the ownership of persist files/folders within TWRP, you will see that a STOCK PERSIST has the owner of the rfs folder as rfs_old. Similarly in TWRP, a LINEAGE PERSIST has the owner of the rfs folder as rfs. So TWRP is seeing owners differently again to stock and Lineage. Trying to run the above commands in TWRP will not fix the issue, as it will use ID 2951 for the user rfs, but we need it to be 3012 in stock (which TWRP sees as rfs_old).
In addition to the rfs folder, there is also another folder that is impacted - hlos_rfs. Its user owner is rfs, but its group owner if rfs_shared. A stock rfs_shared is shown as rfs_shared_o in TWRP. It appears that this folder is not as important in getting the IMEI back, but I have included the commands to restore ownership, to ensure there are no future errors.
4b) What happened to IMEI.
Despite the issue above, many people who flashed Oreo roms would have had no problems (other than I guess, bugs in the roms themselves). The change of ownership of the rfs folder didn't change the actual file content, so essentially all is intact. In fact, I verified that my dhob.bin and other files had the same md5sum in stock and lineage persist.
The issue of the IMEI changing to zero has only happened when people have flashed Stock roms. All of the guides that I have seen, have included the following commands (and equivalent commands have been included in the TWRP flashable stock builds as well):
Code:
fastboot erase modemst1
fastboot erase modemst2
The partitions modemst1 and modemst2 are your EFS. Normally, if your persist is pure stock, if either is erased, the modem re-creates them. But, referring to the above about permissions, if the rfs user (which is presumably used by the modem) cannot access the files (because the owner of the files is someone else, and the permissions on the files mean that only the owner can access them), then the modem cannot recreate the EFS, and the IMEI is left as zero.
Click to expand...
Click to collapse
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------​
Solution:
I have made a youtube video for this which just shows how to fix the issue and does not goes into explanation of the problem as well as the solution. Here is the link: Moto G4/G4 Plus IMEI=0 fix
Pre-requisites:
You must be on Stock Nougat 7.0
You must be rooted (install Elemental-X kernel first and then flash Magisk otherwise you will have boot issues)
You must be on your own persist
Terminal app or adb drivers in PC/Laptop
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------​
Step 1: Check if there is a problem with persist
Note: The below commands are to be typed in a terminal app or adb shell.
Q) How to type in adb shell?
A) Open command prompt in the folder where you have adb and fastboot installed and type:
Code:
adb shell
So lets start now!
Code:
su
This command it to get root access for the terminal/shell. Grant the root access and you will see that the $ symbol is replaced with # symbol which means that root access has been granted.
Code:
ls -l /persist
If your presist has some problem, then you can see the following as the output.
Code:
athene_f:/ # ls -l /persist
total 176
drwxrwx--- 2 system system 4096 2018-10-21 07:40 alarm
drwxr-xr-x 2 mot_pwric mot_pwric 4096 1969-12-31 19:02 batt_health
drwxrwx--- 2 bluetooth bluetooth 4096 2017-01-12 03:35 bluetooth
drwxr-xr-x 2 mot_tcmd bluetooth 4096 1969-12-31 19:02 bt
drwxr-xr-x 4 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 camera
drwxr-xr-x 2 root root 4096 2016-07-31 00:43 coresight
drwx------ 5 system system 4096 2017-01-12 05:21 data
drwxrwx--- 2 system graphics 4096 1969-12-31 19:02 display
drwxrwx--- 2 system system 4096 1969-12-31 19:02 drm
drwxr-xr-x 4 mot_tcmd mot_tcmd 4096 1970-01-01 06:48 factory
[COLOR="red"]drwxrwx--- 3 2951 2952 4096 1969-12-31 19:02 hlos_rfs[/COLOR]
drwx------ 2 root root 4096 1969-12-31 19:00 lost+found
drwxrwx--- 2 radio radio 4096 2016-08-04 20:26 mdm
drwxrwx--- 3 system system 4096 2017-11-09 16:30 misc
drwxrwx--- 2 system system 4096 1970-02-11 17:39 properties
drwxr-xr-x 8 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 public
[COLOR="red"]drwx------ 6 2951 2951 4096 1969-12-31 19:02 rfs[/COLOR]
drwxrws--- 2 mot_tpapi mot_tpapi 4096 2016-11-17 16:38 security
drwxrwxr-x 2 system system 4096 2016-07-31 00:43 sensors
drwxrwx--- 2 system system 4096 2018-09-10 18:13 time
drwxr-xr-x 2 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 wifi
drwxrwxr-x 2 mot_drm mot_drm 4096 1969-12-31 19:02 wmdrm
athene_f:/ #
You can see system instead of these red number if you flash Soak Test before flashing Stock ROM, so no worries, as the process will remain the same.
As it can be seen in the red part, the owner of rfs folder is a number (2951) which means that the system is unable to identify its real owner.
Also the owner of hlos_rfs folder is a number too (2952) which also means that the system is unable to identity its real owner.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------​
Step 2: Check for the key persist files
Code:
find /persist -type f
If you run the above command, you will see something similar to this:
Code:
athene_f:/ # find /persist -type f
/persist/coresight/qdss.agent.sh
/persist/coresight/qdss.config.sh
/persist/coresight/qdss.functions.sh
/persist/sensors/sensors_settings
/persist/data/sfs/6lgxCka66cxdsueYeHhCqx+j1DI_
/persist/data/sfs/VsxbuQew8Rbt0TRZjDAX8S9tV+M_
/persist/data/sfs/KfLHQpS5zKuygZcMelQOTtWzBvw_
/persist/data/sfs/R9+zCYj56-AHybZuQCWLm2H46E4_
/persist/data/sfs/NjJIuGH0j7kE08PFwp1yw+BminY_
/persist/data/sfs/7pU6SoXdsBUbDsxRiZOHNIjPVtw_
/persist/data/sfs/yLawqeQeY8AQGJmo46PVJbfYVxY_
/persist/data/tz/tz_counter
/persist/data/tz/tz_counter.bak
/persist/data/app_g/wv_usage
/persist/camera/focus/offset_cal
/persist/camera/ledcal/rear
/persist/factory/audio/temp
/persist/factory/audio/cnt
/persist/factory/audio/acc
/persist/factory/audio/f0
/persist/factory/audio/ref_diff
/persist/factory/fti
/persist/public/hiddenmenu/data/mobile_data_rx
/persist/public/hiddenmenu/data/mobile_data_tx
/persist/public/hiddenmenu/data/wifi_data_rx
/persist/public/hiddenmenu/data/wifi_data_tx
/persist/public/hiddenmenu/data/factoryreset_time
/persist/public/hiddenmenu/data/activation_date
/persist/public/hiddenmenu/life_calls
/persist/public/hiddenmenu/life_timer
/persist/security/18.bin
/persist/mdm/oma_dm_update
/persist/.bt_nv.bin
/persist/rfs/shared/server_info.txt
/persist/rfs/msm/mpss/datablock/id_00
/persist/rfs/msm/mpss/datablock/id_01
/persist/rfs/msm/mpss/server_check.txt
[COLOR="Red"]/persist/rfs/msm/mpss/dhob.bin
/persist/rfs/msm/mpss/shob.bin[/COLOR]
[COLOR="Green"]/persist/rfs/msm/mpss/dhob.bin.bak[/COLOR]
/persist/rfs/msm/adsp/server_check.txt
/persist/bluetooth/.bt_nv.bin
/persist/time/ats_1
/persist/time/ats_2
/persist/time/ats_12
/persist/time/ats_13
/persist/time/ats_15
/persist/time/ats_16
/persist/.twrps
athene_f:/ #
Note: The key files here are dhob.bin, shob.bin, id_00 and id_01.
Your IMEI is stored in id_00 (first IMEI) and id_01 (second IMEI)
dhob.bin and shob.bin are responsible to create the EFS partition.
Note: If you do not have dhob.bin.bak, you will still be able to get your IMEI back (tested and confirmed working on Moto G4 Plus(athene)), however if you have some other device like Moto G5 Plus(potter) or Moto G5s Plus(sanders), you cannot get your IMEI back with this method however trying won't hurt.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------​
Step 3: Fix the your persist
For this step, there is also a TWRP flashable zip file which will fix the persist. So for those who do not want to type the commands manually, you can simply flash the zip file (Tested and working).
Downloads:
Link: https://www.androidfilehost.com/?fid=11410963190603873125
md5: 5aac75092fc84f46dd5c6bd443df0748
These commands will restore the owners of rfs and hlos_rfs folder back to their respective original owners (rfs and rfs_shared):
Code:
chown -R rfs:rfs /persist/rfs
chown -R rfs:rfs_shared /persist/hlos_rfs
Alternatively, you can also type:
Code:
chown -R 3012:3012 /persist/rfs
chown -R 3012:3013 /persist/hlos_rfs
You will see no output on typing the first command, however, you may or may not see any output after typing the second command (there was an output shown on my device but not on the other tested devices). I'm sorry I don't have that output stored, if someone who can see it, please repond so the thread can be updated.
3012 is infact the id for rfs folder and 3013 is the id for hlos_rfs folder so instead of typing their names, you can also type their ids.
Now, to check if the owners of rfs and hlos_rfs have been set back to their original ones, type this command:
Code:
ls -l /persist
If everything went fine, you should be able to see the following output:
The below output will be seen on a perfectly fine persist as well
Code:
athene_f:/ # ls -l /persist
total 176
drwxrwx--- 2 system system 4096 2018-10-21 07:40 alarm
drwxr-xr-x 2 mot_pwric mot_pwric 4096 1969-12-31 19:02 batt_health
drwxrwx--- 2 bluetooth bluetooth 4096 2017-01-12 03:35 bluetooth
drwxr-xr-x 2 mot_tcmd bluetooth 4096 1969-12-31 19:02 bt
drwxr-xr-x 4 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 camera
drwxr-xr-x 2 root root 4096 2016-07-31 00:43 coresight
drwx------ 5 system system 4096 2017-01-12 05:21 data
drwxrwx--- 2 system graphics 4096 1969-12-31 19:02 display
drwxrwx--- 2 system system 4096 1969-12-31 19:02 drm
drwxr-xr-x 4 mot_tcmd mot_tcmd 4096 1970-01-01 06:48 factory
[COLOR="red"]drwxrwx--- 3 rfs rfs_shared 4096 1969-12-31 19:02 hlos_rfs[/COLOR]
drwx------ 2 root root 4096 1969-12-31 19:00 lost+found
drwxrwx--- 2 radio radio 4096 2016-08-04 20:26 mdm
drwxrwx--- 3 system system 4096 2017-11-09 16:30 misc
drwxrwx--- 2 system system 4096 1970-02-11 17:39 properties
drwxr-xr-x 8 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 public
[COLOR="red"]drwx------ 6 rfs rfs 4096 1969-12-31 19:02 rfs[/COLOR]
drwxrws--- 2 mot_tpapi mot_tpapi 4096 2016-11-17 16:38 security
drwxrwxr-x 2 system system 4096 2016-07-31 00:43 sensors
drwxrwx--- 2 system system 4096 2018-09-10 18:13 time
drwxr-xr-x 2 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 wifi
drwxrwxr-x 2 mot_drm mot_drm 4096 1969-12-31 19:02 wmdrm
athene_f:/ #
As you can see here that the owner of rfs folder is rfs folder and the owner of hlos_rfs folder is rfs_shared folder, the problem has been resovled.
Reboot your device and the problem should be fixed and you will be able (hopefully) to get your IMEI back by either typing *#06# in phone dialer or in Settings>About Phone>Status>IMEI Information.
On rebooting, the system will check for the EFS folder and since it didn't exist earlier, it will be recreated by the system and therefore you will get your IMEI back.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------​
A huge thanx to NZedPred, rachitrawat, for doing in depth research in this problem and coming up with a solultion.
Also, I would like to thank Tyrantre who did a lot of research for this problem and has posted the workaround which was tried here in this thread here: Diag Mode with G4 for QPSD? which finally lead me to NZedPred's below thread as I could understand what was the problem due to which IMEI was set to 0 and why Diag mode wouldn't work.
Note: This thread was made with the help of the following guide which is confirmed to be working on Moto G5 Plus (potter) Fix Persist, resolve IMEI=0, Volte, 4G, Explanation, Requirements.
Note: This guide is made for G4/Plus and I have hardly done anything to fix this problem apart from making this thread, so all credits go to the respective owners who did research in this problem. This guide should work on other Motorola devices too as we aren't focusing on device-specific fixes that will only work on Moto G4 Plus.
Refer post #2 for fixing other issues faced after recovering IMEI.
Some Common Issues:
Here are the issues observed after recovering IMEI:
Sim card detected but no network
Baseband version changed
Volte not working
If you have any one of the above-mentioned problems, there is a specific thread made for those problems. Refer to this thread: [Guide] [XT16XX] [Solve] G4+ Baseband/Network/Volte issue, Lost 1 IMEI & fingerprint
Please discuss any issues related to the above-mentioned problems in the above-provided thread (link).
If you have any other issues apart from the issues mentioned above, discuss them here.
--------------------------------------------------------------------------​
Complete Backup Zip/Script (All partitions):
Now since you have faced this issue, make sure to take a complete backup of all the partitions so that if you ever face an issue like this in future, you will always have your partitions with you to restore your device.
Here is the link to the thread to take complete backup of all partitions: [Guide] [XT16XX] Moto G4/Plus Complete Partition Backup/Restore Zip/Script
The above thread can backup/restore using TWRP flashable zip files for convenience.
There are a few youtube videos and internet guides which tells you to restore somebody else's persist file. That persist file is same in the Youtube video as well as those Internet guide (I have checked them).
Persist is unique to each and every device and using somebody else's persist on your device will never work.
IMEI is stored in /persist/rfs/msm/mpss/datablock directory where there are two files named as id_00 and id_01.
id_00 contains your 1st IMEI and id_01 contains your second IMEI.
The persist (from those guide and youtube videos) lacks id_00 and id_01 and since you restored that persist, you have those files missing as well. Those files are unique to every device anyways so if you try to restore a persist which has those files, it won't work too as your device's IMEI is different altogether.
The only possible fix that comes to my mind is by manually editing the persist file.
On comparing both the files in a hex editor, it is found that both of them are completely same except from memory address/location 00000028 to 000000C7.
This makes me think that IMEI is stored between those memory locations.
Furthermore, the first 14 digits of IMEI are stored from 00000028 to 0000002F in a different manner.
This is how it is stored,
Lets take a sample random IMEI: 3 12 34 56 78 90 12 34
This will be stored as following: 3A 21 43 65 87 09 21 03
Code:
3A [COLOR="Black"]21[/COLOR] [COLOR="DarkRed"]43[/COLOR] [COLOR="Red"]65[/COLOR] [COLOR="Magenta"]87[/COLOR] [COLOR="Sienna"]09[/COLOR] [COLOR="DarkOrange"]21[/COLOR] [COLOR="DarkOliveGreen"]03[/COLOR]
3 [COLOR="black"]12[/COLOR] [COLOR="darkred"]34[/COLOR] [COLOR="red"]56[/COLOR] [COLOR="magenta"]78[/COLOR] [COLOR="sienna"]90[/COLOR] [COLOR="darkorange"]12[/COLOR] [COLOR="darkolivegreen"]34[/COLOR]
The first set of hex numbers is what is stored in id_00 and id_01
The second set of hex numbers is what the actual IMEI is.
As you can clearly notice the difference via colors that the digits are getting flipped. The persist is storing the last digit 4 in some different way.
Why is there a letter A in the start just after 3, I found that it means that the last digit of IMEI stored in persist is 0. And that makes sense to as when you flip the last two digits i.e 03, you indeed get 30 which indicates the last digit is 0.
I don't think I need to mention this, but if you have a dual sim device, the first thirteen digits of IMEI are same and only the last two digits are different.
Now, this makes me conclude that the last digit of actual IMEI is stored in some way in the rest of the id_00 and id_01. And since most of the content in both the files are same, we just have to compare the part which is different as that part has that last digit of the two IMEIs stored.
I can't upload the contents of my IMEI for obvious reasons. If we are able to find the pattern in which the last digit is stored inside those files, then I think we can edit them and it should solve the problem for those people. Of course, editing and putting on somebody else's IMEI in those files wouldn't work either as we have already tried replacing the entire id_00 and id_01 (infact entire working persist) but the IMEI still remains 0.
Perhaps there is someplace (not talking about fastboot imei) where IMEI is stored as well, and while generation of EFS, that place and the persist are checked together and if the IMEIs in both the places match, you get your IMEI and if not, then it knows that IMEI has tampered and hence it doesn't work.
This might be too dangerous as people could edit their IMEI and put on somebody else's IMEI and can create problems, but as I mentioned above, it doesn't work as you will need to have your own IMEI in persist.
Update: Thanx to @NZedPred for correcting me. Even on deleting id_00 and id_01, and then eraseing EFS, we still get our IMEI.
I also tried changing the first digit of dhob.bin file while keeping id_00 and if_01 intact and then erased EFS, but didn't get my IMEI.
So, dhob.bin is the one which is responsible for IMEI creation and I am not able to understand anything inside dhob.bin.
I am sorry, but I was already trying beyond my capabilities earlier by using many internet sources as reference and it was just by chance that I stumbled upon id_00 and id_01. I am going to stop here for now, as this stuff goes beyond my current capabilities. If I ever get to know anything, I will update it here so that if anybody else would like to continue, they could do it.
I am sorry I tag you here, @echo92, @strongst, @NZedPred, @rachitrawat. This is what I was able to find out. I request you to read this post, and please help if you can. Thank You.
If you run the ls -l /persist command on android P ROM (which is causing this IMEI issue), this is the output you get:
Code:
athene:/ # ls -l /persist
total 88
drwxrwx--- 2 system system 4096 1970-01-10 08:37 alarm
drwxr-xr-x 2 vendor_mot_pwric vendor_mot_pwric 4096 1970-01-01 01:01 batt_health
drwxrwx--- 2 bluetooth bluetooth 4096 2018-03-29 00:04 bluetooth
drwxr-xr-x 2 vendor_mot_tcmd bluetooth 4096 1970-01-01 01:01 bt
drwxr-xr-x 4 vendor_mot_tcmd vendor_mot_tcmd 4096 2018-03-29 00:04 camera
drwxr-xr-x 2 root root 4096 2018-03-29 00:04 coresight
drwx------ 5 system system 4096 2018-03-29 00:04 data
drwxrwx--- 2 system graphics 4096 1970-01-01 01:01 display
drwxrwx--- 2 system system 4096 1970-01-01 01:01 drm
drwxr-xr-x 4 vendor_mot_tcmd vendor_mot_tcmd 4096 2018-03-29 00:04 factory
[COLOR="red"]drwxrwx--- 3 vendor_rfs vendor_rfs_shared 4096 2018-03-29 00:04 hlos_rfs[/COLOR]
drwxrwx--- 2 root root 4096 2018-03-29 00:04 lost+found
drwxrwx--- 2 radio radio 4096 2018-03-29 00:04 mdm
drwxrwx--- 3 system system 4096 2018-03-29 00:04 misc
drwxrwx--- 2 system system 4096 1970-05-31 18:25 properties
drwxr-xr-x 8 vendor_mot_tcmd vendor_mot_tcmd 4096 2018-03-29 00:04 public
[COLOR="Red"]drwx------ 6 vendor_rfs vendor_rfs 4096 2018-03-29 00:04 rfs[/COLOR]
drwxrws--- 2 vendor_mot_tpapi vendor_mot_tpapi 4096 2018-03-29 00:04 security
drwxrwxr-x 2 system system 4096 2018-03-29 00:04 sensors
drwxrwx--- 2 system system 4096 2018-03-29 00:04 time
drwxr-xr-x 2 vendor_mot_tcmd vendor_mot_tcmd 4096 1970-01-01 01:01 wifi
drwxrwxr-x 2 vendor_mot_drm vendor_mot_drm 4096 1970-01-01 01:01 wmdrm
Notice how, android Pie is using vendor suffix prefix.
One fix that was thought was to fix the owners in android Pie ROM itself before flashing Stock ROM, but on rebooting, the owners were changed back to vendor_rfs and vendor_rfs_shared.
Also, if you flash an Oreo ROM after flashing Pie ROM (which broke IMEI), this is the output you get:
Code:
athene_f:/ # ls -l /persist
total 176
drwxrwx--- 2 system system 4096 2018-10-21 07:40 alarm
drwxr-xr-x 2 mot_pwric mot_pwric 4096 1969-12-31 19:02 batt_health
drwxrwx--- 2 bluetooth bluetooth 4096 2017-01-12 03:35 bluetooth
drwxr-xr-x 2 mot_tcmd bluetooth 4096 1969-12-31 19:02 bt
drwxr-xr-x 4 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 camera
drwxr-xr-x 2 root root 4096 2016-07-31 00:43 coresight
drwx------ 5 system system 4096 2017-01-12 05:21 data
drwxrwx--- 2 system graphics 4096 1969-12-31 19:02 display
drwxrwx--- 2 system system 4096 1969-12-31 19:02 drm
drwxr-xr-x 4 mot_tcmd mot_tcmd 4096 1970-01-01 06:48 factory
[COLOR="red"]drwxrwx--- 3 root root 4096 2018-03-29 00:04 hlos_rfs[/COLOR]
drwx------ 2 root root 4096 1969-12-31 19:00 lost+found
drwxrwx--- 2 radio radio 4096 2016-08-04 20:26 mdm
drwxrwx--- 3 system system 4096 2017-11-09 16:30 misc
drwxrwx--- 2 system system 4096 1970-02-11 17:39 properties
drwxr-xr-x 8 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 public
[COLOR="red"]drwx------ 6 root root 4096 2018-03-29 00:04 rfs[/COLOR]
drwxrws--- 2 mot_tpapi mot_tpapi 4096 2016-11-17 16:38 security
drwxrwxr-x 2 system system 4096 2016-07-31 00:43 sensors
drwxrwx--- 2 system system 4096 2018-09-10 18:13 time
drwxr-xr-x 2 mot_tcmd mot_tcmd 4096 1969-12-31 19:02 wifi
drwxrwxr-x 2 mot_drm mot_drm 4096 1969-12-31 19:02 wmdrm
athene_f:/ #
Here are some of the points that can throw some light on the topic:
rachitrawat said:
Hey all,
After spending hours on the IMEI 0 problem, here are my findings:
1. IMEI is stored in nv 550 variable in QCN. However, this variable is write protected. This means all IMEI write programs such as QCOM Write IMEI tool will fail.
2. Interestingly, only IMEI 1 is stored in the nv. IMEI 2 is derived by performing some fixed hex arithmetic on IMEI 1.
3. IMEI also seems encrypted since the nv 550 in QCN never has a correct hex notation of IMEI. For example, Only half of the IMEI is correct.
4. Any attempt to restore the QCN backup of someone else will successfully write all nv variables except nv 550. Means you cannot rewrite your factory IMEI.
5. The above is true even if you hexedit the QCN with your own IMEI. NV 550 is write protected.
6. modemst1 and modemst2 are sort of some baseband cache which are created by radio/bootloader using fsg. fsg seems to be some sort of backup partition for modemst.
7. After downgrading and erasing modemst1-2, these modemst are not recreated successfully by the modem. The nv 550 variable goes missing.
8. My guess is that modem has some checksum mechanism wherein if any discrepancy is found, the modemst cache recreation fails. Not sure.
9. Our IMEI is most likely intact somewhere (not talking about fastboot IMEI). Just not interpreted properly.
10. People who restored their efs after IMEI 0 are essentially restoring working cached modemst1-2. However, if fastboot erase modemst is done, it'll likely result in IMEI 0 again because modem cannot recreate modemst correctly.
Click to expand...
Click to collapse
Thanks alot!!!
My friend was having the same problem, it worked for him??
Edit: Volte is still not working in the device...
@Heeth21,
I am facing this issue after moving to stock. Getting IMEI on "fastboot getvar imei", however unable to restore it. I followed all the instructions you had shared. Any help or further instruction in this regard would be helpful.
Thanks in advance.
checksamir said:
@Heeth21,
I am facing this issue after moving to stock. Getting IMEI on "fastboot getvar imei", however unable to restore it. I followed all the instructions you had shared. Any help or further instruction in this regard would be helpful.
Thanks in advance.
Click to expand...
Click to collapse
Can you post the output of this command in terminal?
Code:
su
ls -l /persist
Also of this command too:
Code:
su
find /persist -type f
If would be beneficial if you format it in code or you might just attach the output in a txt file.
Also can you tell me your baseband version. I think as far as I have observed, those who are getting this IMEI=0 issue, their basebands are ending with "u"
Heeth21 said:
Can you post the output of this command in terminal?
Code:
su
ls -l /persist
Also of this command too:
Code:
su
find /persist -type f
If would be beneficial if you format it in code or you might just attach the output in a txt file.
Also can you tell me your baseband version. I think as far as I have observed, those who are getting this IMEI=0 issue, their basebands are ending with "u"
Click to expand...
Click to collapse
@Heeth21,
THanks for the quick response. Please find the attached output files in text and screenshot for baseband..
checksamir said:
@Heeth21,
THanks for the quick response. Please find the attached output files in text and screenshot for baseband..
Click to expand...
Click to collapse
The files seems proper.
Type these commands again and attach the output. A screenshot would help a lot.
Code:
su
chown -R rfs:rfs /persist/rfs
chown -R rfs:rfs_shared /persist/hlos_rfs
ls -l /persist
Heeth21 said:
The files seems proper.
Type these commands again and attach the output. A screenshot would help a lot.
Code:
su
chown -R rfs:rfs /persist/rfs
chown -R rfs:rfs_shared /persist/hlos_rfs
ls -l /persist
Click to expand...
Click to collapse
I had to try it twice: after executing code /persists/rfs, some file or path or folder was missing and it started something which eventually closed before I could take a screenshot. Next time I tried, there was nothing as such. Second screenshot attached for reference.
Really appreciated your quick responses..
Heeth21 said:
The files seems proper.
Type these commands again and attach the output. A screenshot would help a lot.
Click to expand...
Click to collapse
Man! Thanks a ton! It worked like a charm... I'm back to stock with full functional VoLTE.. you're a genius.. I owe you a beer..!:good:
Nao deu certo comigo, me ajuda por favor.
Hello, I'm sorry for bad English, I'm Brazilian. I'm translating through google translator.
I am with the same problem of this post, after flashing the stock rom the imei got 0, I did the procedures of this post but it did not work with me, my imei appears correctly with the command (fastboot gevtar imei)
but in command: (ls -l / persist) does not appear the number 2951 or 2952, but the name rfs, as if everything was okay (but the imei continues 0)
and in the command: (find / persist -type f) the line does not appear (/persist/rfs/msm/mpss/dhob.bin.bak)
I finally executed the commands (chown -R rfs: rfs / persist / rfs and
chown -R rfs: rfs_shared / persist / hlos_rfs) and restarted the cell phone but the imei continued 0
the version of the base band is m8952_70030.25.03.62.02a
Is there any procedure I can try? I'll be very grateful.
---------- Post added at 01:53 AM ---------- Previous post was at 01:47 AM ----------
Hello, I'm sorry for bad English, I'm Brazilian. I'm translating through google translator.
I am with the same problem of this post, after flashing the stock rom the imei got 0, I did the procedures of this post but it did not work with me, my imei appears correctly with the command (fastboot gevtar imei)
but in command: (ls -l / persist) does not appear the number 2951 or 2952, but the name rfs, as if everything was okay (but the imei continues 0)
and in the command: (find / persist -type f) the line does not appear (/persist/rfs/msm/mpss/dhob.bin.bak)
I finally executed the commands (chown -R rfs: rfs / persist / rfs and
chown -R rfs: rfs_shared / persist / hlos_rfs) and restarted the cell phone but the imei continued 0
the version of the base band is m8952_70030.25.03.62.02a
I'll try to send prints.
Is there any procedure I can try? I'll be very grateful.
Oliver1995 said:
but in command: (ls -l / persist) does not appear the number 2951 or 2952, but the name rfs, as if everything was okay (but the imei continues 0)
and in the command: (find / persist -type f) the line does not appear (/persist/rfs/msm/mpss/dhob.bin.bak)
I finally executed the commands (chown -R rfs: rfs / persist / rfs and
chown -R rfs: rfs_shared / persist / hlos_rfs) and restarted the cell phone but the imei continued 0
Click to expand...
Click to collapse
The chown command won't do anything as the owners of the partitions are already rfs and rfs_shared.
Reflash stock rom again, and check if you get to see 2951 or 2952 on executing the command "ls -l /persist", and respond.
If you still don't get to see 2951 and 2952, then it seems you have tried doing some changes to your efs/persist partition by either restoring someone else's efs/persist or tried to edit yours.
what should I understand:It means that some custom roms erase imei while going back to stock,it can be recovered but volte cant
Is it right?
BogartX said:
what should I understand:It means that some custom roms erase imei while going back to stock,it can be recovered but volte cant
Is it right?
Click to expand...
Click to collapse
Partially right. Some custom ROMs do some changes with the EFS folder which is responsible for the recreation of IMEI. However, while flashing the Stock ROM, if you do not erase EFS partition, then you will retain your IMEI.
The commands which erase EFS partitions are:
Code:
fastboot erase modemst1
fastboot erase modemst2
The modemst1 and modemst2 are indeed the EFS partition itself. So just skip the above lines while flashing Stock ROM if the custom ROM is doing some changes with the EFS partition, and you will not lose your IMEI.
Volte can be recovered but there is a condition which should be satisfied. The baseband should remain as Indian. If it does, then you will be having Volte working and if it doesn't, you won't be having Volte running.
The only ROMs which are causing this issue on our device currently are Android Pie ROMs. I hope when Official Oreo is released for our device, the new blobs and modem will solve this issue. The developers have already checked if there is something in the ROMs which is causing this issue, and they found no problems at all. Same was the case with Oreo ROMs on Moto G5/Plus and Moto G5s/Plus
Heeth21 said:
The chown command won't do anything as the owners of the partitions are already rfs and rfs_shared.
Reflash stock rom again, and check if you get to see 2951 or 2952 on executing the command "ls -l /persist", and respond.
If you still don't get to see 2951 and 2952, then it seems you have tried doing some changes to your efs/persist partition by either restoring someone else's efs/persist or tried to edit yours.
Click to expand...
Click to collapse
yes actually I tried to restore the persistence of another person by a tutorial on youtube (I do not know if I can post the link here) and also did this tutorial to restore these files modem.img, fsg.img, hw.img: https://forum.xda-developers.com/moto-g4-plus/how-to/solve-moto-g4-plus-one-imei-fp-sensor-t3800410
already tried to reinstall the stock rom but does not appear the numbers 2951 or 2952
Do not have any solution for this?
This helped me alot,Thanks?
In my case both sim are working,with no volte
But jio 4g voice or dialer app with data on is not working
Yes I tried to restore the persist
the problem occurred after installing this rom 9.0 when I came back to the stock the imei was 0: https://forum.xda-developers.com/moto-g4-plus/development/rom-arrowos-9-x-t3859849
Oliver1995 said:
yes actually I tried to restore the persistence of another person by a tutorial on youtube (I do not know if I can post the link here) and also did this tutorial to restore these files modem.img, fsg.img, hw.img: https://forum.xda-developers.com/moto-g4-plus/how-to/solve-moto-g4-plus-one-imei-fp-sensor-t3800410
already tried to reinstall the stock rom but does not appear the numbers 2951 or 2952
Do not have any solution for this?
Click to expand...
Click to collapse
Restore your original persist back. I have seen that tutorial. This issue can only be solved if you are on your own persist as every device has its unique persist.
It doesn't matter if you tried restoring modem, hw, fsg files. Just make sure you are on your own persist.
If you haven't taken a backup of your original unmodified persist, then I'm sorry that is a completely different issue which I don't think there is a soluton to.
Pranavchorge said:
This helped me alot,Thanks
In my case both sim are working,with no volte
But jio 4g voice or dialer app with data on is not working
Click to expand...
Click to collapse
I was hoping if you could atatch your build.prop so that we can compare and check for Volte solution.
You need to grant permissions to Jio4GVoice, enable mobile data (wifi should be off), and dial via Jio4GVoice. Check if this works (it should), and then you will have an ongoing activity notification for Jio4GVoice app

sd-card file-systems keeps breaking when I write to it

EvolutionX_4.6_ginkgo-10.0-20200819-0341-OFFICIAL
(same problems with crDroid; stock ROM (Pie) works fine)
Redmi Note 8
Clean install: Format & wipe
After adopting SD and migrating data I'm having some problems. Tested with 2x 128GB cards and 1x 64GB cards, same problems every time. Also tried fresh re-installs with format & wipe, same problems.
When copying files to "/sdcard" (aka "/mnt/runtime/full/emulated", aka "/storage/emulated/0/") I keep getting corrupted directories; directories that I can't write to, I can't delete, I can't move/rename, I can't change permissions, I can't change owner/group. Every time this happens, "df" shows more space being used, but files can't be found.
Problem happens when copying files to adopted storage via "adb push", tar, zip, cpio, and MTP.
I've also tried extracting from a zip file using a GUI app, and also deleting borked directories with a GUI app: No joy.
This is a major problem. This is making it impossible to load up the SD card with the files I need.
Just trying to "adb push" a TitaniumBackup directory to the new phone, and it gets to about 70-80% and then dies with this error:
Code:
adb: error: failed to copy 'TitaniumBackup/com.android.theme.font.xxxx-xxxxxx.apk.gz' to '/sdcard/test/com.android.theme.font.xxxx-xxxxxx.apk.gz': remote couldn't create file: Invalid argument
It keeps dying at slightly different points, but every time it dies it corrupts the directory that I'm copying into; I can't delete it, I can't move/rename it, I can't add anything to it, etc. "df" shows that space is being consumed, but there's no files. The sdcard just keeps getting corrupted, every time.
Code:
rm -rfv test*
rm: test: Directory not empty
rm: test2: Directory not empty
rm: test3: Directory not empty
Code:
find test*
test
test2
test3
Code:
mv test xxx
mv: bad 'test': No such file or directory
Code:
stat test
File: test
Size: 516096 Blocks: 864 IO Blocks: 512 directory
Device: 1fh/31d Inode: 11108 Links: 2
Access: (0771/drwxrwx--x) Uid: ( 0/ root) Gid: ( 1015/sdcard_rw)
Access: 2020-09-03 20:45:01.248588627 +1200
Modify: 2020-09-03 20:50:58.918624257 +1200
Change: 2020-09-03 20:50:58.918624257 +1200
This does nothing:
Code:
find . -inum 11108 -delete
Any ideas?
Linux localhost 4.14.193-QuicksilveR™ #1 SMP PREEMPT Wed Aug 19 05:58:46 CEST 2020 aarch64
Screenshots, error messages while trying to use a GUI tool to extract a zip file.
This is the only type of log entry that I'm seeing consistently when there's a failure (via "adb push"), but I'm also seeing a lot of them when there's no failure:
Code:
[ 09-04 12:27:30.567 891: 891 W//system/bin/adbd ]
type=1400 audit(0.0:26467): avc: denied { search } for comm=73796E6320737663203139 name="oem" dev="mmcblk0p86" ino=45 scontext=u:r:adbd:s0 tcontext=u:object_r:oemfs:s0 tclass=dir permissive=0
And after some testing, it's really trashing the file-system.
Code:
$ du -hcs .
487M .
487M total
df -h .
Filesystem Size Used Avail Use% Mounted on
/mnt/expand/b780ec4a-2dac-4b9e-bf9e-a044afdcad6b/media 118G 61G 57G 52% /storage/emulated
Just me? Any ideas? This is a new phone, and it's really not usable until I get this sorted out.
Code:
pwd
/sdcard
find . \! -type d
<no output>
du -hcs .
4.7M .
4.7M total
df -h .
Filesystem Size Used Avail Use% Mounted on
/mnt/expand/b7cc023f-4716-4010-8078-6a44f560a496/media 118G 82G 36G 70% /storage/emulated
rm -rfv *
rm: test1: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: test2: Directory not empty
rm: test3: Directory not empty
rm: test4: Directory not empty
rm: test5: Directory not empty
rm: test6: Directory not empty
rm: test7: Directory not empty
rm: TitaniumBackup: Directory not empty
rm: TitaniumBackup: Directory not empty
find . -exec ls -lhd {} +
drwxrwx--x 20 root sdcard_rw 3.4K 2020-09-04 13:31 .
drwxrwx--x 2 root sdcard_rw 24K 2020-09-04 10:12 ./test1
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 11:34 ./test10
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 11:40 ./test10/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 11:45 ./test11
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 11:51 ./test11/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 11:57 ./test12
drwxrwx--x 2 root sdcard_rw 504K 2020-09-04 12:02 ./test12/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 12:09 ./test13
drwxrwx--x 2 root sdcard_rw 504K 2020-09-04 12:15 ./test13/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 12:19 ./test14
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 12:25 ./test14/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 12:30 ./test15
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 12:36 ./test15/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 12:40 ./test16
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 12:47 ./test16/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 13:01 ./test17
drwxrwx--x 2 root sdcard_rw 420K 2020-09-04 13:04 ./test17/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 13:18 ./test19
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 13:22 ./test19/TitaniumBackup
drwxrwx--x 2 root sdcard_rw 56K 2020-09-04 10:21 ./test2
drwxrwx--x 2 root sdcard_rw 56K 2020-09-04 10:26 ./test3
drwxrwx--x 2 root sdcard_rw 20K 2020-09-04 10:57 ./test4
drwxrwx--x 2 root sdcard_rw 20K 2020-09-04 10:57 ./test5
drwxrwx--x 2 root sdcard_rw 92K 2020-09-04 11:07 ./test6
drwxrwx--x 3 root sdcard_rw 116K 2020-09-04 11:12 ./test7
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 11:20 ./test8
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 11:26 ./test8/TitaniumBackup
drwxrwx--x 3 root sdcard_rw 3.4K 2020-09-04 11:27 ./test9
drwxrwx--x 2 root sdcard_rw 500K 2020-09-04 11:33 ./test9/TitaniumBackup
Code:
logcat '*:V'
I'm watching the logs in one window, while I get failures in another window. I'm not seeing anything in the logs that corresponds to the failures.
And the sd-card has passed "badblocks" with zero errors.
Nevermind… The problem is being reproduced with stock firmware.
After following these instructions to Enable Adoptable Storage On Mi Phone, I can very consistently reproduce the problem with a stock ROM.
Seems like a hardware fault.
Update: Just got a brand new Redmi Note 8. Out of the box, everything is stock. Same problem with Adata 128GB cards.
I'm trying to get these cards to puke in another machine, but they're testing perfectly.
In the phone, I'm testing with a Lexar 64GB card, and I can't find any problems with it.
Is it possible that these particular Adata cards (brand new!) just aren't compatible with this phone? Is anyone else using 128GB Adata cards with this phone?
I guess I'll have to get a different brand 128GB (or maybe 256GB?) card and do more testing.
And… I got the same error while un-taring 8GB of podcasts. This is with the 64GB Lexar card.
Now what???

Categories

Resources