Copying english voice prompt files to WOS 2.0 ? - Amazfit

I really want to switch to WOS 2.0, but the one thing preventing me from doing so is that the voice prompt (when running with bluetooth headphones), would be in chinese.
I know that pacefied has english voice prompts (or had, as I believe it's not working in the most recent versions)
So my question is: is it a simple case of copying over some english voice files to the watch?
Could I install WOS 2.0 and then after installation copy the english files ?

I did replace the chinese voiceprompts with the english ones in the NewWearSport.apk, installed the rooted spanished version from here:
https://www.htcmania.com/showthread.php?t=1412777
and replaced the NewWearSport.apk via adb.
Everything installed well and is working well but I don't hear any voiceprompts. Since I don't have that much outdoor activities now due to an injury I couldn't check, why the voiceprompts are not working. I guess it is better to wait for Saratoga79 to have it done.

nhedgehog said:
I did replace the chinese voiceprompts with the english ones in the NewWearSport.apk, installed the rooted spanished version from here:
https://www.htcmania.com/showthread.php?t=1412777
and replaced the NewWearSport.apk via adb.
Everything installed well and is working well but I don't hear any voiceprompts. Since I don't have that much outdoor activities now due to an injury I couldn't check, why the voiceprompts are not working. I guess it is better to wait for Saratoga79 to have it done.
Click to expand...
Click to collapse
You mean you couldn't hear the voice prompts when your bluetooth headphones were connected? Could you hear chinese voice prompts instead?
I realise that Saratoga could probably solve this problem fairly easily (that guy really seems to know what he's doing), but I don't want to keep asking him cos I realise he's busy.
I feel like it must be just a case of replacing files in the file system. Or is it not that simple?

Voiceprompts are in the NewWearSport.apk integrated. I replaced the Chinese ones with the English ones. I didn't check the Chinese ones before. You have to open the apk files to do so. For this you can use several tools. Since my manipulated apk did install properly I guess it is save to assume, that I did it allright.

nhedgehog said:
Voiceprompts are in the NewWearSport.apk integrated. I replaced the Chinese ones with the English ones. I didn't check the Chinese ones before. You have to open the apk files to do so. For this you can use several tools. Since my manipulated apk did install properly I guess it is save to assume, that I did it allright.
Click to expand...
Click to collapse
I see. My assumption was as follows:
When you install an apk, the files are unzipped to the android file system somewhere (e.g. a newwearsport/voiceprompt folder or something). I thought that (without installing a new apk) you could just copy english files directly to the folder. Perhaps there is some technical reason why this isn't possible. I know very little about this stuff.

The version of the voice files in EN is missing some phrases in the new sport app, but the version in Spanish seems to be complete. I will do some tests today, trying to use ES+EN, so no words in CN...

le_lutin said:
When you install an apk, the files are unzipped to the android file system somewhere (e.g. a newwearsport/voiceprompt folder or something). I thought that (without installing a new apk) you could just copy english files directly to the folder.
Click to expand...
Click to collapse
I just had a look on the watch to be on the safe side.
This quoted assumption is wrong. The only trace of the NewWearSport.apk I found was under:
\system\app\NewWearSport\NewWearSport.apk.
Where is a Subfolder mips which contains the actual code as odex file which I didn't touch.
We have some traces in the data folder :
\data\data\com.huami.watch.newsport
but not the voicefiles. So in my opinion the only way to get to this files is via replacing them in the NewWearSport.apk and installing the new version of this apk.
.

nhedgehog said:
I just had a look on the watch to be on the safe side.
This quoted assumption is wrong. The only trace of the NewWearSport.apk I found was under:
\system\app\NewWearSport\NewWearSport.apk.
Where is a Subfolder mips which contains the actual code as odex file which I didn't touch.
We have some traces in the data folder :
\data\data\com.huami.watch.newsport
but not the voicefiles. So in my opinion the only way to get to this files is via replacing them in the NewWearSport.apk and installing the new version of this apk.
.
Click to expand...
Click to collapse
Thanks man - you know this stuff better than I do!

lfom said:
The version of the voice files in EN is missing some phrases in the new sport app, but the version in Spanish seems to be complete. I will do some tests today, trying to use ES+EN, so no words in CN...
Click to expand...
Click to collapse
Sounds good!

I just did a quick and dirty replace of the voices with ES + EN, still a few phrases in CN but I think that all of them are used only for VO2max which is deactivated on Pace.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root, code is for macOS/Linux, probably on Windows it will work if you use "adb.exe" instead of "adb" (untested), apk file must be in current directory.
Code:
adb root
adb remount
adb shell mv /system/app/NewWearSport/NewWearSport.apk /system/app/NewWearSport/NewWearSport.apk_OLD
adb push NewWearSport.apk /system/app/NewWearSport/
adb shell chmod 0644 /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
To revert:
Code:
adb root
adb remount
adb shell rm /system/app/NewWearSport/NewWearSport.apk
adb shell mv /system/app/NewWearSport/NewWearSport.apk_OLD /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
EDIT: attached file removed, please see other post in this thread with all EN version and scripts to install/uninstall.

lfom said:
I just did a quick and dirty replace of the voices with ES + EN, still a few phrases in CN but I think that all of them are used only for VO2max which is deactivated on Pace.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root, code is for macOS/Linux, probably on Windows it will work if you use "adb.exe" instead of "adb" (untested), apk file must be in current directory.
Code:
adb root
adb remount
adb shell mv /system/app/NewWearSport/NewWearSport.apk /system/app/NewWearSport/NewWearSport.apk_OLD
adb push NewWearSport.apk /system/app/NewWearSport/
adb shell chmod 0644 /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
To revert:
Code:
adb root
adb remount
adb shell rm /system/app/NewWearSport/NewWearSport.apk
adb shell mv /system/app/NewWearSport/NewWearSport.apk_OLD /system/app/NewWearSport/NewWearSport.apk
adb remount
adb reboot
Click to expand...
Click to collapse
You're a legend! Will try this out as soon as I get a chance.
Thanks!

le_lutin said:
You're a legend! Will try this out as soon as I get a chance.
Thanks!
Click to expand...
Click to collapse
Please test the attached file, all voices in EN high quality, with scripts to install/remove for macOS, Linux and Win. I haven't tested the BAT scripts, if someone test them, please report back. Thanks.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root (permanent or use temporary)
- Unpack file
- Open command line and change directory to the contents of the file
- To install run "sh install_en_voices.sh" for macOS/Linux or "install_en_voices.bat" for Windows
- To uninstall run "sh remove_en_voices.sh" for macOS/Linux or "remove_en_voices.bat" for Windows
When reboot, watch will re-optimise all app, it's normal, simply wait. No data will be affected.

lfom said:
Please test the attached file, all voices in EN high quality, with scripts to install/remove for macOS, Linux and Win. I haven't tested the BAT scripts, if someone test them, please report back. Thanks.
DISCLAIMER
** Although I have tested the procedure, if you do it then you do on your own risk. I am not responsible for any errors or damaged caused. **
Requires: WOS 2.0.6.12 set to "en" + adb + root (permanent or use temporary)
- Unpack file
- Open command line and change directory to the contents of the file
- To install run "sh install_en_voices.sh" for macOS/Linux or "install_en_voices.bat" for Windows
- To uninstall run "sh remove_en_voices.sh" for macOS/Linux or "remove_en_voices.bat" for Windows
When reboot, watch will re-optimise all app, it's normal, simply wait. No data will be affected.
Click to expand...
Click to collapse
Nice work, will add this to next WOS ROM.
Btw, note that I had some problems with voices using different bitrate, frecuency or channel number comparing to stock CN voices. I face several Bluetooth issues due to this, even bluetooth disconnections, so be advised.

Saratoga79 said:
Nice work, will add this to next WOS ROM.
Btw, note that I had some problems with voices using different bitrate, frecuency or channel number comparing to stock CN voices. I face several Bluetooth issues due to this, even bluetooth disconnections, so be advised.
Click to expand...
Click to collapse
Thanks. And thank you for all the work you've done for the Amazfit community as well. No problems with my testings yesterday, I did a walk and also indoor running for testing. But this was the initial version, a quick build for testing purposes. Many of phrases can be improved, maybe it's better to wait until it's finished.
Regards

I tried it today while running. I got no voicealerts.
Settings:
Bluetooth headset connected but no musicplayer started (music playing is working with bluetooth headset [verified]).
Run - Settings - Training target (not set)
- Alerts - Lap Alert - on
- HR Alert - above 170
- HR Zone - off
- Auto Lap Alert - on
- Pace Alert - off
more settings - Voice prompt - on
- Auto Pause - off
- Auto Lap - off
- Realtime Stats - Heartrate
- Data Screen - 6fields
- 3D Data - on
- BG Color - white

nhedgehog said:
I tried it today while running. I got no voicealerts.
Click to expand...
Click to collapse
I have tested with walk and indoor run and it worked with me, enabled most voice alerts and I could hear warning on pace, heartrate and distance. If you don't connect the headphones in the Accessories part of the activity settings, then try to start playing a music before you start the activity and then pause it using the headset to make sure it's activated.

nhedgehog said:
I tried it today while running. I got no voicealerts.
Settings:
Bluetooth headset connected but no musicplayer started (music playing is working with bluetooth headset [verified]).
Run - Settings - Training target (not set)
- Alerts - Lap Alert - on
- HR Alert - above 170
- HR Zone - off
- Auto Lap Alert - on
- Pace Alert - off
more settings - Voice prompt - on
- Auto Pause - off
- Auto Lap - off
- Realtime Stats - Heartrate
- Data Screen - 6fields
- 3D Data - on
- BG Color - white
Click to expand...
Click to collapse
Try with music, if there is a problem with voice files music will stop playing

Thanks for the support.
Headphones were connected and playing music fine before.
I think I have an idea whats wrong.
1) I run with airplane mode on but bluetooth activated. (PaceON)
2) I did not use the settings accessories to connect with the headphones but did it before with music.
3) Auto Lap - off
Have test this theorie further.

