[Q] I deleted my launcher. [Resolved] - Droid RAZR M Q&A, Help & Troubleshooting

I was deleting unused apps from my phone and, like an idiot, I deleted my only installed launcher. The phone boots and I can access the settings. I have a launcher installed and it shows up in menu/ settings/ app but it wont start and I don't know how to start it. I do have adb and fastboot though I don't have wireless internet. This device is not activated and there is no gmail account linked to this device. I did create a zip of a launcher and tried to flash it through recovery but that didn't work. I do not have a custom recovery installed but I did root the device. Is there a way to get a launcher installed and working so I can use this device again?

Grab the APK file for the stock launcher (or any launcher of your choice), connect your phone to the computer via USB with debugging on and install the launcher using this ADB command:
adb install launcher.apk
Make sure to replace launcher.apk with the exact name of the APK file, of course. You might need to copy the launcher to your SDK's platform-tools folder and run this command while in that directory as well, if the folder hasn't already been added to your PATH variable.
Once done, reboot your device. You can then use any root-enabled file manager to simply copy the launcher's APK file into /system/app to make sure you have one installed as a system app all the time, though make sure to fix its permissions to rw-r--r-- (644).

HQRaja said:
Grab the APK file for the stock launcher (or any launcher of your choice), connect your phone to the computer via USB with debugging on and install the launcher using this ADB command:
adb install launcher.apk
Make sure to replace launcher.apk with the exact name of the APK file, of course. You might need to copy the launcher to your SDK's platform-tools folder and run this command while in that directory as well, if the folder hasn't already been added to your PATH variable.
Once done, reboot your device. You can then use any root-enabled file manager to simply copy the launcher's APK file into /system/app to make sure you have one installed as a system app all the time, though make sure to fix its permissions to rw-r--r-- (644).
Click to expand...
Click to collapse
Thank you for your reply.
I already pushed the the launcher apk through adb and it installed on my phone from everything I can see. However even though it installed I do not know how to start it. I do not know how to gain access to a file manager as I do not access to any of my apps through the app drawer. Is there a way to activate and use an app without being able to access it in the drawer?

That's weird. Did you restart your phone? Upon every restart, Android looks for any installed launcher apps and if there's only a single one installed, it automatically loads it up. In case there are multiple launchers installed, Android loads a default one if set, or offers you to select one if you haven't set any as default. If you have installed a launcher via ADB by now, it should be loading upon device reboot. Try a different launcher's APK maybe? If it still doesn't work, try fixing permissions manually via ADB, or via recovery. Also, try installing it as a system app i.e. adb push Launcher.apk /system/app/ and don't forget to fix permissions to rw-r--r-- (644).

HQRaja said:
That's weird. Did you restart your phone? Upon every restart, Android looks for any installed launcher apps and if there's only a single one installed, it automatically loads it up. In case there are multiple launchers installed, Android loads a default one if set, or offers you to select one if you haven't set any as default. If you have installed a launcher via ADB by now, it should be loading upon device reboot. Try a different launcher's APK maybe? If it still doesn't work, try fixing permissions manually via ADB, or via recovery. Also, try installing it as a system app i.e. adb push Launcher.apk /system/app/ and don't forget to fix permissions to rw-r--r-- (644).
Click to expand...
Click to collapse
I will get right to doing that, and see how it turns out thank you and please stay tuned.
Update: I attempted the command to push it to the system/app and my return read "failed to copy 'apex.apk' to ' /system/app/apex.apk': Read-only file system"
It sounds to me upon reading that, that if I fix permission to make the file system read/write then this command will work. However, I do not know the commend to make that change.

No, you don't get read/write access by fixing permissions. The error that you get asically means you don't have system write access via ADB at the moment. Try this:
Code:
adb remount
adb push Launcher.apk /system/app/
adb shell
su
chmod 644 /system/app/Launcher.apk
exit
exit
adb reboot
The above method should work if your current kernel is an insecure one (i.e. it allows ADBD running as root and thus, the use of adb remount command for full system read/write access). If that doesn't work, try this:
Code:
adb push Launcher.apk /sdcard/
adb shell
su
mount -o remount,rw /system
mv /sdcard/Launcher.apk /system/app/Launcher.apk
chmod 644 /system/app/Launcher.apk
exit
exit
adb reboot

