[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307 - Nexus 10 Android Development

I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.

Is it posible to make a CWM flash file?

Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?

alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg

craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.

Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.

Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!

H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)

momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.

alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details

H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.

H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!

You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.

Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium

spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module

craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium

spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...

spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.

Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.

Ok, added a script and instructions to the front page for simple on tablet mounting.

Related

Regaws Root Method???

Is there something additional I need to do to actually gain "root"? I can't install the clear lock screen from smurf, can't wireless tether.... Don't know what's going on, all of this used to work fine on my Hero - what am I missing?
I don't think you have given enough info for people to even know what the problem is that you are having. Maybe you could be a bit more specific. Do you have superuser installed?
Sorry about that.... basically im on stock 2.2 with supposed "root" using regaws method - problem is, I can't use anything though; adb, wireless tether, I can't flash a lock screen (just sits at boot screen).
Download superuser app from the market place or google it if it is not on your phone already. Install it then launch an app that requires root. You will know real fast if you are rooted.
DomSim said:
Download superuser app from the market place or google it if it is not on your phone already. Install it then launch an app that requires root. You will know real fast if you are rooted.
Click to expand...
Click to collapse
I do have SU... that's the thing but when I try ADB Remount it says device not permitted or something like that, can't remember exactly
You could try full wipe / reflash.
Maybe try a diff ROM too.
You need to flash the engineering bootloader (0.76.2000). Go to Toast's method part 2 and follow the steps to unlock nand. You need the engineering bootloader in order to access /system.
Sent from my PC36100 using XDA App
sombdy said:
You need to flash the engineering bootloader (0.76.2000). Go to Toast's method part 2 and follow the steps to unlock nand. You need the engineering bootloader in order to access /system.
Sent from my PC36100 using XDA App
Click to expand...
Click to collapse
Nand root... I was looking for more info on this, I thought it was the culprit, thanks - ill post results, hopefully good
Edit: Won't work "Permission denied" .... this is really starting to piss me off grrr
DirtyShroomz said:
Nand root... I was looking for more info on this, I thought it was the culprit, thanks - ill post results, hopefully good
Edit: Won't work "Permission denied" .... this is really starting to piss me off grrr
Click to expand...
Click to collapse
Have you run Unrevoked Forever? This will turn off security permissions and should then allow you to flash anything.
Sent from my PC36100 using XDA App
Ok, the reason
Code:
adb remount
doesn't work is because the boot.img isn't patched to allow that, because I forgot to at the time of posting. You still have root (as long as you actually completed the guide successfully), that's just an all time access root through adb
To acheive the same results, type
Code:
adb shell
type
Code:
su
you will then see #. thats root.
Then remount your /system partition using
Code:
mount -o rw,remount / /system
there you go.
regaw_leinad said:
Ok, the reason
Code:
adb remount
doesn't work is because the boot.img isn't patched to allow that, because I forgot to at the time of posting. You still have root (as long as you actually completed the guide successfully), that's just an all time access root through adb
To acheive the same results, type
Code:
adb shell
type
Code:
su
you will then see #. thats root.
Then remount your /system partition using
Code:
mount -o rw,remount / /system
there you go.
Click to expand...
Click to collapse
When I try to type "su" it says "Permission denied"
DirtyShroomz said:
When I try to type "su" it says "Permission denied"
Click to expand...
Click to collapse
Do you have usb debugging on?
Try the new 1 click root in the dev forum. Unrevoked 3.2. See if that doesn't do the trick.
Sent from my PC36100 using XDA App
My guess is you didn't flash the 2.2-root.zip at the end then.. That's the best I can do w/ the info you've given.
one was already asked once but i had two questions
1. Is USB Debugging turned on or off? Settings > Applications > Development
2. you are using a stock rooted rom. are you trying to use sprint's wireless tether app? Sprint's app wont work you need to download wireless tether from the market.
joebags said:
one was already asked once but i had two questions
1. Is USB Debugging turned on or off? Settings > Applications > Development
2. you are using a stock rooted rom. are you trying to use sprint's wireless tether app? Sprint's app wont work you need to download wireless tether from the market.
Click to expand...
Click to collapse
Running stock 2.2. Regaw I did flash 2.2-root at the end and I am trying to use wireless tether not Sprints hotspot
I do have superuser in my apps list and I was able to install SNeoid, Swype, Setcpu, juicedefender and a few others that may require root but it wont let me do anything via adb or install any themes/mods that come in .zips
DirtyShroomz said:
Running stock 2.2. Regaw I did flash 2.2-root at the end and I am trying to use wireless tether not Sprints hotspot
I do have superuser in my apps list and I was able to install SNeoid, Swype, Setcpu, juicedefender and a few others that may require root but it wont let me do anything via adb or install any themes/mods that come in .zips
Click to expand...
Click to collapse
ok do this in command prompt and paste the results in code tags (to save space)
Code:
adb shell ls /system/bin/
regaw_leinad said:
ok do this in command prompt and paste the results in code tags (to save space)
Code:
adb shell ls /system/bin/
Click to expand...
Click to collapse
Code:
setconsole
dumplayer
svc
e2fsck_recvy
chownto
apph
ps
id
chownThp
notify
dhcpcd
pand
renice
bugreport
snd8k
hciattach
iqfd
top
lsmod
setprop
ionice
ifconfig
iptables
kthp_proxy
logwrapper
getevent
htcipcd
su
start
iqd
wipe
ip
smd
sleep
getWiMAXPropDaemond
newfs_msdos
vdc
sync
udhcpd
pppd
rmmod
fsck_msdos
netstat
route
sound8k
rm
radiooptions
pm
logcat
setWiMAXPropDaemond
resize2fs_recvy
htc_inittest
vmstat
dvz
mmcamera_test
keystore
dmesg
system_server
linker
fbtool
reboot
sdptool
busybox
hd
iftop
insmod
bootcomplete
rild
schedtop
debuggerd
wpa_supplicant
schedtest
bluetoothd
ping
btld
ime
omx_tests
tc
sendevent
racoon
toolbox
date
bma150_usr
bootanimation
wimaxDhcpRenew
log
installd
wimax_uart
applypatch
wimaxAddRoute
dexopt
monkey
ln
getprop
album_hdmiexe
stop
surfaceflinger
uevent
akmd
monitorMTD
wimax_mtd
mv
debug_tool
servicemanager
wimaxDumpKmsg
dumpstate
ipd
DmWrapperTest
nandread
kill
gzip
chmod
rmdir
lsc_camera
dbus-daemon
run-as
netcfg
cat
htclogkernel
sh
mount
printenv
mkdir
bmgr
wimaxDhcpRelease
umount
mke2fs_recvy
dnsmasq
input
df
ioctl
am
wimaxDumpLogcat
app_process
chown
htc_timezonetest
service
netd
ls
netsharing
cam_ins_spmo
mm-venc-omx-test
dalvikvm
ser2net
dmagent
shutdown
ndc
dumpsys
mediaserver
vold
sequansd
awb_camera
dd
keypress
cmp
mscompress
wimaxDumpLastKmsg
mtpd
watchprops
ok, so "su" is in there... you should be able to
Code:
adb shell
su
and it give you a #
try opening SuperUser.apk on your phone, THEN doing the above commands. a pop up should come up on your phone saying to allow root to su
regaw_leinad said:
ok, so "su" is in there... you should be able to
Code:
adb shell
su
and it give you a #
try opening SuperUser.apk on your phone, THEN doing the above commands. a pop up should come up on your phone saying to allow root to su
Click to expand...
Click to collapse
that worked, now to get remount do i have to always use that previous command you wrote?

