SDcard for apps not possible - G1 Android Development

From what I can tell anyway. I was working on this, and I had it working up until installing a new app from the Market. Here's the tutorial I wrote:
Code:
Note1: This process can brick your phone, and it can crash the Android OS. Please use with caution, and know that you are responsible for your own actions, not me, nor anyone else.
Note2: If the Android OS does crash (signified by the Android loading screen, with the flashing Android logo) a factory reset is your best option. It saved me a few times when working on this process.
Note3: Note that a fresh start (factory reset phone) is best for this process, as it changes where all apps are going to be stored and used from.
Note4: Your SDcard cannot be accessed when the USB cable is plugged into your computer, so note the apps will not work/will not work well if you are connected to a PC.
Get root
In terminal:
1. su
2. cd data
3. mkdir /sdcard/data/app
4. mkdir /sdcard/data/app-private
5. mv app app2 (don't want to delete the directory terminal is running from, also kept for backup)
6. mv app-private app-private2
7. ln -s /sdcard/data/app app
8. ln -s /sdcard/data/app-private app-private
And bam! Done.
I then used adb push/pull to backup the app and app-private directories to the SDcard. (just in case, for the terminal app. And I tried this process with and without this step, so I know it isn't this messing it up)
Now Terminal Emulator runs, as well as everything else, but when I download/install a new app, my phone freezes as it goes to install it, and then crashed and goes to the Android OS loading screen forever.

I also worked on this and ran into the same problems you have...I know that there are some other folders that deal with the apps we download from android market.. One of the problems you may be having is that when installing there is an intitial setting up communication that is trying to occur between the downloaded apps, /sdcard/app, and other folders on the phone. When the sdcard/app trys to communicate back with the other party, your errors occur and you crash....I would suggest doing this again, hooking your phone up to DDMS and reproducing the crash again so that you can see what is throwing the errors...that may give you a better idea of what else needs to be done....
I would love to help in any way possible as I was working on this as well, btw, when you get stuck at the flashing android, there is no need to do a reboot, you can plug your phone into your computer and run the adb shell even though it isn't booting up. Since you can run the adb shell, you can fix the problem. Also, you could run DDMS to see what is keeping it from booting as well.

Me too!
I'm working on this as well, I will relay any progress I make, hope you will do the same.
Thanks!

Phromik said:
Now Terminal Emulator runs, as well as everything else, but when I download/install a new app, my phone freezes as it goes to install it, and then crashed and goes to the Android OS loading screen forever.
Click to expand...
Click to collapse
one question .. why are you trying to install apps to /sdcard??

This is an old thread that got bumped. This is not the way to go about getting apps to install to the sd-card.

Related

Simple Guide for Rooting (Tweaks Coming Soon)

I owe much credit to toastcfh, none of this would be possibly without his work on originally rooting the EVO.
Getting Root & Recovery Mode
(My version, dumbed down even more)
You have three options with rooting:
1) Toasts Rooted ROM - Missing Apps in Market
2) Rooted Stock ROM - No 4G Support
3) Unrevoked Root Patch - No system access in recovery (can't remove sprint apps, etc)
To get a rooted stock ROM, you have to start with Toasts, instructions below; you can find details after.
If you want the Unrevoked Root patch, install a file browser on your EVO and install this.
1. Copy this to the root folder of the SD card, you can do this by syncing the Evo as a disc and just copying in windows.
2. Shut off the Evo, and hold the "volume down" button while powering it on until you see a white screen. Every question it asks, just answer yes. DO NOT UNPLUG, let it finish at all costs, no matter how long it takes.
3. Rename the file you copied to the SD card. (to avoid accidental re-flash and save it for later)
4. Download this and unzip to anywhere of you liking on your desktop. Run the setup, if it asks to accept and install a bunch of stuff, hit cancel, you wont be needing most of it. Select available packages and it will show a repository url, the actual url is irrelevant and will be google's be default...we want to expand the list and select SDK Platform 2.1. Accept an install the selection.
What you just did is installed the Android SDK which includes adb, a shell connector for your phone that we need to operate in recovery mode.
5. Hold the Windows key and press "R", type CMD in the run box. (Run the task with Administrative privileges if there is an option)
Type "cd " in the CMD window, do not forget the trailing space, it is important and DO NOT HIT ENTER yet.
Now, with that CMD windows open, go to the folder you installed the android sdk. There will be a "tools" folder, drag the tools folder into the cmd window.
Press enter, this will set your working directory to the tools folder.
6. If you have not installed drivers for your Evo, there is a folder that comes of the sd card called "HTC-Sync", run the setup in there and it will install sufficient drivers automatically.
After drivers are setup sync the phone using the HTC Sync mode, this will ensure we can control the phone using adb.
Go to your CMD window and type "adb reboot recovery", you will see your phone reboot...it will show a red warning icon on the screen afterwards, this is perfectly normal and good to see such.
7. Your phone should not be in recovery mode, but the filesystem will be offline. Download this to setup the shell for us before we can mount the filesystem. Run "recovery-windows.bat", if you are using Vista or Win7, make to sure right click the file and "Run as Administrator"...you will see another CMD window popup and do some work, just leave it open. You should now have the shell setup in Recovery Mode on your Evo.
8. Go back to your original CMD window we setup, type "adb shell" and hit enter, this will set all commands to work right on the phone. You should see a line with just "#", that is what we want.
Now type "mount /dev/block/mtdblock4 /system" and hit enter.
You should now have your Evo in recovery mode with a shell setup and filesystem mounted. This is where we can begin making changes.
Now that this has all been setup, you may want to go back after making some changes.
Repeat steps 5-8 to re-enter recovery mode with the filesystem mounted.
If you want to continue and do the stock update, check here.
Basically, copy that file to the SD and do steps 5-7.
Then use the onscreen (on the EVO Recovery Mode) to "Flash from ZIP" and select the rooted stock rom update.
WARNING: You must clear user data if the update creates issue, you will know right away.
so this is a third way of rooting, if i used a different way how do i get rid of it and use yours, i'm so tired and confused.
Post Removed to maintain consistancy, see 1st post in thread.
root rom and activesync?
I'm a complete noob here but: By using this method do I still retain the ability to run ActiveSync/Exchange support? (Didn't think this was in the SDK Platform 2.1)
What about Sense?
What the crap is up with the title of this thread? How us this a tweak or an optimization?
Good noob friendly guide, kinda tldr, but what I did readlooked good!
Change ur title
Neotelos_com;
[B said:
You have two options with rooting:
1) Toasts Rooted ROM - Missing Apps in Market
2) Rooted Stock ROM - No 4G Support[/B]
....
Click to expand...
Click to collapse
Any thought about the third option (i.e. unrevoked, new sticky, apk??) will it do the same things? i read users aren't losing full market, 4g etc.? Someone much smarter than me please weigh in.
adeyo said:
Any thought about the third option (i.e. unrevoked, new sticky, apk??) will it do the same things? i read users aren't losing full market, 4g etc.? Someone much smarter than me please weigh in.
Click to expand...
Click to collapse
Yes, adding in right now...just tested and it works well.
I need to check if it allows things to be changed in recovery mode (which is important for removing the Sprint bloatware)
johnsongrantr said:
What the crap is up with the title of this thread? How us this a tweak or an optimization?
Change ur title
Click to expand...
Click to collapse
I have plans for adding in tweaks, which will be delayed a bit...
Sorry for any inconvenience.
Neotelos_com said:
Yes, adding in right now...just tested and it works well.
I need to check if it allows things to be changed in recovery mode (which is important for removing the Sprint bloatware)
Click to expand...
Click to collapse
If you have root at all, and you have "rw" permissions for "system". You should be able to remove sprint apps when the phone is booted, assuming you dont have root while in recovery.
Is something different on the Evo that im missing?
can you not do this
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
ls
Then remove the apps like so
rm NameOfApp.apk
rm NameOfApp.odex
Not saying this will all work.. But if you have root, shouldnt this work to remove sprint apps.
Jus10o said:
If you have root at all, and you have "rw" permissions for "system". You should be able to remove sprint apps when the phone is booted, assuming you dont have root while in recovery.
Click to expand...
Click to collapse
You can make changes like that but it will not actually save to the NAND.
So...you can remove, but it will come back after reboot.
Neotelos_com said:
You can make changes like that but it will not actually save to the NAND.
So...you can remove, but it will come back after reboot.
Click to expand...
Click to collapse
Well thats all kinds of dumb..
I give it a week and there will be something better working.
Nice write up. The only problem is, I don't have the sync software on my sd card because the best buy employee knew about the evo's sd card problem and formatted it, erasing everything on the card. I checked htc's site and they had the drivers for download, but it keeps giving me an error saying it's not compatible. I'm using windows 7 64bit. Any ideas guys?
Jus10o said:
If you have root at all, and you have "rw" permissions for "system". You should be able to remove sprint apps when the phone is booted, assuming you dont have root while in recovery.
Is something different on the Evo that im missing?
can you not do this
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
ls
Then remove the apps like so
rm NameOfApp.apk
rm NameOfApp.odex
Not saying this will all work.. But if you have root, shouldnt this work to remove sprint apps.
Click to expand...
Click to collapse
you CAN remove apps like that, using toast's custom recovery. if you do your shell, and mount, in recovery, using adb, you can go to /system/app and rm whatever you want (be careful not to remove anything important, probably wise to pull whatever first, in case you need to push it back)
i had problems when i did an rm on a file, but that is because apparently i forgot to rm it's info in /data/data too. word to the wise
HTC Sync Torrent
http://thepiratebay.org/torrent/5609530
PLEASE SEED AFTER DOWNLOAD!
New android user here!
So to me it seems like all three have something they're not able to do. Seems best to wait for a root release that your able to take full advantage of, right?
I'm a former WM flasher , I need to learn android still. I want the free hot spot/tethering, more battery life as I need 2 batteries to make it through the day -.- (I kill apps constantly, 4g turned on rarely,ect, ect)
Any feedback is appreciated,
Sean
can someone point me in the right direction to do this using a mac not new to android just the mac os i did pretty much everything but im stuck on the htc sync part HELPPP PLZ thanks
kingcliff00 said:
can someone point me in the right direction to do this using a mac not new to android just the mac os i did pretty much everything but im stuck on the htc sync part HELPPP PLZ thanks
Click to expand...
Click to collapse
Try going to Settings -> Applications on the evo and enable usb debugging...if that5 gives you adb access that's all you need
confirmed working with unrevoked root method. It can tether 3G or 4G, depends on how you connected to the Sprint network. 3G was 0.80Mbps DL, 4G was 2.63Mbps DL.
Before using unrevoked root method, I had applied the sdcard patch already. so it doesn't matter if you applied the sdcard patch or not (OTA updated).
You really shouldn't kill tasks. Just cycle the battery a couple of times and turn your antennas off and on when u need them. Especially if u are in spotty 3g coverage. There already one or two official write ups that say task killing is bad I use to do it and got forceloses and errors all the time. Its not about how many tasks you have running I.e. memory, items about cpu and antenna signal that kills you're battery I'll find the link if I can. My battery life is pretty good and I'm a heavy user.
Sent from my PC36100 using Tapatalk
i cannot get recovery bat file to work. I am at the red exclamation point screen on my evo and i run the bat file as amdmin. it pops up for a second then closes and nothing happens.
Edit: NVM I figured it out. on to the next step.

