How install python on android? so that it works with su, cd, ls ... commandss? - Android Q&A, Help & Troubleshooting

Hey,
ive got a moto g and its my first android and its rooted and bootrom is unlocked, and ive installed terminal emulator, but i cant find out how to install python so that it works in terminal eit su, cd , ls ... commands?!?
ive installed qpython app from playstore but you cant do commands like su, cd .....
ive tried ping in terminal rmulator and it wotks so you can enter internet over terminal emulator, so i tried apt-get install python but it says no apt-get command foundor something like this, so i hope someone can trll me how to install python on android with working commands( su ...) so that it can enter filesystem directorys like /sdcard....
please help

Hi,
You don't need python to run commands like su and cd! All you need is a nifty binary called 'BusyBox'. Since you mentioned apt-get, I assume you come from Ubuntu? Well I'm sure you're familiar with BusyBox. Look for BusyBox installers in the Play Store.
Once you've installed Busybox, enter this command in the terminal emulator to let BusyBox symlink its applets:
(Are you sure you're rooted? Running su successfully is a must.)
Code:
su
busybox --install /system/xbin
If all goes well, then you should be able to use Unix utilities like cd and ls.
Sent from my GT-I8730 using Tapatalk

aureljared said:
Hi,
You don't need python to run commands like su and cd! All you need is a nifty binary called 'BusyBox'. Since you mentioned apt-get, I assume you come from Ubuntu? Well I'm sure you're familiar with BusyBox. Look for BusyBox installers in the Play Store.
Once you've installed Busybox, enter this command in the terminal emulator to let BusyBox symlink its applets:
(Are you sure you're rooted? Running su successfully is a must.)
Code:
su
busybox --install /system/xbin
If all goes well, then you should be able to use Unix utilities like cd and ls.
Sent from my GT-I8730 using Tapatalk
Click to expand...
Click to collapse
Thank you for answering me,
i tell you whats my problem, i need to run a python file, for example: python dummy.py 12345
then it createsa txt file in the path where i am!
that what it should do, but on my android (busybox is installed and its rooted and bootrom unlocked) i ve installed terminal emulator from play store and su and cd and ls command works, but i cant run python files, it says python not found even when i installed pythonforandroid, so i try to apt-get install python but it says apt-get not found, then ive installed qpython from play store, but it doesnt do what i want too !
so my question is, is there any way to tun my python file that creates a new file (its like a passwordgenerator) ???

Basically, you don't need superuser to run simple Python or to develop using it.
If you are looking for Jupyter type IDE on android, visit the following link here.
It will help you install Python and run ipython notebooks without hassle.

Related

hello to a new forum, and already a newb question...

OK. Firstly, I have extensive experience with rooting moto droids and custom roms. That said I got cocky and didn't do enough homework trying to root my girls Eris and proceeded following the instructions in the "1.5 to rooted 2.1" thread. Step 1 went fine. I THINK I have root access. Anyway, like I was tired and couldn't get adb shell working so I left it at that with intent to finish today when I get home from work. Now she's telling me her icons are different and some are linking to different programs. Any ideas? Second, can someone point me in the direction of an adb shell how to, on my Droid I can just use terminal emulation and don't actually need a computer so I'm not too familiar with the process... sorry for the stupid newborn questions, don't pull the flame throwers out yet, thanks!
You can use terminal emulator, same thing for the most part as adb... I use that more then adb, faster then having to connect to a pc IMO.
I tried the terminal emulator and got adb not found or not allowed or some craziness like that. Does that mean I didn't root like I thought? Also, any clue about the icon s changing or linking to other apps like shes claiming? I'm going to try again when she gets home
In the terminal emulator you would not need to type adb.. adb is the program you would be using on a pc to talk to the phone... what is it that you are trying to type through adb or the terminal?
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
3. Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
step 3. im an ass. ok so dont type the adb. like i said, not much exp in this part... im guessing i dont tye shell either, but i do type mount?
evilsway said:
III: Flashing a Custom Recovery
Flashing a custom recovery will make your life easier when flashing ROMs in the future.
1. Download this file: Recovery.zip
2. Extract file contents to your \tools\ directory of your Android SDK.
3. Open up a command prompt and go to your tools directory, and execute these commands:
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
4. Success! You now have a recovery partition installed on your phone. You can access it by running "adb shell reboot recovery" or by powering off your phone, holding "Volume Up + Power On"
step 3. im an ass. ok so dont type the adb. like i said, not much exp in this part...
Click to expand...
Click to collapse
Oh I see, for that yes you will need to get the SDK setup on your PC as per step 2... There is another thread that has a batch file that does all of this for you. You still need the SDK though.
see: http://forum.xda-developers.com/showthread.php?t=651669
ok, i have the sdk, i followed these instructions to the letter, and i still couldnt get it running last night, where in the sdk do i do this from or is it a command promp, or can i use the terminal emulator?
yes in the command prompt, typically adb.exe will be in your tools folder.
also, and i know im being a pain now, but by adb does it mean the adb in the tools directory of the sdk, i click it and it runs a script then dissapears.
evilsway said:
also, and i know im being a pain now, but by adb does it mean the adb in the tools directory of the sdk, i click it and it runs a script then dissapears.
Click to expand...
Click to collapse
yes, adb needs to be ran through the command prompt, if you click on it in windows it wont work... read the thread I linked you to, you wont need to run adb if you use that method, it does it all for you.
yeah im downloading the file now, but im just curious, now i want to be able to do it just to do it. i hate when i cant figure crap like this out,
so far ive done this, opened command promp, put in C:\androidsdk\android-sdk-windows\tools\adb.exe and it runs a script then nothing
evilsway said:
yeah im downloading the file now, but im just curious, now i want to be able to do it just to do it. i hate when i cant figure crap like this out,
so far ive done this, opened command promp, put in C:\androidsdk\android-sdk-windows\tools\adb.exe and it runs a script then nothing
Click to expand...
Click to collapse
go to start, run and type cmd and enter. then in that window
you have to change to the tools directory at the command prompt like so"
cd androidsdk\android-sdk-windows\tools
then type adb
Renocat said:
go to start, run and type cmd and enter. then in that window
you have to change to the tools directory at the command prompt like so"
cd androidsdk\android-sdk-windows\tools
then type adb
Click to expand...
Click to collapse
Yeah, once you do what he states and type...
cd androidsdk\android-sdk-windows\tools ... or where ever you have your SDK saved at on your computer ... you should be good to start running those scripts in the directions.

Help on how to do this commands !

Hello sir! I just wana ask question on how to run commands like this
su -c /system/etc/CrossBreeder/REMOVE_TETHER_BOOST
i've seen this in the Cross Breeder thread. I just wanna try it to reduce the lag on my phone and maybe also to speed it up!
but if i came across with this unexpected problems . i really dont know how to run this commands. so i just wanna ask . how do i run commands like that? THANKS IN ADVANCE
These commands are run via a terminal emulator on your phone. For this command, your phone have to be rooted.
Alternatively, you can use adb shell. To do so, you have to download the android sdk or google for adb for just downloading the relevant part of it, then you have to run adb root to get root privileges (the adb binary can be found under Path/to/Android-SDK/platform-tools) and adb shell to get a root shell. There you have to type in /system/etc/CrossBreeder/REMOVE_TETHER_BOOST (the su -c is not needed there because you already have root privileges).

[Q] Ematic EGS004 BU Rooting/Kernal Module Issue

Hello,
Veteran SW guy here; but newbie at Android.
I have three tablets. All of them are Ematic Model EGS004. All three were bought for the sole purpose of being used by children to watch educational videos (in mp4 and flv formats) and read PDF documents. Absolutely nothing else. No games. No internet access whatsoever. Etc.
Two of the tablets are still in the box and have not been touched. I'm hoping that they may be useful for making/restoring an original image of the tablets.
To implement the requirements of this project, I did the following to one of the tablets:
1) Used the instructions at http://forum.xda-developers.com/showthread.php?t=2495069 to get root access with Cydia Impactor and Chainfire SuperSU.
2) Installed Titanium Backup (root). Using this, I uninstalled most of the Google applications (excluding Google Play), messager, YouTube, games, etc.
3) Installed File Manager (Explorer) by Rhythm Software.
4) Installed Shell Terminal Emulator by MobilDev. Using the shell, I went to the /system/lib directory and renamed libwifidisplay.so
and libwpa_client.so to libwifidisplay.disabled and libwpa_client.disabled.
Unfortunately, upon reboot, the tablet gets stuck in the bootup screen (with the ematic logo). Obviously, something about Android causes a hang if an expected kernel module is missing...
I tried using the shell in Cydia Impactor. But, the file system was read only. I tried:
mount -o rw,remount /system
But, I get an "Operation not permitted" since I am not root.
I downloaded the ADB bundle for windows at http://developer.android.com/sdk/index.html#download and successfully installed adb on my PC. I could get into a shell with the "adb shell" command. But, the /system/lib directory still is read only and I can't seem to remount it since I am not root.
I tried "adb remount". "Operation not permitted" was the result, again.
Cydia Impactor installs its "su" binary in /system/xbin. I tried running it from there using various invocations like "su -c mount -o rw,remount /system" Each time, the shell hung and I never got a shell prompt afterwards.
Questions:
1) Surely there's a way that I can get back in to rename these files now... I can "ls" them from the adb shell. I can pull them to my PC with adb pull. (adb put doesn't work either since the file system is read only.) Ideas?
2) Once I get this solved, what is the best way to get rid of the wireless capability so that children can never use it? I would like to move videos and PDF's between it and a PC strictly via USB.
3) Is there a way to image/restore one of the untouched tablets - or, for that matter, this one once its up and running like it needs to be?
Thanks everyone!
Jim
Let's try a simpler question since there have been no responses:
Once I get into a shell (non-root) using ADB or Cythia Impactor, I believe I can rename the files if I can only get SuperSU to work. However, when I invoke su, the shell hangs:
su -c ls
su
etc. All of these hang. I assume that SuperSU is waiting for a confirmation from the android display. But, since I'm stuck at the startup screen, there's never an opportunity. How can I get the shell to interact with me as root so that I can remount the file system as RW and rename files?
Thanks,
Jim
rivkah613 said:
Hello,
Veteran SW guy here; but newbie at Android.
I have three tablets. All of them are Ematic Model EGS004. All three were bought for the sole purpose of being used by children to watch educational videos (in mp4 and flv formats) and read PDF documents. Absolutely nothing else. No games. No internet access whatsoever. Etc.
Two of the tablets are still in the box and have not been touched. I'm hoping that they may be useful for making/restoring an original image of the tablets.
To implement the requirements of this project, I did the following to one of the tablets:
1) Used the instructions at http://forum.xda-developers.com/showthread.php?t=2495069 to get root access with Cydia Impactor and Chainfire SuperSU.
2) Installed Titanium Backup (root). Using this, I uninstalled most of the Google applications (excluding Google Play), messager, YouTube, games, etc.
3) Installed File Manager (Explorer) by Rhythm Software.
4) Installed Shell Terminal Emulator by MobilDev. Using the shell, I went to the /system/lib directory and renamed libwifidisplay.so
and libwpa_client.so to libwifidisplay.disabled and libwpa_client.disabled.
Unfortunately, upon reboot, the tablet gets stuck in the bootup screen (with the ematic logo). Obviously, something about Android causes a hang if an expected kernel module is missing...
I tried using the shell in Cydia Impactor. But, the file system was read only. I tried:
mount -o rw,remount /system
But, I get an "Operation not permitted" since I am not root.
I downloaded the ADB bundle for windows at http://developer.android.com/sdk/index.html#download and successfully installed adb on my PC. I could get into a shell with the "adb shell" command. But, the /system/lib directory still is read only and I can't seem to remount it since I am not root.
I tried "adb remount". "Operation not permitted" was the result, again.
Cydia Impactor installs its "su" binary in /system/xbin. I tried running it from there using various invocations like "su -c mount -o rw,remount /system" Each time, the shell hung and I never got a shell prompt afterwards.
Questions:
1) Surely there's a way that I can get back in to rename these files now... I can "ls" them from the adb shell. I can pull them to my PC with adb pull. (adb put doesn't work either since the file system is read only.) Ideas?
2) Once I get this solved, what is the best way to get rid of the wireless capability so that children can never use it? I would like to move videos and PDF's between it and a PC strictly via USB.
3) Is there a way to image/restore one of the untouched tablets - or, for that matter, this one once its up and running like it needs to be?
Thanks everyone!
Jim
Click to expand...
Click to collapse
Erratic Ematic
rivkah613 said:
Let's try a simpler question since there have been no responses:
Once I get into a shell (non-root) using ADB or Cythia Impactor, I believe I can rename the files if I can only get SuperSU to work. However, when I invoke su, the shell hangs:
su -c ls
su
etc. All of these hang. I assume that SuperSU is waiting for a confirmation from the android display. But, since I'm stuck at the startup screen, there's never an opportunity. How can I get the shell to interact with me as root so that I can remount the file system as RW and rename files?
Thanks,
Jim
Click to expand...
Click to collapse
I rooted my son's EGS004, installed busybox, and played around with it without any apparent problem. When I rebooted it, I was prompted to set up the device then and every subsequent time I rebooted it. I could not install any apps and could not redo the Cydia Impactor rooting procedure. The reason was that /data was reporting itself as 0.00B in size. Factory reset didn't change anything. Ematic wants me to return it.
Your issue sounds different, but it could be something as simple as the device being very unforgiving. There's a pinhole with a reset button (never worked for me but tech support suggested it) which may help.

[Q]

Hi,
I'm trying to run a bash script on Android without root access (Nexus 4) using Terminal IDE app. Script fails with output "parent shell dies". I tried to run the same script on Ubuntu on Android phone with root access and script worked fine. In both cases I used the same version of bash shell. Does anyone know how can I solve this?

[Q] Install git in Busybox?

Good morning,
I've installed busybox and a SSH Server on my Android Phone. Works great. To be able to edit some stuff in the Terminal Emulator or in the SSH Console, I've installed Vim Touch.
Now I wanted to use my general Vim config in that environment. But to use and install Vundle I need the git command. There's no need to upload any stuff. Just downloading is enough. All the Git Apps have a GUI. I would just need git working inside the Busybox environment. Is there a (simple) way to get that?

Categories

Resources