[TIP] How to verify ROM downloads using Total Commander Android app (MD5 sum) - Android Software/Hacking General [Developers Only]

Many of you might be fans of the simple looking file manager packed with customizability and features, Total Commander for Android. And this app also happens to be totally free.
If you haven't heard about it and would like to check it out, go to its homepage or get it from Google Play.
Apart from the app being awesome in itself, its dev Christian Ghisler is a cool guy too. He is very quick in responding to questions, suggestions and bug reports.
(As of now) Total Commander does not have a 1-click solution to calculate MD5 sum of a file. I am used to calculating and verifying the MD5 sum of every ROM zip I download and so having that feature is very important to me. Of course there are other apps like Android File Verifier that do that + more. But I needed just a simple MD5 calculator without having to install any extra app for that.
After spending some time playing with various options in the Total Commander app and a tip from the dev, I was able to put together a neat way to calculate MD5 using TC Android.
SETUP STEPS (Need to do this just once):
1. Click on the "Add button" icon. ( If you don't see that icon, you probably have the secondary row of icons hidden; unhide that secondary row by clicking the rightmost icon on the bottom row of icons ).
{
"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"
}
2. Configure the button as follows:
- Function type: Send shell command
- Command: sh
- Parameters: *md5sum %N ( The * makes the result of the command show up in a popup window. )
- You can change the icon if you want
HOW TO CALCULATE MD5 NOW:
1. Click on the icon of any file for which you want the MD5 sum so that a green tick appears on that icon.
2. And then hit on your newly created MD5 sum calculation button. It will takes few seconds for the MD5 sum calculation to finish if you are doing it for a large file like a ROM zip shown in the example in my screenshots.

Neet!
TCM is ultimate badass
Using U8110, V9. CM7 trough tapatalk

Another one:
Display usage and free space in current partition
(same scheme of pictures as in post#1)
2. Configure the button as follows:
- Function type: Send shell command
- Command: sh
- Parameters: *df -h . | cut -b 23-32,35-50
- You can change the icon if you want
I'm not sure, but I think the Parameters depend on the version of busybox in your device... maybe you have to fiddle around a little
@jazzboyrules: thanks for this thread! Could you change the title to "[TIP] Total Commander Android app: useful tips" or something like that? For sure there are much more ideas for this ingenious app.

jazzboyrules said:
2. Configure the button as follows:
- Function type: Send shell command
- Command: sh
- Parameters: *md5sum %N ( The * makes the result of the command show up in a popup window. )
- You can change the icon if you want
Click to expand...
Click to collapse
Thanks.
Just a minor glitch: use *md5sum "%N"
The quotes will ensure that it works even with file names that contain spaces.
Hmm... For larger files ~200MB (?), I get "Function aborted!" error.

tip for users without root
jazzboyrules said:
Many of you might be fans of the simple looking file manager packed with customizability and features, Total Commander for Android.
Click to expand...
Click to collapse
It should be noted that the method described by the OP, applies to devices with root.
If there is no root, first you need to:
1. install BusyBox Install (No Root) by @Jaredsburrows
2. through the application "BusyBox Install" to install busybox
3. in the application "BusyBox Install" copy environment variable and use the location of the file busybox to define the command sh for Total Commander
Code:
/data/data/burrows.apps.busybox/app_busybox/md5sum %N > %N.md5
In this case, the check sum sent to the file.
.

Thank you so much for this perfect solution!
As more and more often larger checksums are used, one can change the code a bit to calculate the sha-256 checksum of a file.
Just use:
*sha256sum "%N"
Sent from my Fairphone FP2 using XDA Labs

Related

Scripts for Nautilus (Linux file browser)

Hello !
I wrote some scripts for easily pushing and installing files/apks to your android device.
The advantage over "command line" and other scripts like mine :
- Multiple selection allowed (install 100 APKs in one click ! )
- You have a progress bar (shows only the progression between multiples files/ not the state of a single pushing).
- You can choose the destination on your phone with a simple prompt by choosing "Push to ..."
- It's a very simple and lightweight nautilus script...
- You don't have to (in fact, you can't) put the usb in "usb disk" mode, just have debugging enabled.
Examples
To simply install some applications, just select them, right click, go to scripts->ADB->install
{
"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"
}
Progression :
Idem for files :
Progress :
Confirmation :
(So the "Push to ..." allow you to choose a destination. "Push to musique" is just a copy of "Push to sdcard" with the second line of the script changed to copy files to /sdcard/music/ instead of /sdcard/ )
How to install
- Download the scripts :
http://www.itstudents.be/~tom/android/ADB Scripts for Nautilus.tar.gz​- Uncompress the files in ~/.gnome2/nautilus_scripts/ADB/
So if your name is mario, you should copy the 3 files to :
/home/mario/.gnome2/nautilus-scripts/ADB/
You are not obliged to make the last folder named ADB, it's just to make "categories" in the Nautilus script menu (like in the screenshots)​
Requirements
- A correctly installed ADB
What is a correctly installed ADB?
- The PATH environment variable has to be set, to be able to just type "adb" and not "/path/to/sdk/platform-tools/adb". If it's not done :
Edit the file ~/.bashrc , you can do that by typing in the console
Code:
gedit ~/.bashrc
and add this line changed for yourself at the end of the file
Code:
export PATH=${PATH}:/path/to/android-sdk-linux_86/platform-tools/
Or, if this does'nt work :
Edit the file /etc/environment , you can do that by typing in the console
Code:
gedit /etc/environment
and add this text changed for yourself at the end of the line "PATH:", before the last ["]
Code:
:/path/to/android-sdk-linux_86/platform-tools/
- The rules for udev have to be made to allow any non-root user to access to the device
Method for any HTC device :
Edit with root rights the file /etc/udev/rules.d/51.android.rules by typing in the console :
Code:
gksudo gedit /etc/udev/rules.d/51.android.rules
and add the lines :
Code:
SUBSYSTEM=="usb|usb_device", SYSFS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
Hope you'll enjoy !
Please correct my english
don't want people to know what you're listening to, eh?
It's cool; I like it.
very useful
thanks man
I've been wanting to do something like this but never had time to. Will definitely test this out!
Sent from my Nexus One using XDA App
Oh epic win thanks for this!
Sent from my HTC Hero using XDA App
Please reupload ADB Scripts for Nautilus.tar.gz somewhere.
Stupid me...
http://www.kmel.be/~tom/android/ADB Scripts for Nautilus.tar.gz
Please note a little "bug", the progress bar progress when a file start transfer. So if you send just one big file, it will be at 100% for a little time...
Easily correctible, but I haven't the time now...
MappaM said:
Stupid me...
http://www.kmel.be/~tom/android/ADB Scripts for Nautilus.tar.gz
Please note a little "bug", the progress bar progress when a file start transfer. So if you send just one big file, it will be at 100% for a little time...
Easily correctible, but I haven't the time now...
Click to expand...
Click to collapse
nice work. very handy
EDIT: actually I may have spoke too soon, these don't seem to be working for me. Ubuntu 10.10
I know my udev and $PATH are all set up correctly. So I'm not sure where these are failing for me..
any thoughts?
EDIT2: OK it was a $PATH issue the ~.bashrc however is only for interactive non login shells adding the adb path to ~.profile and a re-login solved my problem with this script. Or alternatively you could call adb in the script using it's full path.
Thanks MappaM for the great base script!
Here is my version of "Push to Movies":
My solution to the immediately full progress bar was to use the --pulsate option in zenity this works for me because I am likely to only be sending one file anyway and don't need the fine grain feed back of an incremental progress bar. The one that bounces back and forth is what you will see.
echo "15" ; sleep 1
is a hack, you may not need it but for me it lets the pulsate flag work.
zenity bugs reported here
https://bugs.launchpad.net/zenity/+bug/291850
https://bugzilla.gnome.org/show_bug.cgi?id=567663
Code:
#!/bin/sh
#this is MY path, your path will be different . change this path.
android_path="/sdcard/media/video/movies/"
i=1
(
for thing in "[email protected]"
do
# this first echo tricks the pulsate into working you may not need it. try it both with and without it.
echo "15" ; sleep 1
echo $(($i * 100 / $#))
echo "# Pushing \"${thing}\"" ;
adb push "${thing}" $android_path
i=$(($i+1))
done; i=$(($i-1)) ; echo "# $i files pushed." ) | zenity --progress --pulsate --auto-kill --width=300 --text "Copying files..." --title "Pushing files to $android_path"

[tool] AIPPackager and Installer - create installers for your RT Desktop apps [14/01]

This version/thread retired
new version - with source - can be found here: http://forum.xda-developers.com/showthread.php?p=36854150
This release composes of two parts:
The RTDPackager which creates an AIP file, and AIPInstaller which is the installer for these AIP files.
V1.1 of RTPackager release - now fully functional.
AIPInstaller Usage
Place the exe file and associated DLL in a folder somewhere sensible. I have not tested in ProgramFiles yet but the app elevates UAC so should be ok.
Double click on any AIP file (I include one as an example) and windows willl show 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"
}
select 'more options' which will show this:
check the check box at the top and then click 'Look for another app on this pc'
A browse dialog will open - find and select AIPInstaller and you are done. You only need to do this the first time. I intend to add an auto install to this, so in future you can just double click the installer and it'll set itself up, but till then...
From now on, you can double click an AIP file and the installer will pop up. Usually just hitting 'install' will be all you need to do (there are some advanced functions like disabling the install batch if it exists, and changing the install path which isnt really recommended)
RTDPackager Usage
This utility is designed for creating AIP files. Its worth paying note that the AIP format is designed for repos more than it is the installer - so there are a lot of details here which the repo can use to make you app more visible.
V1.1 now has full open and save support.
Save will save a template XML, which can be loaded later with the Open button. Open will also open an existing AIP file and fill in the details.
Create Package no longer saves in the same place as the files being packaged - it opens a save dialog.
The browse button will now work and populate the run EXE field and the folder field.
some details:
AppName is the display name - and the install folder - so avoid \'s and such. If you change this in an update, it will get installed to a new folder.
Updates are detected based on the App GUID. Change this, it will appear as a new app - use the same GUID on more than one app and you will have conflicts. The generate button for GUID *DOES* work - you should only use it on the first release of your app - and for the time being, keep it safe for any updates.
Run EXE is the exe that will be launched by the store when the user asks to run it - and if a shortcut name exists, will be placed in the start menu.
Install/uninstall batch files are option batch files for installing/uninstalling registry settings and the like. There is currently no uninstaller, but the store app should have this built in - the uninstall batch is NOT for deleting files - the store will handle that.
App version number is a REAL number. ie. 1.03 is ok. 1.0.3 is not.
App category is for placing your app in a 'folder' - it is free form, with | splitting. Anyone can create a new category this way and its not up to the repo manager to manage this. Obviously it will work better if we have sensible categories such as 'Apps|Browsing' or 'Emulators|GameBoy' - while its totally possible to do 'djboo|prerelease|funthing' - i hope we dont do that.
DOWNLOADS
First Release of AIP installer: http://forum.xda-developers.com/attachment.php?attachmentid=1644222&stc=1&d=1358172785
V1.1 Release of RTD Packager: http://forum.xda-developers.com/attachment.php?attachmentid=1644631&stc=1&d=1358184708
Example AIP file (is in a zip as XDA wont allow the AIP extension): http://forum.xda-developers.com/attachment.php?attachmentid=1644224&stc=1&d=1358172785
reserved
Note: Once the RTD Packager is complete, code will be shared for both - that should be tonight.
Nice work so far, haven't tested all elements of it yet but it looks pretty good! Keep up the good dev work!

[PROJECT][PORT] Go4Droid v1 | write,run,compile Go Lanuage codes on your 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"
}
about Go Language
Go, also called golang, is a programming language initially developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.It is a statically-typed language with syntax loosely derived from that of C, adding automatic memory management, type safety, some dynamic-typing capabilities, additional built-in types such as variable-length arrays and key-value maps, and a large standard library. Beyond that broad category, Go is defined by:
-A syntax and environment adopting patterns more common in dynamic languages:
Concise variable declaration and initialization through type inference (x*:= 0 not int x = 0.
-Fast compilation times.
-Remote package management (go get).and online package documentation
-Distinctive approaches to particular problems.
-Built-in concurrency primitives: light-weight processes (goroutines), channels, and the select statement.
-An interface system in place of virtual inheritance, and type embedding instead of non-virtual inheritance.
-A toolchain that, by default, produces statically linked native binaries without external dependencies.
-A desire to keep the language specification simple enough to hold in a programmer's head,in part by omitting features common to similar languages:
no type inheritance
no method or operator overloading
no circular dependencies among packages
no pointer arithmetic
no assertions
no generic programming
about Go4Droid
Although Go is a Google project ,it has not option for building for Android !Also It has there is no way to use it on your Android device and do compiling(instead of cross-compiling) (beacuase it does not building for external host and target).All this reasons made me think about this project and finally I ported a complete set of Go compiler, Go linker, Go Packages and also net support !.
You can easily write go codes , compile them, run them and install them. There are lots of packages which let you write amazing programs.
prequisites
minimum :
- Root privilege
- ARMv7 (vfpv3) SoC.
- Android +1.6 (linux kernel +2.6)
- 80 MB free space in system partition
- CWM/TWRP installed
suggested :
- Root privilege
- ARMv7 (vfpv3) + NEON SoC.
- Android +4.2 (linux kernel +3.4)
-150 MB free space in system partition
- CWM/TWRP installed
installation
- Download zip file.
- Install CWM/TWRP.
- Ready !
usage
This thread is not supposed to be a GoLang tutorial , however I explain main options.
* Do not forget to get root before anything :
Code:
su
1- Use this command to run a .go file (file = helloworld.go):
Code:
go run helloworld.go
2- Use this command to compile a .go file and generate an executable :
Code:
go build helloworld.go
./helloworld
3- Use this command to compile & install a code file:
Code:
go install helloworld.go
helloworld
example
Code:
package main
import "fmt"
func main() {
fmt.Println("Hello, World")
}
download
Go4Droid v1
*intial release
help the project
Every single build takes +30 minutes on my Android device so it would be difficult to manage this project. You can help me by donating me a VPS/Dedicated server then I will be able to update and manage this project faster and better.
reserved
Well done man! I'm trying it now
Will report results soon
I 've spend +10 hours on this project for 0 people using it !
That's great, man. You beat Google to it!
This looks interesting, but without access to the UI or Android APIs, we're pretty limited, right?
raveur said:
That's great, man. You beat Google to it!
This looks interesting, but without access to the UI or Android APIs, we're pretty limited, right?
Click to expand...
Click to collapse
There is no Android JNI support yet (and unfortunately no plan to do it). However it has a great builtin API with net,archive,fs,os,image,... support.
Great project,
Thanks for that.
Still no NDK support for Go?
myfreeweb said:
Still no NDK support for Go?
Click to expand...
Click to collapse
Go has no Android JNI support thus there is no Go support in NDK .

[MOD] UnBloatMi - Xiaomi MIUI Bloatware Remover

UnBloatMi - Xiaomi MIUI Bloatware Remover
I have been searching for a script to remove Bloatware from my Xiaomi Redni Pro, and found a couple of different ones that do part of the job.
None were exactly what I was looking for, so I wrote a script of my own.
Although I tested the script on Redmi pro and MI5s only, it should be very usable for any Xiaomi device running MIUI 7 or 8.
In UnBloatMi I have combined multiple lists of MIUI 7 and 8 apps that should be safe to remove.
It also contains a couple that are less safe to remove, but the script will ask for confirmation before removing those.
Which is a big difference from other scripts; you get to choose what to remove and what to restore!
Backup location:
If you edit the script, you can change the backup location to use (by default "/sdcard/UnBloatMi")
You can of course also add more apps to remove to the list in the script. (instructions are in the comments)
It's not needed to remove files from the list, as it will not process files that are not on your device, and you can choose not to remove any app.
To Customize the Script:
Unzip the zip and edit the file under: META-INF\com\google\android\update-binary
This script is written in shell language (sh), so editing is somewhat different from "normal" EDIFY scripts that use the "updater-script" file.
I used part of the excellent template by osm0sis to create UnBloatMi
Install Custom Apps/Files:
You can also have the script install Custom files to /system folder. (So you can add another HomeLauncher, for example)
To have the script install Custom files, just add them to the Zip in "/system/app/" folder:
/system/app/YourCustomApp1/YourCustomApp1.apk
/system/app/YourCustomApp2/YourCustomApp2.apk
The script will automatically install them for you.
To use the Script:
You need to have TWRP Recovery installed.
BACKUP YOUR DEVICE BEFORE RUNNING THIS SCRIPT!!! (I recommend using TWRP Backup)
(even though the script allows you to restore your changes, something can always go wrong - press wrong button for example)
- Move the ZIP file to your SDCard, and install using TWRP Recovery
Basically, you can just follow the instructions on the screen, by pressing Volume buttons.
- The first run, you'll be asked what apps to remove. Backups are automatically made.
You can confirm each app, or choose to only confirm the more risky apps.
- If you run the script again (after testing your installation), it will detect the backups from the previous run.
You can then choose to restore the backup files, or delete them from your device.
- You can now also create a default UnBloat list, that can be used to UnBloat after flashing a (new) ROM.
It is created by checking for installed apps. If an app is not found on the device, it's added to the list
{
"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"
}
Feel free to edit and change the script.
If you make any improvements, please let me know so I can add them to the script.
This includes reporting what apps caused problems when removed, or comments about apps.
You can find the script in: /META-INF/com/google/android/update-binary (or on GitHub by clicking the "Source Code" link below)
Instructions can be found in the comments of that file.
--UPDATE--
Added Step by Step Restore: You can now choose which apps to restore, so it is easier to troubleshoot your installation.
--UPDATE v0.2--
Added warning to SecurityCenter App (so it has to be confirmed). It caused bootloop on my device when removed.
--UPDATE v0.3--
Bugfixes, Added Apps, changed and added some app comments. Changed download link (GitHub download creates a folder too many)
--UPDATE v0.4--
Changed/Added menu's - Allows you to do more actions at once
Added apps and comments.
Added ability to save a default UnBloat list. This can be used to UnBloat after flashing a ROM.
Download
Source Code
Developer

[TOOL] GMADB - GUI based minimal ADB [15-08-2020]

GitHub: https://github.com/yadev64/GMADB
Current version: GMADB v0.2 Beta
{
"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"
}
GMADB is a GUI based Minimal ADB that helps you work on modifying your Android device via the Android Debug Bridge. This program helps you to speed up your process of sideloading an update to your android device by making the UX easier. It has four main functionalities:
1. Select and Flash - This allows you to simply select the .zip or .img file of the update and flash it with just a single click. All the process happening will be displayed on the blackBoard (the big black textbox that looks like a terminal window).
2. ADB Devices - With one click, it displays all the available/connected devices on Android Debug Bridge (ADB).
3. Custom Command - This helps you to execute custom shell commands from the app, making it easier for you to do any operation without going to cmd.
4. Log recorder - The application generates a log file of all your activities, which will help you to debug or evaluate all the errors, outputs and everything that was on the blackBoard. (Will be available from the next update)
Click to expand...
Click to collapse
Example: Let's assume that you want to install a custom rom (assume, HentaiOS) on your phone (assume Redmi Note 7 pro).
step 1: Click on the "Select ROM" button. Select the .zip file from the file explorer window that opens up. The selected filename will be displayed and the Flash button will become active (Bright green color).
step 2: Click the "Flash" Button. Wait for the process to complete. Do not close the window until you see the success message on the screen. (In the current version, real-time process output streaming is not available (will be fixed in the upcoming updates), so DO-NOT close the window assuming that the process is not happening. Please refer the phone for the process progress information.)
Click to expand...
Click to collapse
Known bugs:
1. The results/output shown on blackBoard is not real-time. Output appears only after the completion of the process
2. Runs on a single thread
3. Log Generator yet to be implemented
Click to expand...
Click to collapse
Thanks to:
1. *Google for developing ADB and Fastboot
2. shimp208 for the minimal ADB
Click to expand...
Click to collapse
Are you a developer and want to contribute? Click here for the GitHub Repo
Download: GMADB v0.2 Beta
does this installs adb drivers? btw thank you

Categories

Resources