[Q] Flash Google Apps on bSquare MDP 8660

Hi,
I tried finding a better place to post this, but there are no device forums for the bSquare MDP 8660 probably because its not that common and its a 'development phone'.
I'm using one of these devices in the lab I'm working in and I wanted to see if I could flash Google Apps on it since it comes without any of them (Market, Maps, Gmail, etc.).
Since it has an unlocked bootloader, can I just flash Google Apps (from Cyanogen's website) to it the same way you do it when installing the Cyanogen ROM? Are these files device independent? Or would this be an almost sure way of bricking the phone?
Device website: bsquare.com/snapdragon-mobile-development-platform.aspx
OS: Android 2.3.4
I would really appreciate any guidance/suggestions. Thanks!
gjain89 said:
Hi,
I tried finding a better place to post this, but there are no device forums for the bSquare MDP 8660 probably because its not that common and its a 'development phone'.
I'm using one of these devices in the lab I'm working in and I wanted to see if I could flash Google Apps on it since it comes without any of them (Market, Maps, Gmail, etc.).
Since it has an unlocked bootloader, can I just flash Google Apps (from Cyanogen's website) to it the same way you do it when installing the Cyanogen ROM? Are these files device independent? Or would this be an almost sure way of bricking the phone?
Device website: bsquare.com/snapdragon-mobile-development-platform.aspx
OS: Android 2.3.4
I would really appreciate any guidance/suggestions. Thanks!
Click to expand...
Click to collapse
Most probably yes.
Well here's my advice. Follow at your own risk. It might not probably brick it but there's always the slight risk of stuff going awry.
1) Make a Flash backup.
2) See if you have the system/app folder intact.
3) Flash the Google Market(yes, only the market.)
4) Install whatever the apps you want from the Market.
All Google apps except Market and Talk can be downloaded from the Market. You can of course flash the whole gapps update but downloading this way gives you some peace of mind and chances of avoiding any possible incompatible apps. (Like Voice Search which may not work properly on all ROMs. But, if it's AOSP, all Google apps would work and should work. )
Most of the Google apps would be device independent since most of them would use the Android API and not the native platform.
Flashing custom recovery - didn't work
Thanks for the guidelines.
I tried flashing ClockworkMod recovery so that I could make a backup of the phone, but every time I boot into recovery it shows a blank screen now. ADB doesn't recognize the device either. I tried Amon Ra's recovery and the phone is doing the same thing.
Before flashing any of the custom recoveries, the phone would just show the triangle when booting into recovery. It did show up on ADB though.
Would you have any suggestions on how I should continue? In case its of any use, I do have a package that I downloaded from the manufacturer's website that contains the original boot, recovery, and system images (along with some other files).
gjain89 said:
Thanks for the guidelines.
I tried flashing ClockworkMod recovery so that I could make a backup of the phone, but every time I boot into recovery it shows a blank screen now. ADB doesn't recognize the device either. I tried Amon Ra's recovery and the phone is doing the same thing.
Before flashing any of the custom recoveries, the phone would just show the triangle when booting into recovery. It did show up on ADB though.
Would you have any suggestions on how I should continue? In case its of any use, I do have a package that I downloaded from the manufacturer's website that contains the original boot, recovery, and system images (along with some other files).
Click to expand...
Click to collapse
As I told earlier, I'm not so familiar with the device.
If ADB is not working in recovery, it could either mean that the USB drivers(the drivers in the device, not PC) are corrupted or that the recovery is incompatible.
If CWM recovery you used is 100% compatible with your device(ie other people are using it without issues), it means that you must reflash all your files to factory and then flash a fresh copy of recovery. Simply, you must start it from scratch.
If you have no idea of the compatibility of CWM with your device,
1) Check and see if ADB/fastboot is working well with your device in other modes(boot, system). You can perform a simple file transfer and check the checksum of the original copy and copy on your device to ensure integrity.
2) If ADB/fastboot works well in all other modes but fails only in recovery, flash stock recovery(only recovery) and see if adb is working well. You can do the same thing as before. If adb/fastboot works well in stock recovery but fails in CWM recovery, it probably means CWM is not fully compatible with your device.
If CWM works well, go ahead and make a backup and proceed to flashing market. But, if like I said in 2), if CWM is not fully compatible with your device, proceed with caution.
As an an alternative, if you are going through all these ONLY to get the market, you can extract the market update and push the relevant files to the correct paths in the device using ADB in recovery or bootloader mode.
Installing only the Market app
Hi Nibras,
Sorry for not replying back to you. My college classes got started and I couldn't spend much time on this project.
I liked the idea of just extracting the Market app and installing that (since that is all I really need).
Do you think I could just use the procedure outlined below, even though I won't be doing it on Honeycomb:
Installing Android Market over your freshly installed HoneyComb will require a different approach than just installing an APK.
Make sure you have ADB up and running, and your device recognized. Refer to our guides on what is ADB and how to install it, and how to enable ADB USB drivers for NVIDIA Tegra and Tegra 2 based devices.
Download this version of the Market (2.2.11).
Download GoogleServicesFramework.apk.
Place the files in any folder on your computer and open a Command Prompt window, browsing to that folder.
Enter these commands in the Command Prompt window:
Code:
adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system
adb push Vending.apk system/app/Vending.apk
adb push GoogleServicesFramework.apk system/app/GoogleServicesFramework.apk
adb shell
cd system/app
chmod 6755 Vending.apk
chmod 6755 GoogleServicesFramework.apk
exit
adb reboot
Now go to apps, open the market and sign in. If the Market won’t open at first, reboot and try again and it should work.
Click to expand...
Click to collapse
gjain89 said:
Hi Nibras,
Sorry for not replying back to you. My college classes got started and I couldn't spend much time on this project.
I liked the idea of just extracting the Market app and installing that (since that is all I really need).
Do you think I could just use the procedure outlined below, even though I won't be doing it on Honeycomb:
Click to expand...
Click to collapse
That should work I guess. But, flashing via recovery is just a one step process. =)
Update.zip also does just the above process, I guess. It just saves us a couple of steps. Also, if you make a recovery backup, if anything goes wrong(say boot loop or force close of system at boot), you can revert very easily since recovery is independent of all the other data on phone.
And, I guess you might have to push Talk.apk too. I'm not sure about it though. Some people complained that removing Talk.apk broke the Market authentication.
If you want to push Talk.apk, get the apk file and,
Type adb push Talk.apk system/app/Talk.apk after adb push GoogleServicesFramework.apk system/app/GoogleServicesFramework.apk
Also, type, chmod 6755 Talk.apk after chmod 6755 GoogleServicesFramework.apk.
Btw, you can also ignore Android Market altogether and use Amazon App Store as well as GetJar.com. They both offer install-able Market apps. Of course, they don't have a collection as large as Android Market.
@gjain89:
Did you ever try pushing the Market files to the MDP? If so, then did it work? I have one of these and I'm in a similar position.
Thanks
I have one of these...
I used adb to push the files. However the system partition barely has any room for more apps. so apps larger than 2MB won't install, unless you obtain the APK from a secondary source.
Refer to this thread for more information: http://forum.xda-developers.com/showthread.php?t=1400737
And this one: https://developer.qualcomm.com/forum/qdevnet-forums/general-discussion/6864
Plus, many apps force close.
Enjoy!
PS: Let's try to stick together, we might be able to fix some of these problems. Maybe someone could build a custom rom.

