Safe Mode issue feedback - Android Q&A, Help & Troubleshooting

Hello all!
I realize that many many Android users have that issue and don't get any satisfying answer.
Let me introduce you my own experience. This may help and clear things up about Android safe mode.
It started one week ago when I got into a party and the barman threw lots of water at my friends and me. When I went to bed I didn't bother dry myself up, went straight to bed and slept.
When I woke up the next morning (with such a bad headache by the way ), my phone was acting really weird :
1 : it couldn't recognize my SIM card or any SIM card
2 : the little textbox "Safe Mode" had appeared
3 : My Volume up/Volume Down buttons weren't working anymore.
I rebooted the device several times, wondering why would it do that to me!! I googled that all day to understand what was happening to it.
All of the sudden, after a reboot, the Sim Card was recognized again and this problem was fixed. Yay!
Then, I tried all I could about the buttons (opened the device with youtube tutorial and a Torx screw driver T5) tried to clean the volume flex cable, dry it... Nothing to do.
The volume buttons still not responding, safe mode still here.
There are several reasons for safe mode to show itself :
-Holding a button while booting (depending on the device and manufacturer) : simply reboot the device to get back in normal mode.
-A previously downloaded and installed app is causing issues on the device (Android self protection) : you'll need to find that app and uninstall it to get back in normal mode.
-I ran into a forum where someone was explaing how changing one of his internal components that wasn't working anymore fixed his safe mode problem (mostly non responding buttons like my phone).
So I ordered a brand new volume flex cable for my HTC sensation and I am still wating for it (long delivery...) I'll let you know as soon as I replace the component if that has fixed it.
The problem is : in the meantime I just can't access non system apps (in other words : all origin apps, no others). I bought a smartphone to be able to do many more things on it than just call, text message or email...
So I found a solution about it (I am going to test it tonight and will let you know) :
You need to have a rooted device in order to install all apps that you need to run, even though Android is running under safe mode, into /system/apps location. This will "make believe" those apps are actually system apps and will force your device run them at boot.
How does this work?
You need to get ADB tool in order to push command shell to the device (because terminal emulator or other apps that ease root commands directly on the device can't be loaded... Thanks safe mode!!)
!!!!! Important !!!!!!! I haven't tested this myself yet but will tonight and will let you know on that thread, so watch it before doing anything you wouldn't understand.
from Adb terminal you'll need to get into the system partition and mount it as read and write :
adb shell
su
mount -o remount,rw /dev/null /system
give everyone permissions to write in that folder :
chmod 777 /system/app/
Then, you'll need to store the apks you need into your sdcard (wherever).
Then, copy all apps you need into the folder :
cp -a /sdcard/[pathtoyourapk/theapkyouwanttoinstall] /system/app/
reset the permissions on that folder :
chmod 755 /system/app/
mount -o remount,ro /dev/null /system
sync
Reboot the device :
reboot
You're done.
Don't hesitate correct me if I gave any wrong information, but trust me, I spent enough time on this problem to get self confident and write in here.
Thanks for your attention!
Regards!

Adding information
I tested it and it does work.
However I forgot something :
Once you've copied your apk into the system\app folder just chmod it with 644 :
chmod 644 /system/app/[yourapp.apk]
This will give the system and yourself access grant to the application.
There! =)

Related

[Q] [HCDR ROM 1.7] Market update

