im sorry.. im new here.. i don't know where to start. i want to run some command in emulator (android). im running certain apps, and i need it to run and not to be detectable in emulator instead as android mobile. The problem is, this command suppose to bind certain file, but its not bind.. maybe the bind command is wrong. see below script/command

@echo off

adb.exe kill-server
adb.exe start-server
adb.exe devices
adb root
adb remount

adb shell sleep 2

adb shell am start com.abc.im /com.abcgames.ab1.SplashActivity filter

adb shell sleep 3
adb shell pidof com.abc.im

adb shell sleep 6
adb shell for i in $(pidof com.abc.im | awk '{print $1}'); do mount --bind /proc/2/maps /proc/$i/maps; done

above if full command that i write on batch file (*.bat)

my question is in this particular command below

for i in $(pidof com.abc.im | awk '{print $1}'); do mount --bind /proc/2/maps /proc/$i/maps; done

its not working. can anybody help me correct it?

p.s - sory for my poor english... TQ

  • Are you sure all those commands really finished successfully? adb root and adb remount require a rooted device/emulator with a special adb version installed. Therefore usually on recent device/emulators these commands will fail. – Robert Sep 6 '20 at 12:29
  • yes. its rooted emulator. is the bind command right? i suspect the command is missing something or syntax wrong or else.. can help me? – HazeRiff Technician Sep 6 '20 at 15:28
  • is this command right? for i in $(pidof com.abc.ig) | awk '{print $1}' | do mount --bind /$i /proc/$i/maps; done – HazeRiff Technician Sep 6 '20 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.