[Q] Android 4.4.2 - ADB - Shell Commands - Root

vbcomer

Member
Dec 11, 2012
43
6
0
Hi All,

Since I am getting nowhere and no replies for my questions, I am going to rephrase them differently here so hopefully someone can jump in and give me a helping hand... (and please forgive if I seem to bombard the forums with questions).

My Note 3 SM-N900A, build KOT49H.N900AUCUCNC2, running 4.4.2. It is having issues with permissions that effectively block the phone from seeing any SD Card, USB, and internal memory space. It won't access any remote resources like internet or Google Play...either

Issues arose after I changed platform.xml. I since then unrooted the phone and uninstalled SuperSU. I can see that these 3 changes were reckless on my part, that I just put the phone into a very bad state that made it very very difficult to recover. I am still banging my head for the blunders but obviously that didn't help fix the phone. :crying:

I would like to know if there is a way to gain access to the phone's system area again to fix the permission issues. Can I use ADB Shell along with USB debugging? If yes, what are the commands I need? Can I somehow send towelroot and SuperSU to the phone via Odin and execute them? The reason I ask this is that I have no way to access any storage area on the phone, and there is no way to go online to download apps. Or can I put the phone into service mode by typing in the *# numbers on the keypad and hopefully fix it there?

Thank you
 
  • Like
Reactions: msfit4speed

vbcomer

Member
Dec 11, 2012
43
6
0
OK, Something Positive

At this point I'm not even sure if adb would be able to access your memory card to push TowelRoot to it. You might be best off restoring using the stock Odin files, lick your wounds, start over and chalk it up as a learning experience.
http://forum.xda-developers.com/showthread.php?t=2703006

Sent from my AT&T Galaxy Note 3 using Tapatalk®
Ah, thanks for replying. I was really worrying about that too.

However, I just installed ADT on my PC and connected to the phone via USB debugging. Using the adb shell ls command, I could see the entire directory structure. I was able to get to the system folder too.

I pulled the platform.xml back and attached to this message. Could you or someone please take a look and let me know if anything is wrong in the file? I made very small changes and reverted them. So it should be same as original, but I am not so sure. Also do you know if the encoding of the file is wrong so that Android couldn't read it?

At this point, it appears all is NOT lost. I just need some of your experts to guide me thru the commands needed to regain the access to my SD card or storage from the phone.

Now, let me bring in another point: Prior to having all this snafu, I granted ES File Explorer root access so that I could overwrite the platform.xml file. I don't know if doing that messed up the system. If it did, what would be the most straight forward way, simplest way to try to get back to normal? Provided now adb seems to be able to access the files and directory.

I know I could try install towelroot again, but would like to see if I can bring the system back to normal operation first.

Thanks
 

Attachments

Last edited:

andygev35

Senior Member
Jun 22, 2014
182
127
0
I may be wrong, but adb being able to see and pull system files is one thing. To get adb to actually modify system files, you'd need to be able to give adb root access. You may however be able to download the TowelRoot apk to your computer, put it in the same directory as adb, then in the command prompt type "adb push towelroot.apk /data/app/" (without quotes). Reboot and see if TowelRoot installed.

Sent from my AT&T Galaxy Note 3 using Tapatalk®
 

andygev35

Senior Member
Jun 22, 2014
182
127
0
Ah, thanks for replying. I was really worrying about that too.

However, I just installed ADT on my PC and connected to the phone via USB debugging. Using the adb shell ls command, I could see the entire directory structure. I was able to get to the system folder too.

I pulled the platform.xml back and attached to this message. Could you or someone please take a look and let me know if anything is wrong in the file? I made very small changes and reverted them. So it should be same as original, but I am not so sure. Also do you know if the encoding of the file is wrong so that Android couldn't read it?

At this point, it appears all is NOT lost. I just need some of your experts to guide me thru the commands needed to regain the access to my SD card or storage from the phone.

Now, let me bring in another point: Prior to having all this snafu, I granted ES File Explorer root access so that I could overwrite the platform.xml file. I don't know if doing that messed up the system. If it did, what would be the most straight forward way, simplest way to try to get back to normal? Provided now adb seems to be able to access the files and directory.

I know I could try install towelroot again, but would like to see if I can bring the system back to normal operation first.

Thanks
Here's the original stock platform.xml if it helps you.
 

Attachments

andygev35

Senior Member
Jun 22, 2014
182
127
0
I may be wrong, but adb being able to see and pull system files is one thing. To get adb to actually modify system files, you'd need to be able to give adb root access. You may however be able to download the TowelRoot apk to your computer, put it in the same directory as adb, then in the command prompt type "adb push towelroot.apk /data/app/" (without quotes). Reboot and see if TowelRoot installed.