Hi,
Sorry for my English; I'm French people.
I have an HTC Tattoo with HCDR ROM 1.7 since one year. But with the patched market i can't have the new version of the market. I read lot of topic about the subject in this forum and the Frandroid forum but I not found a running issues.
Have you got a solution for my probem ?
Thaks a lot,
Florian
florianlyon
Dude, hey! I ran into same problem.
Here you go: http://forum.xda-developers.com/showthread.php?t=723255&page=66
read last messages in the thread, especially my posts
Hey !
Thanks for you answer. I have already read this posts but it's not work for me !
If you have successfully fix this problem please leave me the procedure and shell command.
Follow the URL and download original market:
http://www.mediafire.com/file/wrw9tdzhveoqvgh/Vendingtrue.apk
Then reboot your phone to recovery.
Start cmd in windows.
Go to C:\rtattoo folder (i presume u use 1-click root-rec too).
If necessary mount your phone's system partition as RW:
Code:
adb shell mount -o remount,rw system
And the main command u have to run here is:
Code:
adb push Vendingtrue.apk /system/app/Vending.apk
note: of course it's implied that Vendingtrue.apk should be in the same directory as adb or locate it in a different way if u want.
If push command executes successfully just restart your phone, if not - then, naturally, do some work around. U may even try running it under loaded Android, it may do the trick too (for example, once when i tried installing hosts file it worked).
The main idea, as u might have already guessed , is to replace Vending.apk. Then it will autoupdate itself at the first time u launch it.
Hope it helps, good luck, dude!
I have try this procedure when Android running but it was impossible to push the new Vending.apk even with the system partition mounted.
But in Recovery mode I could push the new apk.
But when I launch the market it not auto update and when I run
Code:
adb pull /system/app/Vending.apk
The Vending.apk size is 1158ko, as the vendingtrue.apk size is 1146ko.
So I conclude that the replacement was not performed.
Have you got a solution ?
Thanks a lot
Dude !
I retry and it's work !
My system partition was not mount correctly.
I launched the following command with my tattoo in recovery mode :
Code:
adb shell
mount /dev/block/mtdblock3 /system -o rw
ctrl+c (or exit)
adb push Vendingtrue.apk /system/app/Vending.apk
I reboot my tattoo and launch :
Code:
adb pull /system/app/Vending.apk
The size is 1146ko (YES my APK has successfully replace).
I ran the market, 5 minute after, it was up to date.
thank you very much for your precious help !
the new market is rubbish...too bug...too slow...get the old market...I have download the old market I can ensure you it's better than new

[Q] Will anyone root the new Kyobo Mirasol reader?