[Q] system files missing

I have a Spreadtrum based S930 phone.
It's on a boot-loop and the only thing working is the recovery mode. (While I was playing around with it, I noticed that it had a fastboot partition but, I never found a way to access it - only has 4 buttons: POWER, UPVOL, DWNVOL, and HOME.)
I tried to install an app in ZIP but, I got an error saying that it wasn't verified so I tried to manually install it by unpacking it directly into the folders. After doing so, it still didn't work AND the equalizer app that I installed began not to work either. I then tried to manually uninstall it by deleting the files. It didn't work (or at least my equalizer app still didn't work) so, I tried to restore it to the way it was. I deleted the BIN, ETC, and LIB folders and was replacing them with the ones I originally had before the installation but the phone suddenly rebooted. Hence, now it's on a boot-loop.
I can still go into recovery-mode but I can't use adb shell commands because it says that it can't find it (/SYSTEM/BIN/SH). I tried to push it but I get an error saying that I don't have access/permissions for it.
Before it happened, I was able to extract a boot.img but I can't get it in because...
...I don't have access to fastboot and adb shell options.
...I tried creating my own ROM but I get signing issues.
The only thing that seems to work is the push and pull adb commands (remount, logcat, and bugreport gives me an error) and anything I push doesn't stay there when the phone reboots. In recovery-mode, the phone only stays on for about 10 minutes before it restarts.
I've tried pulling some files. The RES folder seems to be intact. BIN and ETC still have some files in them but, the SYSTEM files are completely gone.
Any input would be very much appreciated.
To do list:
- figure out a way to do boot using the SD card
- install a new kernel
Hindrances:
- phone does not even recharge the battery; it simply enters the boot-loop mode
I'm obviously an android noob but I can follow directions and think of a way to piece things up from different sources. I just need someone to point me in the right direction.
...or is this a hopeless case?!