Sent from my AT&T Galaxy Note 3 using Tapatalk®
Edit: instead of using adb push, use "adb install towelroot.apk" (if that's the actual package name). Go through the rooting process, download the ES File Explorer apk to your computer install it using adb. Hopefully if all that works, you'll be able to check and fix any permissions that got messed up with your platform.xml. It should be rw-r-r.

Sent from my AT&T Galaxy Note 3 using Tapatalk®
 

vbcomer

Member
Dec 11, 2012
43
6
0
A Step Forward

I may be wrong, but adb being able to see and pull system files is one thing. To get adb to actually modify system files, you'd need to be able to give adb root access. You may however be able to download the TowelRoot apk to your computer, put it in the same directory as adb, then in the command prompt type "adb push towelroot.apk /data/app/" (without quotes). Reboot and see if TowelRoot installed.

Sent from my AT&T Galaxy Note 3 using Tapatalk®
OK. You are right. adb doesn't have write access yet.

I tried this and got success:

C:\AndroidDev\sdk\platform-tools>adb install tr.apk
1767 KB/s (113099 bytes in 0.062s)
pkg: /data/local/tmp/tr.apk
Success


What should I do next? Does it mean the tr.apk has been installed?

Thanks

Update: I saw the Towelroot app in the App Drawer, but after clicking on it and choosing "make it ralr", I got message "Unfortunately, towelroot has stopped."
 
Last edited:

andygev35

Senior Member
Jun 22, 2014
182
127
0
OK. You are right. adb doesn't have write access yet.

I tried this and got success:

C:\AndroidDev\sdk\platform-tools>adb install tr.apk
1767 KB/s (113099 bytes in 0.062s)
pkg: /data/local/tmp/tr.apk
Success


What should I do next? Does it mean the tr.apk has been installed?

Thanks
Sounds as though towelroot is now installed. Go to your app drawer and run it.

Sent from my AT&T Galaxy Note 3 using Tapatalk®
 

vbcomer

Member
Dec 11, 2012
43
6
0
Sounds as though towelroot is now installed. Go to your app drawer and run it.

Sent from my AT&T Galaxy Note 3 using Tapatalk®
Yeah, it is installed in the App drawer, but running it gave me error "Unfortunately, towelroot has stopped.".

I went ahead and install both ES File Explorer and SuperUser packages. From ES FE, I could look at the /system/ect/permissions/platform.xml and could see that it had a different date, its date is older, 3/15/2014. I think it came with the N900AUCUCNC2 that I flashed with Odin yesterday.

So, it appears the permission come from a different place or source, I would like to know where Android actually sees the permissions. You know, how did it think that it needed to lock down read/write access to storage areas while the /system folder has been replaced.

Thanks
 

andygev35

Senior Member
Jun 22, 2014
182
127
0
Yeah, it is installed in the App drawer, but running it gave me error "Unfortunately, towelroot has stopped.".

I went ahead and install both ES File Explorer and SuperUser packages. From ES FE, I could look at the /system/ect/permissions/platform.xml and could see that it had a different date, its date is older, 3/15/2014. I think it came with the N900AUCUCNC2 that I flashed with Odin yesterday.

So, it appears the permission come from a different place or source, I would like to know where Android actually sees the permissions. You know, how did it think that it needed to lock down read/write access to storage areas while the /system folder has been replaced.

Thanks
I'm at the limit of my experience here... Did you do the all in one restore or the 4 file restore?

Sent from my AT&T Galaxy Note 3 using Tapatalk®
 

vbcomer

Member
Dec 11, 2012
43
6
0
I'm at the limit of my experience here... Did you do the all in one restore or the 4 file restore?

Sent from my AT&T Galaxy Note 3 using Tapatalk®
Thanks for hanging in and helping, you don't know how much I appreciate your time!

I did the all in one first. That didn't help. Then I did it again with the re-partition with PIT file. But that didn't help either. I didn't try the 4 files individually for fear of losing data.
 

brisinger08

Senior Member
Mar 28, 2014
367
255
83
Thanks for hanging in and helping, you don't know how much I appreciate your time!

I did the all in one first. That didn't help. Then I did it again with the re-partition with PIT file. But that didn't help either. I didn't try the 4 files individually for fear of losing data.
I think you've just about done everything you can do without a complete Odin reinstall and reformat. If adb pull is working for you I suggest pulling the folders you want to save and doing the complete 4 file install with the PIT file as well.

Someone more experienced than I may be able to get you back up without losing your but tbh with the amount of troubleshooting you've done already I think a full Odin reinstall is your best option and will prevent any issues that could stem from this further down the line.

The only thing I can think of with towelroot is that it needs internet access to run were you connected to wifi when you ran it? It's probably not that simple but figured it couldn't hurt to try!
 

vbcomer

Member
Dec 11, 2012
43
6
0
I think you've just about done everything you can do without a complete Odin reinstall and reformat. If adb pull is working for you I suggest pulling the folders you want to save and doing the complete 4 file install with the PIT file as well.

Someone more experienced than I may be able to get you back up without losing your but tbh with the amount of troubleshooting you've done already I think a full Odin reinstall is your best option and will prevent any issues that could stem from this further down the line.

The only thing I can think of with towelroot is that it needs internet access to run were you connected to wifi when you ran it? It's probably not that simple but figured it couldn't hurt to try!
Hi there,

Thanks for replying. I am kind of afraid I will have to go down that route, but at the same time trying not to if I could.

One of the other reasons I didn't try the 4 files was because I thought the all-in-one, as its name suggested, would be equivalent to those 4 files.

Is there a way to pull the SMS, MMS, call logs from the phone via adb? Do you know where those records are kept?

Thanks
 

brisinger08

Senior Member
Mar 28, 2014
367
255
83
Hi there,

Thanks for replying. I am kind of afraid I will have to go down that route, but at the same time trying not to if I could.

One of the other reasons I didn't try the 4 files was because I thought the all-in-one, as its name suggested, would be equivalent to those 4 files.

Is there a way to pull the SMS, MMS, call logs from the phone via adb? Do you know where those records are kept?

Thanks
The all-in-one file is the same as the 4 files, the only difference is installing it doesn't wipe the internal storage.

Have you tried running adb backup? That would be a heck of a lot easier than pulling a bunch of folders...if that doesn't work the databases are in /data/data

Calls: /data/data/com.android.providers.contacts
SMS and MMS: data/data/com.android.providers.telephony
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone