After being stuck on OTA2 without root for a while, I finally got it today, and finishing finals and all, I really got to messing around with it. Well, long story short, I backed up my tablet with nandroid, got CM9, then realized I'm having a lot of issues with it/not worth the upgrade yet. I can't use my nandroid backup for some reason either as it keeps giving me some md5 checksum error, so is it advisable to just go wherever after this, whether OTA or OTA2 or w/e, since I guess my backup failed and I'm trying to leave CM9 (too many incompatible applications >.>)
Try the market linked in this thread until a solution is found:
http://forum.xda-developers.com/showthread.php?t=1559264
Alright, thanks a lot.
yahoowizard said:
After being stuck on OTA2 without root for a while, I finally got it today, and finishing finals and all, I really got to messing around with it. Well, long story short, I backed up my tablet with nandroid, got CM9, then realized I'm having a lot of issues with it/not worth the upgrade yet. I can't use my nandroid backup for some reason either as it keeps giving me some md5 checksum error, so is it advisable to just go wherever after this, whether OTA or OTA2 or w/e, since I guess my backup failed and I'm trying to leave CM9 (too many incompatible applications >.>)
Click to expand...
Click to collapse
I was having the same issues with doing a restore, I realized I was using the initial CWR, i downloaded Koshu's fixed CWR at http://forum.xda-developers.com/showpost.php?p=21916505&postcount=71
for whatever reason I had to manually type all the ADB commands in simply copying and pasting was not allowing me to mount it as RW. and dont forget to make sure the IMG file name is referenced correctly in the name. but after that I was able to backup and restore without a hitch.
Code:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb
adb push cwr_ventana_2.img /data/local/
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
su
# mount -o rw,remount /system
mount -o rw,remount /system
# echo "#!/system/bin/sh" > /system/etc/install-recovery.sh
echo "#!/system/bin/sh" > /system/etc/install-recovery.sh
# dd if=/data/local/cwr_ventana_2.img of=/dev/block/mmcblk0p1
dd if=/data/local/cwr_ventana_2.img of=/dev/block/mmcblk0p1
There's no way to bring back that backup that didn't work, is there? I see all the files except the nandroid.md5 as far as I can see, but that in the end is what's necessary to make it run.
You could do it manually in adb, but without the md5 sums you can't be sure that the files are complete/not corrupt.
I believe the restore fails because the backup was bad. To make a good backup you have to clean out the internal sd card, or the backup file exceeds the limit of this version of CWR.
yahoowizard said:
not worth the upgrade yet.
Click to expand...
Click to collapse
If you want to have CM9, perhaps you can contribute by testing and reporting the problems you have. So that you will get double reward: 1) CM9 earlier 2) being acknowledged as part of the project
Well, yeah, I guess the stuff on my tablet wasn't that important. It was all the notes I had taken from this quarter, but the thing was that I took the finals the day before all this went down, so yeah. I'll stick with CM9 for now then see how it plays out from there. The updates have been coming out really fast anyway so pretty happy overall.
Koshu said:
Try the market linked in this thread until a solution is found:
http://forum.xda-developers.com/showthread.php?t=1559264
Click to expand...
Click to collapse
This doesn't seem to change anything. Most of the applications still aren't working in the market, like almost all of them. There might have been a few that I didn't notice, but yeah, not really sure. Was I supposed to place the file in folder, reboot, then clear data, or the other way around =0
I uploaded a new CM9 version with another fix. It doesn't seem to work for everyone (got only a little feedback until now) but if you want to give it a try... Could need some additional testers to pinpoint the bugs.
http://forum.xda-developers.com/showthread.php?t=1490831
(Full wipe before flashing)
Related
I flashed Evil Eris 3.0 couple days ago and could out get the A2SD function to working so I decided that I want to go back to a previous version where A2SD works. When I reboot into recovery menu, I found that everything else works fine with the trackball except the downward direction. That really pissed me off because no matter how hard I try to scroll it down, it does not work. Now the recovery menu does not work for me anymore except the reboot function. It seems that it is the problem with trackball itself because when I reboot it into the system the downward direction still does not work. Anyway, I am thinking about flashing the ROM with terminal commands. Anyone who can help me with this? I'm using recovery image 1.6.2. Whats the command line for wiping the four things(I am not even sure if there is four or five because I cannot get into it! aaahhh) under the wipe function? For partitioning SD card? For upgrading from ext 2 to ext 3(if i remember this function right)? And finally whats the command line for flashing a ROM from SD card? Thanks!!!! Now I really wish that I had the Droid cuz theres a physical D-pad on it!
This will solve your issue:
http://www.xda-developers.com/android/trackball-transplant-on-htc-droid-eris/
Don't forget that when Amon_RA recovery is booted up, "adbd" is running on the phone.
That means that you can get your restore operations done by using ADB on the PC, and the
/sbin/nandroid-mobile.sh
script in Amon_RA to perform all the operations that you would have with the menu system.
do a /sbin/nandroid-mobile.sh --help
with Amon_RA recovery booted, and have a look at the
--listbackup
--subname
--restore
options for more information.
Obviously, this won't fix your trackball. But it does give you access to restore and backup operations in the meantime.
bftb0
I am a newbie with terminal and command lines, so I hope you don't mind if I ask some questions here. I checked the help list of nandroid-mobile script, but I think all the functions are to do with nandroid backup file? it is either to back up or to restore a backup file? I have successfully backed up though. But how do I wipe my dalvik cache and other misc. stuff in the recovery menu? How do I partition my sdcard using the script? and flash an img?
My trackball went out on me the other night when I was working on it. Or so I thought. Just before I called Verizon to send me a replacement, I tried one last ditch effort. I used my tshirt to wipe whatever was on the ball and pressed it kind of hard when moving the trackball around and what do you know, it fixed it. I only use my trackball for when flashing, which is a lot. So hopefully this might help you.
lacrisexistentielle said:
I am a newbie with terminal and command lines, so I hope you don't mind if I ask some questions here. I checked the help list of nandroid-mobile script, but I think all the functions are to do with nandroid backup file? it is either to back up or to restore a backup file? I have successfully backed up though. But how do I wipe my dalvik cache and other misc. stuff in the recovery menu? How do I partition my sdcard using the script? and flash an img?
Click to expand...
Click to collapse
That script only does a couple things in addition to nandroid backup and restores - it is not a replacement for the Amon_RA menu.
Your original post indicated that you were trying to restore a previously saved ROM backup, so that I why I suggested it.
Obviously, it would be better if you got your trackball fixed.
As far as wipes go, here is what happens during a wipe:
Code:
mount /system
cd /system
rm -rf /system/* >>/dev/null 2>&1
cd /
umount /system
mount /data
cd /data
rm -rf /data/* >>/dev/null 2>&1
cd /
umount /data
Since - as you said - you are a newcomer to command lines, you probably shouldn't be doing the above. In particular, the "rm" commands above are extremely dangerous if you don't know what you are doing (although I tried to minimize the danger with the superfluous-looking "cd" commands.
If you would like to learn more about using the command line, or scripting, just pull that file to your PC
adb pull /sbin/nandroid-mobile.sh nandroid-mobile.sh
and study it intently (shell scripts are plain text files). You will learn a lot about what goes on "under the hood" that way.
cheers
bftb0
I'm in the same boat as the original poster. Just need the code to push a stock or closer to stock ROM so I can return to Verizon.
-------------------------------------
Sent via the XDA Tapatalk App
thanks so much! I think I will replace my trackball just for safety. I don't want to temper with the command line that I have no idea of yet! I will certainly look into the shell script later. Also, if I want to learn more basic stuff with the terminal language, what should I do? is there any wikis or websites or even books teaching the language? I am intrigued by all these custom ROMs available for android system and I would love to learn how to build one on my own!
WOW, that is awesome! I never thought that I would be able to do that but this looks so simple!
I tried to push it really hard but nothing changed. I start to wonder if this is a common problem seen in Eris owners? I just couldn't imagine why the trackball will be senseless. Thanks for your tip though!
I just wanted to share a story of woe and redemption so that it doesn't happen to you.
As background, I had sim unlocked my phone using helroz's method a while back, and my phone has been working fine from team whiskey's early days till now. Recently, I was flashing my phone as most of us do. I noted that after flashing the dead horse kernel, my market was not working properly, so I decided to odin back to JFD. From there, I flashed Bionix, but afterward, noted that I wasn't getting any cell reception. After some investigation and several odins, I looked at my software info and found that my baseband was unknown. I flashed back to JFD however, and it worked fine. In fact, this was the only rom where the cell worked. The phone otherwise was functioning flawlessly, including wifi.
Further investigation showed that this has happened to others, and anecdotally, people have fixed it by odining over and over or doing some magic with their sim card. I did just that but to no avail. After some thinking, it occurred to me that maybe my /efs data was bad, so I took a look. Hitting *#06# showed the generic samsung IMEI while in JFD (it did not work in other versions as the baseband was not working), not my normal IMEI. That's odd. I still had the backup from trying to sim unlock it months ago. I tried to overwrite the /efs folder w/ my own, but I could not write it due to 'not enough space.'
Further investigation showed that indeed, my efs partition had been borked, and so I could not write data to it (I could copy however). The only way to fix this is by flashing/odin'ing a new partition. This only works if you have a backup, which I didn't. Basically, I had a fancy media player at this point.
I went ahead and looked on craigslist and found a vibrant w/ a broken screen, figuring I could swap out the guts. I immediately backed up the /efs folder and partition of the broken phone, just in case. On a whim, I tried to flash the efs partition from the broken phone to my phone. Lo and behold, the baseband came back. I was now able to write to that partition, so overwrote the /efs folder w/ my backup from before. My IMEI came back afterwards, and so now, I have 2 functioning vibrants. I'm not sure what data is stored in /dev/block/stl3, but I do know I was able to fix my phone using another phone's data. They both work w/ my sim, though I am unsure if they can connect simultaneously using different sims or if they are somehow cloned, but the IMEIs are different for sure.
The moral of the story is that this phone is nigh unbrickable and even when it doesn't boot, you can always try the jig. The only part of the phone you can't fix w/ a routine odin it seems, is the efs partition, so I would encourage everyone to make a backup and keep it safe. This is not done standard as an initiation into rooting and roms and such, but it should be. Normally, odin'ing a rom does not write to this area, but even w/o screwing with this, frequent flashing and odins can apparently corrupt it, leaving you high and dry. With this backup and odin, you could probably fix your phone from any jam.
Here are the relevant threads on how to do this:
http://forum.xda-developers.com/showthread.php?t=882039
http://forum.xda-developers.com/showthread.php?t=859914
Keep those backups safe!
Thank you for sharing ur experience, I recently noticed that my data speeds have gone down after unlocking my vibrant using the method you mentioned above.Damn, I get edge speeds when I am on a HSPA network. Dunno whats the problem,called up simple mobile,am not data throttled.Sigh..
Sent from my SGH-T959 using XDA App
man this is scary, but your phone still works at JFD right?
Sent from my SGH-T959 using XDA App
It didn't for a while. Now, both phones are fully functional. I had a copy of the /efs folder of my old phone, but not an image of the partition. The problem is, when the partition gets screwed, you can't write to it, making the /efs useless.
That's why I'm trying to get people to make the backup. It takes a few minutes, but can be a lifesaver. I do believe you can flash a foreign stl3 partition and overwrite the /efs like I did, but unless you had a friend, no one would share it w/ you as it contains their imei info. Better to just back up your own. And if you lose your /efs, game over.
How exactly do you back up a partition?
Very cool of you to post this up. Is there any reason to back up your efs partition if you have no reason to unlock?
<---backing it up anyway.
It's not the unlocking. It seems that over time, some people (such as myself) screwed up the efs partition by just flashing/odin'ing various roms. It shouldn't happen, but it does. Consider that no roms write to the stl3 layer, yet mine was working one day, then one odin later, it didn't. I'm sure the number of people this happens to is quite small, but when it happens, it happens. It's like a 6 mb backup which isn't that big of a deal.
It's better to be safe than sorry.
I did an experiment on my Galaxy Tab, that I move the /efs folder to memory card.
Soon I found the reception goes way worse (at least 10dBm less) and the serial number changed to 00000000, then I immediately copied (restore) the folder and everything was back to normal.
I tried to examine the files with hex editor but I found nothing spectular.
vnamee said:
It's not the unlocking. It seems that over time, some people (such as myself) screwed up the efs partition by just flashing/odin'ing various roms. It shouldn't happen, but it does. Consider that no roms write to the stl3 layer, yet mine was working one day, then one odin later, it didn't. I'm sure the number of people this happens to is quite small, but when it happens, it happens. It's like a 6 mb backup which isn't that big of a deal.
Click to expand...
Click to collapse
That's really weird. I've never really looked into the occurrence because I always assumed it was isolated only to those that did some weird hacking in an attempt to unlock, or to those that were developing and found themselves doing some nasty, nasty things.
I just created efs_dev-block-st13.img and efs-backup.tar.gz so hopefully I'm all safe and sound now.
Thanks again! Once I get beyond GPS stuff I find myself clueless.
draikz said:
How exactly do you back up a partition?
Click to expand...
Click to collapse
You need to read the two links in the OP and download adb. You also need root and busybox.
all you need is to root your phone, such as w/ superoneclick which will put busybox on there. Then all you need is adb.exe.
Open up a command prompt where adb.exe is located. You can adb su or just go adb shell and then su.
The only commands you need are:
cat /dev/block/stl3 > /sdcard/stl3.bin (backs up sector management layer of partition)
cat /dev/block/bml3 > /sdcard/bml3.bin (backs up block management layer of partition)
tar zcvf /sdcard/efs-backup.tar.gz /efs (tars /efs folder)
cp stl3.bin efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf efs.tar efs.rfs (makes an odin flashable tar of partition)
I kept a copy of stl3.bin, bml3.bin, efs-backup.tar, and efs.tar.
vnamee said:
all you need is to root your phone, such as w/ superoneclick which will put busybox on there. Then all you need is adb.exe.
Open up a command prompt where adb.exe is located. You can adb su or just go adb shell and then su.
The only commands you need are:
cat /dev/block/stl3 > /sdcard/stl3.bin (backs up sector management layer of partition)
cat /dev/block/bml3 > /sdcard/bml3.bin (backs up block management layer of partition)
tar zcvf /sdcard/efs-backup.tar.gz /efs (tars /efs folder)
cp stl3.bin efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf efs.tar efs.rfs (makes an odin flashable tar of partition)
I kept a copy of stl3.bin, bml3.bin, efs-backup.tar, and efs.tar.
Click to expand...
Click to collapse
I've got backups of stl3.bin, bml3.bin and efs-backup.tar.gz
When I try to make the partition an odin flashable tar it tells me: "No such file or directory".
You have to cd into the directory, or else it should be:
cp /sdcard/stl3.bin /sdcard/efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf /sdcard/efs.tar /sdcard/efs.rfs (makes an odin flashable tar of partition)
This is kind of old news, but nevertheless important.
Months ago in the Q&A section there were two threads about the importance of the EFS, and how a corrupted nv_data.bin and EFS can cause many problems including losing the ability to use a different carriers sim, yet nobody paid attention to those threads, but I thought the info was vital.
Would using ROM Manager and backing up your current rom, also backup the /efs?
vnamee said:
You have to cd into the directory, or else it should be:
cp /sdcard/stl3.bin /sdcard/efs.rfs (just makes copy of stl3.bin to new name efs.rfs)
tar -cf /sdcard/efs.tar /sdcard/efs.rfs (makes an odin flashable tar of partition)
Click to expand...
Click to collapse
Yeah, I did. I'll do it again and post up exactly what I type and put in. Maybe it's just operator error.
Here ya go.
It might have been operator error because that time I watched efs.tar get written to /sdcard
It should be efs.rfs, not efs/rfs. It's a file, not a directory.
SamsungVibrant said:
Would using ROM Manager and backing up your current rom, also backup the /efs?
Click to expand...
Click to collapse
Nandroid does not back up the /efs partition, at least not that I can tell. All those files in the backup folder are of the various partitions, and efs partition is not part of it.
The reason I made this thread to begin with is because when I had this problem, I looked high and low, and found scant info. In the future, if someone else has this problem, this will come up in a search and won't have some lame magical fix that may or may not work.
vnamee said:
It should be efs.rfs, not efs/rfs. It's a file, not a directory.
Click to expand...
Click to collapse
Pinky slip!!! For whatever reason, it took 3 tries but I finally got it to backup. Thanks for the help! I would never think to back this stuff up. Everyone does Nandroid's like crazy, which is good, but losing this stuff is losing your phone!
Excellent write-up vnamee thank you..........
Hi everyone!
The reason why I post this threat is that there is no clearly mention about the /efs folder in the rooting/how-to guides in here. In my opinion, it's the MOST IMPORTANT thing to know for all Samsung devices with Android OS before flashing any custom ROM. There is a really good threat posted in Original Android Development by Rawat, which I'm going to quote right here. Unfortunately, it's not a sticky threat so it's gone somewhere deeper in the forums.
I really beg you for a sticky of this thread, or Rawats to prevent all new users of damaging their phones.
My point is: many of you can agree, the /efs folder is very sensitive. If it get corrupted and you have no backup of it, well.. let's just say it's nearly impossible to get you phone working again. It contains your IMEI number and some other important things! There have been some situations when it get corrupted after flashing some ROMs. Without a backup, your IMEI is gone. The only way to get your phone working again is to send it back to Samsung Service.
Here is the guide, originally posted by Rawat! Thank you very much:
This guide is based on a guide by Candanga on the i9000 forums, and some commands from supercurio
Please hit thanks on their posts and show them some love for the write up.
-----------------------------------------------------------------------------------------------------------------------
I’ve compiled a quick guide to instruct how to make a copy of the /efs folder. I’ve found in many threads suggestions about backing up this folder but the methods itself are very general. Most of the times they suggest to “root and copy the folder” with Root Explorer or similar, but usually it’s not that easy or it just doesn't work for everyone.
This guide ASUMES you have read this Excellent Guide by Darkstrikerfirst:
H E R E <-- Make sure to read the ADB Guide.
I recommend doing this with a Mobile just taken out of the box or with any Official ROM of its Service Provider. If you have already Flashed your phone with another ROM but its working fine, then you can use that /efs also.
Why the /efs folder?
This is a very sensitive system folder that contains Phone-specific information such as the IMEI (encrypted in the nv_data.bin), wireless devices MAC addresses, product code (also in the nv_data.bin), and much more. Often users trying to change product codes or trying to unlock the mobile will end up corrupting data in this location.
Why back it up?
Well, let’s resume it saying that backing-up this little folder will keep you away from Samsung service centres.
***WARNING: I take no responsibility to any damage caused by the methods cited and/or written here. Their sole purpose is to back-up data and not to alter in any way the integrity of the original files of the mobile***
What you will need:
* Rooted SGS II to get permissions as a SU (Super User) and perform the backup
* I would suggest learning a little about the terminal commands used (in case you are not familiar with them), as it’s better to know what you are doing rather than typing strings like a little chimp without knowing what they are; if you are a little lazy, then you have a good chance bricking your mobile. <- Busybox Commands(or Google them)
* Terminal Emulator by Jack Palevich (available from the market) <-Terminal Emulator or use ADB which is included in the SDK Development Tools
The standard prompt of terminal (adb) is a $ sign. Once you enter “SU” it will become a # Sign.
***NOTE: Make sure to keep an eye on the screen of your SGS II during this process, because it may request SU permissions [currently doesn't on CF-root]; else, you will get an error (just if it’s the first time). In Terminal Emulator you will need to reset the app after granting permissions cause it usually freezes***
*Remember: to use ADB you need to enable USB DEBUGGING under Applications/Development in your SGS II.
Here are 3 methods, I recommend that you do both Clean and RAW.
Basic, unix permissions lost :
Code:
su
busybox cp -a /efs /sdcard/efs/
Clean :
Code:
su
busybox tar zcvf /sdcard/efs/efs-backup.tar.gz /efs
After this, you will end up with the file efs-backup.tar.gz in your INTERNAL SDCARD in sdcard/efs/, which is a “tarball” or a ZIP of the /efs folder. That file is your backup. You can expand it with Winrar.
You can also back up the mmcblk0p1 (where /efs is stored) under /dev/block which can greatly support in recovering your IMEI in case of a screw-up:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
alternative
Code:
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
--------------------------------------
original thread by Rawat @ xda: click here
matee89 said:
Without a backup, your IMEI is gone. The only way to get your phone working again is to send it back to Samsung Service.
Click to expand...
Click to collapse
Not 100% true, there are other ways, for example I know how to generate valid nv_data files.
matee89 said:
RAW :
Code:
su
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
Same thing, the target is the INTERNAL SDCARD in sdcard/efs/, so go ahead and copy the file.
Click to expand...
Click to collapse
I think using dd is better than cat, I dont know why but I have a feeling cat could do some character conversion in some circumstances, so :-
dd if=/dev/block/mmcblk0p1 of=/sdcard/efs/efs_dev-block-mmcblk0p1.img
or better still do both, cannot have too many backups
Thanks for info Odia! Well, the backup is still important. Saves a lot of time for newbies, so i think that this guide should be sticky. Everyone can see it clearly then
There is already a thread about this...
rawat thread
And there's an app on the way apparently..
app thread
Yes, but this thread is not sticky. If you at least read a little part of mine post you should see that I quoted Hawats thread and put a link to it. My point is that this should be more visible for everyone. To be honest, it should be sticky like the rooting guides and other how to's, because it can give you serious problems with the device when files inside /efs get corrupted. Myself I haven't know about the purpose of /efs since yesterday, because it wasn't clearly mentioned in here. Just want to help other newcomers to Samsung devices.
This app will do exacly the same thing like you will do right now following this guide. It's not released yet, so this guide should be used meanwhile.
matee89 said:
Thanks for info Odia! Well, the backup is still important. Saves a lot of time for newbies, so i think that this guide should be sticky. Everyone can see it clearly then
Click to expand...
Click to collapse
Sure the backup is important, is why I added some input to your thread about using the dd command to make double sure the backup taken was valid.
Can an admin or mod make Rawat's thread sticky pls?
Okay, shall edit and post the alternative backup method with dd comand instead of cat.
Would be great with sticky. I don't think that majority of people who's flashing ROM's know how important this folder is. From what I've heard the nandroid backup in CWM recovery does not backup the /efs so it's needed to be done manually.
before using this comands you should use mkdir /sdcard/efs if you don't want to get an error
I made clean, raw and dd back up. Now I have two files of 20 MB each and one of 28Kb is it ok?
Yes, it seems okay. I saved my efs backup files on my PC as well in case something happens to the internal sdcard storage.
Thank you for that. I will backup mine tonight.
Thank you got the backup with my Note
Re: mp1806
Probably some of the ROMs that you flashed had an automatic backup script included, so you already got a working efs backup on your sd card. If you want to be completly sure if the backup is correct, you can make it manually by following the steps in my first post. Later you can even copy your backup to your PC if you like to.
There is three or four apps by now that aid you in creating EFS backups.
Most have been mentioned in the other (older) EFS backup thread.
It's one app i forgot the name of, EFS-Pro that works from your computer and my own one (see sig).
If you search for "efs backup" on the market you will find "Nitrality" (or however it's spelled, forgot the exact name right now) and my one.
Mine also offers an option to check the EFS backup if it's OK or corrupted, so can be really sure to have a good one when the check succeeds.
Point beeing:
No real need to tinker on the shell anymore
Great Thanks for this
Hi, I am using the RAW method on my Galaxy Note, rooted, but I keep getting a file not found error. Anyone able to help? I got the su and the prompt changed correctly, but after:
cat /dev/block/mmcblk0p1 > /sdcard/efs/efs_dev-block-mmcblk0p1.img
It just says file not found. What am I doing wrong?
Another way is to use ktool made by Hellcat to backup your efs and even restore.
http://forum.xda-developers.com/showthread.php?t=1314719&highlight=ktool
Anyone knows if this tool is as good as command line way?
(nvm)
Odia said:
Not 100% true, there are other ways, for example I know how to generate valid nv_data files.
Click to expand...
Click to collapse
Can you please let me know how to generate it? I HAVE LOST THE EFS FILES ON MY PHONE!
Samsung Tool
Samsung Tool is the easiest and more safe method
how do you restore it?
I don't think I have seen any mention of this idea yet. Sorry if I missed it...
In a recent thread about the 6.2.2 update and people wanting to prevent it, I thought I read that someone saw the file show up in the update directory. I'm assuming this means the same 'kindleupdates' directory you could manually drop the update into -- but if not, the idea is the same. Why not just take some step to prevent access to this directory?
The exact step to take would depend on how smart the developers were about dealing with problems in the update process
The easiest step would be to chmod 555 it. But of course if the update process is running as root it is under no requirement to honor those permissions! (My experience in the unix world tells me that about half the time, programs running as root do honor the permissions even though technically root overrides them).
Another easy step would be to delete it altogether. But they probably thought of that (if it's /mnt/sdcard/kindleupdates where someone could easily accidentally delete it) and recreate it if it's missing.
One trick that is often done is to replace the directory with a file. Some programmers do not think to check this kind of condition - they see there is something there, but they get an error opening it as a directory, and they just declare it's an error.
A more subtle trick would be to replace the directory with a symlink that points to a read-only directory (such as /system). In this case, they could open it as a directory, and just fail to write there. The programmer probably would not have thought to check whether it's a link vs. a real directory. One possible gotcha is if you point to /system, and /system is r/w, then the update could screw something up under /system. So maybe mount /system r/w, mkdir /system/kindleupdates, remount /system r/o, then link the update dir to /system/kindleupdates.
And finally, I don't know if Android has any kind of loopback filesystem capability, but loopback-mounting something read/only on that directory would certainly fake the OS into thinking there was a directory there; it would definitely be read/only, and I don't think they would ever think to check whether there is actually some filesystem mounted there! (and if there was, all you need is an app that constantly accesses some file you put there, which would make it busy so that it couldn't be unmounted).
The first method won't work because the sdcard partition is fat32 and doesn't accept unix permissions.
it downloads to the /cache folder - this folder is also used for other things like market downloads, logs from twrp and i don't know what else
btw. there are a lot of threads about this from the 6.2.1 update
make a short search for "prevent ota update" - you'll have a lot to read ...
well, i just deregistered my kindle acount and i'm still in 6.2.1...
b63 said:
it downloads to the /cache folder - this folder is also used for other things like market downloads, logs from twrp and i don't know what else
Click to expand...
Click to collapse
Ah, that makes this less practical. Still, perhaps when the next update comes out I can try a variation on this but it requires the filename to be known.
If the update is downloaded as a single file to /cache, which is named the same as the file you can manually grab, then someone who hasn't gotten 6.2.2 (and is not averse to this failing) can try this in a root shell:
mkdir /cache/update-kindle-6.2.2_D01E_3205220.bin
mkdir /cache/update-kindle-6.2.2_D01E_3205220.bin/blah
The purpose here is to put something unremovable in the way of the file it wants to download. Most likely if the update sees something with the existing name there it would probably want to blow it away (after determining it's incomplete) - and since any update there would normally be a regular file, they probably would do nothing more complicated than a simple unlink syscall to delete it before re-downloading. However, since it's a directory with something in it, that unlink will fail. In actuality, making the subdirectory (second command above) should be unnecessary because the unlink should not work for directories; there's a special rmdir syscall for them.
btw. there are a lot of threads about this from the 6.2.1 update
make a short search for "prevent ota update" - you'll have a lot to read ...
Click to expand...
Click to collapse
I did read a lot of that last time and I don't think I actually saw a definitively successful method. If there is one it should be stickied
My interest in this is a little different from most of you guys - I have very limited satellite internet and I don't like these unscheduled 185-meg downloads so I want to be able to update only when I want mostly to control that. This kind of means looking for the least-intrusive way to accomplish this.
/cache/update-kindle-6.2.2_D01E_3205220.bin is exactly where it downloads
if you find a way to even prevent the download, that would be greatly appreciated
Unfortunately I already got the update so I can't try it this time.
at least you could try your method with a dummy file of an other name and try to overwrite it with adb - if you can't overwrite it there's a good chance
I think I'm about the only one who prevented 6.2.1. I did it by constantly checking the cache folder. Found the update by chance and deleted it before it updated. Waited over a week for it to come back. Never did. An app that watched the cache folder for the updates and then moved/deleted them would work fine
Sent from my SGH-I897 using xda premium
jcase already work a way around this automatic OTA update, so when FIREMOD is ready to replace burrito I think we will have no more problem with this OTA issue. (you can find jcase announcement in the kindle developer section)
Heres what I have done to prevent this.
1) Droidwall (white list only the apps you want to allow internet access)
2) Removed "otacerts.zip" from /system/etc/security/otacerts.zip.
3) I removed "OTASilentInstall.apk" /system/app
4) Installed this 6.2.2 based Rom http://forum.xda-developers.com/showthread.php?t=1439916
Hopefully this eliminates the OTA. I had my Fire rooted on 6.2.1 with twrp and it OTA'd on its own, broke root and twrp. So I rerooted with burritoroot2 and installed CWM based recovery.
DISCLAIMER: YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DEVICE IF YOU PROCEED.
The original thread (http://forum.xda-developers.com/moto-g/general/mod-save-data-space-cache-partition-t2942765) was getting to cluttered up with development and testing so I decided to start a new thread with the "finished" product. The original thread will be renamed to Q&A/Development. We might even ask for the old thread to be closed down. (up to @Bert98, the thread's creator.)
Moto G's internal eMMC card has a ~600Mb partition called /cache, which is not used since the apps' cache is stored in /data, so the latter fills up and the first one stays empty.
Owning a 8Gb model, having 600Mb not available for storage really bugged me, because my phone's memory (/data partition) was always full because it's a 5.7Gb space shared between apps and microSD files.
Now, it may not work for you if:
a) you have A LOT of apps installed.
And by "a lot", I mean more than 90-100 apps, but if you have a 8Gb model, you probably don't
b) you're running ART (this is default in lollipop and newer)
Since ART uses a lot more space than dalvik, the space in the /cache partition probably won't be enough. When I was running ART, it used 1Gb more than dalvik.
Original post by @Bert98
Click to expand...
Click to collapse
This was tested on my moto g 16GB which is running RetailUS_4.4.4 kitkat with CWM recovery. The custom ROM procedure was tested on the same phone but with cm11 Nightly installed.
Prerequisites:
1. You must have "adb root" functioning. If you don't head to this thread: http://forum.xda-developers.com/showthread.php?t=1687590 and there is a free download link at the bottom of the post.
Download and install the apk on your phone. Open up adbd insecure (the new app) and grant it superuser rights PERMANENTLY. Check the box that says "enable insecure binary" and make sure to check the box
that says "enable at boot."
2. You must have a recovery that can accept adb shell commands.
3. Root Access Duh?!
4. A windows machine capable of running batch files.
5. A decent text editor, notepad will work but notepad++ is strongly recommended. (Only needed if you are using STOCK ROM procedure)
Please, please make a nandroid backup before you continue!!!!
Stock ROM procedure:
Read the directions very carefully and then read them again, before continuing.
1. Download the cachemover_v1.3.zip from: LINK REMOVED DUE TO SCRIPT ISSUES.
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover_Stock.bat
5. Follow the onscreen instructions until you get to the part where it says to edit a file.
6. About halfway through the script it will pull a file called "init.qcom.post_boot.sh" to the folder.
7. Open it with a TEXT editor and navigate to about line 487 (Might be different for 8gb model). Look here for a better understanding: https://www.dropbox.com/s/jr5lyl5s5i2jtpg/where to paste code.PNG?dl=0
8. Start a new line and paste this code in the file: (Refer to the image above for help)
Code:
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
9. Make sure to save the file in the same folder as the cachemover_Stock.bat
10. Press any key to continue on the script and let it do its thing.
11. It will reboot several times and land you on the home screen/lock screen.
12. If the script hangs after a reboot, you need to unlock the device to reestablish a connection with your computer.
13. There might be one or two force closes but once you close the notifications they will not come back.
Custom ROM procedure:
USE THIS FOR ROMS THAT DO NOT REMOUNT OR CHANGE PERMISSIONS OF /CACHE ON BOOT
1. Download the cachemover_v1.3.zip from: https://www.dropbox.com/s/bzj34g4q1s61ojz/cachemover_v1.3.zip?dl=0
2. Extract the contents.
3. Connect device to PC and navigate to the extracted folder.
4. Double click/Run the cachemover.bat
5. Follow the onscreen instructions.
If anything goes wrong:
Go to recovery, wipe cache, then wipe dalvik-cache and reboot. This should get your device back to how it was.
(If you used STOCK ROM procedure)
The script made a backup of the "init.qcom.post_boot.sh" file to /sdcard/init_backup
You can restore the shell script to /system/etc/ via shell commands or by using a root browser. To restore permissions:
Code:
chmod 740 /system/etc/init.qcom.post_boot.sh
chown root:root /system/etc/init.qcom.post_boot.sh
Custom ROM procedure already has a restore script!
I am currently working on an auto restore script for stock and that will be relased soon, hopefully! :good:
Changelog:
v1.0 - First stable release. Does not work on STOCK ROM.
v1.1 - Added a restore script.
v1.3 - Added support for STOCK ROM. There are still a few bugs.
How it works?!?!
Coming soon...
Huge thanks to @Bert98 and @dd043
Hit the thanks button if it worked! I went through about 50 factory resets, and reflashed the ROM about 25 times, and put about 10 hours of work into this script! Really motivates me for future projects. :laugh:
Thanks for your help man and effort.
I encountered a problem, everything works up until my device boots in CWM to fix permissions, then just sits there doing not alot I don't even see the option in my CWM.
Any ideas? cheers
Sent from my XT1032 using XDA Free mobile app
When it reboots to cwm unplug the cable and replug it, if it hangs just type these commands manually from a command window.
chmod 655 /cache
chmod 655 /cache/dalvik-cache
chmod 655 /cache/dalvik-cache/*
reboot
If this does not work you may ned to go into mounts & storage in the cwm menu and click mount /cache. Then try the commands again.
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
You have a typo in the threads title. Just a heads up.
Vuciz said:
You have a typo in the threads title. Just a heads up.
Click to expand...
Click to collapse
Thanks for letting me know!
dd043 said:
I'm having some issues on stock.
I thought 0655 fixed everything but no, I can't install any app after moving the dalvik-cache to /cache. I tried chmoding 0777 on the new cache folder, on /cache itself, to no avail.
Code:
E/dexopt cannot open '/data/dalvik-cache/[email protected]' for output
Anyone can confirm it's not only my device? And/or can help find a fix?
Also does someone knows how to execute commands on a particular init step? Real init.rc scripts can do:
Code:
on post-fs-data
mount -o bind /cache/dalvik /data/dalvik-cache
It there was a way to achieve the same from post_boot/init.d we could mount -o bind /cache/dalvik /data/dalvik-cache and all permissions issues would disappear as well as the need for symlink.
Click to expand...
Click to collapse
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
skyguy126 said:
Let me try and do that right now... Ill get back to you if it does!
My script works on stock btw... But the mount way seems a bit easier and might cause less errors than my way.
Try it please.
Click to expand...
Click to collapse
Yes I've tried your script, all went well but the result is the same. The script itself works nicely btw
Applications present before moving cache work perfectly, but I can't install anything new. I suspect it might be my device but before wiping everything I'd prefer feedback from others :fingers-crossed:.
I cannot install new apps as well. The mount command you showed me has the same effect too. I honestly don't know anymore, the sym link did not allow the install of new apps nor did the mount command you sent me. Correct me if I am wrong.
Edit: Going through all the init files on my phone to see which one remounts /cache at boot.
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
I don't see the mount cache command in CWM strange
I've managed to get back to normal, thanks for everyone's help though, I will keep and eye on the thread
Sent from my XT1032 using XDA Free mobile app
non-windows version?
Thanks for this tool. It's a great idea and our Motos really need it.
However, I have a problem - I do not own a windows license (os x and ubuntu user) and I would prefer not to spend $120 just to use it for this script. Pirating is out of the question for me.
I was wondering if there is any chance of having this script written for linux and/or mac. If impossible, is there a LEGAL way of running windows in a virtual machine? Something like a trial or similar?
If you know how just convert it to shell script for osx and Linux. I give you permission to do this but you may not take credit or rehost your creation.
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
skyguy126 said:
Why does the init.rc get overwritten at boot. Is it because the kernel (boot.img) is the one that copies it over? I have found by changing the perms/locations in this file and init.target.rc you can achieve what this mod is trying to acomplish.
Click to expand...
Click to collapse
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
dd043 said:
Yes the init.rc is in the boot ramdisk. I don't think it would be worth the trouble to rebuild a boot.img. The moto g is fairly unbrickable but it's quite a lot of work to setup an environment to rebuild an image :/.
Too bad for the mount command, I was sure it was working but maybe I had changed something else and don't quite remember the steps to reproduce
We could possibly implement a shell script toggler for when we need to install new apps, but I'm afraid it'd become annoying fairly quickly: I noticed the issue initially because google play services decided to update itself, failed, and broke all google apps. As far as I know this autoupate can't be disabled.
Thanks for trying!
Click to expand...
Click to collapse
How about making a simple apk that toggles this feature. Something like when you click the icon it doesn't even open but gives a little notification of success. Something like that. I myself am not experienced with apks but I can put together a shell script for the apk.
skyguy126 said:
Ok so I have the kernel extracted and we could modify and flash that, but I believe that it's not really necessary. There are a lot of risks to flashing kernels and I am not willing to take it. So is there a way we can modify dalvik so it creates it's cache in /cache instead.
Click to expand...
Click to collapse
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
Ill try it. I don't mind doing a bunch of resets because I am using my moto g as a test bench anyway. My daily driver is the OnePlus One
dd043 said:
Patching dalvik itself sounds promising. It can probably be done with in a batch script with a command line hex editor.
The path is defined in frameworks/base/cmds/installd/installd.h
Code:
#define DALVIK_CACHE_PREFIX "/data/dalvik-cache/"
Not sure if there is another mention in the source tree.
But there's nothing to say we wouldn't face the same issue, the error message in the logcat is pretty generic
Click to expand...
Click to collapse
EDIT: Unfortunately it didn't work. I don't know if I modified the installd file correctly. The program I used is HxD.
Is there a way we can force dalvik to start after the directories are created. And change dalvik to create it in /cache.