The world's first ereader with a color Mirasol display is finally on the market, but unfortunately it's running a severely locked-down Android by the Korean bookstore chain Kyobo. The Kyobo ui is entirely in Korean, the browser blocks downloads, and the reader app is crap. In other words, it's basically useless to anyone outside of Korea. A few enterprising Americans have imported them and been extremely disappointed. Will someone please take a look at this device and see if it can be rooted or if something else can be done to make it of use to the rest of us?
Please use the Q&A Forum for questions Thanks
Moving to Q&A
Nate over at The Digital Reader has a firmware update that supposedly contains all of the installed apps. He is asking for someone to try and hack it. He has a download link for the firmware at The Digital Reader.
I also posted this as a question here on XDA:
http://forum.xda-developers.com/showthread.php?t=1432283
it is rooted since some time already.
files and instructions are in the following archive, but since instructions are in korean, i'll do a writeup below.
(argh! spambot won't allow this link, so you'll have to piece it together...)
www<dot>4shared<dot>com/zip/aLwRc7ZG/mirasol_rooting.html
edit: needed files are also in an attachment below
the gist is that you need to flash the boot partition via fastboot, setup root and busybox, and then modify secure->install_non_market_apps in settings.db.
you will need to have adb and fastboot from the android sdk working on your computer. There are many posts about this elsewhere, so i won't go into the details.
also, i only print filename without path, just find the corresponding file in the mentioned archive and modify the commands accordingly.
flash the boot partition via fastboot
first get your kyobo into fastboot mode (with usb cable attached) by pressing volume-down at bootup. timing here can be a bit finicky, but easiest seems to be to shut it down completely and then press just after pressing power.
issue a 'fastboot devices' on computer, if successful it should give you the response '???????????? fastboot' or similar. if empty or hangs, try again by rebooting the kyobo by pressing power with volume-up held (you can go into fastboot immediately after reboot by volume-down as expected).
when positive response above, you can flash by
Code:
fastboot flash boot boot.img
and then reboot by
Code:
fastboot reboot
edit: simplified fastboot instructions, thanks to smb_gaiden, whose button-poking-fu is strong.
setup root and busybox
with boot partition flashed you now have adb access, so let's use it. let the device boot as normal, and then issue the following.
Code:
adb push busybox /data/local/tmp
adb push fixsu.sh /data/local/tmp
adb push su /data/local/tmp
adb shell chmod 777 /data/local/tmp/busybox
adb shell chmod 777 /data/local/tmp/fixsu.sh
adb shell chmod 777 /data/local/tmp/su
adb shell /data/local/tmp/fixsu.sh
adb shell ln -s /data/local/tmp/busybox /system/xbin/busybox
after this, install some apk's from the archive
Code:
adb install superuser.apk
adb install blackmart.apk
fix non-market apps setting
only thing left is to change a setting to allow non-market apps to be installed. if you don't care about your current settings (locale, etc), you can just push the settings.db from the archive like so:
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/
if you *do* care about your settings, you'll need to pull the settings.db, edit it in some sqlite db editor (set secure->install_non_market_apps to 1) and push the result.
that's it. all rooted. now you just need to install angry birds and yer' set ;-)
Adb doesn't seem to start properly on device
Hello.
I did succeed in flashing the bootloader via fastboot.
However when I boot device - I see adb on usb only for some initial seconds, and then it disappears.
For that matter my device already had December firmware on it.
Any ideas how to activate adb on device?
Thank you,
Leonid
it may be that persist.service.adb.enable is reset, stopping the adbd service. try flashing the attached boot image instead, see if that fixes it. it is the same as above, except that persist.service.adb.enable is ignored.
edit: i took a look at the december update, afaict it should pose no problem (very few changes in there).
Once these steps are done, how do you install google market?
Thanks.
edit: the original instructions were snafu, so i replaced them with something that should actually work.
getting android market running on the kyobo
needed files are in the attached archive.
install like so:
Code:
adb remount
adb push DrmProvider.apk /system/app
adb push MediaProvider.apk /system/app
adb push DownloadProvider.apk /system/app
adb push GoogleServicesFramework.apk /system/app
adb push Market-3.4.4.apk /system/app
adb push init.qcom.post_boot.sh /system/etc
adb push fix-shared-user.sh /data/local/tmp
adb shell chmod 777 /data/local/tmp/fix-shared-user.sh
adb shell /data/local/tmp/fix-shared-user.sh
wait for the reboot, find market in the menu, and off you go (with downloads this time ;-)
if downloads still do not work after this, try re-executing the last line. android periodically writes to the file we are modifying, which might clobber our changes if unlucky.
I am thinking about buying one of these because I have seen it on sale for 50% discount. However, the general reviews aren't too encouraging, so will rooting make any difference to overall performance?
fatboy1976 said:
I have seen it on sale for 50% discount.
Click to expand...
Click to collapse
where is that?
throwaway4096 said:
you'll need GoogleServicesFramework.apk and Market-3.4.4.apk from the following links:
http://androidmarketu.googlecode.com/files/GoogleServicesFramework.apk
http://forum.xda-developers.com/showthread.php?t=1391565
install like so:
Code:
adb remount
adb push GoogleServicesFramework.apk /system/app
adb push Market-3.4.4.apk /system/app
find Market in the menu and off you go.
Click to expand...
Click to collapse
I'm finding the market force closes when downloading an app.
May I seek help from someone who has rooted recently? I am finding it pretty difficult to get into fastboot. So some questions as I continue to play.
Which version is currently rootable? I bought mine this week and want to be sure it is still applicable with the method here.
Do I need a USB driver to work this hack? EDIT: Yes, found with a web search.
When do I press the volume keys? Immediately after power? Similar timing? When I see the flicker on the screen? When I see the logo? Before all that? EDIT: I did not need the volume up key to get into fastboot.
Thanks!
rooting for beginners
Some friends and i ordered the kyobo to solve our eye-problem (nystagm)
We still can´t figure out, how to root it.
Can you please give us some rooting instruktion vor beginners??
It would be so essential for us, as the kyobo is little worth without forgeign apps!
Thank you very much!
Joe
send2toonie said:
I'm finding the market force closes when downloading an app.
Click to expand...
Click to collapse
Hi, I am stuck with the same problem. Have tried many things?!
---------- Post added at 04:57 PM ---------- Previous post was at 04:32 PM ----------
smb_gaiden said:
May I seek help from someone who has rooted recently? I am finding it pretty difficult to get into fastboot. So some questions as I continue to play.
Which version is currently rootable? I bought mine this week and want to be sure it is still applicable with the method here.
Do I need a USB driver to work this hack? EDIT: Yes, found with a web search.
When do I press the volume keys? Immediately after power? Similar timing? When I see the flicker on the screen? When I see the logo? Before all that? EDIT: I did not need the volume up key to get into fastboot.
Thanks!
Click to expand...
Click to collapse
Hi, Managed to root my kyobo after about 8 h trying. I installed the firmware update on my kyobo, that is found on the web, as instructed from the SD card. Then I installed fastboot and adb on my computer (search for 'how to install fastboot and adb'), as I found instructions for that as well. To enter fastboot I kept Kyobos, volume down button for about 10 sec, when booting the device (kyobo connected to computer with USB) - nothing happens -> however on my computers command window (cmd), 'fastboot devices' command produces an answer with '? ..' as it should. The biggest issue I had was to get adb working. For this purpose I installed and removed a couple of USB drivers - I don't really know how I got it to work finally.
You can tell if you have succeeded installing a useful usb driver, if you enter the 'adb devices' command in the cmd window and it returns a device number. Then you are ready to go with the rest of the commands/instruction as seen in the insturction of this thread.
From the blackmart application I was able to install many useful applications - the Launcher application can replace the Kyobo "home" application, which is very useful.
I installed android market as well, but so far I have not been able to download and install applications. I think It might be a permission issue between kyobo software and the installed android market?
Hey Guys!
is there a way to root the kyobo via mikrosd?
thanks a lot
Joe
Hey Joe. I've seen you on this forum as well as The Digital Reader asking for help with the Kyobo rooting. I too am a beginner and I'm trying to build up the nerve to try it. Wish us both luck and I hope someone can share rooting-for-dummies with us.
@fatboy1976: rooting won't improve performance in itself. it makes the device better as you can install apps, but ofc the hardware is still the same.
@send2toonie: yes, sorry about that. it worked for me, but only thanks to other changes. it's hard to keep track :-/. i updated the original post with new instructions which should work properly.
@smb_gaiden: hah, excellent, i never tried that! original post updated.
@Joe84: it should be possible to root via microsd by creating an update.zip. i haven't gotten around to trying that yet, but maybe in future. for now this is as simple as it gets.
Kaarlos said:
Hi, I am stuck with the same problem. Have tried many things?!
---------- Post added at 04:57 PM ---------- Previous post was at 04:32 PM ----------
Hi, Managed to root my kyobo after about 8 h trying. I installed the firmware ...(updated -see above..) .., which is very useful.
I installed android market as well, but so far I have not been able to download and install applications. I think It might be a permission issue between kyobo software and the installed android market?
Click to expand...
Click to collapse
Jep! With the updated instuctions the Android Market now finally works!! Thanks! (Installed twice)
Kaarlos said:
Jep! With the updated instuctions the Android Market now finally works!! Thanks! (Installed twice)
Click to expand...
Click to collapse
Hi,
Could you post the OS/processor version and driver name that got adb working for you. If you can also remember the keys pressed to put the Kyobo in the correct boot mode for adb, that would be nice too.
I have also managed to load apps on my Kyobo but that is without having su, Superuser, adb and Android Market working. The above info would be helpful in fixing that. Holding the volume down fir 10 seconds after pressing power on puts the Kyobo into fastboot mode. Adb requires a different mode and set of key presses. This is because there is a menu of boot options being displayed which can't be seen on the Mirasol screen. I suspect this is because of display settings within the boot.img but that is only a guess on my behalf.

