[TOOL/WinCE]CeSetBacklightLevel.exe - Windows Mobile Apps and Games

Thought I should share a little tool I wrote.
Abstract:
Changes Windows CE's backlight level on the fly, no warm boot required. It's a command line utility without an UI.
Requirements:
CE device with ARM processor.
Usage:
CeSetBacklightLevel.exe <intensity>
Example: CeSetBackLightLevel 100
MortScript example: Run("CeSetBackLightLevel.exe",100)
Download:
Source code and executable are attached to this post.
HTH

nice, could this with a mort script be used to set back-light according to the hour of the day ?

undergroundcugir said:
nice, could this with a mort script be used to set back-light according to the hour of the day ?
Click to expand...
Click to collapse
That exactly was the reason I made this tool.

jwoegerbauer said:
That exactly was the reason I made this tool.
Click to expand...
Click to collapse
can you help me make a loop in mortscript to check the time of the device and compare it to a look-up table that has the intensity of the screen for some periods of time ?

undergroundcugir said:
can you help me make a loop in mortscript to check the time of the device and compare it to a look-up table that has the intensity of the screen for some periods of time ?
Click to expand...
Click to collapse
In Windows CE we can't use Mortscript's RunAt command.
Perhaps somewhat like this:
Code:
If (FileExists("\Windows\CeSetBacklightLevel.exe"))
If(RegKeyExists("HKCU","ControlPanel\Backlight\Brightness")||RegKeyExists("HKCU","ControlPanel\Backlight\Backlightlevel"))
PollInterval = 1000 * 60 * 10 // 10 minutes
StartTime = 630 // 6:30AM
EndTime = 2130 // 9:30PM
WantedBacklightLevel = 100 // Hex: 64
While(1)
CurrentHour = 0
CurrentMinute = 0
CurrentSecond = 0
CurrentDay = 0
CurrentMonth = 0
CurrentYear = 0
GetTime ( CurrentHour, CurrentMinute, CurrentSecond, CurrentDay, CurrentMonth, CurrentYear )
TheTime = CurrentHour * 100 + CurrentMinute
If ((TheTime >= StartTime) && (TheTime <= EndTime))
CurrentBacklightLevel = -1
If( RegKeyExists("HKCU","ControlPanel\Backlight\Brightness"))
CurrentBacklightLevel = 0 + RegRead("HKCU","ControlPanel\Backlight\Brightness)
ElseIf( RegKeyExists("HKCU","ControlPanel\Backlight\Backlightlevel"))
CurrentBacklightLevel = 0 + RegRead("HKCU","ControlPanel\Backlight\Backlightlevel")
EndIf
If(CurrentBacklightLevel >= 0)
If (CurrentBacklightLevel <> WantedBacklightLevel)
Run ("\Windows\CeSetBacklightLevel.exe", WantedBacklightLevel)
EndIf
Else
// error occurred
Exit
EndIf
EndIf
Sleep(PollInterval)
EndWhile
EndIf
EndIf

I haven't had the oportunity to test it on my 2din. Has anyone tested the code ?
Sent from my V1_Viper using xda app-developers app

Hi there,
should this tool work on Becker TA 7827?

Hi, could someone tell me how to compile the C code jwoegerbauer published?. I have Visual Studio 2008 Pro, but do not know how to get an WinCE .exe.
I want to make some changes, because this utility does not work for me. My unit is a GPS Car, WinCE 6.0 NWD_308 Nowada Board, and I have problems with brightness. This:
http://www.seicane.com/bmw-5-series-e60-gps-navigation-with-radio-bluetooth-ipod-srd-8808
Thank you.

Nice, hope will get an .exe
@jwoegerbauer did you implement the loop in miopocket lite ?
Sent from my V1_Viper using XDA Free mobile app

akatarmo said:
Hi, could someone tell me how to compile the C code jwoegerbauer published?. I have Visual Studio 2008 Pro, but do not know how to get an WinCE .exe.
I want to make some changes, because this utility does not work for me. My unit is a GPS Car, WinCE 6.0 NWD_308 Nowada Board, and I have problems with brightness. This:
http://www.seicane.com/bmw-5-series-e60-gps-navigation-with-radio-bluetooth-ipod-srd-8808
Thank you.
Click to expand...
Click to collapse
As compiler I use Pelles C - it's freeware. Supports compiling native C-code for ARM devices.

undergroundcugir said:
Nice, hope will get an .exe
@jwoegerbauer did you implement the loop in miopocket lite ?
Sent from my V1_Viper using XDA Free mobile app
Click to expand...
Click to collapse
1.
You know that you can't compile a MortScript script into an executable? If you really need an executable, then you have to re-write the code sample shown earlier in 'C' or any other suitable programming language a compiler exists for.
2.
Don't use Miopocket Lite, hence not tested so far. BTW: Some time ago I've written MioPocket 4.0 Mini FV and published here:
https://code.google.com/p/miopocket-mini-40-fv/

Hi, jwoegerbauer.
Thanks for the info. I now have installed Pelles C and I can compile simple things. Abusing your kindness, could you tell me what program lines I need to write to generate a beep? I think MessageBeep, but the compiler takes Error
I am a newbie and I want to check your code to see why it does not work exactly in my unit.
Thanks again !!!
--
Antonio

There are a number of functions from the Standard C Runtime libraries missing under Windows CE.
But, MessageBeep API function should be present.
http://msdn.microsoft.com/en-us/library/aa930642.aspx

Thanks again, jwoegerbauer. With your help I made my first program in C (for Windows CE). Instead of the classic "Hello World", I made a Beep. This can be useful to use as debug semaphore. This is the code, for compile with Pelles C in WinCE Pocket PC Mode:
#include <windows.h>
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpszCmdLine, int nCmdShow)
{
MessageBeep(MB_OK);
return 0;
}
I used the MessageBeep in your code.
HANDLE hBL=CreateEvent(NULL,FALSE,FALSE,L"BackLightChangeEvent");
if(hBL)
{
MessageBeep(MB_OK);
SetEvent(hBL);
CloseHandle(hBL);
retVal=1;
}
And really, the program executes the SetEvent (HBL). But does not work on my GPS car WinCE 6 .
---------- Post added at 09:00 PM ---------- Previous post was at 08:47 PM ----------
A question, jwoegerbauer.
I tried downloading your MioPocket Mini 4.0 FV from here: https://miopocketmini40fv.codeplex.com/releases
But the project is empty. Can you tell me where to I can download it (or send me by email), I have interest in trying it.
Thanks.

akatarmo said:
---------- Post added at 09:00 PM ---------- Previous post was at 08:47 PM ----------
A question, jwoegerbauer.
I tried downloading your MioPocket Mini 4.0 FV from here: https://miopocketmini40fv.codeplex.com/releases
But the project is empty. Can you tell me where to I can download it (or send me by email), I have interest in trying it.
Thanks.
Click to expand...
Click to collapse
Correct link: https://miopocketmini40fv.codeplex.com/releases/view/110660
Sorry for your inconvenience.
------------------------------
Please do NOT use current thread to discuss MioPocket Mini 4.0 FV. If necessary, use this thread instead of:
http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=132727
Thanks.

I'm looking for a similar program, but for the MIPS processor, discussed this?

Related

[BUG REPORTING] DizzyDen's IMEIme IMEI Generator

