how to make new persist partition - OnePlus X Q&A, Help & Troubleshooting

I think i deleted my persist partition, which contains camera and sensors. I tried to copy the content via Windows but that didn't work. Can someone please tell me what to command or which tool could help me? I am new to unix, and sorry for bad english...

like this https://forum.xda-developers.com/google-nexus-5/general/guide-to-fix-persist-partition-t2821576
or this https://www.quora.com/How-do-I-re-create-persist-partition-in-Android

no one can help?

There is in fact a way you can solve your problem
First, do you have access to your recovery? And if yes, is it the stock recovery or TWRP?

Related

Help needed - System wipe/reinstall ROM et al.

So a quick catch up is needed: I accidentally wiped my system in TWRP recovery. I have now been able to push the ROM back to TFP via ADB. All seems to be ok.
Issues:
1) When flashing the rom zip I got a failed message after TWRP checked partitions, anyone know what to do with this?
2) TWRP only will allow me to install from /data directory, is this normal and will this hinder rom flash?
Any insights or knowledge of existing threads with answers would be really appreciated. Thanks for reading this too btw, I'm new so anything will be helpful.
Thanks again.
tstern0112 said:
So a quick catch up is needed: I accidentally wiped my system in TWRP recovery. I have now been able to push the ROM back to TFP via ADB. All seems to be ok.
Issues:
1) When flashing the rom zip I got a failed message after TWRP checked partitions, anyone know what to do with this?
2) TWRP only will allow me to install from /data directory, is this normal and will this hinder rom flash?
Any insights or knowledge of existing threads with answers would be really appreciated. Thanks for reading this too btw, I'm new so anything will be helpful.
Thanks again.
Click to expand...
Click to collapse
I haven't personally used TWRP but I've seen in the buglist that sometimes it could mess up with particularly large ROM files. However, I have not tested this firsthand because I know my prime is sort of like a moribund insect; you touch it, it dies.
Sent from my tf9001 with XDA XD.
tstern0112 said:
So a quick catch up is needed: I accidentally wiped my system in TWRP recovery. I have now been able to push the ROM back to TFP via ADB. All seems to be ok.
Issues:
1) When flashing the rom zip I got a failed message after TWRP checked partitions, anyone know what to do with this?
2) TWRP only will allow me to install from /data directory, is this normal and will this hinder rom flash?
Any insights or knowledge of existing threads with answers would be really appreciated. Thanks for reading this too btw, I'm new so anything will be helpful.
Thanks again.
Click to expand...
Click to collapse
The /data directory is the only partition I have ever flashed a ROM from. /data is just internal memory Where does ADB push put the file by default, at the root?
It sounds like you may need to re-partition your device. I guess when you wipe /system in twrp, it doesn't create a new /system partition? Or maybe it wiped everything? The TWRP thread can probably answer these questions, but my guess is that you just need to create a new partition(s) or if the partitions are okay just adb push the file to the right spot. I've never done that before in ADB, hopefully it isn't complicated? Good luck man, ask the Team Win thread if you have questions, I bet they can help!
Komodo Rogue said:
The /data directory is the only partition I have ever flashed a ROM from. /data is just internal memory Where does ADB push put the file by default, at the root?
It sounds like you may need to re-partition your device. I guess when you wipe /system in twrp, it doesn't create a new /system partition? Or maybe it wiped everything? The TWRP thread can probably answer these questions, but my guess is that you just need to create a new partition(s) or if the partitions are okay just adb push the file to the right spot. I've never done that before in ADB, hopefully it isn't complicated? Good luck man, ask the Team Win thread if you have questions, I bet they can help!
Click to expand...
Click to collapse
Thanks so much.. Yeah I've been reading up on this and of course there's always more to the story haha I talked to an old linux engineer and he agrees with you that there is probably something going on with partitions. I'll head over to TWRP and see if they have any ideas. Thanks for your help.

S III efs missing not booting

