Question its possible to use adb sideload for overwrite a file? - Samsung Galaxy A02s

Hi, how are you? I'm stuck with a screen lock problem. No USB or developer options enabled (and It cant be enabled, I can only access to de stock recovery mode).
I have been reading and I need to empty the gesture.key file located at /data/system/. But I cant get in to the phone vía adb shell, it only is recognized in sideloadmode.
I know that I can do factory reset and it will solve the problem, but inside the phone there are pics and videos from my girlfriend's pregnancy and that kind of tender stuff that I would like to do not lose with the factory reset. So I was thinking, as I can't connect in other way than adb sideload, that maybe I cant overwrite the gesture.key file by uploading a file with the same directory structure. I am thinking in a update.zip file that contains an empty gesture.key file and the /data/system/ directory.
It would be possible? Maybe if I overwrite the file lock screen pattern will disappear.
I can't find how sideload works (I've been reading a lot but haven't found detailed explanations about what I need, so I post here.
I think that if sideload uploads and decompress the file with the correct directory structure will overwrite the file... it is possible?? Thank you very much for your help

Related

ADB help

ok so today i tried to use a new boot animation zip and at first i tried to do it through an explorer but that didnt work as astro didnt let me paste the zip file so instead i went the adb route thought i didnt know how to use it.
i installed the files from here: http://sites.google.com/site/androidsamurai/Home/adb-for-dummies-1 and opened cmd, i used cd to get to the directory of my adb then i used adb devices to see if my phone was recognized which it was. then i used adb push bootanimation.zip /data/local and it said it copied since it gave me the speed stats, the file size and the time it took. i used astro to look inside the folder but it was empty. i then proceeded to do a few random things like remount and such and repush and the zip would just not appear in the /data/local folder. i then tried adb shell bootanimation just for kicks and it seemed to work, though i didnt know how to stop the animation besides closing my cmd. after that i tried to reboot and it got stuck at the bootanimation so then i used the 1.8.1 update and reinstalled it and i got past boot loop and for some reason the boot animation is the one i tried to install (the stock dell one that is in the themes forum) but the folder still doesnt exist in /data/local.
like i said im an adb noob, so please guide me through the entire proper way to push a bootanimation to my phone and to figure out where i pushed the previous to since it seems to be somewhere but i tried using astro search but cant find it. any help would be appreciated, thanks!
I'm not super talented at ADB either, but i believe that you should copy the boot animation zip into the same folder as ADB on your computer and then run this:
adb push bootanimation.zip /data/local
Also, there is a file manager called Root Explorer, you should use that instead of Astro because astro doesn't allow you to go into some of the system level directories (exactly what your dealing with in this case) but Root Explorer does. That's probably why you can't find what you flashed before.
Hope this helps
- pat
yeah apparently it seems that astro cant view some root files/folders
copy and paste with root explorer is easiest - like you though I am teaching myself how to use adb - get adb wireless btw - its cool if you dont have your cable to hand

Trying to copy nv_data.bin and FAILING