HQRaja said:
No, you don't get read/write access by fixing permissions. The error that you get asically means you don't have system write access via ADB at the moment. Try this:
Code:
adb remount
adb push Launcher.apk /system/app/
adb shell
su
chmod 644 /system/app/Launcher.apk
exit
exit
adb reboot
The above method should work if your current kernel is an insecure one (i.e. it allows ADBD running as root and thus, the use of adb remount command for full system read/write access). If that doesn't work, try this:
Code:
adb push Launcher.apk /sdcard/
adb shell
su
mount -o remount,rw /system
mv /sdcard/Launcher.apk /system/app/Launcher.apk
chmod 644 /system/app/Launcher.apk
exit
exit
adb reboot
Click to expand...
Click to collapse
I will try both commands and report back thank you!

These are my returns:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

You could also try installing a launcher from the Google Play website and hopefully it will install on your phone. Then once you have a working launcher you could more easily restore the factory one.

spunker88 said:
You could also try installing a launcher from the Google Play website and hopefully it will install on your phone. Then once you have a working launcher you could more easily restore the factory one.
Click to expand...
Click to collapse
I can't use Google play because this I have not had this phone registered at all. I only used it to play games and media and never had my account linked to it. I now wish I would have because I agree with you, having done that would ahve made this entire thing a non situation I think.

That's kinda weird. Try the same command with 'cp' instead of 'mv', perhaps that'll help.

According to adb it worked, however I can not access home and the launcher is no longer in my list of installed apps. Very confusing to me

It seems then that you have deleted some other system-critical APK as well, perhaps. A good idea would be to reinstall the ROM now. If you are already running a custom ROM, you can do so without the need to wipe data, by installing the same ROM. In case of stock ROM, you should find a flashable zip file of the same version or a later update, and flash it without wiping data too. Though if that doesn't work either, a ROM flash followed by a full data+cache+dalvik-cache wipe should do it.
Oh speaking of that, try wiping cache and dalvik cache from recovery and rebooting to see if it helps, before you attempt the above.

HQRaja said:
It seems then that you have deleted some other system-critical APK as well, perhaps. A good idea would be to reinstall the ROM now. If you are already running a custom ROM, you can do so without the need to wipe data, by installing the same ROM. In case of stock ROM, you should find a flashable zip file of the same version or a later update, and flash it without wiping data too. Though if that doesn't work either, a ROM flash followed by a full data+cache+dalvik-cache wipe should do it.
Oh speaking of that, try wiping cache and dalvik cache from recovery and rebooting to see if it helps, before you attempt the above.
Click to expand...
Click to collapse
I was already thinking that so I finally found a stock firmware file and am currently attempting to flash it now. I will report back with the results.
Update: The results are in and.....it is now working! This is what I wanted to do from the start but I had a very hard time finding a good link to a stock rom. Mr. Raja I am very thankful for all your help and time you spent with me on this issue.

kingnarkissos said:
I was deleting unused apps from my phone and, like an idiot, I deleted my only installed launcher. The phone boots and I can access the settings. I have a launcher installed and it shows up in menu/ settings/ app but it wont start and I don't know how to start it. I do have adb and fastboot though I don't have wireless internet. This device is not activated and there is no gmail account linked to this device. I did create a zip of a launcher and tried to flash it through recovery but that didn't work. I do not have a custom recovery installed but I did root the device. Is there a way to get a launcher installed and working so I can use this device again?
Click to expand...
Click to collapse
you need to simply install the launcher..
adb install apex.apk
that is all.

kingnarkissos said:
I was already thinking that so I finally found a stock firmware file and am currently attempting to flash it now. I will report back with the results.
Update: The results are in and.....it is now working! This is what I wanted to do from the start but I had a very hard time finding a good link to a stock rom. Mr. Raja I am very thankful for all your help and time you spent with me on this issue.
Click to expand...
Click to collapse
I'm glad it worked out for you. You must have deleted some other system-critical APK as well, otherwise simply reinstalling the launcher via ADB should have worked just fine. In the future, it'll be a good idea not to delete any APKs from /system/app that you aren't absolutely sure about. =)