Big issue.

So I was having the issue with the settings menu force closing after I rooted the device.
This morning I've done a factory data reset, gone to turn the tablet on, and I'm not getting "The application OLS (process com.sony.nfx.app.ols) has stopped unexpectedly. Please try again.
Can't access the device, tried another factory data reset, can't flash a firmware as I can't access the device.
Not very happy at all.
But any ideas please?
**I can get into the settings menu and when I press the home button is when I get the OLS force close, so I assume it's the home launcher, I did remove it when my device was working.....
I can't access device storage either, even when my device is on - or ADB, but I can access an SD Card through the boot menu.
Well factory reseting doesn't restore anything you deleted from system, but wipe anything else you installed.. so there's the big problem.
On my tab, I can force a boot loop by holding volume down when booting (hold vol down for what seems like an eternity/till you are satisfied that it is boot looping).
ADB seems to work here, so you could potentially push a different launcher apk and get it going that way.
Thanks for the response Dan,
What I can do is start the device, there's no launcher there, but inbetween the force closes I can get into the settings, there's no force closes when I'm in there.
I connect the USB, ADB Devices and it shows, I can pull from the /system but not push.
As soon as I type ADB Shell, then the commands, it tells me "error: device not found"
Exit out of ADB Shell, ADB Devices again, and it's there - but ADB Devices when inside ADB Shell shows nothing.
I've tried all of the OTA packages in the other thread and nothing - I'm at a bit of a loss, i doubt Sony would work with me on this one, so It looks like I've got £349 of paper weight. Any ideas on the ADB? At least then I could push a launcher in.
The issue clearly is becuase there's no launcher.
I remove the default launcher from the /system/app folder and install ADW, the factory reset obviously removed it, hence there's no launcher...
What if the APK for ADW was made into an update.zip?
Would it flash when I hold down power + volume+, Update System from zip?
bummer
Not really sure what can be done if you deleted them from the system and the reset does not reinstall them.
Perhaps someone who has rooted can send them to you, but not sure how that would work.
I'll get in touch with Sony tomorrow, now I know that this is my own fault, but under the warranty they are still abliged to fix it, I certainly won't be rooting it again, thats for sure.
I hope they will help me if I'm honest?
Did you have a look at if ADB works for you in the forced boot loop state I mentioned? It could possibly do some extras from there that you can't otherwise.
Also just try sending a third party launcher in so it's doesn't have to go to system, perhaps it will let you write the file then. And hopefully auto - detect it upon booting .
Tried it Dan, if I attempt ADB Install launcher.apk, it starts installation then;
[1] Killed pm install /data....
I'm getting permission denied in every ADB command when in the Boot Loop.
Thanks anyway - I've emailed them, and been totally honest about what I've done.
I could swear all day - I've fixed it, my tablets working again, what a bloody relief. Thanks ADB!
I tried to duplicate your problem with adb :-
Typed ADB Devices - reports attached device OK
Typed ADB Shell - prompt changes to $
Typed ls - shows root of tablet
Typed cd system - changed to system directory
Then ls again then cd app then ls again - shows all system apps
I then typed ADB devices again and lost the connection to the tablet
It would seem that on my tablet at least that typing ADB devices whilst within the ADB shell breaks the connection with the tablet
Thanks for testing it praed0r, I'm pleased to know that it's not just me that had that issue.
It may be of use to someone, but what I did was mount the /system partition as rw using busybox.
Code:
adb shell
su
busybox mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
From there I removed the app that kept forceclosing, in this case it was OLS (or something like that)
I then mounted the /data drive with;
Code:
busybox mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /data
Then using cp instead of ADB Push,
Code:
cp /sdcard2/golauncher.apk /system/app/golauncher.apk
Rebooted the device and it all worked fine, GoLauncher booted as my default launcher.
For some reason it didn't like adb push, and would give me permission errors, but mounting as busybox fixed it all....
I changed the build.prop so that it would system update, it indeed does, but all STOCK apps (Sony apps) force close, it could be becuase of the framework.jar from the other thread, so I'll try and source one from a kind individual. Then I'll do the update and my system will be OK.
I'd consider myself very lucky this time, lesson learnt not to tweak with things.
I'll stick to the build.prop/local.prop tweaks for now
Any idea why the system apps aren't working, i've retraced my steps to before it happened, the only notable thing that would have an affect was changing the framework.jar?

