[help] Reverse app and root - Android Q&A, Help & Troubleshooting

Hi guys,
I need some idea, I have two problems. I'm a beginner...
The first one is the next.
I have reversed an app. I need to see how the app behaves after a purchase (I need to see the network traffic), but after my reverse I can't do any purchase the error is : "The version of the application is not configured for billing..."
Any idea for that ?
The second problem I can't root my emulator, I use android studio.
I've been following this :
https://stackoverflow.com/questions/5095234/how-to-get-root-access-on-android-emulator
But I m stuck at this step :
Make sure you are running adb as root and also you need to remount. Just enter these codes
adb root
adb remount
Click to expand...
Click to collapse
I have this message :
Not running as root. Try "adb root" first.
Click to expand...
Click to collapse
Yet this command seems to work :
emulator -avd {emulator_name} -writable-system
Click to expand...
Click to collapse
My OS is windows, and android version is 7.1.
Oh and I have a last question. How I can debug my app when it start ?
adb forward tcp:8700 jdwp:$(timeout 0.5 adb jdwp | tail -n 1)
Click to expand...
Click to collapse
This command not work on windows, I use "adb shell ps" and I take the pid...
Thanks.

Rdmzied said:
Oh and I have a last question. How I can debug my app when it start ?
This command not work on windows,
Code:
adb forward tcp:8700 jdwp:$(timeout 0.5 adb jdwp | tail -n 1)
I use "adb shell ps" and I take the pid...
Click to expand...
Click to collapse
A: Make sure your app has android:debuggable="true" in Android Manifest.
B: To debug an application using JDWP:
In Windows:
Open the command prompt
Add to the PATH environment variable <jdk/bin> where jdk is the installation directory of the JDK.
Add the path to Android SDK platform-tools to PATH environment variable.
Reboot computer
Open the command prompt and run
Code:
adb forward tcp:8700 jdwp:<JWPD_ID>
to forward JDWP service to localhost where <JWPD_ID> you obtain via running command
Code:
adb jwpd
In Android Studio:
Turn on "USB debugging" and use "Select debug app" to select your app in "Developer options" on Android device
Start your application
Create a new "Remote" debug configuration (Run->Edit Configurations), and change the debug port to 8700
Select Run -> Debug

@Rdmzied
How to root the Android Emulator is well explained here.

jwoegerbauer said:
A: Make sure your app has android:debuggable="true" in Android Manifest.
B: To debug an application using JDWP:
In Windows:
Open the command prompt
Add to the PATH environment variable <jdk/bin> where jdk is the installation directory of the JDK.
Add the path to Android SDK platform-tools to PATH environment variable.
Reboot computer
Open the command prompt and run
Code:
adb forward tcp:8700 jdwp:<JWPD_ID>
to forward JDWP service to localhost where <JWPD_ID> you obtain via running command
Code:
adb jwpd
In Android Studio:
Turn on "USB debugging" and use "Select debug app" to select your app in "Developer options" on Android device
Start your application
Create a new "Remote" debug configuration (Run->Edit Configurations), and change the debug port to 8700
Select Run -> Debug
Click to expand...
Click to collapse
Thanks for your answers. I think you did not understand. I can debug my app, but I want to debug when the application start.
jwoegerbauer said:
@Rdmzied
How to root the Android Emulator is well explained here.
Click to expand...
Click to collapse
Your link is the same tutorial than my link...
{
"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"
}
I m not root...

Rdmzied said:
I m not root...
Click to expand...
Click to collapse
To gain ROOT requires you have successfully installed SuperSU app. That's all.

Related

[Q]ADB in recovery mode?