jimmydafish said:
you need to simply install the launcher..
adb install apex.apk
that is all.
Click to expand...
Click to collapse
That was the first thing I did and it did not work. The app did show up under the installed apps list, but I could not get it to start so it was never running. Therefor I couldn't gain access to it or any area of the device other than settings when the phone booted up. I stated such in the first post of this thread. Believe me I tried all the easy stuff first.
Mr.Raja I do agree with you. I must have deleted more than I thought I did because I agree with you and everyone else who is saying a simple adb flash will work. It should have worked. So whatever I did to it forced me to reflash a rom onto it. I am just thankful to you and everyone else who tried to help me. I appreciate the time spent assisting me.
How I fixed this issue was RSDlite and the rom from this link http://forum.xda-developers.com/showthread.php?t=2017200 and it worked like a charm.
This issue is resolved!

Related

Market is very slow after installing another rom

Hey friends!
I have a great problem.
After installing another rom, my market doesn't work properly.
I open the market and it's very slow. Everything I want to do takes a few seconds. Tapping on the downloads button, tapping on apps, downloading them... all slow.
Now I've figured some out:
Wipe everything
install another rom new
took another google account
market is fine
Then:
wiped
installed the rom new
took my first account
market is slow.......
Whats wrong with my account and how can I get it to work normal.
If I said slow, that isn't right. Right is sloooooow....
That's weird... lets see what others have to say...
Is it anything like this?
http://forum.xda-developers.com/showthread.php?t=670407
I still haven't fixed mine yet, trying desperately to..
Yes, same problem.
Sh*t.
Market is still unusable for me.
But now I can see paid apps, but it's terrible slow.
Can someone put this threads together? I think, I#ve searched wrong yesterday.
Try pushing another market apk to your phone?
You're right, it solved the problem. Thanks!
I've deleted the Vending.apk in folder /system/apps
Then I've installed another Vending.apk with ADB
Copy the attached file to your AndroidSDK/tools folder on PC (delelte the .zip extension!)
Plug your Phone with USB to the PC
Open up the shell (cmd)
Navigate to your AndroidSDK/Tools/ folder
Type in:
adb remount
adb shell push Vending.apk /system/apps
adb reboot
After the reboot, everything is fine!
Formel-LMS said:
You're right, it solved the problem. Thanks!
I've deleted the Vending.apk in folder /system/apps
Then I've installed another Vending.apk with ADB
Copy the attached file to your AndroidSDK/tools folder on PC (delelte the .zip extension!)
Plug your Phone with USB to the PC
Open up the shell (cmd)
Navigate to your AndroidSDK/Tools/ folder
Type in:
adb remount
adb shell push Vending.apk /system/apps
adb reboot
After the reboot, everything is fine!
Click to expand...
Click to collapse
This helped me too but you have a few commands wrong.
Firstly, to remove just do:
adb remount
adb shell rm -f /system/app/Vending.apk
Then, to install the older version:
adb push Vending.apk /system/app/
adb shell reboot
I also did the removal line again with a lower case v as I seemed to have two vending.apks, this may just be something specific to my phone though as I was messing around a lot getting this working!
Bugger, still didn't work for me...
something weird.
wiped, reflashed cm 5.0.7-t2 and gapps epe54b.
right after adding my gmail account the market started to download all my paid apps again. that made the market that slow.
now wiped again and reflashed 5.0.7-t2 and gapps.
installed titanium backup.apk and restored all apps and settings.
for now the market (v1713) works as usual.
I've tried everything advised and my market is still s-l-o-w.
I have tried:
Clearing cache
Uninstalling updates
Reflashing Gapps
Formel's replacement Vending.apk
Think I'm gonna resort to a full wipe once CM5.0.7 is out...
http://forum.cyanogenmod.com/index.php?/topic/2589-solved-market-slow-for-some-people/
on some phones it fixed itself.

Superuser?

Does anyone know how to install this on the aria?
http://forum.xda-developers.com/showthread.php?t=682828
It's best to flash your Aria to a Liberated ROM. You can find it within the forums here. Since I can't post links yet. This will root the device and SuperUser will be added.
Not sure about that app. It looks like it does the same thing as the SU that comes in the Liberated ROM by attn1, just without the few extra options.
I tried booting into clockwork and mounting the system partition and doing this:
adb push Superuser.apk /system/app
adb push su /system/xbin
adb shell chmod 06755 /system/xbin/su
adb reboot
but when it rebooted the superuser app did nothing at all. No prompt or nothing running apps that needs su. I had usb debugging enabled. So I just restored a nand backup.
Might be a dumb question, but did you do adb remount ?
I used clockwork to mount the system partition. When I tried it with just adb remount it wouldn't mount the system partition. I would always get "Not a directory" error. But when clockwork mounted the partition it wrote the files fine with no error. When I rebooted the superuser icon and version were different than the one that came with the liberated rom.
I'm trying this now, I'll report back when I do it. I'll try a few different apps that require SU
I did the commands it said, I see the new icon, and when I press 'Menu', it shows the prefrences, but when I click it, it freezes the app.
It's probably not compatible with our phone yet.
Could be, but I'm pretty sure it does work, because if I remember correctly, Titanium Backup needs SU permissions, and I haven't encountered any kind of errors with it yet.
I see you posted on the thread for the program itself. Hopefully someone there will have a response.
Yeah, I'm hoping to get a response to it. We will see.
The newer version 2.2.2 works.
Awesome, ill give it a shot a little later.
Tried the newer version, and I get the same issues.
How did you install this one? I booted in to clockwork and selected install from zip file on sd and selected that file on my sd card.
I just did it through adb. I'll give that method a shot.
Looks like after doing your method, it works perfect now. Not sure why using adb doesn't work.

Can't get ADB Root Access in certain ROMs?

