Samsung Android Repair EFS / IMEI Repair / Baseband (XXXX) - Galaxy S III Mini Q&A, Help & Troubleshooting

Samsung Android ] Repair EFS / IMEI Repair WITHOUT BOX
PROBLEM:
Quote:
•Fake IMEI (usually 004999010640000)
•Unable to download apps from the market
•Unable to unlock your SIM card using your PIN
•Weird apps are downloading automatically from the market
•Blinking SIM card icon on the top tray… ETC
let's try to solve, but NOT 100% working, i've based only on my GT-P1000.
00 = first root the phone, download ROOT EXPLORER + ADB
01 = extract "ADB_2.0.0.0.rar" to a FOLDER [ c:\adbtools ]
02 = at the command prompt, c:\adbtools\
03 = type "adb install rootexplorer.apk" and enter, after install
04 = open root explorer, open efs folder
05 = if you can find ".nv_data.bak" then it's possible to RESTORE [ if NONE THEN LEAVE THIS PROCEDURE ]
06 = now, you still need to backup nv_data.bin & .nv_data.bak or folder EFS BEFORE DO ANYTHING
[ IF YOU HAVE PREVIOUS BACKUP OF NV_DATA.BIN THEN PROCEED TO 14 ]
07 = at command prompt [ C:\adbtools\ ], type adb shell
08 = type su
09 = type cp /efs/nv_data.bin /sdcard/
10 = type cp /efs/.nv_data.bak /sdcard/
11 = type exit & exit
12 = at root explorer, tap sdcard, long tap nv_data.bin, tap rename [ add .BAK ]
13 = long tap .nv_data.bak, tap rename, type nv_data.bin
14 = at command prompt [ C:\adbtools\ ], type adb shell
15 = type su
16 = type cp /sdcard/nv_data.bin
17 = type rm -rf /efs/nv_data.bin.md5
18 = type exit & exit
19 = REBOOT YOUR PHONE
Quote:
**The md5 hash/signature (nv_data.bin.md5) is removed (rm) as the system will generate a new one.
**Most likely your SIM code won’t work after this and you won’t be able to log into the phone**
Pop off your SIM card, boot your phone and execute the following commands to change ownership of the file under ADB
= at command prompt [ C:\adbtools\ ], type adb shell
= type su
= type chown 1001:1001 /efs/nv_data.bin
WARNING ! ! !
I take no responsibility to any damage caused by the methods written here,
DO AT YOUR OWN RISK ! ! !
REMINDER ! ! !
ALWAYS BACKUP YOUR EFS FOLDER
BEFORE DO ANYTHING ELSE
http://gsmforum7.blogspot.com.ar/2012/04/samsung-android-repair-efs-imei-repair.html?m=1

Thanks for sharing! You provided valuable information to read in this post. You have come to the right place. Here at Phone Heroes we specialize in a Apple and Samsung mobile devices.
iPhone 7 & 8 Screen Repair
iPhone 8 battery replacement UK
iPhone X screen replacement UK
iPhone screen repairs
screen repairs apple
screen repairs Samsung
battery iphone repair
apple phones repair

reginusa said:
Thanks for sharing! You provided valuable information to read in this post. You have come to the right place. Here at CM Communicaions we specialize in a Apple and Samsung mobile devices.
ipad repairs in Buckinghamshire
oppo mobile repairing
mac repairs high wycombe
ipad screen repairs high wycombe
laptop repair in high wycombe
iphone 7 screen replacement uk
apple iphone screen repair
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"
}
jony1512 said:
Samsung Android ] Repair EFS / IMEI Repair WITHOUT BOX
PROBLEM:
Quote:
•Fake IMEI (usually 004999010640000)
•Unable to download apps from the market
•Unable to unlock your SIM card using your PIN
•Weird apps are downloading automatically from the market
•Blinking SIM card icon on the top tray… ETC
let's try to solve, but NOT 100% working, i've based only on my GT-P1000.
00 = first root the phone, download ROOT EXPLORER + ADB
01 = extract "ADB_2.0.0.0.rar" to a FOLDER [ c:\adbtools ]
02 = at the command prompt, c:\adbtools\
03 = type "adb install rootexplorer.apk" and enter, after install
04 = open root explorer, open efs folder
05 = if you can find ".nv_data.bak" then it's possible to RESTORE [ if NONE THEN LEAVE THIS PROCEDURE ]
06 = now, you still need to backup nv_data.bin & .nv_data.bak or folder EFS BEFORE DO ANYTHING
[ IF YOU HAVE PREVIOUS BACKUP OF NV_DATA.BIN THEN PROCEED TO 14 ]
07 = at command prompt [ C:\adbtools\ ], type adb shell
08 = type su
09 = type cp /efs/nv_data.bin /sdcard/
10 = type cp /efs/.nv_data.bak /sdcard/
11 = type exit & exit
12 = at root explorer, tap sdcard, long tap nv_data.bin, tap rename [ add .BAK ]
13 = long tap .nv_data.bak, tap rename, type nv_data.bin
14 = at command prompt [ C:\adbtools\ ], type adb shell
15 = type su
16 = type cp /sdcard/nv_data.bin
17 = type rm -rf /efs/nv_data.bin.md5
18 = type exit & exit
19 = REBOOT YOUR PHONE
Quote:
**The md5 hash/signature (nv_data.bin.md5) is removed (rm) as the system will generate a new one.
**Most likely your SIM code won’t work after this and you won’t be able to log into the phone**
Pop off your SIM card, boot your phone and execute the following commands to change ownership of the file under ADB
= at command prompt [ C:\adbtools\ ], type adb shell
= type su
= type chown 1001:1001 /efs/nv_data.bin
WARNING ! ! !
I take no responsibility to any damage caused by the methods written here,
DO AT YOUR OWN RISK ! ! !
REMINDER ! ! !
ALWAYS BACKUP YOUR EFS FOLDER
BEFORE DO ANYTHING ELSE
http://gsmforum7.blogspot.com.ar/2012/04/samsung-android-repair-efs-imei-repair.html?m=1
Click to expand...
Click to collapse
reginusa said:
Thanks for sharing! You provided valuable information to read in this post. You have come to the right place. Here at Phone Heroes we specialize in a Apple and Samsung mobile devices.
iPhone 7 & 8 Screen Repair
iPhone 8 battery replacement UK
iPhone X screen replacement UK
iPhone screen repairs
screen repairs apple
screen repairs Samsung
battery iphone repair
apple phones repair
Click to expand...
Click to collapse