how to enable adb shell in recovery mode?
when i try "adb shell" in recovery mode,it says sh not find somthing
does this means can't use adb in recovery mode?
i want trace recovery bin by ida pro,sames i have 2 chose:
1,enable adb shell and gdb server in recovery mode
2,or run recovery bin in normal mode.
the 1st,cant open adb shell
the 2nd got segment error in sh
please help!
<robin> said:
how to enable adb shell in recovery mode?
when i try "adb shell" in recovery mode,it says sh not find somthing
does this means can't use adb in recovery mode?
i want trace recovery bin by ida pro,sames i have 2 chose:
1,enable adb shell and gdb server in recovery mode
2,or run recovery bin in normal mode.
the 1st,cant open adb shell
the 2nd got segment error in sh
please help!
Click to expand...
Click to collapse
Release 5a recovery?? I get error: closed
Drivers are good aye?
Stifilz
no,i'm at 3.2.1
how to open adb shell?
<robin> said:
no,i'm at 3.2.1
how to open adb shell?
Click to expand...
Click to collapse
Wtf. Normally just adb shell. Does adb pull or adb push work etc?
<robin> said:
how to enable adb shell in recovery mode?
when i try "adb shell" in recovery mode,it says sh not find somthing
does this means can't use adb in recovery mode?
i want trace recovery bin by ida pro,sames i have 2 chose:
1,enable adb shell and gdb server in recovery mode
2,or run recovery bin in normal mode.
the 1st,cant open adb shell
the 2nd got segment error in sh
please help!
Click to expand...
Click to collapse
hi robin,
1. change region to US,
2. download this hacked_recov,
3. run recovery, update with this file, should finish with error 7,
4. wait one minute, and adb should be available - make sure that you have installed adb drivers for recovery device.
5. when in adb shell type this:
Code:
/system/bin/tempsu
PATH=$PATH:/system/bin:/system/xbin
and you will get root, and normally working with all the commands shell.
br
condi
wow,thanks candi!
your tool is real cooooool
i can trace recovery now!
{
"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"
}
getting prohibit update as a result of checking version or base
condi said:
hi robin,
1. change region to US,
2. download this hacked_recov,
3. run recovery, update with this file, should finish with error 7,
4. wait one minute, and adb should be available - make sure that you have installed adb drivers for recovery device.
5. when in adb shell type this:
Code:
/system/bin/tempsu
PATH=$PATH:/system/bin:/system/xbin
and you will get root, and normally working with all the commands shell.
br
condi
Click to expand...
Click to collapse
So I've been at this for days now. From what I can read here and on the web it looks like my region file is screwed up. Tried a million different region zips.
I can get device to show in adb as recovery.
Any thoughts?

[Q] Copy files from device to pc hdd via adb shell

I am having trouble finding the right command to copy a file from a device via adb shell to my pc. I tried -mv- but that just renamed it.
Code:
mv Camera c:/camera
renamed to c:camera
adb pull /path/to/Camera C:\camera
RoberGalarga said:
adb pull /path/to/Camera C:\camera
Click to expand...
Click to collapse
yeah I tried that. I think that since my phone is locked, I can't su the shell. I actually tried a single file also. No luck.
das-heftige said:
yeah I tried that. I think that since my phone is locked, I can't su the shell. I actually tried a single file also. No luck.
Click to expand...
Click to collapse
I don't have to unlock my tablet to pull files. You are doing the command from the PC, right, like in a DOS box? You should be able to see the files by doing "adb shell ls /sdcard/DCIM/Camera/". "adb pull /sdcard2/DCIM/Camera ." will pull all of the pictures on my Hisense external sdcard into the current "." windows directory on my computer.
BSODs when using usb 3.0
das-heftige said:
I am having trouble finding the right command to copy a file from a device via adb shell to my pc. I tried -mv- but that just renamed it.
Code:
mv Camera c:/camera
renamed to c:camera
Click to expand...
Click to collapse
Hi,
I have facing out weird problem. Why, when i using adb command to copy file from PC windows to android Devices using Port usb 3.0. Windows will be immediately Blue Screen. Note: in blue screen appears, Bluescreen: Physical Memory Dump
I using Windows 7 (Zotac CPU). But, when i using standart USB port in zotac. Will be running.
Anyone knows, why the problem appears?
Thanks
Android All In One Toolkit - Data Transfer Via ADB
das-heftige said:
I am having trouble finding the right command to copy a file from a device via adb shell to my pc. I tried -mv- but that just renamed it.
Code:
mv Camera c:/camera
renamed to c:camera
Click to expand...
Click to collapse
Hii
I Developed an application named "Android All In One Toolkit" With Windows GUI...
1. Data Transfer
{
"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"
}
No Need to type single command
just put path in text box & Press Pull From Device button..
It has feature for fast data transfer over adb without mounting sd card...
It also has many more features that will make your workflow much easier..
Check out my Application
Thread : http://forum.xda-developers.com/showthread.php?t=2494319
aditya.kamble said:
Hii
I Developed an application named "Android All In One Toolkit" With Windows GUI...
1. Data Transfer
No Need to type single command
just put path in text box & Press Pull From Device button..
It has feature for fast data transfer over adb without mounting sd card...
It also has many more features that will make your workflow much easier..
Check out my Application
Thread : http://forum.xda-developers.com/showthread.php?t=2494319
Click to expand...
Click to collapse
Sorry aditya, but I got an error launching the app,
It said "Could not find the main class : androidallinonetoolkit. Program will exit

