ADB running as Root on Production Builds... - Verizon Samsung Galaxy S 4

Hey all,
Found the pieces all around the internet, but I am am working on a ROM, and though I would share my steps to enable ADB running as Root, allowing us to adb push/pull /system/app.
1. Download adbd insecure from the Google Play Store, open and select run on Boot and the "insecure" checkbox.
2. Run adb kill-server on your computer.
3. Run adb root on your computer
4. Profit
You can now push/pull/chmod/mkdir in system directories! (However on /system for example, you still need to remount it RW through adb shell first.

Related

Uninstall factory apps through android debuger

Is possible to uninstall factory apps with root access, all we know that.
But, ADB have 'root' command that give root access to the terminal what you are in, so, in this case, factory apps can be uninstalled by androig debugger with root acces?
like:
adb root
adb uninstall XXX
?
Regards
I found a way, by http://www.josephcs.com/removing-system-stock-apps-android/
===="
No root? The ADB way!
If your phone has not been rooted, Android Debug Bridge (ADB) might do some help. Before you proceed, this is for advanced users! A little Unix knowledge is appreciable.
Download the Android SDK & extract it locally. Open command-prompt and point it to the /tools directory. Connect your phone to your computer with USB Debugging enabled on phone (Settings->Applications->Development and check USB Debugging).
Check if your device has been recognized
adb devices
If your device is listed, browse to system/app. System apps are stored in /system/app.
adb shell
cd system/app
ls
‘ls’ lists the files in the present directory. Identify the file-name of the app to be removed, and type
rm example.apk
where example.apk is the name of the file with its extension.
If you prefer to back it up to SD Card, you can move the file instead (which also removes from phone)
mv filename.apk /sdcard/appbackup
where ‘appbackup‘ is a directory.
Done! Repeat the steps until all the apks that you want removed are done. Optionally, restart your device.
"====

How to Root on Mac OSX

Hi,
Did a search and someone said they were able to root with thecubed method on Mac via Terminal, but I've had no luck so far. Are there any other options for us Mac users?
Thanks
BTW I did see some instructions but it only applies to Verizon. I have the international version D802.
Any help would be greatly appreciated.
use virtual machine and use windows?
I haven't found any easy way to do it, other that running bootcamp and windows on the mac..
You can do it via adb just fine on osx (I'm on snow leopard). You can check which commands to run by opening the Windows script as a text document. It's easy to follow what's going on and has sections for each device
xdabbeb said:
You can do it via adb just fine on osx (I'm on snow leopard). You can check which commands to run by opening the Windows script as a text document. It's easy to follow what's going on and has sections for each device
Click to expand...
Click to collapse
I opened root.bat as a text file but as far as how to input the commands I'm not sure what to do as it seems to differs from the video. Sorry I'm not that familiar working with Terminal.
If you could help out that would be great.
Thanks
xdabbeb said:
You can do it via adb just fine on osx (I'm on snow leopard). You can check which commands to run by opening the Windows script as a text document. It's easy to follow what's going on and has sections for each device
Click to expand...
Click to collapse
Ahhhhh! You know Mavericks is free, right? UPGRADE THAT THING!
On another note... same issue w/ me. I ended up rooting it via my PC, but after that you can use Android File Transfer to manage files and load roms and stuff via OSX.
sell ur POS apple and get a pc...?
digitard said:
Ahhhhh! You know Mavericks is free, right? UPGRADE THAT THING!
On another note... same issue w/ me. I ended up rooting it via my PC, but after that you can use Android File Transfer to manage files and load roms and stuff via OSX.
Click to expand...
Click to collapse
Ha! I haven't upgraded because I still feel snow leopard is the best. I don't like how they've integrated so much ios in the last two, and SL is lean/efficient.
If I have some time I'll write down the commands in a reply. Do you have adb already set up?
xdabbeb said:
Ha! I haven't upgraded because I still feel snow leopard is the best. I don't like how they've integrated so much ios in the last two, and SL is lean/efficient.
If I have some time I'll write down the commands in a reply. Do you have adb already set up?
Click to expand...
Click to collapse
Yes already have adb set up. Thanks for this. Really appreciate it.
No problem. What version of the G2 do you have?
---------- Post added at 11:49 PM ---------- Previous post was at 11:48 PM ----------
Ignore that, I just saw you mentioned the international version
OK, here you go:
1) Go here here and here and thank them both for their work...and read their disclaimers about breaking your phone. The same applies here.
2) Download the attached archive and extract the contents into whatever folder you want...for the purposes of this I'll assume you did so to a directory called ~/D802_OSXroot. If you chose a different directory, modify the steps below accordingly. The archive I attached only contains the appropriate file for the international (D802) LG G2, and I used Chainfire's SuperSU instead of the older ChainsDD su binary and apk. While you're at it, go here and thank him.
3) Make sure USB Debugging is enabled on your phone in Settings>Developer Options
4) Connect your phone via usb cable. You'll get the popup asking what type of connection on your phone. Select Internet connection and then Ethernet when asked. You should see the debugging icon in the status bar of your phone
5) Open terminal on your mac
6) To verify that you are properly connected run the following command:
Code:
adb shell "ls -a /"
you should see the contents of the root of your phone...inlcuding a number of init files. If you do, proceed. If you don't, you have an adb/connection problem.
7) Execute the following in the terminal window to go to the directory where the archive has been extracted on your mac:
Code:
cd ~/D802_OSXroot
8) Execute the following to push the loki exploit file to your phone
Code:
adb push ./g2_security /sdcard/g2_security
9) Unplug your usb cable from the phone
10) On your phone go to Settings>Developer Options and disable USB Debugging
11) Re-enable USB Debugging
12) Plug in your USB cable (follow step 4)
13) Verify adb connectivity (follow step 6)
14) Go back to your terminal window, make sure you are still in the same directory with the files from the archive and execute the following commands in order:
Code:
adb shell "mount -o remount,rw /system"
Code:
adb push ./su /system/xbin/su
Code:
adb shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
Code:
adb install superuser.apk
15) Launch the SuperSU app on your phone. It will likely prompt you to update the su binary...let it do so and then reboot your phone. You should be rooted now.
Good luck!
xdabbeb said:
OK, here you go:
1) Go here here and here and thank them both for their work...and read their disclaimers about breaking your phone. The same applies here.
2) Download the attached archive and extract the contents into whatever folder you want...for the purposes of this I'll assume you did so to a directory called ~/D802_OSXroot. If you chose a different directory, modify the steps below accordingly. The archive I attached only contains the appropriate file for the international (D802) LG G2, and I used Chainfire's SuperSU instead of the older ChainsDD su binary and apk. While you're at it, go here and thank him.
3) Make sure USB Debugging is enabled on your phone in Settings>Developer Options
4) Connect your phone via usb cable. You'll get the popup asking what type of connection on your phone. Select Internet connection and then Ethernet when asked. You should see the debugging icon in the status bar of your phone
5) Open terminal on your mac
6) To verify that you are properly connected run the following command:
Code:
adb shell "ls -a /"
you should see the contents of the root of your phone...inlcuding a number of init files. If you do, proceed. If you don't, you have an adb/connection problem.
7) Execute the following in the terminal window to go to the directory where the archive has been extracted on your mac:
Code:
cd ~/D802_OSXroot
8) Execute the following to push the loki exploit file to your phone
Code:
adb push ./g2_security /sdcard/g2_security
9) Unplug your usb cable from the phone
10) On your phone go to Settings>Developer Options and disable USB Debugging
11) Re-enable USB Debugging
12) Plug in your USB cable (follow step 4)
13) Verify adb connectivity (follow step 6)
14) Go back to your terminal window, make sure you are still in the same directory with the files from the archive and execute the following commands in order:
Code:
adb shell "mount -o remount,rw /system"
Code:
adb push ./su /system/xbin/su
Code:
adb shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
Code:
adb install superuser.apk
15) Launch the SuperSU app on your phone. It will likely prompt you to update the su binary...let it do so and then reboot your phone. You should be rooted now.
Good luck!
Click to expand...
Click to collapse
Has anyone tried this method?
Sent from my LG-D802 using Tapatalk
xdabbeb said:
OK, here you go:
1) Go here here and here and thank them both for their work...and read their disclaimers about breaking your phone. The same applies here.
2) Download the attached archive and extract the contents into whatever folder you want...for the purposes of this I'll assume you did so to a directory called ~/D802_OSXroot. If you chose a different directory, modify the steps below accordingly. The archive I attached only contains the appropriate file for the international (D802) LG G2, and I used Chainfire's SuperSU instead of the older ChainsDD su binary and apk. While you're at it, go here and thank him.
3) Make sure USB Debugging is enabled on your phone in Settings>Developer Options
4) Connect your phone via usb cable. You'll get the popup asking what type of connection on your phone. Select Internet connection and then Ethernet when asked. You should see the debugging icon in the status bar of your phone
5) Open terminal on your mac
6) To verify that you are properly connected run the following command:
Code:
adb shell "ls -a /"
you should see the contents of the root of your phone...inlcuding a number of init files. If you do, proceed. If you don't, you have an adb/connection problem.
7) Execute the following in the terminal window to go to the directory where the archive has been extracted on your mac:
Code:
cd ~/D802_OSXroot
8) Execute the following to push the loki exploit file to your phone
Code:
adb push ./g2_security /sdcard/g2_security
9) Unplug your usb cable from the phone
10) On your phone go to Settings>Developer Options and disable USB Debugging
11) Re-enable USB Debugging
12) Plug in your USB cable (follow step 4)
13) Verify adb connectivity (follow step 6)
14) Go back to your terminal window, make sure you are still in the same directory with the files from the archive and execute the following commands in order:
Code:
adb shell "mount -o remount,rw /system"
Code:
adb push ./su /system/xbin/su
Code:
adb shell "chown 0.0 /system/xbin/su;chmod 06755 /system/xbin/su;sync;mount -o remount,ro /system"
Code:
adb install superuser.apk
15) Launch the SuperSU app on your phone. It will likely prompt you to update the su binary...let it do so and then reboot your phone. You should be rooted now.
Good luck!
Click to expand...
Click to collapse
Thanks for this. I'm having an issue at the first step. I have tested adb when I downloaded the SDK and if I direct the command ./adb devices to that specific folder it can read my phone, but just going into terminal and entering adb shell "ls -a /" al I get is -bash: adb: command not found
Also when I connect my phone to the mac I get options on the G2 but none are internet then ethernet. I get: Charge Phone, Media Sync, Tethering, LG Software, Send Images. The Mac does not ask me what connection I want.
ck37 said:
Thanks for this. I'm having an issue at the first step. I have tested adb when I downloaded the SDK and if I direct the command ./adb devices to that specific folder it can read my phone, but just going into terminal and entering adb shell "ls -a /" al I get is -bash: adb: command not found
Also when I connect my phone to the mac I get options on the G2 but none are internet then ethernet. I get: Charge Phone, Media Sync, Tethering, LG Software, Send Images. The Mac does not ask me what connection I want.
Click to expand...
Click to collapse
It sounds like the first issue may just be due to you not having adb set up properly. If you execute "echo $PATH" in terminal and don't see the android/tools and android/platform-tools directories there, that's the problem. You can either set your path variable to include those directories or just edit the commands I listed accordingly.
The second issue may be due to a difference in the D802 rom vs the VS980. The important thing is that USB Debugging is enabled and that you can access your phone via adb. The 802 may not prompt you in the same way, but if you fix your adb setup the commands will work the same. The rooting method listed (which is the same as thecubed method) is predicated on that working properly.
xdabbeb said:
It sounds like the first issue may just be due to you not having adb set up properly. If you execute "echo $PATH" in terminal and don't see the android/tools and android/platform-tools directories there, that's the problem. You can either set your path variable to include those directories or just edit the commands I listed accordingly.
The second issue may be due to a difference in the D802 rom vs the VS980. The important thing is that USB Debugging is enabled and that you can access your phone via adb. The 802 may not prompt you in the same way, but if you fix your adb setup the commands will work the same. The rooting method listed (which is the same as thecubed method) is predicated on that working properly.
Click to expand...
Click to collapse
I think I figured it out. What I did was transfer the ADB icon from my SDK folder into this one. From there I was able to get access to adb inside the D802 folder. I did have to enter the ./adb as opposed to adb though.
As for the LG I selected tethering as that seemed to be the option similar to the internet/ ethernet choice you mentioned.
All other commands worked accordingly.
Binaries updated for SuperUser as well. At this point how do I get into recovery to upload ROMS etc?
ck37 said:
I think I figured it out. What I did was transfer the ADB icon from my SDK folder into this one. From there I was able to get access to adb inside the D802 folder. I did have to enter the ./adb as opposed to adb though.
As for the LG I selected tethering as that seemed to be the option similar to the internet/ ethernet choice you mentioned.
All other commands worked accordingly.
Binaries updated for SuperUser as well. At this point how do I get into recovery to upload ROMS etc?
Click to expand...
Click to collapse
What I did was installed flashify from the market. This app allows you to backup and then flash a new recovery. Make sure you dl the right one for your device!
Sent from my LG-VS980 using Tapatalk