[Q] /sdcard not accesable anymore

Hi together,
earlier I wanted to finally give the L-Preview a shot so I downloaded it and installed it as it was mentioned in the thread's instructions. Everything was fine until I was forced to reinstall it because Wifi kept getting stuck at switching (which didn't fix itself after a reboot) and some other things. So I did everything again like I did before but after I booted it up again and set up everything I noticed that in ES-File manager I couldn't access my sdcard directory. So I booted back into my recovery and saw that even there my usual sdcard directory was nearly gone except for a few folders (0, clockwordmod, legacy, obb and TWRP) which I couldn't see in ES-File explorer before. Because I was a little confused (and angry because I never had something like this happening) I just rebooted my device and connected it to my pc to see what I can access from there. But it was the same result like with the manager, there were no folders at all . So I went back into my recovery and just looked a bit around and after a while I found out that the whole /sdcard files just moved to the "0" folder that is inside the "old" sdcard-directory. And this is kind of where I am at right now not knowing what to do to get everything back to normal. I hope there is a way I can recover all of my files or at least a way that I can move them to my pc (had a few backups on there that I was too lazy to move which I do regret now...). If there is someone who understood my post and knows a solution to my problem please help me! I am actually quite lost right now because I can't even use Whatsapp without loosing all of my messages
I am sorry that I can't give you any pictures of my phones status but I don't know how I could do a screenshot/video in TWRP :/
Edit: I found an older device of myself with which I was able to take some pictures (has very bad quality because it has a little crack in the camera)
On InternerSpeicherSeite1 you can see that on my pc it shows that storage is used up but on InternerSpeicherSeite2 you can see that it is empty if I open it.
In ES you can see that there is this /legacy instead of /sdcard.
In TWRP1 you can see that the whole /scard directory is nearly empty.
In TWRP2 is the /sdcard direcory that is now in /sdcard/0 but unaccesable from anywhere except TWRP.
R4gi3X said:
Hi together,
earlier I wanted to finally give the L-Preview a shot so I downloaded it and installed it as it was mentioned in the thread's instructions. Everything was fine until I was forced to reinstall it because Wifi kept getting stuck at switching (which didn't fix itself after a reboot) and some other things. So I did everything again like I did before but after I booted it up again and set up everything I noticed that in ES-File manager I couldn't access my sdcard directory. So I booted back into my recovery and saw that even there my usual sdcard directory was nearly gone except for a few folders (0, clockwordmod, legacy, obb and TWRP) which I couldn't see in ES-File explorer before. Because I was a little confused (and angry because I never had something like this happening) I just rebooted my device and connected it to my pc to see what I can access from there. But it was the same result like with the manager, there were no folders at all . So I went back into my recovery and just looked a bit around and after a while I found out that the whole /sdcard files just moved to the "0" folder that is inside the "old" sdcard-directory. And this is kind of where I am at right now not knowing what to do to get everything back to normal. I hope there is a way I can recover all of my files or at least a way that I can move them to my pc (had a few backups on there that I was too lazy to move which I do regret now...). If there is someone who understood my post and knows a solution to my problem please help me! I am actually quite lost right now because I can't even use Whatsapp without loosing all of my messages
I am sorry that I can't give you any pictures of my phones status but I don't know how I could do a screenshot/video in TWRP :/
Click to expand...
Click to collapse
Move all your folders and files back to the old place, or get them to your pc with adb pull (use google if you want to now how) and flash the factory image for safety
You can learn to adb pull by clicking the link in my signature and then locating the adb and fastboot thread
Don't adb push your data back though. Adb pushing your entire sdcard back will cause permissions problems so use MTP to transfer data back
Sent from my Nexus 5 using Tapatalk
its a common issue with L, i even experienced it myself. first, there is a short terminal emulator command you can use. i dont know what it is, but a search should find it for you. itll move all back to where it should be. or secondly, you can do what i did. i didnt know there was a terminal command, so i used root explorer to move everything back manually. took me about 15-20 minutes.
GtrCraft said:
Move all your folders and files back to the old place, or get them to your pc with adb pull (use google if you want to now how) and flash the factory image for safety
Click to expand...
Click to collapse
rootSU said:
You can learn to adb pull by clicking the link in my signature and then locating the adb and fastboot thread
Don't adb push your data back though. Adb pushing your entire sdcard back will cause permissions problems so use MTP to transfer data back
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
I already know how to adb pull but it just gives me the output seen on the picture...
there appears to be 3 different terminal emulator scripts people have been using, one for for some but not for others. heres one that i found, try it out in a terminal emulator app..
su(press enter)
restorecon -r /data/media/0/*(press enter)
simms22 said:
there appears to be 3 different terminal emulator scripts people have been using, one for for some but not for others. heres one that i found, try it out in a terminal emulator app..
su(press enter)
restorecon -r /data/media/0/*(press enter)
Click to expand...
Click to collapse
I've tried your command but it did nothing.
But I found a way simpler solution now, as I could still access my data in TWRP I was able to flash a 4.4.4 Rom (that I luckily still had on my phone^^) and now I can access everything including the "0" Folder on my pc again. So I'll move everything on my pc now and then copy it to the /sdcard directory
Thanks though for your help, really appreciate the support from the xda-community!!
But I gotta say good night now as it is already 1am but I will update this post one more time tomorrow giving a final result.
You already know /sdcard isn't working properly. Pull /data/media/0

Recovering files from a boot looped Pixel 4a

Recently updated my Pixel 4a and have run into an issue that causes a strange boot loop to a screen that states "Cannot load Android system. Your Data may be corrupt." and prompts to either factory data reset or try booting again. What's strange is that when attempting to boot it again, it is able to load into the device and I have normal access to the phone for about 30-60 seconds before it restarts and prompts a factory reset again.
My main issue is that I need to backup/upload about 900 photos to google photos that were not saved. So far the phone has been rebooting, connecting to wifi and uploading about 0-3 items to google photos per boot until it restarts. Eventually I may be able to secure all my photos this way but I want to know if there is a more efficient method to do this.
Things to know:
Bootloader is locked (can't unlock due to wipe) -> cannot use custom recovery/ flash twrp
USB debugging is enabled and I have sideloaded the latest OTA (sunfish) via ADB sideload in recovery mode but the boot loop has not resolved.
I can successfully use ADB pull /sdcard/DCIM/Camera for only up to 60 seconds until it force restarts. When I attempt to pull again on the next boot, it will pull the same files because it is copying and not moving them.
Does anyone have a solution to this rather than to just factory reset or continuously rebooting? It is frustrating because I still have access to the phone's files but only for about less than a minute. I have scavenged reddit threads, forums, and google for some way to do this but to no avail. (Also is there a way to use the stock recovery's "mount /system" option?)
It's not very elegant, but I could totally imagine a script that listed the files and then copied a few at a time, waiting for the phone to reboot before continuing...
I have a python script that uses adb to "sync" a directory on the phone with a directory on the PC, but it's doing a push, not a pull.
a1291762 said:
I have a python script that uses adb to "sync" a directory on the phone with a directory on the PC, but it's doing a push, not a pull.
Click to expand...
Click to collapse
I modified my script a bit to pull instead of pushing, it's ... awfully rough (eg. you have to manually create a Camera directory to store the files it copies) but it seemed to work in principle. It might be enough for you, or it might serve as a base for a better solution. No doubt it'll need a few mods anyway, especially if you're on Windows (in which case ls won't work).
You might also try booting into safe mode, in case that stops the phone from rebooting? https://www.androidauthority.com/how-to-enter-safe-mode-android-801476/
a1291762 said:
I modified my script a bit to pull instead of pushing, it's ... awfully rough (eg. you have to manually create a Camera directory to store the files it copies) but it seemed to work in principle. It might be enough for you, or it might serve as a base for a better solution. No doubt it'll need a few mods anyway, especially if you're on Windows (in which case ls won't work).
You might also try booting into safe mode, in case that stops the phone from rebooting? https://www.androidauthority.com/how-to-enter-safe-mode-android-801476/
Click to expand...
Click to collapse
Thank you for the reply! I am on Windows and I am not too script savvy out of writing a few simple AHK actions so I am not entirely sure how to proceed with what you have there.
Booting into safe mode did not work unfortunately. Seems the time until restart was the same as well.
Expressionize said:
Thank you for the reply! I am on Windows and I am not too script savvy out of writing a few simple AHK actions so I am not entirely sure how to proceed with what you have there.
Click to expand...
Click to collapse
I do have a windows PC for gaming so I'll fire it up and see if I can make it work there.
a1291762 said:
I do have a windows PC for gaming so I'll fire it up and see if I can make it work there.
Click to expand...
Click to collapse
I was able to brute force the process and finally made my way through the photos. There was one lucky boot that allowed normal access for about 3 minutes and that was enough time for adb pull to completely grab what I needed. I appreciate your time and help.
I guess it still doesn't solve the issue if someone else runs into my similar situation though, but it seems like a rare enough problem.
Expressionize said:
I was able to brute force the process and finally made my way through the photos. There was one lucky boot that allowed normal access for about 3 minutes and that was enough time for adb pull to completely grab what I needed. I appreciate your time and help.
Click to expand...
Click to collapse
No worries. I'm glad you got your photos.
I had to go out, but I got back and literally just finished updating the script so it runs on Windows and is a bit smarter (eg. waiting for the phone to come back when it goes away). I'll attach it here in the event someone else finds it useful
There's a few variables at the top to configure it. It needs python and adb but shouldn't need anything else.
python3 fetch_files.txt
It's got a .txt extension instead of the more typical .py because XDA won't let me upload a .py file.

Categories

Resources