Frndz those phone are stuck at boot animation bcoz of oc kernal (nand problem) do below following steps:-
you should hv installed on your pc/laptop 1)htc sync
2)adb
Frist flash twrp 2.4.1.0 recovery by cute prince after that,
download flash_erase file from cute prince forum,
now copy cm9 rom and flash_erase file to sd card,
go to recovery(twrp recovery) click install nw install cm9 rom,
nw go to mount and mount system & mount sdcard,
after that go to advanced>file manager>sdcard> in sd card u vill see flash_erase.txt rename dat file to flash_erase,
now copy flash_erase file by clicking on it(it vill show copy option) go back to root of ur internal memory,
there u vill see system,go to system>xbin ,
copy dat file in xbin after copying dat file u vill see flash_erase in xbin folder,
click on flash_erase u vill see chmod755 click it nw go back to recovery and unmount everything,
nw connect ur phone to pc/laptop(u should hv adb and htc sync),
open cmd as administrator>nw copy below all code and paste it in cmd,
code:-
adb shell
su
cd /system/xbin
./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
thanks to sheker developer of flyrom
and cute prince for nand recovery procedure
hit thanks if i helped yuh...
Sent from my HTC Explorer A310e using xda premium
Thank's!
Good work to make it easy for newbies....
Why didn't you create it in general section?
Sent from my HTC Explorer using xda premium
Barkat.Paki said:
Good work to make it easy for newbies....
Why didn't you create it in general section?
Sent from my HTC Explorer using xda premium
Click to expand...
Click to collapse
Thanks n OK I vil make new thread in general :thumbup:
Sent from my HTC Explorer A310e using xda premium
when i type su i get permission denied error.. :/
chand9336 said:
when i type su i get permission denied error.. :/
Click to expand...
Click to collapse
Bro dat happened wid me also so jst copy whole code which starts from adb shell till end of the code dn hit enter dn u vill see "erase complete 100 percent " on cmd :thumbup:
Sent from my HTC Explorer A310e using xda premium
i pasted the whole code and i just get permission denied.. :\
i pasted the whole code and i just get permission denied.. :\
Click to expand...
Click to collapse
Cn u gve me d log cat or take a picture of dat cmd and send me
Sent from my HTC Explorer A310e using xda premium
[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd2 0 0
flash_erase: error!: /dev/mtd/mtd2
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd4 0 0
flash_erase: error!: /dev/mtd/mtd4
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd5 0 0
flash_erase: error!: /dev/mtd/mtd5
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd2 0 0
flash_erase: error!: /dev/mtd/mtd2
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
flash_erase: error!: /dev/mtd/mtd4
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd5 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
flash_erase: error!: /dev/mtd/mtd5
error 13 (Permission denied)
255|[email protected]:/system/xbin $
chand9336 said:
[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd2 0 0
flash_erase: error!: /dev/mtd/mtd2
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd4 0 0
flash_erase: error!: /dev/mtd/mtd4
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd5 0 0
flash_erase: error!: /dev/mtd/mtd5
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd2 0 0
flash_erase: error!: /dev/mtd/mtd2
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
flash_erase: error!: /dev/mtd/mtd4
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd5 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
flash_erase: error!: /dev/mtd/mtd5
error 13 (Permission denied)
255|[email protected]:/system/xbin $
Click to expand...
Click to collapse
Set permission to 755
Sent from my HTC Explorer A310e using xda premium
chand9336 said:
[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd2 0 0
flash_erase: error!: /dev/mtd/mtd2
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd4 0 0
flash_erase: error!: /dev/mtd/mtd4
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd5 0 0
flash_erase: error!: /dev/mtd/mtd5
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd2 0 0
flash_erase: error!: /dev/mtd/mtd2
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
flash_erase: error!: /dev/mtd/mtd4
error 13 (Permission denied)
255|[email protected]:/system/xbin $ ./flash_erase -N /dev/mtd/mtd5 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
flash_erase: error!: /dev/mtd/mtd5
error 13 (Permission denied)
255|[email protected]:/system/xbin $
Click to expand...
Click to collapse
Before flash commands run "su "
Sent from my HTC Explorer A310e using xda app-developers app
i am getting this
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
su
cd /system/xbin
./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
su
cd /system/xbin
./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
~ # su
/sbin/sh: su: not found
~ # cd /system/xbin
/sbin/sh: cd: can't cd to /system/xbin
~ # ./flash_erase -N /dev/mtd/mtd2 0 0
/sbin/sh: ./flash_erase: not found
~ # ./flash_erase -N /dev/mtd/mtd4 0 0
/sbin/sh: ./flash_erase: not found
~ # ./flash_erase -N /dev/mtd/mtd5 0 0
/sbin/sh: ./flash_erase: not found
~ # ←[6nsu
theanswer.3 said:
i am getting this
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
su
cd /system/xbin
./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
su
cd /system/xbin
./flash_erase -N /dev/mtd/mtd2 0 0
./flash_erase -N /dev/mtd/mtd4 0 0
./flash_erase -N /dev/mtd/mtd5 0 0
~ # su
/sbin/sh: su: not found
~ # cd /system/xbin
/sbin/sh: cd: can't cd to /system/xbin
~ # ./flash_erase -N /dev/mtd/mtd2 0 0
/sbin/sh: ./flash_erase: not found
~ # ./flash_erase -N /dev/mtd/mtd4 0 0
/sbin/sh: ./flash_erase: not found
~ # ./flash_erase -N /dev/mtd/mtd5 0 0
/sbin/sh: ./flash_erase: not found
~ # ←[6nsu
Click to expand...
Click to collapse
Did u set permission to 755
Sent from my HTC Explorer A310e using xda premium
9282gkg said:
Did u set permission to 755
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
how i can set??
theanswer.3 said:
how i can set??
Click to expand...
Click to collapse
For dat u must hv twrp recovery ,see ma procedure on 1st page
Sent from my HTC Explorer A310e using xda premium
9282gkg said:
For dat u must hv twrp recovery ,see ma procedure on 1st page
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
i've done everything on your first post.
theanswer.3 said:
i've done everything on your first post.
Click to expand...
Click to collapse
K Dan go to recovery mode I.e twrp n mount system dn go to system/ xbin wer u hv pasted flash_erase file Dan click on dat file u vill see chmod 755 tab click on dat tab . Dats how to set permission.. nw connect phone to PC in recovery mod n open cmd as admin. N nw copy whole code n paste in cmd dats it:thumbup:
Sent from my HTC Explorer A310e using xda premium
First of all thanks for the detailed procedure.
Second, there is no xbin folder in system folder. There is only bin folder in system folder!!
vikingmax said:
First of all thanks for the detailed procedure.
Second, there is no xbin folder in system folder. There is only bin folder in system folder!!
Click to expand...
Click to collapse
Bro 1st mount system dan u vill see xbin
Sent from my HTC Explorer A310e using xda premium
9282gkg said:
Bro 1st mount system dan u vill see xbin
Sent from my HTC Explorer A310e using xda premium
Click to expand...
Click to collapse
Thanks alot anyways
Hello,
I´m writing a tool to send a broadcast intent to SuperSu. I got the intent message by looking at su binary:
/system/bin/am broadcast --user 0 -a eu.chainfire.supersu.NativeAccess --es su_appname "ADB shell" --ei su_fromuid 2000 --ei su_access 1 --ei su_touid 0 --es su_cmd INTERACTIVE --ei su_code 811174 -n "eu.chainfire.supersu/.NativeAccessReceiver"
I was expecting the SuperSu pop-up (same behavior when i type "su") command. However it doesn´t happen.
Anybody knows how can i send the intent to be able to open the SuperSu authorization pop-up ?
Thanks!
For some reason when i flash xposed framework and reboot, my phone will boot till the boot animation and turn to a black screen halfway, and then the only way is to press power button which will make the phone vibrate, and i need to keep pressing until the phone stops vibrating when i press the power button, than it will go to my lock screen and everything is normal except that xposed is no working. and i have no idea why
how do i get a log for what is happening during boot to prevent xposed from working for my phone?
/system/bin/sh : sh
D/libsuperuser( 9334): [libsuperuser][O][SU-] -BOC-
D/libsuperuser( 9334): [libsuperuser][O][SU-] uid=0(root) gid=0(root) context=u:
r:init_shell:s0
D/libsuperuser( 9334): [libsuperuser][O][SU*] 1500e016-94cd-4086-9a81-05512b836a
52-00000001
D/libsuperuser( 9334): [libsuperuser][O][SU-] 1500e016-94cd-4086-9a81-05512b836a
52-00000001 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed mount -o remount,rw /system
D/libsuperuser( 9334): [libsuperuser][O][SU-] 541b4208-dad3-4691-9d8b-4a26c396cd
e8-00000002 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] 541b4208-dad3-4691-9d8b-4a26c396cd
e8-00000002
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed cp -a /system/bin/app_process /system/bin/app_pro
cess.orig
D/libsuperuser( 9334): [libsuperuser][O][SU*] c3de7cbe-c70d-4b79-9735-5c7270c5f7
0a-00000003
D/libsuperuser( 9334): [libsuperuser][O][SU-] c3de7cbe-c70d-4b79-9735-5c7270c5f7
0a-00000003 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed sync
D/libsuperuser( 9334): [libsuperuser][O][SU-] b15e5de8-9b25-4948-939e-9850a7ed67
83-00000004 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] b15e5de8-9b25-4948-939e-9850a7ed67
83-00000004
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed cp -a /data/data/de.robv.android.xposed.installer
/bin/app_process /system/bin/app_process
D/libsuperuser( 9334): [libsuperuser][O][SU-] 0fccd2f5-558f-4f67-8623-2efbc262a4
bb-00000005 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] 0fccd2f5-558f-4f67-8623-2efbc262a4
bb-00000005
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed chmod 755 /system/bin/app_process
D/libsuperuser( 9334): [libsuperuser][O][SU-] f0e4937e-0fe9-4c70-a42e-15b1549061
db-00000006 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] f0e4937e-0fe9-4c70-a42e-15b1549061
db-00000006
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed chown root:shell /system/bin/app_process
D/libsuperuser( 9334): [libsuperuser][O][SU*] df222303-06bc-4e56-bc3e-eab809a464
5b-00000007
D/libsuperuser( 9334): [libsuperuser][O][SU-] df222303-06bc-4e56-bc3e-eab809a464
5b-00000007 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed rm /data/data/de.robv.android.xposed.installer/co
nf/disabled
D/libsuperuser( 9334): [libsuperuser][O][SU*] cdddb043-2a85-4d32-a894-f6a4a74771
14-00000008
D/libsuperuser( 9334): [libsuperuser][O][SU-] cdddb043-2a85-4d32-a894-f6a4a74771
14-00000008 0
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed sync
D/libsuperuser( 9334): [libsuperuser][O][SU-] c12921c3-3d1c-44cc-8145-46e800647b
38-00000009 0
D/libsuperuser( 9334): [libsuperuser][O][SU*] c12921c3-3d1c-44cc-8145-46e800647b
38-00000009
I/XposedInstaller( 9334): updating modules.list
I/SFPerfTracer( 263): triggers: (rate: 11:424) (compose: 0:7) (post: 0:1)
(render: 0:17) (12:3906 frames) (13:7349)
D/SFPerfTracer( 263): layers: (5:11) (DimLayer: 0:2)* (FocusedStackFrame
: 0:55)* (StatusBar: 0:1161) (NavigationBar: 0:356) (com.go.multiplewallpaper.Mu
ltipleWallpaperService: 0:82)* (DimLayer: 13:101) (de.robv.android.xposed.instal
ler/de.robv.android.xposed.installer.WelcomeActivity: 0:111)* (de.robv.android.x
posed.installer/de.robv.android.xposed.installer.XposedInstallerActivity: 0:70)
(de.robv.android.xposed.installer/de.robv.android.xposed.installer.XposedInstall
erActivity: 13:18)
W/linker ( 9743): /system/bin/app_process has text relocations. This is wasting
memory and is a security risk. Please fix.
D/AndroidRuntime( 9743):
D/AndroidRuntime( 9743): >>>>>> AndroidRuntime START com.android.internal.os.Run
timeInit <<<<<<
D/AndroidRuntime( 9743): CheckJNI is OFF
D/dalvikvm( 9743): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 9743): Added shared lib libjavacore.so 0x0
D/dalvikvm( 9743): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 9743): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 9743): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 9743): Note: class Landroid/app/ActivityManagerNative; has 181 unimp
lemented (abstract) methods
W/SurfaceFlinger( 263): couldn't log to binary event log: overflow.
E/memtrack( 9743): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 9743): failed to load memtrack module: -2
D/AndroidRuntime( 9743): Calling main entry com.android.commands.am.Am
I/ActivityManager( 1027): Start proc com.koushikdutta.superuser for broadcast co
m.koushikdutta.superuser/.SuReceiver: pid=9790 uid=10102 gids={50102}
D/AndroidRuntime( 9743): Shutting down VM
D/dalvikvm( 9743): GC_CONCURRENT freed 97K, 14% free 609K/708K, paused 1ms+0ms,
total 3ms
I/SFPerfTracer( 263): triggers: (rate: 11:425) (compose: 0:7) (post: 0:1)
(render: 0:19) (43:3964 frames) (44:7419)
D/SFPerfTracer( 263): layers: (6:12) (DimLayer: 0:2)* (FocusedStackFrame
: 0:58)* (StatusBar: 0:1161) (NavigationBar: 0:356) (com.go.multiplewallpaper.Mu
ltipleWallpaperService: 0:82)* (DimLayer: 0:121) (de.robv.android.xposed.install
er/de.robv.android.xposed.installer.XposedInstallerActivity: 0:71) (de.robv.andr
oid.xposed.installer/de.robv.android.xposed.installer.XposedInstallerActivity: 0
:30)* (de.robv.android.xposed.installer/de.robv.android.xposed.installer.XposedI
nstallerActivity: 17:36) (Toast: 30:33)
I/ActivityManager( 1027): Killing 9491:com.android.settings/1000 (adj 15): empty
#9
W/ContextImpl( 1331): Calling a method in the system process without a qualified
user: android.app.ContextImpl.sendBroadcast:1252 android.content.ContextWrapper
.sendBroadcast:365 com.motorola.motocare.util.TriggerHelper$TriggerBuilder.send:
76 com.motorola.motocare.internal.frameworkevents.ProcessKillTrigger.sendTrigger
:147 com.motorola.motocare.internal.frameworkevents.ProcessKillTrigger.handleFra
meworkEvent:164
I/SFPerfTracer( 263): triggers: (rate: 0:0) (995 sw vsyncs) (0 skipped) (4
4:7269 vsyncs) (46:11890)
D/WifiService( 1027): Client connection lost with reason: 4
D/libsuperuser( 9334): [libsuperuser][C][SU+] /data/data/de.robv.android.xposed.
installer/cache/busybox-xposed reboot
E/qdhwcomposer( 263): hwc_sync: ioctl MSMFB_BUFFER_SYNC failed, err=Operation n
ot permitted
E/qdhwcomposer( 263): hwc_sync: acq_fen_fd_cnt=1 flags=0 fd=16 dpy=0 numHwLayer
s=6
E/qdoverlay( 263): Failed to call ioctl MSMFB_OVERLAY_PLAY err=Operation not pe
rmitted
E/qdoverlay( 263): MdpData failed to play
E/qdoverlay( 263): == Dump MdpData start ==
E/qdoverlay( 263): == Dump OvFD fd=63 path=/dev/graphics/fb0 start/end ==
E/qdoverlay( 263): mOvData msmfb_overlay_data id=8
E/qdoverlay( 263): data msmfb_data offset=0 memid=27 id=0 flags=0x0 priv=0
E/qdoverlay( 263): == Dump MdpData end ==
E/qdhwcomposer( 263): draw: queueBuffer failed for FBUpdate
E/qdhwcomposer( 263): hwc_set_primary: FBUpdate draw failed
E/qdoverlay( 263): Failed to call ioctl MSMFB_DISPLAY_COMMIT err=Operation not
permitted
E/qdoverlay( 263): static bool overlay:verlay::displayCommit(const int&, cons
t overlay::utils:im&): commit failed
E/qdhwcomposer( 263): hwc_set_primary: display commit fail for 0 dpy!
E/qdoverlay( 263): Failed to call ioctl MSMFB_OVERLAY_SET err=Operation not per
mitted
E/qdoverlay( 263): MdpCtrl failed to setOverlay
E/qdoverlay( 263): == Bad OVInfo is: mdp_overlay z=0 fg=0 alpha=255 mask=-1 fl
ags=0x20000 id=8
E/qdoverlay( 263): src msmfb_img w=736 h=1280 format=13 MDP_RGBA_8888
E/qdoverlay( 263): src_rect mdp_rect x=0 y=0 w=720 h=1280
E/qdoverlay( 263): dst_rect mdp_rect x=0 y=0 w=720 h=1280
E/qdoverlay( 263): Ctrl commit failed set overlay
E/qdhwcomposer( 263): configure: configMdp failed for dpy 0
E/qdoverlay( 263): Failed to call ioctl MSMFB_OVERLAY_UNSET err=Operation not p
ermitted
E/qdoverlay( 263): MdpCtrl close error in unset
Are you running ART or Dalvik? Xposed will not currently work with ART.
SbM_ said:
Are you running ART or Dalvik? Xposed will not currently work with ART.
Click to expand...
Click to collapse
im using davlik
Xposed automatically switch your system to Dalvik.
Flash the Xposed-recovery that you have on your SD-Card via Custom Recovery.
Then reboot, remove all the Xposed settings/apk/etc. - reboot and reinstall Xposed.
*also be sure you have busybox and supersu installed.
darkeingel said:
Xposed automatically switch your system to Dalvik.
Flash the Xposed-recovery that you have on your SD-Card via Custom Recovery.
Then reboot, remove all the Xposed settings/apk/etc. - reboot and reinstall Xposed.
*also be sure you have busybox and supersu installed.
Click to expand...
Click to collapse
i never change to art at all, it was working fine till i restarted my phone
You FLASH Xposed?
edisso10018 said:
You FLASH Xposed?
Click to expand...
Click to collapse
i install the app and install the framework from there?
darkeingel said:
Xposed automatically switch your system to Dalvik.
Flash the Xposed-recovery that you have on your SD-Card via Custom Recovery.
Then reboot, remove all the Xposed settings/apk/etc. - reboot and reinstall Xposed.
*also be sure you have busybox and supersu installed.
Click to expand...
Click to collapse
i tried uninstalling the apks for xposed and other xposed related apks and reinstall, but its not working
For those on linux, I want to share a bash script that loops over an array of apks to de-install. So you can just list the apps you don't want in a clear overview, and then the script will figure out if it's installed as user or system app and delete it. No harm if the app is not installed, as it will just inform about it.
I put some examples in the list. Please adjust to your needs!
Code:
#!/bin/bash
# list any packages you want to deinstall
apk=(
#google
com.google.android.apps.docs
com.google.android.videos
com.google.android.apps.tachyon
com.google.android.googlequicksearchbox
com.google.android.gm
com.google.android.apps.maps
com.google.android.youtube
com.google.android.apps.youtube.music
com.google.android.apps.photos
com.google.android.apps.wellbeing
com.google.android.syncadapters.calendar
com.google.android.syncadapters.contacts
com.google.android.tts
com.google.ar.lens
com.google.android.marvin.talkback
com.google.android.inputmethod.latin
com.google.android.projection.gearhead
#android
com.android.browser
com.android.chrome
#3rd party
com.facebook.katana
com.netflix.mediaclient
com.linkedin.android
com.alibaba.aliexpresshd
com.amazon.mShop.android.shopping
com.ebay.mobile
com.ebay.carrier
com.facebook.appmanager
com.facebook.system
com.facebook.services
com.netflix.partner.activation
)
for m in "${apk[@]}" #loop through the list of packages
do
package=$(adb shell pm path ${m}) #get installation path for each package
if [ -z $package ] #if no path is found
then
echo "Can't find package ${m}" #then notify
else
if [[ $package == *"system"* ]] #else if package is installed in system path
then
echo "Removing system $package:"
adb shell pm uninstall --user 0 ${m} #then remove it as a system app
else #else package is installed in user path
echo "Removing user $package:"
adb shell pm uninstall ${m} #so remove it as an user app
fi
fi
done
I know about the input tap x y shell command, however, I'm trying to understand how to
perform a click using the sendevent command. I have been able to achieve it with the following command:
Code:
sendevent /dev/input/event5 3 53 X &&
sendevent /dev/input/event5 3 54 Y &&
sendevent /dev/input/event5 0 2 0 &&
sendevent /dev/input/event5 0 0 0 &&
sendevent /dev/input/event5 0 2 0 &&
sendevent /dev/input/event5 0 0 0
Where `X` and `Y` is the position that will be clicked, I'm testing it on the android emulator `BlueStacks 5` which the Display Resolution set to `1920x1080`.
The code is working and the click is fired, however, I couldn't understand how to convert the position where I want to be clicked to the sendevent XY position.
If I send using ADB:
Code:
sendevent /dev/input/event5 3 53 2000 &&
sendevent /dev/input/event5 3 54 2000 &&
sendevent /dev/input/event5 0 2 0 &&
sendevent /dev/input/event5 0 0 0 &&
sendevent /dev/input/event5 0 2 0 &&
sendevent /dev/input/event5 0 0 0
It clicks somewhere around x75 y75, how is this calc done? i mean screen xy -> sendevent xy?
--------------------
How to replicate:
--------------------
* First enable BlueStacks 5 adb in the window: Settings -> Advanced -> Android debug bridge
* Open a cmd window and run cd C:\Program Files\BlueStacks_nxt assuming BlueStacks where installed in the default path.
Execute the commands:
* hd-adb.exe connect 127.0.0.1:X where X is the port shown in the window where you enabled the ADB.
* hd-adb.exe -s 127.0.0.1:X shell
Now we are on the shell, execute a new command: getevent -p
and search for:
Code:
... /dev/input/event5
name: "BlueStacks Virtual Touch"
On my emulator the input event for touch is `event5` on yours it can be different, replace it according.
Now you can simulate a click with the code below changing `XY` to the position where you want to be clicked:
Code:
sendevent /dev/input/event5 3 53 X &&
sendevent /dev/input/event5 3 54 Y &&
sendevent /dev/input/event5 0 2 0 &&
sendevent /dev/input/event5 0 0 0 &&
sendevent /dev/input/event5 0 2 0 &&
sendevent /dev/input/event5 0 0 0
I'm trying to figure out how to convert the emulator screen position to the sendevent position.
For example, if you want to perform a click at `x200 y200`, using sendevent what is the value needed?
How to calculate it?
Note: cross-post StackOverflow.
Bump