[Q] adb remount and Jelly Bean - Galaxy S III Q&A, Help & Troubleshooting

Hey all.
With the latest Jelly Bean roms I can't use "adb remount" anymore and therefore not push files to /system with Windows. All I get is "Operation not permitted".
I was using an ICS Rom before and everything was fine, but now no matter which custom Rom I install, it's not working.
Do I need a special bootloader or something? How can I get this to work?

You dont have the root access yet. You need to execute adb root then adb remount. If granted you can push files.

Eyonik said:
Hey all.
With the latest Jelly Bean roms I can't use "adb remount" anymore and therefore not push files to /system with Windows. All I get is "Operation not permitted".
I was using an ICS Rom before and everything was fine, but now no matter which custom Rom I install, it's not working.
Do I need a special bootloader or something? How can I get this to work?
Click to expand...
Click to collapse
It's not a custom ROM you need, it's a kernel with a /sbin/adbd in its initramfs that does not drop privileges. I built such a binary for AndreiLux's Perseus kernel so you could flash that. Alternatively, Chainfire's adbd Insecure app that works with any kernel (free on XDA/£ on Google Play) was recently updated and it will replace /sbin/adbd with one that runs as root on each startup.
EDIT: Didn't see the date on the OP's thread. Meh, this is still relevant.

Related

[Q] Running ADB as root