How do recover data from unrooted and boot-looped LG L9-II?

Dear users,
I read multiple threads throughout internet and couldn't find working solution. My lg with kitkat 4.4.2 had lagged so I removed battery. After this phone is boot-looping with startup animation forever.
I can explore files with adb shell when phone is in recovery mode but don't have access to dalvik-cache. Command "su rm -rf /system/data/dalvik-cache" gives "permission denied nor "adb backup -all" cause "unlock your device and confirm...".
I cannot root phone by copying SuperSu files into /system/app. The command "su cp.. " gives no answer and later when exploring /app there's no SuperSu program.
I was trying to explore through sudo nautilus on Ubuntu during using one of rooting tutorial but the phone just disappears in the list of mounted devices.
I have important data like phone contacts, messages and some pictures inside phone memory. I didn't backup all of them formerly.
Any ideas?
likkufri said:
Dear users,
I read multiple threads throughout internet and couldn't find working solution. My lg with kitkat 4.4.2 had lagged so I removed battery. After this phone is boot-looping with startup animation forever.
I can explore files with adb shell when phone is in recovery mode but don't have access to dalvik-cache. Command "su rm -rf /system/data/dalvik-cache" gives "permission denied nor "adb backup -all" cause "unlock your device and confirm...".
I cannot root phone by copying SuperSu files into /system/app. The command "su cp.. " gives no answer and later when exploring /app there's no SuperSu program.
I was trying to explore through sudo nautilus on Ubuntu during using one of rooting tutorial but the phone just disappears in the list of mounted devices.
I have important data like phone contacts, messages and some pictures inside phone memory. I didn't backup all of them formerly.
Any ideas?
Click to expand...
Click to collapse
Could you elaborate on "disappears?" Usually if something is present and suddenly disappears in lubuntu, that means the connection was broken (either physically or by software, such as when switching drivers by running a command). Anyway, have you tried letting it sit for a day or something? I figure the reason it "lags" might potentially affect booting time.
It's also helpful to know what data you want out of it. Some things need root, some things don't need root. If all you want is file X in user space, I imagine that'd be infinitely easier than trying to get a random bootloader setting.