[Q] Ematic EGS004 BU Rooting/Kernal Module Issue

Hello,
Veteran SW guy here; but newbie at Android.
I have three tablets. All of them are Ematic Model EGS004. All three were bought for the sole purpose of being used by children to watch educational videos (in mp4 and flv formats) and read PDF documents. Absolutely nothing else. No games. No internet access whatsoever. Etc.
Two of the tablets are still in the box and have not been touched. I'm hoping that they may be useful for making/restoring an original image of the tablets.
To implement the requirements of this project, I did the following to one of the tablets:
1) Used the instructions at http://forum.xda-developers.com/showthread.php?t=2495069 to get root access with Cydia Impactor and Chainfire SuperSU.
2) Installed Titanium Backup (root). Using this, I uninstalled most of the Google applications (excluding Google Play), messager, YouTube, games, etc.
3) Installed File Manager (Explorer) by Rhythm Software.
4) Installed Shell Terminal Emulator by MobilDev. Using the shell, I went to the /system/lib directory and renamed libwifidisplay.so
and libwpa_client.so to libwifidisplay.disabled and libwpa_client.disabled.
Unfortunately, upon reboot, the tablet gets stuck in the bootup screen (with the ematic logo). Obviously, something about Android causes a hang if an expected kernel module is missing...
I tried using the shell in Cydia Impactor. But, the file system was read only. I tried:
mount -o rw,remount /system
But, I get an "Operation not permitted" since I am not root.
I downloaded the ADB bundle for windows at http://developer.android.com/sdk/index.html#download and successfully installed adb on my PC. I could get into a shell with the "adb shell" command. But, the /system/lib directory still is read only and I can't seem to remount it since I am not root.
I tried "adb remount". "Operation not permitted" was the result, again.
Cydia Impactor installs its "su" binary in /system/xbin. I tried running it from there using various invocations like "su -c mount -o rw,remount /system" Each time, the shell hung and I never got a shell prompt afterwards.
Questions:
1) Surely there's a way that I can get back in to rename these files now... I can "ls" them from the adb shell. I can pull them to my PC with adb pull. (adb put doesn't work either since the file system is read only.) Ideas?
2) Once I get this solved, what is the best way to get rid of the wireless capability so that children can never use it? I would like to move videos and PDF's between it and a PC strictly via USB.
3) Is there a way to image/restore one of the untouched tablets - or, for that matter, this one once its up and running like it needs to be?
Thanks everyone!
Jim
Let's try a simpler question since there have been no responses:
Once I get into a shell (non-root) using ADB or Cythia Impactor, I believe I can rename the files if I can only get SuperSU to work. However, when I invoke su, the shell hangs:
su -c ls
su
etc. All of these hang. I assume that SuperSU is waiting for a confirmation from the android display. But, since I'm stuck at the startup screen, there's never an opportunity. How can I get the shell to interact with me as root so that I can remount the file system as RW and rename files?
Thanks,
Jim
rivkah613 said:
Hello,
Veteran SW guy here; but newbie at Android.
I have three tablets. All of them are Ematic Model EGS004. All three were bought for the sole purpose of being used by children to watch educational videos (in mp4 and flv formats) and read PDF documents. Absolutely nothing else. No games. No internet access whatsoever. Etc.
Two of the tablets are still in the box and have not been touched. I'm hoping that they may be useful for making/restoring an original image of the tablets.
To implement the requirements of this project, I did the following to one of the tablets:
1) Used the instructions at http://forum.xda-developers.com/showthread.php?t=2495069 to get root access with Cydia Impactor and Chainfire SuperSU.
2) Installed Titanium Backup (root). Using this, I uninstalled most of the Google applications (excluding Google Play), messager, YouTube, games, etc.
3) Installed File Manager (Explorer) by Rhythm Software.
4) Installed Shell Terminal Emulator by MobilDev. Using the shell, I went to the /system/lib directory and renamed libwifidisplay.so
and libwpa_client.so to libwifidisplay.disabled and libwpa_client.disabled.
Unfortunately, upon reboot, the tablet gets stuck in the bootup screen (with the ematic logo). Obviously, something about Android causes a hang if an expected kernel module is missing...
I tried using the shell in Cydia Impactor. But, the file system was read only. I tried:
mount -o rw,remount /system
But, I get an "Operation not permitted" since I am not root.
I downloaded the ADB bundle for windows at http://developer.android.com/sdk/index.html#download and successfully installed adb on my PC. I could get into a shell with the "adb shell" command. But, the /system/lib directory still is read only and I can't seem to remount it since I am not root.
I tried "adb remount". "Operation not permitted" was the result, again.
Cydia Impactor installs its "su" binary in /system/xbin. I tried running it from there using various invocations like "su -c mount -o rw,remount /system" Each time, the shell hung and I never got a shell prompt afterwards.
Questions:
1) Surely there's a way that I can get back in to rename these files now... I can "ls" them from the adb shell. I can pull them to my PC with adb pull. (adb put doesn't work either since the file system is read only.) Ideas?
2) Once I get this solved, what is the best way to get rid of the wireless capability so that children can never use it? I would like to move videos and PDF's between it and a PC strictly via USB.
3) Is there a way to image/restore one of the untouched tablets - or, for that matter, this one once its up and running like it needs to be?
Thanks everyone!
Jim
Click to expand...
Click to collapse
Erratic Ematic
rivkah613 said:
Let's try a simpler question since there have been no responses:
Once I get into a shell (non-root) using ADB or Cythia Impactor, I believe I can rename the files if I can only get SuperSU to work. However, when I invoke su, the shell hangs:
su -c ls
su
etc. All of these hang. I assume that SuperSU is waiting for a confirmation from the android display. But, since I'm stuck at the startup screen, there's never an opportunity. How can I get the shell to interact with me as root so that I can remount the file system as RW and rename files?
Thanks,
Jim
Click to expand...
Click to collapse
I rooted my son's EGS004, installed busybox, and played around with it without any apparent problem. When I rebooted it, I was prompted to set up the device then and every subsequent time I rebooted it. I could not install any apps and could not redo the Cydia Impactor rooting procedure. The reason was that /data was reporting itself as 0.00B in size. Factory reset didn't change anything. Ematic wants me to return it.
Your issue sounds different, but it could be something as simple as the device being very unforgiving. There's a pinhole with a reset button (never worked for me but tech support suggested it) which may help.

[Q] Couldn't open ADB Shell

In recovery mode, I couldn't access shell window by using adb shell command. (Referring to the attached pic)
The device has already be rooted and OS run very well.
I also checked the hierarchy of the system, system/bin/sh does exist.
So what's wrong with it, any advice welcome!
BTW, this adb file works fine with my another mobile featured with Qualcomm CPU, hence is adb file dependent on type of CPU?

Can't get ADB root access - What else could I try?

Hi there
I fiddle largely with MTK based phones and when I tweak a phone, I normally only need ADB root access. So my general process has been to:
1. OEM Unlock the device
2. unpack the boot.img and change the default.prop values (ro.adb.secure etc) to allow ADB root access.
3. Use ADB to get temporary write access using adb Root, then ADB remount Rw. Then you can pull and push files.
However I have an MT8735b, Android 7.0, Alps based device that will simply not give me ADB root access. so when I run "adb remount rw" or any of the equivalent shell scripts you can use instead, it just won't give me write access.
So I heard that newer phones based on these chipsets and also ones like 6737M are locking the device up in other ways.
My question is, does anyone have any ideas or knows anything I could try to get root access?
Any help is much appreciated.

Categories

Resources