Who needs cute apps with huge footprints and their server counterparts running in our computers when we've got good ol' SSH. Here's how you do it.
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts
Thursday, December 15, 2016
Sunday, June 19, 2016
SSH For Android - For The Ones Who Are Fed Up With Fancy Apps
After batteling the ever-great, mighty overlord of hell Lucifer Morningstar himself for over 666 minutes I finally managed to compile dbclient+dropbearkey for API level 21 and above. ( Lollipop+ ) It only supports public key authentication because getpass() wouldn't work on Android _yet_ . Boy Android NDK really is a mess. ( Either that or I'm stupid. )
Here's the git repo.
Most of my knights have already fallen in battle and it's almost sunrise. So I don't have the strength, time or courage to finish the job and do sshd ( dropbear ) too. Maybe another time when my armies are back on their feet.
Wednesday, January 20, 2016
Boot your PC from your Android
NOTE: This requires your android device to have "Connect as CD-ROM" (or equivalent) option otherwise it won't work. If your device doesn't have this feature you'll have to manually mount an ISO in your android and connect the device to the computer as a CD-ROM although I don't know how to do the latter. Figured it out? Let me know in a comment. :)
Once you're able to connect the device as a CD-ROM, locate the iso file the system mounts. You can do this by opening a root shell and issuing
find . -name \*.iso
If multiple results are returned you'll know what's the right one because every other iso except the one we need is yours. Seriously who stores ISOs on mobiles?
In my case it was iAmCdRom.iso in /system/etc/
This is the file you need to replace with a bootable iso. (The excact path and filname might be different from mine.)
I found this little distro TinyCore which is like 15MB and even has a GUI. Really fits the need and easy to use even for a total newb.
Mount the partition rw, replace the file, remount CD-ROM (usually /mnt/cd-rom) [or just give a reboot]. And now you have a fully functional on-the-go linux distro, anywhere and whenever you need it. It will boot like any other live cd boots.
It looks like this when run...
Leave a comment if anything went wrong though I guarantee NOTHING. :)
PS: If TinyCore GUI doesn't show up try
sudo tce-setup startx
Monday, January 4, 2016
Minimum Brightness + Turn Off Button Backlights on rooted Android.
Needless to say, it needs ROOT. --> Root your Dialog Optima 2 here..
In case it doesn't work on your device, just leave a comment with a file explorer ( or even better shell ls -l ) screenshot of "/sys/class/leds/". I'll give you a fix asap. Even better, see the source below. :)
PS: If you can make a better ui and stuff, just publish it as your own. I won't mind. :)
Saturday, January 2, 2016
Dialog Optima 2 Unstable SuperSU Fix/Workaround
The title says it all, this is not a permanent solution. Just a workaround until Chainfire fixes the SuperSU to work with these newer China devices. If your device is stable and all, please don't proceed. Though this is for DOptima2 A130, it could work on other rooted L5.1/22 devices. If your Optima2 isn't rooted yet, get it rooted.
Till SuperSU is fixed, we'll use ToggleSU, a little apk I made to toggle "suability". It doesn't offer any advanced features you get from SuperSU or any other superuser apk. It doesn't even prompt you if an app asks for permission. To toggle su is all ToggleSU can do. Before proceeding any further make a full backup of your device. Just backing up /system/xbin/su would be enough, but I can't guarantee anything.
Unzip this archive to /sdcard/togglesu
This is NOT a flashable zip, it just contains some files that we'll be using to install ToggleSU.
Then connect your device to an adb configured computer. Avoid trouble, use Linux. :)
Open an adb shell, then issue the following.
su
and ONLY IF this succeeded and you got a root shell like the image below, continue. Otherwise, you have either denied SuperSU or your root is broken. Get it fixed first.
Disable SuperSU using Settings > Apps > All > SuperSU > Disable
(Yes disable it, we won't be needing it anymore)
Now in the root shell, issue the following.
cd /sdcard/togglesu chmod 751 installsu ./installsu
If it returned nothing, you're ok. Otherwise, something went wrong. Restore from backup if necessary.
Now exit the root shell, and disconnect the device from the computer.
Open your file manager, install the apk in /sdcard/togglesu/
If everything went alright your suability should toggle when you press the Toggle button. Test it a few times using the adb shell, or terminal emulator.
Unlike SuperSU this cannot prompt you when an app asks for root access. Instead you'll have to toggle the lock before running that app.
It's still a beta, so... tell me if anything goes wrong. Such simple app can't go wrong but you know.. :D
PS: A root app should be opensource, so does everything else. Here's the source.
PPS: Delete the /sdcard/togglesu folder if you don't need it anymore.
Unlike SuperSU this cannot prompt you when an app asks for root access. Instead you'll have to toggle the lock before running that app.
It's still a beta, so... tell me if anything goes wrong. Such simple app can't go wrong but you know.. :D
PS: A root app should be opensource, so does everything else. Here's the source.
PPS: Delete the /sdcard/togglesu folder if you don't need it anymore.
Sunday, December 27, 2015
Dialog Optima 2 Custom Recovery + Root
Well peeps, it hasn't even been a month since the phone was released but as I had access to a pre release device, I had some more time playing with the device. This device however was a slightly different story when it came to rooting. After trying almost all the one click root apps and windows software (damn I even installed Windows on a 70GiB partition on my precious Linux box. :/ ) I kinda “knew” this cannot be rooted that way. The only option seemed to be compiling/porting a custom recovery and flashing root zip using the recovery. Again, no auto port worked and when I've finally found a link to the original compiler and asked him for help/advice his reply was something like “There's a problem with some mt6580 devices” and that's that. So I had to do a manual port/compile. Compiling a recovery was kinda out of range as I'm running so low on space.
So I HAD to port, manually. But with what? There was almost no device that fits the device specs/build version etc. The Doogie X5 was kinda OK but I didn't go anywhere farther than a bootloop with that. So I kept searching and searching for like two weeks. And after crawling through almost every China phone forum and with the use of some Google dorks, I found two devices with the exact custom build. (Lucky me eh?)
Fly FS504 Cirrus 2 and Nomi i504. And now I had to find if anyone had compiled a recovery for any of them. The thing was, the forums were in Russian. So with “excellent” Google translate I finally found a TWRP for the Nomi. A little play with the props,fstabs, init.rcs and the kernel, voila!
Yeah yeah I know you don't wanna here my story but just DEAL WITH IT!
Now to the actual thing.
Configure adb, fastboot on your machine. Ubuntu/Aptitude users, do (I know you already have these but in case you don't)
And fix the udev rules. Don't forget to restart udev.
Windows users? Use Google.
Enable USB Debugging and Unknown sources and toggle the “Allow OEM Unlocking” option. Now check if adb and fastboot work.
Fire up a terminal, do some stuff like
Before flashing anything we need to unlock the bootloader, do,
Once you've unlocked the bootloader, flash the recovery.
Yeah yeah I know you don't wanna here my story but just DEAL WITH IT!
Now to the actual thing.
Configure adb, fastboot on your machine. Ubuntu/Aptitude users, do (I know you already have these but in case you don't)
sudo apt-get install android-tools-adb android-tools-fastboot
And fix the udev rules. Don't forget to restart udev.
Windows users? Use Google.
Enable USB Debugging and Unknown sources and toggle the “Allow OEM Unlocking” option. Now check if adb and fastboot work.
Fire up a terminal, do some stuff like
adb reboot bootloader fastboot reboot
Before flashing anything we need to unlock the bootloader, do,
adb reboot bootloader fastboot oem unlock #if this doesn't work try fastboot oem unlock 0x0e8b
Once you've unlocked the bootloader, flash the recovery.
fastboot flash recovery recovery.img fastboot reboot
When rebooting hold Volume Up + Power. You will see the “Punisher” face and then taken to the TWRP. If this doesn't happen, you fucked up somewhere. Figure out where you did wrong, fix it.
Now to the actual rooting, though TWRP has its own rooting functions it's a little messy and broken. So we'll flash the superSU.zip manually. Do,
Then in the recovery INSTALL >> select “superSU.zip” >> slide to the right.
Once it's done, wipe cache partition and reboot. And congratulations, you got yourself a rooted device. Use Root Checker to check root.
NOTE: Even the superSU is not so compatible with the device yet. So we cannot use “Prompt”, until it's fixed we will have to use “Grant”. Other superuser applications didn't even work. So if you got anything better, please tell us. :)
bb.
tl;dr
Now to the actual rooting, though TWRP has its own rooting functions it's a little messy and broken. So we'll flash the superSU.zip manually. Do,
adb push superSU.zip /sdcard/
Then in the recovery INSTALL >> select “superSU.zip” >> slide to the right.
Once it's done, wipe cache partition and reboot. And congratulations, you got yourself a rooted device. Use Root Checker to check root.
NOTE: Even the superSU is not so compatible with the device yet. So we cannot use “Prompt”, until it's fixed we will have to use “Grant”. Other superuser applications didn't even work. So if you got anything better, please tell us. :)
bb.
tl;dr
Subscribe to:
Comments (Atom)