[HOW-TO] [GSM & CDMA] Root without Unlocking Bootloader via exploit (for 4.0.1/4.0.2)

[HOW-TO] [GSM & CDMA] Root without Unlocking Bootloader via exploit (for 4.0.1/4.0.2)
Edit: This does not works on anything newer than ICL53F (i.e., 4.0.2). It works fine on ITL41D (4.0.1), ITL41F (4.0.1) and ICL53F (4.0.2)
Once you have got root, you can now use segv11's BootUnlocker app to unlock your bootloader without wiping anything. Easy as pie!
Disclaimer: I take no credit for this exploit or the implementation of it (but I will take credit for the step-by step ). Thanks to kendong2 for pointing it out to me here.
So, it looks like zx2c4 has found a local privilege escalation exploit. See source here, and saurik has managed to package it together for Android. See here. Although this may be old news to some, I hadn't seen it before.
So what does this all mean:
If you are running a 2.6.39 kernel (or above), which all Galaxy Nexus' are, you can now root your device without having to unlock your bootloader (and without losing your data).
Moreover, you should now be able to root your device even if your hardware buttons are not working.
Additionally, this allows those who have not received an OTA update and want to apply it without having an unlocked bootloader or root to do so by copying the OTA update to /cache from /sdcard.
Notes:
1) This assumes that you have USB Debugging enable on your device (Settings > Developer Options > Enable USB Debugging) and the drivers for your device installed on your computer. For the drivers, I would recommend you remove all old drivers and install these. If you don't know how to install them, or are having issues, look here.
2) This needs to be done over ADB, as a terminal emulator on-device does not have the appropriate access. If you do not have ADB, I've attached it in the zip. Unzip all files.
3) Some users indicate that, once finished the procedure, they needed to open the Superuser app.
Step-by-step:
1) Download the attached files to your computer and unzip them in the same directory as your adb.exe file;
2) Open a command prompt in the same directory;
3) Copy the files to your device:
adb push mempodroid /data/local/tmp/mempodroid
adb push su /data/local/tmp/su
adb push Superuser.apk /data/local/tmp/Superuser.apk
4) Open a shell: adb shell
5) Change permission on mempodroid to allow it to run: chmod 777 /data/local/tmp/mempodroid
6) Run the exploit: ./data/local/tmp/mempodroid 0xd7f4 0xad4b sh
Note: Once you do step 6, your prompt should change from $ to #. If not, it did not work.
7) Mount the system partition as rw: mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
8) Copy su to /system: cat /data/local/tmp/su > /system/bin/su
9) Change permissions on su: chmod 06755 /system/bin/su
10) Copy Superuser.apk: cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
11) Change permissions on Superuser.apk: chmod 0644 /system/app/Superuser.apk
12) Mount the system partition as r/o: mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
13) Rescind root: exit
14) Exit the ADB shell: exit
15) Done. You now should have root without having to unlock your bootloader.
Reserved
Reserved
This is the same as https://github.com/saurik/mempodroid
saurik ftw.
times_infinity said:
This is the same as https://github.com/saurik/mempodroid
saurik ftw.
Click to expand...
Click to collapse
Not sure what you are getting at? I mentioned saurik in the first post, and the link you posted is in the first post. And I mentioned that this may be old news, but I haven't seen it anywhere before today in the GN forums.
Yikes! This exploit works on any kernel from 2.6.39 and >. This could become a common root method for many devices. Linus Torvalds himself posted the fix commit! Nice work by zx2c4!
Sleuth255 said:
Yikes! This exploit works on any kernel from 2.6.39 and >. This could become a common root method for many devices. Linus Torvalds himself posted the fix commit! Nice work by zx2c4!
Click to expand...
Click to collapse
You need ics to have a vulnerable kernel version, so given the number of devices which currently have ics officially, I doubt it will be common. I'd also expect Google and vendors to correct this in next release.
Also many custom kernels don't have this flaw as they are at or over 3.0.18 or have patched it. This prevents gaining unnoticed root.
Sent from my Galaxy Nexus
Hmmm I thought 2.6.39 was found in GB builds. This exploit is almost a root fix for the Moto DX 4.5.621 fiasco. Unfortunately the kernel for that build is 2.6.32.9.
Sent from my Galaxy Nexus using xda premium
This was huge in the headlines a few weeks back. It's nice to see someone putting it to a good use!
Sent from my Galaxy Nexus using xda premium
Hi, been lurking awhile, registered to clear up somethings.
I did some research while attempting to access the /data/local/ -folder with terminal emulator and I found that it would be impossible to write or to find it while being unrooted. Rooting a phone through using an unrooted access root seems impossible.
Did I miss something or is there any other way to copy mempodroid to the data- folder? I sure would like to keep all my files.
Huxleysäl said:
Hi, been lurking awhile, registered to clear up somethings.
I did some research while attempting to access the /data/local/ -folder with terminal emulator and I found that it would be impossible to write or to find it while being unrooted. Rooting a phone through using an unrooted access root seems impossible.
Did I miss something or is there any other way to copy mempodroid to the data- folder? I sure would like to keep all my files.
Click to expand...
Click to collapse
I think you are mistaken. In a terminal emulator type: cd /data/local/tmp
Edit: Fixed a mistake made by auto correct...
Sent from my Galaxy Nexus using Tapatalk
efrant said:
I think you are mistaken. In a terminal emulator type: cd /data/local/temp
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
Just did. It says "No such file or directory."
Not the best source, but if you google it, people state what I state. Sorry, can't post links
try /data/local/tmp
Huxleysäl said:
Just did. It says "No such file or directory."
Not the best source, but if you google it, people state what I state. Sorry, can't post links
Click to expand...
Click to collapse
Sorry, damn auto correct. It should be: cd /data/local/tmp
Not "temp".
It works fine.
Edit: Sleuth255 beat me to it!
Sent from my Galaxy Nexus using Tapatalk
efrant said:
Sorry, damn auto correct. It should be: cd /data/local/tmp
Not "temp".
It works fine.
Edit: Sleuth255 beat me to it!
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
Sure, OK, it worked. But as I'm trying to replicate his instructions, copying mempodroid to data/local/tmp doesn't compute. I tried extracting the files, puting mempodroid in a new folder in ./sdcard/ (which I named Nex), and it still couldn't find it.
Wait, just had an idea. Brb
Huxleysäl said:
Sure, OK, it worked. But as I'm trying to replicate his instructions, copying mempodroid to data/local/tmp doesn't compute. I tried extracting the files, puting mempodroid in a new folder in ./sdcard/ (which I named Nex), and it still couldn't find it.
Wait, just had an idea. Brb
Click to expand...
Click to collapse
Hmm. Looks like you may be correct. In GB, we had write access to that directory, but it looks like we don't in ICS. I'll have another look tomorrow and try to figure something out.
Sent from my Galaxy Nexus using Tapatalk
OK, this is exactly what I did:
I downloaded the files, extracted them into the ./sdcard folder of my android. I opened the console, wrote exactly as stated. Reaction? Cannot create /data/local/tmp/mempodroid: Permission denied
So, what I'm thinking is this: I tried the cd ./sdcard/mempodroid, found it. So, logically, that should mean that since the permission is dennied, the problem lies not in where I put the mempodroid, but with my authority over my phone. So, here we are again. Could anybody smarter then me clarify?
efrant said:
Hmm. Looks like you may be correct. In GB, we had write access to that directory, but it looks like we don't in ICS. I'll have another look tomorrow and try to figure something out.
Sent from my Galaxy Nexus using Tapatalk
Click to expand...
Click to collapse
****, I was hoping I was wrong. I originally thought that the exploit was this. But alas.
Try finding an alternative write route to the /data/local/- folder. That should solve all problems, I guess. Big words, ey? This is for the simpletons like me, who stupidly forgot to bootload.
Might want to expand on the steps.
Like what program to use to copy the file.
How do you change permission.
How do you run the exploit.
How to mount rw.
How to copy su.
convolution said:
Might want to expand on the steps.
Like what program to use to copy the file.
How do you change permission.
How do you run the exploit.
How to mount rw.
How to copy su.
Click to expand...
Click to collapse
I hade my initial problems with that too. But as if this moment it doesn't really matter. Read above posts. Anyhow, to answer your question: you need to download a console emulator
Just search for it in the market. Also the commands go in this console
For example: cat /directory/filename > /newdirectory/samefilename means to copy or move from one place. To change permission you just write that line of code ending with 777 instead of cat and then the filename etc and etc.
I didn't know any of this 'till yesterday, so it is quite understandable.
cheers
Huxleysäl said:
F***, I was hoping I was wrong. I originally thought that the exploit was this. But alas.
Try finding an alternative write route to the /data/local/- folder. That should solve all problems, I guess. Big words, ey? This is for the simpletons like me, who stupidly forgot to bootload.
Click to expand...
Click to collapse
I've updated the first post. Give that a go and let me know how it turns out. (The guide may need some minor tweaking, but I am here to help you through it.)
It seems that ADB has rw access to /data/local/tmp but a terminal emulator on-device does not. So for now, you need to be plugged into your computer.
It may be possible to do this with ADB-over-Wi-Fi, but I haven't gotten there yet.

