I AM TRYING TO MAKE A FOLDER. TO MAKE A CUSTOM SPLASH SCREEN BUT I DON'T KNOW HOW TO COMPLETE THIS STEP....[Open a command or terminal window and CD to your nbimg folder.
Type in the following command: nbimg -F splash1.bmp -w 480 -h 800
If successful, nbimg should have created an nb file called 'splash1.bmp.nb'.
Rename 'splash1.bmp.nb' to 'splash1.img'.]... I HAVE THE "NBIMG" FOLDER. AND MY CONVRTED IMAGE. I JUST DON'T KNOW TO "CD" TO IT OR WHEN TO TYPE IN THE COMMAND AFTER THAT TO COMBINE THE TWO.....USING COMMAND LINE IS LIKE FRENCH TO ME... PLEASE HELP..
mbancroft41 said:
I AM TRYING TO MAKE A FOLDER. TO MAKE A CUSTOM SPLASH SCREEN BUT I DON'T KNOW HOW TO COMPLETE THIS STEP....[Open a command or terminal window and CD to your nbimg folder.
Type in the following command: nbimg -F splash1.bmp -w 480 -h 800
If successful, nbimg should have created an nb file called 'splash1.bmp.nb'.
Rename 'splash1.bmp.nb' to 'splash1.img'.]... I HAVE THE "NBIMG" FOLDER. AND MY CONVRTED IMAGE. I JUST DON'T KNOW TO "CD" TO IT OR WHEN TO TYPE IN THE COMMAND AFTER THAT TO COMBINE THE TWO.....USING COMMAND LINE IS LIKE FRENCH TO ME... PLEASE HELP..
Click to expand...
Click to collapse
Ok I see no one has answered this so I'll try to take a stab at it.
I've never made a custom splash screen, however, I know my way around a command prompt. I'm assuming that your nbimg folder is on the root of your C:/ drive correct?
If that is so then in a fresh command prompt and type "cd c:\nbimg" now you should be in that folder. If its in a different folder like..idk.. programs files. then you would type cd c:\program files\nbimg, ya see?
Now that your in that folder type "nbimg -F splash1.bmp -w 480 -h 800". Hope that helps out some, if there is anyone else that can shed some more light please take this by the horns.
no actually its in my user \down load folder. should i save it to the root of my c: drive. ....or i would have to figure out what the command for my "downloads" file is ... but I think i'll move it to the root. cause you already gave me the command for that thanks........and yes your the first one to answer on three different fourms i have the same question in..... so thanks so much for your help...
mbancroft41 said:
no actually its in my user \down load folder. should i save it to the root of my c: drive. ....or i would have to figure out what the command for my "downloads" file is ... but I think i'll move it to the root. cause you already gave me the command for that thanks........and yes your the first one to answer on three different fourms i have the same question in..... so thanks so much for your help...
Click to expand...
Click to collapse
Your very welcome. If you can move it to the root of the C: drive then Id do it.
If not then right click in your nbimg folder and click properties and look at your location (ex. C:\users\download). Now, just CD-change directory to that folder with the addition of \nbimg. so it'd look like "C:\users\download\nbimg". Its a little more work but it will give you a little more command prompt experience.
ok... now that it is explained.. it sounds simple.. thanks again
ok.. command line read: c:\users\my name> .. I typed in about three different things but i got it to read: "c:\>" with out the quotations of course by typing in. " cd c:\ "..... but cant get it to the file.....when i type "nbimg" it says " 'nbimg' is not recognized as an internal command opperate program or batch file........ i have relocated the said file to the root of my C drive like u suggested...any ideas????????
ok played around for a while and got it i think.... I found out how to type command in right.. and it spit a whole bunch of stuff back to me.....to bad you cant copy and paste from cmd line window.. cause i sure aint typing all that.. thanks for your help. alot of thanks been waiting two days to get some kinda answer....
mbancroft41 said:
ok played around for a while and got it i think.... I found out how to type command in right.. and it spit a whole bunch of stuff back to me.....to bad you cant copy and paste from cmd line window.. cause i sure aint typing all that.. thanks for your help. alot of thanks been waiting two days to get some kinda answer....
Click to expand...
Click to collapse
You can copy and paste my friend!!! Right click and click paste
c:\nbimg>nbimg -f splash1.bmp -w480 -h800
=== nbimg v1.1
=== Convert NB <--> BMP splash screens
=== (c)2008 Pau Oliva - pof @ xda-developers
nbimg: unknown option -- f
Usage: nbimg -F file.[nb|bmp]
Mandatory arguments:
-F <filename> Filename to convert.
If the extension is BMP it will be converted to NB.
If the extension is NB it will be converted to BMP.
Optional arguments:
-w <width> Image width in pixels. If not specified will be autodetec
.
-h <height> Image height in pixels. If not specified will be autodete
d.
-t <pattern> Manually specify the padding pattern (usually 0 or 255).
-p <size> Manually specify the padding size.
-n Do not add HTC splash signature to NB file.
-s Output smartphone format.
NBH arguments: (only when converting from BMP to NBH)
-D <model_id> Generate NBH with specified Model ID (mandatory)
-S <chunksize> NBH SignMaxChunkSize (64 or 1024)
-T <type> NBH header type, this is typically 0x600 or 0x601
awasome it was just done different then the normal right click and right click paste.so the info it sent back to me is it saying its missing something or did it create the file
sounds like it completed
Related
I was in the middle of a nandroid backup, and accidentally entered "adb shell", then exited.
But now, even after power off and reboot, when I "adb shell" I get a prompt that looks like this:
Code:
/ #
instead of the usual
Code:
#
ls gives:
Code:
/ # ls
cache etc proc sd-ext tmp
data init res sdcard
default.prop init.rc root sys
dev mtdcache sbin system
"adb logcat" returns
Code:
/sbin/sh: exec: line 1: logcat: not found
"adb remount" gives
Code:
remount failed: Invalid argument
What is that slash?! It's scary! Is something wrong?
HELP!
When are you running adb shell? What ROM? Details!
The / # means 1) You're in the root folder ("/") and 2) You're the root user ("#").
drmacinyasha said:
When are you running adb shell? What ROM? Details!
The / # means 1) You're in the root folder ("/") and 2) You're the root user ("#").
Click to expand...
Click to collapse
There is no ROM -- I just wiped!
I've never seen the "/" before ... what would make it suddenly appear?
you mean in recovery? that means you're in recovery.
It's fine. Mine does that too when I'm in recovery. Flash something and move on.
drmacinyasha said:
When are you running adb shell? What ROM? Details!
The / # means 1) You're in the root folder ("/") and 2) You're the root user ("#").
Click to expand...
Click to collapse
This. Yes it is an indicator of your current location within the filesystem. Think of it as a reminder when you perform file operations (say you want to delete all the files in the /crap folder but you forget to to a 'cd crap' before the rm command... yes it would be bad)
I know that in most *nix systems, the "/" means root folder ... but I've been using adb for 2 years now and I've never seen my prompt change to anything other than "#".
Even if I cd to another directory, the prompt doesn't change ... it's still "/ #". And if "/" were the current dir, I would think it would be "# /" and then change when I changed dir...
Now the "/" is gone, but when I "ls", the listing is all in a single column, rather than tabbed across the screen.
I'm just baffled why my shell would change randomly like this when I haven't done anything besides wiping ...
d0g said:
I know that in most *nix systems, the "/" means root folder ... but I've been using adb for 2 years now and I've never seen my prompt change to anything other than "#".
Even if I cd to another directory, the prompt doesn't change ... it's still "/ #". And if "/" were the current dir, I would think it would be "# /" and then change when I changed dir...
Now the "/" is gone, but when I "ls", the listing is all in a single column, rather than tabbed across the screen.
I'm just baffled why my shell would change randomly like this when I haven't done anything besides wiping ...
Click to expand...
Click to collapse
yea it's recovery. it always does that when i'm in recovery.
Let's pretend you're running Mac OS X or Linux. You might have your adb and fastboot files in a directory such as:
Code:
~/Android/
Which means to execute the command you have to
Code:
cd ~/Android/
then execute
Code:
./adb
You must be thinking, "There has to be a similar way!" Well, there is!
Code:
sudo cp ~/Android/adb /usr/bin
followed by
Code:
sudo cp ~/Android/fastboot /usr/bin
Now, all you have to do, no matter what you're present location in your file system is to simply type whichever command you want. This will probably speed up using the commands and make your time in terminal a little easier.
It is much more efficient to add the ~Android dir to PATH.
If you ever update your android sdk you'd have to copy the files again.
so better:
Code:
export PATH=~/Android:$PATH
if you want it persistent just change your ~/.profile file (depending on your distribution)
same would work in Windows, there you have to set PATH in the system settings.
Things you will need:
Cygwin- http://www.cygwin.com/setup.exe
ADB- http://developer.android.com/sdk/index.html
Loki Patch source- https://github.com/djrbliss/loki
These are the steps i took to compile and use loki_patch.
I will assume you have the android sdk setup and ready, I will assume your SDK is under c:/AndroidSDK(this is how mine is setup)
Pulling aboot.img using adb:
You can copy cmd.exe into the folder where adb is located and run it from there so you do not have to navigate to the folder manually, or just run cmd.exe and navigate to the adb folder, for me it is c:\AndroidSDK\sdk\platform-tools.
Once you are in your adb file path and your phone is connected and in debug mode follow these instructions to pull aboot.img from your phone.
Original instructions from djrbliss here https://github.com/djrbliss/loki
[email protected]:~$ adb shell
[email protected]:/ $ su
[email protected]:/ # dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=/data/local/tmp/aboot.img
[email protected]:/ # chmod 644 /data/local/tmp/aboot.img
[email protected]:/ # exit
[email protected]:/ $ exit
[email protected]:~$ adb pull /data/local/tmp/aboot.img
3293 KB/s (2097152 bytes in 0.621s)
Now you should have the file aboot.img in the platform-tools folder(where the adb.exe file is located)
Copy this file to your desktop so you know where it is.
Installing gcc with Cygwin:
Original Instructions came from here http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html
Step 0: Download and run the cygwin installer.
Step 1: Select “Install from Internet”
Step 2: Install to default location
Step 3: Use default local package directory (click next)
Step 4: Use whatever internet connection settings (click next)
Step 5: Select a mirror (use the one already selected, click next)
Step 6 (a): In the “Select Packages” expand “Devel”:
Step 6 (b): Select gcc, gdb, and make
Step 7: click next and follow the rest of the installation instructions.
Ok, now that gcc is installed we can compile the loki_patch source to make the executable.
Go here https://github.com/djrbliss/loki
You should see a file called loki_patch.c, click this link and it will open and you can see all the code.
Select the code from top to bottom and right click, copy.
Now right click on your desktop and select new> text file.
Open this text file and paste the code into it, go to file and save as loki_patch.c (make sure you have your file extensions turned on so you can save this as a c source and not a txt file).
We should now have a file called loki_patch.c on the desktop, keep it there for now.
Open up windows explorer and navigate to the following:
c:\cygwin\home\<username>\
(You will see a few files and a kitchen folder)
Create a new folder in here called compile.
Now, let's go back to the desktop and copy loki_patch.c and aboot.img and paste those into the compile folder you just created.
Go ahead and run cygwin.
Now we need to change directories, so let's type the following:
cd compile
We should now be in the compile folder.
Lets compile this code so we can use it, type the following command:
gcc loki_patch.c -o loki_patch
We should now have a file in the compile folder called loki_patch.exe( windows added this .exe, the file extension can be left alone or deleted)
Now you need a boot.img file to patch, grab one from a rom or kernal and copy this into the compile folder.
Once all the files are in the compile folder run the following command to patch the boot.img file:
./loki_patch boot aboot.img boot.img boot.lok
We should now have a boot.lok file in the compile folder, hope this helps and i hope i didnt leave anything out, i will try and update this with screen shots later.
Nice work..thanks
C13v3r0n3 first link is Broken: Cygwin, my friend!!
TheAxman said:
Nice work..thanks
Click to expand...
Click to collapse
And that's why you guys rock because that's all greek to me.
"If you ain't first yer last"
Sent from my rockin ATT S4
I was wondering if I could mount an empty.img file so that I could add executable into it and chmod 777 them or what ever the number is maybe 666.
Then I would add the location to my $PATH variable in the "/system/etc/mkshrc" file so I could execute those programs from any directory.
What say you?
Has this been done before?
It works!
Well, I wen ahead and tried it out, I figured "What the hell, its not like I have to format my sd card." It worked!
So what I did
1) I changed directories to Downloads. ("cd ~/Downloads")
2) I created a directory for my image in Downloads, and moved into it. (mkdir image && cd ./image)
3) I created an empty 4 gig image called apps.img using dd ("dd if=/dev/zero of=apps.img bs=1MB count=0 seek=4096")
4) I formated it to ext2 ("mke2fs -F apps.img")
5) I used adb to push it to my phone ("adb push ~/Downloads/image/apps.img /storage/sdcard0/Download/")
6) Then on my phone as su I mounted the image ("mount -o loop '/storage/sdcard0/Download/apps.img' '/data/local/mnt' ") {with single quotes around the directories, the double quotes wrap the whole actual command, you don't need them} [EDIT: I used bash on the phone to do this, ie I "su" [enter] ; "bash" [enter] ; "THE ABOVE COMMAND" [enter]
7) To test I used the python interpreter as my executable so I created a folder in /data/local/mnt called apps,(note* I should have made that folder on my pc before I pushed it to my phone to ensure that the foder was actually in the apps.img file.) I created two more folders "bin" and "lib" using "File Manager" on my phone. I then moved what I needed to run python into those folders (though you'll see I forgot something)
8) I added PYTHONHOME PYTHONPATH and added the bin folder I created to $PATH in the /system/etc/bash/bashrc file (Ask and I'll explain). If you don't have bash the mkshrc file is located "/system/etc/mkshrc" on your phone (if its Sprint SGSIII) adding environment variable there will accomplish the same thing, sorta.
9) I connected my phone to pc w/usb, opened up a teminal on pc, started an adb shell
10)........
Code:
[email protected]:~$ adb devices
List of devices attached
xxxxxxxx device
[email protected]:~$ adb shell
[email protected]:/ $ su
[email protected]:/ # bash
void endpwent()(3) is not implemented on Android
localhost / # which python
/data/local/mnt/apps/bin/python
localhost / # python
'import site' failed; use -v for traceback
Python 2.6.2 (r262:71600, Mar 20 2011, 16:54:21)
[GCC 4.4.3] on linux-armv7l
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import sys
>>> import math
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named math
>>> import io
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/manuel/AptanaStudio3Workspace/python-for-android/python-build/output/usr/lib/python2.6/io.py", line 63, in <module>
ImportError: No module named _fileio
>>>
localhost / # exit
[email protected]:/ # ^D
[email protected]:/ $ ^D
[email protected]:~$
I'm thinking that if I can get my mkbootimg tools to work, I would mod an init script to mount the apps.img and then create links for each file in say '/mnt/apps/bin' create a link*in '/system/bin'. this should allow for phones with small or near full system partition install stuff like busybox or your own pprograms. More usefull for a developer.
I wanna try this with pythonforandroid, if I can make python and its modules. accessible during early init or just before the boot process finishes in general, and use it to run python, maybe python can handle boot in a different way, or maybe just one specific. function you might needs.
one big question I have. Does the pythonforandroid interpreter run ontop of the D VM?
Edge-Case said:
I'm thinking that if I can get my mkbootimg tools to work, I would mod an init script to mount the apps.img and then create links for each file in say '/mnt/apps/bin' create a link*in '/system/bin'. this should allow for phones with small or near full system partition install stuff like busybox or your own pprograms. More usefull for a developer.
I wanna try this with pythonforandroid, if I can make python and its modules. accessible during early init or just before the boot process finishes in general, and use it to run python, maybe python can handle boot in a different way, or maybe just one specific. function you might needs.
one big question I have. Does the pythonforandroid interpreter run ontop of the D VM?
Click to expand...
Click to collapse
I don't think so. All command-line programs I know of interface directly with the kernel.
Sent from my S3 on Sense 5 (you jelly?)
CNexus said:
I don't think so. All command-line programs I know of interface directly with the kernel.
Sent from my S3 on Sense 5 (you jelly?)
Click to expand...
Click to collapse
So getting an extended set of Linux (kernel) cli programs working with Android (kernel) is a matter of having the nessissary libraries, kernel prereq., and being compiled for the target processor?
From what I have read, the Android kernel has been cut back so far from the original Linux kernel that its difficult to port "Linux apps" to Android. Something about a slimmed down version of the GNU C/C++ libraries and the Android kernel being designed to run mostly Dalvik.
I haven't tried directly running any "Linux app" (already compiled for arm) on Android yet, but my game plan for that test was to load up an .img file with the nessissary execs, libs, config, etc files (as ext3 this time) and running some scripts that get the paths variables set up and then execute the script, I wrote a short Bash script that sets up python variables and adds others to PATH etc, and it worked, I had python on the img and the img mounted to /mnt/myside and python ran but with some errors, I need to get the variables right, its driving me mad, if its not this its that, last time it was the basic "help()" command not being declaired or something.
Well thats my plan, either these "Linux apps" run on Android without problem or I am going to A) write my own kernel to be compatible with Android/ cli Linux or I am going to get as much source code as I can and practice the art of compiling against Android and/or patching the code when/where nessissary.
We'll see what happens, I've done enough today/night.
Hello, this guide is essentially the usage of the previously developed tool OP3TInject, ported to the Oneplus 3T by @Jo_Jo_2000 here.
OP3TInject works perfectly with Oneplus 5 bootlogo, grab your LOGO partition, unpack, edit bootlogos pictures, repack everything and flash to your phone.
I have tested this and it works on my phone, but you still have to USE THIS ON YOUR OWN RISK.
First, dump original logo.img from your phone, you can grab via adb:
open the adb shell on your pc:
Code:
adb shell
you need to be superuser to dump partitions:
Code:
su
list all partitions and find the one corresponding with LOGO (in my case sde18):
Code:
cd /dev/block/bootdevice/by-name
Code:
ls -all
dump LOGO partition (in my case sde18) to /sdcard/logo.img:
Code:
dd if=/dev/block/sde18 of=/sdcard/logo.img
exit from the shell and pull "logo.img" on your pc:
Code:
adb pull /sdcard/logo.img
you will find logo.img in the "adb.exe" directory.
Download OnePlus3TInjector.zip from the offical thread and extract somewere, place logo.img in the same directory.
Open a command prompt inside the folder with OP3TInject.exe & logo.img and execute:
Code:
OP3TInject -i logo.img -D
You will get bootlogo images in png format.
Modify as you like with image editor of your choice but do not change png format.
Execute in the same command prompt to repack logo.img:
Code:
OP3TInject -j fhd -i logo.img
You will get a new file called "modified.logo.bin".
To flash it on your phone i suggest you to edit the original OP5 bootlogo restore zip (download here) with 7zip replacing "logo.img" with the one you got from OP3TInject
(remember to rename from "modified.logo.bin" to "logo.img" before replacing the original one in the zip.)
Flash via TWRP and have fun!.
Huge thanks to @Jo_Jo_2000 and @makers_mark for all the work made on OP3Injector and OP3TInjector.
where can i get this for the oneplus 8t