[Q] xposed framework on huawei ascend p7 - Huawei Ascend P7

what can I do to get this working? got a huawei ascend p7

Read the last few post an the 'ascend p7 is on the way' thread. I had the same problem and the fix is in there
Sent from my HUAWEI P7-L10 using XDA Free mobile app

Link impossible?

Solution
mikkel38492 said:
what can I do to get this working? got a huawei ascend p7
Click to expand...
Click to collapse
Basically, it's because every file in /system is write-protected by default.
Open a terminal shell and input this:
Code:
su
mount -o rw,remount /system
cd /system
chmod -R -i *
Edit: Also, type this to remove editing limitations on certain files like /system/etc/hosts:
Code:
rm -f /system/set_immutable.list
Then retry to install Xposed =)

chmod -R -i * does not work on my P7 -> Bad Mode
Whats wrong?

I have the same problem...
("chmod -R -i * does not work on my P7 -> Bad Mode")

llbaus said:
I have the same problem...
("chmod -R -i * does not work on my P7 -> Bad Mode")
Click to expand...
Click to collapse
any news on that? cause I have the same problem and when I tried this I had to flash a new rom as my phone had a bootloop :s

Permissions in P6/7: http://forum.xda-developers.com/showpost.php?p=54481284&postcount=590
Xposed in P6/7: http://forum.xda-developers.com/showpost.php?p=54606614&postcount=659

Check this
PrimuSSaintS said:
any news on that? cause I have the same problem and when I tried this I had to flash a new rom as my phone had a bootloop :s
Click to expand...
Click to collapse
Well... I had that problem twice when i was trying to unlock that system stuff... The thing is being carefull with the characters in the Terminal, since a space changes the whole command... Try
su
mount <space> -o <space> rw,remount <space> /system
cd <space> /system
chmod <space> -R <space> -i <space> *
On the other side, chmod does NOT always get the -R commands, if still getting Bad Mode try
su
mount -o rw,remount /system
cd system
lsattr
chattr -R -i *
rm –f /system/set_immutable.list
Changing the Chmod for Chattr worked for me, btw lsattr starts with an L not an I, and again be carefull with spaces, if with this does not work you might wanna try an exorsism since this is the last way... Hoe it works for you to man!!

hi i have the same problem on my sony z3c but when i have locked bootloader freedom/adaway..... work correctly
sorry for bad english

Gabrieloalgo said:
Well... I had that problem twice when i was trying to unlock that system stuff... The thing is being carefull with the characters in the Terminal, since a space changes the whole command... Try
su
mount <space> -o <space> rw,remount <space> /system
cd <space> /system
chmod <space> -R <space> -i <space> *
On the other side, chmod does NOT always get the -R commands, if still getting Bad Mode try
su
mount -o rw,remount /system
cd system
lsattr
chattr -R -i *
rm –f /system/set_immutable.list
Changing the Chmod for Chattr worked for me, btw lsattr starts with an L not an I, and again be carefull with spaces, if with this does not work you might wanna try an exorsism since this is the last way... Hoe it works for you to man!!
Click to expand...
Click to collapse
Works however once the rm command runs my device restarts and restores the file.

Related

Help create a script to remove .apk's on CM.9999 PLZ??