[Q] Problem with Fix Permissions (line 64: UID readonly variable) [WORK AROUND FOUND]

Latest!! Switch to TWRP 2.1.8 (June 18th 2012)
Anyone else having a problem Fixing Permisshions? And how did you fix it?
I noticed it would take 2 seconds to run, so I decided to go to "Show log"
Here is the log
I:Checking for extendedcommand, file not found...
/sbin/fix_permissions: line 64: UID readonly variable
Done!
ro.carrier=unknown
ro.bootloader=unknown
ro.hardware=qcom
ro.revision=0
init.svc.recovery=running
init.svc.adbd=running
Tried:
Running from Rom Manager but it always stalls, never the same place and if I run it multiple times back to back it stalls sooner and sooner
touch recovery
re-installing recovery
clearing download in rom manager and re-installing recovery
setting rom manager to delete recovery before installing
Wipe / reset, wipe cache & dalvik, with superwipe 2 times and re-installing
ClockworkMod Recovery v5.0.2.7
Running [ROM] [cwm]-BLACKEDITION FOR THE SGS2 4-10-2012-ICS RC6
A work around has been found! Thanks to RealPariah, so thank him here!
It is not a fix due to the fact that you still will not be able to fix permissions in CWM or Rom Manager but does get the job done of Fixing Permissions!!
1st Do you have the Google android installed?
If not download and install it! http://developer.android.com/sdk/android-4.0.htm
you might need to install the JDK, if you don't have it already.
2nd Your path to adb must not be set or is not correct.
See http://forum.xda-developers.com/show....php?t=1161776
Now you should be ready to use adb!
STOP!
Fixed in this New CWM Recovery or
GOTO THE DEVELOPMENT THREAD!
http://forum.xda-developers.com/showthread.php?t=1604581
Most recent Fix Script / Work Around found here
http://forum.xda-developers.com/showpost.php?p=25023284&postcount=22
Boot in to Recovery
plug USB in to phone and computer
In Recovery Go in to "mounts and storage" and mount /system and /data
On computer open a command line window (windows) [click start] then [run] then type "cmd" to get a command prompt or terminal (Linux or OSX)
Run "ADB devices" and be sure it is not all ? For device number (if it is restart recovery and reseat USB connection and run "adb kill-server" on computer) I had to run terminal as root (admin for best results bit got it to work either way really)
Now type "adb shell" enter
Once that opens and you get ~#
now type cd /sbin
then type
sh fix_permissions -l -r
done correctly, your command prompt should look like the following
C:\Documents and Settings\family>adb shell
~ # cd /sbin
cd /sbin
/sbin # sh fix_permissions -l -r
sh fix_permissions -l -r
fix_permissions 2.04 started at 04-18-2012 02:28:21
Processing (1 of 177): com.google.android.location...
Processing (2 of 177): com.sec.android.app.phoneutil...
Processing (3 of 177): com.android.defcontainer...
Processing (4 of 177): com.sec.phone...
Processing (5 of 177): com.android.contacts...
Processing (6 of 177): com.android.phone...
ORIGIONAL
RealPariah said:
Fix permissions fix found!
Alright after testing fix permissions I found a way to make it run!
Issue: fix permissions won't run from recovery (correctly (it says done in less than 60 secs and stops instantly for me saying completed and while in Android; ROM manager script runs but freezes at random points (same if you open terminal emulator and run it).
Resolution:
You have to have adb on a computer for this
Do you have the Google android installed?
If not download and install it!
[/url]http://developer.android.com/sdk/android-4.0.html
Boot in to Recovery
plug USB in to phone and computer
Go in to mounts and storage and mount /system and /data
On computer open a command line window (windows) or terminal (Linux or OSX)
Run "ADB devices" and be sure it is not all ? For device number (if it is restart recovery and reseat USB connection and run "adb kill-server" on computer) I had to run terminal as root (admin for best results bit got it to work either way really)
Now run "adb shell" after mounting /system and /data
Once that opens and you get ~# run "sh fix_permissions -l -r" just like that (with two separate - don't do -lr or it won't run)
Of it says not found mount /system
If it says something about read only variable you forgot the preceding sh (may need to do "cd /sbin" then "sh fix_permissions" if you still have an issue.
This is only way I can get fix permissions to run (even tried sh fix_permissions -l -r in Android terminal emulator and script manager to no avail)
After fix permissions ran correctly it really helped iron some small performance issues and notably helped.
I hoped that helps!
Sent from my SAMSUNG-SGH-I727 using Xparent Green Tapatalk 2
Click to expand...
Click to collapse
I have the same issue on multiple roms. Both gingerbread and ics. If you find the solution please share. I will do like wise if i find the answer.
Sent from my brain
Seems this one has people stumped.
Mine actually works on juggernaut every time.
Sent from my GT-P7510 using xda premium
jangst123 said:
Seems this one has people stumped.
Mine actually works on juggernaut every time.
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Yep! Was going to say this. Fix permissions doesn't work on most roms in this section.
Jug and Macnut (based off of jug) are the only two I have had it work on.
Sent from my SGH-T989 using xda premium
I have only experienced this on ICS Roms, on GB roms Permissions work fine for me.
solracarevir said:
I have only experienced this on ICS Roms, on GB roms Permissions work fine for me.
Click to expand...
Click to collapse
Well see this is the problem.... You think it is working but have you checked logs?
Sent from my SGH-T989 using xda premium
Also having the same problem with Fix Permissions instantly finishing, but with the "/sbin/fix_permissions: line 64: UID readonly variable" error in the logs. Trying in ROM Manager also results in in random results each time I try, but never making it all the way through before it just hangs. The furthest I've gotten is 94 of 132.
Also on ICS Blackedition, but still on RC2.
I just tried another ICS rom and I still cant fix permishions. So I tried CM7 and it works fine.
Looks like this is a problem with ICS.
Sent from my SAMSUNG-SGH-T989 using xda premium
Easydoesit ics rom works when fixing permissions in cwm or from manager. Other ics roms don't so far
photrash said:
Easydoesit ics rom works when fixing permissions in cwm or from manager. Other ics roms don't so far
Click to expand...
Click to collapse
What easydoesit ICS rom!?
The only one I see has no ice cream.
Sent from my SAMSUNG-SGH-T989 using xda premium
jangst123 said:
What easydoesit ICS rom!?
The only one I see has no ice cream.
Sent from my SAMSUNG-SGH-T989 using xda premium
Click to expand...
Click to collapse
I don't know but for some reason it's in the general forum and never made it to the development section. Remember to use the autorotation fix since the OP didn't update the ROM yet. http://forum.xda-developers.com/showthread.php?t=1576617
I ran into some weird superuser error...sometimes i lose root access when im trying to delete or change a system file. maybe i gotta wipe data and caches some more and reflash.
The fix permissions work fine for this ROM work fine in CWM and also in ROM manager
photrash said:
I don't know but for some reason it's in the general forum and never made it to the development section. Remember to use the autorotation fix since the OP didn't update the ROM yet. http://forum.xda-developers.com/showthread.php?t=1576617
I ran into some weird superuser error...sometimes i lose root access when im trying to delete or change a system file. maybe i gotta wipe data and caches some more and reflash.
The fix permissions work fine for this ROM work fine in CWM and also in ROM manager
Click to expand...
Click to collapse
I'll check it out later.
But if this is ture I hope a developer takes a look at it and figurers out why fix permishions only works on that ROM and not the other ICS ROMs
jangst123 said:
I'll check it out later.
But if this is ture I hope a developer takes a look at it and figurers out why fix permishions only works on that ROM and not the other ICS ROMs
Click to expand...
Click to collapse
Yeah that and the ORIGINAL leak by racer is the only ics roms that work. I tried all ics t989 roms haha. IM currently running some skyrocket roms and fix permissions isn't working properly in cwm. It's frustrating sometimes because I need it to work haha
RealPariah posted a workaround over in the Blackedition ICS thread that worked for me:
RealPariah said:
Fix permissions fix found!
Alright after testing fix permissions I found a way to make it run!
Issue: fix permissions won't run from recovery (correctly (it says done in less than 60 secs and stops instantly for me saying completed and while in Android; ROM manager script runs but freezes at random points (same if you open terminal emulator and run it).
Resolution:
You have to have adb on a computer for this
Boot in to Recovery
plug USB in to phone and computer
Go in to mounts and storage and mount /system and /data
On computer open a command line window (windows) or terminal (Linux or OSX)
Run "ADB devices" and be sure it is not all ? For device number (if it is restart recovery and reseat USB connection and run "adb kill-server" on computer) I had to run terminal as root (admin for best results bit got it to work either way really)
Now run "adb shell" after mounting /system and /data
Once that opens and you get ~# run "sh fix_permissions -l -r" just like that (with two separate - don't do -lr or it won't run)
Of it says not found mount /system
If it says something about read only variable you forgot the preceding sh (may need to do "cd /sbin" then "sh fix_permissions" if you still have an issue.
This is only way I can get fix permissions to run (even tried sh fix_permissions -l -r in Android terminal emulator and script manager to no avail)
After fix permissions ran correctly it really helped iron some small performance issues and notably helped.
I hoped that helps!
Click to expand...
Click to collapse
I had to do the "cd /sbin" thing before running "sh fix_permissions -l -r" inside the adb shell, but it actually ran without a hitch!
Not quite a solution, but it gets the job done!
You still will not be able to fix perms in CWM or ROM Manager
I had to do the same "cd /sbin" then "sh fix_permissions -l -r" to get it to work
mimicvii said:
RealPariah posted a workaround over in the Blackedition ICS thread that worked for me:
I had to do the "cd /sbin" thing before running "sh fix_permissions -l -r" inside the adb shell, but it actually ran without a hitch!
Click to expand...
Click to collapse
Thank you!! Been going crazy trying to find a solution!
Thanks for this. resolved some issues I had with a specific application force closing on me.
I am under the impression this has to do with the fact that a lot of I727 users, if not all, are having issues mounting /system inside of ICS. Mounting in recovery is fine but it seems that mounting /system inside of ICS works ONCE after flashing a kernel and then never again.
Wow, I'm really stuck. I tried without "SU" but that didn't help. Here is my cmd screen:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Adb>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
26d7140a device
C:\Adb>adb shell
sh-3.2$ cd /sbin
cd /sbin
sh: cd: /sbin: Permission denied
sh-3.2$ su
su
sh-3.2# cd /sbin
cd /sbin
sh-3.2# sh fix_permissions -l -r
sh fix_permissions -l -r
sh: fix_permissions: No such file or directory
sh-3.2#
Any help or guidance is appreciated!
Give this a try and report back
First download http://www.getyourdroidon.com/shiversftp/fix_permissions.sh
Put it on the root of your sd card and go into terminal emulator.
Type: su and hit enter
Type: sh /sdcard/fix_permissions.sh and hit enter
Type reboot and hit enter
Should be all fixed.

[Q] How to delete files/folders from /sdcard?

After rooting my Galaxy Nexus with Wug's Root Toolkit and sim unlocking with the Docomo hack, and then restoring my apps/data (can't recall if I restored from GN Toolkit or Root Toolkit), my camera app was messed up--could snap pix but they didn't save; and video always fc'ed. The solution turns out to be to rename or delete the DCIM folder. I couldn't delete--so I renamed. Now I am trying to delete that DCIM.old folder and contents (eating up 1+G on my storage), but cannot delete either individual files or the folder. I'm sure there is a simple solution, but I can't find it. Help (even with a condescending attitude ) much appreciated!
zzcat
If you use a file explorer, that has it's standard directory at / then all you need to do is navigate to /mnt/sdcard/ then make sure it's mounted as R/W and not R/O, if all that is the way I said it, you shouldn't have problems deleting anything, if so, use the ADB and type:
Code:
adb shell rm /mnt/sdcard/<Folder>
That should then do the trick
You could also try the following Apps:
- Rootexplorer (paid)
- Astro File Manager
familyguy59 said:
If you use a file explorer, that has it's standard directory at / then all you need to do is navigate to /mnt/sdcard/ then make sure it's mounted as R/W and not R/O, if all that is the way I said it, you shouldn't have problems deleting anything, if so, use the ADB and type:
Code:
adb shell rm /mnt/sdcard/<Folder>
That should then do the trick
Click to expand...
Click to collapse
FamilyGuy, thanks for the suggestion, the problem seems to be bad permissions and I can't figure out how to fix them. Tried the "fix permissions" from recovery, as well as when booted, to no avail.
Typing
adb shell rm -rf /[directory]
gives me "permission denied"
So tried
chmod 666 /sdcard/.../*
but get an "operation not permitted" message.
So I'm really stuck here...
familyguy59 said:
If you use a file explorer, that has it's standard directory at / then all you need to do is navigate to /mnt/sdcard/ then make sure it's mounted as R/W and not R/O, if all that is the way I said it, you shouldn't have problems deleting anything, if so, use the ADB and type:
Code:
adb shell rm /mnt/sdcard/<Folder>
That should then do the trick
Click to expand...
Click to collapse
Update: solved
boot into recovery mode
mount /data
adb shell
rm, rmdir etc. all work as expected from here, no need to chown or chmod anything
zz
I see you've solved this, but i thought i would throw this in anyway...
The easy way is to delete the files from /data/media
The sdcard directory is a symlink, so go to the true folder and you should have more success...
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
cmstlist said:
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
Click to expand...
Click to collapse
Thanks for this and other suggestions--my solution was trial and error, thrashing around in the dark (my unix command line chops are really, really rusty), and these are far more elegant. It's good to understand the underlying problem, your wisdom is appreciated.
Yes, permissions were messed up after rooting and applying a sim unlock hack, wiping and restoring from pre-unlock backup set. I see it so clearly now...
Problem can somebody help me?
Hello. I have a problem with my motorola defy+ running on gb 2.3.6 and is not ROOTED. Still he has an annoyng problem. After installing an aplication (not from the market) i saw that it didn't save data on the sd card. I uninstalled it and after a data factory reset i install apps such as temple run and Brother in Arms 2. At temple run it gave me this mesage
"File Access Problem Caution, unable to write files. This means your game progress can't be saved! Reason: Access to the path "/mnt/sdcard/Android/data/com.imangi.templerun/files/spaceholder.dat" is denied."
Also at Brother in Arms 2 the game didn't save. I rest the phone abouat 7-8 times.I changed the sd card. Note that the card was a 16 gb kingmax class 6 and put the 2 gb card that came with the phone. It all work smoothly. So what is the problem the sd card or the phone's software. Please answer i'm desparate and tired of wasting time.
This thread is about the Samsung Galaxy Nexus which has no external SD and uses a very different storage structure. I'm afraid we can't really help you here. Try the Defy forum.
Sent from my Galaxy Nexus using Tapatalk 2
zzcat said:
FamilyGuy, thanks for the suggestion, the problem seems to be bad permissions and I can't figure out how to fix them. Tried the "fix permissions" from recovery, as well as when booted, to no avail.
Typing
adb shell rm -rf /[directory]
gives me "permission denied"
So tried
chmod 666 /sdcard/.../*
but get an "operation not permitted" message.
So I'm really stuck here...
Click to expand...
Click to collapse
Before chmod the folder, you needed to be root by entering 'su' after 'adb shell' .
It worked from cwm, because cwm gives root access.
Linux/Android are all about permissions.
Sent from my i9250
cmstlist said:
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
Click to expand...
Click to collapse
I tried your theory, and it didn't work, still get the message" unable to change ownership permission denied, in recovery mode.
we are still trying to find a solution, here is the discussion: http://www.slatedroid.com/topic/32434-i-got-my-smartq-t20/page__st__260 on Post # 277
rocketero said:
I tried your theory, and it didn't work, still get the message" unable to change ownership permission denied, in recovery mode.
we are still trying to find a solution, here is the discussion: http://www.slatedroid.com/topic/32434-i-got-my-smartq-t20/page__st__260 on Post # 277
Click to expand...
Click to collapse
Sorry to hear that. It sounds like the problem you are having is with a completely different device, so I can't really say why this may be occurring - I don't know how your device's file system is structured. This advice is specifically for the Galaxy Nexus. If a version of CWM exists for your smartQme device, I can't speak to whether it works properly and interprets commands the same way ours does.
cmstlist said:
Sorry to hear that. It sounds like the problem you are having is with a completely different device, so I can't really say why this may be occurring - I don't know how your device's file system is structured. This advice is specifically for the Galaxy Nexus. If a version of CWM exists for your smartQme device, I can't speak to whether it works properly and interprets commands the same way ours does.
Click to expand...
Click to collapse
it's a 9.8 inches tablet branded named called "LePanII'. it has ICS now, before we had Honeycomb 3.2.1.
The manufacture of this tablet did such a bad partitioning that the /system partition was left only with merely 4MB of free space in it.
rocketero said:
it's a 9.8 inches tablet branded named called "LePanII'. it has ICS now, before we had Honeycomb 3.2.1.
The manufacture of this tablet did such a bad partitioning that the /system partition was left only with merely 4MB of free space in it.
Click to expand...
Click to collapse
Good luck with your issue. I doubt it's related to the one we were having on the GNex though.
cmstlist said:
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
Click to expand...
Click to collapse
Sorry if my question is dumb.
Does this command solve the problem for all the folders and sub-folders in sdcard? Thank you for your help!
Sent from my Galaxy Nexus
/data/media # chown -R media_rw.media_rw*
BusyBox v1.20.2-jb static (2012-10-25 21:29 +0100) multi-call binary.
Usage: chown [-RhLHP]... OWNER[<.|:>[GROUP]] FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP
-R Recurse
-h Affect symlinks instead of symlink targets
-L Traverse all symlinks to directories
-H Traverse symlinks on command line only
-P Don't traverse symlinks (default)
I got this after giving the commands from recovery in adb shell.
What does that mean?
Jar3112 said:
/data/media # chown -R media_rw.media_rw*
BusyBox v1.20.2-jb static (2012-10-25 21:29 +0100) multi-call binary.
Usage: chown [-RhLHP]... OWNER[<.|:>[GROUP]] FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP
-RRecurse
-hAffect symlinks instead of symlink targets
-LTraverse all symlinks to directories
-HTraverse symlinks on command line only
-PDon't traverse symlinks (default)
I got this after giving the commands from recovery in adb shell.
What does that mean?
Click to expand...
Click to collapse
OK solved, I forgot the space before the *!
Worked like a charm!!
Sent from my Galaxy Nexus

Tasker/Secure Settings on Systemless Root

So i'm trying to create a profile in tasker to enable/disable airplane whenever i'm connected to Wifi and it seems SecureSettings isn't allowing root actions even though it has root privileges. Anyone know an app that works with tasker that can allow me to enable/disable airplane mode?
Thanks!
metpage said:
So i'm trying to create a profile in tasker to enable/disable airplane whenever i'm connected to Wifi and it seems SecureSettings isn't allowing root actions even though it has root privileges. Anyone know an app that works with tasker that can allow me to enable/disable airplane mode?
Thanks!
Click to expand...
Click to collapse
Is there any particular reason you are using systemless root?
Sent from my Nexus 5X using Tapatalk
Mainly for Android Pay to work but I'm not married to systemless root if system root makes this work. However I may have found a workaround using Locale instead.
Sent from my Nexus 5X using Tapatalk
In either a terminal on your phone, or via adb shell from the computer, enter these commands:
Code:
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
I can't remember if you need to reboot or not, but might as well, just in case. Afterward, run your task and allow Secure Settings root access.
After doing this, Tasker and Secure Settings works for me. If this doesn't fix your problem, I don't know.
Thanks I'll give this a shot if Locale doesn't work
Sent from my Nexus 5X using Tapatalk
lightningdude said:
In either a terminal on your phone, or via adb shell from the computer, enter these commands:
Code:
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
I can't remember if you need to reboot or not, but might as well, just in case. Afterward, run your task and allow Secure Settings root access.
After doing this, Tasker and Secure Settings works for me. If this doesn't fix your problem, I don't know.
Click to expand...
Click to collapse
I have the same problem, running CF-Autoroot on my S7 edge. I would like to try your trick but am not sure how to exactly . Could you please explain a little bit more in detail how this is done?
EDIT: nevermind, i solved it my self using THIS method.
Thanks in advance.
Works for Secure settings, but it's broken Titanium backup
When I try to implement this in adb I get the following:
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system'->'/system': Device or resource busy
Can anyone help? Would greatly appreciate it. Thanks!
facted said:
When I try to implement this in adb I get the following:
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system'->'/system': Device or resource busy
Can anyone help? Would greatly appreciate it. Thanks!
Click to expand...
Click to collapse
Try using this command instead:
mount -o rw,remount /system
It worked for me
PiousInquisitor said:
Is there any particular reason you are using systemless root?
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
is there system root for 7.0 or is this thread about 6.0.1?
niklus101 said:
is there system root for 7.0 or is this thread about 6.0.1?
Click to expand...
Click to collapse
There are unofficial versions in in the super su section here.
LSI said:
Works for Secure settings, but it's broken Titanium backup
Click to expand...
Click to collapse
Yeh, unfortunately, it does, same with AdAway.
Does it have to do with Android N or is it about the fact that touch /sbun/su fails due to sbin being read only?
If someone knows a solution, that would be great.
LSI said:
Works for Secure settings, but it's broken Titanium backup
Click to expand...
Click to collapse
I have the same problem with this too. It would be great to have a solution, or at least knowing how to reverse it would be great.
lightningdude said:
In either a terminal on your phone, or via adb shell from the computer, enter these commands:
Code:
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
I can't remember if you need to reboot or not, but might as well, just in case. Afterward, run your task and allow Secure Settings root access.
After doing this, Tasker and Secure Settings works for me. If this doesn't fix your problem, I don't know.
Click to expand...
Click to collapse
Do you hit enter at each line?
I'm doing this exact thing with Tasker and Magisk. I just had to add a quick edit to my build.prop, and then Tasker could recognize root with Magisk, and it worked fine.
Fit some reason I'm getting this error when dropping the commands
That's because it's mount -o not -0.
I just got secure settings and tried these commands in terminal. However they don't work. I get device or resource busy.
I'm on PureNexus 7.1.1 root via supersu on my Nexus 5x IF that matters in any way.
Edit: never mind. Solved it by replacing 0 with o. *Facepalm*
I've encountered the same problem in Android 7.1.2 and the above solution didn't work out for me. Secure Settings system+ is unavailable.
Any other solutions?
The first command
mount -o remount,rw /system
gave me the following result:
mount: '/dev/block/platform/msm_sdcc.1/by-name/system' not user mountable in fstab
1|jfltexx:/ $
It seems like an error.
akran said:
I've encountered the same problem in Android 7.1.2 and the above solution didn't work out for me. Secure Settings system+ is unavailable.
Any other solutions?
The first command
mount -o remount,rw /system
gave me the following result:
mount: '/dev/block/platform/msm_sdcc.1/by-name/system' not user mountable in fstab
1|jfltexx:/ $
It seems like an error.
Click to expand...
Click to collapse
Try this:
Code:
mount -o rw,remount /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o ro,remount /system
I'll share how I fixed this problem, which might be a LOT easier for some people.
Install a file manager that has root access (ie Root Explorer).
Navigate to /system/bin
Click whatever button to mount /system as rw.
Create a directory (or file) and call it su
Reboot phone
Open Secure settings and enable root.
At this point (and with above solutions, Android Pay is broken. If you want it back.
Open file manager again.
navigate to /system/bin
mount rw
delete the su folder (or file) you created earlier.
reboot.
Secure Settings only checks for su file the first time. Once it's been granted access, it no longer looks for su, it just tells the system it needs root access. So it will work the way its supposed to, even though it no longer can find the su file in expected location.
Also, for those that don't know, "touch" creates a file. So if you want to pass SafetyNet still, go back and delete the 3 files created from the touch command. And note that you only need to do 1 of them, not all 3, for Secure Settings to work.

Categories

Resources