Dear Friends,
Need help please. I have installed another custom rom that was not meant for I9300 and now the EFS is corrupted. I tried installing orignal rom using ODIN but geting boot loop and the phone is not booting. On going into recovery i can see an error efs/ corupted or something like that. I have the backup of my EFS folder in tar.gz format however dont know how to install the same and recover my phone as not able to boot to android.
Please help me if someone can work it out. My phone has just 3 days of warranty left and it does not shows rooted anywhere except the count of installation is about 32 and rom says official and kernel says custom.
Please if someone can help me restore my phone back in working condition i shall always remain thankfull.
Regards,
Mush
mush2004 said:
Dear Friends,
Need help please. I have installed another custom rom that was not meant for I9300 and now the EFS is corrupted. I tried installing orignal rom using ODIN but geting boot loop and the phone is not booting. On going into recovery i can see an error efs/ corupted or something like that. I have the backup of my EFS folder in tar.gz format however dont know how to install the same and recover my phone as not able to boot to android.
Please help me if someone can work it out. My phone has just 3 days of warranty left and it does not shows rooted anywhere except the count of installation is about 32 and rom says official and kernel says custom.
Please if someone can help me restore my phone back in working condition i shall always remain thankfull.
Regards,
Mush
Click to expand...
Click to collapse
It is essential that you have a backup of the EFS partition and a way to place it back - the first two ways that I would think about are:
a) use a good recovery - like Philz recovery, that has commands to restore EFS
b) if the format of the backup is not exactly right you might be able to boot in recovery and use ADB commands.
xclub_101 said:
It is essential that you have a backup of the EFS partition and a way to place it back - the first two ways that I would think about are:
a) use a good recovery - like Philz recovery, that has commands to restore EFS
b) if the format of the backup is not exactly right you might be able to boot in recovery and use ADB commands.
Click to expand...
Click to collapse
Code:
su
umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
reboot
Ver3go said:
Code:
su
umount /efs
dd if=/sdcard/efs.img of=/dev/block/mmcblk0p1 bs=4096
reboot
Click to expand...
Click to collapse
I am new to adb commands. Will phylz recovery help me enter the commands? if yes then i shall be replying with the sd card efs tar file name. Will then you be able to guide me with the commands based on the tar file?
Thanks all of you in advance.
Mush
mush2004 said:
I am new to adb commands. Will phylz recovery help me enter the commands? if yes then i shall be replying with the sd card efs tar file name. Will then you be able to guide me with the commands based on the tar file?
Thanks all of you in advance.
Mush
Click to expand...
Click to collapse
No for ADB you boot into recovery, connect your computer via USB and run the ADB commands from either Linux Terminal or Windows Command Prompt.
The tool here:
http://forum.xda-developers.com/showthread.php?t=1703488
May help if you're new to adb.
Otherwise it's a case of downloading and installing the drivers for your phone and the Android SDK http://developer.android.com/sdk/index.html
Thanks for all your replies.
Just wanted to confirm if i have the efs backup in sd card as under folder backup_efs and there are two files in tar.gz format will i be able to use the phylz recovery to use this replace my efs folder? if yes then can you guide me the steps please.
Regards,
Mush
mush2004 said:
Thanks for all your replies.
Just wanted to confirm if i have the efs backup in sd card as under folder backup_efs and there are two files in tar.gz format will i be able to use the phylz recovery to use this replace my efs folder? if yes then can you guide me the steps please.
Regards,
Mush
Click to expand...
Click to collapse
I do not remember right now what creates an backup_efs folder but it really does not matter that much - the tar.gz is a "file archive" and .img is usually a partition image. Each could have minor advantages - the .img also contains the entire filesystem of the partition (and will work easier if the filesystem is bonked) but a tar.gz backup is more versatile when you have bad sectors or a changed partition.
Under an advanced recovery like Philz you would just navigate some menus and try to restore the EFS - see the info in those specific threads.
Under ADB you need to have stuff (drivers and some programs) installed in your PC, you connect the phone on USB and you run ADB commands from the command line.

Need system.img, boot.img and recovery.img

Hello there,
can someone please provide a system.img, recovery.img and boot.img from a WI501Q? I've derped something up quite hard by backing up the system partition while the bootloader was still locked, now I tried to flash it and the filesystem seems to be corrupted...
I tried reflashing a TWRP backup made from someone else but even transfering the backup to the watch fails at some point with "protocol error"... The watch reboots then and no files were saved to the watch.
Thanks already!
See Post #4 on how I resolved this (kinda).
[del]
ranf said:
[del]
Click to expand...
Click to collapse
What did you mean by using ext2simg?
Okay, after some derping around, trying, failing and more I managed to restore it...
I had a TWRP backup from my still OEM locked bootloader (I booted TWRP via fastboot boot twrp3.img), via fastboot I formated the system, userdata, cache and so on partitions and something along those lines seemed to work.
Before that the /data partition seemed to be corrupt for whatever reason, not even TWRP was able to display the free space. After doing the above it suddenly was able to display it again but the /data/media folder was missing, I created it manually, pushed the TWRP folder onto it, Restored and it worked!
So yeah, not sure what exactly went wrong here or how to fix it... Sorry...
EpicLPer said:
What did you mean by using ext2simg?
Click to expand...
Click to collapse
In Ubuntu it is in this package:
http://packages.ubuntu.com/xenial/amd64/android-tools-fsutils/filelist
Works better than img2simg.