ok now there is a few apps i dont like that come in the ROM like
Voice Dialer
Music(dont use it)
IM
Mail
Amazon MP3
Talk
now im tired that everything i flash i need to go trew terminal to delete these apps can i like write a script that i can run an do all of these for me? (is that what scripts can do?) can some one help me out
I know that you CAN, I just don't know exactly how... but I'm interested as well, so here's hoping someone with the knowledge lays it on you.
so a specific script can be created?? now to find who can help me go about it
brios86 said:
ok now there is a few apps i dont like that come in the ROM like
Voice Dialer
Music(dont use it)
IM
Mail
Amazon MP3
Talk
now im tired that everything i flash i need to go trew terminal to delete these apps can i like write a script that i can run an do all of these for me? (is that what scripts can do?) can some one help me out
Click to expand...
Click to collapse
im about to leave right now, but when i get back i can write it up .. i usually delete VoiceDialer/VoiceSearch and Amazon everytime I flash a new ROM
IIRC, miketaylor00 posted up a script a while back to automatically remove a couple apps. I sent him a message with a link to this thread, but it looks like the board's Dominicano can help.
this would remove the apps:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
rm VoiceDialer.apk
rm Music.apk
rm com.amazon*.apk
rm IM.apk
rm Mail.apk
rm Talk.apk
Just remove the .txt extension from the attachment
What's the difference between "rm" and "rm -r"?
uansari1 said:
What's the difference between "rm" and "rm -r"?
Click to expand...
Click to collapse
the -r switch will make it recursive, but since we're not doing it to directory, we don't need it ... i was gunna add some more to the script to remove the data/data/ directories for each of those apps up there, but i gotta look to see what they are first
thankx this is great i knew i wasent the only1 tired of doing that...
xidominicanoix said:
this would remove the apps:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
rm VoiceDialer.apk
rm Music.apk
rm com.amazon*.apk
rm IM.apk
rm Mail.apk
rm Talk.apk
Just remove the .txt extension from the attachment
Click to expand...
Click to collapse
to remove the data of those apps:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /data/data/
rm -r com.android.voicedialer
rm -r com.android.music
rm -r com.amazon.mp3
rm -r com.android.im
rm -r com.htc.android.mail
rm -r com.google.android.talk
wow even more thankz never new that one of removing the data, im sure this can come in helpfull to others. looking at the script i didnt know it could be that easy(atleast thats what it seems like to me)
brios86 said:
wow even more thankz never new that one of removing the data, im sure this can come in helpfull to others. looking at the script i didnt know it could be that easy(atleast thats what it seems like to me)
Click to expand...
Click to collapse
yup just gotta be careful with removing an app that could be dependent on another app
Is there anything stopping me from combining both into one shell script? I was going to make a script to do this myself because I am so sick of that damn teeter app! I will never play it and almost every ROM has it included.
Dyonas said:
Is there anything stopping me from combining both into one shell script? I was going to make a script to do this myself because I am so sick of that damn teeter app! I will never play it and almost every ROM has it included.
Click to expand...
Click to collapse
go ahead and combine them .. it should still work as long as you dont interleave the 2
also, the 2nd script doesnt need that mount command since we are messing with /data/ instead of /system/
I hand-typed the commands in console and received this error:
"mount: mounting /dev/block/mtdblock3 on /system failed: Invalid Argument
Any ideas?
theartar said:
I hand-typed the commands in console and received this error:
"mount: mounting /dev/block/mtdblock3 on /system failed: Invalid Argument Any ideas?
Click to expand...
Click to collapse
you dd a typo check again look between (mtdblock3 /system) you wrote (mtdblock3 on /system) <~~~ no good
this is:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
ok now that i got my phon working again i was having a SPL problem all done now thank god lol yes thank god i love my phone. anyways one question were do i put this script at??
also foundout MMS is save to remove and use a replacement app and you will work fine for those who use chop or handcent app
xidominicanoix said:
this would remove the apps:
Code:
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd /system/app
rm VoiceDialer.apk
rm Music.apk
rm com.amazon*.apk
rm IM.apk
rm Mail.apk
rm Talk.apk
Just remove the .txt extension from the attachment
Click to expand...
Click to collapse
a noob question... how do you run a script? and what do you mean by removing .txt extension...
thank you!!!
Save his file to your SD card, and rename it to RemoveApp.sh instead of RemoveApp.sh.txt. To run it, you can go into Terminal Emulator and type "sh /sdcard/RemoveApp.sh", substituting the correct file path where you have saved the script.
uansari1 said:
Save his file to your SD card, and rename it to RemoveApp.sh instead of RemoveApp.sh.txt. To run it, you can go into Terminal Emulator and type "sh /sdcard/RemoveApp.sh", substituting the correct file path where you have saved the script.
Click to expand...
Click to collapse
or to save you time get GScript in the market

