Props to zinx for pointing it out, this is just an automated script for the nooblets.
gather up your apk's (mainly the ones in /system/app although maybe some other applications have some as well) and throw them where you'd like
copy paste this:
Code:
#!/bin/bash
echo -n > apks.txt
echo -n > output.txt
for x in `find . -name "*.apk"`
do
unzip -p $x | strings | grep -i "android.provider.Telephony.SECRET_CODE"
if [ $? -eq 0 ]; then
echo $x >> apks.txt
fi
done
for x in `cat apks.txt`
do
mkdir "$x.folder"
mv $x $x.folder
done
for x in `cat apks.txt`
do
unzip -d $x.folder $x.folder/$x
done
for x in `cat apks.txt`
do
bin2xml $x.folder/AndroidManifest.xml > $x.folder/AndroidManifest.decoded.xml
done
for x in `find . -name "AndroidManifest.decoded.xml"`
do
echo "$x:" >> output.txt
cat $x | grep -i host | sed 's/android:host=\"/*#*#/' | sed 's/\" \/>/#*#*/' | sed 's/\t\t\t\t\t//' >> output.txt
done
save as secrets.sh (on your computer)
download this: http://android-random.googlecode.com/files/axml2xml.pl
rename it to bin2xml and make sure it's somewhere in your $PATH
Code:
chmod a+x secrets.sh
./secrets.sh
cat output.txt
you should get output of a bunch of codes you can enter into your dialer.
cyanogen mod 3.6.8.1 output:
Code:
$ cat output.txt
./Phone.apk.folder/AndroidManifest.decoded.xml:
./VoiceDialer.apk.folder/AndroidManifest.decoded.xml:
*#*#8351#*#*
*#*#8350#*#*
./QxdmLog.apk.folder/AndroidManifest.decoded.xml:
*#*#564#*#*
./Ftp.apk.folder/AndroidManifest.decoded.xml:
*#*#9696#*#*
./Talk.apk.folder/AndroidManifest.decoded.xml:
*#*#gtalk#*#*
*#*#8255#*#*
./HtcLog.apk.folder/AndroidManifest.decoded.xml:
*#*#7269#*#*
./Settings.apk.folder/AndroidManifest.decoded.xml:
*#*#4636#*#*
./Contacts.apk.folder/AndroidManifest.decoded.xml:
(of course *#*#gtalk#*#* wouldn't work, but all the ones with numbers do, again it's a primitive script for ease of use)
enjoy
EDIT:
oh yea.. for clarification:
Code:
*#*#8255#*#* -> Google Talk Service Monitor (Talk.apk)
*#*#4636#*#* -> Testing / Debug info (Settings.apk)
*#*#9696#*#* -> FTP Testing / App (Ftp.apk)
*#*#8351#*#* -> *#*#VDL1#*#* Voice Dialer Logging Enabled (VoiceDialer.apk)
*#*#8350#*#* -> *#*#VDL0#*#* Voice Dialer Logging Disabled (VoiceDialer.apk)
*#*#7269#*#* -> Standard device logging (Device [logcat?], AT commands, Kernel [dmesg?], and optional log to flash memory) (HtcLog.apk)
*#*#564#*#* -> QXDM Logging Front end (QxdmLog.apk)
Excuse the ignorance - but what are these used for/good for?
wondering myself
im also wondering what it is good for to. O mystical haykuro care to explain a little more.....
im guessing you setup what he said, and u put in whatever code you inserted for the w.e app you want to run? lol
It makes sense, it hides apps, and makes them only open if you dial that string of numbers and symbols
edit: After actually reading the code, it seems to just enable some special debugging type logs, not just any app.
clintz said:
It makes sense, it hides apps, and makes them only open if you dial that string of numbers and symbols
Click to expand...
Click to collapse
somewhat.. Talk.apk (google talk) for example, isn't hidden, just has a hidden class that users can't access unless you type in it's corresponding code.
very interesting...
clintz said:
It makes sense, it hides apps, and makes them only open if you dial that string of numbers and symbols
edit: After actually reading the code, it seems to just enable some special debugging type logs, not just any app.
Click to expand...
Click to collapse
Awesometown.
Thanks for this - now it makes me feel like a spy.
Too much work/too lazy..
The 4636 one is the one i use to lock the phone into 3g only mode = )
wow
very interesting must try it now
soba5150 said:
The 4636 one is the one i use to lock the phone into 3g only mode = )
Click to expand...
Click to collapse
This is so cool I just did that
Yes, many phones have a "secret code" interface for accessing hidden operations. Does this mean Android apps could register their own secret codes?
pretty much useless but cool
known unknowns are never useless. thanks haykuro
Ummm...in all fairness this isn't a dev topic. Plenty of other threads that were closer to developmental topics got trashed.
People as good as Haykuro should lead by example, not encourage posting in incorrect forums.
pinetreehater said:
Ummm...in all fairness this isn't a dev topic. Plenty of other threads that were closer to developmental topics got trashed.
People as good as Haykuro should lead by example, not encourage posting in incorrect forums.
Click to expand...
Click to collapse
to each his own.. you do have the right to be wrong... perfectly fair... these codes might help in debugging later? isn't debugging part of developing?
pinetreehater said:
Ummm...in all fairness this isn't a dev topic. Plenty of other threads that were closer to developmental topics got trashed.
People as good as Haykuro should lead by example, not encourage posting in incorrect forums.
Click to expand...
Click to collapse
Oh here we go again
xREVOx said:
to each his own.. you do have the right to be wrong... perfectly fair... these codes might help in debugging later? isn't debugging part of developing?
Click to expand...
Click to collapse
I believe it is sir!
pinetreehater said:
Ummm...in all fairness this isn't a dev topic. Plenty of other threads that were closer to developmental topics got trashed.
People as good as Haykuro should lead by example, not encourage posting in incorrect forums.
Click to expand...
Click to collapse
Why do some people feel the need to play Thread Police.
Thanks for this Haykuro!
Related
Ok heres whats going on I'm attempting to translate this awesome launcher from here. http://www.joymms.com/english/ from Chinese to English
So that it looks like like the English part of the attached picture.
These are the instructions. I'm putting the decompiled files in Zip in the attachment. If you don't know Chinese send your Chinese to zergburger unless you are totally confident in Google translate.
You have to use apktool to decompile the apk, go through the smali files and find the \uxxx unicode strings. Take these strings and put them in a site like this: http://people.w3.org/rishida/tools/conversion/ which will convert the utf16 to the actual characters. You can then take that and paste it into google translator or whatever and translate the information.
Than put the new translated Charters back into the converter than take the string codes and replace the codes in the file save it than send them to me so I can compile all of them.
Good luck I really like this application and this is gonna take a while
Thank you samspoon for the instructions
Total 631 Smili files
3 Translated
117 That need Translation
2.5% complete
Code:
Need Translation:
AndroidWindows7$18
AndroidWindows7$19
AndroidWindows7$20
AndroidWindows7$21
AndroidWindows7$23
AndroidWindows7$24
AndroidWindows7$26
AndroidWindows7$30
AndroidWindows7$32
AndroidWindows7$33
AndroidWindows7
AppBarClock$1
AppBarClock$3
AudioStatus$1
BaseWindow
CalendarPicker
ChineseCalendar
DesktopIcons$3$1
DesktopIcons$3
DownloadProcessBar$1
DownloadProcessBar$4
DownloadProcessBar
Execute
ExecuteNaviBar
InstalledApps$1
InstalledApps
MainApp
MessageBubble$6
MessageBubble$7
MessageBubble
MyComputer$12$1
MyComputer$12
MyComputer$13$1
MyComputer$13
MyComputer$14
MyComputer$16
MyComputer$18$1
MyComputer$18
MyComputer
RandomChat$3
RandomChat
RunningAppBar$1$1
RunningAppBar$1
RunningAppBar$8$1
RunningAppBar$8
RunningAppBar$10$1
RunningAppBar$10
RunningAppBar
SelectDir$3
SelectDir
Setting$1$2
Setting$1
Setting
SettingDesktopBg$3
SettingDesktopBg
SettingDesktopIcon$1
SettingDesktopIcon$3
SettingDesktopIcon$5
SettingDesktopIcon$9
SettingDesktopIcon$SelectedListAdapter
SettingDesktopIcon
SettingSideBar
SettingStartMenuIcon$1$1
SettingStartMenuIcon$1
SettingStartMenuIcon$3
SettingStartMenuIcon$7
SettingStartMenuIcon$SelectedListAdapter
SettingStartMenuIcon
SideBarCalendar$1
SideBarCalendar$3
SideBarClock$3
SideBarMessageTips$1
SideBarMessageTips
SideBarUserStatus$1
SideBarUserStatus$4
SideBarUserStatus
SideBarWeather$1
SideBarWeather$4
SideBarWeather$6
SideBarWeather$8
SideBarWeather$9
SideBarWeather
StartMenu$2
StartMenu$3
StartMenu$4
StartMenu$5
StartMenu$6
StartMenu$7
StartMenu$8
StartMenu$9$1
StartMenu$9
StartMenu
SystemInfo
TaskListAdapters$ServiceListAdapter
TaskManagerCtrl
UnInstalledApps$2$1$1
UnInstalledApps$2$1
UnInstalledApps$2
UnInstalledApps
Usage$1$1
Usage$1$2
Usage$1
Usage
UserInfo$4
UserInfo$6
UserInfo
UserLogin$1
UserLogin$3
UserLogin$5
UserLogin
UserPass$3
UserPass
UserPreRegist
WeatherCity$7
WeatherCity
WindowsIE$5
WindowsIE
Code:
Are Translated:
AboutUs$4
AboutUs$5
AboutUs
I'm in the process of translating/organizing
Samspoon's version http://www.multiupload.com/9IWXYZ4L7Q
Just a word of advice but you should setup some format for translating... I.e say you have a string that you modify:
(for examples sake)
const-string v8, "\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25"
now according to google translate this is close to "Failed to read disk"
so if you formatted the string so the old is there along with the new something like this:
const-string v8, "[[[\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25]]][[[Failed to read disk]]]"
You could then make a bash script that will go through and replace the string with the proper translated information... You could then take these strings to search future updates to the app to make translating easier on you. Just a piece of advice not sure how good you are with scripting but if you are serious about this might as well make it workable for updates. Any format would do I was just giving you advice.
Hell pulling the strings into a single file and then having it like
STRING~TRANSLATED
in a flat file would allow you to do a mass-sed on all smali files i.e
for translated in $( cat translation )
do
string=echo $translated|cut -d~ -f1
english=echo $translated|cut -d~ -f2
for file in $( ls /path/to/smali/*.smali )
do
sed -e "s/$string/$english/" $file
done
done
at least that way you can easily keep updated and also allow for other languages to be localized.
samspoon said:
Just a word of advice but you should setup some format for translating... I.e say you have a string that you modify:
(for examples sake)
const-string v8, "\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25"
now according to google translate this is close to "Failed to read disk"
so if you formatted the string so the old is there along with the new something like this:
const-string v8, "[[[\u78c1\u76d8\u5bb9\u91cf\u4fe1\u606f\u83b7\u53d6\u5931\u8d25]]][[[Failed to read disk]]]"
You could then make a bash script that will go through and replace the string with the proper translated information... You could then take these strings to search future updates to the app to make translating easier on you. Just a piece of advice not sure how good you are with scripting but if you are serious about this might as well make it workable for updates. Any format would do I was just giving you advice.
Hell pulling the strings into a single file and then having it like
STRING~TRANSLATED
in a flat file would allow you to do a mass-sed on all smali files i.e
for translated in $( cat translation )
do
string=echo $translated|cut -d~ -f1
english=echo $translated|cut -d~ -f2
for file in $( ls /path/to/smali/*.smali )
do
sed -e "s/$string/$english/" $file
done
done
at least that way you can easily keep updated and also allow for other languages to be localized.
Click to expand...
Click to collapse
That pushes the limits of my skills, but I will put the translated versions all together to make future updates easier. I'm only in college I'm not a pro yet
You guys rock! you are all pros! yew cin dew eeeet!!! =) go go go!
here translate this txt file. I used magicks to strip the text from the smali files and removed duplicate lines. Instead of 431 lines to translate I brought it down to 296.
Format your translation like such so I can easily script it:
"THISISTHEUTFSTUFF"~"THISISTHETRANSLATEDSTRING"
For example:
"\u672c\u5730\u78c1\u76d8(C"~"Local Disk (C"
Once this is done I can inject this fairly easily back into the apk.
OH YEAH... One thing: In the strings you might see stuff like \n\n or just one. ANY STRING THAT HAS A BACKSLASH FOLLOWED BY 1 CHARACTER SHOULD BE RETAINED IN THE STRING. THIS IS USED FOR FORMATTING. \n IS A NEW LINE!
For example:
"\u7248\u6743\u6240\u6709 CopyRight 2009-2010\n\n\u5f00\u53d1\u5546\uff1a\u4e0a\u6d77\u5b87\u7a7a\u8f6f\u4ef6\u6709\u9650\u516c\u53f8"~"Copyright 2009-2010 \n\n Developer: Shanghai Aerospace Software Ltd."
I attached a txt file that has already been converted to the actual characters as well for the lazy peeps
Girls voice for the top of the hour...
We need to find a really hot sexy girls voice for the top of the hour sound...
samspoon said:
here translate this txt file. I used magicks to strip the text from the smali files and removed duplicate lines. Instead of 431 lines to translate I brought it down to 296.
Format your translation like such so I can easily script it:
"THISISTHEUTFSTUFF"~"THISISTHETRANSLATEDSTRING"
For example:
"\u672c\u5730\u78c1\u76d8(C"~"Local Disk (C"
Once this is done I can inject this fairly easily back into the apk.
Click to expand...
Click to collapse
Wait explain, what did you do and where did this come from
Stalte said:
Wait explain, what did you do and where did this come from
Click to expand...
Click to collapse
Linux is your friend!
hotrodownloads sampson$ apktool d AndroidWindows7.apk
hotrodownloads sampson$ cd AndroidWindows7/smali/App/Windows7
hotrod:AndroidWindows7 sampson$ for i in $( ls ); do grep -e "const-string" $i | fgrep "\u" | sed -e "s/const-string v[0-9], //" >> ~/Translation;done
hotrod:AndroidWindows7 sampson$ cd ~
hotrod:~ sampson$ sed -i -e "s/ "/"/" Translation
hotrod:~ sampson$ awk '!x[$0]++' Translation > Translation.txt
hotrod:~ sampson$ cat Translation|wc -l
431
hotrod:~ sampson$ cat Translation.txt |wc -l
296
hotrod:~ sampson$ vim Translation.txt
hotrod:~ sampson$
Had to pretty up translation.txt a little bit because it missed 2 const-strings but can't win them all.
Ok I finished the organizing and I'm about to start the translating I would like to see everyone who loves this pitch in a little bit and i mean with the translating.
@samspoon
If I could get you all of the strings and there translations could you do your quick trick to put them back into the apk??
Woops - forgot to search recursively... Missed a *ton* of ****
and yeah... There's some caveats though... the \n thing and if there are "s you need to keep the utf code and not use the " or it breaks the app. Aside from that works gravy... I'll have a rough google translated version up in a bit as well as all the missed strings
580 strings :\
Man, I wish I was as half as smart as you guys. Then I could be of some assistance. Im going to hang a picture up in my house with candles burning on both sides of you guys if you get this working.
Sent from my top secret hand held device. (first of all....hand held)
samspoon said:
Woops - forgot to search recursively... Missed a *ton* of ****
and yeah... There's some caveats though... the \n thing and if there are "s you need to keep the utf code and not use the " or it breaks the app. Aside from that works gravy... I'll have a rough google translated version up in a bit as well as all the missed strings
580 strings :\
Click to expand...
Click to collapse
Are these all the strings for the entire app
Here's a really rough translation... pretty much enough to let you play around with it.
Honestly I don't even know if this is worth translating considering you have to pay them to get full features. Sure, I could patch the software to work without registering but that isn't very legal.
Also looks like I missed a few strings. Tell me if you want to keep going on
samspoon said:
Here's a really rough translation... pretty much enough to let you play around with it.
Honestly I don't even know if this is worth translating considering you have to pay them to get full features. Sure, I could patch the software to work without registering but that isn't very legal.
Also looks like I missed a few strings. Tell me if you want to keep going on
Click to expand...
Click to collapse
Are you serious you have to pay for it??? Damn I'm about to jump ship over that one
Keep going. Has enough features to be useful.
Sent from my top secret hand held device. (first of all....hand held)
noxiouskill said:
Keep going. Has enough features to be useful.
Sent from my top secret hand held device. (first of all....hand held)
Click to expand...
Click to collapse
Ok ok still going but could someone get me a cracked version because i'm about to spend 6 hours on this thing and I would at least like the full version for myself
Edit: 3 down 117 to go
Stalte said:
Ok ok still going but could someone get me a cracked version because i'm about to spend 6 hours on this thing and I would at least like the full version for myself
Edit: 3 down 117 to go
Click to expand...
Click to collapse
To get any crack version lets get the must important things first n thats a English version to let evryone used it n than someone will get there hands on it n it's easier to make any mods or crack versions etc....even though it does have a pay version. These version still got alot of features. N its still useful
Sent from my PC36100 using XDA App
Hello,
I've got an Inventory of 1,000 parts and I would like to have this list available online via a web page. I need to include Part Number, Manufacturer, Description, and Notes. I also plan to take up to 10 photos of each part to include with the description.
The idea is to make this available to the Technicians in the field so that they have a control part to reference while on site trying to assess damages.
Over course I can't make 1 long page of parts, so I'm going to have to build a database.
I'm open to suggestions and direction. I'm assuming either an SQL DB or something using ASP, but I'm drawing a blank as to where to begin.
Thanks for your help,
Mike
I'd say SQL, get something like mySQL (super easy) then setup the proper tables and fields. I'm not sure if you can include actual image data in the tables or not (I don't think you can) but you can include references to the images (the links to them) and parse those through whatever reader you're using. If you make a webpage that pulls the data it would be simple enough to include the images of the specific part.
Code:
SELECT * FROM parts WHERE partnumber = "insert number here"
That should get you all the info from the "parts" DB for the part with whatever number, just parse the data and display.
Yes I was hoping to use the DB to reference the stored images and display them as thumbnails or something like that.
Then that should be easy, just make sure the images are uploaded to the same site so you can use relative paths instead of absolute. I'm sure if you need some help the other members here would be more than happy and feel free to PM me about this for more detail if you want to.
Thanks dbzfanatic. You know I got Web Skillz, but this is over my head a tad. Actually I'm probably making it more complicated than it is.
I need a page that they can go to:
Part # _________
Manufacturer ________
Description _______
[Search]
Then I just need it to show all matchs and possibly links to the photos
-- OR --
List all matches and when they select a match it opens to a "Details" page with the full description and extra Notes. Pics would also be on this page.
I seriously feel like canibalizing a freebie E-Commerce tool
It really wouldn't be hard, you probably are making this harder than it needs to be . I've done that before too >.>
Will they already know the part number or will it be something they usually get from the info in the DB? That will play a role probably, or at least it would the way I'm thinking. I'd say make it so you have a dropdown menu of part numbers and the search button, then use that number in your SQL query, then pull up the "details" page which should show pictures. You could also do it so that you have a page with all the parts of a certain type displayed and have it setup like
[ ] [ ] [ ] [ ]
# # # #
[ ] being picture and # being (obviously) part number. Then have the picture be a link to the main "details" page. If you use that format i'd suggest only using the first picture in your list for each part, that way they get a good idea and you also save some room, plus if it isn't the part they wanted there's always the back button .
I'll give you more when I get home tonight,but under normal circumstances they would know either the part number or the manufacturer. The parts usually reside in a unit has the manufacturer on it somewhere. The part number is normally on the part if we installed it, but sometimes it comes off or is damaged. (Bar Coded sticky label)
Alright that makes things easier and gives you the option of using both methods. If they know the part number just search for it in the DB and if they only know the manufacturer have a list page by manufacturer. Easy enough right? The hardest part will be getting the DB populated (trust me it's cumbersome...doing some DB pop myself -_-)
dbzfanatic said:
You could also do it so that you have a page with all the parts of a certain type displayed and have it setup like
[ ] [ ] [ ] [ ]
# # # #
[ ] being picture and # being (obviously) part number. Then have the picture be a link to the main "details" page. If you use that format i'd suggest only using the first picture in your list for each part, that way they get a good idea and you also save some room, plus if it isn't the part they wanted there's always the back button .
Click to expand...
Click to collapse
I like this idea, but this is mostly for the techs and they will be accessing it from a smartphone. For now those are HTC Snaps and Samsung Intrepids running Windows Mobile 6.0 or 6.5. The screens are very small so left to right scrolling would probably be a bad idea.
I would either build it in a Column like:
[_]
#
[_]
#
[_]
#
[_]
#
Or
# [_]
# [_]
# [_]
# [_]
I think the 2nd option would take less vertical space. We have some vendors with 200 parts.
Building it in a vertical/column style would help them to be able to scroll through the photos faster.
I would only consider the Row style interface for office employees.
I have my inventory data, less the photos, already compiled in Excel. I was hoping to be able to cheat death & time buy importing the information.
I'm not sure how to import excel info into a DB but there's bound to be a way, if your employees have a decent touchscreen they should be able to scroll left/right as well but yes the vertical layout would be better. If you need help with fine details don't hesitate to ask and good luck with this ^_^.
dbzfanatic said:
I'm not sure how to import excel info into a DB but there's bound to be a way, if your employees have a decent touchscreen they should be able to scroll left/right as well but yes the vertical layout would be better. If you need help with fine details don't hesitate to ask and good luck with this ^_^.
Click to expand...
Click to collapse
I thought I was asking I guess I'm doing it wrong.
The trouble with the phones is they're not all touchscreens plus there's a number of techs that have their own Blackberries. I think it's best to build a simple page with no left and right.
So I was thinking about it today and I don't think I need to much to get this done.
1 database with 1 table (Parts)
1 index.php to use for seraching
1 results.php to show results (Might even be able to put the results in the index)
I'd eventually like to have 2 versions/views, one for the phones and one for the warehouse.
Yeah sorry I took some time and did a lil search for you which might help. I'm assuming you're using MySQL, if so go here http://blog.tjitjing.com/index.php/2008/02/import-excel-data-into-mysql-in-5-easy.html and read how to import your parts list. Then it's just a matter of doing some coding of the php pages. My suggestion would be to have the image references already as html in the DB to make things easier. That way when you call
Code:
SELECT * FROM Parts WHERE ID=*number*
you can just display the information directly. If you "echo" the result and it's like this:
Code:
<img src=/parts/images/56.jpg><br /><img src=/parts/images/58.jpg>
it will automatically display as if you'd type it into the html (if you didn't already know that ). It's also handy to do it this way since you don't need to know how many pictures you have of the part, it's just parsed and added automatically. I'd say your DB should look something like this:
Code:
ID Manufactuerer Description Images
56 HTC "Small" <img src=/parts/images/56.jpg><br /><img src=/parts/images/58.jpg><br /><img src=/parts/images/56.jpg><br /><img src=/parts/images/56-2.jpg>
and your php page look like
HTML:
<title>Parts</title>
<?php
$query = "SELECT * FROM Parts WHERE ID=" . $_POST['ID'];
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>Part Number: <?php echo $row["ID"];?>
Manufacturer: <?php echo $row["Manufacturer"];?>
Description: <?php echo $row["Description"[;?>
Images: <?php echo $row["Images"];
}?>
Something like that should work fine , at least for the "results" page.
dbzfanatic said:
I'd say your DB should look something like this:
ID
Click to expand...
Click to collapse
Nothing displayed?
Yeah sorry hit "post" instead of "go advanced" >.>;; post above edited
Ok I got the DB made and some test data imported from Excel. Not Photos yet, but hopefully tomorrow I'll have some test photos.
You should test pulling some data and gettint the setup right, once u got that working the rest is cake (no cake is not a lie)
Sent from my T-Mobile myTouch 3G Slide using XDA App
How do I tell the PHP what DB to look at?
My DB name is minfinge_cdcparts
I had to assign it a user and a password. Is that important to use in the php file?
Got an error in Line 11 at the moment.
http://www.mikeinfinger.com/demos/cdc/parts/
Yeah your error is because you're trying to connect to the DB without the password.
Code:
$dbuser="username";
$dbpass="password";
$dbname="minfinge_cdcparts"; //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
$mainsection="Parts"; //The name of the table
is how you connect to a password protected DB (I pulled it off the net so I didn't have to type ), of course replacing appropriate info. So it'd look something like this
Code:
[COLOR=#000080]<title>[/COLOR]Parts[COLOR=#000080]</title>[/COLOR]
[COLOR=#000080]<?php
[/COLOR]$dbuser="username";
$dbpass="password";
$dbname="minfinge_cdcparts"; //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
$mainsection="Parts";
[COLOR=#000080]$query = "SELECT * FROM " . $mainsection . " WHERE ID=" . $_POST['ID'];
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>[/COLOR]Part Number: [COLOR=#000080]<?php echo $row["ID"];?>[/COLOR]
Manufacturer: [COLOR=#000080]<?php echo $row["Manufacturer"];?>[/COLOR]
Description: [COLOR=#000080]<?php echo $row["Description"[;?>[/COLOR]
Images: [COLOR=#000080]<?php echo $row["Images"];
}?>
That should help/do the trick.
[/COLOR]
Failure Line 14
Code:
while($row = mysql_fetch_array($result)){
Here's the whole file
Code:
<title>Parts</title>
<?php
$dbuser="dbusert";
$dbpass="dbpass";
$dbname="minfinge_cdcparts"; //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
$mainsection="parts"; //The name of the table
$query = "SELECT * FROM " . $mainsection . " WHERE ID=" . $_POST['ID'];
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>Part Number: <?php echo $row["ID"];?>
Vendor: <?php echo $row["Vendor"];?>
Vendor Number: <?php echo $row["Vendor_Number"];?>
Description: <?php echo $row["Description"];?>
Images: <?php echo $row["Images"];
}?>
You might wanna edit that file so people on the net can't use the usr/pass for your DB. Also try changing it to this.
Code:
<title>Parts</title>
<?php
$dbuser="*user*";
$dbpass="*pass*";
$dbname="minfinge_cdcparts"; //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass)
or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);
$mainsection="parts"; //The name of the table
$query = "SELECT * FROM '" . $mainsection . "' WHERE 'ID'='" . $_POST['ID'] ."'";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)){
?>Part Number: <?php echo $row["ID"];?>
Vendor: <?php echo $row["Vendor"];?>
Vendor Number: <?php echo $row["Vendor_Number"];?>
Description: <?php echo $row["Description"];?>
Images: <?php echo $row["Images"];
}?>
adb logcat bootcamp
I'm going to be teaching the basics of logcats. I sat for a few hours a while back and hammered all this stuff out with ckisgen from XDA/ACS holding my hand the whole way, so this is good info here. I see lots of posts about issues people have and no logcats accompanying them. A good logcat is fried gold to a dev troubleshooting a problem. I did the whole thing in Ubuntu (Linux) and have listed the Window$ $pecific desktop pathing below the Linux command. UNIVERSAL COMMANDS LINUX COMMANDS WINDOWS COMMANDS.
When I say Terminal, I mean Command Prompt for you Window$ u$er$ (start-run-cmd)
In terminal with your phone plugged into the computer
A Logcat:
Code:
[COLOR=#ff0000][FONT=Arial][SIZE=3]adb logcat[/SIZE][/FONT][/COLOR]
This doesn't START logcat, this tells terminal to grab the information already on the device logcat and display it in terminal. This isn't so useful to us. It just scrolls the information in terminal and you can read it there. This is kinda difficult to read though, for one it's constantly scrolling as your phone does things and two, it's likely that your terminal is configured to only allow a certain number of lines to be kept readable before they drop off.
Pipe it to Desktop as a .txt file
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat > ~/Desktop/logcat.txt [/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
This command above will tell the logcat to export the terminal logcat to a .txt file on your desktop called logcat.txt The '>' symbol tells the logcat to pipe to the location listed. This will continue to update even if you open the text file, so long as you have terminal running. It's not done “live” though, you have to either refresh the file, or close it then re-open it. That won't affect anything other than giving you an update. Now we're getting somewhere, but where?
Code:
[COLOR=#ff0000][FONT=Arial][SIZE=3]adb logcat > /sdcard/logcat.txt[/SIZE][/FONT][/COLOR]
If using Terminal Emulator on your phone instead of a computer setup, this (above) is the code you'd want to use. It will save the logcat.txt to the root of your SD card. Next!
-v long, or not to -v long, that is the question!
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat -v long > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat -v long > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Now we're telling the logcat to do something more interesting. We are telling it to give us every scrap of information it has. This will space the logcat out nice and pretty and really make things easier to read as well, even giving time stamps of when everything happened! Now you can say “it happened at about 9:30 pm” and we can find that. Winning!
Sometimes you want to filter down the information though. You want to make the dev's life easier. Here is how:
First, a brief on Tags and Priorities.
Tags are going to be what process is actually giving the information, for example 'ActivityManager', 'Database', and 'WindowsManager' are all Tags you can find. There are TONS of these suckers! Research into what your problem is and try to pick out the tag.
Priorities are different. These will tell you how serious the issue at hand is. The priorities are called by their letter code and are:
V Verbose
D Debug
I Info
W Warning
E Error
F Fatal
S Silent (suppress all output)
These are in ascending order. In other words, Verbose or V is going to be the micro information which doesn't really mean much to anyone 99.99% of the time where as Fatal or F is going to be a huge catastrophic issue. When filtering for a Priority it will include the Priority you give PLUS all HIGHER Priorities. So, for example, if you call to filter for Warning or W then it will give you Warning, Error, and Fatal. That is common to filter for. Below are some examples of code:
( PS - you would never actually type or input ‘{‘ or ‘}’ in your logcat commands .. they are in some of the examples below to show you that these are generic modifiers … meaning - if you were actually inputting the command you would replace the {Tag} with an actual Tag, like: ActivityManager or GTalkService .. in the same way you would replace {Priority} with an actual Priority, such as: W or E )
Examples
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat {Tag}:{Priority} *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat {Tag}:{Priority} *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
The above line is if you know exactly what Tag (GTalkService or ActivityManager) and Priority (W or E) you are looking for.
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat *:{Priority} *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat *:{Priority} *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
The above line is if you don't know the Tag, but know the Priority. The * is a wild card that basically means all/any. An example of a VERY valuable logcat could be:
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat *:W *:S > ~/Desktop/logcatALLwarnings.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat *:W *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
So, the command above would give you all tags that had a priority of Warning, Error, or Fatal. It would silence (not show) everything else and would pipe the output of your log to your desktop as a text file named logcatALLwarnings.txt … moving along …
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat {Tag}:V *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat {Tag}:V *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
The above line is if you know the Tag but want to see all Priorities. {Tag}:V outputs all priorities for the specific Tag you’ve entered because it calls for the V (Verbose) priority, which is the very lowest priority … and as you recall, it always gives you the priority you’ve asked for AND above.
The *:S tells the logcat to Silence (or ignore) all lines/messages that have not otherwise been specifically called for using these filter expressions. This CAN cause issues though, sometimes it will silence what you're looking for / everything.
A final specific example from my phone to be clear. I got a Database Tag with an Info Priority, if I wanted to see all instances of this happening, I could use the following code:
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat Database:I *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat Database:I *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Or, if I had an ActivityManager Warning I could use
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat ActivityManager:W *:S > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat ActivityManager:W *:S > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Ok, now we're going to the show! You know the tools, but how do I use them? Glad you asked!
For the first time you boot a ROM/Kernel bundled together (IE InsomMIUI 1.12.2) or for just a kernel you're going to do the following:
Once you're finished full wiping and installing the ROM, but haven't rebooted the phone yet. (Or wiping just the caches for a separate Kernel):
Open Terminal on your computer
enter the following code
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat -v long > ~/Desktop/logcat.txt[/SIZE][/FONT][/COLOR][COLOR=#0000ff]
[/COLOR][COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat -v long > %userprofile%\desktop\logcat.txt[/SIZE][/FONT][/COLOR]
Name the logcat something useful. A good format is to use you're initials, rom name, what it is, and date. This way it stands out. So the code with the really long but helpful file name would be:
Code:
[COLOR=#008000][FONT=Arial][SIZE=3]adb logcat -v long > ~/Desktop/JH_InsomMIUI1122_firstboot_5Dect11.txt[/SIZE][/FONT][/COLOR]
[COLOR=#0000ff][FONT=Arial][SIZE=3]adb logcat -v long > %userprofile%\desktop\JH_InsomMIUI1122_firstboot_5Dect11.txt[/SIZE][/FONT][/COLOR]
Yes, I know that's a long name, but we look at dozens of these things, it helps!
In recovery tell it to reboot the phone. The logcat will start recording internally on your device at boot automatically.
Once the phone is at the lockscreen let it sit for 5 minutes.
Unlock the phone and let it sit for about 10 seconds.
Restart the phone.
Once you restart the phone open the logcat file on your desktop to make sure it’s not blank/empty/something went wrong and if everything’s golden - send to your favorite developer (ME! ).
FYI , the -v option sets the output format. -v long after the logcat command formats the log so that it adds a date and time stamp to each line. It also separates each line with a blank line .. making the log as a whole much easier to look through.
That's it, you should be off to the races with these logcats. I hope this has helped!
Wow this is great I hope People make use of this.
Glad you like it
this has been a message from the dead pool.
Im still very much a noob and dont like posting unless necessary but would like to help when I can. Is there a way to do this on a mac?
It should be really similar to linux. You'll have to have the sdk installed and running which I don't know how to do on mac but the commands should be similar. Let me look into it.
this has been a message from the dead pool.
hy,
Realy nice tutorial.
Can you make a tutorial to how to use logcat from terminal emulator from phone?
Nice info. thanks
Good post m8
One minor criticism, not just of this post but many "How to's" on this forum.
A clear description of what a logcat is and how it maybe useful would go a long way to help educate the inexperienced.
I only say this as i have non techy friends who constantly complain about this issue.
They go looking for info to sort their own issues out and are confronted with jargon on jargon on jargon ..... with no 'Plain English explanation"
We should all try to remember not everyone possesses the same tech knowledge, and we all where N00bs once we only ascended to being the godlike superusers we are due to others making knowledge clearly available to us.
Th idea that "if you don't understand then this isn't for you" is pretty narrow and arrogant.
When I run logcat on my phone, using the command
Code:
adb logcat -v long > /sdcard/logcat.txt
the next line display is
Code:
- waiting for device -
and then does nothing. What am I doing wrong?
Adb doesn't see your devices. Do you have debugging turned on in settings? If you do try:
Code:
adb devices
If you don't see anything you don't have debugging turned on or you don't have the drivers installed for your devices. Or it isn't plugged in.
PrinceFX said:
When I run logcat on my phone, using the command
Code:
adb logcat -v long > /sdcard/logcat.txt
the next line display is
Code:
- waiting for device -
and then does nothing. What am I doing wrong?
Click to expand...
Click to collapse
Seems I need to fix it. For doing this on the phone you should enter 'su' to gain superuser than type "logcat..." and whatever. It reads logcat directly, not through adb. Sorry about missing your reply earlier. Hope this helps.
Sent from my HTC Glacier using Tapatalk 2
Nice write up Thanks .
Thanks
This is a really nice post...
XDA is gr8...
greg
Thanks for the article. I also like using the '-t' switch to grab the last n log entries (e.g., 'adb logcat -t 100 -v time'). Also, if you need a bit more compact log output, using the 'time' format works nicely.
This is a great article. I have learnt a lot. Could you take time to add a description about the various switches like -f, or -t etc that can be used with logcat. It's really very difficult for me to understand those switches...plzz Will be really helpful for others as well.
The-Droidster said:
This is a great article. I have learnt a lot. Could you take time to add a description about the various switches like -f, or -t etc that can be used with logcat. It's really very difficult for me to understand those switches...plzz Will be really helpful for others as well.
Click to expand...
Click to collapse
Code:
[email protected]:/ $ logcat --help
Usage: logcat [options] [filterspecs]
options include:
-s Set default filter to silent.
Like specifying filterspec '*:s'
-f <filename> Log to file. Default to stdout
-r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f
-n <count> Sets max number of rotated logs to <count>, default 4
-v <format> Sets the log print format, where <format> is one of:
brief process tag thread raw time threadtime long
-c clear (flush) the entire log and exit
-d dump the log and then exit (don't block)
-t <count> print only the most recent <count> lines (implies -d)
-g get the size of the log's ring buffer and exit
-b <buffer> Request alternate ring buffer, 'main', 'system', 'radio'
or 'events'. Multiple -b parameters are allowed and the
results are interleaved. The default is -b main -b system.
-B output the log in binary
-C colored output
filterspecs are a series of
<tag>[:priority]
where <tag> is a log component tag (or * for all) and priority is:
V Verbose
D Debug
I Info
W Warn
E Error
F Fatal
S Silent (supress all output)
'*' means '*:d' and <tag> by itself means <tag>:v
If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'
If not specified with -v, format is set from ANDROID_PRINTF_LOG
or defaults to "brief"
The help output is pretty clear. '-f' allows you to save log in file. '-t' specifies how many lines for logcat to print (counting backward from present).
example:
logcat -v time -t 100 -f /sdcard/logtest1.txt
This prints last 100 lines in 'time' format to file logtest1.txt
Play with it and have fun.
Good stuff in here, going to logcat some JB roms now!
Thanx......That was really informative.
lanternslight456 said:
Seems I need to fix it. For doing this on the phone you should enter 'su' to gain superuser than type "logcat..." and whatever. It reads logcat directly, not through adb. Sorry about missing your reply earlier. Hope this helps.
Sent from my HTC Glacier using Tapatalk 2
Click to expand...
Click to collapse
Same thing happens to me
I've have checked my settings, and I can't see anything "wrong"
I've also tried different apps, like alogcat but they don't show anything either.
I don't have to 'su' on SGS2/I777 with CM9 ROM. Works for me from ADB or in phone shell.
It probably depends on the ROM you are running and permissions set.
Team Cody!
Member List (in no particular order):
@thewisenerd
@omerjerk
@#Superuser
@dhrumangajjar
@navinn
@xaak
@Agaphetos
WANTED
- Testers - to beat the hell out of our ROMs
- Graphic Designers - boot logos, wallpapers, banners(one or two people)
- Themers - theme EVERYTHING!!!
- Co-Dev(s) - Do i really know what I'm doing most of the time (the answer to that is "probably not")
- Moral Support - LOL
- Suggestions - anything you got - Lay It On Meh!!
our works:
MiniCM9
CodyROM
CM9 Build #15
Evervolv
AOKP
OmniROM
AOSPA-legacy
note to self: add all the works, links
find a thread tagged [TeamCody], that's ours
Team-
@thewisenerd
@omerjerk
@#Superuser
@dhrumangajjar
@navinn
Source- https://www.github.com/CodyROM/
Blog- http://www.codyrom.wordpress.com/
Yea, we need support and suggestions!
todo list:
generalise this
First, finish the work on "reverse mounter"; as it is *technically speaking* easy (for me, to write scripts, that do things); and is pretty straight forward (no aimless edits or so)
fix gps in omni
fix video recording in omni
udpate twrp
switch to wlan0 in omni
random trolling lol
@thewisenerd
we should fix the date bug in notif bar..
is that xml derps..??
navinn said:
@thewisenerd
we should fix the date bug in notif bar..
is that xml derps..??
Click to expand...
Click to collapse
No, its a java derp
Compiling CM11/Kitkat for pico!
I assume you have knowledge of building with source, even if not, I don't really care (for there are a lot of guides).
First, get *all* the required packages installed. As for what I mean by *all*, is not really a question for me to answer. I used <insert-random-guide-from-xda> here, and the source.android.com's guide on initializing, just to be sure.
As for java, I use openjdk. *most* sources today support openjdk, elseways, either, you could force it to be compatible by removing just ONE line in build/core/main.mk
So, that's the packages part.
As for syncing sources, as most guides say, you DON'T need to use a ~/system folder or anything. You can use a folder, anywhere.
Just open up a shell, wherever you want to get the sources synced, and type in the following commands.
I assume you have the repo tool installed. IMHO, you should really create a "bin" folder in your homefolder (short linked as "~/") using the following commands:
Code:
mkdir -p ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Then, open up your ~/.bashrc file, using Geany (a better alternative to Gedit, perhaps ), using the command:
Code:
geany ~/.bashrc
Just insert this line, randomly (preferrably at the end of the file).
Code:
PATH=$PATH:/home/<insert-your-username>/bin
Now, for syncing sources. Make sure you are a directory above working folder.
Code:
mkdir -p <insert-ROM-name>
cd <insert-ROM-name>
Now, that you are inside the working folder, take your pick about the ROM that you are going to compile. This tutorial is for CM11, so i'd be running the following command.
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
Yes, you can reference this from a cm10.2 source that you've already downloaded, and this will reduce the size required to download. Why, you could even reference this from an ICS source (just saying, not meant to be even tried).
If you aren't really building for mac, I'd suggest that you don't download the darwin repos.
Short way that I use:
Run following command in working folder.
Code:
mkdir -p .repo/local_manifests
grep "darwin" .repo/manifests/default.xml > .repo/local_manifests/local_manifest.xml
Open up local_manifest.xml using
Code:
geany .repo/local_manifests/local_manifest.xml
Add these lines on top:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
and the following line at end.
Code:
</manifest>
Now open up "search and replace" dialog box.
Search for:
Code:
<project
and replace with:
Code:
<remove-project
Voila, you've removed all the unnecessary darwin repos.
Now, for repo syncing.
I'd seriously suggest that if you live in parts of the world where the internet speeds are less than 1 m'b'ps (~128 k'B'ps (worst case, mine's around 60 k'B'ps, and I've known people with speeds ranging 30 k'B'ps), you'd sync just one repo at a time (the -jx).
run:
Code:
repo sync -j1
Else, if you have a super fast internet connection, please don't brag. Use a higher number, preferably 3, or 4.
Now, sync these repos, while I attend my classes. I'd return back and write part 2.
edit: part 2; go here: http://forum.xda-developers.com/showpost.php?p=49349691&postcount=8
Compiling CM11/Kitkat for pico! PART 2
reserved
Also, yes, you could use this localmanifest here: https://github.com/PicoKat/local_manifest/blob/dev/local_manifest.xml
but, you'd miss out the learning process
Anyways, this post would take up part 2 of the tutorial.
This is purely device specific. and, there's already a guide on android development section (of this device), the reason why I didn't make a new thread.
part 2 begins here:
Ok, so, you'd synced the repos?
Now, as opposed to roomservice, I'd prefer manually cloning the device tree, kernel, and vendors.
Clone a device tree (galaxyfreak's, or mine), into /device/htc/pico.
Clone the kernel sources from here: https://github.com/PicoKat/android_kernel_htc_pico
Clone the vendor tree from here: https://github.com/PicoKat/android_vendor_htc_pico
(note: if you are using my device tree, that has ION, you'd have to use my vendor tree, with updated blobs here: https://github.com/vineethraj49/android_vendor_htc_pico)
Ok, so that part's setup.
Now, lets move on to cherry-picking, and/or patching some stuff (from legaCyMod).
Note: you could have just added these to local_manifest too...
android_build:
Hopefully, you should know how to add remotes, and working with them, if not, click on the show content, below (as a sample for android_build):
Code:
git remote add legacymod git://github.com/legaCyMod/android_build.git
git fetch legacymod cm-11.0
git cherry-pick <commit-id>
where commit id's the looong "number" following /commit/ in the URL.
1. always rebuild build.prop
2. bringing back squisher
3. Removing TTS data
4. Revert adding auditd
5. add kitkat sdk versions
6. Revert "add drawables for all densities" (seriously, this saves space.)
7. adding support for our recovery
frameworks/av:
1. enable meta mode for video msm7x27a
2.bring back support for legacy omx
3. support legacy qcom audio variant
vendor/cm:
1. bring back squisher
2. revert adb authentication (yea, screw adb while dev'ving
3. remove ze bloats
Next, clone media-legacy to hardware/qcom/media-legacy, and display-legacy to hardware/qcom/display-legacy.
waait!!!!
You need to do some patches in some files. required to fix up camera.
patch two files, manually, making some sense out of this:
frameworks/base: https://github.com/szezso/vivo_cm11_patches/blob/d819363fe7d181e73841d3fa35c1b8c0c7d7c046/frameworks_base.patch
frameworks/av: https://github.com/szezso/vivo_cm11_patches/blob/2f1c87f4453c1c7c88e3c7d2b011994f894fe669/frameworks_av.patch
The next step:
Get prebuilts, seriously.
Code:
cd vendor/cm
./get-prebuilts
Then, "cd" back to root of source dir.
Run the following commands:
Code:
. build/envsetup.sh
brunch pico -j4
Hopefully, you should see an output package by the end of <insert-time-directly-propotional-to-crappiness-of-computer>
For batch-resizing bootanimation (in linux):
resizing part:
Code:
for file in *.png; do convert $file -resize 320x320! $file; done
you'd know which part to edit
for zip'ing part:
Code:
zip -r -y -q -0 bootanimation.zip *
will edit this later
Using CCahe
Now something very important who gonna compile ROMs, use CCache. It'll spped up the building process.
CCache - Compiler cache
How to use?
> Open a Terminal(Ctrl+Alt+T)
>
Code:
gedit /.bashrc
[You can use any alternative to gedit )
> Add the following lines to it:
Code:
export USE_CCACHE=1
export CCACHE_DIR=/[COLOR="Red"]source[/COLOR]/prebuilts/misc/linux-x86/ccache
Source here is the folder in which you have the code downloaded.
>
Code:
cd source
>
Code:
prebuilts/misc/linux-x86/ccache/ccache -M [COLOR="red"]25G[/COLOR]
25G = 25 GB of space to be used as CCache. You can use any value in this.
How does ccache work ?
Well , in short , what it does is that for C and C++ programs it caches the output. One it detects that the program is getting repeated it directly sends out the output and thus reduces the time of compilation.
After using ccache you will really feel the difference in the compilation speeds of your ROMs and kernels. //Copied.
Credits - Red Devil.
I use CCACHE, but the only difference is that I don't specify the directory. also, I did a "apt-get install ccache" long ago, and set file size according to that. Its still working just as fine.
and oh, yes, adding that USE_CCACHE=1 to .bashrc is required
IRC and you!
In case you came here via my signature, sorry for that. But really, you need to know some stuff about IRC, before going to a channel. The pico channel is #pico :fingers-crossed:
So, you might have heard about IRC, even logged into one (freenode, probably, the webclient of it), (and most probably saw that there was no activity and just closed that browser tab).
Let's take a timeout here to talk about IRC.
Instead of me talking about IRC, (and you being too lazy to Google stuff (not intended to those who solve problems themselves (not noobs (?) :wink: :wink)), here's a nice article by Rey Bango that you might want to read: IRC is Back: Here's Your Starter Guide
So, instead of me talking blah blah, and you skimming through most parts, which I assume, you did in the above article (considering you taking the energy to read it), here's what you need to know about Freenode:
..but in terms of development, from my experience, most developers tend to jump on Freenode - and rightfully so.
Click to expand...
Click to collapse
So, just to let you know, in those channels (where you thought there was no activity), there actually is a lot of discussion going on. You just don't know it yet.
So? What am I supposed to do? Keep a browser tab open? Don't expect me to say "Exactly not!" because that too is a viable option, though not very practically possible.
Here's where bouncers come in. Known as BNCs, here's what they do:
A bouncer (BNC for short) is a piece of software used to relay the communication between an IRC client and the network it is connected to, acting as a Proxy.
So, whats the point you ask? The reasons and benefits of using a bouncer are many and include hiding the real IP you are connecting from, protecting your nickname and channel from being taken on networks that don’t provide channel-/nickname registration and most of the time they’ll also notify you of private messages that came in when you’ve been disconnected – of course only when the bouncer can stay online being connected from a server.
Click to expand...
Click to collapse
Coming as either free or paid (either of them being useful, nonetheless), and cutting all the tech jargon, they allow you to "stay online" allowing you to close that browser tab you feared to keep open.
So, in case you actually read through the above quoted text, software!? Being connected from a server? Nah, just kidding. Here's where online BNC providers come in. They provide you a username, (and of course a password, which you need to select), and they host for you the BNC software (in most cases, ZNC).
Most BNCs allow caching of messages, i.e. buffered playback. Their servers are connected 24x7. You, the user, connect to their server, and through their server join the channels. You then, disconnect from their channel. Poof! But, their server still remains connected to the channels, and logs the messages in the channels, and any PMs sent to you. The next time you connect to their server, it gives you all the logged stuff, and it gets cleared. The next time you disconnect, ... Well, you get the flow.
Questions. That's what you go to IRCs for (mostly. I do it for the conversations ). How exactly do you ask questions? Similar to on XDA, but slightly different. I couldn't have said better than l3dx's answer on stackexchange:
Rule #1: Don't ask to ask
Rule #2: Behave as you would do in a real life conversation
Rule #3: Be patient. If there is no activity, it usually means that no one has read what you wrote yet. If no one responds, they don't know or didn't notice. You can re-try after a while, or ask if anyone has any clue with regards to your question x minutes ago.
Click to expand...
Click to collapse
What does Rule #1 mean?
Something very similar to what zxcdw said in the comments:
"Don't ask to ask. Just ask". Don't ask people "Anybody around?" or let alone highlight others to ask if they are around. It's just easier to drop your question, hang around and wait. Ask again in a few hours or so.
Click to expand...
Click to collapse
Also, use English, in most channels, if possible. Stay safe, don't open any unknown links or links to untested software, scripts and stuff. Stay safe.
IRC clients help you stay connected. A few simple google searches will get you going in the right direction. I personally use XChat IRC on Linux, but there are a lot of other good IRC clients available too.
Free bouncers should do, mostly. I use bnc.im, seen people using EliteBNC, some people installing ZNC in their own private servers that are online 24x7, YMMV.
That's about it for IRCs. Happy chatting!
P.S. Make sure you ask the right questions in the right channels.
sys2cache... something to help with less /system partition size.
note: this would be running at boot, with busybox, so,...
Code:
# algo:
# if read(switch_file=1)
# goto case 2.
# else case 1:
# get /system size
# get /data size
# get /cache size
# check /cache remaining size
# check for files in /system
# check for the following folders
# name generic size priority
# ./etc 3.1M 6
# ./vendor 36K 9
# ./addon.d 12K 8
# ./core 76K 7
# ./xbin 1.6M 5
# ./fonts 18M 1
# ./usr 21M 2
# ./media 4.8M 3
# ./bin 5.5M 4
#
# switch = 0;
# file folder_list;
# for i in list_args
# if (getsize($i) < getfreesize(/cache))
# mv $i /cache/$i
# mount bind /cache/$i /system/$i #fix syntax
# ifexists(/system/$i)
# switch = 1;
# folder_list >> $i
# else
# switch = 0; break;
# else
# echo "fak this, we're out of space!"
# fi
#
# echo $switch > switch_file
#
# sync; exit!
#
#
#
# case 2:
#
# for i in xargs(folder_list)
# do
# mount bind /cache/$i /system/$i #fix syntax
# done
#
# sync; exit!
#
#
#
# todo:
# * actually code this shiz
# * better error checking
# * add logging
Hey!
Make sure y'all check this!
http://team-cody.github.io/ :highfive:
welcome to another member @Agaphetos
Source- https://www.github.com/Team-Cody/
todo: update this post with website link.
lol, nvm this post
shameless bump.
since my board exams are over (sort of; only CS is left); i thought of building something for pico (a looong time since I did so).
Waht do I build?
At first thought; one *pure* CM9 build with *some* cherry-picks;
another; an updated CM11 build (updated sources and stuff)...
fixing up omx and stuff on Omni is on the "to-do" list and going to take some 'time' to do; so don't expect it to be fixed already :silly:
So; which one do I 'invest' time in? :cyclops:
@thewisenerd
MTP and OTG in cm9
Cm11 only if you can make it compressed
Sent from my Xperia S using XDA Free mobile app
mirhl said:
@thewisenerd
MTP and OTG in cm9
Cm11 only if you can make it compressed
Sent from my Xperia S using XDA Free mobile app
Click to expand...
Click to collapse
you mean MTP && USB tethering?
edit: a test build will be up today (if build goes well, that is).
edit: here you go: cm-9-20150315-UNOFFICIAL-pico.zip
thewisenerd said:
you mean MTP && USB tethering?
edit: a test build will be up today (if build goes well, that is).
edit: here you go: cm-9-20150315-UNOFFICIAL-pico.zip
Click to expand...
Click to collapse
This is one sick ROM - good job !!!
Info:
my device is rooted (fully) and my phone consist of Supersu, Nethunter terminal, bcmon, Reaver.
(below are the codes i modified for my device)
The history
when I first started running reaver i would receive many errors; [...not found] [...can't enable] [...can't change permissions (appearently you can't change permissions within sdcard folder... anyways, moving on.)]
[...no internet connection found]
my point is after looking at the custom scripts I had installed (with notepad++) i noticed that the actual scripts were the big issue. so I started changing things one by one in-order to not mess-up everything. yeah sure, I made some errors that made things last longer- way longer than normal. Nevertheless, at some point I actually started making things better and slowly started knocking down those errors!! until i hit the 'test' button and sure enough
"Cannot link executable... libfake_driver.so is 32 instead of 64.... only PIE are supported."
Truth Be Told
as you might can tell from the kind of question I'm asking, I am not an expert.
And I understand these kind of questions comes with others looking at the questioner as annoying- and with the thought of 'these beginners just want everyone to give answers instead of learning themselves...' It's NOT COMPLETELY wrong, since now days a comment like such is ... pretty much true-
So i'll say this: Not Every One Is The Same.
I am a programmer. my programming is mostly within game design/ game development so if more coding is needed to solve my issue at hand, then let me know and please (at the lease) point me in the right direction.
if I need to google something, please clarify what to search. For I am just one person, so it is possible I haven't thought of something to type in- however, that does not mean I haven't type MANY searches in already.
The Question
Am I able to use Rfa and bcmon on nexus 5x, and if so, then what is needed to get my phone operating (the app(s)) correctly? This is the complete error i am receiving in RfA.
CANNOT LINK EXECUTABLE: "/system/app/bcmon/assets/libs/libfake_driver.so" is 32-bit instead of 64-bit page record for 0x7f98e8c010 was not found (block_size=64)
error: only position independent executables (PIE) are supported.
My Done Work
with the rfa settings you can choose to use custom scripts the following shows the scripts i used and it's placement.
these scripts i had to modify to get the device's errors fixed ( not all though )
Activation Script:
#!/bin/bash
svc wifi disable
LD_LIBRARY_PATH=/sdcard/bcmon/assets/libs
LD_PRELOAD=/data/sdcard/bcmon/assets/libs/libfake_driver.so sh
cd /sdcard/bcmon/assets/tools
./enable_bcmon
echo “rfasuccess”
exit
Warm-up Script
#!/bin/bash
LD_LIBRARY_PATH=/sdcard/bcmon/assets/libs
LD_PRELOAD=/sdcard/bcmon/assets/libslibfake_driver.so sh
cd /sdcard/bcmon/assets/tools
Stop Script
#!/bin/bash
svc wifi enable
echo “rfasuccess”
Will you care to help me?