So, I've gotten my SGS2 today and went ahead to root it. Flashed CF-Root matching my current version (KE7 PDA/KE4 baseband). I used the S2Root app posted here on the forum to get root and flashed a stock kernel back.
In either of these stages, I couldn't get ADB to run as root, needed for a modification i'm trying to do (can't write to /system/framework otherwise).
Is there a known way to get ADB to run as root?
(The issue at hand - /default.prop contains ro.secure=1 and ro.debuggable=0 - And i can't edit this file in order for it to persist after reboot)
even in CWM i can't get ADB to run as root and thus cannot copy files to /system/framework even though /system is mounted as r/w.
Thanks for the help.
ransagy said:
So, I've gotten my SGS2 today and went ahead to root it. Flashed CF-Root matching my current version (KE7 PDA/KE4 baseband). I used the S2Root app posted here on the forum to get root and flashed a stock kernel back.
In either of these stages, I couldn't get ADB to run as root, needed for a modification i'm trying to do (can't write to /system/framework otherwise).
Is there a known way to get ADB to run as root?
(The issue at hand - /default.prop contains ro.secure=1 and ro.debuggable=0 - And i can't edit this file in order for it to persist after reboot)
even in CWM i can't get ADB to run as root and thus cannot copy files to /system/framework even though /system is mounted as r/w.
Thanks for the help.
Click to expand...
Click to collapse
Try this:
adb shell mkdir /sdcard/temp/
adb push fileToPush /sdcard/temp/
adb shell
$ su
# cp /sdcard/temp/ /system/path/to/push/to/
ADB doesn't run as root, as it's not safe to, as you can bypass superuser security in a rogue app otherwise
I'll try it ASAP, Thanks.
Isn't there a way to edit /default.prop though?
I'd prefer to have adb run in root at the very least while running this mod, and then restore it.
the mod currently patches framework.jar/libwebcore.so for RTL issues, and relays on scripted access to adb and r/w access to /system.
I ended up discovering that i need a different ROM either way since stock is odexed.
I'll try making my own ROM based on stock with deodexed files and make the fix before hand.

[Q] Enable Development Mode on SGS2 custom-ROM by carrier

I just bought an SGS2 from a carrier in Brazil (TIM) but it came full of crappyware and most importantly: without the Development Mode option in Settings > Applications !!
So basically, although I could root it by replacing the kernel, I'm still not able to adb shell on it because of this issue.
Does anyone have an idea on how to enable the Development Mode through ConnectBot?
Also, how do I remount the SD from ConnectBot with 'rw'? You know... to remove all the crappyware...
Thank you
bruno.borges said:
I just bought an SGS2 from a carrier in Brazil (TIM) but it came full of crappyware and most importantly: without the Development Mode option in Settings > Applications !!
So basically, although I could root it by replacing the kernel, I'm still not able to adb shell on it because of this issue.
Does anyone have an idea on how to enable the Development Mode through ConnectBot?
Also, how do I remount the SD from ConnectBot with 'rw'? You know... to remove all the crappyware...
Thank you
Click to expand...
Click to collapse
dont you have cwm with replacing the kernel? so cant you flash a custom rom and with that everything you want? (still not dev relevant )
Sorry, I forgot to mention that I don't want to replace the stock ROM... not for now.
I'm waiting for CM7
bruno.borges said:
Sorry, I forgot to mention that I don't want to replace the stock ROM... not for now.
I'm waiting for CM7
Click to expand...
Click to collapse
ah okay. cm7 is already available almost everything is working. there are stock roms available for download in intratech's thread. without replacing your current rom it'll be difficult. I cant help more :-/
This thread should be in Q&A.
The first steps you need to take (rooting & custom recovery) are available in the CF-Root thread
Rawat said:
This thread should be in Q&A.
The first steps you need to take (rooting & custom recovery) are available in the CF-Root thread
Click to expand...
Click to collapse
he already did that: So basically, although I could root it by replacing the kernel, I'm still not able to adb shell on it because of this issue.
My question is: how to enable Development Mode from ConnectBot (terminal) directly from inside Android? Remembering that I have root
Again not dev and I'm not sure about connectbot but why don't you just replace settings.apk? Wouldn't t that take care of it instantly?
To replace settings.apk I need adb shell, or read-write access to mounted SD.
The reason I'm posting this to Dev question, is because devs are probably the ones with knowledge on how to do this.
I have root, I have terminal access to root (ConnectBot for example) and that's all.
I cannot adb shell into it because Development Mode option is not present on Settings > Applications.
How do I remount with read-write access the SD ? This way, I can download a settings.apk (new question: any hint from where I can get the stock-stock version?) and cp to /syste/app through ConnectBot
Use terminal emulator and remount system rw and then replace settings? Won't that work ?
Sent from my GT-I9100 using XDA App
Remounting with +rw worked. Carrier specific apps deleted. Now any hint on what settings.apk should I use? The one from CM7 ?
Must I replace SettingsProvider.apk too?
bruno.borges said:
Remounting with +rw worked. Carrier specific apps deleted. Now any hint on what settings.apk should I use? The one from CM7 ?
Click to expand...
Click to collapse
afaik different framework --> wont work. if you have a fast internet connection download a custom rom(based on samsung i.e. not miui or cm7), extract it and pick the settings.apk
take care. should match your present firmware. probably 2.3.3 and most of the users are on 2.3.4 or 2.3.5(miui+cm7)
or if anybody is so kind he could upload his settings.apk (i'm on miui so sorry)
http://forum.xda-developers.com/showthread.php?t=1182498
Flash that kernel with odin.
Download just about any rom, minus cm7, grab SettingsProvider.apk and Settings.apk from the zip file (/system/app/SettingsProvider.apk)
put them somewhere you can find them, open a command prompt in that directory.
(if you haven't setup adb properly you will need to drop everything in with the adb.exe file, but I would suggest setting it up properly.)
adb shell
su (accept on phone)
mount -o remount,rw /system
exit
exit
adb push SettingsProvider.apk /system/app
adb push Settings.apk /system/app
designgears said:
http://forum.xda-developers.com/showthread.php?t=1182498
Flash that kernel with odin.
Download just about any rom, minus cm7, grab SettingsProvider.apk and Settings.apk from the zip file (/system/app/SettingsProvider.apk)
put them somewhere you can find them, open a command prompt in that directory.
(if you haven't setup adb properly you will need to drop everything in with the adb.exe file, but I would suggest setting it up properly.)
adb shell
su (accept on phone)
mount -o remount,rw /system
exit
exit
adb push SettingsProvider.apk /system/app
adb push Settings.apk /system/app
Click to expand...
Click to collapse
Im 100% sure that the above WILL work..
But care to explain why you dont want to flash a custom rom?
Just curious..
Sent from my GT-I9100 using XDA Premium App
Which ROM do you recommend, that is mostly closer to stock Samsung TouchWiz 2.3.3 ?
I don't want to install CM7 yet because it still lacks some features.
bruno.borges said:
Which ROM do you recommend, that is mostly closer to stock Samsung TouchWiz 2.3.3 ?
I don't want to install CM7 yet because it still lacks some features.
Click to expand...
Click to collapse
modaco's prebaked ROM offers stock + a few tweaks that most people would find useful.
And although your questions would be best answered by those with developer knowledge, it still doesn't mean it should be posted here.
Also, even if you don't have terminal access, I'm pretty sure with root you can use Root Explorer to copy over the new settings.apk and setting the appropriate permissions.
Alright, thanks a lot!

SuperSu problem

OK, so I have a rooted I9300 and for some reason for the last few weeks I cant update the subinary and titanium wont get root access.
I did many google searches, tried a few thing eg (http://forum.xda-developers.com/showthread.php?t=1900217) , tried rooting again (even though I know Im rooted but nothing works.
So the next thing I want to try is to unroot my phone and root again.
My question is, because I cant access titanium to back everything up,
is there a way to unroot WITHOUT losing all apps and data?
Thanks a lot in advance.
Make nandroid backup and restore apps using titanium when your phone are rooted again.
Use MybackupPro to backup messages/contacts/bookmark/system setting/bookmarks.
Sent from my GT-I9300 using xda app-developers app
Uninstall super su via Google Play and reinstall .
jje
Cant use nandroid. It needs busybox which requests root access.
JJEgan said:
Uninstall super su via Google Play and reinstall .
jje
Click to expand...
Click to collapse
Tried it- it wont uninstall but go back to an earlier version.
Reinstalled the latest version and Im getting the same message.
Root checker app says "This device does not have proper root access".
...just re-root it? Assuming you used CF-Root and will be flashing it again, when CWM runs again and installs the SuperSU ZIP, /system/xbin/su will get overwritten (and get set with the correct permissions).
Else, if whatever reason you don't want to do that, if you have CWM recovery installed, just mount /system, and using ADB delete /system/xbin/su, /system/app/Superuser.apk, /system/bin/.ext and install CWM-SuperSU-v0.96.zip again.
If you don't have CWM, you can use a kernel with an insecure adbd (Perseus kernel has this for Jellybean ROMs, and earlier Siyah and GalaxSih kernels have this for ICS) and delete /system/xbin/su and /system/app/Superuser.apk. You'll have to manually install SuperSU from the ZIP.
qwerty12 said:
...just re-root it? Assuming you used CF-Root and will be flashing it again, when CWM runs again and installs the SuperSU ZIP, /system/xbin/su will get overwritten (and get set with the correct permissions).
Else, if whatever reason you don't want to do that, if you have CWM recovery installed, just mount /system, and using ADB delete /system/xbin/su, /system/app/Superuser.apk, /system/bin/.ext and install CWM-SuperSU-v0.96.zip again.
If you don't have CWM, you can use a kernel with an insecure adbd (Perseus kernel has this for Jellybean ROMs, and earlier Siyah and GalaxSih kernels have this for ICS) and delete /system/xbin/su and /system/app/Superuser.apk. You'll have to manually install SuperSU from the ZIP.
Click to expand...
Click to collapse
I tried rooting again- didn't change anything.
I do have CWM.
Tried using ADB, but it requests root access and fails to get it...
tomerstern said:
I do have CWM.
Click to expand...
Click to collapse
Good, ADB will be running as root in CWM by default. Boot into recovery mode, go to mounts and storage, and select Mount /system.
If you don't already have ADB setup and the correct drivers installed (if you already have Kies installed then you have the drivers installed). do the following. You can check, if you wish, by seeing when you connect your phone in recovery - you should have a SAMSUNG Android ADB Device under SAMSUNG Android Phone or an Android Debugger Bridge device in Device Manager. If not:
Download http://dl.google.com/android/repository/platform-tools_r14-windows.zip and extract the three files adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll to a place of your choosing
install the drivers: http://www.mediafire.com/?2243ouw1701zp8l (Extracted from Kies_2.5.0.12094_27_11.exe)
disconnect and reconnect your phone
Go to the folder where you have adb installed in the Command Prompt, and run "adb shell". Run the following commands:
Code:
rm /system/app/Superuser.apk
chattr -i /system/xbin/su [in case Survival Mode is turned on in SuperSU]
rm /system/xbin/su
rm /system/bin/su [ignore this one if it throws an error]
rm -r /system/bin/.ext
That should unroot your phone.
Go to "Install ZIP from sdcard" and choose to install a zip from the internal sdcard.
Exit out of the root shell (Ctrl+C or, alternatively, "exit" and you'll be sent back to the command prompt) on your computer and download the SuperSU ZIP.
Go back to the command prompt and type this "adb push " (including the space) and drag the CWM-SuperSU-v0.96.zip onto the command prompt window, add a space and type "/data/media". You should have something like "adb push <path to CWM-SuperSU-v0.96.zip> /data/media"
This should put the SuperSU ZIP onto the root of your internal memory card. Choose go back on your phone and select to install a ZIP from the internal memory card again. You should see CWM-SuperSU-v0.96.zip. Install it, reboot, update SuperSU from the Play Store and run SuperSU from the app drawer. You should get a prompt asking you to update the su binary. Do so.
Grab Android Terminal Emulator on the Market, and run "su". If all went well, SuperSU should ask you for permission. Grant it and if the $ turned into a # and the command "id" says uid=0 (root) then you're rooted!
OK, Im really sorry and embarrassed to say that I got confused with my tab 10.1.
I Do not have CWM installed.
Tried installing it now and could not. I stay on odin mode and I dont get the CWM menu...
I guess at this stage when my root is screwed I cant install CWM anymore.
What can I do now?
Thanks again and sorry for the confusion..
tomerstern said:
Tried installing it now and could not. I stay on odin mode and I dont get the CWM menu...
I guess at this stage when my root is screwed I cant install CWM anymore.
Click to expand...
Click to collapse
Flashing CF-Root should always get you CWM as it's done through ODIN, which does not care if your phone is rooted or not. When you're flashing CF-Root, make sure the auto reboot option remains ticked. If your phone doesn't boot into CWM after ODIN reboots it, then take note of the following:
Chainfire said:
- NOTE: Sometimes the device does *not* boot into recovery mode and root your device. Just do the entire procedure again if this happens. If it still will not install root and such, make sure that in Odin "Auto Reboot" is not checked. Then after flashing, pull the battery, and boot with VolUp+Home+Power button to boot into recovery manually. This will start the install process.
Click to expand...
Click to collapse
qwerty12 said:
Go to the folder where you have adb installed in the Command Prompt, and run "adb shell". Run the following commands:
Code:
rm /system/app/Superuser.apk
chattr -i /system/xbin/su [in case Survival Mode is turned on in SuperSU]
rm /system/xbin/su
rm /system/bin/su [ignore this one if it throws an error]
rm -r /system/bin/.ext
Click to expand...
Click to collapse
OK, Im now in the mounts and storage folder insider CWM.
ADB interface is installed on device manager.
II dont understand what to press and where to run these commands.
tomerstern said:
OK, Im now in the mounts and storage folder insider CWM.
ADB interface is installed on device manager.
II dont understand what to press and where to run these commands.
Click to expand...
Click to collapse
Under the mounts and storage option, select mount /system. It will change to "unmount /system" if selected correctly.
The commands are run from an "adb shell" session, which you can get to by doing this:
Extract those three ADB files from that platform-tools ZIP to a folder somewhere (I chose C:\adb out of randomness). Open that folder and while holding down the shift key, right-click a blank, white area in the folder and select "Open command window here". You can then type "adb shell", which will allow you to run those commands.
qwerty12 said:
Good, ADB will be running as root in CWM by default. Boot into recovery mode, go to mounts and storage, and select Mount /system.
Click to expand...
Click to collapse
There isnt mount system there. I see unmount system.
I see mount data, preload etc.
OK, that's fine, you may move on to running those commands.
Two problems:
1. running "chattr -i /system/xbin/su"
resulted in a "chatter not found" message.
2. Trying to push the su zip resulted in this message: "error: device not found".
tomerstern said:
"chattr -i /system/xbin/su"
Click to expand...
Click to collapse
If rm worked on /system/xbin/su, then ignore it as you don't need it anyway.
2. Trying to push the su zip resulted in this message: "error: device not found".
Click to expand...
Click to collapse
Reconnect the phone and try again?
not working after numerous attempts.
Can I Start the phone and move the zip file manually with a micro sd cable? If not, what else?
tomerstern said:
Can I Start the phone and move the zip file manually with a micro sd cable? If not, what else?
Click to expand...
Click to collapse
That should be fine
moved it to internal memory and after shutdown, power+home+volume up wont take me to cwm anymore but to android system recovery.
Why? How do I get back to cwm? Install it again with Odin?
BY THE WAY, I can still see supersu is installed on my device. Does it mean what we did did not work?
OK, I can confirm this method works
I just installed the zip of the supersu and now Ive got full root privileges.
The reason I couldnt get into cwm was that for some reason I get a short android upgrade each time I boot up. This upgrade deletes cwm. Thats why I found out that I need to install CWM and then immidiately press power-volume up-home, before i let the device power up.
I want to give a big thanks to qwerty12 for the help and much needed patience.

[Q] What Up with Ad-blocking?

I cannot get the ad blocking host files to stick with this device. I have tried both Adfree Android and Adaway. The host files won't survive a reboot. Sometimes, I apply them and they revert back after a few hours of use. I am just wondering if anyone else has experienced this issue on this device. SU is functioning properly.
Peace
Not exactly the same, but I noticed any app I remove via Titanium Backup gets restored on reboot as well.
Both of these actions require writing to /system, which cannot be done with android booted up, until we have s-off.
Every time I try to write to system (On accident by running some root app without thinking about it) my device reboots. I figured that was normal for a rooted S-on device. That doesn't happen to y'all?
trickster2369 said:
Both of these actions require writing to /system, which cannot be done with android booted up, until we have s-off.
Click to expand...
Click to collapse
I am pretty sure I was able to do this on the Rezound prior to S off. Also, how can one flash a ROM if your not able to write to the system?
I just want to understand this a little bit better. Thanks.
Irieone said:
I am pretty sure I was able to do this on the Rezound prior to S off. Also, how can one flash a ROM if your not able to write to the system?
I just want to understand this a little bit better. Thanks.
Click to expand...
Click to collapse
you can not write to /system with android booted up.
So you can flash a rom in recovery but you cant edit anything in /system while in android
Irieone said:
I am pretty sure I was able to do this on the Rezound prior to S off. Also, how can one flash a ROM if your not able to write to the system?
I just want to understand this a little bit better. Thanks.
Click to expand...
Click to collapse
On all the newer phones, HTC (or Verizon) write-locked \system while the phone is booted in android. :good: But you're right, on the Rezound, you could write to \system while still S-ON.
so I guess to debloat, someone will have to make one of those debloating tools that delete through adb.
nrfitchett4 said:
so I guess to debloat, someone will have to make one of those debloating tools that delete through adb.
Click to expand...
Click to collapse
This has already been done my friend look in the development section. Also I think I saw a script that you can run in recovery that ads ad blocking hosts! CHEERS:highfive:
Here you go:
ad block is on that other site => http://rootzwiki.com/topic/36775-mod-debloater-adblock-restore-v3/
and theres some debloat love here in development => http://forum.xda-developers.com/showthread.php?t=2012388
nrfitchett4 said:
so I guess to debloat, someone will have to make one of those debloating tools that delete through adb.
Click to expand...
Click to collapse
Freezing in TiBu appears to work.
Going to have a go with AdBlock Plus since its supposed to work without root.
https://play.google.com/store/apps/details?id=org.adblockplus.android&feature=nav_result#?t=W251bGwsMSwyLDNd
Irieone said:
Going to have a go with AdBlock Plus since its supposed to work without root.
https://play.google.com/store/apps/details?id=org.adblockplus.android&feature=nav_result#?t=W251bGwsMSwyLDNd
Click to expand...
Click to collapse
Screw that who wants that running in the background, run AdFree and update hosts, hook up USB with debugging on and use ADB:
"adb shell" then "su" and grant yourself root. Then "cp /system/etc/hosts /sdcard" then type "exit" and "exit" to get out of the shell.
Then run "adb reboot recovery" and mount /system partition in recovery. Then "adb shell" and "cp /sdcard/hosts /system/etc/hosts" -- exit shell and reboot
Done
Do this or just push the host file http://db.tt/LQAUEcZM to /system/etc/ with the built in TWRP file manager if you don't want to use ADB.
Nowak4G said:
Do this or just push the host file http://db.tt/LQAUEcZM to /system/etc/ with the built in TWRP file manager if you don't want to use ADB.
Click to expand...
Click to collapse
Is anybody having trouble creating this symlink as instructed in AdAway on their Droid DNA?
I type the command and all I get is "ln: /system/etc/hosts: File exists"
I exit, reboot and the app still tells me the symlink is missing.
I'll be the first to admit my adb-fu is weak, probably my fault.
Edit: so, I did it the other way. When the app tells you the symlink failed it still creates a hosts file in data/data. I used TWRP/Advanced/File Manager to move this into system/etc.
Still, it would be nice to get the symlink working and have AdAway update automatically rather than having to go through this process periodically.
disc0rdian said:
Screw that who wants that running in the background, run AdFree and update hosts, hook up USB with debugging on and use ADB:
"adb shell" then "su" and grant yourself root. Then "cp /system/etc/hosts /sdcard" then type "exit" and "exit" to get out of the shell.
Then run "adb reboot recovery" and mount /system partition in recovery. Then "adb shell" and "cp /sdcard/hosts /system/etc/hosts" -- exit shell and reboot
Done
Click to expand...
Click to collapse
This is exactly what I did. I used root explorer to copy the host file from /system/etc and pasted it on the sdcard
Rebooted into recovery, mounted /sdcard and /system and ran adb to push the file
viola! done
^^
I think that's basically doing the same thing I did, but still the symlink would be nice so it could be automatically updated.
---------- Post added at 09:02 PM ---------- Previous post was at 08:44 PM ----------
OK, got a little tech support off the DNA IRC. As I suspected, I'm just dumb
Make sure to delete any existing system/etc/hosts and data/data/hosts before you run the command.
Works fine now!
Now that we have s-off, what are you guys using to block ads?
andyroidna said:
Now that we have s-off, what are you guys using to block ads?
Click to expand...
Click to collapse
The same thing we've been doing for the past 3 months. Nothing had changed in that respect since kernels with system write enabled came out.
Sent from my HTC6435LVW using xda app-developers app

root using cwm zip for unbranded tablet!

I have a lemon tab with ics 4.0.3 and 3.0.8 kernal...
I have tried all possible ways to root it... Right now the su is there as built in app. The terminal confirmed my tab as unrooted. But if i type system/xbin/su in the terminal, the terminal receive su permission. So i thought i am close to rooting it.
Pls help me to complete it fully. The su is 3.2 version. I used su uninstaller but of no use. Besides i have lost my ideal cwm 5.0.2. 4 zip file and its getting difficult finding a new one fitting my tab.
P.S i dont have a pc. I m using recovery reboot method.
when I download x-parts v7, it ask for su permission. when I select install, it cannot detect a suitable cwm. exynoabuse and farmaroot said "not exploitable". I am completely helpless.... plz help me.

Categories

Resources