[Q] Adb and Adb shell help

Hi,
When I start up adb and use the command "Adb devices" my device show. I want to use adb shell, so I type "Adb shell" ofc. Then, when I try "Adb devices", my device does not show :/ Anyone have a solution?
First thing first, make sure you have USB debugging on.
To do this, go into About Phone, tap the build number 7 times (this should give you a toast notification that you are now a developer).
Go back, now go into the developer options what has come up above about phone.
Tick the USB Debugging box, and then connect your phone and try to connect with adb shell.
If this doesn't work, revoke USB debugging authorisations, then try adb shell again.
gamer649 said:
First thing first, make sure you have USB debugging on.
To do this, go into About Phone, tap the build number 7 times (this should give you a toast notification that you are now a developer).
Go back, now go into the developer options what has come up above about phone.
Tick the USB Debugging box, and then connect your phone and try to connect with adb shell.
If this doesn't work, revoke USB debugging authorisations, then try adb shell again.
Click to expand...
Click to collapse
That didn't work :/ Any other suggestions?
Have you installed the ADB drivers and drivers for the board set the Z2 uses?
gamer649 said:
Have you installed the ADB drivers and drivers for the board set the Z2 uses?
Click to expand...
Click to collapse
At least flashtool says I have ADB drivers installed?
Skanin said:
At least flashtool says I have ADB drivers installed?
Click to expand...
Click to collapse
I'm not sure what to suggest then. @Envious_Data any suggestions?
gamer649 said:
I'm not sure what to suggest then. @Envious_Data any suggestions?
Click to expand...
Click to collapse
{
"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"
}
A screenshot of what happens, if that helps
you're already connected in adb mode, as your pic shows, so why would you need to use adb devices again ?
what are you trying to do ? you've successfully connected to your device in adb mode and used the su command, so what do you want to do ?
ticktock666 said:
you're already connected in adb mode, as your pic shows, so why would you need to use adb devices again ?
what are you trying to do ? you've successfully connected to your device in adb mode and used the su command, so what do you want to do ?
Click to expand...
Click to collapse
Yeh, I know.. But I want to use the command "adb remount rw /system". If use it without "abd shell" I get a permission denied error, and in "adb shell" I get error: device not found.. (see picture)
Skanin said:
Yeh, I know.. But I want to use the command "adb remount rw /system". If use it without "abd shell" I get a permission denied error, and in "adb shell" I get error: device not found.. (see picture)
Click to expand...
Click to collapse
Note, don't use any quotes for the below commands.
1) Connect device to computer.
2) Type "adb shell" in cmd, then press enter.
3) Type "su", then press enter.
4) Type "mount -o rw,remount /system", then press enter.
Congratulations, it is now remounted. ADB devices will not work on the device, as the device cannot connect to itself to itself via USB.
what gamer said, you were simply using the wrong command for mounting

Any app to make sd card as installation location app Huawei Mediapad T3 10

