Where is the /sys folder located?
I've extracted the boot.img and there is a folder called sys but there is nothing in it?
On the phone the /sys folder contains some folders and files I would like to edit.
I try to edit manually, when I reboot it does not stick. It resets to default?
Can someone please help me find the correct /sys folder?
anthony062991 said:
Where is the /sys folder located?
I've extracted the boot.img and there is a folder called sys but there is nothing in it?
On the phone the /sys folder contains some folders and files I would like to edit.
I try to edit manually, when I reboot it does not stick. It resets to default?
Can someone please help me find the correct /sys folder?
Click to expand...
Click to collapse
Im not sure what device you have but that folder on the Evo 3D is on the root of the phone. Are you rooted? Some times for certain changes to the phone you would have to wipe factory, or make your changes to the ROM zip before you flash it. Hope that is what you ment.
vlatinlove said:
Im not sure what device you have but that folder on the Evo 3D is on the root of the phone. Are you rooted? Some times for certain changes to the phone you would have to wipe factory, or make your changes to the ROM zip before you flash it. Hope that is what you ment.
Click to expand...
Click to collapse
All phones have it, it is in the same directory as init.rc file. I have an att avail zte z990 and it is rooted. If I wipe it goes right back to the defaults. . I'm pretty sure that folder is somewhere in the boot.img/kernel. I may be wrong. I made an original update.zip and that only contains the system witch I already know about. I've extracted the boot.img and zImage and still cannot find it.
Related
I searched the forum but i cannot find the answer.
I would like to make an xrecovery zip file off the rom i use.
Is this possible and how.
Thanks.
You can create a nandroid backup instead using Backup and Restore in xRecovery
Titanium Backup for single files.
You can also grab the files that you need to push as an update via Titanium backup. It creates an update.zip with a few files inside that you can extract to another phone if you like...
Nandroid backups are made with xRecovery for the Xperia models. It will give you three files and a checksum file, these can be added to a zip file if you like and restored using xRecovery.
I've found a good article on XDA located here on the subject. It's not specific to the X10 or Xperia models but you might find it worth reading
benz0076 said:
I searched the forum but i cannot find the answer.
I would like to make an xrecovery zip file off the rom i use.
Is this possible and how.
Thanks.
Click to expand...
Click to collapse
I'm not a Dev but this is what I'd do if I wanted to make an update zip of the changes I've made to the Rom installed on my phone. Before you try it, just remember that I could be wrong on this and if your going to create your own package, try it on your own phone before releasing it for public use.
First thing to do would be to extract the files from any ROM update package, but preferably the one that your currently installed one is based on.
If you open the zip file there will be two or more folders. One will be system and the other META-INF. If you drill down through the META-INF folder to the bottom of the folder structure you'll find a file called "update-script" This is the script that XRecovery uses when it updates your phone and you can easily read what's being done.
Eg:
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
And it would continue on with more after that.
The script is formating the Data, Cache, and system partitions on the phone in preparation for installing the new Firmware. It is then copying the contents of the System folder included in the package to the system partition on the phone. The rest after that is setting up symbolic links and setting directory permissions.
If you use ADB to pull the /system folder from you phone, that would be the equivalent of the system folder that is included in the update package.
Code:
md system
adb pull /system system
You could, if you wanted, just replace the system folder in the update package zip with the system folder that you just pulled from your phone and you would have a packaged ROM.
If you wanted to include apps in the package that are not in the /system/app folder you would need to pull the apps that you wanted to include from the /data/app
Code:
md data\app
adb pull /data/app data\app
You would then add the data folder to the rom package so that you would then have three folder instead of two.
data
META-INF
system
After that change the the beginning of the update-script file to look something like this
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
After your all done use something like 7zip to zip everything back up using no compression "Store Only" and you should have a XRecovery installable ROM.
NOTE:
If you have paid apps and are making this ROM for anybody other than yourself to use, make damn sure that you remove them from the /data/app folder before zipping everything up into a package. Including paid apps in your ROM is Warez and won't be tolerated anywhere.
GreatBigDog said:
I'm not a Dev but this is what I'd do if I wanted to make an update zip of the changes I've made to the Rom installed on my phone. Before you try it, just remember that I could be wrong on this and if your going to create your own package, try it on your own phone before releasing it for public use.
First thing to do would be to extract the files from any ROM update package, but preferably the one that your currently installed one is based on.
If you open the zip file there will be two or more folders. One will be system and the other META-INF. If you drill down through the META-INF folder to the bottom of the folder structure you'll find a file called "update-script" This is the script that XRecovery uses when it updates your phone and you can easily read what's being done.
Eg:
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
And it would continue on with more after that.
The script is formating the Data, Cache, and system partitions on the phone in preparation for installing the new Firmware. It is then copying the contents of the System folder included in the package to the system partition on the phone. The rest after that is setting up symbolic links and setting directory permissions.
If you use ADB to pull the /system folder from you phone, that would be the equivalent of the system folder that is included in the update package.
Code:
md system
adb pull /system system
You could, if you wanted, just replace the system folder in the update package zip with the system folder that you just pulled from your phone and you would have a packaged ROM.
If you wanted to include apps in the package that are not in the /system/app folder you would need to pull the apps that you wanted to include from the /data/app
Code:
md data\app
adb pull /data/app data\app
You would then add the data folder to the rom package so that you would then have three folder instead of two.
data
META-INF
system
After that change the the beginning of the update-script file to look something like this
Code:
format DATA:
format CACHE:
format SYSTEM:
copy_dir PACKAGE:system SYSTEM:
copy_dir PACKAGE:data DATA:
After your all done use something like 7zip to zip everything back up using no compression "Store Only" and you should have a XRecovery installable ROM.
NOTE:
If you have paid apps and are making this ROM for anybody other than yourself to use, make damn sure that you remove them from the /data/app folder before zipping everything up into a package. Including paid apps in your ROM is Warez and won't be tolerated anywhere.
Click to expand...
Click to collapse
Thanks i am going to try this and will let you know if it works..
Sent from my X10i using XDA App
Zip for xrecovery
I have some modified .png files for a theme and I need to make a zip for xrecovery, can someone explain IN DETAIL PLZ, on how to do this. this is what i think im supposed to do so far. change .apk to .zip, use 7zip edit files inside, change zip back to apk? thats about where i get lost
CAYCE_VII said:
I have some modified .png files for a theme and I need to make a zip for xrecovery, can someone explain IN DETAIL PLZ, on how to do this. this is what i think im supposed to do so far. change .apk to .zip, use 7zip edit files inside, change zip back to apk? thats about where i get lost
Click to expand...
Click to collapse
Follow this thread... http://forum.xda-developers.com/showthread.php?t=714288
Hi all.
I'm trying to copy some files to the system partition after enabling write on read-only partitions and remounting it and everything is success, but when I restart the phone, files get deleted and partition back to original. I tried ES file explore and Total Commander.
Galaxy S2, cMIUI 2.10 JB
Hmm.. seems like a hard question!
Elancore said:
Hi all.
I'm trying to copy some files to the system partition after enabling write on read-only partitions and remounting it and everything is success, but when I restart the phone, files get deleted and partition back to original. I tried ES file explore and Total Commander.
Galaxy S2, cMIUI 2.10 JB
Click to expand...
Click to collapse
Elancore said:
Hmm.. seems like a hard question!
Click to expand...
Click to collapse
Hey,
no not a hard question but a bit confusing
So the copy to system works without probs?
Do u have root-enabled on it?
U can try Solid explorer once, too, to be sure.
CHEERS
I enabled root explorer and I mounted the file system to be writable, yes I have a rooted phone.
I can copy to system root folders anything (media files), the files stay there until I reboot the phone then they disappear, they get deleted maybe? how to disable that?
Thanks
Elancore said:
I enabled root explorer and I mounted the file system to be writable, yes I have a rooted phone.
I can copy to system root folders anything (media files), the files stay there until I reboot the phone then they disappear, they get deleted maybe? how to disable that?
Thanks
Click to expand...
Click to collapse
That listen like u have to save changes?!
Pls try the Solid explorer (for me the best explorer ever)
Copy files and have a look for root-acces request (should be asked for Solid, if it's new)
The copy/replace the file.
CHEERS
Thanks Hannibal for reply, I got no luck on doing it, they still get removed after reboot. Is there a way to flash these files that I want to copy to system as an update.zip?
Elancore said:
Thanks Hannibal for reply, I got no luck on doing it, they still get removed after reboot. Is there a way to flash these files that I want to copy to system as an update.zip?
Click to expand...
Click to collapse
Sure there's a way, but I can't help u with it, sorry.
With new Titanium Backup u can create flashable .zips but for sure only from isntalled apps.
Maybe u have a look at google. I remind for a tool which u just say what u wanna flash an it creates the flashable .zip.
Much success....
CHEERS
Edit: Sorry but couldn't answer u yesterday.
XDA had a prob for a while
HI all, I understand the whole file system issue with 4.2.2 adding a new 0 path, and am able to copy and paste files while using the ES File Explorer app. However, when connected via USB to my PC, is there a way to see all of these folders? It would be easier to copy and paste files on a PC for sure, but I can't seem to be able to navigate to both directories on the PC.
Any help is much appreciated. Thanks in advance.
I had the same problem when going back and forth from 4.1 to 4.2. I believe it is a permissions issue. I fixed that by going in to recovery and change the permissions on the 0 folder to 755 and then I could do what I needed in that folder from windows. This was after went back to a 4.1 rom from a 4.2 rom and wanted to access files and then delete the 0 folder.
smacklayer said:
I had the same problem when going back and forth from 4.1 to 4.2. I believe it is a permissions issue. I fixed that by going in to recovery and change the permissions on the 0 folder to 755 and then I could do what I needed in that folder from windows. This was after went back to a 4.1 rom from a 4.2 rom and wanted to access files and then delete the 0 folder.
Click to expand...
Click to collapse
Thanks for the assist. However, excuse my noobness, but how do you change permissions in recovery? I'm on clockworkmod if that's relevant. Do I need to use TWRP?
tfrank10 said:
Thanks for the assist. However, excuse my noobness, but how do you change permissions in recovery? I'm on clockworkmod if that's relevant. Do I need to use TWRP?
Click to expand...
Click to collapse
I use TWRP, and don't know much about CWM. In TWRP there is a file browser where you can go and do some operations on files and folders.
Hello,
I want to determine the ROM of a phone I do not have, in particular the pseudo folder /proc and /sys/. Normally I used ADB shell in order to skim through the folders, but since I do not have the phone here now, I thought that I should be able to find these contents somewhere in the ROM. But I checked in several image parts of the ROM (boot.img, ramdisk.img, system.img e.g.), but the /proc/ as well as the /sys/ folder were always empty.
Can somebody help and tell where (or if?) these folders can be found in the ROM?
Greetings
these are runtime files in a tempfs .
Those folders are linked at runtime by the kernel. You wont find them in zip packages or anywhere else other than a running phone.
Anyways, this needs to be moved.
Hi all,
Did something stupid that erased my /persist folder. The folder exists now and most of the sensors and data has been restored but for wifi. The wifi bin files are missing, so if someone is kind enough to share the contents of their /persist it will be really helpful thanks.
On a rooted device, use a root capable File manager to access the /root folder of your moto z.
in system/persist, copy the contents and share it here.?
XT 1650 3
And also their system/etc/firmware/wlan folder please?
That doesn't work. The binaries are bound to the device serial number and the whole thing is then signed by motorola.
For now, don't do anything more to your persist folder! First, you need to save what's left to save.
Try this: connect your phone with the PC, boot into TWRP recovery..
Code:
adb shell "dd if=/dev/block/sda3 of=/tmp/sda3_persist.bin"
adb pull /tmp/sda3_persist.bin
This is the current partition image. You may be able to reconstruct the missing files and filenames.
However, chance is that you removed just the mount point of the persist partition.
Reinstall system partition and see if that brings back the persist folder...
benzinerwin said:
That doesn't work. The binaries are bound to the device serial number and the whole thing is then signed by motorola.
For now, don't do anything more to your persist folder! First, you need to save what's left to save.
Try this: connect your phone with the PC, boot into TWRP recovery..
Code:
adb shell "dd if=/dev/block/sda3 of=/tmp/sda3_persist.bin"
adb pull /tmp/sda3_persist.bin
This is the current partition image. You may be able to reconstruct the missing files and filenames.
However, chance is that you removed just the mount point of the persist partition.
Reinstall system partition and see if that brings back the persist folder...
Click to expand...
Click to collapse
Thanks for the reply.
/persist is now mounted and phone is booting and everything else is working (bluetooth connects, sensors are working etc) only wifi is not working.
Log Cat is not too helpful, just says wifi driver cannot load. System status gives IMEI number, bluetooth MAC address are shown. But Wifi is shown as 02:00:00:00. Not sure what is wrong! Hardware gone?
Thanks
Hm, you should backup your modem partition:
Code:
adb shell "dd if=/dev/block/sda16 of=/tmp/sda16_modem.bin"
adb pull /tmp/sda16_modem.bin
Afterwards, maybe you want to try this modem backup image from another moto-z...
I have no idea wheather that's locked a serial number or if it is just genereic. Make sure you have a backup of your current modem parition!
Flashing is just the commands slightly reversed...
Code:
adb push other_modem.bin /tmp/other_modem.bin
adb shell "dd if=/tmp/other_modem.bin of=/dev/block/sda16"
No Luck
thanks, can you confirm what is the contents of the /persist/wifi and /system/etc/firmware/wifi/?
Just want to check
anilisanil said:
No Luck
thanks, can you confirm what is the contents of the /persist/wifi and /system/etc/firmware/wifi/?
Just want to check
Click to expand...
Click to collapse
My booted system contains a /persist/wifi folder, but with no content
/system/etc/wifi contains 5 files: p2p_supplicant.conf, p2p_supplicant_overlay.conf, WCNSS_qcom_cfg.ini, wpa_suuplicant.conf, wpa_supplicant_overlay.conf.
Are you sure, you redtored all partitions properly? Maybe FSG as well, though I think it's just cellphone related & erased modemst1/2+cache?
benzinerwin said:
My booted system contains a /persist/wifi folder, but with no content
/system/etc/wifi contains 5 files: p2p_supplicant.conf, p2p_supplicant_overlay.conf, WCNSS_qcom_cfg.ini, wpa_suuplicant.conf, wpa_supplicant_overlay.conf.
Are you sure, you redtored all partitions properly? Maybe FSG as well, though I think it's just cellphone related & erased modemst1/2+cache?
Click to expand...
Click to collapse
The phone is booting without any errors at all, so I am not sure!
Same for me, so issue is not with persist. The etc/firmware/wifi is different for different people? I have 3 files, one .ini and 2 bin files- one for 2G and other for 5G- both are empty! Beats me!
I dont suspect wifi hardware going kaput so easily! But there are quite a few people who raised this in other device forums, but no one seem to have succeeded!
edit: I am assuming /etc/firmware are changed when we flash a new rom and the fact that I flashed the stock ROM a couple of times did not help means that the problem is not with /etc/firmware folder? Really clueless!
benzinerwin said:
My booted system contains a /persist/wifi folder, but with no content
/system/etc/wifi contains 5 files: p2p_supplicant.conf, p2p_supplicant_overlay.conf, WCNSS_qcom_cfg.ini, wpa_suuplicant.conf, wpa_supplicant_overlay.conf.
Are you sure, you redtored all partitions properly? Maybe FSG as well, though I think it's just cellphone related & erased modemst1/2+cache?
Click to expand...
Click to collapse
just realised, the contents are hidden, can you please ensure you are looking for hidden files as well?
anilisanil said:
just realised, the contents are hidden, can you please ensure you are looking for hidden files as well?
Click to expand...
Click to collapse
Yes & I did..
BTW, my phone runs on LineageOS.