I've noticed with a lot of CM10-based ROM's (possibly even others), I am unable to get root ADB access.
On the ROM's that have it, I set the Root access to Apps and ADB
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I can reboot, fix permissions, clear caches, but no matter what, Android Commander is never able to get Root access
This isn't the case on some ROM's I've tried though. Android Commander is able to get Root access just fine without me needing to do anything.
To name some ROM's that I can't get Root access with:
CyanogenMod 10 Nightly (9/4)
AndroidME CM10 N7 1.0.0
As for what ROM's had working Root access, I can't exactly recall correctly :/ But I think these had it working:
Codename Android 3.4.1
Team EOS 3 *JELLYBEAN* Nightlies (confirmed working ADB root)
Is there something else I should possibly be doing to get Root access on CM10-based ROM's?
Boot a unsigned kernel then ./adb remount
PS: it is effective until you reboot
Sent from my Nexus 7 using Tapatalk 2
"The Root access : No" because you'r using the rom which have a "secured adb" (even when you'r rooted)
Download the "adbd insecure" in this thread and "Enable insecure adbd", you can get "Root access: OK" in any rom
http://forum.xda-developers.com/show....php?t=1687590
adb root
The real reason behind adb root or insecure adb is the adb daemon in the device running at root permissions. In pre-Android 4.1 versions, this is usually decided by some initialisation script(like init.rc) at boot time. The script checks for value in default.prop,local.propand other environment variables.
If it finds build.prop,default.prop or local.prop property file with ro.secure=0 adbd is allowed to run as root. You'll get adb root and hence will be able to do commands like adb remount,adb root and adb shell's prompt'll be # by default. The user may be displayed as [email protected] or [email protected] adb GUIs like Android Commander and QtADB will get to work in Root mode.
But,if it's ro.secure=1, adb daemon is made to work in secure mode, and adb won't change to root mode on issuing adb root command. However, if su binary is present in $PATH, u can still call su command from adb shell. But, it's not enough for Android Commander to get Root Access. It is possible to attain adb root through any one of the following methods:
1.For CyanoGenMod based ROMs there is an option in Settings->Developer Settings->Root access to control root access. Choose ADB only or Apps and ADB in options to get adb root.
2.Else use adbd Insecure app by chainfire if you have a rooted device. This is useful, especially for Android 4.1+ devices.
3.Or, you may manually edit default.prop to set it's value to 0, but original default.prop will be restored from boot partition everytime you reboot(this is the reason why adb Insecure cannot permanently do adb root, though there is an option to repeat the rooting procedure everytime the device boots). This method is called temporary adb root. On pre-Android 4.0 ROMs default.prop file was located in / directory. I read that from Android 4.x this file is in ramdisk and so more difficult to edit. But Android 4.0 has local.prop which is easier to modify than default.prop( See method 5)
4.For permanent adb root, you'll have to extract boot.img, change default.prop, repack and then flash it back to device.
5. In Android 4.0 there's local.prop file in /data partition. Setting ro.secure=0 in this file will do adb root permanently. Else you can set another property ro.kernel.qemu=1 in the same file. But, this value makes the system think that it is running in an android emulator. Many exploits and root methods set this property temporarily to gain root. But, it may cause side effects if used permanently. Setting ro.secure=0 is recommended. Do this command in terminal app or adb shell:
echo ro.secure=0 >/data/local.prop
or you can manually copy a local.prop file with ro.secure=0 as it's content to /data.
6.Note that method 3,4 and 5 won't work in Android 4.0 Jelly Bean onwards. According to Dan Rosenburg(drjbliss in XDA),the researcher who discovered adb root emulator exploit and many other exploits, Jelly Bean doesn't parse any property files to set the ownership of adb daemon. The stock adbd will have to be replaced with an insecure one to gain adb root. But still,as adbd is located in /sbin whose contents are reloaded everytime on reboot from boot.img, it won't be permanent.
7. For permanent adb root, you may flash an insecure boot.img(one that contains and insecure adbd)
8. If you're really desperate and can't get adb root to work with any of the above methods use an exploit. Most of the adb based rooting methods utilise some exploit to make the adb daemon run as root. By studying the exploit and implementing it you could gain adb root atleast temporarily.I'm not recommending this method but as a last resort you could try them.
Acknowledgements: Thanks to Dan Rosenberg for explaining the reasons behind adb root, especially the one in Jelly Bean.
get root access with root commander
Question to that fantastic answer above.http://forum.xda-developers.com/images/smilies/good.gif
How do I push back my modified build.prop?
I have HDC S3 Ex v2 hung in bootloop, after changing vm heapsize to 60 from 64.(Tried 128 but it didn´t stick, so tried this and it unfortunately worked)
I have managed to start in recovery mode even though it´s chinese there, don´t understand, I can communicate through Android commander to pull the files but cannot push them back due to no "root access".
I installed the "insecure ADB" via Commander but it does no good when I can´t load android.
I have no backup. It is rooted Android 4.1.2 by Fastcardtech. has busybox installed
Use su in adb shell
Use adb shell and elevate to root access by using su
Code:
su
.
Now, if you get # prompt instead of $ sign you have root on adb shell. But, still you don't have adb root. So, don't try to push the files or use Android Commander. Instead we use shell commands to do the same.
First Remount /system partition as writeable.
i.To do this first type
Code:
mount
and find out system's device name and file system from the list. In case of my device (and many Stock ICS devices) this device name would be /dev/block/mtdblock?. ? varies for each device. I had /system as mtdblock8 with ext3 file system.
ii. Now type the following command
Code:
mount -o remount,rw -t <filesys> /dev/block/mtdblock? /system
use the number you have for '?' and the filesystem for <filesys>.
Now Copy the modified file to some readable location on the device, say /sdcard or /data/local/tmp. Then copy the build.prop to /system using cat command
Code:
cat /sdcard/build.prop > /system/build.prop
Hope it works!
Closer...
HEXcube said:
Use adb shell and elevate to root access by using su
Code:
su
.
Now, if you get # prompt instead of $ sign you have root on adb shell. But, still you don't have adb root. So, don't try to push the files or use Android Commander.
Copy the modified file to some readable location on the device, say /sdcard or /data/local/tmp. Then copy the build.prop to /system using cat command
Code:
cat /sdcard/build.prop > /system/build.prop
Hope it works!
Click to expand...
Click to collapse
Thank you! But...
After more than one hour installing android-sdk, I got the # ( I thought the shell through android-commander was the same first)
but it says Read only file system
Another thread suggested "remount rw" before pushing but thats not something adb shell recognices "not found".
Am I only missing the adress of my device when trying remount?
Any suggestions?
Renount /system as rw
Oh, i forgot! You've to remount /system as Read Write. I've edited the above post to include that.
You need not have installed the whole Android SDK(unless you develop for Android). It's the same adb that Android Commander or QtADB uses. You can even use adb as a standalone tool along with the required libraries(dlls on windows). Now that you have installed the Android SDK, it doesn't matter.
Yes! Yes! Yes!
HEXcube said:
Oh, i forgot! You've to remount /system as Read Write. I've edited the above post to include that.
Click to expand...
Click to collapse
:good::good::good::victory::victory::victory:
It worked! Thank you so much! A new phone useless was really disappointing, but happy again
Set heap size back to 64. Maybe I´ll dare set it to 128 another day... The phone has horrible ram performance, hoping that would cure it.
Uninstallation of an app of 6-7 mb takes at least 45 sec. My old Blade with cyanogen does that in less than 10.
Hard part was understanding my system name /dev/block/mmcblk1p1 cause it wrote /storage/sdcard vfat after it.
I saw ext4 in other part and asssumed it was that system cause it had "ro" after it.
Thank you again. You now introduced me into some new territory. Not just flashing modded roms in recovery mode.
But I will search out one modded rom so I can overclock some.