[GUIDE] Modfying CF-AutoRoot kit to enable ADB debugging on phone with broken screen

After breaking the screen on my phone I spent the following months reading about how to extract data. It all comes down to enabling ADB debugging and having your computer authorised. Usually this can be done from recovery and you're good to go. However, if you have a broken phone that is fully stock, with ADB disabled and with no custom recovery support then your data is as good as bricked. Such was the case with me when I broke my rare Samsung G360G. However, my phone was supported by CF-AutoRoot by Chainfire, and this gave just the opening I needed to go full wide.
Prerequisites:
Your phone needs to be supported by CF-AutoRoot. Check on there and the new site linked for support of your phone. If it's not there then you will need to download a stock ROM and use the CF-AutoRoot site tool to generate a root package for you. But that is outside the scope of this tutorial. This procedure has only been tested on Samsung. Your phone should have a minimal working charge.
https://autoroot.chainfire.eu/
This tutorial is also based on Linux. It should be translatable to Windows and Cygwin. But for simplicity I'll just use the method I used on Linux. However, if using Odin like I do, you'll need Windows to finish it off.
Aside from this it assumes files in are named in a particular format with a certain file format.
Tutorial:
1. First you need to download a CF-AutoRoot package for your phone. Won't get far without it.
2. Open up a terminal in Linux. We need to download some depends so enter this command:
Code:
sudo apt-get install android-tools-adb android-tools-fsutils
3. We need to extract the archive contents out. Create a suitable folder inside your home folder to build the patch in and cd to it. This uses an example file named CF-AutoRoot-example.tar.md5. Substitute with your actual archive name. Like so.
Code:
mkdir cfar-adb
cd cfar-adb
tar -xf CF-AutoRoot-example.tar.md5
4. There should be a recovery.img and a cache.img.ext4 extracted out. We just need to modify the cache.img.ext4. But first we need to convert it to a workable format. From a sparse to a raw image.
Code:
simg2img cache.img.ext4 cache.raw.ext4
5. We need to mount the cache image
Code:
mkdir cache
sudo mount -t ext4 -o loop cache.raw.ext4 cache
6. The big one. Doing the mod. So now we need to modify the cfar cleanup script. We need to insert commands on the end to enable ADB and add the key to authorise the computer. The following will do just that in this fashion.
a)
You will need to load in the cfar-cleanup.sh file inside the cfroot folder from the cache point mounted. Locate the end and paste the following lines before the reboot and exit commands on the end. Don't save yet.
Code:
echo -n 'mtp,adb' > /data/property/persist.sys.usb.config
mount -o remount,rw /system
echo '' >> /system/build.prop
echo 'persist.service.adb.enable=1' >> /system/build.prop
echo 'persist.service.debuggable=1' >> /system/build.prop
echo 'persist.sys.usb.config=mtp,adb' >> /system/build.prop
chmod 644 /system/build.prop
mount -o remount,ro /system
mkdir -p /data/misc/adb/
echo '' >/data/misc/adb/adb_keys
chmod 640 /data/misc/adb/adb_keys
b)
Load up the ~/.android/adbkey.pub file in a text editor and copy the entire contents in the clipboard. Now back at the script locate that last echo command you pasted into it and set the cursor just after the first single quotation mark. Now paste the clipboard in! This will add your key in. Make sure it's only between the single quotes with no extra characters or line feeds. The lines will naturally split if they don't fit on screen. Otherwise it should be good to go.
c)
Okay now save the file. The above will enable ADB and authorise your computer on the main Android system after the rooting script has done it's work. Before it reboots normally.
7. We need to unmount the cache so it's ready for use.
Code:
sudo umount cache
8. We need to convert the raw image back into a sparse image.
Code:
img2simg cache.raw.ext4 cache.img.ext4
9. Okay were almost done. Now we repack the files into a new Odin archive. Choose a suitable new filename. Like I have done here with my example file.
Code:
tar -H ustar -c recovery.img cache.img.ext4 > cfar-adb.tar
md5sum -t cfar-adb.tar >> cfar-adb.tar
mv cfar-adb.tar cfar-adb.tar.md5
10. The final step! So now the new package is ready for use. We just to use Odin and flash it to the phone. Save the package to a USB stick if needed.
a)
Reboot into Windows. Or you can run it virtualised from Linux. But I prefer to use the real things when dealing with things of a delicate manner and working blindly. Unplug your phone from the computer if connected. Now load up Odin in admin mode.
b)
Just to make sure pull the battery from your phone. Give it a few seconds then put the battery back in and click the back cover on. Now hold down volume down, then home key, and finally hold down power. Wait for the vibration. Then release power after a few moments. Finally release the other keys. At this point press volume up briefly. You should have just put your phone blindly into download mode. I've done this numerous times.
c)
Plug your phone into your computer. After a moment you should see Odin respond with a device added. Usually the phone can vibrate also when it connects giving more positive signs. If nothing happens disconnect the phone from the computer and retry the last step again to put it into download mode. Took me a few tries before I could do it blindly. It helps if you have a working Samsung to test it out on so you can see what happens before you can only feel it.
d)
Now in Odin press the PDA (or AP) button. Select the cfar-adb.tar.md5 package you made up. If the package is fine it will pass the md5 test. Now press the Start button and watch it go! If all goes well it will upload recovery, cache, give you a pass and then the phone will reset. At this point it will be in the process of being rooted, enable ADB, then reboot. If something goes wrong then you may need to go back and check all the patched files. Then rebuild the package again. But be careful, if the ADB has been enabled in the build.prop file one time, you don't want to add it in again and create duplicates, no matter how keen. Once I had it added the only other major problem I encountered was using the correct adb key.
e)
Hopefully now your phone is rooted, has ADB enabled and is booting up normally. Give it a few minutes. You can even see signs of life in Odin with adds and removes on USB activity. Your phone should also vibrate at times. And making noises is also a good sign.
1.1. So I just cranked it up to eleven. Open a Linux terminal again and give it a test. With your phone plugged in.
Code:
adb devices
If all goes well then adb will find your phone as well as list your device as authorised. You can now open shell to the inside. USB debugging is now enabled.
Conclusion:
Well I hope this helps those who have their app data stuck under a broken screen. As long as it was to type in this tutorial It still took me less time to write this tutorial than to learn all that was needed and apply it to my phone. This ends here but for you it may be only the beginning. A next step would be a screen mirroring app which I think is a must have for visual feedback. And USB debugging opens up these possibilities. One thing to be careful of, in a related issue, is that just because you can use adb and the phone is also rooted doesn't mean it will all work at once. If you are tempted to "su" it in an adb shell and get right in there then SuperSU will ask for permission on a blank screen. As will also happen if you try to do an adb backup, it will ask for confirmation on screen. So just expect to work with USB debugging blindly unless you already have a screen mirroring app installed. If you don't have one installed that is your next step.
And on that note. Good luck!
Hi there,
Your tutorial on how to achieve this on Linux looks real neat and complete. Unfortunately, i'm on Windows and i would like to know if you would be able to rewrite this totorial for a Windows user?
I've been reading online for about a week and i've never saw such a complete guide to help newbies to ADB to be able to retrieve data on their locked broken devices.
Cheers!
Hi RaiM1986 and thanks for your kind words. Yes I wrote it so it would be useful to newbies and seasoned hackers alike. Plus I needed to write down some instructions in case I need to do it all again.
Looking at the tutorial it is a bit Linux-centric. I don't know how well it would translate to Windows. Though there would be Windows version of the tools used the main problem would be mounting the filesystem image and making modifications without corrupting it. Because of things like Linux file modes.
However the following tools may be of assistance.
ADB tools:
https://wiki.lineageos.org/adb_fastboot_guide.html
Cygwin provides Linux tools if needed:
http://www.cygwin.com
simg2img:
https://github.com/KinglyWayne/simg2img_win
For mounting the ext4 image:
https://www.osforensics.com/tools/mount-disk-images.html
img2simg and other tools:
https://forum.xda-developers.com/showpost.php?p=49235638&postcount=5
For the ADB key it should be in %USERPOFILE%\.android and other spots I've read of are C:\Windows\System32\config\systemprofile\.android
In case any of the above fails, since I haven't tested them, the easiest alternative might be to just download a Linux live CD, boot it and do the steps inside. Of course any work is lost when you shut it down. You could also boot it in VM program running on Windows.
Amazing guide, Hypexed! The amount of work you put in to figure this out is incredible.
However, I'm stuck on step 6c, where I'm supposed to save the cfar-cleanup.sh file. It's not letting me save it at all, either within the mount point or to another location, it says that I don't have permissions to save the file. I tried the 'sudo chown' to change ownership to try to edit the permissions, but that didn't work either with it still saying I can't have access to the file. Any ideas? There is probably a simple solution, but this is my first time really using Linux so I'm a noob. I'm using Ubuntu 18.04.1LTS installed, not live, dual-booted with Windows, if that's important to know
SpinningQyarks said:
Amazing guide, Hypexed! The amount of work you put in to figure this out is incredible.
Click to expand...
Click to collapse
Thank you for noticing. It really was the culmination of months of hacking and cracking. Not to mention research. I decided I had to write a guide so I could document what I did in case I needed to do it again. And of course if it helped anyone else.
However, I'm stuck on step 6c, where I'm supposed to save the cfar-cleanup.sh file. It's not letting me save it at all, either within the mount point or to another location, it says that I don't have permissions to save the file. I tried the 'sudo chown' to change ownership to try to edit the permissions, but that didn't work either with it still saying I can't have access to the file. Any ideas? There is probably a simple solution, but this is my first time really using Linux so I'm a noob. I'm using Ubuntu 18.04.1LTS installed, not live, dual-booted with Windows, if that's important to know
Click to expand...
Click to collapse
Sorry you got stuck. I can see some issues in my guide. Especially after trying to do 6c again. First I notice I didn't specify where to store all the folders. Somewhere in the home folder obviously but it looks like you sorted that out fine.
I have tested a working solution to the permissions problem. In fact two:
1. Locate cf folder in the cache mount point on the desktop and go into it. Now right click in the window to bring up the context menu and select "Open as Root". Open up the editor as before.
2.. In the terminal run the editor as root. For example:
sudo gedit cfar-cleanup.sh
I've tested this on Mint which is a "relation" of Ubuntu so should work the same.
Now the original permissions should be left intact. I checked and they didn't have the execute bit set which is unusual. It may help here to save your work on the file to a place you can save to in the meantime. So you don't get stuck again. And then unmount your cache mount point, extract the raw image again as per step 4 and remount as per step 5, if the permissions need restoring. They really should be as they are originally set in the image.
Then continue through to step 6 and beyond as you were.
Good luck!

Categories

Resources