"/persist/sensors" accidently deleted - need a copy from another phone

Hi friends,
I need help please, I deleted the contents of /persist/sensors
in a desparate attempt to resolve an accelometer/gyro y-axis being off by ~7°.
This was a fatal mistake as persist.img from stock fastboot ROM does
not contain most of the contents and my full twrp backup has /vendor and multiple EFS but not /persist.
Please save my phone.
I am on the first April PE ROM but I doubt it matters for this issue.
y0nigt said:
Hi friends,
I need help please, I deleted the contents of /persist/sensors
in a desparate attempt to resolve an accelometer/gyro y-axis being off by ~7°.
This was a fatal mistake as persist.img from stock fastboot ROM does
not contain most of the contents and my full twrp backup has /vendor and multiple EFS but not /persist.
Please save my phone.
I am on the first April PE ROM but I doubt it matters for this issue.
Click to expand...
Click to collapse
Try latest AtomOS from official download page
Rajendran Rasa said:
Try latest AtomOS from official download page
Click to expand...
Click to collapse
Thanks for the reply, ROMs do not include persist.img and fastboot ROMs only have this partial structure inside persist.img/sensors
Code:
Directory of sensors
<DIR> registry
0 sensors_settings
Directory of sensors\registry
<DIR> registry
592 sns_reg_config
11 sns_reg_version
Directory of sensors\registry\registry
0 sensors_registry
Total Files Listed: 4 File(s) 603 bytes
while the original folder had more than 100 files in there.
If I understand correctly this partition is written in the factory
per phone and includes IMEI, Wifi/BT MAC addresses and stuff.
I just need the /persist/sensors from a working global MIA3 phone please.
A nice person sent me the files in private, I attached them in case anybody else needs it too. I still have the issue with a sensor a bit off by a few degrees but at least my sensors are back!
Flash miui 11 with twrp and then u get all sensors
y0nigt said:
A nice person sent me the files in private, I attached them in case anybody else needs it too. I still have the issue with a sensor a bit off by a few degrees but at least my sensors are back!
Click to expand...
Click to collapse
is this file calibrated? how do i flash this file?
How to flash this file?
y0nigt said:
A nice person sent me the files in private, I attached them in case anybody else needs it too. I still have the issue with a sensor a bit off by a few degrees but at least my sensors are back!
Click to expand...
Click to collapse
Guys I just got back on 9 stock rom and lost proximity and gyroscope sensors (even some more). Could anyone please guide me as to how I can proceed? What steps should I take to get them back? I have tried installing 10 n then 9 again, back n forth...doesn't help.
I have tried installing MIUI 11 and then install stock rom but same outcome. Is there anyway I can flash this file and get the sensors back? Please help..
apparently no one knows the complete solution to this persistent partition problem
I have same issu MI9 T pro
Btw, I have a similar offset problem with the GPS, it's off by about 10°
If you ever find a fix, lemme know!
Catlish said:
Btw, I have a similar offset problem with the GPS, it's off by about 10°
If you ever find a fix, lemme know!
Click to expand...
Click to collapse
Good lock

[CLOSED][SOLUTION]How to make system read/writeable R/W in Android 10+