Script Making

Tell me what I'm doing wrong here. I'm trying to make a script that will remove some apps whenever I flash a new rom. Here's what I thought would work:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
cd /system/app
rm com.amazon*.apk
rm Mail.apk
rm Development.apk
rm LatinIME.apk
To use it I type:
Code:
$ su
# sh /sdcard/apps.sh
and it just fails at every line. Any help would be appreciated.
On the first line try
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
or your could shortcut it by using
mount /system
Stupid question, but do you have the permissions set to allow root access?
I've done that a few times to realize what my "mistake" was.
well you could just make a script for your PC something along the lines of
Code:
@echo off
adb remount
adb shell rm /system/app/com.amazon*.apk
adb shell rm /system/app/Mail.apk
adb shell rm /system/app/Development.apk
adb shell rm /system/app/LatinIME.apk
adb shell reboot
and rename it to a .bat or .cmd file
jackslim said:
On the first line try
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
or your could shortcut it by using
mount /system
Click to expand...
Click to collapse
Ok so I did that and the script appears to be working. I'll test it when Cyanogen release another update with amazon... Adding the -t yaffs2, what exactly did that do?
The -t is a trigger saying that your going to specify what type of filesystem your mounting, yaffs2 is the type of filesystem

[Q] Problem with ADB and Removing Apps

I'm not new to coding per se, I'm a web designer and developer and most of this makes complete sense to me, but I'm not sure what I'm doing wrong here. I have decided I want to learn more by customizing the stock .5 RUU rom (reverted back from .6). So I am working on removing the stock Sprint apps at the moment. I rooted via UnrEVOked one-touch. I am running ROM Manager with the ClockWorkMod Recovery Image.
Here's my setup. I'm running Parallels on my Macbook with Windows XP. I added android-sdk-windows to my C:\ drive and started into the ADB. (I do have SU permission). I have USB Debugging running and I'm in Charge Only Mode.
Code:
C:\android-sdk-windows\tools>adb shell
$ su
su
[B]mount -o rw,remount Permission denied[/B]
$ # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
$ cd system/app
cd system/app
$ ls
[Returns the long list of System Apps that are installed ]
$ # rm amazonmp3.apk
# rm amazonmp3.apk
$ exit
C:\android-sdk-windows\tools> exit
This is just an test, trying to remove the amazonmp3.apk. I reboot into recovery and reboot the system from there, but the app isn't removed. I've highlighted the possible "problem" commands. - The "Permission denied" error is automatic, I don't get to finish writing the remount code before it automatically gives me the "denied" error
Any ideas on what I'm doing wrong? I've read that the UnrEVOked app doesn't give you full root access, is this correct?
When in tools directory type
Adb remount
Adb shell
Rm (app name).apk /system/app
or if you removing several apps you may want to cd into the app dir
Code:
adb remount
adb shell
cd /system/app
rm amazonmp3.apk
yeah, I think that the UnrEVOked one-touch just doesn't cut it because I get Permission denied on the "adb remount" command
getting this:
Code:
adb shell
$ cd /system/app
cd /system/app
rm amazonmp3.apk
rm failed for amazonmp3.apk, Read-only file system
TexasTerp said:
getting this:
Code:
adb shell
$ cd /system/app
cd /system/app
rm amazonmp3.apk
rm failed for amazonmp3.apk, Read-only file system
Click to expand...
Click to collapse
Not really sure cause I've never used that method of rooting. Try using the regaw version found in the android Dev forum