[q] urgent help is needed, too many pattern attempts

Hi, i need a fix for this and fast !!! I've tried all that is listed on xda about this issue, but to no avail. Anyway, i forgot my pattern and went to the forgot pattern menu. My wifi was off, so i figured it would give a prompt of some kind to turn on the wifi and then log on to my google account. But nooooo, google supposes that everyone's wifi is on all the time. Please help, what do i do ? I rebooted to recovery, i made a nandroid and currently i am adb pulling the twrp folder from my N7. I would have just factory reseted it, no probs, but i remembered i have some EXTREMELY important works in colornote that i can't afford to lose. Please help, what do i do ?????
Looks like you answered your own question. Unless your Android isn't encrypted, just boot into TWRP and backup your data using adb:
adb pull /data/data C:\backup
Click to expand...
Click to collapse
The main thing you will have to concern about is restoring those data and make it readable by the app. There are several ways, but you can either:
adb push C:\backup\colornotes /data/data/colornotes
Click to expand...
Click to collapse
Don't forget some devices you need to give it write permission first: adb remount rw, though should not be needed with TWRP. Or just copy the folder back using a rooted file manager.
Then go into adb shell and fix permission of the files so the app can get access to them:
adb shell
su - (again shouldn't be needed wile in TWRP)
chmod -R 644 /data/data/colornotes (or 777 for full access)
Click to expand...
Click to collapse
Tips while in adb shell:
Check permissions of files by typing: ls -la
Check what partition is mounted and whether you have write privilege to it by typing: cat /etc/fstab
Also, if you use a custom rom like CyanogenMod or AOKP, there is an option to enable all widgets on the lockscreen. Just put the Power Control widget on the lockscreen, then you can toggle WiFi on and off. (Can't remember if this is also possible with stock.)
Have fun.
OR have a look here.
Looks like either of the two methods suggested would be feasible with only a recovery running, but the 2nd one is easiest (as a custom recovery wouldn't necessarily provide a statically-linked sqlite3 utility).
if it works it doesn't require any wiping.
BTW guess how I found this.... wait for it .... wait for it.... wait for it.... I used google search.
Hi, i forgot to mention that i made the twrp backup while i was locked out and whenever i try to restore from the backup after a factory reset, it goes back to square one... And when i did a full wipe and hoped to use titanium backup to extract stuff from the nandroid, it just gives me and empty list, but the backup is there, all 5gb of it
iAndroidOS said:
Hi, i forgot to mention that i made the twrp backup while i was locked out and whenever i try to restore from the backup after a factory reset, it goes back to square one...
Click to expand...
Click to collapse
Well, that is to be expected, is it not? You are restoring exactly what is already there - effectively a no-op.
OK, I just booted into TWRP (2.4.1.0) and confirmed that the (equivalent of the) following disabled my pattern lock on the next boot:
cd /data/system
mkdir foo
mv locksettings.* foo
mv gesture.key foo
I did all of the above (the 'cd' command is implicit) using TWRPs touch interface - didn't even need adb.
ymmv as I am using jdq39/4.2.2 and my tablet was not in a "locked-out" state, but its an easy thing to try.

[HOW TO] [FIX] Recover from nested emulated 0 folders

A user of my rom had this 0 folder issue.
This issue was new to me so it took a couple hours to find a solution.
Didn't find any related "How To" guides here so i thought i would share it here.
The issue is that your pc file explorer for example (Win Explorer) only sees a 0 folder while still running the latest HTC USB drivers.
Well, there is a solution to recover from this.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To recover from this you can try the following but you must be running the latest htc drivers.
Step 1
Connect your phone to your pc by USB (note: not usb3)
Backup all your sdcard content to your pc
Download this zip file and extract this to the root of your hardisk (adb.zip)
Step 2
Now open a command shell and go to your adb folder
You can open a shell by ticking "Windows start button" and type "cmd" in the search bar and hit enter.
then type the following commands in the just opened shell and hit enter after every command
cd..
cd..
cd adb
adb shell
You should now see something like "[email protected]/#"
Step 3
Now type the following commands one by one in this shell and after every command hit enter
adb shell
rm -r /data/media/0
busybox find /data/media -maxdepth 1 ! -path "/data/media" ! -path "/data/media/0" | while read filename; do mv "${filename}" /data/media/0/ ; done
Now reboot your device.
If all went fine then you just reset the 0 folder symlink and flashed a compatible recovery
If you now go to Windows Explorer then you should see your sdcard content
If the above how to didn't help the try the steps below:
Step 1
Connect your phone to your pc by USB (note: not usb3)
Backup all your sdcard content to your pc
Download this zip file and extract this to the root of your hardisk (adb.zip)
Download TWRP 2.5.0.0 recovery (recovery.img) (md5: C18DA6C73B2C7CCC9539E58C678C8DD6) and copy it to the adb folder in the root of your hardisk you just created
Step 2
Now open a command shell and go to your adb folder
You can open a shell by ticking "Windows start button" and type "cmd" in the search bar and hit enter.
then type the following commands in the just opened shell and hit enter after every command
cd..
cd..
cd adb
adb shell
You should now see something like "[email protected]/#"
Step 3
Now type the following commands one by one in this shell and after every command hit enter
adb shell
rm -r /data/media/0
busybox find /data/media -maxdepth 1 ! -path "/data/media" ! -path "/data/media/0" | while read filename; do mv "${filename}" /data/media/0/ ; done
Step 4
Now reboot into your bootloader while your phone still connected to usb.
When your bootloader recognizes your phone you should see in red "Fastboot USB"
If not then your USB drivers aren't up to date or your using USB 3
If so then type the following commands and after every command you must hit ENTER
fastboot flash recovery recovery.img
fastboot erase cache
fastboot reboot
Goodluck :fingers-crossed:
V6-Maniac said:
A user of my rom had this 0 folder issue.
This issue was new to me so it took a couple hours to find a solution.
Didn't find any related "How To" guides here so i thought i would share it here.
The issue is that your pc file explorer for example (Win Explorer) only sees a 0 folder while still running the latest HTC USB drivers.
Well, there is a solution to recover from this.
Most likely your on Clockwork Mod Recovery when this is happening.
Not gonna tell ya the whole story but there is a issue with CWM and 0 folders.
To recover from this you can try the following but you must be running the latest htc drivers.
Step 1
Connect your phone to your pc by USB (note: not usb3)
Backup all your sdcard content to your pc
Download this zip file and extract this to the root of your hardisk (adb.zip)
Download TWRP 2.5.0.0 recovery (recovery.img) (md5: C18DA6C73B2C7CCC9539E58C678C8DD6) and copy it to the adb folder in the root of your hardisk you just created
Step 2
Now open a command shell and go to your adb folder
You can open a shell by ticking "Windows start button" and type "cmd" in the search bar and hit enter.
then type the following commands in the just opened shell and hit enter after every command
cd..
cd..
cd adb
adb shell
You should now see something like "[email protected]/#"
Step 3
Now type the following commands one by one in this shell and after every command hit enter
adb shell
rm -r /data/media/0
busybox find /data/media -maxdepth 1 ! -path "/data/media" ! -path "/data/media/0" | while read filename; do mv "${filename}" /data/media/0/ ; done
Step 4
Now reboot into your bootloader while your phone still connected to usb.
When your bootloader recognizes your phone you should see in red "Fastboot USB"
If not then your USB drivers aren't up to date or your using USB 3
If so then type the following commands and after every command you must hit ENTER
fastboot flash recovery recovery.img
fastboot erase cache
fastboot reboot
If all went fine then you just reset the 0 folder symlink and flashed a compatible recovery
If you now go to Windows Explorer then you should see your sdcard content
Goodluck :fingers-crossed:
Click to expand...
Click to collapse
It's an issue when upgrading from 4.1.2 to 4.2.2.
User can copy files to pc prior to upgrading, then copy back after and the files can be copied to the folder visible to Windows.
Also, creating a symlink to /data/media/clockworkmod in /data/media/0/ will allow a user to get CWM to see backups and allow the user to have access to it in the folder visible to Windows.
Your solution ignores the fact the someone might prefer CWM over TWRP.
Sent from my HTC One using xda app-developers app
ilal2ielli said:
It's an issue when upgrading from 4.1.2 to 4.2.2.
User can copy files to pc prior to upgrading, then copy back after and the files can be copied to the folder visible to Windows.
Also, creating a symlink to /data/media/clockworkmod in /data/media/0/ will allow a user to get CWM to see backups and allow the user to have access to it in the folder visible to Windows.
Your solution ignores the fact the someone might prefer CWM over TWRP.
Sent from my HTC One using xda app-developers app
Click to expand...
Click to collapse
Thx for the info, didn't know that.
Strange thing is that the guy i help out didn't went from 4.1.2 to 4.2.2
He went straight from 4.2.2 custom rom to 4.2.2 custom rom.
Also i don't ignore a possible desired user recovery choice.
Issue with the 0 folder came when cwm was flashed.
Butt will amend the line .
More info is also welcome...
V6-Maniac said:
Thx for the info, didn't know that.
Strange thing is that the guy i help out didn't went from 4.1.2 to 4.2.2
He went straight from 4.2.2 custom rom to 4.2.2 custom rom.
Also i don't ignore a possible desired user recovery choice.
Issue with the 0 folder came when cwm was flashed.
Butt will amend the line .
More info is also welcome...
Click to expand...
Click to collapse
Possible that he didn't format SD card prior to flashing the first 4.2.2 ROM and didn't notice the problem until he got to yours?
Sent from my HTC One using xda app-developers app
ilal2ielli said:
Possible that he didn't format SD card prior to flashing the first 4.2.2 ROM and didn't notice the problem until he got to yours?
Sent from my HTC One using xda app-developers app
Click to expand...
Click to collapse
If you have formated your SD card (firmware update that took care of that for you) DO NOT DO THIS. apon reboot your system is no longer fucntioning and if oyu boot into recovery it does not see your SD card anymore. I had to adb sideload to get a rom back ot the phone. Not the OP fault but mine. Luckly i know how to recover just wanted to give warning to others
Bump!! I think this thread should be in the stickies @Red5 what do you think?
Sent from my HTC One using xda premium
This has only became evident to me today.
I was on stock 4.1.2 and flashed Viper Rom 4.2.2 and noticed I was missing 16GB storage.
In the thread I was told to look in data/media and all my files which I saved on SD Card from 4.1.2 were there. Also this 0 folder which had pretty much the same folders but with no user files
I was told to delete duplicate files/folders in the modia (not 0) folder but I dont know if i should just leave empty folders in Media with everything in 0, or delete all folders in Media and leaving only the 0 folder there with everything inside that intact.. If that makes sense..
I am unsure what will happen to CWM if I delete that from the Data/media folder
Cheers
twerg said:
This has only became evident to me today.
I was on stock 4.1.2 and flashed Viper Rom 4.2.2 and noticed I was missing 16GB storage.
In the thread I was told to look in data/media and all my files which I saved on SD Card from 4.1.2 were there. Also this 0 folder which had pretty much the same folders but with no user files
I was told to delete duplicate files/folders in the modia (not 0) folder but I dont know if i should just leave empty folders in Media with everything in 0, or delete all folders in Media and leaving only the 0 folder there with everything inside that intact.. If that makes sense..
I am unsure what will happen to CWM if I delete that from the Data/media folder
Cheers
Click to expand...
Click to collapse
Anything that's already in /data/media/0 can be deleted from /data/media
/data/media/legacy/, /data/media/obb/, and /data/media/clockworkmod can be left alone.
If you want to be able to see your clockworkmod folder and backups when connected to a PC/MAC you'll need to create a symlink in /data/media/0 pointing to the data/media/clockworkmod folder.
Sent from my HTC One using xda app-developers app
Super frustrating problem. I had this happen a couple weeks ago and it pissed me off. Wound up just formatting and it fixed it never to return
Sent from my HTC One using Tapatalk 2
InflatedTitan said:
Super frustrating problem. I had this happen a couple weeks ago and it pissed me off. Wound up just formatting and it fixed it never to return
Sent from my HTC One using Tapatalk 2
Click to expand...
Click to collapse
Yes very annoying.
Well i formatted and reset rom and now have no SD Card, directory or files om the phone.
A guy here on xda tried for almost 2 hours last night to fix it, can sideload a rom bit still no SD and rom will not boot.
Should never have rooted this phone, i was npt going to but of course i did amyway.
Tried this method on my nexus 10 (with the proper recovery but didn't work) sucks because i don't have links to my sd card and cant download anything as a result. flashing the google stock image didnt help either wondering if there was anything else i can do?

Categories

Resources