BUG REPORTING:
This program was initially ineteded to generate a unique IMEI based on your device S/N and update Dev's install zip files... it has become so much more, and as such there are many functions involved in this process.
Due to the complexity the program has taken on... far beyond what I initially intended... to report bugs please try to use the following as a template:
Function attempting: i.e. Updating ROM... In Place Upgrade... Update framework saved on computer... etc.
Error Messages: any error message you receive... or the last message you saw prior to the issue.
End result: i.e. TelephonyManager updated, ROM not... TelephonyManager updated framework.jar not... etc....
Environment: ROM in same folder as !IMEIme.exe... ROM on same drive as IMEIme.exe... ROM on different drive... etc. (same for framework if updating framework instead)
!IMEIme.ini settings: you can put your entire ini file if you'd like.
If you could take notes of EXACTLY what buttons you click on which prompt it would be EXTREMELY helpful...
As I said, this program has taken on functions I initially had not imagined including... the more features added, the more complex testing and tracking bugs becomes... I don't want to include a bunch of messages just for the sake of letting you know where in the code you are... would not be beneficial to you... more buttons to click for no reason, etc.
The more detailed you can be, the quicker I can see what is happening... otherwise I have to try to duplicate what I think you are doing when you get the error.
Everyone should click "Thanks" on bug report posts... they have been instrumental in getting the program where it is so far.
RESERVED...
Adverse effects after running
First off, thanks for a wonderful application! Your app did in fact correctly give my Kindle a IDEI number, but it seems to have adverse effects.
Function attempting: Tried both in place Rom and update device and now attempting to use app with sound
Error Messages: Unfortunately DSP Manager has stopped (repeatably on any app)
End result: No sound and music apps crash. Some apps work but many do not. (I can provide logcat if needed)
Environment: Kindle Fire running cm9 using Hashcodes 3.0 Kernal latest (11) update.
!IMEIme.ini settings:
Use_In_Place = 0
Use_Previous_Patch = 0
Use_Serial_Number = 0
Use_MAC_Address = 0
Use_Manual_Input = 1
Encrypt_IMEI = 0
Use_IMEI(15) = 0
Use_ADB = 1
Use_ADB(usb) = 1
Use_ADB(WiFi) = 0
Clean_Up = 1
Include_Patch = 1
Device_Manufacturer = TI
Manufacturer_Device = Blaze
Device_Model = Full Android on Blaze or SDP
Build_Fingerprint = google/passion/passion:2.3.6/GRK39F/189904:user/release-keys
LCD_Density =
WiFi_IP_Address =
IMEI = 00127948612384612
Although I have tried multiple settings and configurations. I am sort of a noob so sorry if this is a silly problem.
Having looked into this... I can tell you there's nothing that the IMEI Generator does that would cause the issues you are seeing. I would recommend flashing a non-IMEI'd ROM for testing... then either do in place IMEI generation or running the IMEI Generator against the same ROM you flash.
For what you are doing... there are 2 files that are being modified, and neither should cause FC issues...
/sysem/build.prop for the manufacture, device, and build fingerprint
/system/framework/framework.jar is being extracted and edited to patch the IMEI in the GetDeviceID() function in android/telephony/TelephonyManager.smali and recompiled.
Clearing cache and dalvik cache may be something to try.
Thanks! Clearing both caches AFTER the install made it work great. I had been clearing all of the memory beforehand but it did not work. My apps now work great!
Motorola Razr GSM (SPDREM_U_01.6.7.2-180_SPU-19-TA-11.6_SIGNEuropeAustraliaEMEA_USASPDRICSRTGB_HWp2b_Service1FF) ICS.
I deodexed framework.jar because application seems to not work on odex files (as stock is), anyway new deodexed framework have not /com/android/internal/telephony/gsm/GSMPhone.smali file?! (or dir!!) infact !IMEIme 2.2.0.2 tell me about this issue (no GSMPhone.smali found). framework patched do not present diffecence between original one. exactly the same. no /android/telephony/TelephonyManager.smali mod applied.
I tryied to patch framework by "update device" + adb usb, with no device connected i choosed my framework.jar in my pc.
[Settings]
Use_In_Place = 1
Use_Previous_Patch = 0
Use_Serial_Number = 1
Use_MAC_Address = 0
Use_Manual_Input = 1
Encrypt_IMEI = 0
New_Type = 1
Use_IMEI(15) = 0
Use_ADB = 1
Use_ADB(usb) = 1
Use_ADB(WiFi) = 0
Clean_Up = 1
Include_Patch = 0
Device_Manufacturer =
Manufacturer_Device =
Device_Model =
Build_Fingerprint =
LCD_Density =
WiFi_IP_Address =
IMEI = 02546451548481584
stock framework.odex, jar and my deodexed framework attached.
Yes... due to another user trying to use the generator on a device with a framework.odex file instead of framework.jar I am looking into the most effective method of handling that situation. As of now... the generator will not work for you to patch imei functionality into the framework on these devices.
i deodexed also framework.jar but no way to patch it, GSMPhone.smali is missing totally even in backsmalied odex too!!!!
I decided to apply the patch manually, but without this file and TelephonyManager.smali not regoular i was thinking about hard mod by motorola?! do you know something about?
Pls man, give me an hand, show me the way, backsmali it you too http://forum.xda-developers.com/attachment.php?attachmentid=1634550&d=1357865096
I'm looking into the method to implement the imei into this.
do you mean into TelephonyManager.smali? I'm looking on it too. Seems so strange this framework...
Actually... looking through to find the best call to implement the patch into... TelephonyManager was the original method... but there may be better places to patch it.
Code:
invoke-direct {p0}, Landroid/telephony/TelephonyManager;->getSubscriberInfo()Lcom/android/internal/telephony/IPhoneSubInfo;
move-result-object v2
invoke-interface {v2}, Lcom/android/internal/telephony/IPhoneSubInfo;->getDeviceId()Ljava/lang/String;
All does make sense now:
http://grepcode.com/file/repository...nternal/telephony/IPhoneSubInfo.java?av=f#174
BUT, where is com.android.internal.telephony.iphonesubinfo!?!?! seems not present... all "internal" dir is missing here, backsmali fault or my fault?!
hiiii
hi,
any news of this? =)
This is the best software for this!
I'm working on the best solution... I understand the desire for this... but I want to ensure the method I choose is the best overall... and to ensure I can properly detect which method to implement during the operation.
If you could zip your entire /system/framework folder and add your /system/build.prop file it would help me test some things I've been putting together for odexed systems.
attaching files
DizzyDen said:
If you could zip your entire /system/framework folder and add your /system/build.prop file it would help me test some things I've been putting together for odexed systems.
Click to expand...
Click to collapse
Hi, Im attaching my files.
You can download here: w w w . 4 s h a r e d . c o m / z i p / j Q n n 9 8 _ B / s y s t e m . h t m l
Thanks for the help
Error ...
Hi Dizzy
I tried to use your update, but have a error ... My device is Motorola Razr XT910 with 4.0.4
after I choose the "framework.jar" he return this error:
Line 3710 (File: ".....\IMEI\!IMEIme.exe");
Error: Variable used without being declared.
After this the program close without any click to exit ..
Im, attaching a print screen
Tnx a lot man
waldirsp11 said:
Hi Dizzy
I tried to use your update, but have a error ... My device is Motorola Razr XT910 with 4.0.4
after I choose the "framework.jar" he return this error:
Line 3710 (File: ".....\IMEI\!IMEIme.exe");
Error: Variable used without being declared.
After this the program close without any click to exit ..
Im, attaching a print screen
Tnx a lot man
Click to expand...
Click to collapse
fixed... I guess nobody has been using the "Use Previous Fix" option for a while. New version uploaded... thank you for the bug report. The screen shots really helped track it down.
another error...
Hi DizzyDen,
I want to add an IMEI to my "SUPERPAD 6", but after the window: "IMEI is..." is displayed, then popup an autoit error window:
Line 3710 (File "..."): Error: Variable used without being declared.
Can you help?
Ponozka said:
Hi DizzyDen,
I want to add an IMEI to my "SUPERPAD 6", but after the window: "IMEI is..." is displayed, then popup an autoit error window:
Line 3710 (File "..."): Error: Variable used without being declared.
Can you help?
Click to expand...
Click to collapse
Before I start looking into this... note that the IMEI generator does not support de-odexing odexed systems yet... I would suggest using it on the ROM then flashing it to the device and let the device odex it again.

[Q] Modem with oFono/oFono-ril?