[Q] Permission denied while pushing flash_image :(

Hi guys,
I just got a problem while flashing a recovery. I tried to use RomManager to flash the clockworkmod on my click, but while booting into it I just can enter the normal android recovery
I've read a little about this problem and found out, that I need to push the flash_image command line into the /system/bin - and there is the problem!
There're 2 different problems ... first one is permission denied - but I am root ...
Does someone has an idea why I can't push the flash_image?
Also tried http://forum.xda-developers.com/showpost.php?p=9192029&postcount=21 but it won't work - even with mounting the folders ...
Hope you can help me
Regards,
Smoky
Re
$ adb push flash_image /sdcard/
$ adb shell
# mount -o remount,rw -t yaffs2 /system
# mv /sdcard/flash_image /system/bin
# chmod 755 /system/bin/flash_image
# cd /system/bin
# ./flash_image recovery /sdcard/recovery.img
# mount -o remount,ro -t yaffs2 /system
Ok, found a solution
http://forum.xda-developers.com/showthread.php?t=950759
Thx, ready to close

[BRAINSTORM] Booting directly into recovery

For reference, these are my thoughts on the matter.
We have 3 ways to do this:
1. Get hold of SBL, change it and flash it
Currently impossible afaik.
2. Get an init.d bash script to reboot into recovery if key is pressed
Most likely possible taking these 2 assumptions into account:
a) Bash allows to detect a pressed key, something like this:
Code:
_key()
{
local kp
ESC=$'\e'
_KEY=
read -d '' -sn1 _KEY
case $_KEY in
"$ESC")
while read -d '' -sn1 -t1 kp
do
_KEY=$_KEY$kp
case $kp in
[a-zA-NP-Z~]) break;;
esac
done
;;
esac
printf -v "${1:-_KEY}" "%s" "$_KEY"
}
_key x
case $x in
$'\e[15~') reboot recovery ;;
esac
Replacing this key code for one of OB's.
But for this, we need assumption number 2:
b) Key codes mapping is the same for recoveries.
Now, while this is the method of the greatest chance to work, it is also fairly useless. Developers will often break the boot before the init.d scripts are ran. So, this code should be ran before. Hence, the third method.
3. Start a custom service in init.rc (@ ramdisk) that will detect pressed key
This would be the perfect solution as it can't be broken from kernel (zImage) or system changes. However, init.rc has its own programming language (android init language) and there's no way to run this kind of listener.
However, it is possible to run an external script located for example in /system/bin/. These can be both an executable compiled from c (higher chances of working) or a bash scripting like the aforementioned one (lower chances of working since android probably doesn't start a console on boot).
Code for this would be something like:
Code:
service exampleservice /system/bin/exampleservice
user exampleservice
group exampleservice
oneshot
So uh, am I missing anything?
Anyone has other ideas?
a lot of times i heared about pressing "G" and "Power" would boot into some kind of save mode... if thats true i guess its easyer to reprogramm that keycombo to do something else... so does that keycombo anything? i couldnt figure out^^
Sent from my LG-P970 using XDA App
Are others devices has the key combination code in SBL?
I wish I have enough knowledge about android system so i can help...
i04055 said:
Are others devices has the key combination code in SBL?
I wish I have enough knowledge about android system so i can help...
Click to expand...
Click to collapse
Yes there are devices heaving the key-combo in SBL if that answers your question. The "Samsung Galaxy S GT-I9000" e.g. has them there afaik. With that device it was possible flashing the SBL to add a "booting directly into recovery" key-combo...
So I don´t know why there should not be a solution to do the same to the OB but Noejn surely has good reason for telling its impossible.
But hey what about booting into recovery on every system startup and only boot into the system through the recovery? It´s a "quick & dirty" solution even if its possible but better than developing the way we do isn´t it? I´m not sure if its easier to change the startup that way than to add or modify a key-combo but maybe someone here does?
I'm sure (or hope..) someone can, but perhaps we should move this Thread to another part of the Forum so someone with the knowledge how to do this will read it.
d0n22 said:
But hey what about booting into recovery on every system startup and only boot into the system through the recovery? It´s a "quick & dirty" solution even if its possible but better than developing the way we do isn´t it? I´m not sure if its easier to change the startup that way than to add or modify a key-combo but maybe someone here does?
Click to expand...
Click to collapse
Yeah, i prefer that way if poosibble rather than nothing.
But if put it that way, when the phone get bootloop is it still posibbe to boot into recovery?
Sent from my LG-P970 using XDA App
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
racht said:
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
Click to expand...
Click to collapse
yeah ,from this we can see what is running before logo screen and we can mod that file
so.. is that mean we can boot to recovery mode same as x8?
racht said:
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
Click to expand...
Click to collapse
soundes quite promising... have you tried it?
Can this be usefull?
http://forum.xda-developers.com/showthread.php?t=991276
Noejn have you abandoned us ? Or are u planning to take a look at this ? Would be nice if u get OB up and running
recovery
Hi,
has there been any success with booting into recovery mode?
BR,
J
logitec said:
Hi,
has there been any success with booting into recovery mode?
BR,
J
Click to expand...
Click to collapse
No,I try to boot directly into recovery through boot.img,but I get a big "error" form the LG Security Team!
Hijacking a daemon would work if Optimus Black had those binaries. I took a quick glance at a backup and I didn't see chargemon in /system/bin.
Besides, a xRecovery is limited as it's dependent on system files so a /format can't be done which isn't really that "comfy", especially when changing fs.
But yeah, better than nothing. Still, the method you described is only possible in Xperia phones, as far as I know.
I still say injecting a service on the init.rc is the way to go.
However, I can't test this now.
racht said:
This is how it's done on Xperia X8 phone.
The /system/bin/chargemon is usb-charge daemon that is being hijacked on boot (it's binary is replaced with this script)
Original chargemon is copied into "charger" to keep it's functionality.
Than "sleep 3" waits for any keypress, and checks the dump, if keys were pressed, it launches the recovery binary.
quite simple.
Code:
#!/system/bin/busybox sh
/system/bin/charger
cat /dev/input/event1 > /dev/keycheck&
sleep 3
kill -9 $!
if [ -s /dev/keycheck -o -f /data/local/tmp/xrecovery ]
then
rm -f /data/local/tmp/xrecovery
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /dev/block/mtdblock1
umount -l /dev/block/mtdblock2
umount -l /dev/block/mtdblock3
# Mount recovery partition
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount /system
umount -l /dev/block/mtdblock0
# chroot
chroot / /init
fi
# remount rootfs rw
mount -o remount,rw rootfs /
chmod 0777 /dev -R
chown 0.2000 /dev/oncrpc -R
cd /
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
mkdir -p /minicm
cd /minicm
tar -xf /system/bin/ramdisk.tar
# Umount /system, data and cache
umount -l /dev/block/mtdblock0
umount /dev/block/mtdblock3
umount /dev/block/mtdblock1
rmdir /system /data /cache /mnt
Click to expand...
Click to collapse
Good news, I'm getting close.
ok, thank you for everithing
Noejn said:
Good news, I'm getting close.
Click to expand...
Click to collapse
good news indeed^^ im working on it as well but im not feeling like getting close :-\ pls let me know what you did and how you did it as soon as its done... again thank you very much for your efforts!
Sent from my LG-P970 using XDA App
d0n22 said:
good news indeed^^ im working on it as well but im not feeling like getting close :-\ pls let me know what you did and how you did it as soon as its done... again thank you very much for your efforts!
Sent from my LG-P970 using XDA App
Click to expand...
Click to collapse
Well, I've succeed injecting the script on boot.
However, I'm getting some problems on the event0 > keycheck; I don't think at this time of boot /dev entries are up.
But I've already thought of a workaround and I'll test it tomorrow.
I´m thinking, if i compile kernel of ubuntu and install it in recovery partition, not possible then run ubuntu in native mode from sdcard with dualboot?

Categories

Resources