[Linux] Jiayu S3 instructions setup adb - JiaYu S3 Guides, News, & Discussion

Credits
-to be expanded with other member input
vampirefo - for help with Linux and adb
Introduction
This is meant to be a step by step instruction for new to Linux users on how to set up adb with a Linux PC and
our Jiayu S3 device. Fastboot will be a separate thread. Windows users may find this thread useful?
http://forum.xda-developers.com/showthread.php?t=2266638
This is not meant to be a tutorial on how to use adb. adb is a powerful tool and so do so at your own risk.
In code boxes, they act the same as Android $ = non-root user # means you are root.
Linux PC preparation.
How to Install adb?
Use your package manager to check for it. I am running XFCE desktop variant of Ubuntu 64 bit
which is called Xubuntu. XFCE has smaller packages than say the KDE variant.
So I will give *buntu style instructions but offer other distro advice.
Open your software manager and search for "android-tools-adb" without the quotes please.
Some distros call it android-tools.
{
"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"
}
If you have a Debian/*buntu style based distro you can also check if its installed in a terminal like this
Code:
$ dpkg -l | grep adb
No response means its not installed.
Most modern distros allow you copy and paste commands from your web browser to a terminal. Some use pull down menus
otherwise highlight the command and in the terminal push down the wheel mouse.
If you have no wheel mouse press down both left and right buttons at the same time.
If its not installed use your manager to install it or use a terminal command to install it such as
Code:
$ sudo apt-get update (input your login password)
sudo apt-get install android-tools-adb
2) Are you a member of the adb users group?
Actually I don't care as we will make a udev rule that will give us root powers.
3) Jiayu specific adb usb driver?
Linux does not use such a beast but we still need some way of communicating and we use software called udev.
Udev should be installed for 90% or more of all major Linux distributions (distros) but I know of some exceptions
such as Tinycorelinux and Linuxfromscratch. Not all distros aim to be general purpose so there is no shame if udev is not installed.
If udev is not installed then install it ---easy yes?
We create a file that udev can use called.....with contents as per quote box
/etc/udev/rules.d/55-jiayu.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="666", GROUP="plugdev
Click to expand...
Click to collapse
copy and paste contents into a root powered text editor and save the file as ....the file name nominated please.
If you don't know the name of your text editor etc you can try a command
Code:
sudo echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="666", GROUP="plugdev" ' > /etc/udev/rules.d/55-jiayu.rules
But we might as well use a command to add our phone to the ini file a text file in a dot folder under home directory
This does not need a sudo command as we own this file
Code:
echo "0x0bb4" > .android/adb_usb.ini
4) Restart udev for Ubuntu style distros with
Code:
$ sudo service udev restart
(output is )udev stop/waiting
udev start/running, process 2116t
for some distros,
Code:
$ sudo udevadm control --reload-rules
Other phones can share the same Vendor ID. This is because of the contents of files included in the boot image,
called init.usb.rc with contents including this line
setprop sys.usb.vid 0BB4
Click to expand...
Click to collapse
You may notice that I have used lowercase 0bb4 in my rules file and it works fine.
Note some distros do not use sudo to gain root power commands. They would instead run a command like this
Code:
su - (input root password)
udevadm control --reload-rules
5) Android Preparation
We need a data cable usb.
6) We need to ensure that root has been activated in our device. Check it with
Settings -> Security -> Superuser is on (green slider)
7) We need USB debugging we check it by turning on developer mode by
Settings -> about phone -> Tap build number about 7 times
Go into new menu
Settings -> Developer Options -> Debugging -> USB debugging turn on (green slider)
8) Our phone boot image contains default.prop which contains this line
ro.adb.secure=1
This means Android will require authorization before adb will work on Linux
This same section at (7) has a config for Revoking previous authorizations for USB debugging,
if you have changed computers.
Lets Do It!
9) Connect cable between our phone and PC
10) On phone choose option USB storage.
11) You should now see a popup on your phone seeking authorization to continue.
I prefer you click the box so you don't have to see this popup again and click OK
12) Now back to Linux in the terminal start the adb action with a command as a non-root user
Code:
adb devices
You must see this image.
13) If you see below image, I have failed you. Re-check you have completed all steps
post your distro and we shall see if I can help you, or others.
Don't forget to restart udev if you need to change an udev rule and KILL adb with
Code:
adb kill-server
before trying again
Reasons may include
a) You have not enabled USB debugging on phone
b) You have not authorized PC
c) Your Linux udev rule contains an error
d) You did not choose USB storage on connection
14) Linux PC and phone usb storage enabled....gives file manager access to sdcard (/storage/sdcard1)
so its not available to adb at the same time,
--we can write files to internal storage.
15) Alternatively, on phone do NOT turn off usb storage but un-mount the storage you see in Linux.
This is a cheap trick I learnt. It is intended only if you need to write files from PC to sdcard,
while adb is running. If you are only pulling files from /system etc then ignore my advice.
########################################
This is not a tutorial on all adb commands.
Run command
Code:
adb --help
(to see help in the terminal)
Example of adb
Code:
$ adb shell su -c "dd if=/dev/block/platform/mtk-msdc.0/by-name/boot of=/storage/sdcard1/boot.img"
32768+0 records in
32768+0 records out
16777216 bytes transferred in 2.508 secs (6689480 bytes/sec

Nice explanation.

Only thing missing is running lsusb to find the VendorID that the phone is using, as it might be different with custom ROMs

HypoTurtle said:
Only thing missing is running lsusb to find the VendorID that the phone is using, as it might be different with custom ROMs
Click to expand...
Click to collapse
Really? I see 0bb4:0c03 vendor (HTC?): product for my 'stock' S3S 3GB/NFC. Other funky 'custom' results out there? Also, where would this value be altered in custom ROM?
---------- Post added at 02:19 ---------- Previous post was at 02:15 ----------
Nofan Tasi said:
Really? I see 0bb4:0c03 vendor (HTC?): product for my 'stock' S3S 3GB/NFC. Other funky 'custom' results out there? Also, where would this value be altered in custom ROM?
Click to expand...
Click to collapse
sorry to (attempt to try to) answer my own question:
vendor/product might be set in init.usb.rc from kernel ram disk.
# grep -i 0bb4 /init.usb.rc
setprop sys.usb.vid 0BB4
# grep -i 0c03 /init.usb.rc
write /sys/class/android_usb/android0/idProduct 0C03
write /sys/class/android_usb/android0/idProduct 0C03
and indeed
# getprop sys.usb.vid
0BB4
# cat /sys/class/android_usb/android0/idProduct
0c03
# cat /sys/class/android_usb/android0/idVendor
0bb4
yours and/or others mileage may vary though ... let us know!

Nofan Tasi said:
Really? I see 0bb4:0c03 vendor (HTC?): product for my 'stock' S3S 3GB/NFC. Other funky 'custom' results out there? Also, where would this value be altered in custom ROM?
---------- Post added at 02:19 ---------- Previous post was at 02:15 ----------
sorry to (attempt to try to) answer my own question:
vendor/product might be set in init.usb.rc from kernel ram disk.
# grep -i 0bb4 /init.usb.rc
setprop sys.usb.vid 0BB4
# grep -i 0c03 /init.usb.rc
write /sys/class/android_usb/android0/idProduct 0C03
write /sys/class/android_usb/android0/idProduct 0C03
and indeed
# getprop sys.usb.vid
0BB4
# cat /sys/class/android_usb/android0/idProduct
0c03
# cat /sys/class/android_usb/android0/idVendor
0bb4
yours and/or others mileage may vary though ... let us know!
Click to expand...
Click to collapse
Yea, init.usb.rc. Most custom recoveries would use the generic 0bb4 value. I think it's just the default number that the driver uses. Generic/Stock MTK should be 0e8d.

HypoTurtle said:
Most custom recoveries would use the generic 0bb4 value. I think it's just the default number that the driver uses. Generic/Stock MTK should be 0e8d.
Click to expand...
Click to collapse
0bb4 is HTC see http://developer.android.com/tools/device.html#VendorIds

Related

Is there any way to root MIcromax A52 ????

I bought a new Micromax A 52 mobile. I tried every method to root my phone. but i couldn't root it. Pls any tech-wizards help me.
I got same problem and tell me where to get custom roms for micromaxa52
Sent from my A52 using Tapatalk 2
Root micromax a 52
DOWNLOAD all the attachments that i have here. first of all connect your device to pc and install its drivers (it ll ask you to install by default)
1. put the adb_usb.ini file in .android folder in c:>users>(your name)>.android
2. install unlock root.exe.
3. run unlockroot.exe and click on root.
thats all.
attachments
here are the attachments----------
http://www.mediafire.com/?jrzuezl8s5t8k0s
UnlockRoot doesn't work with Micromax A52
This tool doesn't work with the A52. I've tried multiple ways to get the boot.img so that our mods here can assist with this but have not been successful in getting that file.
In case anyone gets this working please do post here as its really frustrating when you have apps on the phone but are unable to update them.
any one tried the method ... does it work
Rooting A52
I tried this method, doesnt work, plz will someone come up with a Rooting process that actually Roots this Damn phone
go to a ubuntu PC open terminal type "lsusb".
now connect your device via usb cable and type "lsusb" again.( without quotes)
Give me the output in both the cases.
I may have something for you guys very soon.
---------- Post added at 12:40 AM ---------- Previous post was at 12:30 AM ----------
if you dont have ubuntu pc try this on a 32 bit windows pc
http://downloads.yahoo.com/software/windows-web-tools-lsusb-s577074
download it and then run it. I think it will do the job. And then post the outputs here.
But i would recommend to use ubuntu pc. and lsusb command from ubuntu terminal.
Try it asap and share your outputs here.
Anyone with the outputs for ubuntu??
if you are on a windows Pc you may download cygwin (google it and install it)
then you can get the lsusb command working (I am not sure of this)....Somebody please try the device with ubuntu pc or anyother linux based operating system.
Regards,
imetal1
i am on window 7 waiting for some one to try on ubuntu
i hope someone can root this dam device
---------- Post added at 05:44 PM ---------- Previous post was at 05:36 PM ----------
please see if these links help in any way
http://androidforums.com/a52-all-things-root/578997-how-safely-root-micromax-a52.html#post4867029
http://androidforums.com/a52-all-things-root/578997-how-safely-root-micromax-a52.html#post4874745
http://androidforums.com/a52-all-things-root/578997-how-safely-root-micromax-a52.html#post4874749
@kartikoli
try to download cygwin from google and run "lsusb" before and after plugging in your device to the computer.
or try to install the "lsusb" from the link that i posted earlier.
and post the outputs....Do it asap.
bro i am too limited with command line knowledge and dont think i would be abl to accomplish the task properly
Done with ubuntu 11.04
{
"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"
}
Now what to do? The result is given by ubuntu...
Root micromax a52 mobile phone
steps to unroot your device :--
1. first of all install Android SDK from http://developer.android.com/sdk/index.html (make sure you have JDK installed)
->Follow all the steps there carefully and you will have a working SDK.
2. Remove all the android USB drivers installed on your device by the software in the attachment. -> http://www.2shared.com/file/mZdgGZG3/usbdeview.html
3. Now connect your device to PC and install Micromax's official drivers (you will get an auto-run prompt for the driver installation on connecting your device.
4. Now download the attachment here and put it into the C:/Users/(your_name)/.android.
-->.android folder you should get automatically NO NEED TO MAKE A NEW FOLDER...if the ".android" folder is not present...please download and install android SDK properly.
now put the file extracted from that zip into the folder ".android".
Restart your PC.
5. goto C:/Users/(your_name)/android-sdk/platform-tools. And open command prompt there.
6. And make sure that the mobile is attached to your PC via usb cable.
7. Type "adb devices" (without quotes).
8. your micromax device should be shown there. Now close the terminal.
9. Download and install this :--http://www.mediafire.com/?jrzuezl8s5t8k0s
10. click on Root option.
11. you are done!!!!!
NOTE: DOWNLOAD THIS adb_usb file only and not from any previous attachments.
LASTLY, Sorry for being late my internet connection was down
I have tried to make this guide as simple as possible. But still, should you need more information or there is any confusion do share. I would love to help you out.
Regards,
imetal1
Dude......i done kno whethr its working or not.......bt if it does......u r the 1st to crack it.....
tell me wat about the CWM for the phone.......need to backup the stock ROM....
Didn't Work.
Tried that too. It said failed to get shell root... Mate if you could tell me how i could give you my boot.img if that helps i will... else if there's a way to replace it with a unsecured boot.img do tell me.. In all other accounts There's been no bloody way to root this device..
To the contrary micromax ships half of its funbook rooted! And this bloody phone cannot be! God help me!
Did you followed the entire tutorial? If yes, then verify-->>
0. Enable USB debugging option on your device....(you will find it in settings/applications/development)
1. open command prompt in c:/users/ur_name/android-sdk/platform-tools/
2. type abd devices
do you see your device listed there????
tell me yes or no.
If no then make sure you have the SDK installed. do share your outputs.
NOTE : IF YOU HAD DISABLED YOUR USB DEBUGGING MODE EARLIER PLEASE TRY ONCE MORE BY ENABLING THE USB DEBUGGING MODE.
--------------------------------------------------------------------------------------------------------------------------------------------------
And about supplying the boot.img actually I am aware of commands that will help to get the boot,system,and recover.imgs out of the devices but for running those command we have to root the device first.....I am unaware of any such commands that extracts out these imgs from unrooted devices.
---------- Post added at 12:06 PM ---------- Previous post was at 11:45 AM ----------
if that also dosent works then try super-one click. (get it from google ) try diffrent versions of it and using different modes like ginger-break etc....its easy to use software.
I dont possess a52 so cant try myself but i ll do my best.
Regards,
imetal1
Nope. No Such luck.
Mate, Anyway i can have a quick chat with you? Um. Yeah debugging is on. And my device is listed. I may be a noob ova here but i'm dumb proof.
Anyway i tried this, superone click, gingerbreak and another batch file that restarts my phone 3 times...
uses a command
Code:
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot
adb shell rm /data/local.prop > nul
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
adb reboot
It fails at
Code:
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
command. Zerg rush fails. Gingerbreak just hangs... So since all of the readily available market programs fail i was thinking of another approach where i saw this guy who flashed ICS to his Zopo ZP100 (MediaTek MT6575). The similarity over here is the board. My board is also a MT6575. So i was wondering if flashin it with this would work... (jus askin) Or if there was a chance to port an existing pre-rooted 2.3.6 rom to this board by replacin d drivers or such.. I have no idea but i'm ready to experiment around. Forgive me if i sound dumb... Do reply. And if your in for a quick chat today temme. I'll give you my skype ID somehow..
Ash1794
imetal1 said:
Did you followed the entire tutorial? If yes, then verify-->>
0. Enable USB debugging option on your device....(you will find it in settings/applications/development)
1. open command prompt in c:/users/ur_name/android-sdk/platform-tools/
2. type abd devices
do you see your device listed there????
tell me yes or no.
If no then make sure you have the SDK installed. do share your outputs.
NOTE : IF YOU HAD DISABLED YOUR USB DEBUGGING MODE EARLIER PLEASE TRY ONCE MORE BY ENABLING THE USB DEBUGGING MODE.
--------------------------------------------------------------------------------------------------------------------------------------------------
And about supplying the boot.img actually I am aware of commands that will help to get the boot,system,and recover.imgs out of the devices but for running those command we have to root the device first.....I am unaware of any such commands that extracts out these imgs from unrooted devices.
---------- Post added at 12:06 PM ---------- Previous post was at 11:45 AM ----------
if that also dosent works then try super-one click. (get it from google ) try diffrent versions of it and using different modes like ginger-break etc....its easy to use software.
I dont possess a52 so cant try myself but i ll do my best.
Regards,
imetal1
Click to expand...
Click to collapse
​Open a command line terminal in your platform-tools.
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot
adb shell “echo \”ro.kernel.qemu=1\” > /data/local.prop”
adb reboot
adb shell id
//IF ID IS 0/root THEN CONTINUE, ELSE START OVER>
adb remount
adb push su /system/xbin/su
adb shell chown 0.0 /system/xbin/su
adb shell chmod 06755 /system/xbin/su
//UNDO EVERYTHING EXCEPT su
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.bak /data/local/tmp
adb reboot
If your device seems to bootloop, don’t worry, just keep inputting the commands.
If you get a permissions error on the call
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
then you may try
adb shell rm /data/local.prop
And then try the echo command again. This may be due to having rooted prior without cleaning up properly.
-----------------------------------------------------------------------------
If all the above fails download the attachments here and extract it to your platform-tools folder. And run .bat file that is created. May be this would help.
Actually, I dont have the device so please share any errors that you are getting...better still post entire output.
Regards,
imetal1

[Tool]i9505 Quick Flasher

Now next to the i9500 Quick Flasher there also is the i9505 Quick Flasher, just slight changes to make partitions match
{
"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"
}
Download:
www.broodplank.net/I9505-Quick-Flasher-1.0.zip
Created for a fail-safe flash operation of boot.img and recovery.img, all other partitions (currently only system) are experimental.
broodplank1337 said:
Now next to the i9500 Quick Flasher there also is the i9505 Quick Flasher, just slight changes to make partitions match
Download:
www.broodplank.net/I9505-Quick-Flasher-1.0.zip
Created for a fail-safe flash operation of boot.img and recovery.img, all other partitions (currently only system) are experimental.
Click to expand...
Click to collapse
Tried this, it cannot connect to my S4. Yes, I have debugging enabled, and yes my device is in mtp mode.
I get:
Running checks, please wait...
<<< I9505 USB Connection >>>
[ ] I9505 USB Connection
Your I9505 is not connected or unreachable! Please read the instructions for reference.
Snakefood said:
Tried this, it cannot connect to my S4. Yes, I have debugging enabled, and yes my device is in mtp mode.
I get:
Running checks, please wait...
<<< I9505 USB Connection >>>
[ ] I9505 USB Connection
Your I9505 is not connected or unreachable! Please read the instructions for reference.
Click to expand...
Click to collapse
I had some issues with usb as well when I was testing the tool out, but It was fixed after a while, its actually not the tool but the way of mounting usb on the i9505. I fixed it by replacing the adb.exe file with the latest one (which is also included in the zip tho). Can you please test for me if your able to get a normal adb shell? (open cmd window in the quickflasher dir and type "adb shell"), if it says device not found there is an issue with debugging mode. if not then you should test this and pls give me the info:
adb get-state (should return "device")
adb devices (should return a connected device)
If you get negative results here you should kill adb.exe (taskkill /f /im adb.exe for group kill) and try again.
If it does work pls enter:
adb root
adb remount
adb shell
and tel me what you see.
The usb mode is a struggle on the i9505.. I thought hey lets upgrade to CM so I will have mass storage mode.. but no way, only MTP and PTP... (I added the Mass storage option and forced it to be available on my private build, but it still doesn't work..)
Currently trying to find out how to permanently enable oldskool mass storage + adb.
broodplank1337 said:
I had some issues with usb as well when I was testing the tool out, but It was fixed after a while, its actually not the tool but the way of mounting usb on the i9505. I fixed it by replacing the adb.exe file with the latest one (which is also included in the zip tho). Can you please test for me if your able to get a normal adb shell? (open cmd window in the quickflasher dir and type "adb shell"), if it says device not found there is an issue with debugging mode. if not then you should test this and pls give me the info:
adb get-state (should return "device")
adb devices (should return a connected device)
If you get negative results here you should kill adb.exe (taskkill /f /im adb.exe for group kill) and try again.
If it does work pls enter:
adb root
adb remount
adb shell
and tel me what you see.
The usb mode is a struggle on the i9505.. I thought hey lets upgrade to CM so I will have mass storage mode.. but no way, only MTP and PTP... (I added the Mass storage option and forced it to be available on my private build, but it still doesn't work..)
Currently trying to find out how to permanently enable oldskool mass storage + adb.
Click to expand...
Click to collapse
My results:
C:\Windows\system32>cd \
C:\>cd s4 root
C:\S4 root>cd qflash
C:\S4 root\qflash>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: more than one device and emulator
C:\S4 root\qflash>adb get-state
unknown
C:\S4 root\qflash>adb devices
List of devices attached
12138fc0 device
emulator-5554 offline
C:\S4 root\qflash>adb root
error: more than one device and emulator
C:\S4 root\qflash>
Snakefood said:
My results:
C:\Windows\system32>cd \
C:\>cd s4 root
C:\S4 root>cd qflash
C:\S4 root\qflash>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: more than one device and emulator
C:\S4 root\qflash>adb get-state
unknown
C:\S4 root\qflash>adb devices
List of devices attached
12138fc0 device
emulator-5554 offline
C:\S4 root\qflash>adb root
error: more than one device and emulator
C:\S4 root\qflash>
Click to expand...
Click to collapse
ah so you have the emulator in there as well.. thats the problem. to bypass the emulator use:
adb -d
for example adb -d shell or adb -d get-state
do you have an AVD emulator running currently?
broodplank1337 said:
ah so you have the emulator in there as well.. thats the problem. to bypass the emulator use:
adb -d
for example adb -d shell or adb -d get-state
do you have an AVD emulator running currently?
Click to expand...
Click to collapse
What emulator do I have, I've only used the files in your download, as far as I know. Any way to check / remove?
Edit: I had bluestacks installed a while back, but uninstalled it, could this have left some crap behind after it?
Snakefood said:
What emulator do I have, I've only used the files in your download, as far as I know. Any way to check / remove?
Click to expand...
Click to collapse
Hmm the emulator that comes with android sdk, is afaik the only one who can correspond with adb, but it would be odd if you ran it all the time.
check taskmgr, and look for emulator.exe/java.exe, to be sure also kill adb.
You can check if there is an existing emulator if you start AVD manager (if you don't have android sdk at all then its really strange )
broodplank1337 said:
Hmm the emulator that comes with android sdk, is afaik the only one who can correspond with adb, but it would be odd if you ran it all the time.
check taskmgr, and look for emulator.exe/java.exe, to be sure also kill adb.
You can check if there is an existing emulator if you start AVD manager (if you don't have android sdk at all then its really strange )
Click to expand...
Click to collapse
I didn't have sdk installed; I installed it and ran avd manager, doesn't show any installed.
when I run adb -d shell I get [email protected]:/ $
Snakefood said:
I didn't have sdk installed; I installed it and ran avd manager, doesn't show any installed.
when I run adb -d shell I get [email protected]:/ $
Click to expand...
Click to collapse
Ok the output is good. ill add a function to the tool to force adb usb connection
for the meanwhile you can use:
(put boot.img in adb dir)
adb -d push boot.img /sdcard/boot.img
adb -d shell su -c 'dd if=/sdcard/boot.img of=/dev/block/mmcblk0p20'
adb -d shell reboot
broodplank1337 said:
Ok the output is good. ill add a function to the tool to force adb usb connection
for the meanwhile you can use:
(put boot.img in adb dir)
adb -d push boot.img /sdcard/boot.img
adb -d shell su -c 'dd if=/sdcard/boot.img of=/dev/block/mmcblk0p20'
adb -d shell reboot
Click to expand...
Click to collapse
Do I rename my recovery.img from cwm to boot.img for the above, or is this for a different process?
Snakefood said:
Do I rename my recovery.img from cwm to boot.img for the above, or is this for a different process?
Click to expand...
Click to collapse
boot.img = mmcblk0p20
recovery.img = mmcblk0p21
the name of the .img doesn't matter but the partition is important.
Ahh, looking at your image, this now makes sense, I can see the destination partition names as you describe..
Well have a go at this later, unless you plan to release an update later today?
Sent from my Nexus 7 using xda app-developers app
Edit: couldn't get this working, so I just flashed using odin. Thanks for trying to get resolved tho.
Odin is the tool for me, no need more than that.
broodplank1337 said:
ah so you have the emulator in there as well.. thats the problem. to bypass the emulator use:
adb -d
for example adb -d shell or adb -d get-state
do you have an AVD emulator running currently?
Click to expand...
Click to collapse
Hi brood,
just stumbled upon this thread and read about Snakefood's problem.
Although he worked around the error by using Odin I want to give you a hint regarding this specific problem:
he obviously has an adb device installed called emulator-5554 but which is offline. He already gave himself the correct answer:
"I had bluestacks installed a while back, but uninstalled it, could this have left some crap behind after it?"
My diagnose is: yes, BlueStacks definitely leaves a lot of crap behind and does NOT uninstall cleanly. I tested it once and I saw myself compelled to restore an older windows image which I made BEFORE I installed BlueStacks on my windows machine.
BTW: BlueStacks is an Android emulator for Windows but a piece of *%$~#!!! crap, but that's just my humble opinion.
And BlueStacks uses such an adb emulator device entry although I'm not sure if it was called like that. But BlueStacks is not the only Android emulator and most probably other programs of this kind create such an adb entry as well.
skywalker01 said:
Hi brood,
just stumbled upon this thread and read about Snakefood's problem.
Although he worked around the error by using Odin I want to give you a hint regarding this specific problem:
he obviously has an adb device installed called emulator-5554 but which is offline. He already gave himself the correct answer:
"I had bluestacks installed a while back, but uninstalled it, could this have left some crap behind after it?"
My diagnose is: yes, BlueStacks definitely leaves a lot of crap behind and does NOT uninstall cleanly. I tested it once and I saw myself compelled to restore an older windows image which I made BEFORE I installed BlueStacks on my windows machine.
BTW: BlueStacks is an Android emulator for Windows but a piece of *%$~#!!! crap, but that's just my humble opinion.
And BlueStacks uses such an adb emulator device entry although I'm not sure if it was called like that. But BlueStacks is not the only Android emulator and most probably other programs of this kind create such an adb entry as well.
Click to expand...
Click to collapse
Hi Skywalker.
Long time no see . Anyways, OT. I have installed BlueStacks once (in the alpha or beta phase I believe) and I don't remember much of it but I do remember that it was crap idd. Also that it leaves "traces" (if you call adb a trace xd, more like a fail uninstall ) is very lame.. and causing problems for people who are not 100% familiar with adb and its daemon.
The AVD Emulator from the SDK may lag a bit but atleast it doesn't interfere with adb :silly:
Great tool broodplank1337, well done mate this will save ppl from making stupid mistakes
dublinz said:
Great tool broodplank1337, well done mate this will save ppl from making stupid mistakes
Click to expand...
Click to collapse
Thanks ^^, I think that is true hehe, using 'dd' to flash images isn't for the absolute beginner idd ;p
Hi guys,
If you need me to assist more with ahh testing just let me know. Is there an uninstaller to remove what bluestacks left behind, or is the Windows disc the only definite uninstaller
Sent from my GT-I9505 using xda app-developers app
Snakefood said:
Hi guys,
If you need me to assist more with ahh testing just let me know. Is there an uninstaller to remove what bluestacks left behind, or is the Windows disc the only definite uninstaller
Sent from my GT-I9505 using xda app-developers app
Click to expand...
Click to collapse
You should first look in msconfig (start > run > msconfig) at the startup tab and look if there is any startup item from bluestacks.
If there is nothing there look in services.msc (start > run > services.msc) and check for any blue stacks service, and if there is any, disable it.
Next to that you can also use HijackThis (http://sourceforge.net/projects/hjt/) to find startup items. hope it helps
Hey Brood,
See you're doing great work here on the S4 section.:good:
I'm missing your input in the S+ section unfortunatly:crying:

Rooting Trekstor Surftab Ventos 10.1 from Linux ADB if the device is not recognized

Hi friends,
a short tutorial for rooting Ventos 10.1 from simple user Linux Ubuntu, when ADB doesn't recognise the device using Root_with_Restore_by_Bin4ry_v33 from this thread.
Disclaimer: The following rooting guides take software from third-party sources and are not products of danjde. I cannot be held responsible for any effects on your device resulting from this rooting guides. Please attempt only after reading through and understanding the guide(s) and proceed with caution.
ATTENTION: TABLET BATTERY MUST BE CHARGED!!
ALL FROM LINUX CONSOLE/TERMINAL WITHOUT EXTERNAL APPLICATIONS
1) edit from super user editor and add the correct USB Ids to /var/lib/usbutils/usb.ids:
2207 RocketChip
now lsusb should show the device properly
lsusb
Bus 001 Device 012: ID 2207:0010 RocketChip
2) add udev rule in /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
3) restart udev service
service udev reload
4) optionally add vendor id in ~/.android/adb_usb.ini or in the same adb location
0x2207
5) extract the content of Root_with_Restore_by_Bin4ry_v33 and give executions permission to all fro semplicity (compessing whith zip have lost attributes)
chmod -R 755 "extracted-folder"
6) cd into the utility "Root_with_Restore_by_Bin4ry" directory
cd stuff
7) restart adb server
./adb kill-server
./adb start-server
8) connect Ventos and enable usb debugging.
9) now adb devices shows the device.
./adb devices
224DDD88E8722FA848300A20B9F8XXXX device
10) run as normal user
./RunMe.sh
[IMPORTANT: if you obtain on 64bit linux machine: "/stuff/adb: error while loading shared libraries: libncurses.so.5..."
install lib32ncurses5: apt-get install lib32ncurses5 and try again]
11) select normal mode
12) wait until 5 minus
finish!
tested :good:
Dear Danjde,
I habe a Trekstor Surftab Ventos 10.1 that I would like To root.
It appears, however, hat there exist At least 2 Version oft the tablet.
In Android settings it is called ST10216-2A.
Can you confirm your Version?
Also, is it possible To root the device fron a local shell via the same commands AS in the *.SH file?
Thank you so much!
Andreas
Hi der.einstein,
I confirm that two are the ventos 10.1 versions,
mine is the second, and from my research the method shown applies to both models.
For the second question the answer is: no
ciao!

[Android 11] [GENERIC] [Tried and Tested on OP7T] [ROOT/TWRP/CWM/LOS-R] How to extract partitions as img containers.

Spoiler: Introduction
After recently facing trouble rooting my OnePlus 7T due to obsolete outdated guides, This thread aims to help anyone facing the same problems as me.
Prerequisites : ​
Platform Tools : Android Debug Bridge version 1.0.41 - 31.0.2-7242960 recommended. [DOWNLOAD HERE]
Your device's drivers for the corresponding Operating System, here, OnePlus' USB Drivers. [DOWNLOAD HERE AFH][DOWNLOAD HERE EXTERNAL]
A little information about adb, fastboot, recoveries and partitions.
FOR UNROOTED USERS ONLY : to *DUMP* the partition, you will need superuser access, in order to emulate root access we will temporarily boot in a custom recovery. [DOWNLOAD HERE FOR 1+7T] [DOWNLOAD FOR OTHER DEVICES]
WARNING : I AM NOT RESPONSIBLE FOR YOUR ACTIONS. FOLLOW THIS GUIDE AT YOUR OWN RISK. JUST BECAUSE IT WORKS FOR ME DOESNT MEAN IT WORKS FOR YOU. USE YOUR HEAD.
Procedure & Explanation : ​
Setting up ADB​
Go to Settings > About Phone & Tap on Build Number Repeatedly 5-7 times. A toast message should pop up informing you about the developer status unlock on your phone.
Find Developer Options > USB Debugging in the settings app and Enable it by turning on the switch next to it.
Extract platform-tools to any desired location on your computer, open the directory containing the binaries and start a PRIVILEGED (run as admin/root) Terminal/CMD/Powershell in this location. OR. Alternatively, you can also navigate to the directory using CLI commands if you see fit.
Connect your Android device to your workstation using a USB cable.
Run ./adb[.exe] devices. (.exe is for windows only, please check the executable's name for this command). A popup should open on your device asking you to allow USB Debugging, tick "Always Allow" and allow the USB Debugging request. A device should popup on your workstation terminal thus indicating that ADB has connected to your device successsfully. [REFER SCREENSHOTS]
{
"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"
}
Finding the Corresponding Partition to dump.​
In order to extract any or all of the above partitions, we must first discover the corresponding memory addresses symlinked to the partitions. This, is usually the most difficult part, "Finding the partitions", as different devices tend to have different file structures and can also be updated via OTA updates. The OnePlus 7T, being an A/B Device launching with Android 10, Dynamic Partitions have been implemented.
For devices launching with Android 10, create a partition called super. The super partition handles A/B slots internally, so A/B devices don't need separate super_a and super_b partitions. All read-only AOSP partitions that aren't used by the bootloader must be dynamic and must be removed from the GUID Partition Table (GPT). Vendor-specific partitions don't have to be dynamic and may be placed in the GPT. (Read More : source.android.com)​
Click to expand...
Click to collapse
​Thus, the following partitions are included in the OnePlus 7T :​
For the sake of convenience, I will illustrate how to dump the boot_a/boot_b partition, any other partitions can be dumped similarly following the same procedure.
The system partition table on Android 11 is a plethora of Symbolic Links that can be found in the by-name directory generally under \dev\block. Since the placement of this directory might change according to the subject device, a generalized method to discover the location is using the find command. Enter the following commands to find the partition.
Code:
./adb[.exe] shell
Code:
find /dev -name 'by-name' 2>/dev/null
You may or may not get multiple results, in theory, any of these directories should contain what we're looking for, I prefer /dev/block/by-name since it is the exact container that defines the symbolic links to these partitions. Next, you will have to list the files in the directory in order to get each and every symlink sorted by its name. To do so, use ls -a <path_to_by-name>. In this case :
Code:
ls -a /dev/block/by-name
This lists all the partitions in the file-system ranging from modem drivers to kernel specific partitions, hopefully, this contains what you're looking for, as shown in the screenshot above, the A/B device OnePlus 7T has boot_a and boot_b boot partitions. For a widespread explanation, I'll be dumping them both. To do so, we must find the actual memory addresses these symbolic links lead to, to do this, ls -l <path_to_symlink> is to be used. In this case :
Code:
ls -l /dev/block/by-name/boot_*
"boot_*" matches both boot_a and boot_b, thus making it simpler for us.
Click to expand...
Click to collapse
As shown in the screenshot, this will list the corresponding directories these symlinks lead to, boot_a is stored under /dev/block/sde11 and boot_b is stored under /dev/block/sde38. Now that we've discovered the location of the data we need to dump, we can proceed to dumping the contents of these directories.
Dumping the required partitions as .img files​
THIS PART WILL REQUIRE ROOT ACCESS, NO ROOT? KEEP READING​
Click to expand...
Click to collapse
For ROOTED users :​
You're in luck, its wayy easier for you. Firstly, to gain superuser access in adb shell, type su, hit enter and grant superuser access on whatever root provider you're using, probably Magisk. The shell echo character should change to a # thus indicating superuser access.
To dump the partitions, the dd if=<path_to_input_block> of=</sdcard/partition_name.img> is to be used, in this case :
Code:
dd if=/dev/block/sde11 of=/sdcard/boot_a.img && dd if=/dev/block/sde38 of=/sdcard/boot_b.img
Commands in linux can be chained together using the && operator.
Click to expand...
Click to collapse
As shown, this dumped the boot images in my phone's internal storage. Now these files can be used as intended. Cheers.
For UNrooted users :​
In order to gain elevated privileges to access the partitions, we will use the fastboot binary to temporarily boot to a custom recovery and have privilege escalation. So first, download the recovery for your device, unzip any archives and find an img file, copy/move this file to the same directory as the adb binaries and then restart the command line shell window as you did before, keep in mind to be in the same directory on your shell.
To boot to the downloaded recovery, the phone must be put on fastboot mode, ensure OEM/Bootloader Unlocking is turned on in Developer Options and then use ./adb[.exe] reboot fastboot to boot into fastboot mode.
Once in fastboot, type ./fastboot[.exe] devices and your device should show up in a list similar to the one showed before.
Next, use ./fastboot[.exe] boot <your_recovery.img> to boot into the desired recovery, in my case :
Code:
./fastboot.exe boot twrp-3.4.0-2-hotdog-unified-mauronofrio.img
Once in recovery mode, start an adb shell using ./adb[.exe] shell and follow the same steps as mentioned for rooted users, once you exit recovery mode, your phone will restore it's stock recovery.
That was your cue to read the section just above this one, Cheers.
I'll edit the guide as necessary. Based on the feedback received.

How To Guide How to prepare smartwatch for advanced functions

What you are doing with the following steps is enabling the watch to receive instructions via ADB. The ADB stands for Android Debug Bridge. As its name suggests, it is a tool through which the command console of our computer will act as a bridge between it and the watch. Thanks to it, we can send commands to the phone, such as install applications by sideload, take screenshots, etc. Below I list the most significant ones to apply and useful to apply to a Wear OS.
On your computer, download and install the ADB tools, such as ADB & Fastboot++ or Tiny ADB and Fasboot.
On the watch, go to Settings > system > About and repeatedly tap 'Build number' until You see a message that says 'You are now a developer'. Then go to Settings > developer options and enable 'ADB debugging' and 'Debugging over Wi-Fi'.
Make sure both your watch and phone are connected to the same Wi-Fi network, follow the considerations below if this is not the case.
How to maintain Wi-Fi network on the watch
There are times when Wi-Fi connection from the watch to the phone/PC is not maintained, and connects and disconnects seemingly at random, in reality this is not the case. Wear OS uses a communication procedure with the phone that gives priority to Bluetooth over Wi-Fi so that when the 2 protocols are enabled and Bluetooth has a link with the phone, it only connects via Bluetooth and disables Wi-Fi. The reason? To save battery consumption, Wi-Fi always consumes more than Bluetooth. This way, it connects to the phone via Bluetooth and receives internet data through the phone.
I know 2 ways to ensure Wi-Fi connection:
Momentarily disable the Bluetooth of the watch, it activates in a few seconds Wi-Fi signal, if not activated go to Settings > Connectivity > Wifi, and click on the network to force this.
Another method is to activate the option "Enable Wi-Fi automatically when charging" in developer options and plug the watch to the charger.
{
"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"
}
Important "Allow Debugging"
When you first connect your watch via apps like Wear Installer, Bugjaeger, Wear OS Tools, or even with ADB commands, the watch will show a notification asking "Allow debugging?", select "Always allow from this computer". If you do not allow debugging you will not be able to connect.
If the notification is not displayed, go to Settings > Developer Options, and select "Revoke debug authorizations" and try to connect again.
Useful ADB commands
ADB is a tool that allows us to interact with our watch in a more advanced way. It should be clarified that this interaction is done via command line. Usually, these commands are executed from a Windows or Linux computer; or a Mac with MacOS. ADB commands can be used for many tasks. These include resetting the watch, manually installing applications, extracting files, etc.
I recommend this page and this where much more information about the parameters of each adb command is provided.
Code:
adb reboot --> Reboot
adb reboot recovery --> Reboot and boot to recovery mode
adb reboot-boot-bootloader --> Reboot and boot in bootloader mode
Code:
adb connect <Watch_ip> --> Connects the device via Wi-Fi
adb disconnect --> Disconnect device
adb devices --> Show connected devices
adb shell --> Execute adb commands in a terminal
Code:
adb shell getprop ro.build.version.release --> Displays Android Version
adb shell getprop ro.serialno --> Displays Serial Number
adb shell dumpsys battery --> Displays battery status
Code:
adb push file.png /sdcard/file.png --> Copy files from the computer to the watch
adb pull /sdcard/file.png --> Copy files from watch to computer
Code:
adb shell ls -a /mnt/sdcard --> Show list of folders and files, including hidden files
adb shell ls -d /mnt/sdcard --> Displays only list of folders
Code:
adb install <app_name.apk> --> Install applications
adb install -r <app_name.apk> --> Reinstall (update) applications
adb uninstall <app_name.apk> --> Uninstall apps
Code:
adb shell pm list packages mobvoi | sort --> List installed applications in alphabetical order and only with the word "mobvoi".
adb shell pm list packages -d --> list disabled applications
adb shell pm list packages -e --> list enabled applications
adb shell pm list packages -3 --> list of installed third-party applications
adb shell pm list packages -s --> list system applications list
adb shell pm list packages -i --> list with source of installation of each package
adb shell pm list packages -f --> List of applications with path
Code:
adb shell pm enable <package_name> --> Enable app
adb shell pm disable-user --user 0 <package_name> --> Disable app
adb shell pm clear <package_name> --> Clear all data associated with a package
adb shell pm reset-permissions -p <package_name> --> Reset all permissions of an app
adb shell pm grant <package_name> <permission_name> --> Grant a permission to an app.
adb shell pm revoke <package_name> <permission_name> --> Revoke a permission of an app.
Code:
adb shell am start -a android.intent.action.CALL -d tel:+34666123456 --> Make a call.
adb shell am start -a android.intent.action.SENDTO -d sms:+34666123456 --en sms_body "Test message" --ez exit_on_sent true --> Send an SMS message.
.
Code:
adb shell wm density 288 --> Adjust screen density.
adb shell wm density reset --> Restores default density
Code:
adb shell screencap -p /sdcard/my_screenshot.png --> Take screenshot
adb shell screenrecord --time-limit 20 --output-format raw-frames --verbose /sdcard/my_video.raw[ --> Records the activity on screen for 20" in RAW format
Code:
adb logcat -d > bugerror.txt --> Saves a logcat to a file on the local device
.

Categories

Resources