[Q] How to execute the adb root from an .apk? - Design, Prototyping, UI, Graphics

Hello
Need help to write an APP.APK that I can write. When this APP.APK is installed in device
When its executed i expect it to send the adb root command root to the device.
Currently iI plug device to a PC then type
adb root
adb remount
how can I achieve the same from an APP.APK ?
I probably have to bypass the security...please send your comments with details and source code and examples
thanks team

Related

LG GW620 root= error: insufficient permissions for device

[Resolved]
Hi, I try to root my LG Eve with Wiki, I follow all steps but when I lauch "adb shell", the terminal returns me "error: insufficient permissions for device".
The step Module Test -> Stability Test -> Enable Root Permission seems not working...
Any idea? Thanks
PS Sorry for my english...
Click to expand...
Click to collapse
[Resolved]
i Have the same problem!
vinzqc said:
[Resolved]
[Resolved]
Click to expand...
Click to collapse
Maybe the resolution could be shared?
The adb server needs to start as root to get full access to the USB device.
Code:
adb kill-server
sudo adb start-server
adb devices
adb shell
did you check your udev rules? if you set this up you don't need to run adb server as root.
http://developer.android.com/guide/developing/device.html
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
be sure to change group to "users" or your group name (type id -a)!
adb do not need as root in my phone with official rom, but it is needed in cm72

[Q] How do I use adb in a linux terminal?

Hello all,
I want to know how to use adb.
It seems pretty easy but I just can't get it to work. I'm using Ubuntu... I've already installed the android sdk.
So where do I go from here.
## WHAT I WANT TO KNOW IS THIS: ##
I want to (among other things) push a new boot animation to my phone from my Ubuntu laptop...
____Of course I could flash it but I want to learn how to push____
I have the "bootanimation.zip" on the root of my SD card.
NOW WHAT? In terminal?
Thanks
generalExpert said:
Hello all,
I want to know how to use adb.
It seems pretty easy but I just can't get it to work. I'm using Ubuntu... I've already installed the android sdk.
So where do I go from here.
## WHAT I WANT TO KNOW IS THIS: ##
I want to (among other things) push a new boot animation to my phone from my Ubuntu laptop...
____Of course I could flash it but I want to learn how to push____
I have the "bootanimation.zip" on the root of my SD card.
NOW WHAT? In terminal?
Thanks
Click to expand...
Click to collapse
First, put bootanimation.zip in the same directory as ADB
su
cd <enter directory with ADB here>
./adb remount
./adb push ./bootanimation.zip /system/media
And you should have your new boot animation.
EndlessDissent said:
First, put bootanimation.zip in the same directory as ADB
su
cd <enter directory with ADB here>
./adb remount
./adb push ./bootanimation.zip /system/media
And you should have your new boot animation.
Click to expand...
Click to collapse
Ok, after I enter "su" it asks for my pass and then says "su: Authentication Failure"
Is there another way like with sudo perhaps?
Ok, I did "sudo su" to become root... I think..
Then did "./adb remount" and it spit out "error: insufficient permissions for device"
Then i did "./adb devices" and it said "???????????? no permissions"
Any Ideas?
My EVO is connected via usb and I have usb debugging on and USB storage ON.
when you do the "su" command, you will need to allow superuser permission on your phone
"sudo su" first in ubuntu
in fact, ive pushed many files to my phone using ubuntu without running as root. if you are new to linux though, be advised the characters will not show as you enter your password, but dont worry, they're there... oh and what he said, you need to be rooted and make sure you can gain root access on the phone, type "./adb shell" and you should see a # sign; meaning you have root. if you see a $ sign you do not have root access. also you can type "./adb devices" to see if you device is 'online' with your computer

[Q] Remount and forse??

When someone says this
Code:
adb remount
adb push ApexLauncher.apk /system/app
What does that mean and how do i do it
slimpickins said:
When someone says this
Code:
adb remount
adb push ApexLauncher.apk /system/app
What does that mean and how do i do it
Click to expand...
Click to collapse
It means you need adb installed which is a package that is Dowloaded through the android sdk available on Google developers Website.
Adb is an interface tool for interacting with android via terminal.
Once these are setup you can run those commands.

