Hi,
Today decided to flash a rooted Google play edition ROM (because I had some issues with my current rom). I had to push the ROM to the phone with adb(because my phone has been acting up recently), unfortunately I made a mistake the first time and typed /sdcard instead of /sdcard/ and got an error saying it is a directory...
I fixed the mistake and got the ROM pushed and flashed. It's working normally except now the apps can't read the SD card. FC explorer says "access denied" even when given root privileges.
When in recovery, I can still see the internal SD contents using the TWRP built in explorer. (Latest version, I had to update in order to be able to flash the rom)
It's a pretty troublesome issue. Any help would be greatly appreciated.
Jandyman said:
Hi,
Today decided to flash a rooted Google play edition ROM (because I had some issues with my current rom). I had to push the ROM to the phone with adb(because my phone has been acting up recently), unfortunately I made a mistake the first time and typed /sdcard instead of /sdcard/ and got an error saying it is a directory...
I fixed the mistake and got the ROM pushed and flashed. It's working normally except now the apps can't read the SD card. FC explorer says "access denied" even when given root privileges.
When in recovery, I can still see the internal SD contents using the TWRP built in explorer. (Latest version, I had to update in order to be able to flash the rom)
It's a pretty troublesome issue. Any help would be greatly appreciated.
Click to expand...
Click to collapse
I would try:
Code:
adb shell
su
restorecon -FR /data/media/0
exit
Then reboot and see if its ok, if not I would wipe everything and format /data and reflash the rom.
alray said:
I would try:
Code:
adb shell
su
restorecon -FR /data/media/0
exit
Then reboot and see if its ok, if not I would wipe everything and format /data and reflash the rom.
Click to expand...
Click to collapse
Thanks for the reply! I just managed to sort it out.
For anyone else with this issue.
There is a script on this site in a thread by osm0sis ("osm0sis' odds and ends...") Which has a flashable script which fixes it.
You must boot into recovery before pushing it via adb if you've a case like mine where the sdcard cannot be accessed when phone is booted into the OS.
Your abd suggestion might work just the same but I'd used the flsshabke script first. Thank you.
Jandyman said:
Thanks for the reply! I just managed to sort it out.
For anyone else with this issue.
There is a script on this site in a thread by osm0sis ("osm0sis' odds and ends...") Which has a flashable script which fixes it.
You must boot into recovery before pushing it via adb if you've a case like mine where the sdcard cannot be accessed when phone is booted into the OS.
Your abd suggestion might work just the same but I'd used the flsshabke script first. Thank you.
Click to expand...
Click to collapse
Glad you got it sorted :good:
That script is also doing a "restorcon" but looks like its a much more complete solution.
Code:
#!/sbin/sh
# sdcard Fix Permissions: Recovery Flashable Zip
# osm0sis @ xda-developers
OUTFD=/proc/self/fd/$2;
ui_print() {
echo -ne "ui_print $1\n" > $OUTFD;
echo -ne "ui_print\n" > $OUTFD;
}
set_perm() {
files=$(echo $* | awk '{ print substr($0, index($0,$4)) }');
for i in $files; do
chown $1.$2 $i; chown $1:$2 $i;
chmod $3 $i;
done;
}
set_perm_recursive() {
dirs=$(echo $* | awk '{ print substr($0, index($0,$5)) }');
for i in $dirs; do
chown -R $1.$2 $i; chown -R $1:$2 $i;
find "$i" -type d -exec chmod $3 {} +;
find "$i" -type f -exec chmod $4 {} +;
done;
}
show_progress() { echo "progress $1 $2" > $OUTFD; }
set_progress() { echo "set_progress $1" > $OUTFD; }
[B][COLOR="red"]restore_con() { test -e /sbin/restorecon && restorecon -R $* || /system/bin/toolbox restorecon -R $*; }[/COLOR][/B]
ui_print " ";
ui_print "sdcard Fix Permissions Script";
ui_print "by osm0sis @ xda-developers";
show_progress 1.34 0;
ui_print " ";
ui_print "Mounting...";
busybox mount /data;
busybox mount /system;
set_progress 0.2;
ui_print " ";
ui_print "Setting /data/media to media_rw and fixing...";
set_perm_recursive 1023 1023 0775 0664 "/data/media";
set_perm 1023 1023 0770 "/data/media" "/data/media/0" "/data/media/obb";
[B][COLOR="Red"]restore_con /data/media/0[/COLOR][/B];
set_progress 0.6;
if [ -d /data/media/clockworkmod -o -d /data/media/0/clockworkmod ]; then
ui_print " ";
ui_print "Setting CWM directory perms...";
set_perm_recursive 0 0 0777 0777 "/data/media/clockworkmod";
set_perm_recursive 0 0 0777 0666 "/data/media/0/clockworkmod";
fi;
set_progress 0.7;
if [ -d /data/media/0/TWRP ]; then
ui_print " ";
ui_print "Setting TWRP directory perms...";
set_perm_recursive 0 0 0777 0666 "/data/media/0/TWRP";
fi;
set_progress 0.8;
if [ -d /data/media/multirom -o -d /data/media/0/multirom ]; then
ui_print " ";
ui_print "Setting MultiROM directory perms...";
set_perm_recursive 0 0 0755 0755 "/data/media/multirom" "/data/media/0/multirom";
set_perm 0 0 0770 "/data/media/multirom" "/data/media/0/multirom";
set_perm 1023 1023 0777 "/data/media/multirom/roms" "/data/media/0/multirom/roms";
set_perm 1023 1023 0666 "/data/media/multirom/.nomedia" "/data/media/0/multirom/.nomedia";
set_perm 0 0 0750 "/data/media/multirom/trampoline" "/data/media/0/multirom/trampoline";
set_perm 0 0 0666 "/data/media/multirom/multirom.ini" "/data/media/0/multirom/multirom.ini";
set_perm 0 0 0644 "/data/media/multirom/adbd" "/data/media/0/multirom/adbd" \
"/data/media/multirom/mrom.fstab" "/data/media/0/multirom/mrom.fstab" \
"/data/media/multirom/ubuntu-init/local" "/data/media/0/multirom/ubuntu-init/local" \
"/data/media/multirom/ubuntu-touch-init/scripts/touch" "/data/media/0/multirom/ubuntu-touch-init/scripts/touch" \
"/data/media/multirom/ubuntu-touch-sysimage-init/scripts/touch" "/data/media/0/multirom/ubuntu-touch-sysimage-init/scripts/touch";
ui_print "Note: You will need to dirty flash your secondary ROMs to ensure their permissions are correct";
fi;
set_progress 1.1;
ui_print " ";
ui_print "Unmounting...";
umount /data;
umount /system;
set_progress 1.2;
ui_print " ";
ui_print "Done!";
set_progress 1.34;
exit 0;
Related
Hi I built a little script to mount my SDcard @ startup of the phone and install some apps.
here it is:
Code:
sleep 2
busybox mount > /data/mount.txt
busybox ls /dev/block/vold >> /data/mount.txt
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,shortname=mixed,utf8 /dev/block/vold/179:1 /sdcard >> /data/mount.txt
busybox mount >> /data/mount.txt
sleep 3
echo "APPS installation"
if [ -e /sdcard/Apps-install/install.txt ];
then
echo "found file" > /sdcard/Apps-install/install.txt
cd /sdcard/Apps-install
ls *.apk > ./apps.txt
for line in $(cat apps.txt); do install -c -D /sdcard/Apps-install/"$line" /data/app >> /sdcard/Apps-install/install.txt; done
echo "ok" >> /sdcard/Apps-install/install.txt
else
echo "file not found" > /sdcard/Apps-install/install.txt
fi;
sleep 2
echo "Finish"
if [ -e /data/firstboot.sh ];
then
busybox rm -f /data/firstboot.sh;
busybox rm -f /sdcard/Apps-install/apps.txt;
fi;
echo "Restart"
sleep 1
reboot
I'm sure that the code is well executed (as is have data in /data/mount.txt) but the mount of the SD and so every work related to the SD
What is strange is that script work if i execute it after the phone has completely started.
Can someone help please.
Bye
Herc.8)
A Little up for a little help
Hi,
I still need help,
thx by advance
Bye
Herc. 8)
Ok finally found bye myself.
I changed the device: /dev/block/vold/179:1 for /dev/block/mmcblk0p1
That's all.
Bye
Herc. 8)
milestone 1 on cm7 0.08-11.04.24 7.0.1 , i have one ext3 partition on my sdcard, everything was working fine,
but after upgrading to cm7.1.0 RC0 11.05.03 yesterday , i can't move the dalvik-cache to ext partition any longer.
even if i do this
mv /data/dalvik-cache /sddata/dalvik-cache
ln -s /sd-ext/dalvik-cache/ /data/dalvik-cache
next time phone reboots, it delete my link and create dalvik-cache directory in "internal storage" while not on my ext3 partition
when i boot into OR 3.3 , the ext3 partition is mounted as /sddata
if i boot into phone ui, the ext3 partition is mounted as /sd-ext
i tiried linking to both directory , none of them works
anyone knows how to do it ?
[edit] after updating to 7.1.0 RC5 11.05.20, the file update-07app2ext-dalvik.on.ext.zip provided by zeppelin doesn't work , ahhhhh.
You will need to edit the 07app2ext file in /system/etc/init.d
Yep.
I did this yesterday actually since my internal storage was getting too low for my liking.
From github, the earlier 07app2ext:
Code:
#!/system/bin/sh
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext
fi
if [ "`egrep -q $SD_EXT_DIRECTORY /proc/mounts;echo $?`" != "0" ];
then
echo "$SD_EXT_DIRECTORY not mounted.. skipping a2sd"
exit
fi
for dir in app app-private dalvik-cache;do
if [ "`egrep -q \"/data/${dir}\" /proc/mounts;echo $?`" != "0" ];
then
if [ ! -e "${SD_EXT_DIRECTORY}/${dir}" ];
then
install -m 771 -o 1000 -g 1000 -d ${SD_EXT_DIRECTORY}/${dir}
fi
if [ -L "/data/${dir}" ];
then
rm /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
if [ "${dir}" = "dalvik-cache" ];
then
if [ ! -L "/data/${dir}" ];
then
rm -rf /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
fi
if [ "${dir}" = "app" -o "${dir}" = "app-private" ];
then
for app in `find /data/${dir} -type f -iname "*.apk" -o -iname "*.zip"`;do
mv ${app} ${SD_EXT_DIRECTORY}/${dir}/
done
fi
mount -o bind ${SD_EXT_DIRECTORY}/${dir}/ /data/${dir}
fi
done
chmod 755 /system/etc/init.d/07app2ext
chown -R 0.2000 /system/etc/init.d
sleep 1
I just started using s2e from the market, its working so far
zeppelinrox said:
Yep.
I did this yesterday actually since my internal storage was getting too low for my liking.
From github, the earlier 07app2ext:
Code:
#!/system/bin/sh
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext
fi
if [ "`egrep -q $SD_EXT_DIRECTORY /proc/mounts;echo $?`" != "0" ];
then
echo "$SD_EXT_DIRECTORY not mounted.. skipping a2sd"
exit
fi
for dir in app app-private dalvik-cache;do
if [ "`egrep -q \"/data/${dir}\" /proc/mounts;echo $?`" != "0" ];
then
if [ ! -e "${SD_EXT_DIRECTORY}/${dir}" ];
then
install -m 771 -o 1000 -g 1000 -d ${SD_EXT_DIRECTORY}/${dir}
fi
if [ -L "/data/${dir}" ];
then
rm /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
if [ "${dir}" = "dalvik-cache" ];
then
if [ ! -L "/data/${dir}" ];
then
rm -rf /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
fi
if [ "${dir}" = "app" -o "${dir}" = "app-private" ];
then
for app in `find /data/${dir} -type f -iname "*.apk" -o -iname "*.zip"`;do
mv ${app} ${SD_EXT_DIRECTORY}/${dir}/
done
fi
mount -o bind ${SD_EXT_DIRECTORY}/${dir}/ /data/${dir}
fi
done
chmod 755 /system/etc/init.d/07app2ext
chown -R 0.2000 /system/etc/init.d
sleep 1
Click to expand...
Click to collapse
It works on MIUI?
I think so.
It's based on CM7, yeah?
If people are using app2ext on MIUI then I'd say yes.
If it has an 07app2ext file, then it's 100% guaranteed.
What I did was I replaced the 07app2ext file in the update zip with the one above so when it gets flashed I don't have to do anything.
It has an 07app2ext file, so a replace with this and my app2ext didnt work anymore...
There is my older app2ext code:
Code:
#!/system/bin/sh
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext
fi
if [ "`egrep -q $SD_EXT_DIRECTORY /proc/mounts;echo $?`" != "0" ];
then
echo "$SD_EXT_DIRECTORY not mounted.. skipping a2sd"
exit
fi
if [ -L "/data/dalvik-cache" ];
then
rm /data/dalvik-cache
install -m 771 -o 1000 -g 1000 -d /data/dalvik-cache
fi
if [ -e "${SD_EXT_DIRECTORY}/dalvik-cache" ];
then
rm -rf ${SD_EXT_DIRECTORY}/dalvik-cache
fi
for dir in app app-private;do
if [ "`egrep -q \"/data/${dir}\" /proc/mounts;echo $?`" != "0" ];
then
if [ ! -e "${SD_EXT_DIRECTORY}/${dir}" ];
then
install -m 771 -o 1000 -g 1000 -d ${SD_EXT_DIRECTORY}/${dir}
fi
if [ -L "/data/${dir}" ];
then
rm /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
if [ "${dir}" = "app" -o "${dir}" = "app-private" ];
then
for app in `find /data/${dir} -type f -iname "*.apk" -o -iname "*.zip"`;do
mv ${app} ${SD_EXT_DIRECTORY}/${dir}/
done
fi
mount -o bind ${SD_EXT_DIRECTORY}/${dir}/ /data/${dir}
fi
done
ah... sometimes that happens...
If you were to put that in the MIUI update zip and flash it, it will work.
I don't know why that happens.
When it happened to me I couldnt figure it out either since I made sure the permissions stayed the same. Maybe it would work as a standalone flashable zip but I have never made one.
Zeppe, can you send me your 07app2ext and tell me what permissions it have? I have 500 mb in the ext partition but i can load it to maximum 'cause my internal storage get full. Now i have about 80 apps, and only 22mb left in the internal storage.
Attached.
Permissions are the same as other files in ect/init.d
xxx
xox
ooo
But when I did it manually, it didn't work
edit... try the attached update.zip... it just might work
either way, the file is in there.
BAZINGA! lol!! It works!!! Thanks a lot zeppelin!
heh
Sent from my Milestone using Tapatalk
zeppelinrox said:
Attached.
Permissions are the same as other files in ect/init.d
xxx
xox
ooo
But when I did it manually, it didn't work
edit... try the attached update.zip... it just might work
either way, the file is in there.
Click to expand...
Click to collapse
zeppelinrox, can I apply this update on CM7 RC10? Is it safe to do it?
I want to move my dalvik cache to ext2 because my internal storage its almost full (less than 20MB free).
Yes its fine.
It's a mod of an overclock flashable zip so when you flash it, it gives an overclock related message.
You can also replace the app2ext script in the cm7 update with the one in this zip file with 7zip and without extracting the cm7 update.
I just leave it in AOR's update folder tho.
So when I flash a rom, I flash this too
Sent from my Milestone using Tapatalk
Thanks for this script, it works perfectly.
I've applied the update from AOR and after move any app from SD to ext2 and reboot, CM7 moves dalvik cache for that apps to ext2.
Now, I suppose any time I update the ROM then before reboot I need to apply this script again.
Sent from my Milestone using XDA App
Yes as an update would probably overwrite this app2ext script
Sent from my Milestone using Tapatalk
There are threads on this site and elsewhere showing the steps to boot ubuntu on android phones. Our Ideos X6 comes with a powerful hardware so i believe we can run ubuntu on it. But it seems that the kernel must support loop devices. Can anyone make a custom kernel supporting loop devices.
Or has anyone successful in running Ubuntu on Ideos X6.
Our kernel have support for loop device. Take this little instruction how install ubuntu oneiric, also the same process for debian just write distribution name and correct url in debootstrap.
1. this stage you must complete on your linux pc.
Code:
#debootstrap part on PC
sudo apt-get install debootstrap
sudo dd if=/dev/zero of=ubuntu.img seek=838860800 bs=1 count=1
sudo mke2fs -F ubuntu.img
sudo mkdir ubuntu
sudo mount -o loop ubuntu.img ubuntu/
sudo debootstrap --arch armel --foreign oneiric ubuntu http:/ports.ubuntu.com/ubuntu-ports/
sudo umount ubuntu
sudo rm -r ubuntu
2. push this ubuntu.img to sdcard on your phone.
Code:
adb push ubuntu.img /sdcard/ubuntu.img
3. create this script as ubuntu.sh on your sdcard too
Code:
echo "Setting some stuff up.."
export bin=/system/bin
export img=/mnt/sdcard/ubuntu.img
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mkdir $mnt
echo "Mounting the Linux Image"
busybox losetup /dev/block/loop7 $img
mount -t ext2 -o noatime,nodiratime /dev/block/loop7 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "Setting Up Networking"
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Mounting sdcard in /mnt"
mkdir $mnt/mnt/sdcard
busybox mount --bind /mnt/sdcard/ $mnt/mnt/sdcard
echo "Entering CHROOT "
echo " "
busybox chroot $mnt /bin/bash
echo " "
echo "Shutting down CHROOT"
umount $mnt/mnt/emmc
umount $mnt/mnt/sdcard
busybox sysctl -w net.ipv4.ip_forward=0
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
busybox losetup -d /dev/block/loop7
4. So now we connect to device, run superuser permission, and chroot to ubuntu
Code:
sudo adb shell
su
sh /sdcard/ubuntu.sh
5.run continue deboostrap
Code:
/debootstrap/debootsrap --second-stage
6. setup apt
Code:
echo 'deb http:/ports.ubuntu.com/ubuntu-ports/ oneiric main' >/etc/apt/sources.list
apt-get clean
apt-get update
7. add root password
Code:
passwd root
8. exit from ubuntu shell with 'exit' and run it again sh /sdcard/ubuntu.sh from terminal emulator on your device or via adb shell.
So, now ubuntu install successfully on your phone and you may install openssh and vnc server.
P.S. http:/ correct it with two //, I can't push correct link to forum. its denied post urls.
Error
I followed your steps exactly as given and changed / to // in http i am getting the following output when i ran ubuntu.sh. kindly help
# sh ubuntu.sh
Setting some stuff up..
mkdir failed for /data/local/ubuntu, File exists
Mounting the Linux Image
losetup: /dev/block/loop7
mount: Device or resource busy
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
Setting Up Networking
net.ipv4.ip_forward = 1
ubuntu.sh: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
ubuntu.sh: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
ubuntu.sh: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
Mounting sdcard in /mnt
mkdir failed for /data/local/ubuntu/mnt/sdcard, No such file or directory
mount: mounting /mnt/sdcard/ on /data/local/ubuntu/mnt/sdcard failed: No such file or directory
Entering CHROOT
chroot: can't execute '/bin/bash': No such file or directory
Shutting down CHROOT
failed.
failed.
net.ipv4.ip_forward = 0
failed.
failed.
failed.
failed.
losetup: /dev/block/loop7: Device or resource busy
Possbile what loop7 device already busy on your phone.
ry this command to see it
Code:
busybox losetup
And try manual steps which in script to see which step is failed.
When I type
Code:
#busybox losetup
nothing happens
when i type
Code:
#busybox losetup /dev/block/loop7 /mnt/sdcard/ubuntu.img
losetup: /dev/block/loop7
Code:
#mount -t ext2 -o noatime,nodiratime /dev/block/loop7 /data/local/ubuntu
mount: Device or resource busy
the second line is the outputfrom the command.
Do you phone have block devices in /dev/block/ ?
just checked using root explorer. there are many loop# files in /dev/block folder
You may try with UC kernel, or try with ext3 file system. I suppose what your kernel without support ext2.
i tried with UC v5. It supports ext2,ext3 and ext4. Still getting same error.
Should i convert my android filesystem to ext2,3,0r 4. If yes how to do it?
No, you don't need do converting. Problem with loop device or mount, try to see busybox losetup after mount image to block device, it's must show what image mounted to block device. If it's ok, try different option for mount.
I don't have anymore ideas why it doesn't work.
This scenario successful work on my phone.
Can you tell me what ROM you are using
Sent from my CSL-MI410 using XDA App
Last rom from wellcom (2.3-V318E)
now it works. Installed ubuntu. But i am now unable to install any package. when i try to install tightvncserver i get error message
E: Unable to locate package tightvncserver
actally i am not able to install any package
i have checked the /etc/apt/sourcels.list and it contains the required entry and i also did
apt-get clean
apt-get update
and it updates without any error
You need add another repositories to /etc/sources.list such as universe, multiverse, restricted with the same path.
Hello I'm on oxygenOS 2.1.1 (one plus 2) with a custom kernel and today I woke up and noticed Xposed wasn't active.. I didn't change any setting from the setup I had with Xposed working, and even after rebooting; reflashing rom+Xposed; flashing the Uninstaller and then reflashing Xposed would not make it work again.
Xposed reports "Xposed's latest version is not active. Have you installed the framework and rebooted? "
Here's a screenshot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Next time I'll better do a search. Installing busybox from playstore solved the problem
kal eh said:
Next time I'll better do a search. Installing busybox from playstore solved the problem
Click to expand...
Click to collapse
Thanks for coming back and posting the solution, even though it does not pertain to me
banderos101 said:
Thanks for coming back and posting the solution, even though it does not pertain to me
Click to expand...
Click to collapse
Have you tried a /system and both cache wipe? Then install rom (supersu) gapps xposed??
edit: lol misundersoo d
Hello!
I have the same problem:
I installed the framework manually (ASUS MemoPad 7 (ME572CL) has currently no means to unlock the bootloader, so there is no custom recovery). Also I installed the Xposed Installer alpha 4 apk.
Then I restarted the MemoPad 7, but the Xposed Installer app told me the the latest version (v75) is installed but not active. So I installed Busybox as mentioned and restarted. But there is no change and Xposed framework remains inactive.
Any idea what's going wrong here?
klausstoertebeker said:
Hello!
I have the same problem:
I installed the framework manually (ASUS MemoPad 7 (ME572CL) has currently no means to unlock the bootloader, so there is no custom recovery). Also I installed the Xposed Installer alpha 4 apk.
Then I restarted the MemoPad 7, but the Xposed Installer app told me the the latest version (v75) is installed but not active. So I installed Busybox as mentioned and restarted. But there is no change and Xposed framework remains inactive.
Any idea what's going wrong here?
Click to expand...
Click to collapse
Without a custom recovery, you won't be able to install the Xposed framework properly. A custom recovery is mandatory.
So you want to tell me that everybody who cannot unlock the bootloader of his/her device won't be able to use Xposed framework? I don't believe that because there are posts concerning successful installations on those devices. So there must be a way...
kal eh said:
Have you tried a /system and both cache wipe? Then install rom (supersu) gapps xposed??
Click to expand...
Click to collapse
Sorry, probably should have phrased that better............i dont have this problem, i was just commenting that its nice to see someone post the solution to their issue instead of not, if/when they find it, as it might end up helping someone else down the line someday
Hello again!
I was able to install Xposed framework on my ASUS MemoPad 7 (ME572CL) without unlocked bootloader and therefore without custom recovery.
And for everybody interested in I'll tell in the following how I made it
Prerequisites:
- a rooted device
- a terminal emulator able to run in root mode (I used that from ROM Toolbox Pro)
- the xposed ZIP file compatible with your devices architecture and Android version (can be downloades here)
Now find out the architecture of your device. For this you have to open the file "/system/build.prop" and search for one of these strings:
"ro.product.cpu.abilist32" or
"ro.product.cpu.abilist64"
One of these entries is NOT empty and contains data describing the architecture (in my case it was the first entry which wasn't empty and looked like:
"ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi" - so I have a 32 Bit X86-architecture)
Next find out the sdk version which was used for building your Android system. Again search the file "/system/build.prop", but this time for the string:
"ro.build.version.sdk" (in my case it looked like: "ro.build.version.sdk=21" - so they have used sdk version 21 to build my Android system)
Now you know which file to download (for me it was xposed-v75-sdk21-x86.zip)
After download unzip the file to where you want Now open the terminal emulator, apply the "SU"-command and change to the directory "META-INF" found in the unzipped xposed folder. Then apply the command "touch flash-script.sh" to generate an alternatve install script. Open this file with a text editor and fill in the following code:
Code:
##########################################################################################
#
# Xposed framework installer zip.
#
# This script installs the Xposed framework files to the system partition.
# The Xposed Installer app is needed as well to manage the installed modules.
#
##########################################################################################
cp_perm() {
cp -f $1 $2 || exit 1
set_perm $2 $3 $4 $5 $6
}
set_perm() {
chown $2:$3 $1 || exit 1
chmod $4 $1 || exit 1
if [ "$5" ]; then
chcon $5 $1 2>/dev/null
else
chcon 'u:object_r:system_file:s0' $1 2>/dev/null
fi
}
install_nobackup() {
cp_perm ..$1 $1 $2 $3 $4 $5
}
install_and_link() {
TARGET=$1
XPOSED="${1}_xposed"
BACKUP="${1}_original"
if [ ! -f ..$XPOSED ]; then
return
fi
cp_perm ..$XPOSED $XPOSED $2 $3 $4 $5
if [ ! -f $BACKUP ]; then
mv $TARGET $BACKUP || exit 1
ln -s $XPOSED $TARGET || exit 1
chcon -h 'u:object_r:system_file:s0' $TARGET 2>/dev/null
fi
}
install_overwrite() {
TARGET=$1
if [ ! -f ..$TARGET ]; then
return
fi
BACKUP="${1}.orig"
NO_ORIG="${1}.no_orig"
if [ ! -f $TARGET ]; then
touch $NO_ORIG || exit 1
set_perm $NO_ORIG 0 0 600
elif [ -f $BACKUP ]; then
rm -f $TARGET
gzip $BACKUP || exit 1
set_perm "${BACKUP}.gz" 0 0 600
elif [ ! -f "${BACKUP}.gz" -a ! -f $NO_ORIG ]; then
mv $TARGET $BACKUP || exit 1
gzip $BACKUP || exit 1
set_perm "${BACKUP}.gz" 0 0 600
fi
cp_perm ..$TARGET $TARGET $2 $3 $4 $5
}
##########################################################################################
echo "******************************"
echo "Xposed framework installer zip"
echo "******************************"
echo "- Mounting /system and /vendor read-write"
mount /system >/dev/null 2>&1
mount /vendor >/dev/null 2>&1
mount -o remount,rw /system
mount -o remount,rw /vendor >/dev/null 2>&1
if [ ! -f '/system/build.prop' ]; then
echo "! Failed: /system could not be mounted!"
exit 1
fi
echo "- Placing files"
install_nobackup /system/xposed.prop 0 0 0644
install_nobackup /system/framework/XposedBridge.jar 0 0 0644
install_and_link /system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0
install_overwrite /system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0
install_overwrite /system/bin/oatdump 0 2000 0755
install_overwrite /system/bin/patchoat 0 2000 0755 u:object_r:dex2oat_exec:s0
install_overwrite /system/lib/libart.so 0 0 0644
install_overwrite /system/lib/libart-compiler.so 0 0 0644
install_overwrite /system/lib/libart-disassembler.so 0 0 0644
install_overwrite /system/lib/libsigchain.so 0 0 0644
install_overwrite /system/lib/libxposed_art.so 0 0 0644
echo "- Done"
exit 0
PLEASE BE AWARE THAT THIS SCRIPT ONLY WORKS WITH 32 BIT VERSIONS. FOR 64 BIT VERSIONS IT HAS TO BE ADOPTED! BECAUSE I DON'T HAVE A 64 BIT SYSTEM I WASN'T ABLE TO DO THIS!
After saving the changes run this script by applying the command "sh flash-script.sh". This should install the framework as intended by rovo89. I got some linker error messages (something like not found) concerning "libsigchain.so" - I ignored them, but it worked.
And don't forget to install the "XposedInstaller_3.0_alpha4.apk"
klausstoertebeker said:
Hello again!
I was able to install Xposed framework on my ASUS MemoPad 7 (ME572CL) without unlocked bootloader and therefore without custom recovery.
And for everybody interested in I'll tell in the following how I made it
Prerequisites:
- a rooted device
- a terminal emulator able to run in root mode (I used that from ROM Toolbox Pro)
- the xposed ZIP file compatible with your devices architecture and Android version (can be downloades here)
Now find out the architecture of your device. For this you have to open the file "/system/build.prop" and search for one of these strings:
"ro.product.cpu.abilist32" or
"ro.product.cpu.abilist64"
One of these entries is NOT empty and contains data describing the architecture (in my case it was the first entry which wasn't empty and looked like:
"ro.product.cpu.abilist32=x86,armeabi-v7a,armeabi" - so I have a 32 Bit X86-architecture)
Next find out the sdk version which was used for building your Android system. Again search the file "/system/build.prop", but this time for the string:
"ro.build.version.sdk" (in my case it looked like: "ro.build.version.sdk=21" - so they have used sdk version 21 to build my Android system)
Now you know which file to download (for me it was xposed-v75-sdk21-x86.zip)
After download unzip the file to where you want Now open the terminal emulator, apply the "SU"-command and change to the directory "META-INF" found in the unzipped xposed folder. Then apply the command "touch flash-script.sh" to generate an alternatve install script. Open this file with a text editor and fill in the following code:
Code:
##########################################################################################
#
# Xposed framework installer zip.
#
# This script installs the Xposed framework files to the system partition.
# The Xposed Installer app is needed as well to manage the installed modules.
#
##########################################################################################
cp_perm() {
cp -f $1 $2 || exit 1
set_perm $2 $3 $4 $5 $6
}
set_perm() {
chown $2:$3 $1 || exit 1
chmod $4 $1 || exit 1
if [ "$5" ]; then
chcon $5 $1 2>/dev/null
else
chcon 'u:object_r:system_file:s0' $1 2>/dev/null
fi
}
install_nobackup() {
cp_perm ..$1 $1 $2 $3 $4 $5
}
install_and_link() {
TARGET=$1
XPOSED="${1}_xposed"
BACKUP="${1}_original"
if [ ! -f ..$XPOSED ]; then
return
fi
cp_perm ..$XPOSED $XPOSED $2 $3 $4 $5
if [ ! -f $BACKUP ]; then
mv $TARGET $BACKUP || exit 1
ln -s $XPOSED $TARGET || exit 1
chcon -h 'u:object_r:system_file:s0' $TARGET 2>/dev/null
fi
}
install_overwrite() {
TARGET=$1
if [ ! -f ..$TARGET ]; then
return
fi
BACKUP="${1}.orig"
NO_ORIG="${1}.no_orig"
if [ ! -f $TARGET ]; then
touch $NO_ORIG || exit 1
set_perm $NO_ORIG 0 0 600
elif [ -f $BACKUP ]; then
rm -f $TARGET
gzip $BACKUP || exit 1
set_perm "${BACKUP}.gz" 0 0 600
elif [ ! -f "${BACKUP}.gz" -a ! -f $NO_ORIG ]; then
mv $TARGET $BACKUP || exit 1
gzip $BACKUP || exit 1
set_perm "${BACKUP}.gz" 0 0 600
fi
cp_perm ..$TARGET $TARGET $2 $3 $4 $5
}
##########################################################################################
echo "******************************"
echo "Xposed framework installer zip"
echo "******************************"
echo "- Mounting /system and /vendor read-write"
mount /system >/dev/null 2>&1
mount /vendor >/dev/null 2>&1
mount -o remount,rw /system
mount -o remount,rw /vendor >/dev/null 2>&1
if [ ! -f '/system/build.prop' ]; then
echo "! Failed: /system could not be mounted!"
exit 1
fi
echo "- Placing files"
install_nobackup /system/xposed.prop 0 0 0644
install_nobackup /system/framework/XposedBridge.jar 0 0 0644
install_and_link /system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0
install_overwrite /system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0
install_overwrite /system/bin/oatdump 0 2000 0755
install_overwrite /system/bin/patchoat 0 2000 0755 u:object_r:dex2oat_exec:s0
install_overwrite /system/lib/libart.so 0 0 0644
install_overwrite /system/lib/libart-compiler.so 0 0 0644
install_overwrite /system/lib/libart-disassembler.so 0 0 0644
install_overwrite /system/lib/libsigchain.so 0 0 0644
install_overwrite /system/lib/libxposed_art.so 0 0 0644
echo "- Done"
exit 0
PLEASE BE AWARE THAT THIS SCRIPT ONLY WORKS WITH 32 BIT VERSIONS. FOR 64 BIT VERSIONS IT HAS TO BE ADOPTED! BECAUSE I DON'T HAVE A 64 BIT SYSTEM I WASN'T ABLE TO DO THIS!
After saving the changes run this script by applying the command "sh flash-script.sh". This should install the framework as intended by rovo89. I got some linker error messages (something like not found) concerning "libsigchain.so" - I ignored them, but it worked.
And don't forget to install the "XposedInstaller_3.0_alpha4.apk"
Click to expand...
Click to collapse
It seems I have to withdraw my statement about the mandatory custom recovery. You should open a separate thread for this guide in the Xposed sub-forum or at least ask the moderator of the unofficial Xposed for Lollipop FAQ (danarama) to include it in his FAQ. This is really helpful for people running a device for which a custom recovery is not available.
Use light theme and flash framework again.
Sent from my GT-I9505 using Tapatalk
klausstoertebeker said:
So you want to tell me that everybody who cannot unlock the bootloader of his/her device won't be able to use Xposed framework? I don't believe that because there are posts concerning successful installations on those devices. So there must be a way...
Click to expand...
Click to collapse
There is an all in one root tool that can unlock bootloaders for you or you can use ADB to do the work for you.
Hello. I found same questions in other topics, but couldn't find answer.
I would like run script from /system/su.d folder:
Code:
#!/system/bin/sh
echo 0 > /sys/fs/selinux/enforce
or
Code:
#!/system/bin/sh
setenforce 0
and I even tried to run test script:
Code:
#!/system/bin/sh
touch /data/local/tmp/test.txt
echo "test" >> /data/local/tmp/test.txt
But no one of them works. I tried different names for files, gave different chmod (644,700,755). Nothing helps me to run script.
Mb somebody can give me advice what's problem can be?
Phone: Xperia Z3c, MM, systemless SuperSU
On other phone (Xperia M5) this all works fine.
I have a the same problem with a different file in /system/su.d,
Code:
#!/system/bin/sh
logfile0=/data/local/tmp/exfat_mount.log
#logfile=$logfile0
logfile=/dev/null
if [ -e $logfile0 ]; then
logfile=$logfile0
fi
echo '******' $(date) '******' >> $logfile
echo 'id: ' $(id) >> $logfile 2>&1
if [ x$SECONDARY_STORAGE == x ]; then
SECONDARY_STORAGE=/storage/sdcard1
fi
device=/dev/block/mmcblk1p1
echo "Starting for $device" >> $logfile
while read line; do
words=($line)
if [ ${words[0]} == $device ]; then
echo "Error: $device already mounted:" >> $logfile
echo "$line" >> $logfile
exit 1
fi
if [ ${words[1]} == $SECONDARY_STORAGE ]; then
echo "Error: SECONDARY_STORAGE already in use:" >> $logfile
echo "$line" >> $logfile
exit 1
fi
done < /proc/mounts
binpath=/system/xbin
probe=$binpath/probe
if [ ! -e $probe ]; then
echo "Error: $probe not found!" >> $logfile
exit 1
fi
FS=($($probe $device))
echo "$device file system:" ${FS[0]} >> $logfile
# ***** Setup tools for different file systems:
if [ ${FS[0]} == "exFAT" ]; then
echo "$device is exFAT" >> $logfile
mount=$binpath/mount.exfat
if [ -f $mount ]; then
links=( "mkfs.exfat" "fsck.exfat" "dumpexfat" "exfatfsck" "exfatlabel" "mkexfatfs" "mount.exfat-fuse" )
for l in "${links[@]}"
do
if [ ! -e $binpath/$l ]; then
mount -o remount,rw /
ln -s $mount $binpath/$l
echo "Created symlink $binpath/$l" >> $logfile
fi
done
fi
fsck=$binpath/exfatfsck
fsck_ops=
elif [ ${FS[0]} == "NTFS" ]; then
echo "$device is NTFS" >> $logfile
mount=$binpath/ntfs-3g
fsck=$binpath/ntfsfix
fsck_ops='-n'
else
echo "Error: $device is not supported!" >> $logfile
exit 1
fi
# ***** Check if we have required tools.
if [ ! -e $mount ]; then
echo "Error: $mount not found!" >> $logfile
exit 1
fi
if [ ! -e $fsck ]; then
echo "Error: $fsck not found!" >> $logfile
exit 1
fi
# ***** Mount for rw only if the file system is not damaged.
options_ro="ro,uid=1023,gid=1023,umask=0000"
options_rw="rw,uid=1023,gid=1023,umask=0000,noatime"
mnt_cmd="$mount -o $options_rw $device /mnt/media_rw/sdcard1"
$fsck $fsck_ops $device >> $logfile 2>&1
if [ $? != 0 ]; then
mnt_cmd="$mount -o $options_ro $device /mnt/media_rw/sdcard1"
fi
echo "$mnt_cmd" >> $logfile
if [ -e /sys/fs/selinux/enforce ]; then
if [ -e /system/xbin/supolicy ]; then
# ***** Set permissions for fuse. Instead, our mounts would be RO for others.
echo "Using supolicy to provide permissions to fuse." >> $logfile
/system/xbin/supolicy --live "allow sdcardd unlabeled dir { append create execute write relabelfrom link unlink ioctl getattr setattr read rename lock mounton quotaon swapon rmdir audit_access remove_name add_name reparent execmod search open }"
/system/xbin/supolicy --live "allow sdcardd unlabeled file { append create write relabelfrom link unlink ioctl getattr setattr read rename lock mounton quotaon swapon audit_access open }"
/system/xbin/supolicy --live "allow unlabeled unlabeled filesystem associate"
/system/xbin/supolicy --live "allow sdcardd unlabeled filesystem { getattr mount remount unmount }"
/system/xbin/supolicy --live "allow vold unlabeled filesystem { getattr mount remount unmount }"
/system/xbin/supolicy --live "allow init unlabeled filesystem { getattr mount remount unmount }"
else
# ***** Turn SELinux to Permissive. Instead, our mounts would be RO for others.
echo "Using setenforce 0 to provide permissions to fuse." >> $logfile
setenforce 0
fi
fi
# ***** Try to mount:
if [ 0 != 0 ]; then
$mount -o $options_rw $device $SECONDARY_STORAGE
echo "Mounted directly" >> $logfile
else
mount -o remount,rw /system
rm -f /system/bin/debuggerd.mine
echo '#!/system/bin/sh' > /system/bin/debuggerd.mine
echo "$mnt_cmd" >> /system/bin/debuggerd.mine
echo 'start fuse_sdcard1' >> /system/bin/debuggerd.mine
chmod 777 /system/bin/debuggerd.mine
stop debuggerd
mv /system/bin/debuggerd /system/bin/debuggerd.its
mv /system/bin/debuggerd.mine /system/bin/debuggerd
start debuggerd
sleep 2
stop debuggerd
mv /system/bin/debuggerd /system/bin/debuggerd.mine
mv /system/bin/debuggerd.its /system/bin/debuggerd
start debuggerd
mount -o remount,ro /system
vdc volume mount $SECONDARY_STORAGE
echo "Mounted via debuggerd" >> $logfile
fi
The file is called 00mountsd and is used to give access to exfat microsd on stock android 5.1 running on a Chuwi Hi10pro tablet with cherry trail z8350 cpu. I used this on a previous version of the tablet and it worked fine although that tablet came with RemixOS.
The file runs without errors when run manually and succeeds at it task
ls -lZ returns this -rwxr-xr-x root root u: object_r:system_file:s0 00mountsd
I'm running SuperSU Free v2.79 everything else works fine.
Any ideas?