I been playing with my phone for a few days now trying to get it to work and I haven't had much success although I have been learning a hole bunch and now able to load any rom onto my phone easily and flash kernels and such with ease...
The situation is that I received a phone from a friend SGSII I have never had a rooted phone and it came pre rooted, never knew much about it as it is my first Android phone and now love it
never knowing I had to do these things like "backup EFS directory" and such as I know now... anyhow, a few days ago what has happened is I have a stock rom + CF-Root and my phone all a sudden started telling me there is no IMEI and no SIM card present.. after much research, flashing of roms, kernels, bricking the phone, re flashing and so on and so foth....... xda-developers is a FANTASTICK site full of useful information btw now I'm still at the same point but a lot more knowledgeable, I have learned that the problem lies with my efs folder and have found a .nv_data.bak file that is dated dec 31 of last year, at this point it is my only so called backup and hope that it will restore proper functions of the phone, as per some of the guides and other posts and questions I have learned to do this.. so what I have done was copy using ADB my files to my sdcard folder renamed my nv_data.bin to nv_data.bak and my .nv_data.bak to nv_data.bin
also I have used root explorer to copy the hole efs folder to a location on my external sd card and used HC-kTool to make a backup of my efs folder
now I have been trying to use the command to copy my nv_data.bin file in the sdcard folder to my efs folder and it is not working as it gives me msges of write protected file or file exist canot copy... the commands I have been trying to use are
cp /sdcard/nv_data.bin /efs/nv_data.bin
cp /sdcard/nv_data.bin /efs/
I have tried also
rm command to remove the file but nothing has been working...
one thing I should mention is that I have been connecting withough usb cable as I can't seem to connect with that I keep getting device not found so I been using the wireless adb function
abd connect "ip addressort"
I have tried installing the kies driver for usb and the google sdk drivers and none seem to work, in fact kies doesn't reconize my phone aswell... but Odin seems to function through my USB just fine.... not sure if that matters or not but trying to give as much info as possible
Thank you in advance for the help.... this is a great site with very knowledgeable ppl
permissions have to be reset as the back up does not copy the permissions. Use cwm recovery to reset the permissions.
Thank you very much for you quick response, however I have just tried that, booted into cwm recovery, went to advanced and reset permissions, rebooted my hone and still cannot copy the file
Try using a Root Explorer from the market.Connect via wifi obviously if your phone cant detect sim.Phone needs to be rooted.Give Root Explorer root permission and set to R/W from R/O and copy paste the nv.data files and IMEI to the efs folder in the root of your phone,reboot,boot to recovery and "fix permissions" and boot again.
sorry I guess I should of mentioned that aswell but thank you very much for the suggestion... I have tried to edit the file weather just delet it or overwrite or change permissions with Root Explorer and to no success.. also when I push the mount r/w button in the efs folder... nothing happens and the button stays as mount r/w
I found this.Maybe it will help.
http://forum.xda-developers.com/showthread.php?t=1258734
http://forum.xda-developers.com/showthread.php?t=1261948
http://forum.xda-developers.com/showthread.php?t=1085374
and if you manage to get it back then use this:
http://forum.xda-developers.com/showthread.php?t=1308546
Thank, I havent had time to read through them all but I will try tonight and see if I can come up with a solution... I will post here my findings weather they are good or bad..... but thank you very much for the info
I have read and tried and seen all those post, thankyou for the info the problem is still that I cannot modify my nv_data.bin file in any way... I cannot overwrite to it or anything using rootexplorer or adb or any other program... does anyone know of any other programs or command lines to strip the read only permissions on this file as it seems stuck on this and it's driving me insane lol
Gave up
I gave up and had it done professionally, they couldn't figure it out either and had to replace the phone.... Thank you all for the great help, even tho we didn't get it figured out it was great that help was provided
Thank you XDA-Developers your awesome!!
ive the same issue,got a rooted s2 with cwm all the forums cay copy the efe data but i cant find a way,anyone know how to do it?,i need to eddit it to unlock my phone:ie the simlock.
thanks
thank you for sharing your ideas

Changing where OTA updates get stored on LG Spectrum and possibly other phones