Welcome to SystemRW by lebigmac
This script removes the read-only lock of all partitions embedded in the super partition of your stock firmware. This allows you to debloat all unnecessary system apps, customize your device to your liking and make MIUI run as smooth as silk!
MIUI 12 is great but it's a little bit bloated and some bugs here and there.
Developed on Xiaomi Poco X3 NFC and works like a charm over here!
Visit project thread
{
"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"
}
can it work for vendor too ?
I really want to flash files that request mount system and vendor
@Abdullah.Csit
Yes the script makes all partitions (system, vendor, product...) that are embedded in your super.img read-write-able and adds extra space to them so you can write data to them later. Then it merges these modified partitions back into a single brand new super_fixed.img and flashes it to your device. Works in both custom recovery and in Android operating system.
User data is not affected.
Now it's possible to modify for example the default.prop or the init.rc and make many more customizations to your device if you know what you're doing. Make sure to always back up an important system file before modifying it. This way you can always restore the original file from recovery and remove the bootloop if something goes wrong.
In the worst case scenario you can always flash a new super.img
placeholder
after 2 days long battle with numerous attempts to install Ubuntu on my windows PC I was finally successful, only to find out:
Spoiler: boring, but it happened
- that RW enabling script can't save super image to my phone sdcard (permission denied)
- that I have to make backup of super partition manually and let the RW enabling script "eat that"
- that my phone super partition is somewhat damaged and RW enabling script ended always with error that it can't resize vendor because it is too big (maybe it wasn't really damaged, but I had already flashed RW vendor provided by another user and it somewhat (probably) collided with the tools used)
- that super.img from fastboot version of MIUI ROM can't be used directly with RW enabling script, because for whatever reason it complained, that that is not an super image
- that I have to flash that clean fresh super.img from fastboot version of MIUI ROM via fastboot to my phone with edited flash script (so it doesn't overwrite my data and recovery partition) and make a backup of it in recovery
- and that backup of clean fresh flashed super.img from fastboot version of MIUI ROM of was finally accepted by RW enabling script, that did it magic, only to find out:
- that final flashing process of fixed super.img to my phone freeze at third section from all seven (now there I was really afraid that my EMMC died because of extensive flashing)
Was that all Mr. Murphy?
- so I had excellent idea that I can obviously use my recovery to flash that fixed super image, easiest thing in the world, right?
- but Ubuntu and Mr. Murphy proved me wrong, because I was able to copy on my phone storage/sdcard anything but that fixed super.img (don't ask me why it didn't even started copying, I'm no Linux user, and that MTP error was pretty alien to me)
- so I had to somehow copy that fixed super.img from newly created Linux space to my Windows space, from where I was so sure I can finally transfer it to my phone internal memory and finally have flashed it where it belongs
- but anything that I writed in Ubuntu to my Windows disks mysteriously disappeared after one click on the file (created on Ubuntu) in Windows ()
- thanks to my rented cloud storage somewhere on the internet I was able to upload that fixed super.img (way faster (thanks to my very fast optic line) than any other solution available to me at that time)
- after reboot to Windows downloaded it and finally was able to upload to my phone from Windows, flash it to super partition via recovery
- and finally re-flashed all need components for my custom ROM and after all that it finally booted into Android
- uff, anyway - it can be done, and it is RW for system, vendor and product
- so thanks @lebigmac for providing possibility
- now we need to persuade TWRP/OFOX maintainers that they can enable again wipe system option (of course it would be only active on RW enabled super partition)
sorry @jeryll that you had to go through so much trouble because I only made Linux only version :/
I am working hard on version 1.15 right now and that should also work for Windows and Mac users as well. I'll try to release it ASAP
To flash the original super.img which you extracted from the Xiaomi fastboot ROM you can simply do:
Code:
fastboot flash super super.img
This should not overwrite your user data.
The good thing about the Poco is it's very forgiving. I must've flashed my super partition at least two dozen times already and it still works like a charm
lebigmac said:
sorry @jeryll that you had to go through so much trouble :/
I am working on version 1.5 right now and that should also work for Windows and Mac users
Click to expand...
Click to collapse
nothing to be sorry for, it was an battle and I won, hopefully new version will be more user friendly + Windows version will be the sweet bonus (for me), thanks again for making this possible
Hey jeryll new universal version available HERE
This should make things easier for the windows and macintosh folks
Today I uploaded the new v1.26 to the project thread
How do you guys like the script so far? Any issues with the Poco X3 NFC? I've only tested it with Android 10 so far but it should also work with Android 11
Hey I recently installed custom rom on my one plus 7t pro(hotdog) . I done it by flashing system, product, boot, etc seperately . When i used your tool it create a super_fixed.bin file . I don't know how to install (I think it is corrupted i tried payload dumper and 7zip to seperate system file from it). What should i do ? Please Help.
Shadirvan said:
Hey I recently install havoc is rom on my one plus 7t pro . I done it by patching system, product, boot, etc seperately . I don't have a super.img how can I convert system to RW without super img
Click to expand...
Click to collapse
I don't have a working twrp for my device
Shadirvan said:
Hey I recently installed custom rom on my one plus 7t pro(hotdog) . I done it by flashing system, product, boot, etc seperately . When i used your tool it create a super_fixed.bin file . I don't know how to install (I think it is corrupted i tried payload dumper and 7zip to seperate system file from it). What should i do ? Please Help.
Click to expand...
Click to collapse
probably experiencing the same thing but whats happening is i cant install anything because for some reason, /system cannot r/w
sorry for bad english
Shadirvan said:
Hey I recently installed custom rom on my one plus 7t pro(hotdog) . I done it by flashing system, product, boot, etc seperately . When i used your tool it create a super_fixed.bin file . I don't know how to install (I think it is corrupted i tried payload dumper and 7zip to seperate system file from it). What should i do ? Please Help.
Click to expand...
Click to collapse
Shadirvan said:
I don't have a working twrp for my device
Click to expand...
Click to collapse
Hi @Shadirvan
It is recommended to always use latest official version of my script (currently v1.32 - new version coming soon!).
Please keep in mind that my SystemRW script was designed for stock firmware and not for custom ROM. Custom ROM's should have r/w capability by default. If your custom ROM doesn't offer this functionality straight out of the box then you should rethink why you even installed it in the first place. Just my 2 ¢
I cannot tell you what you should or shouldn't do but I can tell you what you can do:
You can manually flash super_fixed.bin to your super partition like this:
Bash:
adb reboot bootloader
fastboot flash super super_fixed.bin
Please report back your results. Good luck!
davepayra said:
probably experiencing the same thing but whats happening is i cant install anything because for some reason, /system cannot r/w
sorry for bad english
Click to expand...
Click to collapse
Hello @davepayra
Please tell me more about your device and send me your log files from script folder at
/data/local/tmp/systemrw_1.32/log/
And you can send me some screenshots to better illustrate what you are talking about.
Thanks.
lebigmac said:
Hi @Shadirvan
It is always recommended to use latest version of my script (currently v1.32 - new version coming soon!).
Please keep in mind that my SystemRW script was designed for stock firmware and not for custom ROM. Custom ROM's should have r/w capability by default. If your custom ROM doesn't offer this functionality straight out of the box then you should rethink why you even installed it in the first place. Just my 2 ¢
I cannot tell you what you should or shouldn't do but I can tell you what you can do:
You can manually flash super_fixed.bin to your super partition like this:
Bash:
adb reboot bootloader
fastboot flash super super_fixed.bin
Please report back your results. Good luck!
Hello @davepayra
Please tell me more about your device and send me your log files from script folder at
/data/local/tmp/systemrw_1.32/log/
And you can send me some screenshots to better illustrate what you are talking about.
Thanks.
Click to expand...
Click to collapse
hi, i have a few questions because i did something wrong about installing custom rom
1. is there any way i can flash corvus os again because it says error 1: cant install zip file?
2. is there a possibility that my twrp version prevents me to r/w in system partition?
3. if ever my system partition doesn't have os installed, should i first install vendor image, then proceed to custom recovery to install corvus os (if vendor image enables writing on system partition because ive read a thread that says by reflashing broken firmware, all partitions can return to their normal state and continue r/w in system partition)
davepayra said:
hi, i have a few questions because i did something wrong about installing custom rom
1. is there any way i can flash corvus os again because it says error 1: cant install zip file?
2. is there a possibility that my twrp version prevents me to r/w in system partition?
3. if ever my system partition doesn't have os installed, should i first install vendor image, then proceed to custom recovery to install corvus os (if vendor image enables writing on system partition because ive read a thread that says by reflashing broken firmware, all partitions can return to their normal state and continue r/w in system partition)
Click to expand...
Click to collapse
Hi. I would suggest you install official stock firmware on your device. Check your device subforum here at XDA on how to do this. Then afterwards you can try my script if you want to make your device fully read/write-able. Good luck!
lebigmac said:
Hi. I would suggest you install official stock firmware on your device. Check your device subforum here at XDA on how to do this. Then afterwards you can try my script if you want to make your device fully read/write-able. Good luck!
Click to expand...
Click to collapse
thankyou sir. i will do that. best wishes to me
after doing this sir, do i have to unlock my bootloader again to flash custom rom or there is no other way?
also, will i be able to keep my twrp or should i still flash it again?
What an immaculate, well written and commented script! Easy to know what it does and why.
Worked a treat on my rog 5s pro.
Thread has been closed! The account of the author of this thread has been permanently suspended. Please, I ask everybody not to promote a banned user or his website, blog, work etc on XDA. Thanks very much for your cooperation.
Regards
Oswald Boelcke
Senior Moderator

Categories

Resources