i got Huawei Mediapad T3 10 but storage to install app is very limted
so any app to make installation app in sd card momery
as i read the device not support that
but in ask any app or method to solve this
ant_gamal said:
i got Huawei Mediapad T3 10 but storage to install app is very limted
so any app to make installation app in sd card momery
as i read the device not support that
but in ask any app or method to solve this
Click to expand...
Click to collapse
You achieve this via ADB: Run the following command to set the default install location to your SD card:
Code:
adb shell pm setInstallLocation 2
Of course you will be required to enable the USB debugging option in the Developer option and download the ADB client on your computer - if not already done yet. To enable Developer option, go to Settings > About device > Build number and tap Build number seven times. Once activated, you will see a message that reads, “You are now a developer”. After enabling USB debugging, plug in your phone to your PC using USB and invoke ADB.
jwoegerbauer said:
You achieve this via ADB: Run the following command to set the default install location to your SD card:
Code:
adb shell pm setInstallLocation 2
Of course you will be required to enable the USB debugging option in the Developer option and download the ADB client on your computer - if not already done yet. To enable Developer option, go to Settings > About device > Build number and tap Build number seven times. Once activated, you will see a message that reads, “You are now a developer”. After enabling USB debugging, plug in your phone to your PC using USB and invoke ADB.
Click to expand...
Click to collapse
thank could you give me link to ADB and how to use
sorry i am not expert
i entered developer mode already
ant_gamal said:
thank could you give me link to ADB and how to use
sorry i am not expert
i entered developer mode already
Click to expand...
Click to collapse
Supposed your desktop is a Windows machine:
Matching ADB driver you'll get here
You preferredably install it to C:\ADB
You add C:\ADB to Windows PATH variable to easily access ADB from anywhere
Code:
set PATH=%PATH%;C:\ADB
You reboot Windows & reboot your HUAWEI
You connect your HUAWEI and Windows machine via USB cable
You open Windows command prompt and run following commands - one by one
Code:
adb devices
adb shell pm setInstallLocation 2
HTH
jwoegerbauer said:
Supposed your desktop is a Windows machine:
Matching ADB driver you'll get here
You preferredably install it to C:\ADB
You add C:\ADB to Windows PATH variable to easily access ADB from anywhere
Code:
set PATH=%PATH%;C:\ADB
You reboot Windows & reboot your HUAWEI
You connect your HUAWEI and Windows machine via USB cable
You open Windows command prompt and run following commands - one by one
Code:
adb devices
adb shell pm setInstallLocation 2
HTH
Click to expand...
Click to collapse
my pc run with win10 and i did what you say but could not run any line
see photos
{
"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"
}
i use left shift with right click
device not found although i connect the tab
@ant_gamal
I can't open the images provided.
jwoegerbauer said:
@ant_gamal
I can't open the images provided.
Click to expand...
Click to collapse
i tried many site to upload photos
if not view plz suggest web host site
@ant_gamal
Oops, was my fault:
Deprecated syntax
Code:
adb shell pm setInstallLocation 2
New syntax ( Android 4x)
Code:
adb shell pm set-install-location 2
Example screenshot:
Note: First switch from PS to CMD
i did not restart pc or tab
i did but say adb not recognize
i attach the tab and choose transfer file
then i tried what you said and give me this in photo
is there is any package software need to install first before do this commend line
ant_gamal said:
is there is any package software need to install first before do this commend line
Click to expand...
Click to collapse
No.
What you're doing wrong is entering an invalid path/to/ADB: in your case is must be C:\ADB\adb
is there is any tool
does not work
same message device not found
ant_gamal said:
is there is any tool
does not work
same message device not found
Click to expand...
Click to collapse
Of course you can install on your Android device a Terminal Emulator, if not done yet, and therein run command
Code:
pm set-install-location 2
FYI: I no longer participate on this thread, sorry for this.
jwoegerbauer said:
The tool to be used is ADB, nothing else.
FYI: I no longer participate on this thread, sorry for this.
Click to expand...
Click to collapse
i think problem that not recognize the device
ant_gamal said:
i think problem that not recognize the device
Click to expand...
Click to collapse
I've edited my post you quoted: re-read it.
hi, i have same problem with mediapad T3, lower space.
i make procedure adviced from jwoegerbauer.
first command: Ok, i see device connected
second command: Error: java.lang.SecurityException: Package Android does not belong to 2000
any help? thank you