Hi Guys,
what do you think, is it possible (would be possible) to use oFono/ofono-ril for the modem for our Wave? In theory oFono could be used with any modem that supports standard AT commands...
More info here: http://ofono.org/ and here http://gitorious.org/android-n900/ofono-ril/trees/gingerbread
Sadly Wave's CP doesn't support most of standard AT commands. :[
Rebellos said:
Sadly Wave's CP doesn't support most of standard AT commands. :[
Click to expand...
Click to collapse
heja Rebellos, dzieje się coś ciekawego w tej materii czy raczej możemy zapomnieć o andku na W 2 ?
pozdro z mazowsza
AT+CALC
Code:
Polecenie (tryb AT):
AT+CLAC
Odpowiedź:
AT+CLAC
&C
&D
&E
&F
&S
&V
&W
E
I
L
M
Q
V
X
Z
T
P
\Q
\S
\V
%V
D
A
H
O
S0
S2
S3
S4
S5
S6
S7
S8
S9
S10
S11
S30
S103
S104
+ICF
+IFC
+IPR
+GMI
+GMM
+GMR
+GCAP
+GSN
+DR
+DS
+WS46
+SYNCML
+BATGETLEVEL
+BATUPDATE
+BATGETTABLE
+UPLOADUNSET
+CRLP
+CV120
+CSSN
+CREG
+CGREG
+CFUN
+GCAP
+CSCS
+CSTA
+CR
+CEER
+CRC
+CMEE
+CGDCONT
+CGDSCONT
+CGTFT
+CGEQREQ
+CGEQMIN
+CGQREQ
+CGQMIN
+CGEREP
+CGPADDR
+CGDATA
+CGCLASS
+CGSMS
+CSMS
+CMGF
+CSAS
+CRES
+CSCA
+CSMP
+CSDH
+CSCB
+FDD
+FAR
+FCL
+FIT
+ES
+ESA
+CMOD
+CVHU
+ACSENSOR
+RTCCTEST
+KEYSHORT
+PROXIMIT
+GEOMAGSS
+FIRMVERS
+APPINSTALL
+APPUNINSTALL
+APPLAUNCH
+TKSHELL
+CSQ
+CBC
+CPAS
+CPIN
+CMEC
+CKPD
+CIND
+CMER
+CGATT
+CGACT
+CGCMOD
+CPBS
+CPBR
+CPBF
+CPBW
+CPMS
+CNMI
+CMGL
+CMGR
+CMGS
+CMSS
+CMGW
+CMGD
+CMGC
+CNMA
+CMMS
+FTS
+FRS
+FTH
+FRH
+FTM
+FRM
+CHUP
+CCFC
+CCUG
+COPS
+CLCK
+CPWD
+CPWC
+CUSD
+CAOC
+CACM
+CAMM
+CPUC
+CCWA
+CHLD
+CIMI
+CGMI
+CGMM
+CGMR
+CGSN
+CNUM
+CCLK
+CLVL
+CMUT
+CLCC
+COPN
+CPOL
+CPLS
+CTZR
+CCWE
+CTZU
+CLAC
+CLIP
+COLP
+CSGT
+CRMP
+CDIP
+CTFR
+CLIR
$QCSIMSTAT
$QCCNMI
$QCCLR
$QCDMG
$QCDMR
$QCDNSP
$QCDNSS
$QCTER
$QCSLOT
$QCPINSTAT
$QCPDPP
$QCPDPLT
$QCPWRDN
$QCDGEN
$BREW
$QCSYSMODE
$QCCTM
$SUSBC
$NWMDCHNG
$SHPSLEEP
Is it helpful?
nie dajcie umrzec temu projektowi nie dajcie
That's bad news if the CP doesn't support most of the standard AT commands... So this doesn't help at all?
anghelyi said:
Hi Guys,
what do you think, is it possible (would be possible) to use oFono/ofono-ril for the modem for our Wave? In theory oFono could be used with any modem that supports standard AT commands...
More info here: http://ofono.org/ and here http://gitorious.org/android-n900/ofono-ril/trees/gingerbread
Click to expand...
Click to collapse
What you're saying just doesn't make sense. Why would you wanna use a oFono RIL on a Samsung device?
The RIL is just used to channel (and translate) android java phone/sim/modem related commands to the lower hardware layer on/for the radio processor. Thus the vendor RIL need to apply to the hardware of THAT vendor (i.e.Samsung). Why re-invent the wheel?
Now, there are some exceptions due to the fact that the RIL code is fairly closed source (although GPL'd AFAIK ==> should be released), that there are some project(s) that would like to make a "Free RIL"...
BTW. All GSM modems support the "standard AT set" (or your phone would probably not work!) The tricky part is how to access it from outside the AOS & RIL. But that's another topic.
E:V:A said:
What you're saying just doesn't make sense. Why would you wanna use a oFono RIL on a Samsung device?
Click to expand...
Click to collapse
I don't get your point... oFono is a platform agnostic library for mobile apps, with a lot of supported modems (even with standard AT command support) and oFono RIL is a RIL implementation based on it. Why not to use it?If it works with the N9 why not try to build it for Wave?
E:V:A said:
Now, there are some exceptions due to the fact that the RIL code is fairly closed source (although GPL'd AFAIK ==> should be released), that there are some project(s) that would like to make a "Free RIL"...
BTW. All GSM modems support the "standard AT set" (or your phone would probably not work!) The tricky part is how to access it from outside the AOS & RIL. But that's another topic.
Click to expand...
Click to collapse
RIL isn't GPL, it's Apache License, like most of Android platform, so doesn't have to be released.
Yea, there actually are handlers for AT cmds inside of AMSS, but modem initialization, nor any more advanced usage can't be done with these alone.
Rebellos said:
RIL isn't GPL, it's Apache License, like most of Android platform, so doesn't have to be released.
Yea, there actually are handlers for AT cmds inside of AMSS, but modem initialization, nor any more advanced usage can't be done with these alone.
Click to expand...
Click to collapse
Rebellos, how this works? like.. the modem access is through AT and then call for the other things?
anghelyi said:
I don't get your point... oFono is a platform agnostic library for mobile apps, with a lot of supported modems (even with standard AT command support) and oFono RIL is a RIL implementation based on it. Why not to use it?If it works with the N9 why not try to build it for Wave?
Click to expand...
Click to collapse
Dammit! You're absolutely right. I did the classical error of not "following the f%&ing links" before posting! So I have obviously confused the oFono project with a completely different one... Actually this seem to be a very cool project! We should try to get some of these guys involved over here or vice verse.
anonimo1w said:
Rebellos, how this works? like.. the modem access is through AT and then call for the other things?
Click to expand...
Click to collapse
Try to be a little more specific. On many platforms the phone application processor (UI/UX) does much of its normal communication (phone calls, sms, sim etc) to/from the baseband processor (modem) via an AT interface. However, in many cases this AT interface is "embedded" in other transport layers like IPC, I2C or what have you. In addition, the actual physical control mechanisms (like putting modem to sleep/wake up, power save, RF power, booting, test modes etc.) are usually done through GPIO or other forms of UART. Honestly, it's quite a mess to explain, because there are many variations on how this is handled. (That's why they needed the RIL in the first place.) Finally, since I don't have a Wave, I don't know how that is done. I just know they use a Qualcomm modem... and some of their manuals are available.
In modern SHP based phones hierarchy of transport layers is like:
1) oneDRAM
2) SHP IPC protocol with packet types listed below: (as per Samsung Jet S8000)
Code:
typedef enum
{
FIFO_PKT_NONE = 0, // 0
FIFO_PKT_KEY, // 1
FIFO_PKT_SIM, // 2
FIFO_PKT_PROTO, // 3
FIFO_PKT_TAPI, // 4
FIFO_PKT_PHONESTATUS, // 5
FIFO_PKT_FILE, // 6
FIFO_PKT_LCD, // 7
FIFO_PKT_LED, // 8
FIFO_PKT_SOUND, // 9 Sound means voice here
FIFO_PKT_SOUND_DATA, // 10
FIFO_PKT_H324M, // 11
FIFO_PKT_AMR_DATA, // 12
FIFO_PKT_AMR_CTRL, // 13
FIFO_PKT_CLOCK, // 14
FIFO_PKT_BOOT, // 15
FIFO_PKT_FLIP, // 16
FIFO_PKT_SYSTEM, // 17
FIFO_PKT_USBPROTO, // 18
FIFO_PKT_USBFILE, // 19
FIFO_PKT_USBDIAG, // 20
FIFO_PKT_IRDAPROTO, // 21
FIFO_PKT_IRDAFILE, // 22
FIFO_PKT_IRDADIAG, // 23
FIFO_PKT_TIMER, // 24
FIFO_PKT_DEBUG, // 25
FIFO_PKT_DIAGNOSE, // 26
FIFO_PKT_SPECIAL_BOOT, // 27
FIFO_PKT_CALL_TIME, // 28
FIFO_PKT_ALARM, // 29
FIFO_PKT_FIFO_INTERNAL,// 30
FIFO_PKT_USBCRCPROTO, // 31
FIFO_PKT_USBCRCFILE, // 32
FIFO_PKT_USBCRCDIAG, // 33
FIFO_PKT_VIBRATOR, // 34
FIFO_PKT_AMLED, // 35 AppMgr LED
FIFO_PKT_AMVIB, // 36 AppMgr Vibrator
FIFO_PKT_AMLCD, // 37 AppMgr LCD Backlight
FIFO_PKT_DATA_PCSYNC,
FIFO_PKT_CTRLCMD_PCSYNC,
FIFO_PKT_DATA_WSSSYNC,
FIFO_PKT_TIME, // 41 TimeMgr
FIFO_PKT_DVB_H_CAS_SIM, // 42 DVB-H CAS SIM
FIFO_PKT_DVB_H_CAS_TEST,// 43 DVB-H CAS Test module.
FIFO_PKT_DVB_H_CAS, // 44 DVB-H CAS Common usage.
FIFO_PKT_DVB_H_CAS_IPS, // 45 DVB-H CAS IPS usage.
FIFO_PKT_DVB_H_DebugLevel, //46 receive debug level from MSM
FIFO_PKT_Forced_Assert, // 47
FIFO_PKT_MEMORY, // 48
FIFO_PKT_NV, // 49 // NvMgrLite
FIFO_PKT_LBS, // 50 LBS
FIFO_PKT_SIM_JSR177, // 51 S8000_JSR177_kjseo
FIFO_PKT_USER = 0x80,
FIFO_PKT_DVBH = FIFO_PKT_USER + 0x06,
FIFO_PKT_DVBH_SVC,
FIFO_PKT_DVB_H_LAYER1,
FIFO_PKT_DVB_PLAYER,
FIFO_PKT_AV_PLAYER,
FIFO_PKT_PH, // BB -> MM : Protocol Handler FIFO Type
FIFO_PKT_PH_LITE, // MM -> BB : Protocol Handler Lite FIFO Type
FIFO_PKT_FX = 0x90,
FIFO_PKT_BLUETOOTH ,
FIFO_PKT_TESTMODE, // Testmode
FIFO_PKT_DRV, // driver
FIFO_PKT_AGENT,
FIFO_PKT_DEVMGR,
FIFO_PKT_SECUREBOOT,
FIFO_PKT_MAX
} FifoType;
In Wave there are also few "service" packets added. Not sure for what are these.
Actually while in intialization of modem there are used SECUREBOOT, FM (direct access to Bada file system by CP), IPC_PACKET (not listed here or named differently) BOOT, SIM (managing sim contacts and logging) and some others. Packets that are managing telephony are PROTO and TAPI (telephony API)
TAPI packets does split into few subtypes
TAPI_TYPE_CALL = 0 //53 subtypes
TAPI_TYPE_NETTEXT = 1 //around 10 subtypes
TAPI_TYPE_NETWORK = 2 //23 subtypes
TAPI_TYPE_SS = 3 //48 subtypes
TAPI_TYPE_AT = 4 //34 subtypes
TAPI_TYPE_DMH = 5 //n subtypes, called API_IDs (must be nonzero)
TAPI_TYPE_CONFIG = 6 //n subtypes, called API_IDs (must be nonzero)
Click to expand...
Click to collapse
TAPI layer splits into contexts, which might be called "channels" for managing telephony functions
CALL (3 max)
NETTEXT (SMS/MMS, few allowed)
NETWORK (up to one)
SS (security related AFAIR)
AT (this is probably route of AT commands)
Click to expand...
Click to collapse
modem
i dont know this part but i want to know wave s8500 modem work or not ics 4.0.4?
yasotharan13 said:
i dont know this part but i want to know wave s8500 modem work or not ics 4.0.4?
Click to expand...
Click to collapse
stop annoying everyone!! it's not working yet!!

Work on FOTA starts for AndroBada525......your help required

http://theteamk.x10.mx/index.php?topic=153.0
The Team K Developers have started the work on fota to end the prolonged wait of android on wave 525.developers r requested to please post some codings so that the project can be completed soon.please keep dis thread development focussed and clean.
After a lot of research the forum users have found the brcm2133.elf and wave 525 fota which can be decoded using IDA PRO DISASSEMBLER.
Anyone who can help can come forward and help
Thanks
I HAVE FOUND BCM21331.elf IN SAMSUNG CORBY s3653w FIRMWARE FILE. THERE IS ALSO WEBKIT.elf. DOWNLOAD IT FROM HERE(it is contained in firmware):
Click to expand...
Click to collapse
Please.
Need BCM21331.elf for study...
Where to download?
You can write PM. :angel:
Thanx in advance.
Best Regards
adfree said:
Please.
Need BCM21331.elf for study...
Where to download?
You can write PM. :angel:
Thanx in advance.
Best Regards
Click to expand...
Click to collapse
http://mediafire.com/?uxhiu82ffwcrvue
u can download brcm21331 from the above link.it is present in the SAMSUNG CORBY s3653w FIRMWARE FILE
Thanks
It seems BCM21331.elf of S3653WDXJG2 is apps_compressed.bin... not Bootfiles...
http://forum.xda-developers.com/showthread.php?t=1325713
Code:
ELF_MAP
BCM21331.csi 9 MB
BCM21331.elf 327 MB
BCM21331.map 125 MB
BCM21331.sym 41 KB
WEBKIT.elf 167 MB
Seen from S3850... but no valid Downloadlink...
Best Regards
reply
adfree said:
It seems BCM21331.elf of S3653WDXJG2 is apps_compressed.bin... not Bootfiles...
http://forum.xda-developers.com/showthread.php?t=1325713
Code:
ELF_MAP
BCM21331.csi 9 MB
BCM21331.elf 327 MB
BCM21331.map 125 MB
BCM21331.sym 41 KB
WEBKIT.elf 167 MB
Seen from S3850... but no valid Downloadlink...
Best Regards
Click to expand...
Click to collapse
i didnt understand
did mediafire say that the download link was not valid
anyway i will upload the elf file today( i have downloaded it )
i dont think that the elf file is apps compressed.bin
u can check it out yourself after i upload the file
Thanks
request
i also request the moderators and administrators to make this thread sticky
Thanks
anyway i will upload the elf file today( i have downloaded it )
Click to expand...
Click to collapse
NO. Thank you.
I have this file. :angel:
But this is apps_compressed.bin... NOT Bootloader and it is only 1 file of 3 or 4 files...
Missing, because maybe helpfull...
Code:
BCM21331.csi
BCM21331.map
BCM21331.sym
So it is maybe less helpfull to find correct ""FOTA values"" to make such output + more...
http://forum.xda-developers.com/showthread.php?t=1496729
Best Regards
i am not really well versed with the coding
do u need BCM21331.csi
BCM21331.map
BCM21331.sym files ?
Thanks
anyway here is the brcm21331.elf for all other devs
http://d-h.st/VMs
Thanks
devs please help and contribute to this thread
i am using ida pro to decode the brcm21331.elf but need help on how to use this software
Thanks
Again...
Check this Thread...
http://forum.xda-developers.com/showthread.php?t=1496729
From S8500...
Code:
#include "BL3.h"
unsigned long c_[B]MemMMUCacheEnable[/B][] = { [COLOR="Red"]0xaab9f874,[/COLOR] 0 };
unsigned long c_[B]disp_FOTA_Init[/B][] = { [COLOR="Red"]0xbfab9174[/COLOR], 0 };
unsigned long c_[B]disp_FOTA_Printf[/B][] = { [COLOR="Red"]0xb69c410b[/COLOR], 0 };
unsigned long c_[B]OemSysGetSystemInfo[/B][] = { [COLOR="Red"]0xc3ac31a5[/COLOR], 0 };
unsigned long *fun_crc[i_endMarker] = {c_MemMMUCacheEnable,
c_disp_FOTA_Init,
c_disp_FOTA_Printf,
c_OemSysGetSystemInfo
};
This is what you need to find... MINIMUM.
This what we can find in BL3_univ.elf + BL3_univ.map
These files are from BOOTLOADER...
BCM21331.elf is ELF file of apps_compressed.bin...
You can NOT find this text in BCM21331.elf
Code:
MemMMUCacheEnable
disp_FOTA_Init
disp_FOTA_Printf
OemSysGetSystemInfo
So I am pretty sure... 51 % that BCM21331.elf is WRONG file to find correct values...
Anyway. With study of BCM21331.elf maybe someone can better understand how SHP/MOCHA Security etc. work...
Good luck.
Best Regards
adfree said:
Again...
Check this Thread...
http://forum.xda-developers.com/showthread.php?t=1496729
From S8500...
Code:
#include "BL3.h"
unsigned long c_[B]MemMMUCacheEnable[/B][] = { [COLOR="Red"]0xaab9f874,[/COLOR] 0 };
unsigned long c_[B]disp_FOTA_Init[/B][] = { [COLOR="Red"]0xbfab9174[/COLOR], 0 };
unsigned long c_[B]disp_FOTA_Printf[/B][] = { [COLOR="Red"]0xb69c410b[/COLOR], 0 };
unsigned long c_[B]OemSysGetSystemInfo[/B][] = { [COLOR="Red"]0xc3ac31a5[/COLOR], 0 };
unsigned long *fun_crc[i_endMarker] = {c_MemMMUCacheEnable,
c_disp_FOTA_Init,
c_disp_FOTA_Printf,
c_OemSysGetSystemInfo
};
This is what you need to find... MINIMUM.
This what we can find in BL3_univ.elf + BL3_univ.map
These files are from BOOTLOADER...
BCM21331.elf is ELF file of apps_compressed.bin...
You can NOT find this text in BCM21331.elf
Code:
MemMMUCacheEnable
disp_FOTA_Init
disp_FOTA_Printf
OemSysGetSystemInfo
So I am pretty sure... 51 % that BCM21331.elf is WRONG file to find correct values...
Anyway. With study of BCM21331.elf maybe someone can better understand how SHP/MOCHA Security etc. work...
Good luck.
Best Regards
Click to expand...
Click to collapse
Thanks for the clarification.
In the FOTA editing,are you guys using asm coding language ?
What minimum do i need to find?
Thanks
This whole thread and idea is wrong at this moment. FOTA exploit has been confirmed to work only for bootloaders of S8500 and S8530. There is no clue if there's such security flaw present in 525 - ergo, you should start with looking for security hole, and then writing exploit to utilise it instead of writing exploit without even knowing if there's anything to exploit literally.
FOTA exploit has been confirmed to work only for bootloaders of S8500 and S8530. There is no clue if there's such security flaw present in 525 - ergo, you should start with looking for security hole...
Click to expand...
Click to collapse
We all know it was looooooong way between first text output and later magic things with FOTA for S8500 and S8530... like zImage start for Android and so on...
http://forum.xda-developers.com/showthread.php?t=1020444
Short look into GT-S5250_Training_Manual_SW.ppt
1.
FOTA file used...
Code:
bplib_S5250OpenEuropeSlav.fota
Chance "high" to generate text ouput. :angel:
1.1
Broadcom Mobile Trace Terminal
Click to expand...
Click to collapse
Not found yet... maybe same like WinComm...
2.
Btw...
_uart_bootloader
Code:
boot1a.img
boot1b.img
boot2.img
onenandboot_4k.img
What is this? Found in
Code:
S5250XEJI4.rar
S5250XEJI6.rar
I have NO Broadcom devices for tests... also NOT in future...
Find your own solution, with your own way...
Best Regards
P.S.:
If way found for zImage start... you need your own/new Broadcom team...
Sorry.
Thank you everyone for any input you are giving
Rebellos thank u very much that fact was an eye opner
I will be really grateful to u guys if you can tell me on how u guys came to know the security loophole.Any kind of help is greatly acknowleged.Again I would like to thank adsfree and rebellos for their contributions to this thread and the facts
I've made a 20 minutes exercise - I downloaded bootfiles from S5250 (S5250XXJK2) and disassembled boot2.img using a guess that the bootloader is loaded at 83E00000. Easily found FOTA code similar to S8500. The binary is loaded from flash address 07E00000 to RAM 85200000 and executed there if the BPDZ marker is available (apps and fota file is checked as well), just as in S8500. The difference is switch arm32 and thumb mode.
In the attachment I've provide a sample fota file along with asm sources. That's all I can help. There's so much more things to be handled since this moment, but it's your job if you are to be capable of continuing any porting project. Please be aware that this is a hopeless task and you do it for fun and exploring. A finished port is not likely to be ever achieved unless you have a device with exactly same board (not only microcontroller, but display, radio, camera, wifi, sensors, etc) as another android device.
canu guys tell me how u decoded boot2.img
i mean using which software and how did u get the code
please help
Thanks
Maybe you could try what mijoma attached...
S5250_src.zip
Especially this file:
S5250_fota_base.fota
Feedback help if it work or not...
Best Regards
u did not understand what i said
i asked how u decoded boot2.img and using which software and how did you get the code
u did not understand what i said
Click to expand...
Click to collapse
Few answers are given...
Now mijoma offered FIRST solution for testing...
S5250_fota_base.fota
Now waiting for someones test feedback...
mijoma has NO broadcom device for testing...
Me too...
So you or other S5250 users...
I have also asked in German Thread...
http://www.handy-faq.de/forum/samsu...sion_download_freigegeben-11.html#post2541317
I can also not seen here in your Thread test result...
http://androbada525.hj.cx/index.php/topic,153.15.html
Best Regards

[LineageOS][OTA][PHP] Open Source REST Server for you

Hi guys,
today I would like to present to you a simple project that was born on this thread to accomplish a very simple task: since there are thousand of Custom ROMs around here, so much of them are LineageOS based, and because of this their forced to build every time all the ROM and post updates here. Users are also forced to check if their preferred ROM was updated or not. That's why I decided to understand how LineageOS OTA Updater System App works. Because of this I've wrote a simple REST Server API emulation that fully works with your ROM (if integrated of course). How? Continue reading down here.
How does it work?
Of course is as simple as it should be. Clone the repo (is a simple PHP website that you can host on any shared hosting*/VPS that you like) and upload it into your preferred hosting. That's it. If you point your web browser to that address the App is already working.
After, you have to upload all your build to the _builds/ folder, and you're done.
The two already working calls /api and /api/v1/build/get_delta should answer correctly the updater app to make it work (remember that visiting it as a browser is not sufficent).
How to integrate it with my ROM?
You have two options:
- Declare cm.updater.uri on your own build.prop file with the value of you own server URL where you have deployed it (This can be done also by the user with any Android App from the Market)
- Replace the string conf_update_server_url_def value inside values.xml of the OTA App source code (COMPILE TIME ONLY!)
Which builds does it support?
Anything that will be borned by the official guide on how to build your custom LineageOS ROM! So, in poor words will be: stable, rcs, nightly and snapshots (likely called EXPERIMENTAL), from CM7 to CM14.
Delta updates SHOULD work too. Just try it and tell me if they works
How can I debug it?
You can use this simple UnitTest that I've already pushed into my GitHub. Feel free to use it everytime you need. It's based upon NodeJS and Unirest.
Is it free?
"Free software is a matter of liberty, not price. To understand the concept, you should think of free as in free speech, not as in free beer."
—Richard Stallman
Click to expand...
Click to collapse
Use it as you want, do anything you want with it as it's MIT licensed.
Is it free of bugs?
That's why I'm here Only you can help me to squash all the remaining bugs!
I hope this will be useful to anyone of you, helping the ROM community providing a simple OTA updater that already works on LineageOS official ROMs.
Greets.
---
Project Home: https://github.com/julianxhokaxhiu/LineageOTA
More about the study: http://blog.julianxhokaxhiu.com/how-the-cm-ota-server-works-and-how-to-implement-and-use-ours
Changelog Build Scripts ( thanks to @Deltadroid ): https://github.com/syphyr/cm_build_scripts/blob/master/make_changelog
* On a Shared Hosting you can ONLY provide a FULL ROM download, NOT DELTAs!
---
Donators:
- @BlueFlame4 x2
Hey, I'm having trouble using your docker image behind a Nginx https reverse proxy. The server is correctly answering the requests:
Code:
{
"id":null,
"response":[
{
"incremental":"",
"api_level":"",
"url":"http:\/\/MYDOMAIN\/\/builds\/full\/lineage-17.1-20200830-UNOFFICIAL-lavender.zip",
"timestamp":1598774045,
"md5sum":"718fb89f935b979edd57b2642234d1fa",
"changes":"",
"channel":"unofficial",
"filename":"lineage-17.1-20200830-UNOFFICIAL-lavender.zip",
"romtype":"unofficial",
"datetime":1598774045,
"version":"17.1",
"id":"50533a894b2ab0d9b2711444ca4f2b530a8ff2389723ea2bd7ada6e029599e2c",
"size":914450521
}
],
"error":null
}
But the returned `url` is http-only and the updater can't download it (throws error). WhenI try to curl it without `-L` I only get `301 Moved Permanently`. Only when I append `-L` I get the correct binary response over https. I'm pretty sure this is a redirecting issue.
Here's my Nginx config:
Code:
server{
server_name MYDOMAIN;
server_tokens off;
listen 80;
listen [::]:80 ipv6only=on;
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
return 301 https://$host$request_uri;
}
server {
server_name MYDOMAIN;
server_tokens off;
listen 443 ssl http2;
listen [::]:443 ssl http2 ipv6only=on;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:24087;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload";
add_header Referrer-Policy same-origin;
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options DENY;
add_header X-Xss-Protection "1; mode=block";
[...]
Any idea what I'm doing wrong?
Basically I want to know how to force the `url` response in the JSON to be `https` instead of `http`. (At least that's what I think is the reason for the updater not being able to download the image.)
Code:
08-30 16:00:19.407 7025 7025 D UpdaterController: Starting 50533a894b2ab0d9b2711444ca4f2b530a8ff2389723ea2bd7ada6e029599e2c
08-30 16:00:19.409 7025 7921 E HttpURLConnectionClient: Error downloading file
08-30 16:00:19.409 7025 7921 E HttpURLConnectionClient: java.io.IOException: Cleartext HTTP traffic to MYDOMAIN not permitted
08-30 16:00:19.409 7025 7921 E HttpURLConnectionClient: at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:124)
08-30 16:00:19.409 7025 7921 E HttpURLConnectionClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:462)
08-30 16:00:19.409 7025 7921 E HttpURLConnectionClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
08-30 16:00:19.409 7025 7921 E HttpURLConnectionClient: at org.lineageos.updater.download.HttpURLConnectionClient$DownloadThread.run(HttpURLConnectionClient.java:250)
08-30 16:00:19.409 7025 7921 E UpdaterController: Download failed
EDIT: Solved!
Code:
location / {
proxy_pass http://127.0.0.1:24087;
proxy_http_version 1.1;
proxy_cache_bypass $http_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-NginX-Proxy true;
}
Not sure if this project is still supported, but with build.prop change, it just checks for updates forever on phone. When I try debugging with the UnitTest script, I get "Not Found The requested URL /CyanogenModOTA/api was not found on this server." (definitely server-related) I've gotten this working before on another VPS, so I'm wondering why it's not on my build server.
Are there any specific packages I need to install to get this working?
Here is my php config: http://hongbuild.ddns.net:81/test.php
klvnhng said:
Not sure if this project is still supported, but with build.prop change, it just checks for updates forever on phone. When I try debugging with the UnitTest script, I get "Not Found The requested URL /CyanogenModOTA/api was not found on this server." (definitely server-related) I've gotten this working before on another VPS, so I'm wondering why it's not on my build server.
Are there any specific packages I need to install to get this working?
Here is my php config: http://hongbuild.ddns.net:81/test.php
Click to expand...
Click to collapse
Since build.prop is in the system.new.dat file in lollipop builds, I just started copying it over from my build server and modified the Build.php file to look for the file instead of inside the zip. I just got this working on my web server. Only issue I'm having is related to change logs but I'm going to try and figure that one out later.
Here are the changes I did to get this working with CyanogenMod 12 (all changes will be assumed from the CyanogenModOTA directory):
- mkdir -p builds/buildprop <-- this is where you copy your build.prop from each build (they go in a folder with the same name as the build zip e.x. cm-12-20150103-NIGHTLY)
- mkdir -p builds/changelog <-- this will have your change logs (name them the same as the build zip except with a .txt extension)
- update setConfig( 'basePath', 'CyanogenModOTA' ) to setConfig( 'basePath', 'http://wfhome.net/CyanogenModOTA' ) in index.php (that is my server)
- change the Build constructor function to this (I updated the preg_match_all line, added the buildPropFolder variable, updated the $this->buildProp line, and changed the changeLogUrl line):
Code:
private $buildPropFolder = '';
public function __construct($fileName, $physicalPath) {
/*
$tokens Schema:
array(
1 => [CM VERSION] (ex. 10.1.x, 10.2, 11, etc.)
2 => [DATE OF BUILD] (ex. 20140130)
3 => [CHANNEL OF THE BUILD] (ex. RC, RC2, NIGHTLY, etc.)
4 => [MODEL] (ex. i9100, i9300, etc.)
)
*/
preg_match_all( '/cm-([0-9\.]+-)(\d+-)?([a-zA-Z0-9]+-)?([a-zA-Z0-9]+).zip/', $fileName, $tokens );
$tokens = $this->removeTrailingDashes( $tokens );
$this->filePath = $physicalPath . '/' . $fileName;
$this->buildPropFolder = str_replace('/full', '/buildprop', $physicalPath) . '/' . preg_replace('/\\.[^.\\s]{3,4}$/', '', $fileName);
$this->buildProp = explode( "\n", file_get_contents($this->buildPropFolder . '/build.prop') );
$this->channel = $this->_getChannel( str_replace( range( 0 , 9 ), '', $tokens[3] ) );
$this->filename = $fileName;
$this->url = $this->_getUrl( '', Flight::cfg()->get('buildsPath') );
$this->changelogUrl = str_replace('/full', '/changelog', $this->_getChangelogUrl());
$this->timestamp = filemtime( $this->filePath );
$this->incremental = $this->getBuildPropValue( 'ro.build.version.incremental' );
$this->apiLevel = $this->getBuildPropValue( 'ro.build.version.sdk' );
$this->model = $this->getBuildPropValue( 'ro.cm.device' );
}
Also he has memcached setup in there, so you might make sure you have memcache installed and set to run on startup on your server. You also need xdelta3 to create delta builds although, I don't think it is working ( I compiled the latest version of xdelta3 and it doesn't appear to do anything as there are not any files being created in the delta folder).
Hope that helps.
Thanks for the help (I'll definitely need it when I actually want to start USING the server), but it seems you've misunderstood me. Right now, I can't even get the rest server running properly-that's why I'm getting a 404 error.
Notice you get an output when you go to http://wfhome.net/CyanogenModOTA/api, I don't get anything!
klvnhng said:
Thanks for the help (I'll definitely need it when I actually want to start USING the server), but it seems you've misunderstood me. Right now, I can't even get the rest server running properly-that's why I'm getting a 404 error.
Notice you get an output when you go to http://wfhome.net/CyanogenModOTA/api, I don't get anything!
Click to expand...
Click to collapse
Ah sorry. First thing I see is that you need mod_rewrite installed in apache.
Code:
sudo a2enmod rewrite
sudo service apache2 restart
Need help with development
First I would like to thank you for using this product and playing with it (which involves patching, testing, etc.).
Since the first post I've made here in XDA the project evolved a little since I rewrote entirely the project to make it composer friendly. Rather than that, the Delta build process is actually non working (I tried to create a ZIP but I don't have enough knowledge in ROM development to tell if it's enough or not) so it's just a WIP layer that should be addressed and fixed (I've already found a Python project which does this already but I'm of the idea that this should be somehow not be a bloated software that needs to install binaries here and there to make it working).
So, actually I'm not really working in this project but It's in my TODO list, meanwhile I'll be very happy to have pull requests with useful patches to make this KK, LL and more compatible So feel free to contribute and thanks again for using it!
JulianXhokaxhiu said:
First I would like to thank you for using this product and playing with it (which involves patching, testing, etc.).
Since the first post I've made here in XDA the project evolved a little since I rewrote entirely the project to make it composer friendly. Rather than that, the Delta build process is actually non working (I tried to create a ZIP but I don't have enough knowledge in ROM development to tell if it's enough or not) so it's just a WIP layer that should be addressed and fixed (I've already found a Python project which does this already but I'm of the idea that this should be somehow not be a bloated software that needs to install binaries here and there to make it working).
So, actually I'm not really working in this project but It's in my TODO list, meanwhile I'll be very happy to have pull requests with useful patches to make this KK, LL and more compatible So feel free to contribute and thanks again for using it!
Click to expand...
Click to collapse
Thank YOU for making it! Really appreciate the time and effort you've put into this project.
rjwil1086 said:
Ah sorry. First thing I see is that you need mod_rewrite installed in apache.
Code:
sudo a2enmod rewrite
sudo service apache2 restart
Click to expand...
Click to collapse
That did it, thanks :good:
I've also implemented your changes, but when I check for updates on my phone, I still get "No new updates found". I've copied my new build over to builds/full, and the build.prop to builds/buildprop/cm*
rjwil1086 thank you very much for your help and suggestions, I made my own server http://paksman.ddns.net/cyanogenmodota, edited build.prop for cm updater to look for server url, made all the changes as you but I always get "No new updates found". Not sure if there is a problem with my server or with this project in general. Have you made any success to make this work?
I have it working. I'll upload mine to github tonight
Think I solved my own problem. My builds were all tagged as 'UNOFFICIAL'. When I changed this to 'NIGHTLY' (for the build and build.prop folder respectively ) they finally started to be recognised by cm updater app. JulianXhokaxhiu and rjwil1086, thank you so much for your effort,your work is being much appreciated.
Packsman said:
Think I solved my own problem. My builds were all tagged as 'UNOFFICIAL'. When I changed this to 'NIGHTLY' (for the build and build.prop folder respectively ) they finally started to be recognised by cm updater app. JulianXhokaxhiu and rjwil1086, thank you so much for your effort,your work is being much appreciated.
Click to expand...
Click to collapse
Yup. Sorry. I knew that but forgot to mention it. That's an issue with the CMUpdater app more than it is with the REST implementation. It doesn't look for unofficial files
Packsman said:
Think I solved my own problem. My builds were all tagged as 'UNOFFICIAL'. When I changed this to 'NIGHTLY' (for the build and build.prop folder respectively ) they finally started to be recognised by cm updater app. JulianXhokaxhiu and rjwil1086, thank you so much for your effort,your work is being much appreciated.
Click to expand...
Click to collapse
Awesome! This fixed it for me as well. Thanks to everyone for the help
[CyanogenMod][OTA][PHP] Open Source REST Server for you
Hi, I have been tested server code with a free host (000webhost) then accessed the web, I received messages:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/a5885282/public_html/index.php on line 27
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/a5885282/public_html/index.php on line 27
The line 27 of index.php is "use \JX\CmOta\CmOta;". But I don't know about PHP. Please help me solve this issue.
@rjwil1086 , @klvnhng , @Packsman please help me to solve following error:
$ node index.js
<h1>500 Internal Server Error</h1><h3>Undefined offset: 0 (8)</h3><pre>#0 /var/www/CyanogenModOTA/src/Helpers/Build.php(214): flight\Engine->handleError(8, 'Undefined offse...', '/var/www/Cyanog...', 214, Array)
#1 /var/www/CyanogenModOTA/src/Helpers/Build.php(63): JX\CmOta\Helpers\Build->removeTrailingDashes(Array)
#2 /var/www/CyanogenModOTA/src/Helpers/Builds.php(115): JX\CmOta\Helpers\Build->__construct('cm-11-20140103-...', '/var/www/Cyanog...')
#3 /var/www/CyanogenModOTA/src/Helpers/Builds.php(49): JX\CmOta\Helpers\Builds->getBuilds()
#4 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Loader.php(123): JX\CmOta\Helpers\Builds->__construct()
#5 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Loader.php(80): flight\core\Loader->newInstance('\JX\CmOta\Helpe...', Array)
#6 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/Engine.php(69): flight\core\Loader->load('builds', true)
#7 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('builds', Array)
#8 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->builds()
#9 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/Flight.php(43): flight\core\Dispatcher::invokeMethod(Array, Array)
#10 /var/www/CyanogenModOTA/src/CmOta.php(97): Flight::__callStatic('builds', Array)
#11 /var/www/CyanogenModOTA/src/CmOta.php(97): Flight::builds()
#12 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(160): JX\CmOta\{closure}()
#13 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction(Object(Closure), Array)
#14 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/Engine.php(310): flight\core\Dispatcher::execute(Object(Closure), Array)
#15 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->_start()
#16 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array)
#17 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array)
#18 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array)
#19 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array)
#20 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/core/Dispatcher.php(191): flight\Engine->start()
#21 /var/www/CyanogenModOTA/vendor/mikecao/flight/flight/Flight.php(43): flight\core\Dispatcher::invokeMethod(Array, Array)
#22 /var/www/CyanogenModOTA/src/CmOta.php(80): Flight::__callStatic('start', Array)
#23 /var/www/CyanogenModOTA/src/CmOta.php(80): Flight::start()
#24 /var/www/CyanogenModOTA/index.php(35): JX\CmOta\CmOta->run()
#25 {main}</pre>
Thank you so much.
Thanks all, I fixed.
[CyanogenMod][OTA][PHP] Open Source REST Server for you
I have just creat susscess a server. Thanks.
But, now I want creat a update OTA app for other AOSP ( andoird L) and using that server which I have just creat.
Can I using CMupdater for it? Can you give me some suggest?
Hi, need help to understand!
First of all, i want to say Thank You! For this great job!
I installed server, activated mod rewrite in apache2, apt-get install memcached, made chown for all files to www-data in CyanogenModOTA directory
created directories builds/buildprop, builds/changelog
created file romname.txt in changelog
copied file rom archive to build/full directory
and when i open in browser my ota site: http ota.mydomain.com i see the dir listing as described above
when i try to open url http ota.mydomain.com/api - i see the 404 error.
what exactly i have to do as the next step?
is any json file missed in web root directory (in same place as index.php) ?
and I leave index.php almost unchanged (as in the repository) - just changed string: ->setConfig( 'basePath', '/' )
Thank You once again!
vvzar said:
First of all, i want to say Thank You! For this great job!
I installed server, activated mod rewrite in apache2, apt-get install memcached, made chown for all files to www-data in CyanogenModOTA directory
created directories builds/buildprop, builds/changelog
created file romname.txt in changelog
copied file rom archive to build/full directory
and when i open in browser my ota site: http ota.mydomain.com i see the dir listing as described above
when i try to open url http ota.mydomain.com/api - i see the 404 error.
what exactly i have to do as the next step?
is any json file missed in web root directory (in same place as index.php) ?
and I leave index.php almost unchanged (as in the repository) - just changed string: ->setConfig( 'basePath', '/' )
Thank You once again!
Click to expand...
Click to collapse
Are you sure that modrewrite is working? Can you share a working URL?
lingak said:
I have just creat susscess a server. Thanks.
But, now I want creat a update OTA app for other AOSP ( andoird L) and using that server which I have just creat.
Can I using CMupdater for it? Can you give me some suggest?
Click to expand...
Click to collapse
Honestly I don't know, we have to check if OTA app is the same in Lollipop and works of course the same. If so, we're already safe and yes it can work out of the box. If not, we have to fix it. If you already have a working example, feel free to do a pull request
JulianXhokaxhiu said:
Are you sure that modrewrite is working? Can you share a working URL?
[email protected]:/home/user# a2enmod rewrite
Module rewrite already enabled
[email protected]:/home/user#
.htaccess:
[email protected]:/home/user# cat /var/www/html/CyanogenModOTA/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
[email protected]:/home/user#
Is any other rules i have to check?
What about statement <Directory /var/www/html/CyanogenModOTA> ?
Is enouph AllowOverride All and Allow from all ?
test url : http ota.smylink.org
Click to expand...
Click to collapse
vvzar said:
JulianXhokaxhiu said:
Are you sure that modrewrite is working? Can you share a working URL?
[email protected]:/home/user# a2enmod rewrite
Module rewrite already enabled
[email protected]:/home/user#
.htaccess:
[email protected]:/home/user# cat /var/www/html/CyanogenModOTA/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
[email protected]:/home/user#
Is any other rules i have to check?
What about statement <Directory /var/www/html/CyanogenModOTA> ?
Is enouph AllowOverride All and Allow from all ?
test url : http ota.smylink.org
Click to expand...
Click to collapse
Technically it should be enough but the order of where you placed it is important too.
Anyway, going to your URL is just making me think that the PHP code is running well (the redirect to builds folder is triggered by CMOTA Rest Code). You're just missing the htaccess rules.
I'm quite sure you just have to figure out your own server setup to understand if mod_rewrite is properly working (allowing htaccess files to be read and parsed).
Click to expand...
Click to collapse

[Q&A] [DEV] AndroidLib - .NET Android Device Communication and Management Library 01

[Q&A] [DEV] AndroidLib - .NET Android Device Communication and Management Library 01
Q&A for [DEV] AndroidLib - .NET Android Device Communication and Management Library 01.20.13
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [DEV] AndroidLib - .NET Android Device Communication and Management Library 01.20.13. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
where's the link to download
I and finding only code everywhere but where's the link to download the latest androidLib in which RegawMOD.Android is included
How to send sms
how to send
download link for androidlib.dll
hi,
could anyone show the link to download androidlib.dll? many thanks!!!
regards
Lim
---------- Post added at 05:02 PM ---------- Previous post was at 04:45 PM ----------
Hi
does anyone has the download link for androidlib? thanks!!
LESLIE
Best way to communicate between c# and android app
I would like to communicate data between c# and my java app. 2 variables nothing fancy, I think of an idea to use Preferences file and read it via adb using androidlib. My phone is rooted, but i want to it work without root. I know sharedprefs file permissions are only for the app itself. Any ideas?
I wanna make a function "Flashall"
I try make a "flashall function"..
use a "ExecuteFastbootCommand("flashall", "-w");
but, result message "error: neither -p product specified nor ANDROID_PRODUCT_OUT set"
How to excute command (set ANDROID_PRODUCT_OUT=~) & "fastboot flashall -w "?
Question for AndroidLib Developer
First of all, I am using your Android library and I think it is a great tool. My application that I am using it for is a wrapper class to manage testing of some android based handsets. I require the ability to query the phones IMEI. Is there any method you have in your library that I can easily use for this requirment?
Thanks in advance!!
device.pushfile need help with parameters, thanks
hi, this is my code load the phone and after want a sent a file contactos.sqlite, I need help with parameters because I cant send, thanks for help me.
*************************************
Public Sub phone()
Dim serial As String
'Always call UpdateDeviceList() before using AndroidController on devices to get the most updated list
android.UpdateDeviceList()
If (android.HasConnectedDevices) Then
serial = android.ConnectedDevices(0)
device = android.GetConnectedDevice(serial)
txtphone.Text = serial
Else
MsgBox("Error - No Devices Connected", MsgBoxStyle.Exclamation)
End If
End Sub
*****************************************
Private Sub btncopy_Click(sender As Object, e As EventArgs) Handles btncopy.Click
Dim filepath As String = "C:\Visual Studio 2013\Projects\prueba\prueba\bin\Debug\contactos1.sqlite"
Dim destinationfilepath As String = "\data\data\yo\databases\contactos1.sqlite"
device.PushFile(filepath, destinationfilepath)
End Sub
*********************************************
help
hello
Documentation link notwork for me
please other link for Documentation
i need all commands help file for vb.net androidlib
Where to download the compiled DLL?
Looks like the website is down... I downloaded the source from github but I'd prefer to save some time and use the compiled binary.
Is there a working download link?
I was looking for documentation, but the site is offline. What I want know for is like copying a database from my PC to my Android phone and the other way round via USB, so if anyone has documentation to guide me.
Thank You
Postscript: Sorry, my english is poor and i work with vb.net 2013
usman14903usa said:
I and finding only code everywhere but where's the link to download the latest androidLib in which RegawMOD.Android is included
Click to expand...
Click to collapse
The idea is that you fork, clone and compile the library yourself. This isn't an application, it is a wrapper library containing code to make writing applications for use with Android devices easier.
leslielin71 said:
hi,
could anyone show the link to download androidlib.dll? many thanks!!!
regards
Lim
---------- Post added at 05:02 PM ---------- Previous post was at 04:45 PM ----------
Hi
does anyone has the download link for androidlib? thanks!!
LESLIE
Click to expand...
Click to collapse
It's all here: http://forum.xda-developers.com/showthread.php?t=1512685
The idea is that you fork, clone and compile the library yourself.
Flopik2 said:
I would like to communicate data between c# and my java app. 2 variables nothing fancy, I think of an idea to use Preferences file and read it via adb using androidlib. My phone is rooted, but i want to it work without root. I know sharedprefs file permissions are only for the app itself. Any ideas?
Click to expand...
Click to collapse
Have you thought of writing a service for the device that checks for changes in a folder in the shared mass storage, and then handles accordingly?
That might be something to think about before considering going places you shouldn't be with a host computer.
hwiri said:
I try make a "flashall function"..
use a "ExecuteFastbootCommand("flashall", "-w");
but, result message "error: neither -p product specified nor ANDROID_PRODUCT_OUT set"
How to excute command (set ANDROID_PRODUCT_OUT=~) & "fastboot flashall -w "?
Click to expand...
Click to collapse
Code:
Fastboot.ExecuteFastbootCommand(Fastboot.FormFastbootCommand("flashall", "-w"));
cjdelgross said:
First of all, I am using your Android library and I think it is a great tool. My application that I am using it for is a wrapper class to manage testing of some android based handsets. I require the ability to query the phones IMEI. Is there any method you have in your library that I can easily use for this requirment?
Thanks in advance!!
Click to expand...
Click to collapse
No, there is no property or method to get the IMEI, but that's a good idea, and seeming as I'm doing some work on AndroidLib for a project of mine (of course the changes will be uploaded to GitHub), I'll add that, too.
The ADB command is: adb shell dumpsys iphonesubinfo
GonzaloCimma said:
hi, this is my code load the phone and after want a sent a file contactos.sqlite, I need help with parameters because I cant send, thanks for help me.
*************************************
Public Sub phone()
Dim serial As String
'Always call UpdateDeviceList() before using AndroidController on devices to get the most updated list
android.UpdateDeviceList()
If (android.HasConnectedDevices) Then
serial = android.ConnectedDevices(0)
device = android.GetConnectedDevice(serial)
txtphone.Text = serial
Else
MsgBox("Error - No Devices Connected", MsgBoxStyle.Exclamation)
End If
End Sub
*****************************************
Private Sub btncopy_Click(sender As Object, e As EventArgs) Handles btncopy.Click
Dim filepath As String = "C:\Visual Studio 2013\Projects\prueba\prueba\bin\Debug\contactos1.sqlite"
Dim destinationfilepath As String = "\data\data\yo\databases\contactos1.sqlite"
device.PushFile(filepath, destinationfilepath)
End Sub
*********************************************
Click to expand...
Click to collapse
Even if I were to help with your specific problem, you have hardcoded the paths. That's a bad practice. Maybe you should gather some more basic knowledge about programming.
astarali said:
hello
Documentation link notwork for me
please other link for Documentation
i need all commands help file for vb.net androidlib
Click to expand...
Click to collapse
That's what IntelliSense is for - It's built in to the IDE. Also, you can check the code files. They're all there.
cfsmp3 said:
Looks like the website is down... I downloaded the source from github but I'd prefer to save some time and use the compiled binary.
Is there a working download link?
Click to expand...
Click to collapse
There hasn't been a compiled binary for quite some time. The idea is you fork, clone, and compile the lib yourself so that you always have the latest updates and changes.
Ferel94 said:
I was looking for documentation, but the site is offline. What I want know for is like copying a database from my PC to my Android phone and the other way round via USB, so if anyone has documentation to guide me.
Thank You
Postscript: Sorry, my english is poor and i work with vb.net 2013
Click to expand...
Click to collapse
The documentation wouldn't really help. You're looking for the push command: adb push <local> <remote>.
The wrapper method is in the Device class.
You might, however, need to do some shell work beforehand.
Hey, I am trying to get Androidlib to work with Genymotion. (Another emulator). I first tried to point Genymotion to the ADB that comes with the Android-sdk, but when I tried to use Androidlib to find devices it never found any. I where able to find it using command line adb, but after running androidlib, not even that worked.
My second attempt was to change the adb file used it androidlib. Changed the md5 hash and copied the right file where it should go. but it still would not find my device.
Anyone been working on Genymotion and Androidlib before and have gotten this problem? Or just anyone that have any suggestions?
Can i get progress with push command on AndroidLib.dll?
i am looking for document, to get progress with '"RegawMOD.Android.Adb.FormAdbCommand" (push command) on AndroidLib.dll?
Help!
Erase my quote please
Hi guys, i just wanted to know where is the documentation of this project (since the website is down).
Best regards!
hi
i do not know how to download adriodLib.dll
Pushing files
I'm having trouble with the adb command pushing files, does anyone have an example preferable in vb because i keep getting errors.
I'm getting Type 'RegawMOD.Android.AndroidController' has no constructors.
Code:
Private _android As AndroidController
Private Sub Form1_Shown(sender As Object, e As EventArgs) Handles Me.Form1
CheckFor_()
txtBody.AppendText("Starting adb server..." & NewLine)
_android = New AndroidController()
txtBody.Text = txtBody.Text.Replace("Starting adb server..." & NewLine, "")
timerCursor.Enabled = True
timerPhone.Enabled = True
timerCursor.Start()
timerPhone.Start()
End Sub
Device "minimizes" Activity after App started
Hello,
I'm usind AndroidLib in my project and encountered a strange behaviour. When I start an App via "shell am start -n [PackageName]/[ActivityName] -a android.intent.action.MAIN -c android.intent.category.LAUNCHER", the main Activity shows up on screen. A second later, the activity gets "minimized" and the previous Activity (Home, other App,...) is shown again.
I know the App starts, as it launches some background Threads, which are running and doing, what they're supposed to do. So how can I stop the Activity from disappearing? When starting my App from Android Studio or running the command manually via CMD, everything works.
For everyone asking: I have created my own branch of AndroidLib, and I have documentation for it on my webserver.
Some of the documentation is specifically for my branch of the library, however most of the docs are from the core git and haven't changed.
http://team-m4gkbeatz.eu/androidlib/documentation/

Categories

Resources