Related

"[TUT]Rooting,Custom boot.img & recovery.img for newbies

Firstly i did not do this guide. it took it from this forum and just compile so that newbie like me can easily root their tattoo.....
ROOTING TATTOO
Download the ZIP file attached to this post. Extract the files to a safe location - perhaps C:\Tattoo ?
Now, you'll need adb for windows. You can get it from COBURN website's server here: ADB for windows.
Make sure your device is in USB Debug Mode (Settings > Applications > Development).
Extract all the files in the adb4win zip file to your C:\Tattoo folder.
Now, go to Command Prompt. In XP, it's under System Tools in Accessories. In Vista/7, it'll be under accessories.
Do the following at the command line:
C:\Users\Coburn> cd C:\Tattoo
Then you will get this C:\Tattoo
Next type in this:
C:\Tattoo> adb-windows shell "mkdir /data/local/bin" (with the quotes!).
If you get a error (like mkdir failed, file/folder exists), this is fine!
just means that the folder already exists in your phone
Now, run this command:
C:\Tattoo> adb-windows push m7 /data/local/bin/m7
this will just take a few seconds
Run this:
C:\Tattoo> adb-windows shell "cd /data/local/bin && chmod 755 ./m7" (with the quotes!)
This allows you to run the sucker. Looks like something nothing happen but it did something.
C:\Tattoo> adb-windows shell
This will dump you at a "$" shell. do the following:
C:\Tattoo> adb-windows shell
$ cd /data/local/bin
$ while ./m7 ; do : ; done
...lotsa text will flow down your screen. This is normal.
Soon, you'll be greeted with this:
#
This is the root prompt! If you get stuff like this:
# usage: reboot ...
usage: reboot ....
usage: reboot ...
Just keep your cool, press enter and the # will pop again. This is due the exploit spawning reboots to gain the shell.
Next type in this:
export LD_LIBRARY_PATH=/system/lib
export PATH=/system/bin
Check if u have root, type:
id
you will get
# id
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
The uid=0(root) is important, so call your phone is root.
REMOUNT PARTITION (SU)
Now you need to install su. Exit your root shell (via CTRL+C) and download this su.zip and extract it to C:\Tattoo.
DO NOT EXIT THE COMMAND PROMPT WINDOW.
in your command prompt window, do this:
C:\Tattoo> adb-windows push su /data/local/bin/su
Then break out a shell...
C:\Tattoo> adb-windows shell
at the $ prompt, enter:
$ chmod 755 /data/local/bin/su
$ cd /data/local/bin/
$ while 'true' ; do ./m7 ; done
It will change from $ to #
Type in this:
export LD_LIBRARY_PATH=/system/lib
export PATH=/system/bin
Next type in this:
# chown root.root /data/local/bin/su
# chmod 4755 /data/local/bin/su
# mount -o rw,remount /dev/block/mtdblock5 /data
# mount -o rw,remount /dev/block/mtdblock3 /system
After that, you can exit out of the root shell, and try a normal shell and this:
$ /data/local/bin/su
...which should make you get a nice # prompt.
Custom Boot.img:
Boot img v2:http://forum.xda-developers.com/show...0&postcount=38
Tattoo-hack.ko:http://forum.xda-developers.com/atta...2&d=1266670581
Download this flash_image:http://forum.xda-developers.com/attachment.php?attachmentid=287463&d=1267386499
adb push flash_image ./data/local/bin/flash_image
adb push Mainfram3.boot.02.img /sdcard/Mainfram3.boot.02.img
adb push tattoo-hack.ko ./data/local/bin/tattoo-hack.ko
c:\tattoo>adb shell
$ su
su
su: access granted, courtesy of www.magicandroidapps.com
# insmod /data/local/bin/tattoo-hack.ko
#mount -o rw,remount /dev/block/mtdblock5 /data
#mount -o rw,remount /dev/block/mtdblock3 /system
#chmod 755 /data/local/bin/flash_image
#/data/local/bin/flash_image boot /sdcard/Mainfram3.boot.02.img
Cutom Recovery Img:
After custom boot.img
adb push TCRI.alpha.img /sdcard/TCRI.alpha.img
c:\tattoo>adb shell
#/data/local/bin/flash_image recovery /sdcard/TCRI.alpha.img
once again i did not make the guide...i only compile it from different thread and put them as 1....tats all....thanks to all the devs that came up with the guide.....
hi!
will be possible flash official ROM made HTC after rooting proces?
I'm totaly new to this android applications
correct me if im wrong...you can always flash official rom frm htc for that paticular phone model....whether root or not....
the flash image no longer exists...
@Bikers
Download here:http://forum.xda-developers.com/attachment.php?attachmentid=287463&d=1267386499
@shazarul
Correct the link in the post.
c:\tattoo>adb shell
$ su
su
su: access granted, courtesy of www.magicandroidapps.com
i get permision denied! I know there is somewhere else a thread like this but i jus t can't find it...
try it with root 1 click by maverixx
have change the flash_image link..... biker i think u have to root it again???/ i think should b the easy way out....
just flashed custom boot img using this tutorial, thanks !
Thanks a lot, but I have a problem.
When I get to:
Code:
adb push Mainfram3.boot.02.img /sdcard/Mainfram3.boot.02.img
I get this:
{
"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 had the same problem with http://forum.xda-developers.com/showthread.php?t=644279&page=6 1 click root script when pushing to /sdcard...
have you tried to put it directly in your sd card? Did you putted your phone in MSSync at the usb options?
try to unmount sdcard from the phone, with the command in the notification bar of the tattoo
i am having this error while flashing custom recovery image ...
# /data/local/bin/flash_image boot /sdcard/Mainfram3.boot.02.img
/data/local/bin/flash_image boot /sdcard/Mainfram3.boot.02.img
error opening /sdcard/Mainfram3.boot.02.img: No such file or directory
#
Click to expand...
Click to collapse
where am i getting it wrong ??? till that i have no issues in following tutorial...
please help me...
chtamina said:
try to unmount sdcard from the phone, with the command in the notification bar of the tattoo
Click to expand...
Click to collapse
this suggestion solved my problem.... thanks chtamina..... you made my day...

Boot Animation

After a little looking around, I found a great boot animation by another guy from the xda forums, and I modded it a bit for the G Tablet.
Here's a preview:
(All credit goes to ASimmons for making this AWESOME animation.)
{
"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"
}
To install it,
adb push bootanimation.zip /logodata
Click to expand...
Click to collapse
Use 7zip to extract the zip file.
I love this! Can I install it without adb? I haven't gotten it working properly on my XP x64 machine.
Mine boots up so quickly, I never get to see the entire automation. Thanks!
I used RootExplorer to copy this over, since I don't have the SDK stuff loaded.
Thanks for the animation but it does not seem to work with VEGAn Beta 4 ROM image I recently loaded. I see it is the same size but cant get it to show - it just shows the normal VEGAn Android animation. Is there something I am doing wrong. Here is output of my what is in my logodata directory:
# ls -l
-rw-rw-rw- root root 16610683 2010-12-29 09:33 bootanimation.zip
-rwxr--r-- adb compass 2359350 2010-09-28 02:43 boot2.bmp
drw-rw-rw- root root 2010-12-30 12:38 lost+found
-rwxr--r-- adb compass 620888 2009-07-14 04:52 Tulips.jpg
Is it a permissions thing - I even set it to executable with chmod and still no different animation.
Anagin thanks for the animation - is there something I am doing wrong?
powerx86 said:
Thanks for the animation but it does not seem to work with VEGAn Beta 4 ROM image I recently loaded. I see it is the same size but cant get it to show - it just shows the normal VEGAn Android animation. Is there something I am doing wrong. Here is output of my what is in my logodata directory:
# ls -l
-rw-rw-rw- root root 16610683 2010-12-29 09:33 bootanimation.zip
-rwxr--r-- adb compass 2359350 2010-09-28 02:43 boot2.bmp
drw-rw-rw- root root 2010-12-30 12:38 lost+found
-rwxr--r-- adb compass 620888 2009-07-14 04:52 Tulips.jpg
Is it a permissions thing - I even set it to executable with chmod and still no different animation.
Anagin thanks for the animation - is there something I am doing wrong?
Click to expand...
Click to collapse
I have heard of some people saying that they find the bootanimation under a media directory instead of the logodata, is it possible that for the Vegan ROM that this zip must be put somewhere else?
Take a look at this post, perhaps it will help?
http://forum.xda-developers.com/showthread.php?t=878143&highlight=bootanimation
It didn't work the first time I install because androzip extracted damage zip file. I had to unzip it from my computer then transfer it over to the tablet. Use root explorer to copy it over to system/media.
If you get time can you post a step By step for us total newbs. I assume I just unzip and transfer via a USB cable but that's about it. (wouldnt insoluble exactly where to abstract it and if any other steps are involved)
I logged back on to the shell and did not see any other bootanimation other an executable bootanimation in the following folder:
/system/bin/
So I looked in the /system/media folder and no bootanimation.zip just the following:
# pwd
/system/media
# ls -l
drwxr-xr-x root root 2010-12-29 21:26 audio
I copied the bootanimation.zip file to that directory after reading multiple posts about the file being located in /system/media.
Here is the link that directs you to do the same.
http://forum.xda-developers.com/show...=bootanimation
I finally got this to work and at least for the VEGAn 4, the bootanimation.zip must reside in the /system/media folder.
Basic instructions are as follows and done in Linux:
Requirement: a way to copy data to /system folder (like adb tool). Here are the steps I used.
a) Enter the Android Shell using: ./adb shell
b) At the # prompt enter: mount
c) You should see the following as a READ-Only
/dev/block/mtdblock3 /system yaffs2 ro,relatime 0 0
d) Now you need to make this Read/Write to do this use the following commands:
mount -o rw,remount -t ext2 /dev/block/mtdblock3 /system
e) validate the mount is now read/write by re-executing the mount command - enter the following:
mount
f) You should see the following if everything worked to make this folder read/write:
/dev/block/mtdblock3 /system yaffs2 rw,relatime 0 0
g) Now lets exit the shell type the following:
exit
h) Now push the bootanimation.zip to the android device using the following command:
./adb push bootanimation.zip /system/media
i) Now lets reboot the Android device - execute the following:
./adb reboot
This worked and I have tried a few others. Thanks to all the tips to help me figure this out!
>>>>>>>>>>>>>>>>>>>>>>>>: (
>>>>>>>>>>>>>>>>:V
i wanted to use a gif that is around 40 mb 35 seconds long is that something that is possible to do or will i have to shorten it
is it possible to even use a gif
Is there anyway to have sound go along with the bootanimation?
Some phone bootani's have sound -- but I've never been able to get it to work properly after changing the stock...
Thank you for this boot animation. I have been presented with so many choices for customization, that it is hard to choose. I love this little tablet.

[CF3D] Help please! Couldn't find a solution..I'm stuck!!

Okay I've done enough research before deciding to make this post but couldn't find any solution.
Situation is I tried to install CF3D using CWM and now I'm stuck at the black boot screen that says GT N7000.
I tried to log into ADB shell and execute /system/lib/cf3d_uninstall.sh since that is the general solution but it seems I do not have the file there. Can someone give me the sh file if they have or tell me how to remove the drivers manualls through the ADB shell so that I can boot back normally. I did not backup before doing this..and I guess today isn't my day! Please help me remove the drivers! It's a little urgent.
I am new to the ADB shell concept and these are the commands I executed after connecting:
adb devices
adb shell
su
ls -d */
cd system
cd lib
sudo cf3d_uninstall.sh
Here it says that the file isn't found.
Edit: Nevermind.. Restoring back to CM9 for tonight...
Click to expand...
Click to collapse
tried these ?
sh system/lib
sh /cf3d_uninstall.sh
Should I just execute the contents of this shellscript via ADB? I found these on Google Code
Code:
#!/system/bin/sh
mount -o rw -o remount /dev/block/mtdblock4 /system
stop
cat /system/lib/libGLESv1_CM_ORG_CF3D.so > /system/lib/libGLESv1_CM.so
chown 1000.1000 /system/lib/libGLESv1_CM.so
chown 1000:1000 /system/lib/libGLESv1_CM.so
chown system.system /system/lib/libGLESv1_CM.so
chown system:system /system/lib/libGLESv1_CM.so
chmod 644 /system/lib/libGLESv1_CM.so
cat /system/lib/libGLESv2_ORG_CF3D.so > /system/lib/libGLESv2.so
chown 1000.1000 /system/lib/libGLESv2.so
chown 1000:1000 /system/lib/libGLESv2.so
chown system.system /system/lib/libGLESv2.so
chown system:system /system/lib/libGLESv2.so
chmod 644 /system/lib/libGLESv2.so
#rm /system/lib/libGLESv1_CM_ORG_CF3D.so
#rm /system/lib/libGLESv2_ORG_CF3D.so
rm /system/lib/cf3d_uninstall.sh
rm /system/lib/cf3d_sh
reboot -f
reboot
reboot normal
toolbox reboot
busybox reboot -f
busybox reboot
busybox reboot normal
nokiamodeln91 said:
tried these ?
sh system/lib
sh /cf3d_uninstall.sh
Click to expand...
Click to collapse
Heya it says "Can't open 'cf3d_uninstall.sh' "
What Rom are you on?
nokiamodeln91 said:
What Rom are you on?
Click to expand...
Click to collapse
Ultimate N7000 XXLSC JellyBean 4.1.2 v5.1 ... And I really don't wanna reflash :/
Pl first try to locate where the cf3d files are and then run the command with right paths
[RESOLVED] CF3D Uninstall after boot loop
agvulcan said:
Okay I've done enough research before deciding to make this post but couldn't find any solution.
Situation is I tried to install CF3D using CWM and now I'm stuck at the black boot screen that says GT N7000.
I tried to log into ADB shell and execute /system/lib/cf3d_uninstall.sh since that is the general solution but it seems I do not have the file there. Can someone give me the sh file if they have or tell me how to remove the drivers manualls through the ADB shell so that I can boot back normally. I did not backup before doing this..and I guess today isn't my day! Please help me remove the drivers! It's a little urgent.
I am new to the ADB shell concept and these are the commands I executed after connecting:
adb devices
adb shell
su
ls -d */
cd system
cd lib
sudo cf3d_uninstall.sh
Here it says that the file isn't found.
Click to expand...
Click to collapse
Resolved (for me) :
I actually had the same error using the same command you did. You made a mistake though : when using an "sh" script, you have to invoke it's command, simply using "sh" before the name of the script you attempt to launch.
This is the way you have to go :
you should have typed : "sudo sh cf3d_uninstall.sh"
I actually managed to get it to work this way, and to stop boot loop / freeze (call it whatever you want), as it actually DID uninstall CF3D faulty drivers.
DO NOT USE CF3D with Jelly Bean, at the moment at least. Though Chainfire wrote he wouldn't develop anymore his drivers for JB, as it would need too much coding, again. Stick to GB or even ICS (it used to work for me)
--------
Full technique :
Prerequisites :
-CWM
-Aroma File Manager : Download it here :
Way to go :
-Take out your SD card from your device
-Copy Aroma FM to your Ext. SD Card using a microSD adapter (you can find one at any classical SD card retailer for a few bucks)
-Stick it back in your device
-Launch ClockWorkRecoveryMod
-"Install zip file"
-"Install from SD Card'
-Choose Aroma FM zip file, and install it.
-Tap on option key to get option menu, and launch the shell
-Then type :
su
cd system
cd lib
sh cf3d_uninstall.sh
Your device will automatically reboot, and boot your system normally.
See Ya
Chain Fire 3d boot loop .. not booting help plz ASAP
hello.. i am facing the same problem
i am using Panasonic T11, i had rooted it but it does not have any CWM,etc
when i installed Chain Fire 3d. it prompt me to reboot, bt it was boot looped, and i tried the ways u suggested
the problem its shows this errors in pic . plz suggest me something i can do about my phone
{
"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"
}
when i tried to go in recovery mode it shows ENTRY QPST DOWNLOAD
plz help me

[Tutorial] Turn on WiFi via adb! Locked out of phone with wifi off?

Hello all, i just want to make this little "tutorial" since this happend to my brother
{
"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"
}
As you see the phone is locked out with no wifi.
And to get into the phone with your google account you need a data connection (ofc).
1: You need to have USB debugging on or else this guide is nothing for you.
2: Get adb and install your phones drivers.
3: Open up cmd and navigate to the adb folder.
Code:
cd c:\user\folder(s)\
4: Make sure adb recognises your phone by typing
Code:
adb devices
5: Type this one by one
Code:
adb shell
su
svc wifi enable
6: Wait for wifi to connect and log in to your google account as you would do normally.
And don't forget to hit that thanks button if it worked, Thank you.​
Tried it but I get a "Killed" response after the svc wifi enable command. I'm using a stock ROM from Cherry Mobile, which is a Karbonn A21. Thanks for your help.
Permission denied error
tried but when i ente "su" command it gives me an error . Permission Denied what shoul i do ?
When I type "su" it says "/system/bin/sh: su: not found"
albourcin said:
When I type "su" it says "/system/bin/sh: su: not found"
Click to expand...
Click to collapse
What are you trying to do mate??
Same issue as the OP??
SU is for super user
the
cd c:\user\folder(s)\
is an example, are you pointing to your ADB folder?
So i have mine on the root of C:
So mines:
C:\ADB
Then once in, i would type the commands.
You would need USB Debugging to be on for this to work and SU? I would have imagined that you would have to be rooted? Superuser?
Never used this command without root so not sure.
Try this instead of the command above.
Again via ADB, via CMD or powershell whilst the path is your adb folder, eg: C:\ADB
adb shell
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
update secure set value=1 where name='wifi_on';
OR, if you have TWRP installed, then try this.
Remove /Bypass Lockscreen With Recovery
Recently when i restored my data using TWRP i faced a problem at lock screen. I was not able to unlock my phone with the pin i set Earlier..So after so many attempts i was able to find a solution for that problem.(works with pattern,pin etc)...
forum.xda-developers.com
Hey
YAORA NA
i discover this, this very day ...
5: Type this one by one (NO ROOT NEEDED)
To enable/disable the Wi-Fi,
please use the following adb commands:
5/1. To launch the Wifi option on Settings
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
5/2. To disable or enable the wifi mode,
following command will toggle the button to opposite mode.
adb shell input keyevent 19 & adb shell input keyevent 19 & adb shell input keyevent 23
ET VOILA
Happy New Year
There is also this...
Set up wifi to never turn off
Android 12 Developer options adb "Wireless debugging" option keeps turning off
The Android 12's new features for 'Developer options' 'Wireless debugging' is fantastic because you never need a USB cable anymore to connect between the PC and the Android phone using adb (e.g., when using Vysor or scrcpy). However, I am...
forum.xda-developers.com
adb shell settings put global cw_disable_wifimediator 1
Turn wifi on and off
How to turn on and off the WiFi through ADB (no root)?
I found I can use these ADB commands to turn on and of the WiFi of a rooted phone: adb shell su -c 'svc wifi enable' adb shell su -c 'svc wifi disable' However, I'm interested in doing it without having to root the phone for an automatic...
forum.xda-developers.com

[GUIDE]: Python for automation using dtmilano's android ViewClient

{
"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"
}
Python for automation using dtmilano's android ViewClient​
Syllabus
1. What is python?
2. What is dtmilano's android ViewClient?
2a. How to install dtmilano's android ViewClient?
3. What all methods present in android viewclient?
4. How to import and use android viewclient in our project?
5. How do I automate android native/3rd party apps using android viewclient?
6. How to take screen shots using viewclient?
7. How to handle files using file library?​
Let us begin the journey, I hope this one wont be boring
​
1. What is Python?​Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language.
It was created by Guido van Rossum during 1985- 1990. Like Perl, Python source code is also available under the GNU General Public License (GPL).
2. What is Dtmilano's android viewclient?​- AndroidViewClient is a 100% pure python library and tools that simplifies test script creation
and android test automation, providing higher level operations and the ability of obtaining the tree of Views present at any
given moment on the device or emulator screen and perform operations on it.
As it's 100% pure python it doesn't require monkeyrunner, jython or any interpreter other than python.
2a. How to install Dtmilano's android ViewClient?​
Install Python from https://www.python.org/downloads/
Now download dtmilano's .egg file from https://pypi.python.org/pypi/androidviewclient/
Once it is done rename the downloaded file to .zip format and after that extract it to C:\Python27\Lib\site-packages.
The easiest method to install this is to use the command "easy_install". If you don't have easy_install installed, install the package python-setuptools(https://pypi.python.org/pypi/setuptools)
Once its done setup environment variable to C:\Python27\Scripts and after that run easy_install <path of downloaded dtmilano's .egg file> and you are good to go.
3. What all methods present in viewclient?​- Some of the most used methods I have listed below -
Code:
'TRAVERSE_CIT', 'TRAVERSE_CITB', 'TRAVERSE_CITC', 'TRAVERSE_CITCD', 'TRAVERSE_CITCDS', 'TRAVERSE_CITG', 'TRAVERSE_CITPS', 'TRAVERSE_CITUI', 'TRAVERSE_S', '_ViewClient__findViewWithAttributeInTree', '_ViewClient__findViewWithAttributeInTreeOrRaise', '_ViewClient__findViewWithAttributeInTreeThatMatches', '_ViewClient__findViewsWithAttributeInTree', '_ViewClient__getFocusedWindowPosition', '_ViewClient__hammingDistance', '_ViewClient__levenshteinDistance', '_ViewClient__mapSerialNo', '_ViewClient__obtainAdbPath', '_ViewClient__obtainDeviceSerialNumber', '_ViewClient__parseTree', '_ViewClient__parseTreeFromUiAutomatorDump', '_ViewClient__pickleable', '_ViewClient__splitAttrs', '_ViewClient__traverse', '__del__', '__doc__', '__init__', '__module__', 'assertServiceResponse', 'connectToDeviceOrExit', 'distance', 'distanceTo', 'dump', 'excerpt', 'findViewById', 'findViewByIdOrRaise', 'findViewByTag', 'findViewByTagOrRaise', 'findViewWithAttribute', 'findViewWithAttributeOrRaise', 'findViewWithAttributeThatMatches', 'findViewWithContentDescription', 'findViewWithContentDescriptionOrRaise', 'findViewWithText', 'findViewWithTextOrRaise', 'findViewsContainingPoint', 'findViewsWithAttribute', 'getRoot', 'getSdkVersion', 'getViewIds', 'getViewsById', 'hammingDistance', 'imageDirectory', 'installPackage', 'isKeyboardShown', 'levenshteinDistance', 'list', 'longTouch', 'serviceResponse', 'setAlarm', 'setText', 'setViews', 'setViewsFromUiAutomatorDump', 'sleep', 'swipe', 'touch', 'traverse', 'traverseShowClassIdAndText', 'traverseShowClassIdTextAndBounds', 'traverseShowClassIdTextAndCenter', 'traverseShowClassIdTextAndContentDescription', 'traverseShowClassIdTextAndTag', 'traverseShowClassIdTextAndUniqueId', 'traverseShowClassIdTextContentDescriptionAndScreenshot', 'traverseShowClassIdTextPositionAndSize', 'traverseTakeScreenshot', 'writeImageToFile', 'writeViewImageToFileInDir'
4. How to import and use android viewclient?​- Once you have installed android viewclient next step is to use this in our new project. Below is the code snippit for importing android view client -
Code:
'''
Created on Dec 19, 2015
@author: ravi h basawa
'''
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
5. How do I automate android native/3rd party apps using android ViewClient?​
Pre-conditions in your device:
1. Enable USB debugging.
2. Enable stay awake option.
Pre-conditions in PC:
1. android sdk should be present.
2. connect your testing device. (double check with cmd "adb devices")
3. python env. variables are all set.
4. Create a new folder named "Automation" on your desktop.
5. Inside it create a new text file and paste the below given code and save it as Settings.py (or whatever you want to give)
Lets start-- It is very easy to automate android apps using android ViewClient. Let me teach you a simple code which will open settings application.
NOTE: This program I have written using my Nexus device running Android latest version 6.0; So the below program may give you errors. Please edit the code accordingly.
Code:
'''
Created on Dec 19, 2015
@author: ravi h basawa
'''
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
print "################## Settings application test ####################"
device.startActivity('com.android.settings/.Settings')
print 'TEST : PASS'
Once you write the above code, let us save it as Settings.py And then we will try to open it using IDLE software which will come pre-bundled with python as shown below:
* To execute our newly written code we gonna press F5.
Explanation on above code --
The first line of code is to import dtmilano's ViewClient method.
the second line is used to define the devices which you have connected, In my case as I have connected only one device I will not provide serialno,
Going further I will show you as how to connect to two devices and make them communicate.
6. How to take screen shots using viewclient?​
- Now we will take our code to the next level, We gonna open settings app, and then we are going to click on About phone option. and also we'll take screen shot of the device to check as what is inside About phone.
NOTE: Create a folder named "Screenshots" at your current working directory(That is in our case folder named Automation) or else you will get Error saying no folder named "Screenshots" is present.
Code:
'''
Created on Dec 19, 2015
@author: ravi h basawa
'''
import re
import sys
import time
import os
from PIL import Image
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
print "################## Settings application test ####################"
device.startActivity('com.android.settings/.Settings')
print 'SUCCESFULLY OPENED SETTINGS APP'
vc.dump() ## this is used to refresh the screen.
## below is the for loop used to swipe screen five times. the input swipe command takes 4 args that is X1,Y1,X2,Y2 which can be found using "Pointer location" option present in developer settings.
for i in range(5):
device.shell('input swipe 651 1307 677 680')
vc.dump()
vc.findViewWithText("About phone").touch()##this line will click on About phone option.
print 'About phone option found and clicked'
vc.dump()
time.sleep(2)
device.takeSnapshot(reconnect=True).save(os.getcwd()+'\\Screenshots\\'+'OS_version.png') #this line will take screenshot of the device and store it in the folder named Screenshots.
print 'Screenshot taken'
print 'TEST : PASS'
Now when you execute the above code you will see the result as below -
Now let us write a code to check the current android version displayed under settings app is proper or not.
Code:
'''
Created on Dec 19, 2015
@author: ravi h basawa
'''
import re
import sys
import time
import os
from PIL import Image
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
print "################## Android OS VERSION TEST ####################"
device.startActivity('com.android.settings/.Settings')
print 'Settings app opened'
vc.dump()
for i in range(5):
device.shell('input swipe 651 1307 677 680')
vc.dump()
vc.findViewWithText("About phone").touch()
vc.dump()
print 'About phone option clicked'
device.shell('input swipe 651 1307 677 680')
vc.dump()
version = vc.findViewWithText('Android version')
if version:
vnum = vc.findViewWithText('6.0')
if vnum:
print 'Android OS version is 6.0'
vc.dump()
time.sleep(2)
device.takeSnapshot(reconnect=True).save(os.getcwd()+'\\Screenshots\\'+'OS_version.png') #this line will take screenshot of the device and store it in the folder named Screenshots.
print 'Screenshot taken'
print 'TEST : PASS'
device.press('KEYCODE_HOME')
else:
print 'Incorrect OS version'
print 'TEST : FAIL'
else:
print 'Android version string not found'
print 'TEST : FAIL'
device.press('KEYCODE_HOME')
In the above code you might be wondring as what does vc.dump() stands for, It is actually refreshes the screen and it makes easier to find required data on the screen. Without vc.dump() method there is 100% guarenty that our script gonna fail.
OK, Now we will wrtie a script which has Python functions in it.
Before this let us learn as what is 'def' in Pyhton is all about:
As we all know that we define functions to provide the required functionality. Below are some rules to define a function in Python.
[*] Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).
[*] Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.
[*] function names can be started with a _ or a small letter.
[*] The code block within every function starts with a colon ) and is indented.
Now I will write a simple code to show you as how def works.
Code:
'''
Created on Dec 19, 2015
@author: ravi h basawa
'''
def test():
print 'Hi I am inside a function'
test()
As you can see from the above code, there is a single tab given after the fucntion test():, these are called as indents. Once you start using IDLE for python script writing you will get to know more on these indents.
Just for testing purpose try to write your own functions using IDLE; Once you type as " def test(): " and hit ENTER without the qouats you will see a single tab occured. This is how Pyhton works. There are no curly brases in it. But only Indents. If you can handle these indents you are good to go.
And one more thing I forgot to explain you guys, That is you can Indent a region by using the shortcut ctrl+] and Dedent using the shortcut ctrl+[
For now let us write the same code; But this time we will use 'def' in it.
Code:
'''
Created on Dec 19, 2015
@author: ravi h basawa
'''
import re
import sys
import time
import os
from PIL import Image
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
def os_test():
print "################## Android OS VERSION TEST ####################"
device.startActivity('com.android.settings/.Settings')
print 'Settings app opened'
vc.dump()
for i in range(5):
device.shell('input swipe 651 1307 677 680')
vc.dump()
vc.findViewWithText("About phone").touch()
vc.dump()
print 'About phone option clicked'
device.shell('input swipe 651 1307 677 680')
vc.dump()
version = vc.findViewWithText('Android version')
if version:
vnum = vc.findViewWithText('6.0')
if vnum:
print 'Android OS version is 6.0'
vc.dump()
time.sleep(2)
device.takeSnapshot(reconnect=True).save(os.getcwd()+'\\Screenshots\\'+'OS_version.png') #this line will take screenshot of the device and store it in the folder named Screenshots.
print 'Screenshot taken'
print 'TEST : PASS'
device.press('KEYCODE_HOME')
else:
print 'Incorrect OS version'
print 'TEST : FAIL'
else:
print 'Android version string not found'
print 'TEST : FAIL'
device.press('KEYCODE_HOME')
os_test()
Output of the above code will be as below:
============= RESTART: C:\Users\ravi\Desktop\testing\Settings.py =============
################## Android OS VERSION TEST ####################
Settings app opened
About phone option clicked
Android OS version is 6.0
Screenshot taken
TEST : PASS
>>>
About file handling
Before we move to the next, Let me teach you as what is 'class' in Python and how do we use it.. Below is the small code consists of a class and one function.
Code:
'''
Created on Dec 27, 2015
@author: ravi h basawa
'''
class ctest():
def test(self, value):
print 'Hi I am inside a function and passed value as >>' + ' ' + value
c = ctest()
c.test('testing')
* From the above code we have created a class named 'ctest' and a function named 'test'.
* Once we create a class to create a function we have to give one tab inside the 'ctest' class.
* The code 'c = ctest()' is creating a object for our class.
* The next line 'c.test('testing')' will pass value to our newly created function.
I hope now u have understood as how 'class' works in Python from the above code.
Ok, Now let us try to send a message and this time let us use "Class" in the below code -
Code:
'''
Created on Jan 10, 2016
@author: ravi h basawa
'''
import os
from com.dtmilano.android.viewclient import ViewClient
device, serialno = ViewClient.connectToDeviceOrExit()
vc = ViewClient(device=device, serialno=serialno)
fd = open('MsgTest.xls',"a+")
fd.write("\nMessanger")
class msg():
def newmsg(self):
print 'Opening Message app'
device.shell('am start com.google.android.apps.messaging')
vc.dump()
vc.findViewById('com.google.android.apps.messaging:id/start_new_conversation_button').touch()
vc.dump()
f = vc.findViewWithText('Frequents')
if f:
print 'TEST PASS'
print 'add button clicked'
fd.write("\tPASS")
fd.close()
else:
print 'TEST FAIL'
fd.write("\tFAIL")
c = msg()
c.newmsg()
The above code does these jobs -
* Creates a class named 'msg()'. And inside we have created a new function named 'newmsg()'.
* This code will open google Messenger app and clicks on the 'add recipients' button.
* If the 'add recipients' button is clicked, our test case will be passed else it will fail.
* 'open' function does the job of creating a new xls file in append mode.
* 'write' function does the job of writing the data to the new line inside the appended xls file.
* 'close' function is used to close the xls file.
is there a way to handle the device keyboard, say, i would like to press a key and then close the keyboard?
Also where can i find detailed documentation?
may be you need to use pointer location(x,y coordinates).
Implicit wait and explicit wait in vc
Hi,
Iam trying to use android view client to automate a task. However, I have a requirement wait for a perticular element to load up.
Is there are function in VC to use implicit or explicit wait.
Thanks

Categories

Resources