Videocon A20 How to root

Hi Friends,
I recently bought a Videocon A20 - with Android 2.3.5, and I have been unable to ROOT it.
I have tried with One Click, Un-Root, Adb-shell etc. Nothing seems to work.
It was so easy to ROOT with a Samsung Galaxy Y also my Karbonn A9+ (this was much easier)
But this Videocon V20 is more stuborn than a MULE ........:crying:
Anyone out there Can help me ?
PS: I have been able to get ADB Shell access and I get a "$" prompt and not "#" prompt, this means that - su will not work.
All the above applications are able to push - superuser application however the phone is not rooted.
CAN SOMEONE PLEASE HELP ME ????
Videocon A20
I am Having the same problem.
please tell me if you know the solution anytime.
Try universal gingerbread root method...
Sent from my GT-I5510 using xda premium
Have Videocon A20 same problem
Hi I also tried all the procedures from internet like SuperOneClick, Gingerbreak, etc........................ But No rooting done\
Please help me
My mobile getting switched off often due sys apps loading in to ram without my knowledge
I want to uninstall them
Please help me to root my Videocon A20
Thanks
[email protected]
Download z4root.apk(google it!!!) And extract the apk with your fav. Decompression tool.Go to res>raw
And you will find a file named rageitagainstthecage .
Now make a folder in C drive of any desired name (make sure that folder name doesn't contain space) and place the above file in this folder.
Now path should look like this:
C:\(foldername)\ rageitagainstthecage
Now attach your phone to pc with adb enabled and start command prompt and type the following commands and press enter after each command:
cd ..
cd ..
cd yourfoldername
adb push rageitagainstthecage /data/tmp/local/
adb shell "chmod 775 /data/tmp/local/rageitagainstthecage"
adb shell "./data/tmp/local/ rageitagainstthecage"
Now the exploit will run and after the completion of exploit,restart your phone and again attach the phone to pc and the you can push the su binary and app in following way(assuming that you have su and Superuser.apk in your folder located in c drive)
adb shell "mount -o remount rw /system "
adb push su /system/bin/
adb push Superuser.apk /system/app/
adb shell "chmod 775 /system/bin/su"
adb shell "chmod 775 /system/app/Superuser.apk"
Now time to check if ir worked
adb shell
su
If you see "#" instead of "$", your phone is rooted!!!!
BEST OF LUCK!!!!
Sent from my ZTE-BLADE using xda app-developers app
Did anyone tried it out?
i will try as soon as i get a20 frm my brother.....
Sent from my GT-I5510 using xda premium
AshuGite said:
i will try as soon as i get a20 frm my brother.....
Try this tool by binary...google it..
www.gleescape.com/wp-content/uploads/2012/12/Root_with_Restore_by_Bin4ry_v17.zip
http://techass.wordpress.com
Click to expand...
Click to collapse
nt working... :'(
[email protected] said:
Download z4root.apk(google it!!!) And extract the apk with your fav. Decompression tool.Go to res>raw
And you will find a file named rageitagainstthecage .
Now make a folder in C drive of any desired name (make sure that folder name doesn't contain space) and place the above file in this folder.
Now path should look like this:
C:\(foldername)\ rageitagainstthecage
Now attach your phone to pc with adb enabled and start command prompt and type the following commands and press enter after each command:
cd ..
cd ..
cd yourfoldername
adb push rageitagainstthecage /data/tmp/local/
adb shell "chmod 775 /data/tmp/local/rageitagainstthecage"
adb shell "./data/tmp/local/ rageitagainstthecage"
Now the exploit will run and after the completion of exploit,restart your phone and again attach the phone to pc and the you can push the su binary and app in following way(assuming that you have su and Superuser.apk in your folder located in c drive)
adb shell "mount -o remount rw /system "
adb push su /system/bin/
adb push Superuser.apk /system/app/
adb shell "chmod 775 /system/bin/su"
adb shell "chmod 775 /system/app/Superuser.apk"
Now time to check if ir worked
adb shell
su
If you see "#" instead of "$", your phone is rooted!!!!
BEST OF LUCK!!!!
Sent from my ZTE-BLADE using xda app-developers app
Click to expand...
Click to collapse
when it endterd to push the file it is displayng that adb not found.
Download adb binary(google it) and place all the downloaded files in system32/64 folder!
And then try it!
A simple solution if you are lucky
Well i have one simple solution for you .. I dont know A20 is mediatech or not . So if it is an MTk device then all you have to do is pull the stock recovery from your android and then provide it here
then i will compile a CWM bessed on that and then you will have CWM on your device and u can flash any su binary in zip and you will find it in my post ...
So if you r lucky then u will get the both CWM and root .. Otherwise bro without device i cant help ..
To pull your recovery type this in adb
adb shell
$su
#dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img
you will have ur stock recovery in sdcard . it might be around 6.144mb or close ... but not greater that 10 mb
thebdcoder said:
Well i have one simple solution for you .. I dont know A20 is mediatech or not . So if it is an MTk device then all you have to do is pull the stock recovery from your android and then provide it here
then i will compile a CWM bessed on that and then you will have CWM on your device and u can flash any su binary in zip and you will find it in my post ...
So if you r lucky then u will get the both CWM and root .. Otherwise bro without device i cant help ..
To pull your recovery type this in adb
adb shell
$su
#dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img
you will have ur stock recovery in sdcard . it might be around 6.144mb or close ... but not greater that 10 mb
Click to expand...
Click to collapse
I don't know why my videocon drivers are not installing in my pc which is running windows 7 64bit. Whenever i'm trying to write the code it's showing adb not found. plzzz help.
So nobody seems to have any solution for VIDEOCON A20 mobile.
byte_code said:
download z4root.apk(google it!!!) and extract the apk with your fav. Decompression tool.go to res>raw
and you will find a file named rageitagainstthecage .
Now make a folder in c drive of any desired name (make sure that folder name doesn't contain space) and place the above file in this folder.
Now path should look like this:
C:\(foldername)\ rageitagainstthecage
now attach your phone to pc with adb enabled and start command prompt and type the following commands and press enter after each command:
Cd ..
Cd ..
Cd yourfoldername
adb push rageitagainstthecage /data/tmp/local/
adb shell "chmod 775 /data/tmp/local/rageitagainstthecage"
adb shell "./data/tmp/local/ rageitagainstthecage"
now the exploit will run and after the completion of exploit,restart your phone and again attach the phone to pc and the you can push the su binary and app in following way(assuming that you have su and superuser.apk in your folder located in c drive)
adb shell "mount -o remount rw /system "
adb push su /system/bin/
adb push superuser.apk /system/app/
adb shell "chmod 775 /system/bin/su"
adb shell "chmod 775 /system/app/superuser.apk"
now time to check if ir worked
adb shell
su
if you see "#" instead of "$", your phone is rooted!!!!
Best of luck!!!!
Sent from my zte-blade using xda app-developers app
Click to expand...
Click to collapse
this process doesn't work with videocon a20. Plz help
---------- Post added at 01:30 AM ---------- Previous post was at 01:26 AM ----------
it's a challenge for every dev to root videocon a20. Nothing can penetrate this mobile. I've searched every single forum/site. Please do something
done done
i wud like u to telll u
i have the same cell as u
ie VIDEOCON A20
finally rooted and quite happy
please search
SKRILLEX STARK XDA
here is the sol......Peace Out
thebdcoder said:
Well i have one simple solution for you .. I dont know A20 is mediatech or not . So if it is an MTk device then all you have to do is pull the stock recovery from your android and then provide it here
then i will compile a CWM bessed on that and then you will have CWM on your device and u can flash any su binary in zip and you will find it in my post ...
So if you r lucky then u will get the both CWM and root .. Otherwise bro without device i cant help ..
To pull your recovery type this in adb
adb shell
$su
#dd if=/dev/block/mmcblk0p13 of=/sdcard/recovery.img
you will have ur stock recovery in sdcard . it might be around 6.144mb or close ... but not greater that 10 mb
Click to expand...
Click to collapse
i wud like u to telll u
i have the same cell as u
ie VIDEOCON A20
finally rooted and quite happy
please search
SKRILLEX STARK XDA
here is the sol......Peace Out
its so simple to root videocon A20
Dear friends use Kingo root i rooted my videocon A20 within minutes
Im here for another answer from anyone is there any custom rom available for
videocon A20
Please help me

[UNIVERSAL GUIDE] Root Any Android Device Manually !

THIS GUIDE NO LONGER WORKS BECAUSE ANDROID ISN'T WHAT IT USED TO BE BACK IN 2013-14.
PLEASE STOP WASTING TIME TO FOLLOW THIS OBSOLETE METHOD 1. PLEASE REFER ONLY TO METHOD 3​
The Ultimate Guide to Rooting any Android Device Manually !!!!​
Wanting to ROOT Your Phone but can't do Because Of No rooting Guides or want to learn to root any device ? Then , This Guide Is For YOU
OK So lets start....
**What You Need**
1.Your Unrooted Android Device.
2.ADB Drivers Installed On Your PC. If you Don't Have Download From Here :
Code:
adbdriver.com/‎
3. The Most Inportant Root Kit Made By Me (N'ayam Amarsh'e) - Download From The Attachment.
4.Strength And Courage 'Coz Rooting Voids Your Warranty... If You have a samsung device then Don't Worry Your warranty is gone forever... But if you own any other, maybe you can void it or maybe......
I've Written Android Device as ADV to make it more easy....
**Steps**
So you have the adb drivers installed let's go....
1. Open The root kit by Extracting The Rootkit with WinRAR....
2.Turn 'USB DEBUGGING' 'ON' in your ADV...
3. Connect your ADV to Your PC...
4.In the root kit Open Cmd.exe File ... [ IF YOU CAN'T OPEN CMD, GOTO C:/WINDOWS/SYSTEM32/ COPY CMD .EXE TO YOUR ROOTKIT FOLDER]
5. In CMD window Type the following command...
Code:
->adb devices *Your device will get listed in the window if it doesn't check your adb drivers or if you have followed the steps properly...
->adb push busybox /data/local/tmp
->adb push su /data/local/tmp
->adb push Superuser.apk /data/local/tmp
If you Succeed Move On ...
6.Then You need Root Shell Type :
Code:
adb shell
Note that you see a "$" sign in the command prompt. That means you are not in 'su' shell.
7.Next run the following commands in the shell to change permissions and get some limited privileges for the Superuser files:
Code:
->chmod 6755 /data/local/tmp/su
->chmod 755 /data/local/tmp/busybox
->chmod 644 /data/local/tmp/Superuser.apk
{Note}The names of the files are case sensitive!
8.Done ? Now You need to open a copy of linux which has nautilus... So enter your linux (I recommend using ubuntu 11.4) and type in the terminal (ctrl+alt+T)
Code:
->sudo nautilus
this will open nautilus with root privileges...
You can just boot it from USB so no hassle of installing it... http://www.cyberciti.biz/tips/download-ubuntu-linux-11-04-iso-cd-dvd-images-natty-narwhal.html
Having your ADV connected with USB to PC switch it off and put it in download/recovery mode...
superlouro said:
DEVICE OFFLINE?
! SOLUTION ! (click me)
Click to expand...
Click to collapse
9.In The Exploring Window navigate to
Code:
/data/local/tmp
and move/cut 'su' and 'busybox' to
Code:
/system/bin
...
10.From the tmp Folder you went earlier Move/cut 'Superuser.apk' to
Code:
/system/app
11.Now Reboot You ADV ... Congrats ! You're now ROOTED !
Many Users Are Having Problem with This Method, If you can't do the method 1. Try Method 2.
METHOD 2
PLEASE DON'T ASK ME ABOUT THIS METHOD, THIS IS JUST FOR A TRY, MY BROTHER FOUND THIS METHOD TO BE WORKING, I HAVEN'T TRIED IT YET!
This is linux based method, It's quite easy if you follow every step correctly...
You need to download psneuter, https://github.com/tmzt/g2root-kmod/tree/master/scotty2/psneuter
When you have it execute the following...
Code:
adb devices
Code:
adb push psneuter /data/local/tmp
This will copy the file to your device and now we'll execute it..
Code:
adb shell
cd /data/local/tmp
chmod 777 psneuter
./psneuter
Now You'll see
Code:
adb kill-server
adb devices
adb shell
now # will appear in place of $, or after typing $su.
Code:
# mount -o remount,rw -t rfs /dev/block/st19/system
# exit
$ adb push busybox /system/bin
$ adb push su /system/bin
$ adb install Superuser.apk
$ adb shell
# chmod 4755 /system/bin/busybox
# chmod 4755 /system/bin/su
# mount -o remount,ro -t rfs /dev/block/st19/system
# exit
$ adb reboot
Now your device will reboot and you can see SuperUser App in your app drawer...
----------------------------------------------------------------------
METHOD 3
There is no chance of the phone not getting rooted with my method but If you don't want to do the above methods, Try these, I'm pretty sure they will root your device with ease...
1. Framroot App [Not On Google Play]-http://forum.xda-developers.com/apps/framaroot/root-framaroot-one-click-apk-to-root-t2130276
2.KingoRoot App - www.kingoapp.com
3.One Click Root Free/Pro (My Favorite app, roots many devices with No-Brick Guarantee) - www.oneclickroot.com
4.Root Master App - forum.xda-developers.com/showthread.php?t=2672150
5.z4root App - http://forum.xda-developers.com/showthread.php?t=833953
6.Easy rooting toolkit App-http://forum.xda-developers.com/showthread.php?t=1321582
7.Vroot Software - http://vrootdownload.info/ or http://www.mgyun.com/en/getvroot
8.SRSRoot Software - http://www.srsroot.com
9.Unlock Root Software - http://www.unlockroot.com/download.html
10.Universal Androot App - forum.xda-developers.com/attachment.php?attachmentid=391774
ONLY FOR MTK DEVICES- MTK DROID TOOLS- http://forum.gsmhosting.com/vbb/f60...3-2014-imei-repair-rooting-tool-more-1780568/
HOPE THESE WILL DO....
Press Thanks To appreciate me to Work On Other Guides And Roms....
Your Appreciation Is Needed...
And This GUIDE IS Originally By N'ayam Amarsh'e
I have any error. Device is offline.
---------- Post added at 09:13 AM ---------- Previous post was at 09:02 AM ----------
uukasz92 said:
I have any error. Device is offline.
Click to expand...
Click to collapse
Problem solved i download another adb drivers and work fine
In /UserData/local/tmp i only have one file "directory" and nothing else. It's look like something block the data folder.
uukasz92 said:
In /UserData/local/tmp i only have one file "directory" and nothing else. It's look like something block the data folder.
Click to expand...
Click to collapse
that means you have not properly pushed the files into the directory.... Try installing adb drivers again and do the same steps...Good luck
When you open cmd just type ' adb devices' if your device gets listed then you can start if it doesn't check your drivers...
After uinstall all adb drivers and phone drivers comand prompt shows me a device code and status ofline. At the begining i install atached to therad package of adb drivers. But lately some where in Internet I find some update package of adb drivers. And there was the same sort of files like in your package. I put them there and replace and after that adb shows the device is working and status is online but your guide still does not work. Question is where is real problem ? I checked and Debug Mod is on, drivers are installed.
Try this , download android commander and try to copy the busybox , su and superuser to data/local/tmp
N'ayam Amarsh'e said:
Try this , download android commander and try to copy the busybox , su and superuser to data/local/tmp
Sent from my Mi-492 using xda app-developers app
Click to expand...
Click to collapse
I used the same files in android commander because program can't finde my device to.
Which phone you have.... Try to download its original drivers this might help...
I using Samsung Galaxy Grand Neo (GT-I9060) Jelly Bean 4.2.2
Now is working. But how to move "su" and busybox into system/bin ? Android commander says " You need root to do this." when i try to copy does files into system/bin. Folders are protected and I dont have premission to do anything with them.
uukasz92 said:
I using Samsung Galaxy Grand Neo (GT-I9060) Jelly Bean 4.2.2
Now is working. But how to move "su" and busybox into system/bin ? Android commander says " You need root to do this." when i try to copy does files into system/bin. Folders are protected and I dont have premission to do anything with them.
Click to expand...
Click to collapse
Sorry I forgot that Android Commander works only for rooted phones... Silly Me...
OK you will need to do it with Droid Explorer
OR
linux and in the linux you'll have to type 'sudo nautilus' it'll open it with root privilages...
N'ayam Amarsh'e said:
Sorry I forgot that Android Commander works only for rooted phones... Silly Me...
OK you will need to do it with Droid Explorer
OR
linux and in the linux you'll have to type 'sudo nautilus' it'll open it with root privilages...
Click to expand...
Click to collapse
And in your guide need little correct. In step 9 should be /data/local/tmp not /UserData/local/tmp. Does are two diffrent folders. And before I think I do something wrong when all files be already on right place
Droid Explorer cant change folders premission too. Command prompt says : Read-only drirectory. I don't know what to do now.
uukasz92 said:
And in your guide need little correct. In step 9 should be /data/local/tmp not /UserData/local/tmp. Does are two diffrent folders. And before I think I do something wrong when all files be already on right place
Click to expand...
Click to collapse
thanks.... Guide is updated now
Good 1 helped alot
harmeet singh said:
Good 1 helped alot
Click to expand...
Click to collapse
I am happy that I helped....
Hi! First thank you for that guide. I rooted several devices but with a noname(10.1" A10 dual core) china tablet I have some problems so I hope your solution works.
I have some problems/questions:
1. Step 5: Are you sure it's:
Code:
adb push su /data/local/tmp
instead of
adb push su /data/local/tmp[B][SIZE="5"]/[/SIZE][/B]
I'm currently not able to look at the data folder but if I change the directions e.g to /test/local/tmp it just creates a "tmp" file and overwrites the file with every push command.
2. Step 6: If it's a $ it's not rootet, what should be there if it's rooted? I have a # there. Rootchecker says it's rooted since the beginning, but I cant access with superuser/supersu etc.
3. Step 8 doesn't work. I use a virtual box with ubuntu 13.10(Stinson: new is always better?) for the first time. With "sudo nautilus" I get the message that root access is not granted(failed to register client). I used "gksudo nautilus" instead... does that matter?
4. I can't connect my device to the virtual box. I tried to add the usb device but didn't work. USB Developer Android[0223] is in virtual box connected. However, I dont know where to find it in ubuntu. I'm a ubuntu noob sorry :/
5. Is there another way to get rw permissions?
Thanks in advance :good:
thankyou for information i think is hard for me
Very nice, ty
Humbel said:
Hi! First thank you for that guide. I rooted several devices but with a noname(10.1" A10 dual core) china tablet I have some problems so I hope your solution works.
I have some problems/questions:
1. Step 5: Are you sure it's:
Code:
adb push su /data/local/tmp
instead of
adb push su /data/local/tmp[B][SIZE="5"]/[/SIZE][/B]
I'm currently not able to look at the data folder but if I change the directions e.g to /test/local/tmp it just creates a "tmp" file and overwrites the file with every push command.
2. Step 6: If it's a $ it's not rootet, what should be there if it's rooted? I have a # there. Rootchecker says it's rooted since the beginning, but I cant access with superuser/supersu etc.
3. Step 8 doesn't work. I use a virtual box with ubuntu 13.10(Stinson: new is always better?) for the first time. With "sudo nautilus" I get the message that root access is not granted(failed to register client). I used "gksudo nautilus" instead... does that matter?
4. I can't connect my device to the virtual box. I tried to add the usb device but didn't work. USB Developer Android[0223] is in virtual box connected. However, I dont know where to find it in ubuntu. I'm a ubuntu noob sorry :/
5. Is there another way to get rw permissions?
Thanks in advance :good:
Click to expand...
Click to collapse
For Your First Answer You Need not to worry /tmp and /tmp/ are the same...
2.Have you tried typing 'adb shell' then ' su ' if yes there's your solution.... If not then you have problem with su binary or busybox....
3.You have an Ubuntu 11.4 .iso file so burn it to a blank disk and boot your live disk .... It should be all right then...
4.Answer in 3....
5.Answer in 3....
6.Press Thanks if I helped...
bro im confused wt to do exactly in that sudo ... step pls give a brief explaination

Categories

Resources