How To Guide How to give any app WRITE_SECURE_SETTINGS without a computer or root

DISCLAIMER: This guide works on any phone with Android 11 or newer. Previous versions do not have wireless debugging so this is not possible.
Hey all! In this short guide, I will be showing you how to give any app the permission "WRITE_SECURE_SETTINGS" without needing to connect to a computer.
For this guide, I will be using System UI Tuner by Zachary Wander as my example app.
First, download and install Shizuku. This is a wonderful app that allows system API access directly without needing to root your phone.
Once you've installed Shizuku, follow the steps to start it through the wireless debugging method. You will only need to pair once as long as you don't reinstall the app.
DISCLAIMER: Shizuku will need to be restarted if you restart your phone but it's just a matter of re-enabling wireless debugging and then clicking "Start" in the Shizuku app.
Next, we're going to install Termux by Fredrik Fornwall. Simply open the app once, wait for it to finish installing, then leave the app.
Now, re-enter Shizuku, and click the button that says "Use Shizuku in terminal apps".
{
"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"
}
Then click "Export files".
Afterwards, make a new folder, and call it "Shizuku".
Finally, click "Use this folder".
Almost there!
Head over to Termux, and type:
Code:
pkg install nano
This installs a text editor that we will use to edit our Shizuku config file.
While it's installing, go to Termux's app info, and change the permissions to allow it access to all files. This will allow it to see the folder we made earlier.
Go back to Termux, and after nano is done installing, type the following:
Code:
cd /sdcard/Shizuku
nano shizuku
Once inside the text editor, press the CTRL key on Termux's key bar, and press the "\" key on your keyboard.
Now, type "PKG", press Enter, then in the next field, type "com.termux".
Now, tap "a", tap Ctrl+X, tap "y", and you're done!
Whenever you want to authorize an app with "WRITE_SECURE_SETTINGS" simply open Termux, cd to "/sdcard/Shizuku", and type:
Code:
sh shizuku pm grant <package name here> android.permission.WRITE_SECURE_SETTINGS
You will only have to do this once per app as long as you do not uninstall it.
Have fun!
So this broke my brain just a bit (it's been one of those days) however if I am reading it correctly this will give some apps a pseudo root.
alarmdude9 said:
So this broke my brain just a bit (it's been one of those days) however if I am reading it correctly this will give some apps a pseudo root.
Click to expand...
Click to collapse
Sort of, it's the highest permission you can give an app without rooting your phone.
Does it allow you to say debloat the phone or things like that?
alarmdude9 said:
Does it allow you to say debloat the phone or things like that?
Click to expand...
Click to collapse
I'm not sure I haven't tested it that far but you can access all app data folders with it so maybe?
alarmdude9 said:
Does it allow you to say debloat the phone or things like that?
Click to expand...
Click to collapse
I'm not sure I haven't tested it that far but you can access all app data folders
Hmmm have to get some time to try this. Adulting sucks.
Hello, so I'm stuck on the /sdcard/
I dont have one is just on internal storage Shizuku folder... How do im supposed to type it
Does Shizuku still work with the N200 after the November update?
I was able to get everything setup to the last step where I grant packages write permissions, but every package I name returns 'pm: no such file or directory'.
If I use Termux to try to navigate to /SD card/Android/data i get 'cannot open directory: permission denied'. I'm wondering if Termux can even access the apps to give them elevated permissions?
Finnzz said:
Does Shizuku still work with the N200 after the November update?
I was able to get everything setup to the last step where I grant packages write permissions, but every package I name returns 'pm: no such file or directory'.
If I use Termux to try to navigate to /SD card/Android/data i get 'cannot open directory: permission denied'. I'm wondering if Termux can even access the apps to give them elevated permissions?
Click to expand...
Click to collapse
I have same error

Categories

Resources