Ok, this will be a bit of a technical thread, so bear with me. This is so people have an understanding of how to find and look at the update files that get put on a phone. If you are reading thru this, I will assume that you have a basic understanding of ADB and possibly of shell commands like ls and cd
When you go into settings -> About Phone - Software update, your phone does many checks to the file system. One of them is at a file /data/fota/ipth-muc.prop . Most people do not know this directory exists as when you are in ADB you can not do a list command on the /data directory without root. This file is re-created each time you boot your phone. If we do the following command, we can dowload the file to our computer:
ADB pull /data/fota/ipth-muc.prop
If we open the file, it will look a lot like this.
firmware.version=VS920ZV3
max.pkg.size=157286400
This file can also contain additional data. The string we want to add in there is where to download and place update packages. This can be defined as such:
pkg.location=
If this line does not exist, it will default to /cache/fota . Being as we can not cd into /cache or pull/push files there, this is a bad spot to put it. How ever, we can make directories and read/write to them under /data/local . Using this info we can do the following.
ADB shell
mkdir /data/local/temp
exit
From there, we can edit the original ipth-muc.prop file we pulled to look like this:
firmware.version=VS920ZV3
max.pkg.size=157286400
pkg.location=/data/local/temp
If you edit the file, use a true file editor. Notepad will not save it correctly, but Wordpad had no issues. From there we do the following
ADB push ipth-muc.prop /data/fota
Now when we do the update, it will place the downloaded files into our temp directory (note, you must do this after the phone is fully booted, but before you have the phone look for an update). Once the files are done downloading, click remind me later. Then we can go into ADB and pull the files.
ADB pull /data/local/temp
You will get two files. One will be the update "ipth_package.bin" and the manifest files "ipth_package.bin.dd" . The manifest file also contains the link to the original file name as link to it on the host server. The ipth_package.bin file is a simple zip file that can be opened with almost any archiving program.
The zip is signed by LG using their personal key, so modifying it and pushing it back to the phone is not currently possible. We can however see the contents of an update and see what is being change. I hope to use this in the near future to either break the LG key or find a way to find a glitch in a patch being done.

[Q] How to create simple updater-script that only changes file permissions?

Hello,
Does anyone know how create a very simple "updater.zip" file that does nothing except run the "set_perm_recursive" function and set the "/storage/sdcard0/DCIM" folder and all files/folders under it to 777?
I recently screwed up my wife's phone trying to install an app, and didn't have a backup. Now it is stuck on the bootup image screen and won't finish booting up. I am trying to download her photos.
I connected using ADB pull, but since I don't have root on the phone... I don't have permissions to access the /storage/sdcard0/DCIM folder.
So I thought it might be possible to create a simple "updater.zip" script that I can run from the recovery screen, which would give world read/write permissions to the /storage/sdcard0/DCIM folder. Then I can use ADB pull to get a copy of all her pictures to my computer.
Thanks for any help!

TWRP edit mixer paths

I had some problems with an in call echo. So I tried to fix this by some changes in mixer_paths.xml. I copied the original file to my sd-card so I thought I have a backup. But after I made some changes the phone get stuck and won't reboot. I didn't expect this to happen!
I restarted my phone in TWRP and tried to copy the original file from the sd-card. But I don't know how I can do this. Does anyone have an idea?? Is it possible in terminal? Or should I connect the phone to my computer and try with ADB?
Hopefully there will be a solution and I don't have to reinstall everything!
Edit: In terminal and file manager (in TWRP), I can't find the folder "etc" in "system". There is only the folder "usr". Or should I look at another folder?
NL_henk said:
I had some problems with an in call echo. So I tried to fix this by some changes in mixer_paths.xml. I copied the original file to my sd-card so I thought I have a backup. But after I made some changes the phone get stuck and won't reboot. I didn't expect this to happen!
I restarted my phone in TWRP and tried to copy the original file from the sd-card. But I don't know how I can do this. Does anyone have an idea?? Is it possible in terminal? Or should I connect the phone to my computer and try with ADB?
Hopefully there will be a solution and I don't have to reinstall everything!
Edit: In terminal and file manager (in TWRP), I can't find the folder "etc" in "system". There is only the folder "usr". Or should I look at another folder?
Click to expand...
Click to collapse
Could be just that you forgot to change permissions on mixer_path.xml....you could chmod it from twrp terminal.
chmod 644 /system/etc/mixer_path.xml
You could always restore your nandroid or dirty flash you rom.
Sent from my SM-G955F using Tapatalk

Categories

Resources