Saratoga79 said:
Nice work, will add this to next WOS ROM.
Btw, note that I had some problems with voices using different bitrate, frecuency or channel number comparing to stock CN voices. I face several Bluetooth issues due to this, even bluetooth disconnections, so be advised.
Click to expand...
Click to collapse
NewWearSport concatenates all the mp3 files needed to form the phrase in a temporary mp3 file.... these means that all mp3 files need to be same bitrate and with no headers (xing, id3, VBRI or another tags at the start or end of the file)

Related

[App]Market HighRes Fix[May 3rd] (2.3.6) Eclair| (2.3.4)Floyo | GiggleBread (No)

Mar 14th : 2002304 version Fixed work fine for me on 2.1 stock ROM.
only 964×544 faked Res
maybe you will need an other version if you run on a Custom Mod, post below if it worked or not for you ad which rom
WORK FOR MINI & PRO (and maybe others phones)
Here are the Versions :
2002306 (2.3.6) 544×964 faked Res teapea's work (thanks him) : http://www.megaupload.com/?d=STR8DHKW
---------------------------------------------------------------------------------------
To use older version : delete or rename marketupdater.apk
2002304 544×964 faked Res version: WORKING
Code:
http://www.megaupload.com/?d=L18MP8HY
signed 2002304 544×964 faked Res version: report as working
Code:
http://www.megaupload.com/?d=570LCOE0
the both versions are reported as WORKING on 2.1 stock ROM, I can't know if they work on any custom mod untill you confirm it.
******************************************************
floyo's custom mod this one WORKING :
http://www.megaupload.com/?d=WAPZVYD8
*****************************************************
giggleBread provided by ctalcant
http://www.megaupload.com/?d=S05I08YH NOT TESTED
http://www.megaupload.com/?d=GSEOQVMQ (signed version) NOT TESTED
compare results before and after and please reports below
************************************************************
here the old one (2002013) for those who hate the new userInterface (don't forget to delete/move marketupdater.apk
Code:
unsigned 2002013 version :TESTED/WORKING
http://www.megaupload.com/?d=19JB1BK2
http://www.mediafire.com/?aep26ecp55184rj
signed version 2002013: NOT TESTED
http://www.megaupload.com/?d=TXBQYD80
http://www.mediafire.com/?ssszch5r6as27r8
How to :
0- download and put the file on your sdcard, unmount your sdcard
0.5 - rename it "com.android.vending.shokmah.apk" (without the quotes)
1-activate FlightMode
2-goto settings > applications > manage applications > [menu bouton] filter > all
2.5 - select market then uninstall update, and force stop
3- activate usb debugging and launch adb on your computer then type these line
Code:
adb shell
su
mount -o rw,remount /dev/block/mtdblock0 /system
cat /system/app/Vending.apk > /sdcard/Vending.bkp.apk
rm /system/app/Vending.apk
rm -r /data/data/com.android.vending
rm /data/dalvik-cache/[email protected]@[email protected]
cat /sdcard/com.android.vending.shokmah.apk > /system/app/Vending.apk
For rm /data/dalvik-cache/[email protected]@[email protected] don't pay attention if you got an error !
If you found "adfree android" or 3544 (or +) results for video , it's worked.
If you want to thanks me, just choose the megaupload link.
Greetz:
Inteks for the old version
Orion for His Easy APK Disassembler
and what exactly are the benefits with this version compared to that one: showthread.php?t=742608
or that one: showthread.php?t=645286&highlight=market
i still dont know why it keeps saying, that im not allowed to "post outside links" when i write a link to another topic...
I dont know but inteks's version was "erased" by market updater so I take the update and Fake the resolution.
New users Are not allowed to post links
that's why I put mine with code "tag"
sorry for the english
Thanks, but there is no com.android.vending.apk in /system/app. Do you mean Vending.apk?
yes, mine disapearred after some tests, then I push it to com.android.vending.apk and it work well.
User report me that with Vending.Apk name it also work.
It works great! Can confirm it's the new version 2002012.
Thanks shokmah
Thanks for this shokmah!!
Whats the difference? ive done the patch, but i dont see any different...
I don't know the entire difference Between the Stock original One, but It may add new features such as Instant search, apk auto-update option, and many others features.
The patched version allow you to view app which require 320×480 screen Display, some of theses apps work great on our 240×320 screen Display.
I may add support for greater Screen resolution but more you Increase Resolution, More unlocked app will not work smoothly.
Sorry for the english, it's not my native language !
EDIT :
to verify if it work :
search for adfree android and you should found the app
search for video you should have 3544 found result
thanks a lot!
Now I can download "adfree android" app, but "video" string result get 2202 result..
ps: Xperia X10 mini pro, and 2.1
maybe it's different for other , I've french market
Worked for me
Thanks!
you know it works if you search "video" and see results for "video ringtones"
"video ringtones" : 46 matches
Thanks. Worked for me.
When i search "video", i get 3368 results.
How can i prevent the market from getting self-updated in the future? I dont want to disable the data traffic for ever
simplest way to hack the market is here by me..http://bit.ly/9E3Bii
Root explorer's way seem to be simplest way , but adb's way is powerful and completely free and normaly you should pay for RoOt Explorer .
@MonteChristo1979 : you have to delete marketupdater.apk in /system/app, for new update I or Someone will post a patched Vending.apk again
the market is not the problem ! its the marketupdater !!! delete it and everything is fine
badboybiky said:
simplest way to hack the market is here by me..http://bit.ly/9E3Bii
Click to expand...
Click to collapse
nope ! the simplest way you get here ->> http://forum.xda-developers.com/showthread.php?t=845130
wow, YOu made an awesome work, a GUI for those who are affraid of command lines is Great.

[BUGLIST] AOSP 2.2 ROM Bugs and Fixes | Post questions here

If you ...
find a bug or problem on 2.2, post here
find a solution on how to fix the bug, post here
want to get help on how to fix the bug, post here
anything else, goes here
This thread are meant for bug/problem solution and reported bug list of 2.2 custom ROM which i will try to manage, so people are not posting same bug, and asking for same solution all over again in X10 Custom ROM AOSP thread.
Limitation
Cannot Mount via USB
2.2 Custom ROM put the SYSTEM partition on your phone memory and the DATA partition in your SD card. That is why you cannot dismount the SD card from Android to mount to your PC.
No App2SD
2.2 Custom ROM is still running on 2.1 Custom Kernel which not supporting this.
Bug list
#0001 - WiFi not working - Fixed on 2.2
#0002 - Random android.process.media force close - Fixed on 2.2
#0003 - Home button not working, and no Lock Screen - Fixed on 2.2
#0004 - Cannot install certain APK (Angry Bird)
#0005 - No radio, no network and flashing Home - New on 0.0.2
#0006 - ADB shell have SU access, but Titanium Backup cannot work - New on 0.0.2
#0007 - SD Card non-ascii folder show as ???
#0008 - Facebook Contact Sync not available
#0009 - CPU Governor set to performance by default
Solutions for bugs
#0001 - How to enable WiFi on 2.2 Custom ROM
1. Try to enable WiFi, of course it will not work.. just do it.
2. WiFi will goes off automatically
3. Run
Code:
adb shell /system/bin/wlan_tool
4. If the adb stucks, just press CTRL+C
5. Repeat step 4 until you crash the phone
6. After reboot, your WiFi will work.
or
Code:
adb shell killall servicemanager
Post Reference
#0002 - android.process.media FC solution
0.0.1 compiled with prefilled databases which invalid for your phone
Code:
adb shell
cd /data/data/com.android.providers.media/databases
rm *
reboot
or this will ensure no invalid data anymore but will remove fixes for bug #0003
Code:
adb shell
cd /data/
rm -r data
mkdir data
reboot
Post Reference
#0003 - Fix Home Button & Lock Screen
Download sqlite here
First pull the db file first.
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
Then add value to its content
Code:
sqlite3.exe settings.db
sqlite> INSERT INTO "secure" VALUES(67,'device_provisioned','1');
sqlite> .exit
Then push back the db
Code:
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Then reboot.
Post Reference
#0004 - Solving installing APK problems
Currently the 2.2 Custom ROM does not support app2sd, and some APK may configure it self to be installed in sdcard.
So we force it to install on internal with code below
Code:
adb shell pm setInstallLocation 1
adb install -l com.rovio.angrybirds.apk
Post Reference
#0005 - Fixing radio, wifi and home screen flashing problem
Run this command
Code:
adb shell killall servicemanager
Post Reference
#0006 - Fixing SU access for Titanium Backup
Run this command
Code:
adb shell chmod 4755 /system/bin/su
Post Reference
#0007 - Fixing SD card mount command to show unicode letters
Modify your chargemon file so its enables utf8 for non ascii letter.
You need to do this on 2.1 ROM, not 2.2 ROM. The file is located in /system/bin
look for this
Code:
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sd
and change into this
Code:
mount -t vfat -o rw,noatime,nodiratime,utf8 /dev/block/mmcblk0p1 /sd
Notes:
You must use a Unix/Linux format capable text editor for this. Notepad will not work.
You can try ultraedit for it.
Post Reference
#0008 - Fix Facebook Sync
Download the ContactsProvider.apk here, then install to your Android using push command
Code:
adb push ContactsProvider.apk /system/app/ContactsProvider.apk
adb reboot
Post Reference
#0009 - Using SetCPU
By default is Performance, fast but wasting too much battery.
Use SetCPU and set to OnDemand.
Post Reference
2.2 Custom ROM FAQ
How and what happened if upgrade from 0.0.1 to 0.0.2?
Just copy data.img and system.img replacing your current one in FreeX10 folder.
This will replace all your 0.0.1 data, be sure to back up first with Titanium Backup
WiFi is running and connected, but cannot browser
This problem seems to be occurring on selected few.. You can set static IP to your android.
Go to Settings -> Wireless ... -> WiFi, then press menu button. From there you can se static IP
Is there a possibility of Timescape and Mediascape for 2.2 Custom ROM
The answer is yes, its possible.
I managed to install Mediascape.apk into 2.2 Custom ROM, but cannot run.
The reason it cannot run is because UX is using a lot of things in Framework-res.apk, images, layout, styles, and etc which cannot be copied directly from SE 2.1 into 2.2 AOSP. It requires someone to properly put all values, resolving conflicts inside Framework-res.apk before the UX can run, which will take months or at least weeks if someone dedicated his or her day job for it. Then after that we still need to deal with external files. So in conclusion, while it still possible, i don't think anyone will do it because of the time demanding process.
I want to help devs solving bugs, i found one but i don't know what actually happend.
While usb connected, from command prompt, type
Code:
adb logcat > logcat.txt
This will output a lot of debugging info into logcat.txt file, later if you find bug, you take a look inside the file.
See anything error or info related to the bug, and post here.. When writing the logcat.txt output, but them inside
Code:
brackets.
Do not post everything.. post few lines related to the bugs.
2.2 Custom ROM Testing Tools
Service Menu
WARNING: DO NOT INSTALL THIS UNLESS YOU DO DEVS, END USER DO NOT INSTALL
PURPOSE: MAYBE FOR TESTING DEVICE FEATURE, MIGHT BREAK SYSTEM APPS
Enable SE Service Menu for device testing. For devs only. You need to put adb stuff in the directory for install.bat to run.
Install framework
Code:
adb push permissions /system/etc/permissions
adb push lib /system/framework
adb reboot
Install applications
Code:
adb install app\bootinfo3.apk
adb install app\ServiceMenu2.apk
adb install app\com.laac.launcher.servicemenu.apk
Nice work. THis is handy
As i posted in the Main thread!
I think some of the force closes, (mainly acore and google framework) and the fact that the market crashes, come down to importing a vcard!
I imported vcard, get many force closes, market stops working, I clean install and don't install the vcard. Everything functions fine.
I do believe this is the reason!
Greeet ~~!! but can u tell me the seloution of this proplem :
i was run 2.2 001 ok ? then i back to to SE 2.1 to change old system.img & data.img by the new on FreeX10_alpha-release_0.0.2-UPDATE , ok ? then i reboot my phone into 2.2 , it run but like u make a refresh on computer ! evry 3 second !
thnx
Ahmed radi said:
Greeet ~~!! but can u tell me the seloution of this proplem :
i was run 2.2 001 ok ? then i back to to SE 2.1 to change old system.img & data.img by the new on FreeX10_alpha-release_0.0.2-UPDATE , ok ? then i reboot my phone into 2.2 , it run but like u make a refresh on computer ! evry 3 second !
thnx
Click to expand...
Click to collapse
Please read the main post!
sorry but no one answer me there
Thanks
Thanks for this ,hopefully a post like this is made for the 1st post on 2.1
http://forum.xda-developers.com/showpost.php?p=9134882&postcount=1
awesome thread, very helpful. Hopefully more people will read this rather than constantly posting the same bugs in the main thread.
Ahmed radi said:
sorry but no one answer me there
Click to expand...
Click to collapse
hey ahmed
grb el solution da
#0005 - Fixing radio, wifi and home screen flashing problem
Run this command
Code:
adb shell killall servicemanager
i think en da el 7l
bye
bsthost said:
hey ahmed
grb el solution da
#0005 - Fixing radio, wifi and home screen flashing problem
Run this command
Code:
adb shell killall servicemanager
i think en da el 7l
bye
Click to expand...
Click to collapse
i dont know how to use adb shell is there anythread for newbie user how to use adb ?
angry birds on my x10 is working well....i take it from a previous backup and restrored on 2.2 with mybackup pro
Please post to http://forum.xda-developers.com/showthread.php?t=835308&page=9999 thread instead.
We don't need to create two discussion thread.
i fixed the wifi and flashing problem and i have connected to wifi but i cant access internet or market any it seems i have connected to my modem netwok still cant access to internet any idea how to fix this?
17mayis said:
i fixed the wifi and flashing problem and i have connected to wifi but i cant access internet or market any it seems i have connected to my modem netwok still cant access to internet any idea how to fix this?
Click to expand...
Click to collapse
Code:
setprop ro.kernel.android.ndns 2
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 8.8.4.4
New crash this morning : i tried to connect my BT headphone after that i've activated BT => BT has desactivated itself then the phone reboots.
zephyrix said:
Code:
setprop ro.kernel.android.ndns 2
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 8.8.4.4
Click to expand...
Click to collapse
i appreciate your answer man if you could tell me how to do this ? through adb shell or something else?
17mayis said:
i dont know how to use adb shell is there anythread for newbie user how to use adb ?
Click to expand...
Click to collapse
Google is your friend!
i have flashPlayer10.1 problem it,s to slow when i play on any website any solution what might be ?

[Q] How to fix edit of platform.xml gone wrong on Note3 SM-N9005?

I did a search and have found similar threads. However, people seem to have been intelligent and back up stuff or installed recovery apps before screwing around with their phones. I did not.
I have a Samsung Note3. Kit Kat 4.4.2 installed OTA once I had it up and running. I rooted it. However, the version of Kit-kat has a famous issue in that it would not allow apps to write to the SD card. I found a site with manual instructions to edit the platform.xml to overcome this issue. The site is as below:
winaero.com/blog/unlock-external-sd-card-writing-for-all-apps-in-android-4-4-kitkat/
However, something went awry after rebooting. I could not see anything on my SD card and I was unable to edit the platform.xml. A solution seemed to be to flash the ROM (using ODIN 3.07). I did this and currently have Baseband version N9005XXUENB1 and Build Number KOT49H.N9005XXUENB7
However, the still has lots of issues. I can stick in a password on wifi and connect to the network but it does not actually communicate with the internet. The H with up and down arrows appears for 3g connectivitiy but also does not work. Bluetooth does not work. Youtube has stopped working errors are common. I am unable to install any apps as cannot use play store, etc. I have pictures and mp3s on my SD card but gallery comes up empty as does music app. The only "file explorer" I seem to have is "my files" app. It comes up as empty (although it shows Total storage available for both SD memory and device storage as using 25/32 and 22/29 respectively.
I am guessing that flashing the ROM did not remedy the corrupt platform.xml in the permissions folder. I think the folder path was etc/permission/platform.xml although am not an expert with android. I was hoping someone might be able to give me a solution to fix the issue. Preferably a completely fresh and clean wipe type solution. Although as I am a "newbie" the greater the simplicity of the solution the better.
Apologies for the length of this issue!
T
laconical said:
I did a search and have found similar threads. However, people seem to have been intelligent and back up stuff or installed recovery apps before screwing around with their phones. I did not.
I have a Samsung Note3. Kit Kat 4.4.2 installed OTA once I had it up and running. I rooted it. However, the version of Kit-kat has a famous issue in that it would not allow apps to write to the SD card. I found a site with manual instructions to edit the platform.xml to overcome this issue. The site is as below:
winaero.com/blog/unlock-external-sd-card-writing-for-all-apps-in-android-4-4-kitkat/
However, something went awry after rebooting. I could not see anything on my SD card and I was unable to edit the platform.xml. A solution seemed to be to flash the ROM (using ODIN 3.07). I did this and currently have Baseband version N9005XXUENB1 and Build Number KOT49H.N9005XXUENB7
However, the still has lots of issues. I can stick in a password on wifi and connect to the network but it does not actually communicate with the internet. The H with up and down arrows appears for 3g connectivitiy but also does not work. Bluetooth does not work. Youtube has stopped working errors are common. I am unable to install any apps as cannot use play store, etc. I have pictures and mp3s on my SD card but gallery comes up empty as does music app. The only "file explorer" I seem to have is "my files" app. It comes up as empty (although it shows Total storage available for both SD memory and device storage as using 25/32 and 22/29 respectively.
I am guessing that flashing the ROM did not remedy the corrupt platform.xml in the permissions folder. I think the folder path was etc/permission/platform.xml although am not an expert with android. I was hoping someone might be able to give me a solution to fix the issue. Preferably a completely fresh and clean wipe type solution. Although as I am a "newbie" the greater the simplicity of the solution the better.
Apologies for the length of this issue!
T
Click to expand...
Click to collapse
Sounds like a bit of a pickle. Since you know that Odin is working and the firmware you have at least flashes correctly, I'd consider installing a custom recovery, backing up EFS folder (and the rom too, just in case there is some weird issue with Odin the 2nd time around) , then wipe everything - /system included. This will make your phone not be able to boot up at all because it will wipe the OS off. Then just boot directly to Download and redo the firmware flash. Something else to consider since you do have the international version, is that some of the firmwares you install might be more carrier or region specific, so there might be a better option to install. I know that there is a some slightly newer version that has NC2 in it as I was trying to fix one of these phones the other day that could not register on any network and ran across that build. Do you remember the build number of the software before you started modding?
Hello. Thanks for the reply.
I am going to ask what are probably very obvious questions but I am a little out of my depth.
1) What does installing a custom recovery involve?
2)How would I backup the EFS directory? When I had ES file explorer I would have been able to try and find it. However, as it is I do not know how to find the directory and back it up. I have connected the phone to a windows laptop and it shows up as note3 but there are no folders or files visible in either the phone or on the card.
3) What is the procedure to "wipe everything"?
I think the final part I know how to do with ODIN. Just go to download boot and load and run odin with the ROM.
I got the BTU ROM is that not for the UK? I tried looking up what NC2 was but did not really find anything the explained what it is.
Thanks again and sorry for the ignorance on my side.
Let's put the custom recovery and all that on the back burner for now.
Was your phone unlocked from the factory or did you get it from a carrier? If from a carrier, which, and is it unlocked now or you are still using it with the original carrier? This one is for Vodaphone http://www.sammobile.com/firmwares/3/?download=27401 but if you are unlocked, it should work anyway, I believe.
Thanks to the people for their replies. I managed to solve the issue as below.
As mentioned previously I had flashed using ODIN and BTU version of N9005XXUENB7. The only other thing that was then required was to enter the recovery (I think power + volume up + home and then release power once samsung name appears). I then selected wipe data/factory. A reboot later and everything was solved.
es0tericcha0s said:
Sounds like a bit of a pickle. Since you know that Odin is working and the firmware you have at least flashes correctly, I'd consider installing a custom recovery, backing up EFS folder (and the rom too, just in case there is some weird issue with Odin the 2nd time around) , then wipe everything - /system included. This will make your phone not be able to boot up at all because it will wipe the OS off. Then just boot directly to Download and redo the firmware flash. Something else to consider since you do have the international version, is that some of the firmwares you install might be more carrier or region specific, so there might be a better option to install. I know that there is a some slightly newer version that has NC2 in it as I was trying to fix one of these phones the other day that could not register on any network and ran across that build. Do you remember the build number of the software before you started modding?
Click to expand...
Click to collapse
Hi, The other day i tried to fix the Platform.xml. on my S5. i noticed sometime after that when i move files using the "My files" app, the phone would not refresh the files so that they would show up in gallery, videos etc.. I tried to undo the Media_rw by using SD Maid to find the Platform.xml and Axel to rewrite the Xml. In the platform.xml. i deleted the Media_rw and replaced the old xml with the old (original) one. I rebooted my phone. On swiping to open the screen i noticed alot of apps crashing one after the other. I when back to SD Maid and searched for Platform.xml and opened it with Axel but it said file not found.. i can not use the internet, i cant use most apps, i cant even use the Kies on my computer. I cant save anything to the storage either. I really need help. Odin is the only thing i can use. but i dont know how i can reset the xml files on my phone.. What exactly am i do to?
please
christaph3r said:
Hi, The other day i tried to fix the Platform.xml. on my S5. i noticed sometime after that when i move files using the "My files" app, the phone would not refresh the files so that they would show up in gallery, videos etc.. I tried to undo the Media_rw by using SD Maid to find the Platform.xml and Axel to rewrite the Xml. In the platform.xml. i deleted the Media_rw and replaced the old xml with the old (original) one. I rebooted my phone. On swiping to open the screen i noticed alot of apps crashing one after the other. I when back to SD Maid and searched for Platform.xml and opened it with Axel but it said file not found.. i can not use the internet, i cant use most apps, i cant even use the Kies on my computer. I cant save anything to the storage either. I really need help. Odin is the only thing i can use. but i dont know how i can reset the xml files on my phone.. What exactly am i do to?
please
Click to expand...
Click to collapse
Hey, I was wondering if you ever got a fix on this without factory reset. I am having the exact same issue.
Same boat here. Please someone help!
woahs said:
Hey, I was wondering if you ever got a fix on this without factory reset. I am having the exact same issue.
Click to expand...
Click to collapse
I am having exact same problem. After editing the platform.xml, my Note 3 is behaving the same way: no access to any storage area (including USB drive), no remote access/online access (even though WIFI and 4G appear to connect just fine), most apps fail with 'Unfortunately ... has stopped' error message, no Google Play...
I really don't want to do a factory reset, but really, does it even help? Is there a way to put the platform.xml back? Is there a way to access the phone via USB cable?
vbcomer said:
I am having exact same problem. After editing the platform.xml, my Note 3 is behaving the same way: no access to any storage area (including USB drive), no remote access/online access (even though WIFI and 4G appear to connect just fine), most apps fail with 'Unfortunately ... has stopped' error message, no Google Play...
I really don't want to do a factory reset, but really, does it even help? Is there a way to put the platform.xml back? Is there a way to access the phone via USB cable?
Click to expand...
Click to collapse
Update: I went ahead and successfully install the all-in-one file to the phone via Odin, but it still has the same issues. Can someone give a hint? thanks
FIX!!!
Hi I'm a god at searching(hence the Go)but an Noob(hence the obie) to Dev on Android but a computer techy(in other words I fix computers upgrade ETC.) Now if you followed EXACT instructions you SHOULD have the Backup copy of platform.xml. If not reply and I'll give those instructions.
So I did the same as this post did to get my issue as well but there's a SOLUTION I just found W/o getting rid of your loved files and its easy!
1. Download the ADB also included in The Android SDK by Google (approx. 3XX MB)
2. DOWNLOAD Root Explorer.APK
3. Extract ADB Dev kit( name should be roughly adt-bundle-windows-x86_64-20140702.zip)Note: I prefered it at C:\Android it avoided Name too long error
4. Open CMD Type: cd C:\<location ADB was extracted>\sdk\platform-tools(if you followed my note it will be "C:\Android\adt-bundle-windows-x86_64-20140702\sdk\platform-tools") and press enter... HINT TO COPY PASTE IN CMD RIGHT CLICK SAVES TIME!!!!
5. Install Root Explorer so you can backup your files(if any) I was unlucky having none on the phone but SD storage is ok!
To do this type ADB INSTALL <Location of Root explorer.exe> For standard windows users with default download locations it would be "C:\Users\<USER NAME>\Downloads\Root Explorer v3.1.9.apk" <COPY PASTE
6. Copy the original back to System>ETC>Permissions and overwrite
7. Factory reset!
Links?
sorry guys bt i have the same note 3 and i delete the platform.xml file .....i did a factory reset bt nothing happened ...can u help plz
Re:FIX!
But you have to set the permissions of platform.xml as 0777.Right?
Step 5 how should it works
Android Goobie said:
Hi I'm a god at searching(hence the Go)but an Noob(hence the obie) to Dev on Android but a computer techy(in other words I fix computers upgrade ETC.) Now if you followed EXACT instructions you SHOULD have the Backup copy of platform.xml. If not reply and I'll give those instructions.
So I did the same as this post did to get my issue as well but there's a SOLUTION I just found W/o getting rid of your loved files and its easy!
1. Download the ADB also included in The Android SDK by Google (approx. 3XX MB)
2. DOWNLOAD Root Explorer.APK
3. Extract ADB Dev kit( name should be roughly adt-bundle-windows-x86_64-20140702.zip)Note: I prefered it at C:\Android it avoided Name too long error
4. Open CMD Type: cd C:\<location ADB was extracted>\sdk\platform-tools(if you followed my note it will be "C:\Android\adt-bundle-windows-x86_64-20140702\sdk\platform-tools") and press enter... HINT TO COPY PASTE IN CMD RIGHT CLICK SAVES TIME!!!!
5. Install Root Explorer so you can backup your files(if any) I was unlucky having none on the phone but SD storage is ok!
To do this type ADB INSTALL <Location of Root explorer.exe> For standard windows users with default download locations it would be "C:\Users\<USER NAME>\Downloads\Root Explorer v3.1.9.apk" <COPY PASTE
6. Copy the original back to System>ETC>Permissions and overwrite
7. Factory reset!
Links?
Click to expand...
Click to collapse
Hi have next message in the install root step could you help me please
Android Debug Bridge version 1.0.31
-a - directs adb to listen on all interfaces for a connection
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push [-p] <local> <remote>
- copy file/dir to device
('-p' to display the transfer progress)
adb pull [-p] [-a] <remote> [<local>]
- copy file/dir from device
('-p' to display the transfer progress)
('-a' means copy timestamp and mode) adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "\n" adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only) adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fails
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-d] [-s] [--algo <algorithm name> --key <hex-encoded ke
y> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-d' means allow version code downgrade)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default is noobb.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.) adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1 [parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.

How to create a shelf icon that executes a shell programm call?

Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
I would like to know it too. Anyone?
Sneets said:
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
Click to expand...
Click to collapse
Run a tiny web server like lighttpd in the shell on a weird port, restrict to localhost. Set up index.php to run system (whatever);
Then bookmark the 127.0.0.1: xxxx URL
Which system call invokes power_dbus_suspend?
Thanks Parrotgeek1. Working off your excellent suggestion I installed a lightweight local server on ChromeOS (Web Server for Chrome with the 200 OK! icon) and built a small framework app that is served from local storage. I'm all set up to call chrome.app.??? from my JavaScript. Which API provides the power_dbus_suspend capability? I looked through the Power and System APIs and I don't see anything. - Thanks!
Sneets said:
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
Click to expand...
Click to collapse
Have you tried this simple extension? Keep Awake
https://chrome.google.com/webstore/...lb?utm_source=chrome-app-launcher-info-dialog
What I do is have the shell tab pinned, and press [up arrow] for the command then hit [enter]. Probably not ideal if you use the shell a lot as you have to step through recently used commands.
Re: Pkt_Lnt's post
Thanks Pkt_Lnt. That app only deals with disabling the normal sleep behavior, not causing it, and in particular not causing it when an external monitor is connected. I'm looking for something like Sneets has requested, to invoke a powerd_dbus_suspend command that will force the system to sleep (and turn off an external monitor). Per Parrotgeek1's comment, I've got a little app now sitting on the shelf that is all set to call some system command to invoke powerd_dbus_suspend, only I'm looking for what command to call, from JavaScript.
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
This method might be overkill somewhat, but, anyway, what I did was as follows:
Installed Secure Shell extension; setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf); rebooted; added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection; setup Android homescreen shortcut to send shell command; created profile in Secure Shell app on Chromebook to connect to [email protected]/my local IP address; generated keys on Chromebook (in ~/.ssh); added generated public key to ~/.ssh/authorized_keys; imported newly-generated private/public key pair within Secure Shell app (one by one); created bookmark link to [email protected] profile in shelf, and, finally, added required command to profile in Secure Shell.
It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax:
Code:
-- thecommand
Although I guess commands that need sudo would require a connection to [email protected], instead of chronos. (-t argument lets you use sudo, but then sending a line break/ENTER seems to be needed)
The window opened with the click does hang around - I haven't figured out if it's possible to avoid this - but it does at least seem to persistently remember the size and position to which it's set.
I posted up some further details at http://nolirium.blogspot.com/shell-command-shelf-shortcut-chromeos.html
Impressive! But a bit more than I'm looking to do
@Nolirum - I read your blogspot doc and your procedure's pretty impressive. Frankly it's a little beyond me and beyond what I'm looking for. If you ever run across a way to invoke powerd_dbus_suspend a little more directly please post here as well. You clearly have a strong grasp of the issues!
Nolirum said:
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
This method might be overkill somewhat, but, anyway, what I did was as follows:
Installed Secure Shell extension; setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf); rebooted; added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection; setup Android homescreen shortcut to send shell command; created profile in Secure Shell app on Chromebook to connect to [email protected]/my local IP address; generated keys on Chromebook (in ~/.ssh); added generated public key to ~/.ssh/authorized_keys; imported newly-generated private/public key pair within Secure Shell app (one by one); created bookmark link to [email protected] profile in shelf, and, finally, added required command to profile in Secure Shell.
It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax:
Code:
-- thecommand
Although I guess commands that need sudo would require a connection to [email protected], instead of chronos. (-t argument lets you use sudo, but then sending a line break/ENTER seems to be needed)
The window opened with the click does hang around - I haven't figured out if it's possible to avoid this - but it does at least seem to persistently remember the size and position to which it's set.
Click to expand...
Click to collapse
This really is impressive! Thanks for the extremely detailed explanation.
I was able to follow along completely and get the SSH argument "powerd_dbus_suspend" working.
However, I got to thinking. I was wondering if this could be extended to use an alias stored in ~/.bashrc?
After doing some research of my own and using various parameters and arguments, I was unsuccessful.
The goal is to have a linux app (through crouton) be run using xiwi with just a single bookmark by utilizing an alias.
Any thoughts?
UPDATE:
Of course just a few moments later I figured this out! Rather than dealing with an alias stored in ~/.bashrc and ensuring ssh had access, typing the entire alias command as an argument worked. Now I can run Steam directly from a shelf bookmark. All it took was replacing "powerd_dbus_suspend" with "-- sudo enter-chroot xiwi steam" in the argument.
Thanks again!
DandyRandyMarsh said:
This really is impressive! Thanks for the extremely detailed explanation.
I was able to follow along completely and get the SSH argument "powerd_dbus_suspend" working.
Click to expand...
Click to collapse
No problem! I think it's perhaps overly detailed if anything. Might be easier to follow if I cut it down a bit.
DandyRandyMarsh said:
Now I can run Steam directly from a shelf bookmark. All it took was replacing "powerd_dbus_suspend" with "-- sudo enter-chroot xiwi steam" in the argument.
Click to expand...
Click to collapse
Nice!
Adding crouton single app shortcuts is a cool idea which I hadn't considered. Does it work OK for you with sudo in the command, even straight after booting up? ...You didn't have to setup sudoing without a password via sudoers.d or anything?
Inspired by your post I added xiwi to my chroot to try it out. I seem to remember experiencing quite unbearable lag and slowness when running a full desktop via xiwi in the past, but with single apps there doesn't seem to be any noticeable performance hit (this is on an armv7 Asus Flip, with the chroot on a slooow USB drive).
In order to not have to enter my sudo password, in the argument I put:
Code:
-t -- echo mypassword | sudo -S sh /media/removable/3/bin/enter-chroot xiwi firefox
Maybe I'm missing something? Is there a better way, perhaps?
Anyway, since I have rootfs verification switched off, I also tried saving a similar command to a file in /usr/bin, and putting the filename in the argument instead. This works, too, and I suppose could potentially be useful e.g. in the case of needing to run a more convoluted sequence of commands with a shortcut.
Nolirum said:
Adding crouton single app shortcuts is a cool idea which I hadn't considered. Does it work OK for you with sudo in the command, even straight after booting up? ...You didn't have to setup sudoing without a password via sudoers.d or anything?
Click to expand...
Click to collapse
I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell.
Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.
As a side note, this is the crouton installation I am running on an ASUS c302.
sudo sh ~/Downloads/crouton -r trusty -t unity,touch,xiwi,extension
Setup Bookmarks that Run Shell Commands
1. Installed Secure Shell extension
2. Open crosh with Ctrl+Atl+T
3. Enter Command: shell
4. Enter Command: sudo su -
5. Enter Command: sudo /usr/share/vboot/bin/make_dev_ssd.sh --force --remove_rootfs_verification
6. Enter Command: reboot
7. Let Chrome OS reboot
8. Open crosh with Ctrl+Atl+T
9. Enter Command: shell
10. Enter Command: sudo su -
11. Enter Command: mount –o remount rw /
12. Close current crosh window
13. Open a new crosh with Ctrl+Atl+T
14. Enter Command: shell
15. Enter Command: sudo ln -s /usr/share/chromeos-ssh-config/init/openssh-server.conf /etc/init/openssh-server.conf
16. Enter Command: sudo initctl reload-configuration
17. Enter Command: sudo initctl start openssh-server
18. Enter Command: cd ~/.ssh/
19. Enter Command: ssh-keygen
“Enter file in which…” *LEAVE BLANK*
“Enter passphrase” *LEAVE BLANK*
“Enter same passphrase” * LEAVE BLANK*​20. Enter Command: cat /home/chronos/user/.ssh/id_rsa.pub >> /home/chronos/user/.ssh/authorized_keys
21. Enter Command: cp -a /home/chronos/user/.ssh/id_rsa* /home/chronos/user/Downloads
22. Close current crosh terminal and open Secure Shell extension
23. Select [New Connection]
24. Click Import… and select “id_rsa”
25. Click Import… again and select “id_rsa.pub”
26. Enter chronos as the username and localhost as the hostname
27. Enter a shorthand name replacing the text in the top cell “[email protected]”
28. Click Enter. If prompted, enter “yes” to continue connecting
29. Bookmark the page that is open which should end in, "#profile-id:_ _ _ _"
DONE. Now time to add some commands to automate.
Open Secure Shell and select the connection created. In the arguments box, start with two dashes -- and follow it your desired shell command.
Examples:
-- sudo startunity
-- sudo startgnome
-- sudo enter-chroot xiwi steam
-- sudo enter-chroot xiwi wine microWord​
Next Steps... Getting Custom Shelf Icons
Now here I am running into some issues. Rather than have all these icons be the same, I was hoping to customize them.
Followed a strategy found on reddit, Change Shelf Icon for Website, but this only works if the site already had an "apple-touch-icon" set. Also, tried to inject the entire code myself which I couldn't get to work. Unfortunately, I think that since this bookmark is created from a Secure Shell, there are some issues.
I have already tried adding in code for this into the site, but it is having no effect. If someone could make this work then we're really looking good here.
DandyRandyMarsh said:
I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell.
Click to expand...
Click to collapse
Oh, I see what you mean. You are saying that you can sudo in the shell generally, without being prompted for a password, right?
Was that the default setup on your CB (after switching to Dev mode)? Or did you have to configure it manually for passwordless sudoing...
DandyRandyMarsh said:
Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.
Click to expand...
Click to collapse
Nice work summarizing the steps. :highfive: It's probably easier to follow, listed out like that. One slight addendum, perhaps - at step 29, it might be good to clarify the "add to shelf" procedure. Especially because of the following...
DandyRandyMarsh said:
Next Steps... Getting Custom Shelf Icon
Now here I am running into some issues. Rather than have all these icons be the same, I was hoping to customize them.
Click to expand...
Click to collapse
Happily it turns out that, when you add shortcuts to the shelf on Chrome OS like this, a minimal app is created for each one, with its own manifest.json, and icon.pngs. Our shell shortcuts were getting created with blank pngs by default (the black box with P in the center).
So, all we need to do, is get some icons, find the right folder for our shelf shortcut apps, then copy our new icons into them!
For instance, here's how I made a nice shiny icon for my single app shelf shortcut to Firefox.
Prepared icons:
Created a temporary folder in ~/Downloads to store downloaded icons.
Prepared a set of icons in ~/Downloads/firefox. (I downloaded mine from findicons.com).
Six sizes are required - from 32px to 256. To avoid any manifest editing, saved them as *size*.png
e.g. 32.png; 48.png; 64.png; 96.png; 128.png; 256.png
Located folder to copy icons to:
It is easiest to do this directly after clicking "add to shelf"
EITHER:
To change dir into the most recently modified extension icon subfolder automatically, the following one-liner worked for me*.
Code:
shell
cd ~/Extensions/&&cd $(ls -v1td */ | head -1)/*/icons&&ls
A list of blank icons (*.png) should be visible. If so, the new icons can simply be copied over these, e.g..
Code:
sudo cp ~/Downloads/firefox/* .
*YMMV with this particular one-liner - sometimes there's an extra 'temp' folder in ~/Extensions, which stops it working as expected. If you get an error after running the command, simply use the slightly more manual method to locate the folder, as detailed below.
OR:
(slightly more manual method).
Code:
shell
ls -ltr ~/Extensions
Checked the date/times - the most recently added folder is at the bottom. Then,
Code:
cd themostrecentlyaddedfolder
(or, the folder modified at the date/time that the shortcut was "added to shelf"). Then,
Code:
cd */icons
ls
sudo cp ~/Downloads/firefox/* .
I then repeated the above with a new SSH argument and a set of Ubuntu icons, for a custom startxfce4 shortcut, too.
Then just did sudo restart ui, and enjoyed the shiny new shelf icons!
I am hopeful that these changes will get picked up by CrOS's sync, thus getting backed-up and restored automatically. At this point I am not sure if that will be the case, but I don't see why it wouldn't.
Another way?
Another way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools --> Add to shelf...
Clicking the newly-created link (which looks like an "N") will launch /usr/bin/crosh in a tab. Changing the default behavior of /usr/bin/crosh could accomplish your goal to do whatever you want. With some experimenting, you might even be able to pass arguments to make it do different things depending on how it's opened (via ALT-CTRL-T vs from the shelf-- dunno if it can read the url used to call crosh), but at the very least you could do something like have it run whatever you want it to run if a second modifier key is held down (or if it isn't...), otherwise return to normal operation. A menu w/1 sec timeout could do this as well, ie--
Doing [THE THING YOU WANT] in 2 seconds (press SPACE for crosh)... /
Note there's no proof-of-concept here. Just throwing it out as an idea that I'm pretty sure would work... Someone might even create a neat extension that allows crosh to use scripts/plugins to execute different system operations beyond the stock ones that are built-in via single-clicks... If it worked, it might be a little simplier than via the SSH extension and you wouldn't have to run any extra daemons.
ft
This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done:
var terminal = new hterm.Terminal(profileName);
And then you can do stuff with it. You could then create an extension that could handle multiple shelf-icons (say by appending ?COMMAND=ls to the URL to do different shell commands(. The security implications for this would probably be huge obviously.
Update: More on embedding hterm is here.
Nolirum said:
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
I posted up some further details at http://nolirium.blogspot.com/shell-command-shelf-shortcut-chromeos.html
Click to expand...
Click to collapse
Nice post - Some good food for thought, changing up the contents of crosh etc directly is an interesting idea.
fattire said:
Another way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools --> Add to shelf...
Click to expand...
Click to collapse
Interesting! ....Aaaaand, now I've broken crosh. lol. Lucky I had my SSH shortcut setup... (actually, we can still get into the VTs with CtrlAltF2 etc anyway).
Some good potential for experimentation with this, definitely.
fattire said:
This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done:
Click to expand...
Click to collapse
Again, very interesting. Now you come to mention it, an approach such as this does seem like it might be do-able without too much messing around (maybe)...
Any possible method we can get e.g. an extension to 'talk' to the shell is worth looking into I think; as you say, if we can cut out the middleman (ssh) and maybe do it more elegantly, that might be pretty useful indeed.

Script to Hide System Apps from Launcher - Stock English Firmware

Hello,
Even tho I am very upset because my brand new Amazfit Pace has broken GPS (courtesy of GearBest, I am requesting a DOA replacement), here is a (maybe) useful script to hide unused system apps from launcher, either builtin or custom one. Made for 1.3.4f US firmware but may work with other versions (it may not hide all apps tho).
You can do it wirelessly if you enable watch's WiFi and keep screen on (anox' PaceOn app from XDA recommended):
Code:
adb connect WATCH_IP
where WATCH_IP is your actual IP on watch. Then uncompress the file and move it to where you have adb:
Code:
adb push amazfit_hide_apps.sh /sdcard/
or copy it to watch's internal memory (/sdcard), then:
Code:
adb shell sh /sdcard/amazfit_hide_apps.sh
If you want to get the log file:
Code:
adb pull /sdcard/loghide.txt
As a bonus, this Java app can be used to view and control watch via ADB only:
https://github.com/MajeurAndroid/Adb-Remote-Screen
Cheers

Categories

Resources